[nautilus-actions] Remove BaseApplication::initialize_application() virtual method
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove BaseApplication::initialize_application() virtual method
- Date: Fri, 21 Jan 2011 18:48:44 +0000 (UTC)
commit d394ccba4c39b784337025d107736e18f63d90ea
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jan 21 03:35:03 2011 +0100
Remove BaseApplication::initialize_application() virtual method
ChangeLog | 6 ++++--
src/nact/base-application.c | 2 +-
src/nact/base-application.h | 24 ------------------------
src/nact/nact-application.c | 38 --------------------------------------
4 files changed, 5 insertions(+), 65 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fe4f825..1502a68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,10 +12,12 @@
(initialize_i18n, initialize_application_name, get_application_name,
initialize_default_icon, get_icon_name, initialize_gtk,
initialize_session_manager, get_unique_app_name, initialize_ui,
- initialize_unique_app, initialize, run, get_main_window): Remove virtual methods.
+ initialize_unique_app, initialize, run, get_main_window,
+ initialize_application): Remove virtual methods.
* src/nact/nact-application.c (appli_get_application_name,
- appli_get_icon_name, appli_get_unique_app_name): Removed functions.
+ appli_get_icon_name, appli_get_unique_app_name,
+ appli_initialize_application): Removed functions.
* src/nact/nact-application.c (nact_application_new_with_args):
Make NactApplication initializes with these new properties.
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 67df737..7def636 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -66,9 +66,9 @@ struct _BaseApplicationPrivate {
EggSMClient *sm_client;
BaseBuilder *builder;
BaseWindow *main_window;
+ UniqueApp *unique_app_handle;
gboolean is_gtk_initialized;
- UniqueApp *unique_app_handle;
int exit_code;
gchar *exit_message1;
gchar *exit_message2;
diff --git a/src/nact/base-application.h b/src/nact/base-application.h
index 3e8b369..4f1aa1e 100644
--- a/src/nact/base-application.h
+++ b/src/nact/base-application.h
@@ -138,30 +138,6 @@ typedef struct {
GObject * ( *main_window_new )( const BaseApplication *appli, int *code );
/**
- * initialize_application:
- * @appli: this #BaseApplication instance.
- *
- * Initializes the derived-class application.
- *
- * When this function successfully returns, the #BaseApplication
- * instance must have a valid pointer to the #BaseWindow-derived
- * object which will be used as a main window for the application.
- *
- * Returns: %TRUE if at least all mandatory informations have been
- * collected, %FALSE else.
- *
- * The base class implementation asks the derived class to
- * allocates and provides the BaseWindow-derived object which will
- * be the main window of the application
- * (cf. get_main_window()). This step is mandatory.
- *
- * If failed, this function sets #exit_code to the value which is
- * pertinent depending of the missing information, and prepares a
- * short #exit_message to be displayed in a dialog box.
- */
- gboolean ( *initialize_application ) ( BaseApplication *appli );
-
- /**
* get_ui_filename:
* @appli: this #BaseApplication instance.
*
diff --git a/src/nact/nact-application.c b/src/nact/nact-application.c
index 1592b4e..1b82e61 100644
--- a/src/nact/nact-application.c
+++ b/src/nact/nact-application.c
@@ -91,7 +91,6 @@ static void instance_finalize( GObject *application );
static gboolean appli_manage_options( const BaseApplication *application, int *code );
static GObject *appli_main_window_new( const BaseApplication *application, int *code );
-static gboolean appli_initialize_application( BaseApplication *application );
static gchar *appli_get_gtkbuilder_filename( BaseApplication *application );
GType
@@ -162,7 +161,6 @@ class_init( NactApplicationClass *klass )
appli_class->manage_options = appli_manage_options;
appli_class->main_window_new = appli_main_window_new;
- appli_class->initialize_application = appli_initialize_application;
appli_class->get_ui_filename = appli_get_gtkbuilder_filename;
}
@@ -388,42 +386,6 @@ nact_application_get_updater( NactApplication *application )
return( updater );
}
-/*
- * Overrided to complete the initialization of the application:
- * - allocate the #NApivot here, so that it will be available when the
- * #NactMainWindow will require it
- * - do not register #NactApplication as a NAIPivotConsumer as this is
- * essentially the NactMainwindow which will receive and deal with
- * NAPivot notification messages
- *
- * At last, let the base class do its work, i.e. creating the main window.
- *
- * When the pivot will be empty, NAIDuplicable signals must yet be
- * recorded in the system. Done here because :
- * - I don't want do this in NAPivot which is also used by the plugin,
- * - this is the last place where I'm pretty sure NAObject has not yet
- * been registered.
- * So we allocate a new NAObject-derived object to be sure the interface
- * is correctly initialized.
- */
-static gboolean
-appli_initialize_application( BaseApplication *application )
-{
- static const gchar *thisfn = "nact_application_appli_initialize_application";
- gboolean ok;
-
- g_debug( "%s: application=%p", thisfn, ( void * ) application );
-
- NACT_APPLICATION( application )->private->updater = na_updater_new();
- na_pivot_set_loadable( NA_PIVOT( NACT_APPLICATION( application )->private->updater ), PIVOT_LOAD_ALL );
- na_pivot_load_items( NA_PIVOT( NACT_APPLICATION( application )->private->updater ));
-
- /* call parent class */
- ok = BASE_APPLICATION_CLASS( st_parent_class )->initialize_application( application );
-
- return( ok );
-}
-
static gchar *
appli_get_gtkbuilder_filename( BaseApplication *application )
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]