[SCM] calf/master: Get rid of dependency on libglade - use GtkBuilder instead.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:21 UTC 2013
The following commit has been merged in the master branch:
commit a98fe69b59174d2190802d81b2cbeca13fc8917f
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Sat Sep 11 12:48:37 2010 +0100
Get rid of dependency on libglade - use GtkBuilder instead.
diff --git a/Makefile.am b/Makefile.am
index 5e13d04..c2d3d56 100644
--- a/Makefile.am
+++ b/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 calf.7 calfjackhost.1 calf.schema
+EXTRA_DIST = COPYING.GPL TODO autogen.sh calf.glade presets.xml calf.7 calfjackhost.1 calf-gui.xml
dist_man_MANS = calf.7 calfjackhost.1
diff --git a/calf.glade b/calf-gui.xml
similarity index 75%
rename from calf.glade
rename to calf-gui.xml
index 592a25c..1aacabb 100644
--- a/calf.glade
+++ b/calf-gui.xml
@@ -1,92 +1,93 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<?xml version="1.0"?>
<!--*- mode: xml -*-->
-<glade-interface>
- <widget class="GtkDialog" id="store_preset">
+<interface>
+ <object class="GtkDialog" id="store_preset">
<property name="visible">True</property>
<property name="title" translatable="yes">Store preset</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
- <widget class="GtkHBox" id="hbox2">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<child>
- <widget class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xpad">12</property>
<property name="label" translatable="yes"><b>_Preset name: </b></property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkComboBoxEntry" id="preset_name">
+ <object class="GtkComboBoxEntry" id="preset_name">
<property name="visible">True</property>
<property name="has_frame">False</property>
<child internal-child="entry">
- <widget class="GtkEntry" id="comboboxentry-entry1">
- </widget>
+ <object class="GtkEntry" id="comboboxentry-entry1">
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="padding">15</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="padding">25</property>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <object 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">
+ <object class="GtkButton" id="cancelbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
- <property name="response_id">-6</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="okbutton1">
+ <object class="GtkButton" id="okbutton1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
- <property name="response_id">-5</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
-</glade-interface>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton1</action-widget>
+ <action-widget response="-5">okbutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/calf.gladep b/calf.gladep
deleted file mode 100644
index cc776ec..0000000
--- a/calf.gladep
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
- <name>Calf</name>
- <program_name>calf</program_name>
- <language>C++</language>
- <gnome_support>FALSE</gnome_support>
-</glade-project>
diff --git a/configure.ac b/configure.ac
index 8df2a3f..1b14835 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,9 +98,9 @@ LV2_ENABLED=$LV2_FOUND
LASH_ENABLED=$LASH_FOUND
if test "$JACK_FOUND" = "yes" -o "$DSSI_FOUND" = "yes" -o "$LV2_FOUND" = "yes"; then
- PKG_CHECK_MODULES(GUI_DEPS, gtk+-2.0 >= 2.8.0 gconf-2.0 >= 2.8.0 libglade-2.0 >= 2.4.0 cairo >= 1.2.0,
+ PKG_CHECK_MODULES(GUI_DEPS, gtk+-2.0 >= 2.12.0 gconf-2.0 >= 2.8.0 cairo >= 1.2.0,
GUI_ENABLED="yes",
- GUI_ENABLED="no (GTK+ 2.8, GConf 2.8, cairo 1.2 and libglade 2.4.0 or newer required)"
+ GUI_ENABLED="no (GTK+ 2.12, GConf 2.8 and cairo 1.2 or newer required)"
)
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index e42dc51..9543264 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -100,8 +100,8 @@ clean-local:
install-data-hook:
install -d -m 755 $(DESTDIR)$(pkgdatadir)
install -c -m 644 $(top_srcdir)/presets.xml $(DESTDIR)$(pkgdatadir)
-if USE_JACK
- install -c -m 644 $(top_srcdir)/calf.glade $(DESTDIR)$(pkgdatadir)
+if USE_GUI
+ install -c -m 644 $(top_srcdir)/calf-gui.xml $(DESTDIR)$(pkgdatadir)
endif
if USE_LADSPA
install -d -m 755 $(DESTDIR)$(with_ladspa_dir)
@@ -137,8 +137,8 @@ endif
rm -f $(DESTDIR)$(lv2dir)/*.ttl
rmdir -p $(DESTDIR)$(lv2dir) || true
endif
-if USE_JACK
- rm -f $(DESTDIR)$(pkgdatadir)/calf.glade
+if USE_GUI
+ rm -f $(DESTDIR)$(pkgdatadir)/calf-gui.xml
endif
rm -f $(DESTDIR)$(pkgdatadir)/presets*.xml
rmdir $(DESTDIR)$(pkgdatadir) || true
diff --git a/src/jackhost.cpp b/src/jackhost.cpp
index 552ef19..77f21d8 100644
--- a/src/jackhost.cpp
+++ b/src/jackhost.cpp
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
-#include <glade/glade.h>
#include <jack/midiport.h>
#include <calf/host_session.h>
#include <calf/preset.h>
@@ -295,7 +294,6 @@ int main(int argc, char *argv[])
#if USE_LASH
sess.session_manager = create_lash_session_mgr(&sess, argc, argv);
#endif
- glade_init();
while(1) {
int option_index;
int c = getopt_long(argc, argv, "c:i:l:o:m:M:ehv", long_options, &option_index);
diff --git a/src/preset_gui.cpp b/src/preset_gui.cpp
index 9fb1a91..9f0d577 100644
--- a/src/preset_gui.cpp
+++ b/src/preset_gui.cpp
@@ -20,7 +20,6 @@
#include <calf/gui.h>
#include <calf/preset.h>
#include <calf/preset_gui.h>
-#include <glade/glade.h>
using namespace calf_plugins;
using namespace std;
@@ -39,8 +38,6 @@ struct activate_preset_params
}
};
-GladeXML *store_preset_xml = NULL;
-
gui_preset_access::gui_preset_access(plugin_gui *_gui)
{
gui = _gui;
@@ -54,11 +51,16 @@ void gui_preset_access::store_preset()
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");
+ GtkBuilder *store_preset_builder = gtk_builder_new();
+ if (!gtk_builder_add_from_file(store_preset_builder, PKGLIBDIR "/calf-gui.xml", NULL))
+ {
+ g_object_unref(G_OBJECT(store_preset_builder));
+ return;
+ }
+ store_preset_dlg = GTK_WIDGET(gtk_builder_get_object(store_preset_builder, "store_preset"));
gtk_signal_connect(GTK_OBJECT(store_preset_dlg), "destroy", G_CALLBACK(on_dlg_destroy_window), (gui_preset_access *)this);
// gtk_widget_set_name(GTK_WIDGET(store_preset_dlg), "Calf-Preset");
- GtkWidget *preset_name_combo = glade_xml_get_widget(store_preset_xml, "preset_name");
+ GtkWidget *preset_name_combo = GTK_WIDGET(gtk_builder_get_object(store_preset_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);
@@ -112,6 +114,7 @@ void gui_preset_access::store_preset()
if (gui->window->main)
gui->window->main->refresh_all_presets(false);
}
+ g_object_unref(G_OBJECT(store_preset_builder));
}
void gui_preset_access::activate_preset(int preset, bool builtin)
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list