summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/LashDriver.cpp7
-rw-r--r--src/Patchage.cpp11
-rw-r--r--src/Patchage.h2
-rw-r--r--src/patchage.glade49
4 files changed, 52 insertions, 17 deletions
diff --git a/src/LashDriver.cpp b/src/LashDriver.cpp
index 1608139..db8a51d 100644
--- a/src/LashDriver.cpp
+++ b/src/LashDriver.cpp
@@ -56,11 +56,8 @@ LashDriver::attach(bool launch_daemon)
_args, PACKAGE_NAME, lash_flags);
if (_server_interface) {
- /*_server_interface->signal_save_file.connect(sigc::mem_fun(this, LashDriver::on_save_file));
- _server_interface->signal_restore_file.connect(sigc::mem_fun(this, LashDriver::on_restore_file));
- _server_interface->signal_quit.connect(sigc::mem_fun(this, LashDriver::on_quit));*/
_server_interface->signal_project_add.connect(sigc::mem_fun(this, &LashDriver::on_project_add));
-
+ _server_interface->signal_quit.connect(sigc::mem_fun(this, &LashDriver::on_quit));
signal_attached.emit();
_app->status_message("[LASH] Attached");
} else {
@@ -82,6 +79,8 @@ void
LashDriver::on_project_add(const SharedPtr<Raul::LashProject> project)
{
_project_name = project->name();
+ project->signal_save_file.connect(sigc::mem_fun(this, &LashDriver::on_save_file));
+ project->signal_restore_file.connect(sigc::mem_fun(this, &LashDriver::on_restore_file));
}
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index 266913d..cdd21f8 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -146,6 +146,7 @@ Patchage::Patchage(int argc, char** argv)
xml->get_widget("store_positions_menuitem", _menu_store_positions);
xml->get_widget("file_quit_menuitem", _menu_file_quit);
xml->get_widget("view_refresh_menuitem", _menu_view_refresh);
+ xml->get_widget("view_arrange_menuitem", _menu_view_arrange);
xml->get_widget("view_messages_menuitem", _menu_view_messages);
xml->get_widget("view_toolbar_menuitem", _menu_view_toolbar);
xml->get_widget("help_about_menuitem", _menu_help_about);
@@ -219,6 +220,7 @@ Patchage::Patchage(int argc, char** argv)
_menu_store_positions->signal_activate().connect(sigc::mem_fun(this, &Patchage::menu_store_positions));
_menu_file_quit->signal_activate().connect( sigc::mem_fun(this, &Patchage::menu_file_quit));
_menu_view_refresh->signal_activate().connect( sigc::mem_fun(this, &Patchage::menu_view_refresh));
+ _menu_view_arrange->signal_activate().connect( sigc::mem_fun(this, &Patchage::menu_view_arrange));
_menu_view_toolbar->signal_activate().connect( sigc::mem_fun(this, &Patchage::view_toolbar_toggled));
_menu_view_messages->signal_toggled().connect( sigc::mem_fun(this, &Patchage::show_messages_toggled));
_menu_help_about->signal_activate().connect( sigc::mem_fun(this, &Patchage::menu_help_about));
@@ -695,6 +697,15 @@ Patchage::menu_view_refresh()
void
+Patchage::menu_view_arrange()
+{
+ assert(_canvas);
+
+ _canvas->arrange();
+}
+
+
+void
Patchage::view_toolbar_toggled()
{
_update_pane_position = false;
diff --git a/src/Patchage.h b/src/Patchage.h
index 6f726df..a647c1c 100644
--- a/src/Patchage.h
+++ b/src/Patchage.h
@@ -74,6 +74,7 @@ protected:
void show_messages_toggled();
void view_toolbar_toggled();
void menu_view_refresh();
+ void menu_view_arrange();
void menu_help_about();
void zoom(double z);
void zoom_changed();
@@ -141,6 +142,7 @@ protected:
Gtk::CheckMenuItem* _menu_view_toolbar;
Gtk::CheckMenuItem* _menu_view_messages;
Gtk::MenuItem* _menu_view_refresh;
+ Gtk::MenuItem* _menu_view_arrange;
Gtk::MenuItem* _menu_help_about;
Gtk::Toolbar* _toolbar;
Gtk::ScrolledWindow* _canvas_scrolledwindow;
diff --git a/src/patchage.glade b/src/patchage.glade
index dcbb5a4..835919c 100644
--- a/src/patchage.glade
+++ b/src/patchage.glade
@@ -52,7 +52,7 @@
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image759">
+ <widget class="GtkImage" id="image823">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
@@ -74,7 +74,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image760">
+ <widget class="GtkImage" id="image824">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
@@ -96,7 +96,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image761">
+ <widget class="GtkImage" id="image825">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
<property name="icon_size">1</property>
@@ -117,7 +117,7 @@
<signal name="activate" handler="on_close_session_menuitem_activate" last_modification_time="Fri, 06 Apr 2007 01:57:05 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image762">
+ <widget class="GtkImage" id="image826">
<property name="visible">True</property>
<property name="stock">gtk-close</property>
<property name="icon_size">1</property>
@@ -145,7 +145,7 @@
<signal name="activate" handler="on_save_settings1_activate" last_modification_time="Mon, 13 Sep 2004 02:42:14 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image763">
+ <widget class="GtkImage" id="image827">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
@@ -195,7 +195,7 @@
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image764">
+ <widget class="GtkImage" id="image828">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@@ -223,7 +223,7 @@
<accelerator key="J" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image765">
+ <widget class="GtkImage" id="image829">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@@ -246,7 +246,7 @@
<accelerator key="J" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image766">
+ <widget class="GtkImage" id="image830">
<property name="visible">True</property>
<property name="stock">gtk-disconnect</property>
<property name="icon_size">1</property>
@@ -274,7 +274,7 @@
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image767">
+ <widget class="GtkImage" id="image831">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@@ -297,7 +297,7 @@
<accelerator key="A" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image768">
+ <widget class="GtkImage" id="image832">
<property name="visible">True</property>
<property name="stock">gtk-disconnect</property>
<property name="icon_size">1</property>
@@ -325,7 +325,7 @@
<accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image769">
+ <widget class="GtkImage" id="image833">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@@ -348,7 +348,7 @@
<accelerator key="L" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image770">
+ <widget class="GtkImage" id="image834">
<property name="visible">True</property>
<property name="stock">gtk-disconnect</property>
<property name="icon_size">1</property>
@@ -406,7 +406,7 @@
<accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image771">
+ <widget class="GtkImage" id="image835">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@@ -418,6 +418,29 @@
</child>
</widget>
</child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="view_arrange_menuitem">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Automatically organize canvas</property>
+ <property name="label" translatable="yes">_Arrange</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_view_arrange_menuitem_activate" last_modification_time="Fri, 06 Apr 2007 20:51:46 GMT"/>
+ <accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image836">
+ <property name="visible">True</property>
+ <property name="stock">gtk-sort-ascending</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
</child>
</widget>