[nautilus-actions] NactMainWindow: call parent_class::constructed() method at the beginning of the function
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NactMainWindow: call parent_class::constructed() method at the beginning of the function
- Date: Wed, 11 Jan 2012 22:09:29 +0000 (UTC)
commit 5d85891b49c5afc54e10e1711964f1d7a1eff423
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 8 12:30:54 2012 +0100
NactMainWindow: call parent_class::constructed() method at the beginning of the function
ChangeLog | 1 +
src/nact/nact-main-window.c | 62 +++++++++++++++++++++++++++----------------
2 files changed, 40 insertions(+), 23 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5547543..66f2b04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
Rather call parent_class::instance_constructed() method before executing
the derived class one.
+ * src/nact/nact-main-window.c (instance_constructed):
* src/nact/nact-tree-view.c (instance_constructed):
* src/plugin-menu/nautilus-actions.c (instance_constructed):
Call parent class on the beginning of the function.
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index e8763b2..1885190 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -638,47 +638,63 @@ static void
instance_constructed( GObject *window )
{
static const gchar *thisfn = "nact_main_window_instance_constructed";
- NactMainWindow *self;
+ NactMainWindowPrivate *priv;
NactApplication *application;
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
- self = NACT_MAIN_WINDOW( window );
+ priv = NACT_MAIN_WINDOW( window )->private;
+
+ if( !priv->dispose_has_run ){
+
+ /* chain up to the parent class */
+ if( G_OBJECT_CLASS( st_parent_class )->constructed ){
+ G_OBJECT_CLASS( st_parent_class )->constructed( window );
+ }
- if( !self->private->dispose_has_run ){
g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
/* first connect to BaseWindow signals
* so that convenience objects instanciated later will have this same signal
* triggered after the one of NactMainWindow
*/
- base_window_signal_connect( BASE_WINDOW( window ),
- G_OBJECT( window ), BASE_SIGNAL_INITIALIZE_GTK, G_CALLBACK( on_base_initialize_gtk_toplevel ));
-
- base_window_signal_connect( BASE_WINDOW( window ),
- G_OBJECT( window ), BASE_SIGNAL_INITIALIZE_WINDOW, G_CALLBACK( on_base_initialize_base_window ));
-
- base_window_signal_connect( BASE_WINDOW( window ),
- G_OBJECT( window ), BASE_SIGNAL_ALL_WIDGETS_SHOWED, G_CALLBACK( on_base_all_widgets_showed ));
+ base_window_signal_connect(
+ BASE_WINDOW( window ),
+ G_OBJECT( window ),
+ BASE_SIGNAL_INITIALIZE_GTK,
+ G_CALLBACK( on_base_initialize_gtk_toplevel ));
+
+ base_window_signal_connect(
+ BASE_WINDOW( window ),
+ G_OBJECT( window ),
+ BASE_SIGNAL_INITIALIZE_WINDOW,
+ G_CALLBACK( on_base_initialize_base_window ));
+
+ base_window_signal_connect(
+ BASE_WINDOW( window ),
+ G_OBJECT( window ),
+ BASE_SIGNAL_ALL_WIDGETS_SHOWED,
+ G_CALLBACK( on_base_all_widgets_showed ));
application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
- self->private->updater = nact_application_get_updater( application );
+ priv->updater = nact_application_get_updater( application );
- self->private->pivot_handler_id = base_window_signal_connect( BASE_WINDOW( window ),
- G_OBJECT( self->private->updater ), PIVOT_SIGNAL_ITEMS_CHANGED, G_CALLBACK( on_pivot_items_changed ));
+ priv->pivot_handler_id = base_window_signal_connect(
+ BASE_WINDOW( window ),
+ G_OBJECT( priv->updater ),
+ PIVOT_SIGNAL_ITEMS_CHANGED,
+ G_CALLBACK( on_pivot_items_changed ));
- base_window_signal_connect( BASE_WINDOW( window ),
- G_OBJECT( window ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, G_CALLBACK( on_tab_updatable_item_updated ));
+ base_window_signal_connect(
+ BASE_WINDOW( window ),
+ G_OBJECT( window ),
+ TAB_UPDATABLE_SIGNAL_ITEM_UPDATED,
+ G_CALLBACK( on_tab_updatable_item_updated ));
/* create the menubar and other convenience objects
*/
- self->private->menubar = nact_menubar_new( BASE_WINDOW( window ));
- self->private->clipboard = nact_clipboard_new( BASE_WINDOW( window ));
-
- /* chain up to the parent class */
- if( G_OBJECT_CLASS( st_parent_class )->constructed ){
- G_OBJECT_CLASS( st_parent_class )->constructed( window );
- }
+ priv->menubar = nact_menubar_new( BASE_WINDOW( window ));
+ priv->clipboard = nact_clipboard_new( BASE_WINDOW( window ));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]