[gnome-music/freeze-break: 99/107] widgets: Use libgd for Add to Playlist Dialog header bar



commit 689c9dea9ed1e5d71cc35a4dbc43862d9c07f293
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Mon Sep 9 22:19:58 2013 +0800

    widgets: Use libgd for Add to Playlist Dialog header bar

 configure.ac                                     |    1 +
 data/{PlaylistDialog.ui => PlaylistDialog.ui.in} |    2 +-
 gnomemusic/widgets.py                            |    7 ++++++-
 po/POTFILES.in                                   |    2 +-
 po/POTFILES.skip                                 |    1 +
 5 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bc1d026..35872e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,7 @@ AC_CONFIG_FILES([
   data/Makefile
   data/headerbar.ui
   data/AboutDialog.ui
+  data/PlaylistDialog.ui
   data/gnome-music.appdata.xml
   gnomemusic/Makefile
   po/Makefile.in
diff --git a/data/PlaylistDialog.ui b/data/PlaylistDialog.ui.in
similarity index 98%
rename from data/PlaylistDialog.ui
rename to data/PlaylistDialog.ui.in
index 5a547e5..d224c6d 100644
--- a/data/PlaylistDialog.ui
+++ b/data/PlaylistDialog.ui.in
@@ -52,7 +52,7 @@
       </object>
     </child>
   </object>
-  <object class="GtkHeaderBar" id="headerbar1">
+  <object class="@GTK_OR_GD HeaderBar" id="headerbar1">
     <property name="title" translatable="yes">Select Playlist</property>
     <property name="visible">True</property>
     <child>
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 0dafb7b..4fb13f0 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -620,7 +620,12 @@ class PlaylistDialog():
         self.populate(playlist_names)
 
         self.title_bar = self.ui.get_object('headerbar1')
-        self.dialog_box.set_titlebar(self.title_bar)
+        if Gtk.get_minor_version() > 8:
+            self.dialog_box.set_titlebar(self.title_bar)
+        else:
+            self.dialog_box.get_content_area().add(self.title_bar)
+            self.dialog_box.get_content_area().reorder_child(self.title_bar, 0)
+
         self._cancel_button = self.ui.get_object('cancel-button')
         self._select_button = self.ui.get_object('select-button')
         self._cancel_button.connect('clicked', self._on_cancel_button_clicked)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fe27f24..f80fa13 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -25,4 +25,4 @@ gnomemusic/window.py
 [type: gettext/glade]data/headerbar.ui.in
 [type: gettext/glade]data/SelectionToolbar.ui
 [type: gettext/glade]data/PlaylistControls.ui
-[type: gettext/glade]data/PlaylistDialog.ui
+[type: gettext/glade]data/PlaylistDialog.ui.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 0c10c9d..c4ce26f 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,3 +1,4 @@
 data/headerbar.ui
 data/AboutDialog.ui
+data/PlaylistDialog.ui
 data/gnome-music.appdata.xml


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