[gnome-music: 4/11] Use HeaderBar from libgd if not available in gtk+
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music: 4/11] Use HeaderBar from libgd if not available in gtk+
- Date: Wed, 7 Aug 2013 09:15:45 +0000 (UTC)
commit 5a4f82fd81a615028f4397462583f8d71c07ed0d
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Sun Jul 21 00:27:51 2013 +0800
Use HeaderBar from libgd if not available in gtk+
Also, rename data/Headerbar.ui to data/headerbar.ui.in which configure will use
as the template for data/headerbar.ui file.
Create po/POTFILES.skip and add data/headerbar.ui to it.
configure.ac | 3 +++
data/gnome-music.gresource.xml | 2 +-
data/{Headerbar.ui => headerbar.ui.in} | 2 +-
gnomemusic/toolbar.py | 2 +-
po/POTFILES.in | 2 +-
po/POTFILES.skip | 1 +
6 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 695169c..7f082f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,8 @@ PKG_PROG_PKG_CONFIG([0.22])
GLIB_GSETTINGS
GOBJECT_INTROSPECTION_REQUIRE([1.35.9])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.8])
+PKG_CHECK_EXISTS([gtk+-3.0 >= 3.9.0], [GTK_OR_GD=Gtk], [GTK_OR_GD=Gd])
+AC_SUBST(GTK_OR_GD)
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
@@ -40,6 +42,7 @@ PKG_CHECK_MODULES(GRL, grilo-0.2 >= $GRL_MIN_VERSION)
AC_CONFIG_FILES([
Makefile
data/Makefile
+ data/headerbar.ui
gnomemusic/Makefile
po/Makefile.in
libgd/Makefile
diff --git a/data/gnome-music.gresource.xml b/data/gnome-music.gresource.xml
index 3db14e2..28b6607 100644
--- a/data/gnome-music.gresource.xml
+++ b/data/gnome-music.gresource.xml
@@ -8,7 +8,7 @@
<file preprocess="xml-stripblanks">ArtistAlbumsWidget.ui</file>
<file preprocess="xml-stripblanks">PlayerToolbar.ui</file>
<file preprocess="xml-stripblanks">SelectionToolbar.ui</file>
- <file preprocess="xml-stripblanks">Headerbar.ui</file>
+ <file preprocess="xml-stripblanks">headerbar.ui</file>
<file preprocess="xml-stripblanks">TrackWidget.ui</file>
<file preprocess="xml-stripblanks">NoMusic.ui</file>
</gresource>
diff --git a/data/Headerbar.ui b/data/headerbar.ui.in
similarity index 99%
rename from data/Headerbar.ui
rename to data/headerbar.ui.in
index 948a039..d5b9d0c 100644
--- a/data/Headerbar.ui
+++ b/data/headerbar.ui.in
@@ -53,7 +53,7 @@
<class name="selection-menu"/>
</style>
</object>
- <object class="GtkHeaderBar" id="header-bar">
+ <object class="@GTK_OR_GD HeaderBar" id="header-bar">
<property name="visible">True</property>
<property name="vexpand">False</property>
<child>
diff --git a/gnomemusic/toolbar.py b/gnomemusic/toolbar.py
index ee4f802..3834e2e 100644
--- a/gnomemusic/toolbar.py
+++ b/gnomemusic/toolbar.py
@@ -25,7 +25,7 @@ class Toolbar(GObject.GObject):
GObject.GObject.__init__(self)
self._stack_switcher = StackSwitcher(margin_top=2, margin_bottom=2)
self._ui = Gtk.Builder()
- self._ui.add_from_resource('/org/gnome/Music/Headerbar.ui')
+ self._ui.add_from_resource('/org/gnome/Music/headerbar.ui')
self.header_bar = self._ui.get_object('header-bar')
self._select_button = self._ui.get_object('select-button')
self._cancel_button = self._ui.get_object('done-button')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5b51b2b..89890bd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -20,6 +20,6 @@ gnomemusic/window.py
[type: gettext/glade]data/PlayerToolbar.ui
[type: gettext/glade]data/TrackWidget.ui
[type: gettext/glade]data/NoMusic.ui
-[type: gettext/glade]data/Headerbar.ui
+[type: gettext/glade]data/headerbar.ui.in
[type: gettext/glade]data/SelectionToolbar.ui
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..8cfadaf
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+data/headerbar.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]