[gnome-commander] Options: set styles and save options outside of gnome_cmd_options_dialog()



commit f9e770ed2aa1d0e1536ccecae178a476524e4a0a
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Nov 6 14:23:29 2011 +0100

    Options: set styles and save options outside of gnome_cmd_options_dialog()

 src/gnome-cmd-options-dialog.cc |    5 -----
 src/gnome-cmd-user-actions.cc   |    9 ++++++++-
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index d141a65..dfdb6e5 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -2018,11 +2018,6 @@ gboolean gnome_cmd_options_dialog (GtkWindow *parent, GnomeCmdData &cfg)
         store_filter_options (dialog, cfg);
         store_programs_options (dialog, cfg);
         store_devices_options (dialog, cfg);
-
-        gnome_cmd_style_create ();
-        main_win->update_style();
-
-        cfg.save();
     }
 
     gtk_widget_destroy (dialog);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index a8fc98c..784ddaf 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -43,6 +43,7 @@
 #include "gnome-cmd-chown-dialog.h"
 #include "gnome-cmd-user-actions.h"
 #include "gnome-cmd-dir-indicator.h"
+#include "gnome-cmd-style.h"
 #include "plugin_manager.h"
 #include "cap.h"
 #include "utils.h"
@@ -1789,7 +1790,13 @@ void view_toggle_tab_lock (GtkMenuItem *menuitem, gpointer page)
 /************** Options Menu **************/
 void options_edit (GtkMenuItem *menuitem, gpointer not_used)
 {
-    gnome_cmd_options_dialog (*main_win, gnome_cmd_data);
+    if (gnome_cmd_options_dialog (*main_win, gnome_cmd_data))
+    {
+        gnome_cmd_style_create ();
+        main_win->update_style();
+
+        gnome_cmd_data.save();
+    }
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]