Add a Save button to Preferences dialog, which allow to save options to file without...
authorLaurent Monin <geeqie@norz.org>
Sun, 31 Aug 2008 12:29:49 +0000 (12:29 +0000)
committerLaurent Monin <geeqie@norz.org>
Sun, 31 Aug 2008 12:29:49 +0000 (12:29 +0000)
src/preferences.c

index 8632cd7..0123412 100644 (file)
@@ -417,6 +417,12 @@ static void config_window_apply_cb(GtkWidget *widget, gpointer data)
        config_window_apply();
 }
 
+static void config_window_save_cb(GtkWidget *widget, gpointer data)
+{
+       config_window_apply();
+       save_options(options);
+}
+
 /*
  *-----------------------------------------------------------------------------
  * config window setup (private)
@@ -1648,6 +1654,12 @@ static void config_window_create(void)
 
        ct_button = button;
 
+       button = pref_button_new(NULL, GTK_STOCK_SAVE, NULL, FALSE,
+                                G_CALLBACK(config_window_save_cb), NULL);
+       gtk_container_add(GTK_CONTAINER(hbox), button);
+       GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+       gtk_widget_show(button);
+       
        button = pref_button_new(NULL, GTK_STOCK_APPLY, NULL, FALSE,
                                 G_CALLBACK(config_window_apply_cb), NULL);
        gtk_container_add(GTK_CONTAINER(hbox), button);