From 29b77e922d7fd883795b04eadd528eca21a37a2f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Jan 2010 17:57:22 +0000 Subject: Remove patch clear command (fix ticket #375). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2332 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/LoadPatchWindow.cpp | 3 --- src/gui/LoadRemotePatchWindow.cpp | 4 ---- src/gui/LoadRemotePatchWindow.hpp | 4 ---- src/gui/PatchView.cpp | 9 --------- src/gui/PatchView.hpp | 1 - src/gui/PatchWindow.cpp | 10 ---------- src/gui/PatchWindow.hpp | 2 -- src/gui/WindowFactory.cpp | 2 -- src/gui/ingen_gui.glade | 24 +----------------------- 9 files changed, 1 insertion(+), 58 deletions(-) (limited to 'src/gui') diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index ebe437f2..86e0d448 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -136,9 +136,6 @@ LoadPatchWindow::ok_clicked() if (_poly_from_user_radio->get_active()) _initial_data.insert(make_pair("ingen:polyphony", _poly_spinbutton->get_value_as_int())); - if (_replace) - App::instance().engine()->clear_patch(_patch->path()); - if (!_patch->path().is_root()) { parent = _patch->path().parent(); symbol = _patch->symbol(); diff --git a/src/gui/LoadRemotePatchWindow.cpp b/src/gui/LoadRemotePatchWindow.cpp index b992cdd5..0359b34c 100644 --- a/src/gui/LoadRemotePatchWindow.cpp +++ b/src/gui/LoadRemotePatchWindow.cpp @@ -37,7 +37,6 @@ namespace GUI { LoadRemotePatchWindow::LoadRemotePatchWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) : Dialog(cobject) - , _replace(true) { xml->get_widget("load_remote_patch_treeview", _treeview); xml->get_widget("load_remote_patch_uri_entry", _uri_entry); @@ -137,9 +136,6 @@ LoadRemotePatchWindow::open_clicked() optional parent; optional symbol; - if (_replace) - App::instance().engine()->clear_patch(_patch->path()); - if (!_patch->path().is_root()) parent = _patch->path().parent(); diff --git a/src/gui/LoadRemotePatchWindow.hpp b/src/gui/LoadRemotePatchWindow.hpp index 3043db73..ded08e6b 100644 --- a/src/gui/LoadRemotePatchWindow.hpp +++ b/src/gui/LoadRemotePatchWindow.hpp @@ -62,9 +62,6 @@ public: void set_patch(SharedPtr patch); - void set_replace() { _replace = true; } - void set_merge() { _replace = false; } - void present(SharedPtr patch, GraphObject::Properties data); private: @@ -77,7 +74,6 @@ private: GraphObject::Properties _initial_data; SharedPtr _patch; - bool _replace; Glib::RefPtr _selection; Glib::RefPtr _liststore; diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 57a4f46c..c59f787c 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -49,7 +49,6 @@ PatchView::PatchView(BaseObjectType* cobject, const Glib::RefPtrget_widget("patch_view_toolbar", _toolbar); xml->get_widget("patch_view_process_but", _process_but); xml->get_widget("patch_view_poly_spin", _poly_spin); - xml->get_widget("patch_view_clear_but", _clear_but); xml->get_widget("patch_view_refresh_but", _refresh_but); xml->get_widget("patch_view_save_but", _save_but); xml->get_widget("patch_view_zoom_full_but", _zoom_full_but); @@ -94,7 +93,6 @@ PatchView::set_patch(SharedPtr patch) // Connect widget signals to do things _process_but->signal_toggled().connect(sigc::mem_fun(this, &PatchView::process_toggled)); - _clear_but->signal_clicked().connect(sigc::mem_fun(this, &PatchView::clear_clicked)); _refresh_but->signal_clicked().connect(sigc::mem_fun(this, &PatchView::refresh_clicked)); _zoom_normal_but->signal_clicked().connect(sigc::bind(sigc::mem_fun( @@ -213,13 +211,6 @@ PatchView::poly_changed() } -void -PatchView::clear_clicked() -{ - App::instance().engine()->clear_patch(_patch->path()); -} - - void PatchView::refresh_clicked() { diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp index 15fcc0e4..82a2a1b0 100644 --- a/src/gui/PatchView.hpp +++ b/src/gui/PatchView.hpp @@ -96,7 +96,6 @@ private: Gtk::Toolbar* _toolbar; Gtk::ToggleToolButton* _process_but; Gtk::SpinButton* _poly_spin; - Gtk::ToolButton* _clear_but; Gtk::ToolButton* _refresh_but; Gtk::ToolButton* _save_but; Gtk::ToolButton* _zoom_normal_but; diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 2638cbbe..8c9d8c42 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -89,7 +89,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("patch_show_port_names_menuitem", _menu_show_port_names); xml->get_widget("patch_status_bar_menuitem", _menu_show_status_bar); xml->get_widget("patch_arrange_menuitem", _menu_arrange); - xml->get_widget("patch_clear_menuitem", _menu_clear); xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window); xml->get_widget("patch_view_patch_tree_window_menuitem", _menu_view_patch_tree_window); xml->get_widget("patch_help_about_menuitem", _menu_help_about); @@ -142,8 +141,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrsignal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_show_properties)); - _menu_clear->signal_activate().connect( - sigc::mem_fun(this, &PatchWindow::event_clear)); _menu_view_messages_window->signal_activate().connect( sigc::mem_fun(App::instance().messages_dialog(), &MessagesWindow::present)); _menu_view_patch_tree_window->signal_activate().connect( @@ -688,13 +685,6 @@ PatchWindow::event_quit() } -void -PatchWindow::event_clear() -{ - App::instance().engine()->clear_patch(_patch->path()); -} - - void PatchWindow::event_arrange() { diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 82afa7ad..0f10cd84 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -96,7 +96,6 @@ private: void event_select_all(); void event_close(); void event_quit(); - void event_clear(); void event_fullscreen_toggled(); void event_status_bar_toggled(); void event_human_names_toggled(); @@ -137,7 +136,6 @@ private: Gtk::CheckMenuItem* _menu_show_port_names; Gtk::CheckMenuItem* _menu_show_status_bar; Gtk::MenuItem* _menu_fullscreen; - Gtk::MenuItem* _menu_clear; Gtk::MenuItem* _menu_arrange; Gtk::MenuItem* _menu_view_engine_window; Gtk::MenuItem* _menu_view_control_window; diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index 91abccaf..83173325 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -301,8 +301,6 @@ WindowFactory::present_load_remote_patch(SharedPtr patch, GraphObjec if (w != _patch_windows.end()) _load_remote_patch_win->set_transient_for(*w->second); - _load_remote_patch_win->set_merge(); // Import is the only choice - _load_remote_patch_win->present(patch, data); } diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade index 3d42a76d..a834af3a 100644 --- a/src/gui/ingen_gui.glade +++ b/src/gui/ingen_gui.glade @@ -225,16 +225,6 @@ - - - gtk-clear - True - Remove all objects from patch - True - True - - - True @@ -1511,18 +1501,6 @@ True - - - True - Clear patch contents - True - gtk-clear - - - False - True - - True @@ -2178,7 +2156,7 @@ - + True Label: -- cgit v1.2.1