[gnome-commander] Add reference to GnomeCmdData in gnome_cmd_style_create()



commit 1b8913f5ec95bec94e0d2636cddb01ff5d490a3b
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Nov 6 19:20:20 2011 +0100

    Add reference to GnomeCmdData in gnome_cmd_style_create()

 src/gnome-cmd-main-win.cc     |    2 +-
 src/gnome-cmd-style.cc        |    2 +-
 src/gnome-cmd-style.h         |    4 +++-
 src/gnome-cmd-user-actions.cc |    2 +-
 src/main.cc                   |    2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index e6f25bc..49b984c 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -947,7 +947,7 @@ gboolean GnomeCmdMainWin::key_pressed(GdkEventKey *event)
             case GDK_H:
             case GDK_h:
                 gnome_cmd_data.filter_settings.hidden = !gnome_cmd_data.filter_settings.hidden;
-                gnome_cmd_style_create ();
+                gnome_cmd_style_create (gnome_cmd_data);
                 update_style();
                 gnome_cmd_data.save();
                 return TRUE;
diff --git a/src/gnome-cmd-style.cc b/src/gnome-cmd-style.cc
index c965cf1..9f744d5 100644
--- a/src/gnome-cmd-style.cc
+++ b/src/gnome-cmd-style.cc
@@ -161,7 +161,7 @@ inline GtkStyle *create_alt_sel_list_style (GnomeCmdColorTheme *cols, const gcha
 }
 
 
-void gnome_cmd_style_create ()
+void gnome_cmd_style_create (GnomeCmdData &cfg)
 {
     if (list_style) g_object_unref (list_style);
     if (alt_list_style) g_object_unref (alt_list_style);
diff --git a/src/gnome-cmd-style.h b/src/gnome-cmd-style.h
index d2fce55..e846208 100644
--- a/src/gnome-cmd-style.h
+++ b/src/gnome-cmd-style.h
@@ -21,9 +21,11 @@
 #ifndef __GNOME_CMD_STYLE_H__
 #define __GNOME_CMD_STYLE_H__
 
+#include "gnome-cmd-data.h"
+
 extern GtkStyle *list_style, *sel_list_style;
 extern GtkStyle *alt_list_style, *alt_sel_list_style;
 
-void gnome_cmd_style_create ();
+void gnome_cmd_style_create (GnomeCmdData &cfg);
 
 #endif // __GNOME_CMD_STYLE_H__
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 784ddaf..2371499 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1792,7 +1792,7 @@ void options_edit (GtkMenuItem *menuitem, gpointer not_used)
 {
     if (gnome_cmd_options_dialog (*main_win, gnome_cmd_data))
     {
-        gnome_cmd_style_create ();
+        gnome_cmd_style_create (gnome_cmd_data);
         main_win->update_style();
 
         gnome_cmd_data.save();
diff --git a/src/main.cc b/src/main.cc
index 23dc538..868221f 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -157,7 +157,7 @@ int main (int argc, char *argv[])
 
         gnome_authentication_manager_init ();
 
-        gnome_cmd_style_create ();
+        gnome_cmd_style_create (gnome_cmd_data);
 
         main_win = new GnomeCmdMainWin;
         main_win_widget = *main_win;



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