27 #define AWAR_CONFIG_NAME_SRC AWAR_MERGE_TMP_SRC "name"
28 #define AWAR_CONFIG_NAME_DST AWAR_MERGE_TMP_DST "name"
29 #define AWAR_CONFIG_NAME(db) awar_name_tmp(db, "name")
46 if (gb_dest_name) error =
GBS_global_string(
"Configuration '%s' already exists", dest);
50 else error =
"Please select a configuration";
61 AWT_activate_prompt(
"Rename configuration",
"Enter new name of configuration:", source,
"Rename", handler);
78 error =
"Select a config to delete";
101 if (!gb_src_cfgname) {
102 error =
"Please select the configuration you want to transfer";
104 else if (gb_dst_cfgname) {
105 error =
GBS_global_string(
"Configuration '%s' exists. Delete it first.", config);
129 AW_window_simple *aws =
new AW_window_simple;
131 aws->init(awr,
"MERGE_CONFIGS",
"Merge species selections (=editor configs)");
132 aws->load_xfig(
"merge/configs.fig");
134 aws->button_length(20);
138 aws->create_button(
"CLOSE",
"CLOSE",
"C");
142 aws->create_button(
"HELP",
"HELP",
"H");
152 aws->create_button(
"DELETE CONFIG_DB1",
"Delete Config");
156 aws->create_button(
"DELETE_CONFIG_DB2",
"Delete Config");
160 aws->create_button(
"RENAME_CONFIG_DB1",
"Rename Config");
164 aws->create_button(
"RENAME_CONFIG_DB2",
"Rename Config");
168 aws->create_button(
"TRANSFER_CONFIG",
"Transfer Config");
170 aws->button_length(0);
171 aws->shadow_width(1);
174 aws->create_button(
"HELP_MERGE",
"#merge/icon.xpm");
GB_ERROR GB_begin_transaction(GBDATA *gbd)
GB_ERROR GB_copy_dropProtectMarksAndTempstate(GBDATA *dest, GBDATA *source)
#define AWAR_CONFIG_NAME(db)
static void MG_config_delete_cb(AW_window *aww, DbSel db)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
void GB_end_transaction_show_error(GBDATA *gbd, GB_ERROR error, void(*error_handler)(GB_ERROR))
void MG_create_config_awar(AW_root *aw_root, AW_default aw_def)
const char * GBS_global_string(const char *templat,...)
GB_ERROR MG_expect_renamed()
void AW_POPDOWN(AW_window *window)
GBDATA * GB_get_father(GBDATA *gbd)
GB_ERROR GB_delete(GBDATA *&source)
const char * read_char_pntr() const
GB_ERROR GB_await_error()
static AW_root * SINGLETON
GBDATA * GB_create_container(GBDATA *father, const char *key)
WindowCallback makeHelpCallback(const char *helpfile)
static GB_ERROR config_rename_handler(const char *dest, DbSel db)
#define AWAR_CONFIG_NAME_SRC
#define AWAR_CONFIG_NAME_DST
AW_DB_selection * awt_create_CONFIG_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname)
static void error(const char *msg)
static void MG_transfer_config(AW_window *aww)
char * read_string() const
AW_awar * awar(const char *awar)
AW_window * MG_create_merge_configs_window(AW_root *awr)
void aw_message(const char *msg)
GBDATA * GB_find_string(GBDATA *gbd, const char *key, const char *str, GB_CASE case_sens, GB_SEARCH_TYPE gbs)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
GBDATA * get_gb_main(DbSel db)
static void config_rename_cb(AW_window *aww, DbSel db)
void AWT_activate_prompt(const char *title, const char *prompt, const char *defaultResult, const char *button, const ResultHandler &handle_result, const char *helpfile, const char *srt)