aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-11 23:45:54 +0000
committerDavid Robillard <d@drobilla.net>2007-03-11 23:45:54 +0000
commit04c6f60d1f1fb94f6a9dca81439026db22ebb88e (patch)
tree29b6bdd73bcfaa4e917185d93808957e44d6e92a /src
parentf3ba4fc81cecf8ba61c2508ed9a624c794ab88b5 (diff)
downloadmachina-04c6f60d1f1fb94f6a9dca81439026db22ebb88e.tar.gz
machina-04c6f60d1f1fb94f6a9dca81439026db22ebb88e.tar.bz2
machina-04c6f60d1f1fb94f6a9dca81439026db22ebb88e.zip
Auto-arranging in flowcanvas/machina.
git-svn-id: http://svn.drobilla.net/lad/machina@353 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/MachinaCanvas.cpp1
-rw-r--r--src/gui/MachinaGUI.cpp4
-rw-r--r--src/gui/MachinaGUI.hpp1
-rw-r--r--src/gui/Makefile.am2
-rw-r--r--src/gui/machina.glade19
5 files changed, 23 insertions, 4 deletions
diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp
index 878e790..2c22791 100644
--- a/src/gui/MachinaCanvas.cpp
+++ b/src/gui/MachinaCanvas.cpp
@@ -219,6 +219,7 @@ MachinaCanvas::build(SharedPtr<Machina::Machine> machine)
}
}
+ arrange();
}
diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp
index 121e25a..1266147 100644
--- a/src/gui/MachinaGUI.cpp
+++ b/src/gui/MachinaGUI.cpp
@@ -131,8 +131,9 @@ MachinaGUI::MachinaGUI(SharedPtr<Machina::Engine> engine)
xml->get_widget("bpm_spinbutton", _bpm_spinbutton);
xml->get_widget("quantize_checkbutton", _quantize_checkbutton);
xml->get_widget("quantize_spinbutton", _quantize_spinbutton);
- xml->get_widget("zoom_full_but", _zoom_full_button);
xml->get_widget("zoom_normal_but", _zoom_normal_button);
+ xml->get_widget("zoom_full_but", _zoom_full_button);
+ xml->get_widget("arrange_but", _arrange_button);
_canvas_scrolledwindow->add(*_canvas);
//m_canvas_scrolledwindow->signal_event().connect(sigc::mem_fun(_canvas, &FlowCanvas::scroll_event_handler));
@@ -145,6 +146,7 @@ MachinaGUI::MachinaGUI(SharedPtr<Machina::Engine> engine)
sigc::mem_fun(this, &MachinaGUI::zoom), 1.0));
_zoom_full_button->signal_clicked().connect(sigc::mem_fun(_canvas.get(), &MachinaCanvas::zoom_full));
+ _arrange_button->signal_clicked().connect(sigc::mem_fun(_canvas.get(), &MachinaCanvas::arrange));
_menu_file_open->signal_activate().connect(
sigc::mem_fun(this, &MachinaGUI::menu_file_open));
diff --git a/src/gui/MachinaGUI.hpp b/src/gui/MachinaGUI.hpp
index 0e507fc..7774ff6 100644
--- a/src/gui/MachinaGUI.hpp
+++ b/src/gui/MachinaGUI.hpp
@@ -118,6 +118,7 @@ protected:
Gtk::SpinButton* _quantize_spinbutton;
Gtk::ToolButton* _zoom_normal_button;
Gtk::ToolButton* _zoom_full_button;
+ Gtk::ToolButton* _arrange_button;
};
#endif // MACHINA_GUI_H
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
index 570cc8a..5c6cf47 100644
--- a/src/gui/Makefile.am
+++ b/src/gui/Makefile.am
@@ -1,5 +1,5 @@
AM_CXXFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @JACK_CFLAGS@ @FLOWCANVAS_CFLAGS@ @RAUL_CFLAGS@ -I$(top_srcdir)/src/engine
-machina_gui_LDADD = @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @JACK_LIBS@ @FLOWCANVAS_LIBS@ @RAUL_CFLAGS@ ../engine/libmachina.la
+machina_gui_LDADD = @FLOWCANVAS_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @JACK_LIBS@ @RAUL_CFLAGS@ ../engine/libmachina.la
EXTRA_DIST = machina.gladep
diff --git a/src/gui/machina.glade b/src/gui/machina.glade
index c0d1b87..216dfeb 100644
--- a/src/gui/machina.glade
+++ b/src/gui/machina.glade
@@ -85,7 +85,7 @@
<accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image8">
+ <widget class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="stock">gtk-media-record</property>
<property name="icon_size">1</property>
@@ -107,7 +107,7 @@
<accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image9">
+ <widget class="GtkImage" id="image10">
<property name="visible">True</property>
<property name="stock">gtk-convert</property>
<property name="icon_size">1</property>
@@ -405,6 +405,21 @@
<property name="homogeneous">True</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkToolButton" id="arrange_but">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Automatically arrange nodes</property>
+ <property name="stock_id">gtk-refresh</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>