Fixed tables saving

pull/48/head
parent 78f9776b2b
commit 0d54ff7e53

@ -75,7 +75,7 @@ void on_toggle_button_toggled(GtkWidget *self, main_window *widgets){
}
} else if (self == widgets->UpdateRepoListCheck){
} else if (self == widgets->UpdateRepoListCheck||self == widgets->UpdateRepoTree){
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateRepoListCheck))){
yon_config_remove_by_key(AUTOUPDATE_repos);
} else {
@ -105,7 +105,7 @@ void on_toggle_button_toggled(GtkWidget *self, main_window *widgets){
yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"disable");
}
} else if (self == widgets->PublicationConnectPublicCheck||self == widgets->RecieveDBFromNetCheck){
} else if (self == widgets->PublicationConnectPublicCheck||self == widgets->RecieveDBFromNetCheck||self == widgets->PublicationCheck||self == widgets->PublicationTree){
char *repo_net = "";
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck))){
repo_net = NULL;
@ -507,12 +507,24 @@ void on_config_custom_load(GtkWidget *,main_window *widgets){
yon_interface_update(widgets);
}
void on_toggle_cell_toggled(GtkWidget *,char *path, GtkListStore *target){
void on_toggle_cell_toggled(GtkCellRenderer *self,char *path, main_window *widgets){
GtkListStore *target = NULL;
GtkWidget *table = NULL;
if (self == widgets->UpdateToggleCell){
target = widgets->UpdateRepoList;
table = widgets->UpdateRepoTree;
} else if (self == widgets->PublicationToggleCell){
target = widgets->PublicationList;
table = widgets->PublicationTree;
}
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);
on_toggle_button_toggled(table,widgets);
}
/**config_init()
@ -1688,8 +1700,8 @@ void yon_main_window_complete(main_window *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);
g_signal_connect(G_OBJECT(widgets->UpdateToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->PublicationToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->UpdateRepoListCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->UpdateRepoTree);
g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationTree);

@ -304,7 +304,7 @@ void on_config_local_load(GtkWidget *, main_window *widgets);
void on_config_global_load(GtkWidget *, main_window *widgets);
void on_config_custom_load(GtkWidget *,main_window *widgets);
void on_toggle_cell_toggled(GtkWidget *,char *path, GtkListStore *target);
void on_toggle_cell_toggled(GtkCellRenderer *,char *path, main_window *widgets);
char *on_save_repos(main_window *widgets);

@ -922,6 +922,9 @@ Configuration - configuration path</property>
<property name="wrap">True</property>
</object>
</child>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
@ -941,6 +944,9 @@ Configuration - configuration path</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Allow this repository to be a valid source of packages when running --sysupgrade</property>
<property name="wrap">True</property>
<style>
<class name="thin"/>
</style>
</object>
</child>
</object>

Loading…
Cancel
Save