diff options
author | David Robillard <d@drobilla.net> | 2015-02-21 23:32:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-21 23:32:51 +0000 |
commit | d0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e (patch) | |
tree | a67f17c0ab854e06884bc85832af57f6438161e5 | |
parent | 845868bb4ec34e1bf2b0bbde937777725e167018 (diff) | |
download | patchage-d0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e.tar.gz patchage-d0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e.tar.bz2 patchage-d0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e.zip |
Order ports deterministically.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5593 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/Patchage.cpp | 12 | ||||
-rw-r--r-- | wscript | 2 |
3 files changed, 15 insertions, 2 deletions
@@ -3,12 +3,13 @@ patchage (1.0.1) unstable; * Support Jack CV and OSC via metadata. * Add support for exporting canvas as PDF. * Save window size and position when closed via window manager. + * Order ports deterministically. * Style messages pane to match canvas. * Restore messages pane visibility and height. * Configure based on compiler target OS for cross-compilation. * Fix compilation with Jack DBus. - -- David Robillard <d@drobilla.net> Sun, 08 Feb 2015 11:03:20 -0500 + -- David Robillard <d@drobilla.net> Sat, 21 Feb 2015 17:10:27 -0500 patchage (1.0.0) stable; diff --git a/src/Patchage.cpp b/src/Patchage.cpp index ec7fd5e..e24cf04 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -85,6 +85,17 @@ configure_cb(GtkWindow* parentWindow, GdkEvent* event, gpointer data) return FALSE; } +static int +port_order(const GanvPort* a, const GanvPort* b, void* data) +{ + const PatchagePort* pa = dynamic_cast<const PatchagePort*>(Glib::wrap(a)); + const PatchagePort* pb = dynamic_cast<const PatchagePort*>(Glib::wrap(b)); + if (pa && pb) { + return pa->name().compare(pb->name()); + } + return 0; +} + struct ProjectList_column_record : public Gtk::TreeModel::ColumnRecord { Gtk::TreeModelColumn<Glib::ustring> label; }; @@ -277,6 +288,7 @@ Patchage::Patchage(int argc, char** argv) _conf->load(); _canvas->set_zoom(_conf->get_zoom()); _canvas->set_font_size(_conf->get_font_size()); + _canvas->set_port_order(port_order, NULL); _main_win->resize( static_cast<int>(_conf->get_window_size().x), @@ -58,7 +58,7 @@ def configure(conf): autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.12.0', mandatory=True) autowaf.check_pkg(conf, 'ganv-1', uselib_store='GANV', - atleast_version='1.5.1', mandatory=True) + atleast_version='1.5.2', mandatory=True) if conf.env.DEST_OS == 'darwin': autowaf.check_pkg(conf, 'gtk-mac-integration', uselib_store='GTK_OSX', |