Fixed custom config loading cancelling

pull/235/head
Ivan Dmitrievich Yartsev 10 months ago
parent 15a55ab502
commit 1066a80afa

@ -5,7 +5,9 @@ config main_config;
//functions
int yon_load_proceed(YON_CONFIG_TYPE type){
yon_config_clean();
if (type!=YON_CONFIG_CUSTOM){
yon_config_clean();
}
yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL);
if (type==YON_CONFIG_GLOBAL){
yon_debug_output("%s\n",yon_char_unite(config_get_command("global"),NULL));
@ -68,6 +70,7 @@ int yon_load_proceed(YON_CONFIG_TYPE type){
gtk_widget_destroy(dialog);
return 0;
}
yon_config_clean();
yon_config_load_config(type,config_get_command(path),NULL);
}
return 1;
@ -1606,11 +1609,13 @@ ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(int
window->HeaderLabel=yon_gtk_builder_get_widget(builder,"HeaderLabel");
window->StatusCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"StatusCell"));
window->GroupColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(builder,"GroupColumn"));
window->DefaultCheck=yon_gtk_builder_get_widget(builder,"DefaultCheck");
window->list = gtk_list_store_new(3,G_TYPE_BOOLEAN,G_TYPE_STRING,G_TYPE_INT);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(window->list),2,GTK_SORT_ASCENDING);
yon_window_config_custom_window_setup(GTK_WINDOW(window->GroupsWindow),"GroupWindow");
gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),GROUPS_TITLE_LABEL);
g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->GroupsTree);
g_signal_connect(G_OBJECT(window->StatusCell),"toggled",G_CALLBACK(on_group_clicked),window);
GtkTreeIter iter;
config_str current;

@ -272,6 +272,7 @@ typedef struct{
GtkWidget *GroupsCancelButton;
GtkWidget *GroupsOkButton;
GtkWidget *HeaderLabel;
GtkWidget *DefaultCheck;
GtkCellRenderer *StatusCell;
GtkTreeViewColumn *GroupColumn;
} ubl_settings_usergroups_group_window;

@ -31,6 +31,20 @@
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="DefaultCheck">
<property name="label" translatable="yes">Default</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
@ -90,7 +104,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -126,7 +140,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
</object>

Loading…
Cancel
Save