Fixed update interval combo and spin sensitiveness

pull/35/head
parent 3a6cf45392
commit 5182513387

@ -346,6 +346,7 @@ void yon_interface_update(main_window *widgets){
} }
autoupdate_config = config(AUTOUPDATE_interval); autoupdate_config = config(AUTOUPDATE_interval);
if (!yon_char_is_empty(autoupdate_config)){ if (!yon_char_is_empty(autoupdate_config)){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck),0);
if (strstr(autoupdate_config,"min")){ if (strstr(autoupdate_config,"min")){
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),0);
} else if (autoupdate_config[strlen(autoupdate_config)-1]=='h'){ } else if (autoupdate_config[strlen(autoupdate_config)-1]=='h'){
@ -356,6 +357,8 @@ void yon_interface_update(main_window *widgets){
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),3); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),3);
} }
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin),atol(autoupdate_config)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin),atol(autoupdate_config));
} else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck),1);
} }
} }
@ -1518,6 +1521,8 @@ void yon_main_window_complete(main_window *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->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); g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationTree);
g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationUpdateButton); g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationUpdateButton);
g_signal_connect(G_OBJECT(widgets->UpdateIntervalDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->UpdateIntervalCombo);
g_signal_connect(G_OBJECT(widgets->UpdateIntervalDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->UpdateIntervalSpin);
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree)); GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree));

@ -326,6 +326,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child> <child>
<object class="GtkSpinButton" id="UpdateIntervalSpin"> <object class="GtkSpinButton" id="UpdateIntervalSpin">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adjustment1</property> <property name="adjustment">adjustment1</property>
</object> </object>
@ -338,6 +339,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child> <child>
<object class="GtkComboBoxText" id="UpdateIntervalCombo"> <object class="GtkComboBoxText" id="UpdateIntervalCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property> <property name="active">0</property>
<items> <items>

Loading…
Cancel
Save