Fix #698: Use more descriptive Buttons in preference dialog
authorColin Clark <colin.clark@cclark.uk>
Sat, 21 Sep 2019 12:10:23 +0000 (13:10 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sat, 21 Sep 2019 12:10:23 +0000 (13:10 +0100)
https://github.com/BestImageViewer/geeqie/issues/698

There seems to be no real need for the Apply and Save buttons.

doc/docbook/GuideOptionsKeyboard.xml
src/preferences.c

index 46e7043..a2b159f 100644 (file)
@@ -3,5 +3,5 @@
   <title id="titleGuideOptionsKeyboard">Keyboard Options</title>
   <para>This dialogue enables changes to be be made to the default key short-cut allocated to menu items.</para>
   <para>The data displayed may be ordered by clicking at the top of each column.</para>
-  <para>To change or create a new short-cut, double click on the KEY column of the relevant item. The text displayed will change to "New accelerator...". Press the key combination required for this action. The Apply button must be pressed for the change to be made permanent.</para>
+  <para>To change or create a new short-cut, double click on the KEY column of the relevant item. The text displayed will change to "New accelerator...". Press the key combination required for this action.</para>
 </section>
index 6bba895..188f7b3 100644 (file)
@@ -513,24 +513,14 @@ static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpoi
 }
 
 static void config_window_ok_cb(GtkWidget *widget, gpointer data)
-{
-       config_window_apply();
-       config_window_close_cb(NULL, NULL);
-}
-
-static void config_window_apply_cb(GtkWidget *widget, gpointer data)
 {
        LayoutWindow *lw;
        lw = layout_window_list->data;
 
        config_window_apply();
        layout_util_sync(lw);
-}
-
-static void config_window_save_cb(GtkWidget *widget, gpointer data)
-{
-       config_window_apply();
        save_options(options);
+       config_window_close_cb(NULL, NULL);
 }
 
 /*
@@ -3604,18 +3594,6 @@ 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_can_default(button, TRUE);
-       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);
-       gtk_widget_set_can_default(button, TRUE);
-       gtk_widget_show(button);
-
        button = pref_button_new(NULL, GTK_STOCK_CANCEL, NULL, FALSE,
                                 G_CALLBACK(config_window_close_cb), NULL);
        gtk_container_add(GTK_CONTAINER(hbox), button);