[nautilus-actions] Remove BaseApplication::get_ui_filename() virtual method



commit 49d3065d7f60cdf3ea47a488ba25dd59133b6b0f
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Jan 21 14:05:25 2011 +0100

    Remove BaseApplication::get_ui_filename() virtual method
    
    Also remove base_application_get_ui_filename() function
    + src/nact/nact-application.c: updated accordingly.

 ChangeLog                   |    8 ++++++++
 src/nact/base-application.c |   32 --------------------------------
 src/nact/base-application.h |   25 +++++--------------------
 src/nact/nact-application.c |   10 ----------
 4 files changed, 13 insertions(+), 62 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3a3696d..d800415 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-01-21 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/base-application.c:
+	* src/nact/base-application.h
+	(base_application_get_ui_filename): Removed function.
+	(get_ui_filename): Removed virtual method.
+
+	* src/nact/nact-application.c
+	(appli_get_gtkbuilder_filename):Removed function.
+
 	* src/nact/base-window.c (base_window_init): Rewrite BaseWindow initialization.
 
 	* src/nact/nact-main-window.c (nact_main_window_new):
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 7762cae..08baa82 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -741,38 +741,6 @@ base_application_get_builder( const BaseApplication *application )
 }
 
 /**
- * base_application_get_ui_filename:
- * @application: this #BaseApplication instance.
- *
- * Asks the #BaseApplication-derived class for the filename of the file
- * which contains the XML definition of the user interface.
- *
- * Defaults to empty.
- *
- * Returns: a newly allocated string to be g_free() by the caller.
- */
-gchar *
-base_application_get_ui_filename( BaseApplication *application )
-{
-	/*static const gchar *thisfn = "base_application_get_ui_filename";
-	g_debug( "%s: icon=%p", thisfn, application );*/
-	gchar *name = NULL;
-
-	g_return_val_if_fail( BASE_IS_APPLICATION( application ), NULL );
-
-	if( !application->private->dispose_has_run ){
-		if( BASE_APPLICATION_GET_CLASS( application )->get_ui_filename ){
-			name = BASE_APPLICATION_GET_CLASS( application )->get_ui_filename( application );
-
-		} else {
-			name = g_strdup( "" );
-		}
-	}
-
-	return( name );
-}
-
-/**
  * base_application_message_dlg:
  * @application: this #BaseApplication instance.
  * @message: the message to be displayed.
diff --git a/src/nact/base-application.h b/src/nact/base-application.h
index 082c29d..2863fa9 100644
--- a/src/nact/base-application.h
+++ b/src/nact/base-application.h
@@ -135,23 +135,6 @@ typedef struct {
 	 * -derived object. It may or may not have already been initialized.
 	 */
 	GObject * ( *main_window_new )( const BaseApplication *appli, int *code );
-
-	/**
-	 * get_ui_filename:
-	 * @appli: this #BaseApplication instance.
-	 *
-	 * Asks the derived class for the filename of the XML definition of
-	 * the user interface. This XML definition must be suitable in order
-	 * to be loaded via GtkBuilder.
-	 *
-	 * No default is provided by the base class. If the base class does
-	 * not provide one, then the program stops and exits with the code
-	 * %APPLICATION_ERROR_UI_FNAME.
-	 *
-	 * Returns: the filename of the XML definition, to be g_free() by
-	 * the caller.
-	 */
-	gchar *   ( *get_ui_filename )                 ( BaseApplication *appli );
 }
 	BaseApplicationClass;
 
@@ -181,7 +164,11 @@ typedef enum {
 	BASE_EXIT_CODE_ARGS,
 	BASE_EXIT_CODE_UNIQUE_APP,
 	BASE_EXIT_CODE_MAIN_WINDOW,
-	BASE_EXIT_CODE_USER_APP
+	/*
+	 * BaseApplication -derived class may use program return codes
+	 * starting with this value
+	 */
+	BASE_EXIT_CODE_USER_APP = 32
 }
 	BaseExitCode;
 
@@ -192,8 +179,6 @@ int          base_application_run( BaseApplication *application );
 gchar       *base_application_get_application_name( const BaseApplication *application );
 BaseBuilder *base_application_get_builder         ( const BaseApplication *application );
 
-gchar       *base_application_get_ui_filename( BaseApplication *application );
-
 void         base_application_message_dlg( BaseApplication *application, GSList *message );
 void         base_application_error_dlg( BaseApplication *application, GtkMessageType type, const gchar *first, const gchar *second );
 gboolean     base_application_yesno_dlg( BaseApplication *application, GtkMessageType type, const gchar *first, const gchar *second );
diff --git a/src/nact/nact-application.c b/src/nact/nact-application.c
index 442f317..d7c4d54 100644
--- a/src/nact/nact-application.c
+++ b/src/nact/nact-application.c
@@ -92,8 +92,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 gchar   *appli_get_gtkbuilder_filename( BaseApplication *application );
-
 GType
 nact_application_get_type( void )
 {
@@ -161,8 +159,6 @@ class_init( NactApplicationClass *klass )
 	appli_class = BASE_APPLICATION_CLASS( klass );
 	appli_class->manage_options = appli_manage_options;
 	appli_class->main_window_new = appli_main_window_new;
-
-	appli_class->get_ui_filename = appli_get_gtkbuilder_filename;
 }
 
 static void
@@ -387,9 +383,3 @@ nact_application_get_updater( NactApplication *application )
 
 	return( updater );
 }
-
-static gchar *
-appli_get_gtkbuilder_filename( BaseApplication *application )
-{
-	return( g_strdup( PKGDATADIR "/nautilus-actions-config-tool.ui" ));
-}



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