[SCM] calf/master: libglade2 -> GtkBuilder migration.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Sun Jun 12 09:44:52 UTC 2011
The following commit has been merged in the master branch:
commit 7351154ae08c8895cc085f8869f02bfc49f5d307
Author: Alessio Treglia <alessio at debian.org>
Date: Sun Jun 12 11:42:29 2011 +0200
libglade2 -> GtkBuilder migration.
diff --git a/debian/patches/0001-libglade_to_gtkbuilder.patch b/debian/patches/0001-libglade_to_gtkbuilder.patch
new file mode 100644
index 0000000..804694a
--- /dev/null
+++ b/debian/patches/0001-libglade_to_gtkbuilder.patch
@@ -0,0 +1,453 @@
+Description: Migrate calf from libglade to GtkBuilder.
+Author: Alessio Treglia <alessio at debian.org>
+Forwarded: http://sf.net/tracker/?func=detail&aid=3315375&group_id=211458&atid=1017839
+---
+ Makefile.am | 2
+ Makefile.in | 2
+ calf.glade | 125 -----------------------------------------------------
+ calf.ui | 115 ++++++++++++++++++++++++++++++++++++++++++++++++
+ configure | 20 ++++----
+ configure.ac | 4 -
+ src/Makefile.am | 4 -
+ src/Makefile.in | 4 -
+ src/jackhost.cpp | 2
+ src/preset_gui.cpp | 15 ++++--
+ 10 files changed, 143 insertions(+), 150 deletions(-)
+
+--- calf.orig/Makefile.am
++++ calf/Makefile.am
+@@ -7,7 +7,7 @@ distdir = $(PACKAGE)-$(VERSION)
+ desktopfilesdir = $(datadir)/applications
+ dist_desktopfiles_DATA = calf.desktop
+
+-EXTRA_DIST = COPYING.GPL TODO autogen.sh calf.glade presets.xml knob.png calf.7 calfjackhost.1
++EXTRA_DIST = COPYING.GPL TODO autogen.sh calf.ui presets.xml knob.png calf.7 calfjackhost.1
+
+ dist_man_MANS = calf.7 calfjackhost.1
+
+--- calf.orig/Makefile.in
++++ calf/Makefile.in
+@@ -269,7 +269,7 @@ SUBDIRS = $(SRCDIRS)
+ distdir = $(PACKAGE)-$(VERSION)
+ desktopfilesdir = $(datadir)/applications
+ dist_desktopfiles_DATA = calf.desktop
+-EXTRA_DIST = COPYING.GPL TODO autogen.sh calf.glade presets.xml knob.png calf.7 calfjackhost.1
++EXTRA_DIST = COPYING.GPL TODO autogen.sh calf.ui presets.xml knob.png calf.7 calfjackhost.1
+ dist_man_MANS = calf.7 calfjackhost.1
+ all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+--- calf.orig/src/Makefile.am
++++ calf/src/Makefile.am
+@@ -84,7 +84,7 @@ install-data-hook:
+ $(top_builddir)/src/calfmakerdf -m gui -p $(DESTDIR)$(pkgdatadir)
+ install -c -m 644 $(top_srcdir)/gui/gui-*.xml $(DESTDIR)$(pkgdatadir)
+ if USE_JACK
+- install -c -m 644 $(top_srcdir)/calf.glade $(DESTDIR)$(pkgdatadir)
++ install -c -m 644 $(top_srcdir)/calf.ui $(DESTDIR)$(pkgdatadir)
+ endif
+ if USE_LADSPA
+ install -d -m 755 $(DESTDIR)$(with_ladspa_dir)
+@@ -121,7 +121,7 @@ endif
+ rmdir -p $(DESTDIR)$(with_lv2_dir)/calf.lv2 || true
+ endif
+ if USE_JACK
+- rm -f $(DESTDIR)$(pkgdatadir)/calf.glade
++ rm -f $(DESTDIR)$(pkgdatadir)/calf.ui
+ endif
+ rm -f $(DESTDIR)$(pkgdatadir)/gui-*.xml
+ rm -f $(DESTDIR)$(pkgdatadir)/presets.xml
+--- calf.orig/src/Makefile.in
++++ calf/src/Makefile.in
+@@ -877,7 +877,7 @@ install-data-hook:
+ install -c -m 644 $(top_srcdir)/knob.png $(DESTDIR)$(pkgdatadir)
+ $(top_builddir)/src/calfmakerdf -m gui -p $(DESTDIR)$(pkgdatadir)
+ install -c -m 644 $(top_srcdir)/gui/gui-*.xml $(DESTDIR)$(pkgdatadir)
+- at USE_JACK_TRUE@ install -c -m 644 $(top_srcdir)/calf.glade $(DESTDIR)$(pkgdatadir)
++ at USE_JACK_TRUE@ install -c -m 644 $(top_srcdir)/calf.ui $(DESTDIR)$(pkgdatadir)
+ @USE_LADSPA_TRUE@ install -d -m 755 $(DESTDIR)$(with_ladspa_dir)
+ @USE_LADSPA_TRUE@ install -d -m 755 $(DESTDIR)$(with_ladspa_rdf_dir)
+ @USE_LADSPA_TRUE@ install -c -m 755 $(top_builddir)/src/.libs/calf.so $(DESTDIR)$(with_ladspa_dir)/calf.so
+@@ -898,7 +898,7 @@ uninstall-hook:
+ @USE_LV2_TRUE@ rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/calf.so
+ @USE_LV2_TRUE@ rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/*.ttl
+ @USE_LV2_TRUE@ rmdir -p $(DESTDIR)$(with_lv2_dir)/calf.lv2 || true
+- at USE_JACK_TRUE@ rm -f $(DESTDIR)$(pkgdatadir)/calf.glade
++ at USE_JACK_TRUE@ rm -f $(DESTDIR)$(pkgdatadir)/calf.ui
+ rm -f $(DESTDIR)$(pkgdatadir)/gui-*.xml
+ rm -f $(DESTDIR)$(pkgdatadir)/presets.xml
+ rm -f $(DESTDIR)$(pkgdatadir)/knob.png
+--- calf.orig/src/jackhost.cpp
++++ calf/src/jackhost.cpp
+@@ -23,7 +23,6 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <config.h>
+-#include <glade/glade.h>
+ #include <jack/jack.h>
+ #if USE_LASH
+ #include <lash/lash.h>
+@@ -633,7 +632,6 @@ int main(int argc, char *argv[])
+ g_warning("Warning: failed to create a LASH connection");
+ }
+ #endif
+- glade_init();
+ while(1) {
+ int option_index;
+ int c = getopt_long(argc, argv, "c:i:o:m:M:ehv", long_options, &option_index);
+--- calf.orig/src/preset_gui.cpp
++++ calf/src/preset_gui.cpp
+@@ -19,7 +19,6 @@
+
+ #include <config.h>
+ #include <map>
+-#include <glade/glade.h>
+ #include <calf/giface.h>
+ #include <calf/gui.h>
+ #include <calf/preset.h>
+@@ -31,7 +30,7 @@ using namespace std;
+
+ // this way of filling presets menu is not that great
+
+-GladeXML *store_preset_xml = NULL;
++GtkBuilder *builder = NULL;
+ GtkWidget *store_preset_dlg = NULL;
+
+ void store_preset_dlg_destroy(GtkWindow *window, gpointer data)
+@@ -46,10 +45,16 @@ void calf_plugins::store_preset(GtkWindo
+ gtk_window_present(GTK_WINDOW(store_preset_dlg));
+ return;
+ }
+- store_preset_xml = glade_xml_new(PKGLIBDIR "/calf.glade", NULL, NULL);
+- store_preset_dlg = glade_xml_get_widget(store_preset_xml, "store_preset");
++ GError *error = NULL;
++ builder = gtk_builder_new();
++ if(!gtk_builder_add_from_file(builder, PKGLIBDIR "/calf.ui", &error))
++ {
++ g_warning ("Couldn't load builder file: %s", error->message);
++ g_error_free (error);
++ }
++ store_preset_dlg = GTK_WIDGET(gtk_builder_get_object(builder, "store_preset"));
+ gtk_signal_connect(GTK_OBJECT(store_preset_dlg), "destroy", G_CALLBACK(store_preset_dlg_destroy), NULL);
+- GtkWidget *preset_name_combo = glade_xml_get_widget(store_preset_xml, "preset_name");
++ GtkWidget *preset_name_combo = GTK_WIDGET(gtk_builder_get_object(builder, "preset_name"));
+ GtkTreeModel *model = GTK_TREE_MODEL(gtk_list_store_new(1, G_TYPE_STRING));
+ gtk_combo_box_set_model(GTK_COMBO_BOX(preset_name_combo), model);
+ gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(preset_name_combo), 0);
+--- /dev/null
++++ calf/calf.ui
+@@ -0,0 +1,115 @@
++<?xml version="1.0"?>
++<!--*- mode: xml -*-->
++<interface>
++ <object class="GtkDialog" id="store_preset">
++ <property name="visible">True</property>
++ <property name="title" translatable="yes">Store preset</property>
++ <property name="type">GTK_WINDOW_TOPLEVEL</property>
++ <property name="window_position">GTK_WIN_POS_NONE</property>
++ <property name="modal">False</property>
++ <property name="resizable">True</property>
++ <property name="destroy_with_parent">False</property>
++ <property name="decorated">True</property>
++ <property name="skip_taskbar_hint">False</property>
++ <property name="skip_pager_hint">False</property>
++ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
++ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
++ <property name="focus_on_map">True</property>
++ <property name="urgency_hint">False</property>
++ <property name="has_separator">True</property>
++ <child internal-child="vbox">
++ <object class="GtkVBox" id="dialog-vbox1">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++ <child>
++ <object class="GtkHBox" id="hbox2">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++ <child>
++ <object class="GtkLabel" id="label2">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes"><b>_Preset name: </b></property>
++ <property name="use_underline">True</property>
++ <property name="use_markup">True</property>
++ <property name="justify">GTK_JUSTIFY_LEFT</property>
++ <property name="wrap">False</property>
++ <property name="selectable">False</property>
++ <property name="xalign">0.5</property>
++ <property name="yalign">0.5</property>
++ <property name="xpad">12</property>
++ <property name="ypad">0</property>
++ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
++ <property name="width_chars">-1</property>
++ <property name="single_line_mode">False</property>
++ <property name="angle">0</property>
++ </object>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkComboBoxEntry" id="preset_name">
++ <property name="visible">True</property>
++ <property name="add_tearoffs">False</property>
++ <property name="has_frame">True</property>
++ <property name="focus_on_click">True</property>
++ </object>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++ </object>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ </packing>
++ </child>
++ <child internal-child="action_area">
++ <object class="GtkHButtonBox" id="dialog-action_area1">
++ <property name="visible">True</property>
++ <property name="layout_style">GTK_BUTTONBOX_END</property>
++ <child>
++ <object class="GtkButton" id="cancelbutton1">
++ <property name="visible">True</property>
++ <property name="can_default">True</property>
++ <property name="can_focus">True</property>
++ <property name="label">gtk-cancel</property>
++ <property name="use_stock">True</property>
++ <property name="relief">GTK_RELIEF_NORMAL</property>
++ <property name="focus_on_click">True</property>
++ </object>
++ </child>
++ <child>
++ <object class="GtkButton" id="okbutton1">
++ <property name="visible">True</property>
++ <property name="can_default">True</property>
++ <property name="can_focus">True</property>
++ <property name="label">gtk-ok</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>
++ </object>
++ </child>
++ <action-widgets>
++ <action-widget response="-6">cancelbutton1</action-widget>
++ <action-widget response="-5">okbutton1</action-widget>
++ </action-widgets>
++ </object>
++</interface>
+--- calf.orig/configure
++++ calf/configure
+@@ -15381,12 +15381,12 @@ if test -n "$PKG_CONFIG"; then
+ pkg_cv_GUI_DEPS_CFLAGS="$GUI_DEPS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0 cairo >= 1.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_GUI_DEPS_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0" 2>/dev/null`
++ pkg_cv_GUI_DEPS_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0" 2>/dev/null`
+ else
+ pkg_failed=yes
+ fi
+@@ -15399,12 +15399,12 @@ if test -n "$PKG_CONFIG"; then
+ pkg_cv_GUI_DEPS_LIBS="$GUI_DEPS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.8.0 cairo >= 1.2.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_GUI_DEPS_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0" 2>/dev/null`
++ pkg_cv_GUI_DEPS_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0" 2>/dev/null`
+ else
+ pkg_failed=yes
+ fi
+@@ -15423,19 +15423,19 @@ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- GUI_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0"`
++ GUI_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0"`
+ else
+- GUI_DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0"`
++ GUI_DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.8.0 cairo >= 1.2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GUI_DEPS_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- GUI_ENABLED="no (GTK+ 2.8, cairo 1.2 and libglade 2.4.0 or newer required)"
++ GUI_ENABLED="no (GTK+ 2.8 and cairo 1.2 or newer required)"
+
+ elif test $pkg_failed = untried; then
+- GUI_ENABLED="no (GTK+ 2.8, cairo 1.2 and libglade 2.4.0 or newer required)"
++ GUI_ENABLED="no (GTK+ 2.8 and cairo 1.2 or newer required)"
+
+ else
+ GUI_DEPS_CFLAGS=$pkg_cv_GUI_DEPS_CFLAGS
+--- calf.orig/configure.ac
++++ calf/configure.ac
+@@ -84,9 +84,9 @@ if test "$LV2_ENABLED" = "yes"; then
+ fi
+
+ if test "$JACK_FOUND" = "yes" -o "$DSSI_FOUND" = "yes" -o "$LV2_ENABLED" = "yes"; then
+- PKG_CHECK_MODULES(GUI_DEPS, gtk+-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0,
++ PKG_CHECK_MODULES(GUI_DEPS, gtk+-2.0 >= 2.8.0 cairo >= 1.2.0,
+ GUI_ENABLED="yes",
+- GUI_ENABLED="no (GTK+ 2.8, cairo 1.2 and libglade 2.4.0 or newer required)"
++ GUI_ENABLED="no (GTK+ 2.8 and cairo 1.2 or newer required)"
+ )
+ else
+ GUI_ENABLED="no"
+--- calf.orig/calf.glade
++++ /dev/null
+@@ -1,125 +0,0 @@
+-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+-
+-<glade-interface>
+-
+-<widget class="GtkDialog" id="store_preset">
+- <property name="visible">True</property>
+- <property name="title" translatable="yes">Store preset</property>
+- <property name="type">GTK_WINDOW_TOPLEVEL</property>
+- <property name="window_position">GTK_WIN_POS_NONE</property>
+- <property name="modal">False</property>
+- <property name="resizable">True</property>
+- <property name="destroy_with_parent">False</property>
+- <property name="decorated">True</property>
+- <property name="skip_taskbar_hint">False</property>
+- <property name="skip_pager_hint">False</property>
+- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+- <property name="focus_on_map">True</property>
+- <property name="urgency_hint">False</property>
+- <property name="has_separator">True</property>
+-
+- <child internal-child="vbox">
+- <widget class="GtkVBox" id="dialog-vbox1">
+- <property name="visible">True</property>
+- <property name="homogeneous">False</property>
+- <property name="spacing">0</property>
+-
+- <child>
+- <widget class="GtkHBox" id="hbox2">
+- <property name="visible">True</property>
+- <property name="homogeneous">False</property>
+- <property name="spacing">0</property>
+-
+- <child>
+- <widget class="GtkLabel" id="label2">
+- <property name="visible">True</property>
+- <property name="label" translatable="yes"><b>_Preset name: </b></property>
+- <property name="use_underline">True</property>
+- <property name="use_markup">True</property>
+- <property name="justify">GTK_JUSTIFY_LEFT</property>
+- <property name="wrap">False</property>
+- <property name="selectable">False</property>
+- <property name="xalign">0.5</property>
+- <property name="yalign">0.5</property>
+- <property name="xpad">12</property>
+- <property name="ypad">0</property>
+- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+- <property name="width_chars">-1</property>
+- <property name="single_line_mode">False</property>
+- <property name="angle">0</property>
+- </widget>
+- <packing>
+- <property name="padding">0</property>
+- <property name="expand">False</property>
+- <property name="fill">False</property>
+- </packing>
+- </child>
+-
+- <child>
+- <widget class="GtkComboBoxEntry" id="preset_name">
+- <property name="visible">True</property>
+- <property name="add_tearoffs">False</property>
+- <property name="has_frame">True</property>
+- <property name="focus_on_click">True</property>
+- </widget>
+- <packing>
+- <property name="padding">0</property>
+- <property name="expand">True</property>
+- <property name="fill">True</property>
+- </packing>
+- </child>
+- </widget>
+- <packing>
+- <property name="padding">0</property>
+- <property name="expand">False</property>
+- <property name="fill">False</property>
+- </packing>
+- </child>
+-
+- <child internal-child="action_area">
+- <widget class="GtkHButtonBox" id="dialog-action_area1">
+- <property name="visible">True</property>
+- <property name="layout_style">GTK_BUTTONBOX_END</property>
+-
+- <child>
+- <widget class="GtkButton" id="cancelbutton1">
+- <property name="visible">True</property>
+- <property name="can_default">True</property>
+- <property name="can_focus">True</property>
+- <property name="label">gtk-cancel</property>
+- <property name="use_stock">True</property>
+- <property name="relief">GTK_RELIEF_NORMAL</property>
+- <property name="focus_on_click">True</property>
+- <property name="response_id">-6</property>
+- </widget>
+- </child>
+-
+- <child>
+- <widget class="GtkButton" id="okbutton1">
+- <property name="visible">True</property>
+- <property name="can_default">True</property>
+- <property name="can_focus">True</property>
+- <property name="label">gtk-ok</property>
+- <property name="use_stock">True</property>
+- <property name="relief">GTK_RELIEF_NORMAL</property>
+- <property name="focus_on_click">True</property>
+- <property name="response_id">-5</property>
+- </widget>
+- </child>
+- </widget>
+- <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>
+-
+- </widget>
+- </child>
+-</widget>
+-
+-
+-</glade-interface>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7a2909c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-libglade_to_gtkbuilder.patch
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list