[nautilus-actions] Make the Preferences dialog transient for the main window
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Make the Preferences dialog transient for the main window
- Date: Thu, 15 Oct 2009 20:50:16 +0000 (UTC)
commit 28ec3ab55d3245805b13f37320538c364fb3647e
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Oct 15 19:49:43 2009 +0200
Make the Preferences dialog transient for the main window
src/nact/nact-preferences-editor.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index f427d84..55ce406 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -50,7 +50,6 @@ struct NactPreferencesEditorClassPrivate {
*/
struct NactPreferencesEditorPrivate {
gboolean dispose_has_run;
- BaseWindow *parent;
};
static GObjectClass *st_parent_class = NULL;
@@ -61,7 +60,7 @@ static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *dialog );
static void instance_finalize( GObject *dialog );
-static NactPreferencesEditor *preferences_editor_new( NactApplication *application );
+static NactPreferencesEditor *preferences_editor_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( BaseWindow *window );
static gchar *base_get_dialog_name( BaseWindow *window );
@@ -213,9 +212,9 @@ instance_finalize( GObject *dialog )
* toplevel window of the application).
*/
static NactPreferencesEditor *
-preferences_editor_new( NactApplication *application )
+preferences_editor_new( BaseWindow *parent )
{
- return( g_object_new( NACT_PREFERENCES_EDITOR_TYPE, BASE_WINDOW_PROP_APPLICATION, application, NULL ));
+ return( g_object_new( NACT_PREFERENCES_EDITOR_TYPE, BASE_WINDOW_PROP_PARENT, parent, NULL ));
}
/**
@@ -229,17 +228,12 @@ void
nact_preferences_editor_run( BaseWindow *parent )
{
static const gchar *thisfn = "nact_preferences_editor_run";
- NactApplication *application;
NactPreferencesEditor *editor;
g_debug( "%s: parent=%p", thisfn, ( void * ) parent );
g_return_if_fail( BASE_IS_WINDOW( parent ));
- application = NACT_APPLICATION( base_window_get_application( parent ));
- g_assert( NACT_IS_APPLICATION( application ));
-
- editor = preferences_editor_new( application );
- editor->private->parent = parent;
+ editor = preferences_editor_new( parent );
base_window_run( BASE_WINDOW( editor ));
}
@@ -260,10 +254,9 @@ static void
on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data )
{
static const gchar *thisfn = "nact_preferences_editor_on_initial_load_dialog";
- /*GtkWindow *toplevel;
- GtkWindow *parent_toplevel;*/
g_debug( "%s: editor=%p, user_data=%p", thisfn, ( void * ) editor, ( void * ) user_data );
+ g_return_if_fail( NACT_IS_PREFERENCES_EDITOR( editor ));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]