diff options
-rw-r--r-- | src/progs/ingenuity/PatchView.h | 2 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchWindow.cpp | 12 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchWindow.h | 3 | ||||
-rw-r--r-- | src/progs/ingenuity/ingenuity.glade | 38 |
4 files changed, 45 insertions, 10 deletions
diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h index 264f6192..3ea52932 100644 --- a/src/progs/ingenuity/PatchView.h +++ b/src/progs/ingenuity/PatchView.h @@ -60,7 +60,7 @@ public: SharedPtr<PatchCanvas> canvas() const { return _canvas; } SharedPtr<PatchModel> patch() const { return _patch; } - Gtk::Viewport* breadcrumb_container() const { return _breadcrumb_container; } + Gtk::Viewport* breadcrumb_container() const { return _breadcrumb_container; } static SharedPtr<PatchView> create(SharedPtr<PatchModel> patch); diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp index 7556689b..a0a0c6a3 100644 --- a/src/progs/ingenuity/PatchWindow.cpp +++ b/src/progs/ingenuity/PatchWindow.cpp @@ -71,6 +71,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad xml->get_widget("patch_view_engine_window_menuitem", _menu_view_engine_window); xml->get_widget("patch_properties_menuitem", _menu_view_patch_properties); xml->get_widget("patch_fullscreen_menuitem", _menu_fullscreen); + xml->get_widget("patch_arrange_menuitem", _menu_arrange); xml->get_widget("patch_clear_menuitem", _menu_clear); xml->get_widget("patch_destroy_menuitem", _menu_destroy_patch); xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window); @@ -99,6 +100,8 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad sigc::mem_fun(App::instance().configuration_dialog(), &ConfigWindow::show)); _menu_fullscreen->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_fullscreen_toggled)); + _menu_arrange->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_arrange)); _menu_view_engine_window->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_show_engine)); _menu_view_control_window->signal_activate().connect( @@ -378,6 +381,7 @@ PatchWindow::event_quit() b->set_label("_Quit"); Gtk::Widget* close_img = Gtk::manage(new Gtk::Image(Gtk::Stock::QUIT, Gtk::ICON_SIZE_BUTTON)); b->set_image(*close_img); + b->grab_default(); int ret = d.run(); if (ret == 1) { @@ -403,6 +407,14 @@ PatchWindow::event_clear() App::instance().engine()->clear_patch(_patch->path()); } + +void +PatchWindow::event_arrange() +{ + _view->canvas()->arrange(); +} + + void PatchWindow::event_fullscreen_toggled() { diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h index a7938f59..6fbd9cce 100644 --- a/src/progs/ingenuity/PatchWindow.h +++ b/src/progs/ingenuity/PatchWindow.h @@ -43,7 +43,6 @@ using namespace Ingen::Client; namespace Ingenuity { -class PatchCanvas; class LoadPluginWindow; class LoadPatchWindow; class NewSubpatchWindow; @@ -88,6 +87,7 @@ private: void event_destroy(); void event_clear(); void event_fullscreen_toggled(); + void event_arrange(); void event_show_properties(); void event_show_controls(); void event_show_engine(); @@ -113,6 +113,7 @@ private: Gtk::MenuItem* _menu_fullscreen; Gtk::MenuItem* _menu_clear; Gtk::MenuItem* _menu_destroy_patch; + Gtk::MenuItem* _menu_arrange; Gtk::MenuItem* _menu_view_engine_window; Gtk::MenuItem* _menu_view_control_window; Gtk::MenuItem* _menu_view_patch_properties; diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade index 2ffbcc51..3e578e36 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/progs/ingenuity/ingenuity.glade @@ -51,7 +51,7 @@ <signal name="activate" handler="on_patch_import_menuitem_activate" last_modification_time="Mon, 06 Feb 2006 06:20:27 GMT"/> <child internal-child="image"> - <widget class="GtkImage" id="image1970"> + <widget class="GtkImage" id="image1979"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -106,7 +106,7 @@ <accelerator key="G" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image1971"> + <widget class="GtkImage" id="image1980"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> @@ -231,6 +231,28 @@ </child> <child> + <widget class="GtkImageMenuItem" id="patch_arrange_menuitem"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Automatically arrange canvas</property> + <property name="label" translatable="yes">_Arrange</property> + <property name="use_underline">True</property> + <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/> + + <child internal-child="image"> + <widget class="GtkImage" id="image1981"> + <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> + + <child> <widget class="GtkImageMenuItem" id="patch_view_control_window_menuitem"> <property name="visible">True</property> <property name="tooltip" translatable="yes">View/Edit controls for this patch</property> @@ -240,7 +262,7 @@ <accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image1972"> + <widget class="GtkImage" id="image1982"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> @@ -282,7 +304,7 @@ <signal name="activate" handler="on_patch_destroy_menuitem_activate" last_modification_time="Wed, 25 May 2005 00:22:00 GMT"/> <child internal-child="image"> - <widget class="GtkImage" id="image1973"> + <widget class="GtkImage" id="image1983"> <property name="visible">True</property> <property name="stock">gtk-delete</property> <property name="icon_size">1</property> @@ -319,7 +341,7 @@ <accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image1974"> + <widget class="GtkImage" id="image1984"> <property name="visible">True</property> <property name="stock">gtk-connect</property> <property name="icon_size">1</property> @@ -342,7 +364,7 @@ <accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image1975"> + <widget class="GtkImage" id="image1985"> <property name="visible">True</property> <property name="stock">gtk-index</property> <property name="icon_size">1</property> @@ -365,7 +387,7 @@ <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image1976"> + <widget class="GtkImage" id="image1986"> <property name="visible">True</property> <property name="stock">gtk-dialog-error</property> <property name="icon_size">1</property> @@ -400,7 +422,7 @@ <signal name="activate" handler="on_right-click_the_canvas_to_add_objects1_activate" last_modification_time="Fri, 16 Jun 2006 17:51:05 GMT"/> <child internal-child="image"> - <widget class="GtkImage" id="image1977"> + <widget class="GtkImage" id="image1987"> <property name="visible">True</property> <property name="stock">gtk-info</property> <property name="icon_size">1</property> |