|
|
|
@ -24,24 +24,23 @@ void yon_save_interface(main_window *widgets){
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_interval);
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_interval);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
char *int_str = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin)));
|
|
|
|
char *int_str = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin)));
|
|
|
|
char *interval = NULL;
|
|
|
|
char *interval = "";
|
|
|
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->BootCheck))) interval = "boot";
|
|
|
|
switch(gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo))){
|
|
|
|
switch(gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo))){
|
|
|
|
case 0: interval = "boost";
|
|
|
|
case 0: interval = yon_char_unite(!yon_char_is_empty(interval)?interval:"",!yon_char_is_empty(interval)?",":"",int_str,"min");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 1: interval = yon_char_append(int_str,"min");
|
|
|
|
case 1: interval = yon_char_unite(int_str,"h",NULL);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2: interval = yon_char_append(int_str,"h");
|
|
|
|
case 2: interval = yon_char_unite(int_str,"d",NULL);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3: interval = yon_char_append(int_str,"d");
|
|
|
|
case 3: interval = yon_char_unite(int_str,"M",NULL);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: interval = yon_char_append(int_str,"M");
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,interval);
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,interval);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateRepoListCombo))){
|
|
|
|
if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateRepoListCombo))){
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_repos);
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_repos);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
char *repos = "";
|
|
|
|
char *repos = "";
|
|
|
|
@ -68,15 +67,47 @@ void yon_save_interface(main_window *widgets){
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"disable");
|
|
|
|
yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"disable");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
char *repo_net = "";
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck))){
|
|
|
|
|
|
|
|
repo_net = NULL;
|
|
|
|
|
|
|
|
repo_net = "enable";
|
|
|
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck))){
|
|
|
|
|
|
|
|
if (!repo_net) repo_net = ",db";
|
|
|
|
|
|
|
|
else repo_net = yon_char_unite(repo_net,",","db",NULL);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
repo_net = yon_char_unite(repo_net,",",NULL);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
repo_net = "disable";
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck))){
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"db");
|
|
|
|
if (!repo_net) repo_net = ",db";
|
|
|
|
|
|
|
|
else repo_net = yon_char_unite(repo_net,",","db",NULL);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"enable");
|
|
|
|
repo_net = yon_char_unite(repo_net,",",NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->PublicationCombo))){
|
|
|
|
|
|
|
|
yon_config_remove_by_key(REPOPUBLIC_NET_parameter);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"disable");
|
|
|
|
char *repos = "";
|
|
|
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
for_iter(GTK_TREE_MODEL(widgets->PublicationList),&iter){
|
|
|
|
|
|
|
|
char *target;
|
|
|
|
|
|
|
|
int status;
|
|
|
|
|
|
|
|
gtk_tree_model_get(GTK_TREE_MODEL(widgets->PublicationList),&iter,0,&status,1,&target,-1);
|
|
|
|
|
|
|
|
if (status){
|
|
|
|
|
|
|
|
char *temp = yon_char_unite(repos,!yon_char_is_empty(repos)?",":"",target,NULL);
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(repos)) free(repos);
|
|
|
|
|
|
|
|
repos = temp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(repos)){
|
|
|
|
|
|
|
|
repo_net = yon_char_unite(repo_net,",",repos,NULL);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,repo_net);
|
|
|
|
|
|
|
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck))){
|
|
|
|
yon_config_register(REPOPUBLIC_CACHE,REPOPUBLIC_CACHE_command,"enable");
|
|
|
|
yon_config_register(REPOPUBLIC_CACHE,REPOPUBLIC_CACHE_command,"enable");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -153,15 +184,13 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
config_str parsed = yon_char_parse(current,&cur_size,";");
|
|
|
|
config_str parsed = yon_char_parse(current,&cur_size,";");
|
|
|
|
if (cur_size){
|
|
|
|
if (cur_size){
|
|
|
|
gtk_list_store_append(widgets->ReposList,&iter);
|
|
|
|
gtk_list_store_append(widgets->ReposList,&iter);
|
|
|
|
char *temp = yon_char_replace(parsed[0],",","\n");
|
|
|
|
char *temp = strstr(parsed[0],",")?yon_char_replace(parsed[0],",","\n"):parsed[0];
|
|
|
|
free(parsed[0]);
|
|
|
|
|
|
|
|
parsed[0] = temp;
|
|
|
|
parsed[0] = temp;
|
|
|
|
gtk_list_store_set(widgets->ReposList,&iter,0,cur_size>3&&!strcmp(parsed[3],"")?1:0,1,key,2,parsed[0],3,cur_size>1?parsed[1]:"",4,cur_size>2?parsed[2]:"",-1);
|
|
|
|
gtk_list_store_set(widgets->ReposList,&iter,0,cur_size>3&&!strcmp(parsed[3],"")?1:0,1,key,2,parsed[0],3,cur_size>1?parsed[1]:"",4,cur_size>2?parsed[2]:"",-1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(key);
|
|
|
|
free(key);
|
|
|
|
free(current);
|
|
|
|
free(current);
|
|
|
|
yon_char_parsed_free(parsed,cur_size);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_char_parsed_free(repos,size);
|
|
|
|
yon_char_parsed_free(repos,size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -339,6 +368,93 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
|
|
// standard functions
|
|
|
|
// standard functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *on_save_repos(main_window *widgets){
|
|
|
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
int size=0;
|
|
|
|
|
|
|
|
config_str queue = NULL;
|
|
|
|
|
|
|
|
for_iter(GTK_TREE_MODEL(widgets->ReposList),&iter){
|
|
|
|
|
|
|
|
char *target;
|
|
|
|
|
|
|
|
gtk_tree_model_get(GTK_TREE_MODEL(widgets->ReposList),&iter,1,&target,-1);
|
|
|
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(queue,&size,REPOSITORY(target));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int param_size;
|
|
|
|
|
|
|
|
config_str parameters = yon_config_get_save_parameters_by_list(¶m_size,queue,size);
|
|
|
|
|
|
|
|
return yon_char_parsed_to_string(parameters,param_size," ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_web_user_check(GtkToggleButton *self, web_publication_add_window *window){
|
|
|
|
|
|
|
|
int status = gtk_toggle_button_get_active(self);
|
|
|
|
|
|
|
|
int status2 = gtk_combo_box_get_active(GTK_COMBO_BOX(window->UserPasswordCombo));
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(window->UsernameEntry,status);
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(window->UserPasswordCombo,status);
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(window->PasswordButton,status&&status2);
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(window->UserPasswordEntry,(status&&status2));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_save(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
main_config.save_config=2;
|
|
|
|
|
|
|
|
yon_save_interface(widgets);
|
|
|
|
|
|
|
|
template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_BOTH,yon_config_get_custom_command("global"),NULL);
|
|
|
|
|
|
|
|
if (window){};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_global_save(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
main_config.save_config=0;
|
|
|
|
|
|
|
|
yon_save_interface(widgets);
|
|
|
|
|
|
|
|
template_saving_window *window = yon_save_proceed("global",YON_CONFIG_GLOBAL,yon_config_get_custom_command("global"),NULL);
|
|
|
|
|
|
|
|
if (window){};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_local_save(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
main_config.save_config=1;
|
|
|
|
|
|
|
|
yon_save_interface(widgets);
|
|
|
|
|
|
|
|
template_saving_window *window = yon_save_proceed("system",YON_CONFIG_LOCAL,yon_config_get_custom_command("system"),NULL);
|
|
|
|
|
|
|
|
if (window){};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_custom_save(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
main_config.save_config=1;
|
|
|
|
|
|
|
|
yon_save_interface(widgets);
|
|
|
|
|
|
|
|
template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_CUSTOM,yon_config_get_custom_command("system"),NULL);
|
|
|
|
|
|
|
|
if (window){};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_local_load(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
yon_load_proceed(YON_CONFIG_LOCAL);
|
|
|
|
|
|
|
|
textdomain(template_ui_LocaleName);
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
textdomain(LocaleName);
|
|
|
|
|
|
|
|
main_config.load_mode=1;
|
|
|
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_global_load(GtkWidget *, main_window *widgets){
|
|
|
|
|
|
|
|
yon_load_proceed(YON_CONFIG_GLOBAL);
|
|
|
|
|
|
|
|
textdomain(template_ui_LocaleName);
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
textdomain(LocaleName);
|
|
|
|
|
|
|
|
main_config.load_mode=0;
|
|
|
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_custom_load(GtkWidget *,main_window *widgets){
|
|
|
|
|
|
|
|
yon_load_proceed(YON_CONFIG_CUSTOM);
|
|
|
|
|
|
|
|
textdomain(template_ui_LocaleName);
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
textdomain(LocaleName);
|
|
|
|
|
|
|
|
main_config.load_mode=3;
|
|
|
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_toggle_cell_toggled(GtkWidget *,char *path, GtkListStore *target){
|
|
|
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
int status;
|
|
|
|
|
|
|
|
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(target),&iter,path);
|
|
|
|
|
|
|
|
gtk_tree_model_get(GTK_TREE_MODEL(target),&iter,0,&status,-1);
|
|
|
|
|
|
|
|
gtk_list_store_set(GTK_LIST_STORE(target),&iter,0,!status,-1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**config_init()
|
|
|
|
/**config_init()
|
|
|
|
* [EN]
|
|
|
|
* [EN]
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -426,6 +542,7 @@ void on_web_publish_add(GtkWidget *,main_window *widgets){
|
|
|
|
void on_repo_add(GtkWidget *, main_window *widgets){
|
|
|
|
void on_repo_add(GtkWidget *, main_window *widgets){
|
|
|
|
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MirrorTree)));
|
|
|
|
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MirrorTree)));
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->RepoSourceCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->RepoSourceButton);
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),ADD_REPO_LABEL,icon_path,"add_repo_window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),ADD_REPO_LABEL,icon_path,"add_repo_window");
|
|
|
|
|
|
|
|
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
@ -800,15 +917,24 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
|
|
|
|
web_publication_add_window *window = yon_dictionary_get_data(dict->first->next,web_publication_add_window*);
|
|
|
|
web_publication_add_window *window = yon_dictionary_get_data(dict->first->next,web_publication_add_window*);
|
|
|
|
|
|
|
|
|
|
|
|
int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnablePublishCheck));
|
|
|
|
int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnablePublishCheck));
|
|
|
|
// char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
|
|
|
|
|
|
|
|
int port_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PortCheck));
|
|
|
|
int port_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PortCheck));
|
|
|
|
char *port = (char*)gtk_entry_get_text(GTK_ENTRY(window->PortEntry));
|
|
|
|
char *port = (char*)gtk_entry_get_text(GTK_ENTRY(window->PortEntry));
|
|
|
|
int enable_browser = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnableWebFileBrowserCheck));
|
|
|
|
int enable_browser = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnableWebFileBrowserCheck));
|
|
|
|
|
|
|
|
|
|
|
|
int username_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsernameCheck));
|
|
|
|
int username_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsernameCheck));
|
|
|
|
char *username = (char*)gtk_entry_get_text(GTK_ENTRY(window->UsernameEntry));
|
|
|
|
char *username = (char*)gtk_entry_get_text(GTK_ENTRY(window->UsernameEntry));
|
|
|
|
char *user_password = (char*)gtk_entry_get_text(GTK_ENTRY(window->UserPasswordEntry));
|
|
|
|
char *user_password = yon_char_new((char*)gtk_entry_get_text(GTK_ENTRY(window->UserPasswordEntry)));
|
|
|
|
char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->UserPasswordCombo));
|
|
|
|
char *encryption = user_password[5]=='|'?yon_char_divide(user_password,6):NULL;
|
|
|
|
|
|
|
|
if (username_check&&yon_char_is_empty(username)){
|
|
|
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->UsernameEntry);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (username_check&>k_combo_box_get_active(GTK_COMBO_BOX(window->UserPasswordCombo))&&yon_char_is_empty(user_password)){
|
|
|
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->UserPasswordEntry);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
|
|
|
|
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
|
|
|
|
char *full_name = "";
|
|
|
|
char *full_name = "";
|
|
|
|
@ -830,14 +956,16 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (overall==disabled) {
|
|
|
|
if (overall==disabled) {
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NO_SHARED_REPOS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NO_SHARED_REPOS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PathEntry);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char *final_name = yon_char_is_empty(full_name)||!disabled ? name : yon_char_unite(name,":",full_name,NULL);
|
|
|
|
char *final_name = yon_char_is_empty(full_name)||!disabled ? name : yon_char_unite(name,":",full_name,NULL);
|
|
|
|
char *final = yon_char_unite(enabled?"enable":"disable",":",enable_browser?"listing":"",":",port_enabled?port:"",":",username_check?username:"",":",username_check?yon_char_is_empty(encryption)? user_password:encryption:"",":",username_check?!yon_char_is_empty(encryption)?user_password:"":"",NULL);
|
|
|
|
char *final = yon_char_unite(enabled?"enable":"disable",":",enable_browser?"listing":"",":",port_enabled?port:"",":",username_check?username:"",":",username_check?yon_char_is_empty(encryption)? user_password:encryption:"",":",username_check?!yon_char_is_empty(encryption)?user_password:"":"",NULL);
|
|
|
|
if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){
|
|
|
|
if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){
|
|
|
|
yon_config_remove_by_key(REPOPUBLIC_WEB_command(window->name));
|
|
|
|
yon_config_remove_by_key(REPOPUBLIC_WEB_command(window->name));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final);
|
|
|
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -955,8 +1083,8 @@ void on_password_accept(GtkWidget *,dictionary *dict){
|
|
|
|
yon_ubl_status_highlight_incorrect(window->RepeatPasswordEntry);
|
|
|
|
yon_ubl_status_highlight_incorrect(window->RepeatPasswordEntry);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char *encryption = (char*)gtk_entry_get_text(GTK_ENTRY(window->EncryptionCombo));
|
|
|
|
char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
|
|
|
|
char *final_text = yon_char_unite(encryption,password,NULL);
|
|
|
|
char *final_text = yon_char_unite(encryption,"|",password,NULL);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),final_text);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),final_text);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1114,6 +1242,7 @@ web_publication_add_window *yon_web_publication_add_window_new(){
|
|
|
|
g_signal_connect(G_OBJECT(window->PathEntry),"changed",G_CALLBACK(on_web_publish_path_changed),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->PathEntry),"changed",G_CALLBACK(on_web_publish_path_changed),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
g_signal_connect(G_OBJECT(window->PasswordButton),"clicked",G_CALLBACK(on_password_open),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->PasswordButton),"clicked",G_CALLBACK(on_password_open),window);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->UsernameCheck),"toggled",G_CALLBACK(on_web_user_check),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->PasswordButton);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->PasswordButton);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->UserPasswordEntry);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->UserPasswordEntry);
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
@ -1219,6 +1348,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
widgets->UpdateModeCombo = yon_gtk_builder_get_widget(builder,"UpdateModeCombo");
|
|
|
|
widgets->UpdateModeCombo = yon_gtk_builder_get_widget(builder,"UpdateModeCombo");
|
|
|
|
widgets->UpdateIntervalDefaultCheck = yon_gtk_builder_get_widget(builder,"UpdateIntervalDefaultCheck");
|
|
|
|
widgets->UpdateIntervalDefaultCheck = yon_gtk_builder_get_widget(builder,"UpdateIntervalDefaultCheck");
|
|
|
|
widgets->UpdateIntervalSpin = yon_gtk_builder_get_widget(builder,"UpdateIntervalSpin");
|
|
|
|
widgets->UpdateIntervalSpin = yon_gtk_builder_get_widget(builder,"UpdateIntervalSpin");
|
|
|
|
|
|
|
|
widgets->UpdateToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"UpdateToggleCell"));
|
|
|
|
widgets->UpdateIntervalCombo = yon_gtk_builder_get_widget(builder,"UpdateIntervalCombo");
|
|
|
|
widgets->UpdateIntervalCombo = yon_gtk_builder_get_widget(builder,"UpdateIntervalCombo");
|
|
|
|
widgets->UpdateRepoListCombo = yon_gtk_builder_get_widget(builder,"UpdateRepoListCombo");
|
|
|
|
widgets->UpdateRepoListCombo = yon_gtk_builder_get_widget(builder,"UpdateRepoListCombo");
|
|
|
|
widgets->UpdateRepoTree = yon_gtk_builder_get_widget(builder,"UpdateRepoTree");
|
|
|
|
widgets->UpdateRepoTree = yon_gtk_builder_get_widget(builder,"UpdateRepoTree");
|
|
|
|
@ -1235,6 +1365,8 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
widgets->RecieveDBFromNetCheck = yon_gtk_builder_get_widget(builder,"RecieveDBFromNetCheck");
|
|
|
|
widgets->RecieveDBFromNetCheck = yon_gtk_builder_get_widget(builder,"RecieveDBFromNetCheck");
|
|
|
|
widgets->PublicationTree = yon_gtk_builder_get_widget(builder,"PublicationTree");
|
|
|
|
widgets->PublicationTree = yon_gtk_builder_get_widget(builder,"PublicationTree");
|
|
|
|
widgets->PublicationUpdateButton = yon_gtk_builder_get_widget(builder,"PublicationUpdateButton");
|
|
|
|
widgets->PublicationUpdateButton = yon_gtk_builder_get_widget(builder,"PublicationUpdateButton");
|
|
|
|
|
|
|
|
widgets->PublicationToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PublicationToggleCell"));
|
|
|
|
|
|
|
|
widgets->PublicationCombo = yon_gtk_builder_get_widget(builder,"PublicationCombo");
|
|
|
|
widgets->WebPublicationUpdateButton = yon_gtk_builder_get_widget(builder,"WebPublicationUpdateButton");
|
|
|
|
widgets->WebPublicationUpdateButton = yon_gtk_builder_get_widget(builder,"WebPublicationUpdateButton");
|
|
|
|
widgets->WebPublicationAddButton = yon_gtk_builder_get_widget(builder,"WebPublicationAddButton");
|
|
|
|
widgets->WebPublicationAddButton = yon_gtk_builder_get_widget(builder,"WebPublicationAddButton");
|
|
|
|
widgets->WebPublicationEditButton = yon_gtk_builder_get_widget(builder,"WebPublicationEditButton");
|
|
|
|
widgets->WebPublicationEditButton = yon_gtk_builder_get_widget(builder,"WebPublicationEditButton");
|
|
|
|
@ -1247,6 +1379,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
widgets->MirrorEditButton = yon_gtk_builder_get_widget(builder,"MirrorEditButton");
|
|
|
|
widgets->MirrorEditButton = yon_gtk_builder_get_widget(builder,"MirrorEditButton");
|
|
|
|
widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton");
|
|
|
|
widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton");
|
|
|
|
widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton");
|
|
|
|
widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton");
|
|
|
|
|
|
|
|
widgets->BootCheck = yon_gtk_builder_get_widget(builder,"BootCheck");
|
|
|
|
widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList"));
|
|
|
|
widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList"));
|
|
|
|
widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList"));
|
|
|
|
widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList"));
|
|
|
|
widgets->PublicationList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PublicationList"));
|
|
|
|
widgets->PublicationList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PublicationList"));
|
|
|
|
@ -1270,6 +1403,19 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
g_signal_connect(G_OBJECT(widgets->RepositoriesEditButton),"clicked",G_CALLBACK(on_repo_edit),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(widgets->RepositoriesEditButton),"clicked",G_CALLBACK(on_repo_edit),widgets);
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MirrorConfigureButton),"clicked",G_CALLBACK(on_mirror_configure),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MirrorConfigureButton),"clicked",G_CALLBACK(on_mirror_configure),widgets);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SaveMenuItem),"activate",G_CALLBACK(on_config_save),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SaveGlobalMenuItem),"activate",G_CALLBACK(on_config_global_save),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SaveLocalMenuItem),"activate",G_CALLBACK(on_config_local_save),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SaveCustomMenuItem),"activate",G_CALLBACK(on_config_custom_save),widgets);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadGlobalMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadCustomMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->UpdateRepoList);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->PublicationToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->PublicationList);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->MirrorTree));
|
|
|
|
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->MirrorTree));
|
|
|
|
|