[gnome-commander/gcmd-1-3] GnomeCmdMainWin: added operator for conversion to GObject *



commit 6b5040a787d84f70661eef3521bd2c7084808c50
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Wed Sep 30 17:20:10 2009 +0200

    GnomeCmdMainWin: added operator for conversion to GObject *

 src/gnome-cmd-main-win.cc |    4 ++--
 src/gnome-cmd-main-win.h  |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 2cce71f..c743313 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -928,7 +928,7 @@ static void init (GnomeCmdMainWin *mw)
 
     gnome_app_construct (GNOME_APP (mw), "gnome-commander", gcmd_owner.is_root() ? _("GNOME Commander - ROOT PRIVILEGES") :
                                                                                    _("GNOME Commander"));
-    g_object_set_data (G_OBJECT (mw), "main_win", mw);
+    g_object_set_data (*mw, "main_win", mw);
     restore_size_and_pos (mw);
     gtk_window_set_policy (GTK_WINDOW (mw), TRUE, TRUE, FALSE);
 
@@ -1448,7 +1448,7 @@ void GnomeCmdMainWin::update_list_orientation()
     priv->paned = gnome_cmd_data.list_orientation ? gtk_vpaned_new () : gtk_hpaned_new ();
 
     gtk_widget_ref (priv->paned);
-    g_object_set_data_full (G_OBJECT (this), "paned", priv->paned, (GDestroyNotify) gtk_widget_unref);
+    g_object_set_data_full (*this, "paned", priv->paned, (GDestroyNotify) gtk_widget_unref);
     gtk_widget_show (priv->paned);
 
     gtk_paned_pack1 (GTK_PANED (priv->paned), priv->file_selector[LEFT], TRUE, TRUE);
diff --git a/src/gnome-cmd-main-win.h b/src/gnome-cmd-main-win.h
index f66a2b4..3135f03 100644
--- a/src/gnome-cmd-main-win.h
+++ b/src/gnome-cmd-main-win.h
@@ -50,6 +50,7 @@ struct GnomeCmdMainWin
 
     Private *priv;
 
+    operator GObject * ()               {  return G_OBJECT (this);         }
     operator GtkObject * ()             {  return GTK_OBJECT (this);       }
     operator GtkWidget * ()             {  return GTK_WIDGET (this);       }
 



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