789 |
on_menu_dialogs_activate(GtkMenuItem * menuitem, gpointer user_data) |
on_menu_dialogs_activate(GtkMenuItem * menuitem, gpointer user_data) |
790 |
{ |
{ |
791 |
GtkWidget *dialogsdialog, *checkbutton; |
GtkWidget *dialogsdialog, *checkbutton; |
792 |
gchar **split, *temp; |
gchar **split, *widgetname; |
793 |
gint i; |
gint i; |
794 |
|
|
795 |
dialogsdialog = create_dialogsdialog (); |
dialogsdialog = create_dialogsdialog (); |
796 |
split = g_strsplit(preferences.b4columns, ",", 0); |
split = g_strsplit(preferences.b4columns, ",", 0); |
797 |
for (i = 0; i < 19; i++) |
for (i = 0; i < 19; i++) |
798 |
{ |
{ /* look up name of the button and set it */ |
799 |
temp = g_strdup_printf("b4%d", i); |
widgetname = g_strdup_printf("b4%d", i); |
800 |
checkbutton = lookup_widget(dialogsdialog, temp); |
checkbutton = lookup_widget(dialogsdialog, widgetname); |
801 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), |
802 |
atoi(split[i]) ? TRUE : FALSE); |
atoi(split[i]) ? TRUE : FALSE); |
803 |
g_free(temp); |
g_free(widgetname); |
804 |
} |
} |
805 |
g_strfreev(split); |
g_strfreev(split); |
806 |
gtk_widget_set_sensitive (mainwindow, 0); |
gtk_widget_set_sensitive (mainwindow, 0); |