|
|
|
@ -27,12 +27,16 @@ void on_save_done(main_window *, config_str output, int size){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void yon_save_interface( main_window *widgets){
|
|
|
|
void on_toggle_button_toggled(GtkWidget *self, main_window *widgets){
|
|
|
|
|
|
|
|
if (self == widgets->AutoUpdateCheck){
|
|
|
|
|
|
|
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck))){
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"enable");
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"enable");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"disable");
|
|
|
|
yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"disable");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->UpdateModeCombo){
|
|
|
|
int save_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateModeCombo));
|
|
|
|
int save_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateModeCombo));
|
|
|
|
switch (save_mode){
|
|
|
|
switch (save_mode){
|
|
|
|
case 0: yon_config_remove_by_key(AUTOUPDATE_mode);
|
|
|
|
case 0: yon_config_remove_by_key(AUTOUPDATE_mode);
|
|
|
|
@ -44,6 +48,8 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
case 3:yon_config_register(AUTOUPDATE_mode,AUTOUPDATE_mode_command,"system");
|
|
|
|
case 3:yon_config_register(AUTOUPDATE_mode,AUTOUPDATE_mode_command,"system");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->UpdateIntervalDefaultCheck){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck))){
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_interval);
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_interval);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -64,6 +70,8 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->UpdateRepoListCheck){
|
|
|
|
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateRepoListCheck))){
|
|
|
|
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateRepoListCheck))){
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_repos);
|
|
|
|
yon_config_remove_by_key(AUTOUPDATE_repos);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -82,6 +90,7 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
yon_config_register(AUTOUPDATE_repos,AUTOUPDATE_repos_command,repos);
|
|
|
|
yon_config_register(AUTOUPDATE_repos,AUTOUPDATE_repos_command,repos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->RepositoriesRepoListConfigurationCheck||self == widgets->RepositoriesDisableSystemReposCheck){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck))){
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck))){
|
|
|
|
yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"only");
|
|
|
|
yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"only");
|
|
|
|
@ -91,6 +100,8 @@ 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");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->PublicationConnectPublicCheck||self == widgets->RecieveDBFromNetCheck){
|
|
|
|
char *repo_net = "";
|
|
|
|
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 = NULL;
|
|
|
|
@ -110,7 +121,6 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
repo_net = yon_char_unite(repo_net,",",NULL);
|
|
|
|
repo_net = yon_char_unite(repo_net,",",NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationCheck))){
|
|
|
|
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationCheck))){
|
|
|
|
yon_config_remove_by_key(REPOPUBLIC_NET_parameter);
|
|
|
|
yon_config_remove_by_key(REPOPUBLIC_NET_parameter);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -132,6 +142,7 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,repo_net);
|
|
|
|
yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,repo_net);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (self == widgets->MirrorPublicCheck){
|
|
|
|
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 {
|
|
|
|
@ -139,6 +150,7 @@ void yon_save_interface( main_window *widgets){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
@ -439,30 +451,26 @@ void on_web_user_check(GtkToggleButton *self, web_publication_add_window *window
|
|
|
|
gtk_widget_set_sensitive(window->UserPasswordEntry,(status&&status2));
|
|
|
|
gtk_widget_set_sensitive(window->UserPasswordEntry,(status&&status2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_save(GtkWidget *, main_window *widgets){
|
|
|
|
void on_config_save(GtkWidget *, main_window *){
|
|
|
|
main_config.save_config=2;
|
|
|
|
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);
|
|
|
|
template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_BOTH,yon_config_get_custom_command("global"),NULL);
|
|
|
|
if (window){};
|
|
|
|
if (window){};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_global_save(GtkWidget *, main_window *widgets){
|
|
|
|
void on_config_global_save(GtkWidget *, main_window *){
|
|
|
|
main_config.save_config=0;
|
|
|
|
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);
|
|
|
|
template_saving_window *window = yon_save_proceed("global",YON_CONFIG_GLOBAL,yon_config_get_custom_command("global"),NULL);
|
|
|
|
if (window){};
|
|
|
|
if (window){};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_local_save(GtkWidget *, main_window *widgets){
|
|
|
|
void on_config_local_save(GtkWidget *, main_window *){
|
|
|
|
main_config.save_config=1;
|
|
|
|
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);
|
|
|
|
template_saving_window *window = yon_save_proceed("system",YON_CONFIG_LOCAL,yon_config_get_custom_command("system"),NULL);
|
|
|
|
if (window){};
|
|
|
|
if (window){};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_config_custom_save(GtkWidget *, main_window *widgets){
|
|
|
|
void on_config_custom_save(GtkWidget *, main_window *){
|
|
|
|
main_config.save_config=1;
|
|
|
|
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);
|
|
|
|
template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_CUSTOM,yon_config_get_custom_command("system"),NULL);
|
|
|
|
if (window){};
|
|
|
|
if (window){};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1604,6 +1612,16 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateIntervalDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->UpdateIntervalSpin);
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateIntervalDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->UpdateIntervalSpin);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->AutoUpdateCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateModeCombo),"changed",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateIntervalDefaultCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UpdateRepoListCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->RepositoriesRepoListConfigurationCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->RepositoriesDisableSystemReposCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->PublicationConnectPublicCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->RecieveDBFromNetCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MirrorPublicCheck),"toggled",G_CALLBACK(on_toggle_button_toggled),widgets);
|
|
|
|
|
|
|
|
|
|
|
|
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree));
|
|
|
|
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree));
|
|
|
|
for (unsigned int i=0;i<g_list_length(list);i++){
|
|
|
|
for (unsigned int i=0;i<g_list_length(list);i++){
|
|
|
|
g_signal_connect_after(G_OBJECT(g_list_nth_data(list,i)),"notify::width",G_CALLBACK(on_column_resize),widgets);
|
|
|
|
g_signal_connect_after(G_OBJECT(g_list_nth_data(list,i)),"notify::width",G_CALLBACK(on_column_resize),widgets);
|
|
|
|
|