diff options
-rw-r--r-- | src/Patchage.cpp | 10 | ||||
-rw-r--r-- | src/Patchage.hpp | 6 | ||||
-rw-r--r-- | src/ProjectList.cpp | 8 | ||||
-rw-r--r-- | src/ProjectPropertiesDialog.cpp | 12 | ||||
-rw-r--r-- | src/ProjectPropertiesDialog.hpp | 2 | ||||
-rw-r--r-- | src/UIFile.hpp (renamed from src/GladeFile.hpp) | 29 | ||||
-rw-r--r-- | src/Widget.hpp | 6 | ||||
-rw-r--r-- | src/patchage.ui (renamed from src/patchage.glade) | 458 | ||||
-rw-r--r-- | wscript | 10 |
9 files changed, 241 insertions, 300 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index d6f94d9..ac1a6e2 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -22,14 +22,14 @@ #include <sstream> #include <gtk/gtkwindow.h> -#include <libglademm/xml.h> +#include <gtkmm.h> #include <libgnomecanvasmm.h> #include "flowcanvas/Module.hpp" #include "raul/SharedPtr.hpp" #include "patchage-config.h" -#include "GladeFile.hpp" +#include "UIFile.hpp" #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageEvent.hpp" @@ -61,6 +61,10 @@ using std::cout; using std::endl; using std::string; +struct ProjectList_column_record : public Gtk::TreeModel::ColumnRecord { + Gtk::TreeModelColumn<Glib::ustring> label; +}; + /* Gtk helpers (resize combo boxes) */ static void @@ -94,7 +98,7 @@ gtkmm_set_width_for_given_text (Gtk::Widget &w, const gchar *text, #define INIT_WIDGET(x) x(_xml, ((const char*)#x) + 1) Patchage::Patchage(int argc, char** argv) - : _xml(GladeFile::open("patchage")) + : _xml(UIFile::open("patchage")) #ifdef HAVE_LASH , _dbus(NULL) , _lash_proxy(NULL) diff --git a/src/Patchage.hpp b/src/Patchage.hpp index 6e2c0db..0c61d0d 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -22,7 +22,7 @@ #include <string> #include <boost/shared_ptr.hpp> -#include <libglademm/xml.h> +#include <gtkmm.h> #include <libgnomecanvasmm.h> #include "patchage-config.h" @@ -64,7 +64,7 @@ public: void set_lash_available(bool available); #endif - Glib::RefPtr<Gnome::Glade::Xml> xml() { return _xml; } + Glib::RefPtr<Gtk::Builder> xml() { return _xml; } void attach(); void quit() { _main_win->hide(); } @@ -109,7 +109,7 @@ protected: void buffer_size_changed(); - Glib::RefPtr<Gnome::Glade::Xml> _xml; + Glib::RefPtr<Gtk::Builder> _xml; #if defined(HAVE_LASH) || defined(HAVE_JACK_DBUS) DBus* _dbus; diff --git a/src/ProjectList.cpp b/src/ProjectList.cpp index 9764420..8cb352d 100644 --- a/src/ProjectList.cpp +++ b/src/ProjectList.cpp @@ -16,7 +16,6 @@ */ #include <gtkmm.h> -#include <libglademm/xml.h> #include "Client.hpp" #include "LashProxy.hpp" @@ -35,9 +34,8 @@ struct ProjectList_column_record : public Gtk::TreeModel::ColumnRecord { }; struct ProjectListImpl : public sigc::trackable { - ProjectListImpl( - Glib::RefPtr<Gnome::Glade::Xml> xml, - Patchage* app); + ProjectListImpl(Glib::RefPtr<Gtk::Builder> xml, + Patchage* app); void project_added(shared_ptr<Project> project); void project_closed(shared_ptr<Project> project); @@ -75,7 +73,7 @@ ProjectList::~ProjectList() delete _impl; } -ProjectListImpl::ProjectListImpl(Glib::RefPtr<Gnome::Glade::Xml> xml, Patchage* app) +ProjectListImpl::ProjectListImpl(Glib::RefPtr<Gtk::Builder> xml, Patchage* app) : _app(app) , _widget(xml, "projects_list") { diff --git a/src/ProjectPropertiesDialog.cpp b/src/ProjectPropertiesDialog.cpp index e265ad0..87fe6bd 100644 --- a/src/ProjectPropertiesDialog.cpp +++ b/src/ProjectPropertiesDialog.cpp @@ -15,8 +15,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <gtkmm.h> -#include <libglademm/xml.h> +#include <gtkmm/gtkmm.h> #include "LashProxy.hpp" #include "Patchage.hpp" @@ -27,7 +26,7 @@ using boost::shared_ptr; struct ProjectPropertiesDialogImpl { - ProjectPropertiesDialogImpl(LashProxy* proxy, Glib::RefPtr<Gnome::Glade::Xml> xml); + ProjectPropertiesDialogImpl(LashProxy* proxy, Glib::RefPtr<Gtk::Builder> xml); LashProxy* _proxy; Widget<Gtk::Dialog> _dialog; @@ -36,7 +35,8 @@ struct ProjectPropertiesDialogImpl { Widget<Gtk::TextView> _notes; }; -ProjectPropertiesDialog::ProjectPropertiesDialog(LashProxy* proxy, Glib::RefPtr<Gnome::Glade::Xml> xml) +ProjectPropertiesDialog::ProjectPropertiesDialog(LashProxy* proxy, + Glib::RefPtr<Gtk::Builder> xml) { _impl = new ProjectPropertiesDialogImpl(proxy, xml); } @@ -77,8 +77,8 @@ ProjectPropertiesDialog::run(shared_ptr<Project> project) } ProjectPropertiesDialogImpl::ProjectPropertiesDialogImpl( - LashProxy* proxy, - Glib::RefPtr<Gnome::Glade::Xml> xml) + LashProxy* proxy, + Glib::RefPtr<Gtk::Builder> xml) : _proxy(proxy) , _dialog(xml, "project_properties_dialog") , _name(xml, "project_name") diff --git a/src/ProjectPropertiesDialog.hpp b/src/ProjectPropertiesDialog.hpp index aeede5f..746c072 100644 --- a/src/ProjectPropertiesDialog.hpp +++ b/src/ProjectPropertiesDialog.hpp @@ -25,7 +25,7 @@ class Project; class ProjectPropertiesDialog { public: - ProjectPropertiesDialog(LashProxy* proxy, Glib::RefPtr<Gnome::Glade::Xml> xml); + ProjectPropertiesDialog(LashProxy* proxy, Glib::RefPtr<Gtk::Builder> xml); ~ProjectPropertiesDialog(); void run(boost::shared_ptr<Project> project); diff --git a/src/GladeFile.hpp b/src/UIFile.hpp index 9f850b7..6ae68f7 100644 --- a/src/GladeFile.hpp +++ b/src/UIFile.hpp @@ -23,7 +23,7 @@ #include <stdexcept> #include <string> -#include <libglademm/xml.h> +#include <gtkmm.h> #include "raul/log.hpp" @@ -32,7 +32,7 @@ #include "binary_location.h" #endif -class GladeFile { +class UIFile { public: inline static bool is_readable(const std::string& filename) { std::ifstream fs(filename.c_str()); @@ -41,34 +41,33 @@ public: return !fail; } - static Glib::RefPtr<Gnome::Glade::Xml> open(const std::string& base_name) { - std::string glade_filename; + static Glib::RefPtr<Gtk::Builder> open(const std::string& base_name) { + std::string ui_filename; char* loc = NULL; #ifdef PATCHAGE_BINLOC loc = binary_location(); if (loc) { std::string bundle = loc; bundle = bundle.substr(0, bundle.find_last_of("/")); - glade_filename = bundle + "/" + base_name + ".glade"; + ui_filename = bundle + "/" + base_name + ".ui"; free(loc); - if (is_readable(glade_filename)) { - Raul::info << "Loading glade file " << glade_filename << std::endl; - return Gnome::Glade::Xml::create(glade_filename); + if (is_readable(ui_filename)) { + Raul::info << "Loading UI file " << ui_filename << std::endl; + return Gtk::Builder::create_from_file(ui_filename); } } #endif - glade_filename = std::string(PATCHAGE_DATA_DIR) + "/" + base_name + ".glade"; - if (is_readable(glade_filename)) { - Raul::info << "Loading glade file " << glade_filename << std::endl; - return Gnome::Glade::Xml::create(glade_filename); + ui_filename = std::string(PATCHAGE_DATA_DIR) + "/" + base_name + ".ui"; + if (is_readable(ui_filename)) { + Raul::info << "Loading UI file " << ui_filename << std::endl; + return Gtk::Builder::create_from_file(ui_filename); } std::stringstream ss; - ss << "Unable to find " << base_name << ".glade in " << loc + ss << "Unable to find " << base_name << ".ui in " << loc << " or " << PATCHAGE_DATA_DIR << std::endl; throw std::runtime_error(ss.str()); - return Glib::RefPtr<Gnome::Glade::Xml>(); - //return Gnome::Glade::Xml::create(glade_filename); + return Glib::RefPtr<Gtk::Builder>(); } }; diff --git a/src/Widget.hpp b/src/Widget.hpp index 1a80593..b0cf314 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -21,13 +21,13 @@ #include <string> #include <boost/utility.hpp> -#include <libglademm/xml.h> +#include <gtkmm.h> template <typename W> class Widget : public boost::noncopyable { public: - Widget(Glib::RefPtr<Gnome::Glade::Xml> xml, const std::string& name) { - xml->get_widget(name.c_str(), _me); + Widget(Glib::RefPtr<Gtk::Builder> xml, const std::string& name) { + xml->get_widget(name, _me); } void destroy() { delete _me; } diff --git a/src/patchage.glade b/src/patchage.ui index e86a4b8..c18e3cc 100644 --- a/src/patchage.glade +++ b/src/patchage.ui @@ -1,272 +1,231 @@ <?xml version="1.0"?> -<glade-interface> - <!-- interface-requires gtk+ 2.16 --> +<interface> + <requires lib="gtk+" version="2.16"/> <!-- interface-naming-policy toplevel-contextual --> - <widget class="GtkWindow" id="main_win"> + <object class="GtkWindow" id="main_win"> <property name="border_width">1</property> <property name="title" translatable="yes">Patchage</property> <child> - <widget class="GtkVBox" id="main_vbox"> + <object class="GtkVBox" id="main_vbox"> <property name="visible">True</property> <child> - <widget class="GtkMenuBar" id="menubar"> + <object class="GtkMenuBar" id="menubar"> <property name="visible">True</property> <child> - <widget class="GtkMenuItem" id="file_menu"> + <object class="GtkMenuItem" id="file_menu"> <property name="visible">True</property> <property name="label" translatable="yes">_File</property> <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="file_menu_menu"> + <child type="submenu"> + <object class="GtkMenu" id="file_menu_menu"> <child> - <widget class="GtkImageMenuItem" id="menu_open_session"> + <object class="GtkImageMenuItem" id="menu_open_session"> <property name="label">gtk-open</property> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Open a Project</property> <property name="use_underline">True</property> <property name="use_stock">True</property> - <signal name="activate" handler="on_open_session_menuitem_activate"/> <accelerator key="O" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + <signal name="activate" handler="on_open_session_menuitem_activate"/> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_store_positions"> + <object class="GtkImageMenuItem" id="menu_store_positions"> <property name="label">Save Positions</property> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Store the current module positions as the defaults</property> <property name="use_stock">False</property> <signal name="activate" handler="on_save_settings1_activate"/> - <child internal-child="image"> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-save</property> - </widget> - </child> - </widget> + </object> </child> <child> - <widget class="GtkSeparatorMenuItem" id="separator3"> + <object class="GtkSeparatorMenuItem" id="separator3"> <property name="visible">True</property> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_file_quit"> + <object class="GtkImageMenuItem" id="menu_file_quit"> <property name="label">gtk-quit</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <signal name="activate" handler="on_quit1_activate"/> - </widget> + </object> </child> - </widget> + </object> </child> - </widget> + </object> </child> <child> - <widget class="GtkMenuItem" id="menu_file_system"> + <object class="GtkMenuItem" id="menu_file_system"> <property name="visible">True</property> <property name="label" translatable="yes">_System</property> <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="file_system_menuitem_menu"> + <child type="submenu"> + <object class="GtkMenu" id="file_system_menuitem_menu"> <child> - <widget class="GtkImageMenuItem" id="menu_jack_connect"> + <object class="GtkImageMenuItem" id="menu_jack_connect"> <property name="label">Connect to _Jack</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">False</property> - <signal name="activate" handler="on_menu_jack_connect_activate"/> <accelerator key="J" signal="activate" modifiers="GDK_CONTROL_MASK"/> - <child internal-child="image"> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-connect</property> - </widget> - </child> - </widget> + <signal name="activate" handler="on_menu_jack_connect_activate"/> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_jack_disconnect"> + <object class="GtkImageMenuItem" id="menu_jack_disconnect"> <property name="label">Disconnect from Jack</property> <property name="visible">True</property> <property name="sensitive">False</property> <property name="use_stock">False</property> - <signal name="activate" handler="on_disconnect_from_jack1_activate"/> <accelerator key="J" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/> - <child internal-child="image"> - <widget class="GtkImage" id="image3"> - <property name="visible">True</property> - <property name="stock">gtk-disconnect</property> - </widget> - </child> - </widget> + <signal name="activate" handler="on_disconnect_from_jack1_activate"/> + </object> </child> <child> - <widget class="GtkSeparatorMenuItem" id="separator4"> + <object class="GtkSeparatorMenuItem" id="separator4"> <property name="visible">True</property> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_alsa_connect"> + <object class="GtkImageMenuItem" id="menu_alsa_connect"> <property name="label">Connect to _Alsa</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">False</property> - <signal name="activate" handler="on_menu_alsa_connect_activate"/> <accelerator key="A" signal="activate" modifiers="GDK_CONTROL_MASK"/> - <child internal-child="image"> - <widget class="GtkImage" id="image4"> - <property name="visible">True</property> - <property name="stock">gtk-connect</property> - </widget> - </child> - </widget> + <signal name="activate" handler="on_menu_alsa_connect_activate"/> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_alsa_disconnect"> + <object class="GtkImageMenuItem" id="menu_alsa_disconnect"> <property name="label">Disconnect from ALSA</property> <property name="visible">True</property> <property name="sensitive">False</property> <property name="use_stock">False</property> - <signal name="activate" handler="on_menu_alsa_disconnect_activate"/> <accelerator key="A" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/> - <child internal-child="image"> - <widget class="GtkImage" id="image5"> - <property name="visible">True</property> - <property name="stock">gtk-disconnect</property> - </widget> - </child> - </widget> + <signal name="activate" handler="on_menu_alsa_disconnect_activate"/> + </object> </child> - </widget> + </object> </child> - </widget> + </object> </child> <child> - <widget class="GtkMenuItem" id="view_menu"> + <object class="GtkMenuItem" id="view_menu"> <property name="visible">True</property> <property name="label" translatable="yes">_View</property> <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="view_menu_menu"> + <child type="submenu"> + <object class="GtkMenu" id="view_menu_menu"> <child> - <widget class="GtkCheckMenuItem" id="menu_view_toolbar"> + <object class="GtkCheckMenuItem" id="menu_view_toolbar"> <property name="visible">True</property> <property name="label" translatable="yes">_Toolbar</property> <property name="use_underline">True</property> <property name="active">True</property> - <signal name="activate" handler="on_menu_view_toolbar_activate"/> <accelerator key="T" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + <signal name="activate" handler="on_menu_view_toolbar_activate"/> + </object> </child> <child> - <widget class="GtkCheckMenuItem" id="menu_view_projects"> + <object class="GtkCheckMenuItem" id="menu_view_projects"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Show LASH projects list</property> <property name="label" translatable="yes">_Projects</property> <property name="use_underline">True</property> <accelerator key="P" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + </object> </child> <child> - <widget class="GtkCheckMenuItem" id="menu_view_messages"> + <object class="GtkCheckMenuItem" id="menu_view_messages"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">View log messages</property> <property name="label" translatable="yes">_Messages</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_messages1_activate"/> <accelerator key="M" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + <signal name="activate" handler="on_messages1_activate"/> + </object> </child> <child> - <widget class="GtkSeparatorMenuItem" id="menuitem1"> + <object class="GtkSeparatorMenuItem" id="menuitem1"> <property name="visible">True</property> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_zoom_in"> + <object class="GtkImageMenuItem" id="menu_zoom_in"> <property name="label">gtk-zoom-in</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <accelerator key="equal" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_zoom_out"> + <object class="GtkImageMenuItem" id="menu_zoom_out"> <property name="label">gtk-zoom-out</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <accelerator key="minus" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_zoom_normal"> + <object class="GtkImageMenuItem" id="menu_zoom_normal"> <property name="label">gtk-zoom-100</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <accelerator key="0" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + </object> </child> <child> - <widget class="GtkSeparatorMenuItem" id="menuitem2"> + <object class="GtkSeparatorMenuItem" id="menuitem2"> <property name="visible">True</property> - </widget> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_view_refresh"> + <object class="GtkImageMenuItem" id="menu_view_refresh"> <property name="label">gtk-refresh</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> - <signal name="activate" handler="on_refresh2_activate"/> <accelerator key="R" signal="activate" modifiers="GDK_CONTROL_MASK"/> - </widget> + <signal name="activate" handler="on_refresh2_activate"/> + </object> </child> <child> - <widget class="GtkImageMenuItem" id="menu_view_arrange"> + <object class="GtkImageMenuItem" id="menu_view_arrange"> <property name="label">_Arrange</property> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Automatically organize canvas</property> <property name="use_underline">True</property> <property name="use_stock">False</property> - <signal name="activate" handler="on_menu_view_arrange"/> <accelerator key="G" signal="activate" modifiers="GDK_CONTROL_MASK"/> - <child internal-child="image"> - <widget class="GtkImage" id="image6"> - <property name="visible">True</property> - <property name="stock">gtk-sort-ascending</property> - </widget> - </child> - </widget> + <signal name="activate" handler="on_menu_view_arrange"/> + </object> </child> - </widget> + </object> </child> - </widget> + </object> </child> <child> - <widget class="GtkMenuItem" id="help_menu"> + <object class="GtkMenuItem" id="help_menu"> <property name="visible">True</property> <property name="label" translatable="yes">_Help</property> <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="help_menu_menu"> + <child type="submenu"> + <object class="GtkMenu" id="help_menu_menu"> <child> - <widget class="GtkImageMenuItem" id="menu_help_about"> + <object class="GtkImageMenuItem" id="menu_help_about"> <property name="label">gtk-about</property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <signal name="activate" handler="on_about1_activate"/> - </widget> + </object> </child> - </widget> + </object> </child> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -274,28 +233,28 @@ </packing> </child> <child> - <widget class="GtkToolbar" id="toolbar"> + <object class="GtkToolbar" id="toolbar"> <property name="visible">True</property> <property name="toolbar_style">icons</property> <property name="show_arrow">False</property> <property name="icon_size">1</property> <property name="icon_size_set">True</property> <child> - <widget class="GtkToolItem" id="toolitem28"> + <object class="GtkToolItem" id="toolitem28"> <property name="visible">True</property> <property name="visible_vertical">False</property> <child> - <widget class="GtkAlignment" id="alignment2"> + <object class="GtkAlignment" id="alignment2"> <property name="visible">True</property> <property name="yscale">0</property> <child> - <widget class="GtkHBox" id="hbox4"> + <object class="GtkHBox" id="hbox4"> <property name="visible">True</property> <child> - <widget class="GtkLabel" id="label10"> + <object class="GtkLabel" id="label10"> <property name="visible">True</property> <property name="label" translatable="yes"> Latency: </property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -303,28 +262,19 @@ </packing> </child> <child> - <widget class="GtkComboBoxEntry" id="buffer_size_combo"> + <object class="GtkComboBoxEntry" id="buffer_size_combo"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Jack latency</property> <property name="border_width">1</property> - <property name="items" translatable="yes">32 frames -64 frames -128 frames -256 frames -512 frames -1024 frames -2048 frames -4096 frames</property> - </widget> + </object> <packing> <property name="padding">1</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkLabel" id="sample_rate_label"> + <object class="GtkLabel" id="sample_rate_label"> <property name="label" translatable="yes">48</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -333,141 +283,137 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label9"> + <object class="GtkLabel" id="label9"> <property name="xpad">1</property> <property name="label" translatable="yes">kHz</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="position">3</property> </packing> </child> - </widget> + </object> </child> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkSeparatorToolItem" id="separatortoolitem3"> + <object class="GtkSeparatorToolItem" id="separatortoolitem3"> <property name="visible">True</property> <property name="border_width">8</property> - </widget> + </object> <packing> <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkToolButton" id="clear_load_but"> + <object class="GtkToolButton" id="clear_load_but"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Clear the dropout indicator</property> <property name="stock_id">gtk-clear</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="homogeneous">True</property> </packing> </child> <child> - <widget class="GtkToolItem" id="toolitem30"> + <object class="GtkToolItem" id="toolitem30"> <property name="visible">True</property> <child> - <widget class="GtkAlignment" id="alignment3"> + <object class="GtkAlignment" id="alignment3"> <property name="visible">True</property> <property name="yscale">0</property> <child> - <widget class="GtkProgressBar" id="main_xrun_progress"> + <object class="GtkProgressBar" id="main_xrun_progress"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Drouput (XRun) Indicator - -The bar represents the percentage of available time used for audio processing (i.e. the DSP load). If the bar reaches 100%, a dropout will occur.</property> <property name="pulse_step">0.10000000149</property> <property name="text" translatable="yes">0 Dropouts</property> - </widget> + </object> </child> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkSeparatorToolItem" id="toolbutton1"> + <object class="GtkSeparatorToolItem" id="toolbutton1"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="draw">False</property> - </widget> + </object> <packing> <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkSeparatorToolItem" id="toolbutton2"> + <object class="GtkSeparatorToolItem" id="toolbutton2"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> <packing> <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkToolButton" id="zoom_normal_but"> + <object class="GtkToolButton" id="zoom_normal_but"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="stock_id">gtk-zoom-100</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="homogeneous">True</property> </packing> </child> <child> - <widget class="GtkToolButton" id="zoom_full_but"> + <object class="GtkToolButton" id="zoom_full_but"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="stock_id">gtk-zoom-fit</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="homogeneous">True</property> </packing> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkHPaned" id="hpaned1"> + <object class="GtkHPaned" id="hpaned1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="position">204</property> <child> - <widget class="GtkViewport" id="project_list_viewport"> + <object class="GtkViewport" id="project_list_viewport"> <property name="visible">True</property> <property name="resize_mode">queue</property> <child> - <widget class="GtkTreeView" id="projects_list"> + <object class="GtkTreeView" id="projects_list"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="resize">False</property> <property name="shrink">True</property> </packing> </child> <child> - <widget class="GtkScrolledWindow" id="main_scrolledwin"> + <object class="GtkScrolledWindow" id="main_scrolledwin"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="has_focus">True</property> @@ -481,21 +427,21 @@ The bar represents the percentage of available time used for audio processing (i <child> <placeholder/> </child> - </widget> + </object> <packing> <property name="resize">True</property> <property name="shrink">True</property> </packing> </child> - </widget> + </object> <packing> <property name="position">2</property> </packing> </child> - </widget> + </object> </child> - </widget> - <widget class="GtkAboutDialog" id="about_win"> + </object> + <object class="GtkAboutDialog" id="about_win"> <property name="destroy_with_parent">True</property> <property name="type_hint">normal</property> <property name="program_name">Patchage</property> @@ -525,19 +471,19 @@ Nedko Arnaudov <nedko@arnaudov.name></property> Lapo Calamandrei</property> <property name="logo_icon_name">patchage</property> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> + <object class="GtkVBox" id="dialog-vbox1"> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"/> + <object class="GtkHButtonBox" id="dialog-action_area1"/> <packing> <property name="expand">False</property> <property name="pack_type">end</property> <property name="position">0</property> </packing> </child> - </widget> + </object> </child> - </widget> - <widget class="GtkDialog" id="messages_win"> + </object> + <object class="GtkDialog" id="messages_win"> <property name="can_default">True</property> <property name="has_default">True</property> <property name="receives_default">True</property> @@ -546,14 +492,13 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="title" translatable="yes">Patchage - Messages</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> - <property name="has_separator">False</property> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox3"> + <object class="GtkVBox" id="dialog-vbox3"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="spacing">2</property> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow2"> + <object class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -561,7 +506,7 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="vscrollbar_policy">automatic</property> <property name="shadow_type">in</property> <child> - <widget class="GtkTextView" id="status_text"> + <object class="GtkTextView" id="status_text"> <property name="width_request">640</property> <property name="height_request">480</property> <property name="visible">True</property> @@ -570,27 +515,27 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="wrap_mode">word</property> <property name="cursor_visible">False</property> <property name="accepts_tab">False</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="position">1</property> </packing> </child> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area3"> + <object class="GtkHButtonBox" id="dialog-action_area3"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="layout_style">end</property> <child> - <widget class="GtkButton" id="messages_clear_but"> + <object class="GtkButton" id="messages_clear_but"> <property name="label">gtk-clear</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -598,7 +543,7 @@ Nedko Arnaudov <nedko@arnaudov.name></property> </packing> </child> <child> - <widget class="GtkButton" id="messages_close_but"> + <object class="GtkButton" id="messages_close_but"> <property name="label">gtk-close</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -607,24 +552,28 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</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="pack_type">end</property> <property name="position">0</property> </packing> </child> - </widget> + </object> </child> - </widget> - <widget class="GtkDialog" id="load_project_dialog"> + <action-widgets> + <action-widget response="0">messages_clear_but</action-widget> + <action-widget response="0">messages_close_but</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="load_project_dialog"> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">5</property> <property name="title" translatable="yes">Load project</property> @@ -632,14 +581,13 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> <property name="transient_for">main_win</property> - <property name="has_separator">False</property> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox4"> + <object class="GtkVBox" id="dialog-vbox4"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="spacing">2</property> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="width_request">400</property> <property name="height_request">400</property> <property name="visible">True</property> @@ -648,32 +596,31 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> - <widget class="GtkTreeView" id="loadable_projects_list"> + <object class="GtkTreeView" id="loadable_projects_list"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="position">1</property> </packing> </child> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area4"> + <object class="GtkHButtonBox" id="dialog-action_area4"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="layout_style">end</property> <child> - <widget class="GtkButton" id="load_project_cancel_button"> + <object class="GtkButton" id="load_project_cancel_button"> <property name="label">gtk-cancel</property> - <property name="response_id">1</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -681,32 +628,35 @@ Nedko Arnaudov <nedko@arnaudov.name></property> </packing> </child> <child> - <widget class="GtkButton" id="load_project_ok_button"> + <object class="GtkButton" id="load_project_ok_button"> <property name="label">gtk-ok</property> - <property name="response_id">2</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</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="pack_type">end</property> <property name="position">0</property> </packing> </child> - </widget> + </object> </child> - </widget> - <widget class="GtkDialog" id="project_properties_dialog"> + <action-widgets> + <action-widget response="1">load_project_cancel_button</action-widget> + <action-widget response="2">load_project_ok_button</action-widget> + </action-widgets> + </object> + <object class="GtkDialog" id="project_properties_dialog"> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">5</property> <property name="title" translatable="yes">Project properties</property> @@ -714,137 +664,126 @@ Nedko Arnaudov <nedko@arnaudov.name></property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> <property name="transient_for">main_win</property> - <property name="has_separator">False</property> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox5"> + <object class="GtkVBox" id="dialog-vbox5"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="spacing">2</property> <child> - <widget class="GtkVBox" id="vbox1"> + <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="spacing">10</property> <child> - <widget class="GtkFrame" id="frame1"> + <object class="GtkFrame" id="frame1"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <widget class="GtkEntry" id="project_name"> + <object class="GtkEntry" id="project_name"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> </child> - <child> - <widget class="GtkLabel" id="label1"> + <child type="label"> + <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label" translatable="yes"><b>Project name</b></property> <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame2"> + <object class="GtkFrame" id="frame2"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <widget class="GtkEntry" id="project_description"> + <object class="GtkEntry" id="project_description"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> </child> - <child> - <widget class="GtkLabel" id="label2"> + <child type="label"> + <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label" translatable="yes"><b>Description</b></property> <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> + </object> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame3"> + <object class="GtkFrame" id="frame3"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow3"> + <object class="GtkScrolledWindow" id="scrolledwindow3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> <child> - <widget class="GtkTextView" id="project_notes"> + <object class="GtkTextView" id="project_notes"> <property name="width_request">300</property> <property name="height_request">200</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - </widget> + </object> </child> - </widget> + </object> </child> - <child> - <widget class="GtkLabel" id="label3"> + <child type="label"> + <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="label" translatable="yes"><b>Notes</b></property> <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> + </object> </child> - </widget> + </object> <packing> <property name="position">2</property> </packing> </child> - </widget> + </object> <packing> <property name="position">1</property> </packing> </child> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area5"> + <object class="GtkHButtonBox" id="dialog-action_area5"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="layout_style">end</property> <child> - <widget class="GtkButton" id="project_properties_cancel_button"> + <object class="GtkButton" id="project_properties_cancel_button"> <property name="label">gtk-cancel</property> - <property name="response_id">1</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -852,29 +791,32 @@ Nedko Arnaudov <nedko@arnaudov.name></property> </packing> </child> <child> - <widget class="GtkButton" id="project_properties_ok_button"> + <object class="GtkButton" id="project_properties_ok_button"> <property name="label">gtk-ok</property> - <property name="response_id">2</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="use_stock">True</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="pack_type">end</property> <property name="position">0</property> </packing> </child> - </widget> + </object> </child> - </widget> -</glade-interface> + <action-widgets> + <action-widget response="1">project_properties_cancel_button</action-widget> + <action-widget response="2">project_properties_ok_button</action-widget> + </action-widgets> + </object> +</interface> @@ -53,8 +53,6 @@ def configure(conf): atleast_version='2.14.0', mandatory=True) autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.11.12', mandatory=True) - autowaf.check_pkg(conf, 'libglademm-2.4', uselib_store='GLADEMM', - atleast_version='2.6.0', mandatory=True) autowaf.check_pkg(conf, 'flowcanvas', uselib_store='FLOWCANVAS', atleast_version='0.8.0', mandatory=True) autowaf.check_pkg(conf, 'raul', uselib_store='RAUL', @@ -123,7 +121,7 @@ def build(bld): prog.includes = ['.', 'src'] prog.target = out_base + bld.env['APP_INSTALL_NAME'] prog.install_path = '${BINDIR}' - autowaf.use_lib(bld, prog, 'DBUS FLOWCANVAS GLADEMM DBUS_GLIB GNOMECANVASMM GTHREAD RAUL') + autowaf.use_lib(bld, prog, 'DBUS FLOWCANVAS DBUS_GLIB GNOMECANVASMM GTHREAD RAUL') prog.source = ''' src/Client.cpp src/Patchage.cpp @@ -157,10 +155,10 @@ def build(bld): if bld.is_defined('PATCHAGE_BINLOC'): prog.linkflags = ['-ldl'] - # Glade XML UI definition + # XML UI definition bld(features = 'subst', - source = 'src/patchage.glade', - target = out_base + 'patchage.glade', + source = 'src/patchage.ui', + target = out_base + 'patchage.ui', install_path = '${DATADIR}/' + bld.env['APP_INSTALL_NAME'], chmod = Utils.O644, PATCHAGE_VERSION = PATCHAGE_VERSION) |