[nautilus-actions] Remove BaseWindow::get_toplevel_name() virtual method
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove BaseWindow::get_toplevel_name() virtual method
- Date: Mon, 24 Jan 2011 19:41:16 +0000 (UTC)
commit e1656b4c02be276ad92f425bb1a20399054b7464
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 23 00:05:52 2011 +0100
Remove BaseWindow::get_toplevel_name() virtual method
+ src/nact/nact-add-capability-dialog.c:
+ src/nact/nact-add-scheme-dialog.c:
+ src/nact/nact-assistant-export.c:
+ src/nact/nact-assistant-import.c:
+ src/nact/nact-confirm-logout.c:
+ src/nact/nact-export-ask.c:
+ src/nact/nact-icon-chooser.c:
+ src/nact/nact-main-window.c:
+ src/nact/nact-preferences-editor.c: Updated accordingly.
ChangeLog | 6 ++++-
src/nact/base-window.c | 37 +++-----------------------------
src/nact/base-window.h | 9 --------
src/nact/nact-add-capability-dialog.c | 10 +-------
src/nact/nact-add-scheme-dialog.c | 10 +-------
src/nact/nact-assistant-export.c | 10 +-------
src/nact/nact-assistant-import.c | 22 +++++++++---------
src/nact/nact-confirm-logout.c | 17 ++++++---------
src/nact/nact-export-ask.c | 10 +-------
src/nact/nact-icon-chooser.c | 10 +-------
src/nact/nact-main-window.c | 12 +---------
src/nact/nact-preferences-editor.c | 10 +-------
12 files changed, 41 insertions(+), 122 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e93b253..737e57c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,17 @@
2011-01-22 Pierre Wieser <pwieser trychlos org>
* src/nact/base-window.c:
- * src/nact/base-window.h (get_ui_filename): Removed virtual function.
+ * src/nact/base-window.h
+ (get_toplevel_name, get_ui_filename): Removed virtual functions.
* src/nact/nact-add-capability-dialog.c:
* src/nact/nact-add-scheme-dialog.c:
* src/nact/nact-assistant-export.c:
+ * src/nact/nact-assistant-import.c:
+ * src/nact/nact-confirm-logout.c:
* src/nact/nact-export-ask.c:
* src/nact/nact-icon-chooser.c:
+ * src/nact/nact-main-window.c:
* src/nact/nact-preferences-editor.c: Updated accordingly.
* src/nact/base-window.c:
diff --git a/src/nact/base-window.c b/src/nact/base-window.c
index 09f14ea..d95ac1e 100644
--- a/src/nact/base-window.c
+++ b/src/nact/base-window.c
@@ -135,7 +135,6 @@ static gboolean is_main_window( BaseWindow *window );
static gboolean on_delete_event( GtkWidget *widget, GdkEvent *event, BaseWindow *window );
static gboolean v_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window );
-static gchar *v_get_toplevel_name( const BaseWindow *window );
static gchar *v_get_iprefs_window_id( const BaseWindow *window );
static gboolean window_do_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window );
@@ -250,7 +249,6 @@ class_init( BaseWindowClass *klass )
klass->all_widgets_showed = NULL;
klass->dialog_response = window_do_dialog_response;
klass->delete_event = window_do_delete_event;
- klass->get_toplevel_name = NULL;
klass->get_iprefs_window_id = NULL;
klass->is_willing_to_quit = NULL;
@@ -639,30 +637,24 @@ setup_builder( const BaseWindow *window )
static gboolean
load_gtk_toplevel( const BaseWindow *window )
{
- gchar *toplevel_name;
GtkWindow *gtk_toplevel;
gchar *msg;
- /* we should only test for the construction property toplevel_name
- * during the transition, also asks the derived class
- */
- toplevel_name = v_get_toplevel_name( window );
gtk_toplevel = NULL;
- if( toplevel_name ){
- if( strlen( toplevel_name )){
+ if( window->private->toplevel_name ){
+ if( strlen( window->private->toplevel_name )){
g_return_val_if_fail( BASE_IS_BUILDER( window->private->builder ), FALSE );
- gtk_toplevel = base_builder_get_toplevel_by_name( window->private->builder, toplevel_name );
+ gtk_toplevel = base_builder_get_toplevel_by_name( window->private->builder, window->private->toplevel_name );
if( !gtk_toplevel ){
- msg = g_strdup_printf( _( "Unable to load %s dialog definition." ), toplevel_name );
+ msg = g_strdup_printf( _( "Unable to load %s dialog definition." ), window->private->toplevel_name );
base_window_display_error_dlg( NULL, msg, NULL );
g_free( msg );
}
}
}
- g_free( toplevel_name );
window->private->gtk_toplevel = gtk_toplevel;
return( gtk_toplevel != NULL );
@@ -1076,27 +1068,6 @@ v_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window )
}
static gchar *
-v_get_toplevel_name( const BaseWindow *window )
-{
- gchar *name = NULL;
-
- g_return_val_if_fail( BASE_IS_WINDOW( window ), NULL );
-
- g_object_get( G_OBJECT( window ), BASE_PROP_TOPLEVEL_NAME, &name, NULL );
-
- if( !name || !strlen( name )){
- if( BASE_WINDOW_GET_CLASS( window )->get_toplevel_name ){
- name = BASE_WINDOW_GET_CLASS( window )->get_toplevel_name( window );
- if( name && strlen( name )){
- g_object_set( G_OBJECT( window ), BASE_PROP_TOPLEVEL_NAME, name, NULL );
- }
- }
- }
-
- return( name );
-}
-
-static gchar *
v_get_iprefs_window_id( const BaseWindow *window )
{
gchar *id = NULL;
diff --git a/src/nact/base-window.h b/src/nact/base-window.h
index 588da03..0feeaee 100644
--- a/src/nact/base-window.h
+++ b/src/nact/base-window.h
@@ -99,7 +99,6 @@ typedef struct _BaseWindowClassPrivate BaseWindowClassPrivate;
* @all_widgets_showed: all widgets have been showed
* @dialog_response:
* @delete_event:
- * @get_toplevel_name:
* @get_iprefs_window_id:
* @is_willing_to_quit: asks if the window is willing to quit
*
@@ -176,14 +175,6 @@ typedef struct {
gboolean ( *delete_event ) ( BaseWindow *window, GtkWindow *toplevel, GdkEvent *event );
/**
- * window_get_toplevel_name:
- * @window: this #BaseWindow instance.
- *
- * Pure virtual function.
- */
- gchar * ( *get_toplevel_name ) ( const BaseWindow *window );
-
- /**
* get_iprefs_window_id:
* @window: this #BaseWindow instance.
*
diff --git a/src/nact/nact-add-capability-dialog.c b/src/nact/nact-add-capability-dialog.c
index 91ead62..a031d69 100644
--- a/src/nact/nact-add-capability-dialog.c
+++ b/src/nact/nact-add-capability-dialog.c
@@ -81,6 +81,7 @@ static CapabilityTextStruct st_caps[] = {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-add-capability.ui";
+static const gchar *st_toplevel_name = "AddCapabilityDialog";
static GObjectClass *st_parent_class = NULL;
@@ -93,7 +94,6 @@ static void instance_finalize( GObject *dialog );
static NactAddCapabilityDialog *add_capability_dialog_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactAddCapabilityDialog *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactAddCapabilityDialog *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactAddCapabilityDialog *editor, gpointer user_data );
@@ -166,7 +166,6 @@ class_init( NactAddCapabilityDialogClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
}
@@ -267,6 +266,7 @@ add_capability_dialog_new( BaseWindow *parent )
return( g_object_new( NACT_ADD_CAPABILITY_DIALOG_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
}
@@ -310,12 +310,6 @@ base_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_CAPABILITY_ADD_CAPABILITY_WSP ));
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "AddCapabilityDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactAddCapabilityDialog *dialog, gpointer user_data )
{
diff --git a/src/nact/nact-add-scheme-dialog.c b/src/nact/nact-add-scheme-dialog.c
index 29f72ed..302edac 100644
--- a/src/nact/nact-add-scheme-dialog.c
+++ b/src/nact/nact-add-scheme-dialog.c
@@ -56,6 +56,7 @@ struct _NactAddSchemeDialogPrivate {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-add-scheme.ui";
+static const gchar *st_toplevel_name = "AddSchemeDialog";
static GObjectClass *st_parent_class = NULL;
@@ -68,7 +69,6 @@ static void instance_finalize( GObject *dialog );
static NactAddSchemeDialog *add_scheme_dialog_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactAddSchemeDialog *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactAddSchemeDialog *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactAddSchemeDialog *editor, gpointer user_data );
@@ -137,7 +137,6 @@ class_init( NactAddSchemeDialogClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
}
@@ -238,6 +237,7 @@ add_scheme_dialog_new( BaseWindow *parent )
return( g_object_new( NACT_ADD_SCHEME_DIALOG_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
}
@@ -281,12 +281,6 @@ base_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_SCHEME_ADD_SCHEME_WSP ));
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "AddSchemeDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactAddSchemeDialog *dialog, gpointer user_data )
{
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index dbeff61..55d1fef 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -95,6 +95,7 @@ typedef struct {
ExportStruct;
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-assistant-export.ui";
+static const gchar *st_toplevel_name = "ExportAssistant";
static BaseAssistantClass *st_parent_class = NULL;
@@ -108,7 +109,6 @@ static void instance_finalize( GObject *application );
static NactAssistantExport *assist_new( BaseWindow *parent );
static gchar *window_get_iprefs_window_id( const BaseWindow *window );
-static gchar *window_get_toplevel_name( const BaseWindow *dialog );
static void on_initial_load_dialog( NactAssistantExport *dialog, gpointer user_data );
static void on_runtime_init_dialog( NactAssistantExport *dialog, gpointer user_data );
@@ -208,7 +208,6 @@ class_init( NactAssistantExportClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->get_iprefs_window_id = window_get_iprefs_window_id;
- base_class->get_toplevel_name = window_get_toplevel_name;
assist_class = BASE_ASSISTANT_CLASS( klass );
assist_class->apply = assistant_apply;
@@ -308,6 +307,7 @@ assist_new( BaseWindow *parent )
return( g_object_new( NACT_ASSISTANT_EXPORT_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
}
@@ -333,12 +333,6 @@ window_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_EXPORT_ASSISTANT_WSP ));
}
-static gchar *
-window_get_toplevel_name( const BaseWindow *dialog )
-{
- return( g_strdup( "ExportAssistant" ));
-}
-
static void
on_initial_load_dialog( NactAssistantExport *dialog, gpointer user_data )
{
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index 39c98ac..65b287e 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -78,7 +78,9 @@ struct _NactAssistantImportPrivate {
GList *results;
};
-static BaseAssistantClass *st_parent_class = NULL;
+static const gchar *st_toplevel_name = "ImportAssistant";
+
+static BaseAssistantClass *st_parent_class = NULL;
static GType register_type( void );
static void class_init( NactAssistantImportClass *klass );
@@ -89,7 +91,6 @@ static void instance_finalize( GObject *application );
static NactAssistantImport *assist_new( BaseWindow *parent );
static gchar *window_get_iprefs_window_id( const BaseWindow *window );
-static gchar *window_get_dialog_name( const BaseWindow *dialog );
static void on_initial_load_dialog( NactAssistantImport *dialog, gpointer user_data );
static void on_runtime_init_dialog( NactAssistantImport *dialog, gpointer user_data );
@@ -165,7 +166,6 @@ class_init( NactAssistantImportClass *klass )
klass->private = g_new0( NactAssistantImportClassPrivate, 1 );
base_class = BASE_WINDOW_CLASS( klass );
- base_class->get_toplevel_name = window_get_dialog_name;
base_class->get_iprefs_window_id = window_get_iprefs_window_id;
assist_class = BASE_ASSISTANT_CLASS( klass );
@@ -252,7 +252,10 @@ instance_finalize( GObject *window )
static NactAssistantImport *
assist_new( BaseWindow *parent )
{
- return( g_object_new( NACT_ASSISTANT_IMPORT_TYPE, BASE_PROP_PARENT, parent, NULL ));
+ return( g_object_new( NACT_ASSISTANT_IMPORT_TYPE,
+ BASE_PROP_PARENT, parent,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
+ NULL ));
}
/**
@@ -267,7 +270,10 @@ nact_assistant_import_run( BaseWindow *main_window )
NactAssistantImport *assist;
assist = assist_new( main_window );
- g_object_set( G_OBJECT( assist ), BASE_PROP_HAS_OWN_BUILDER, TRUE, NULL );
+ g_object_set( G_OBJECT( assist ),
+ BASE_PROP_HAS_OWN_BUILDER, TRUE,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
+ NULL );
base_window_run( BASE_WINDOW( assist ));
}
@@ -278,12 +284,6 @@ window_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_IMPORT_ASSISTANT_WSP ));
}
-static gchar *
-window_get_dialog_name( const BaseWindow *dialog )
-{
- return( g_strdup( "ImportAssistant" ));
-}
-
static void
on_initial_load_dialog( NactAssistantImport *dialog, gpointer user_data )
{
diff --git a/src/nact/nact-confirm-logout.c b/src/nact/nact-confirm-logout.c
index a4f99d2..7081bcd 100644
--- a/src/nact/nact-confirm-logout.c
+++ b/src/nact/nact-confirm-logout.c
@@ -54,7 +54,9 @@ enum {
BTN_SAVE_AND_QUIT
};
-static BaseDialogClass *st_parent_class = NULL;
+static const gchar *st_toplevel_name = "ConfirmLogoutDialog";
+
+static BaseDialogClass *st_parent_class = NULL;
static GType register_type( void );
static void class_init( NactConfirmLogoutClass *klass );
@@ -64,7 +66,6 @@ static void instance_finalize( GObject *dialog );
static NactConfirmLogout *confirm_logout_new( BaseWindow *parent );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactConfirmLogout *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactConfirmLogout *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactConfirmLogout *editor, gpointer user_data );
@@ -131,7 +132,6 @@ class_init( NactConfirmLogoutClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
}
static void
@@ -216,7 +216,10 @@ instance_finalize( GObject *dialog )
static NactConfirmLogout *
confirm_logout_new( BaseWindow *parent )
{
- return( g_object_new( NACT_CONFIRM_LOGOUT_TYPE, BASE_PROP_PARENT, parent, NULL ));
+ return( g_object_new( NACT_CONFIRM_LOGOUT_TYPE,
+ BASE_PROP_PARENT, parent,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
+ NULL ));
}
/**
@@ -245,12 +248,6 @@ nact_confirm_logout_run( NactMainWindow *parent )
return( willing_to );
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "ConfirmLogoutDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactConfirmLogout *editor, gpointer user_data )
{
diff --git a/src/nact/nact-export-ask.c b/src/nact/nact-export-ask.c
index e8c0f24..6014b6a 100644
--- a/src/nact/nact-export-ask.c
+++ b/src/nact/nact-export-ask.c
@@ -64,6 +64,7 @@ struct _NactExportAskPrivate {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-assistant-export.ui";
+static const gchar *st_toplevel_name = "ExportAskDialog";
static BaseDialogClass *st_parent_class = NULL;
@@ -76,7 +77,6 @@ static void instance_finalize( GObject *dialog );
static NactExportAsk *export_ask_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactExportAsk *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactExportAsk *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactExportAsk *editor, gpointer user_data );
@@ -142,7 +142,6 @@ class_init( NactExportAskClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
}
@@ -234,6 +233,7 @@ export_ask_new( BaseWindow *parent )
return( g_object_new( NACT_EXPORT_ASK_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
}
@@ -316,12 +316,6 @@ base_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_EXPORT_ASK_USER_WSP ));
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "ExportAskDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactExportAsk *editor, gpointer user_data )
{
diff --git a/src/nact/nact-icon-chooser.c b/src/nact/nact-icon-chooser.c
index 91d9efe..99a21e4 100644
--- a/src/nact/nact-icon-chooser.c
+++ b/src/nact/nact-icon-chooser.c
@@ -90,6 +90,7 @@ enum {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-icon-chooser.ui";
+static const gchar *st_toplevel_name = "IconChooserDialog";
static BaseDialogClass *st_parent_class = NULL;
@@ -102,7 +103,6 @@ static void instance_finalize( GObject *dialog );
static NactIconChooser *icon_chooser_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactIconChooser *editor, gpointer user_data );
static void do_initialize_themed_icons( NactIconChooser *editor );
static void do_initialize_icons_by_path( NactIconChooser *editor );
@@ -182,7 +182,6 @@ class_init( NactIconChooserClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
}
@@ -289,6 +288,7 @@ icon_chooser_new( BaseWindow *parent )
return( g_object_new( NACT_ICON_CHOOSER_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
}
@@ -338,12 +338,6 @@ base_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_ICON_CHOOSER_WSP ));
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "IconChooserDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactIconChooser *editor, gpointer user_data )
{
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 391773a..cb9f689 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -136,7 +136,7 @@ enum {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nautilus-actions-config-tool.ui";
-static const gchar *st_xmlui_toplevel = "MainWindow";
+static const gchar *st_toplevel_name = "MainWindow";
static NactWindowClass *st_parent_class = NULL;
static gint st_signals[ LAST_SIGNAL ] = { 0 };
@@ -165,7 +165,6 @@ static void instance_finalize( GObject *application );
static gboolean actually_delete_item( NactMainWindow *window, NAObject *item, NAUpdater *updater, GList **not_deleted, GSList **messages );
-static gchar *base_get_toplevel_name( const BaseWindow *window );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
static gboolean base_is_willing_to_quit( const BaseWindow *window );
static void on_base_initialize_gtk_toplevel( BaseWindow *window, GtkWindow *toplevel );
@@ -396,7 +395,6 @@ class_init( NactMainWindowClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->initialize_gtk_toplevel = on_base_initialize_gtk_toplevel;
- base_class->get_toplevel_name = base_get_toplevel_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
base_class->is_willing_to_quit = base_is_willing_to_quit;
@@ -829,7 +827,7 @@ nact_main_window_new( const NactApplication *application )
window = g_object_new( NACT_MAIN_WINDOW_TYPE,
BASE_PROP_APPLICATION, application,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
- BASE_PROP_TOPLEVEL_NAME, st_xmlui_toplevel,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL );
return( window );
@@ -1096,12 +1094,6 @@ actually_delete_item( NactMainWindow *window, NAObject *item, NAUpdater *updater
}
static gchar *
-base_get_toplevel_name( const BaseWindow *window )
-{
- return( g_strdup( "MainWindow" ));
-}
-
-static gchar *
base_get_iprefs_window_id( const BaseWindow *window )
{
return( g_strdup( NA_IPREFS_MAIN_WINDOW_WSP ));
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index 2407da9..f8a19dd 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -91,6 +91,7 @@ struct _NactPreferencesEditorPrivate {
};
static const gchar *st_xmlui_filename = PKGDATADIR "/nact-preferences.ui";
+static const gchar *st_toplevel_name = "ExportAssistant";
static GObjectClass *st_parent_class = NULL;
static guint st_last_tab = 0;
@@ -104,7 +105,6 @@ static void instance_finalize( GObject *dialog );
static NactPreferencesEditor *preferences_editor_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( const BaseWindow *window );
-static gchar *base_get_dialog_name( const BaseWindow *window );
static void on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactPreferencesEditor *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactPreferencesEditor *editor, gpointer user_data );
@@ -198,7 +198,6 @@ class_init( NactPreferencesEditorClass *klass )
base_class = BASE_WINDOW_CLASS( klass );
base_class->dialog_response = base_dialog_response;
- base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
}
@@ -296,6 +295,7 @@ preferences_editor_new( BaseWindow *parent )
g_object_new( NACT_PREFERENCES_EDITOR_TYPE,
BASE_PROP_PARENT, parent,
BASE_PROP_XMLUI_FILENAME, st_xmlui_filename,
+ BASE_PROP_TOPLEVEL_NAME, st_toplevel_name,
NULL ));
application = NACT_APPLICATION( base_window_get_application( parent ));
@@ -337,12 +337,6 @@ base_get_iprefs_window_id( const BaseWindow *window )
return( g_strdup( NA_IPREFS_PREFERENCES_WSP ));
}
-static gchar *
-base_get_dialog_name( const BaseWindow *window )
-{
- return( g_strdup( "PreferencesDialog" ));
-}
-
static void
on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data )
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]