[gnome-commander] GnomeCmdMainWin: more C++ rework



commit 18098549c053929a022650374d22829ade09681d
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Aug 2 20:50:24 2010 +0200

    GnomeCmdMainWin: more C++ rework

 src/gnome-cmd-main-win.cc |   12 +++++-------
 src/gnome-cmd-main-win.h  |    1 +
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 0266b00..b542c23 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -571,10 +571,8 @@ inline void update_browse_buttons (GnomeCmdMainWin *mw, GnomeCmdFileSelector *fs
 }
 
 
-static void update_drop_con_button (GnomeCmdMainWin *mw, GnomeCmdFileList *fl)
+void GnomeCmdMainWin::update_drop_con_button(GnomeCmdFileList *fl)
 {
-    g_return_if_fail (GNOME_CMD_IS_MAIN_WIN (mw));
-
     if (!fl)
         return;
 
@@ -589,7 +587,7 @@ static void update_drop_con_button (GnomeCmdMainWin *mw, GnomeCmdFileList *fl)
         || (gnome_cmd_data.skip_mounting && GNOME_CMD_IS_CON_DEVICE (con)))
         return;
 
-    GtkWidget *btn = mw->priv->tb_con_drop_btn;
+    GtkWidget *btn = priv->tb_con_drop_btn;
     g_return_if_fail (GTK_IS_BUTTON (btn));
 
     if (prev_pixmap)
@@ -638,7 +636,7 @@ static void update_drop_con_button (GnomeCmdMainWin *mw, GnomeCmdFileList *fl)
 static void on_fs_dir_change (GnomeCmdFileSelector *fs, const gchar dir, GnomeCmdMainWin *mw)
 {
     update_browse_buttons (mw, fs);
-    update_drop_con_button (mw, fs->file_list());
+    mw->update_drop_con_button(fs->file_list());
 }
 
 
@@ -1157,7 +1155,7 @@ static void gnome_cmd_main_win_real_switch_fs (GnomeCmdMainWin *mw, GnomeCmdFile
     mw->fs(INACTIVE)->set_active(FALSE);
 
     update_browse_buttons (mw, fs);
-    update_drop_con_button (mw, fs->file_list());
+    mw->update_drop_con_button(fs->file_list());
 }
 
 
@@ -1217,7 +1215,7 @@ void GnomeCmdMainWin::update_toolbar_visibility()
         priv->toolbar_sep = NULL;
     }
 
-    update_drop_con_button (this, fs(ACTIVE)->file_list());
+    update_drop_con_button(fs(ACTIVE)->file_list());
 }
 
 
diff --git a/src/gnome-cmd-main-win.h b/src/gnome-cmd-main-win.h
index 13e6004..d330a40 100644
--- a/src/gnome-cmd-main-win.h
+++ b/src/gnome-cmd-main-win.h
@@ -43,6 +43,7 @@ struct GnomeCmdMainWin
   public:       //  FIXME:  change to private
 
     void create_buttonbar();
+    void update_drop_con_button(GnomeCmdFileList *fl);
 
   public:
 



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