[totem] main: Use a header bar in the preferences
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Use a header bar in the preferences
- Date: Wed, 22 Jan 2014 18:13:52 +0000 (UTC)
commit 7fc7ab4d81808b3a5f6adf95f3f32127d86f8e18
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 22 19:09:04 2014 +0100
main: Use a header bar in the preferences
data/preferences.ui | 30 ++----------------------------
src/totem-preferences.c | 21 ++-------------------
2 files changed, 4 insertions(+), 47 deletions(-)
---
diff --git a/data/preferences.ui b/data/preferences.ui
index ecb6b2b..80310d8 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -116,6 +116,7 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
+ <property name="use-header-bar">1</property>
<child internal-child="vbox">
<object class="GtkVBox" id="tpw_dialog_vbox">
@@ -124,32 +125,6 @@
<property name="spacing">2</property>
<property name="orientation">vertical</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="tpw_dialog_action_area">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <object class="GtkButton" id="tpw_close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
<child>
<object class="GtkNotebook" id="tpw_notebook">
<property name="border_width">5</property>
@@ -1394,6 +1369,5 @@
</child>
</object>
</child>
-<action-widgets><action-widget response="-7">tpw_close_button</action-widget></action-widgets></object>
-
+ </object>
</interface>
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index d6d45b8..a608fd8 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -320,12 +320,11 @@ plugin_button_clicked_cb (GtkButton *button,
void
totem_setup_preferences (Totem *totem)
{
- GtkWidget *menu, *content_area, *bvw;
+ GtkWidget *menu, *bvw;
gboolean show_visuals, lock_screensaver_on_audio;
guint i, hidden;
char *visual, *font, *encoding;
GList *list, *l;
- GtkWidget *widget;
GObject *item;
static struct {
@@ -345,23 +344,7 @@ totem_setup_preferences (Totem *totem)
bvw = totem_object_get_video_widget (totem);
- /* Work-around builder dialogue not parenting properly for
- * On top windows */
- widget = PWID ("tpw_notebook");
- totem->prefs = gtk_dialog_new_with_buttons (_("Preferences"),
- GTK_WINDOW (totem->win),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- _("_Close"),
- GTK_RESPONSE_ACCEPT,
- NULL);
- gtk_container_set_border_width (GTK_CONTAINER (totem->prefs), 5);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (totem->prefs));
- gtk_box_set_spacing (GTK_BOX (content_area), 2);
- gtk_widget_reparent (widget, content_area);
- gtk_widget_show_all (content_area);
- widget = PWID ("totem_preferences_window");
- gtk_widget_destroy (widget);
-
+ totem->prefs = PWID ("totem_preferences_window");
g_signal_connect (G_OBJECT (totem->prefs), "response",
G_CALLBACK (gtk_widget_hide), NULL);
g_signal_connect (G_OBJECT (totem->prefs), "delete-event",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]