diff options
-rw-r--r-- | src/totem-object.c | 3 | ||||
-rw-r--r-- | src/totem-preferences.c | 16 | ||||
-rw-r--r-- | src/totem-preferences.h | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/totem-object.c b/src/totem-object.c index 73887f4a4..626ba821a 100644 --- a/src/totem-object.c +++ b/src/totem-object.c @@ -217,7 +217,8 @@ totem_object_app_activate (GApplication *app) gtk_widget_grab_focus (GTK_WIDGET (totem->bvw)); /* The prefs after the video widget is connected */ - totem_setup_preferences (totem); + totem->prefs = totem_preferences_dialog_new (totem); + gtk_window_set_transient_for (GTK_WINDOW (totem->prefs), GTK_WINDOW(totem->win)); /* Initialise all the plugins, and set the default page, in case * it comes from a plugin */ diff --git a/src/totem-preferences.c b/src/totem-preferences.c index 23438f395..e8579e45d 100644 --- a/src/totem-preferences.c +++ b/src/totem-preferences.c @@ -413,15 +413,11 @@ totem_preferences_dialog_init (TotemPreferencesDialog *self) gtk_widget_init_template (GTK_WIDGET (self)); } -void -totem_setup_preferences (Totem *totem) +GtkWidget * +totem_preferences_dialog_new (Totem *totem) { - g_return_if_fail (totem->settings != NULL); - - totem->prefs = g_object_new (TOTEM_TYPE_PREFERENCES_DIALOG, - "totem", totem, - "use-header-bar", 1, - NULL); - - gtk_window_set_transient_for (GTK_WINDOW (totem->prefs), GTK_WINDOW(totem->win)); + return g_object_new (TOTEM_TYPE_PREFERENCES_DIALOG, + "totem", totem, + "use-header-bar", 1, + NULL); } diff --git a/src/totem-preferences.h b/src/totem-preferences.h index ed9271740..af30e9cd8 100644 --- a/src/totem-preferences.h +++ b/src/totem-preferences.h @@ -36,7 +36,7 @@ G_BEGIN_DECLS #define TOTEM_TYPE_PREFERENCES_DIALOG (totem_preferences_dialog_get_type()) G_DECLARE_FINAL_TYPE (TotemPreferencesDialog, totem_preferences_dialog, TOTEM, PREFERENCES_DIALOG, GtkDialog) -void totem_setup_preferences (Totem *totem); +GtkWidget *totem_preferences_dialog_new (Totem *totem); G_END_DECLS |