From b1a0a1b76ee1c9ae469c3d73543998662adc05ee Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Nov 2009 04:32:16 +0000 Subject: Add close button to node properties dialog. Make resize window a dialog, transient of patch window (center nicely, etc). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2270 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/LoadPluginWindow.cpp | 9 +-------- src/gui/LoadPluginWindow.hpp | 1 - src/gui/MessagesWindow.cpp | 9 +-------- src/gui/MessagesWindow.hpp | 1 - src/gui/NodePropertiesWindow.cpp | 4 ++++ src/gui/NodePropertiesWindow.hpp | 1 + src/gui/WindowFactory.cpp | 2 ++ src/gui/ingen_gui.glade | 31 +++++++++++++++++++++++++++++++ 8 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index f4336b7d..c5b895cc 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -84,7 +84,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtrsignal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked)); _close_button->signal_clicked().connect( - sigc::mem_fun(this, &LoadPluginWindow::close_clicked)); + sigc::mem_fun(this, &Window::hide)); _plugins_treeview->signal_row_activated().connect( sigc::mem_fun(this, &LoadPluginWindow::plugin_activated)); _search_entry->signal_activate().connect( @@ -364,13 +364,6 @@ LoadPluginWindow::add_clicked() } -void -LoadPluginWindow::close_clicked() -{ - hide(); -} - - void LoadPluginWindow::filter_changed() { diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index 7a3bd335..1ec5700c 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -94,7 +94,6 @@ private: }; void add_clicked(); - void close_clicked(); void filter_changed(); void clear_clicked(); void name_changed(); diff --git a/src/gui/MessagesWindow.cpp b/src/gui/MessagesWindow.cpp index 930eaa06..bf815066 100644 --- a/src/gui/MessagesWindow.cpp +++ b/src/gui/MessagesWindow.cpp @@ -31,7 +31,7 @@ MessagesWindow::MessagesWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("messages_close_button", _close_button); _clear_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::clear_clicked)); - _close_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::close_clicked)); + _close_button->signal_clicked().connect(sigc::mem_fun(this, &Window::hide)); } @@ -47,13 +47,6 @@ MessagesWindow::post(const string& msg) } -void -MessagesWindow::close_clicked() -{ - hide(); -} - - void MessagesWindow::clear_clicked() { diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp index 4c5d3e1e..eac20df3 100644 --- a/src/gui/MessagesWindow.hpp +++ b/src/gui/MessagesWindow.hpp @@ -43,7 +43,6 @@ public: private: void clear_clicked(); - void close_clicked(); Gtk::TextView* _textview; Gtk::Button* _clear_button; diff --git a/src/gui/NodePropertiesWindow.cpp b/src/gui/NodePropertiesWindow.cpp index 39115bd2..f3058e5d 100644 --- a/src/gui/NodePropertiesWindow.cpp +++ b/src/gui/NodePropertiesWindow.cpp @@ -36,6 +36,10 @@ NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib:: glade_xml->get_widget("node_properties_plugin_type_label", _plugin_type_label); glade_xml->get_widget("node_properties_plugin_uri_label", _plugin_uri_label); glade_xml->get_widget("node_properties_plugin_name_label", _plugin_name_label); + glade_xml->get_widget("node_properties_close_button", _close_button); + + _close_button->signal_clicked().connect( + sigc::mem_fun(this, &Window::hide)); } diff --git a/src/gui/NodePropertiesWindow.hpp b/src/gui/NodePropertiesWindow.hpp index fb540816..adbdb2c4 100644 --- a/src/gui/NodePropertiesWindow.hpp +++ b/src/gui/NodePropertiesWindow.hpp @@ -52,6 +52,7 @@ private: Gtk::Label* _plugin_type_label; Gtk::Label* _plugin_uri_label; Gtk::Label* _plugin_name_label; + Gtk::Button* _close_button; }; } // namespace GUI diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index 4a948a36..b06ed449 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -345,6 +345,8 @@ void WindowFactory::present_rename(SharedPtr object) { PatchWindowMap::iterator w = _patch_windows.find(object->path()); + if (w == _patch_windows.end()) + w = _patch_windows.find(object->path().parent()); if (w != _patch_windows.end()) _rename_win->set_transient_for(*w->second); diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade index 3d345bd1..e2ab7354 100644 --- a/src/gui/ingen_gui.glade +++ b/src/gui/ingen_gui.glade @@ -2141,6 +2141,7 @@ 250 Rename center-on-parent + dialog True @@ -2163,6 +2164,8 @@ True True + True + True True @@ -2271,6 +2274,8 @@ True + vertical + 4 True @@ -2288,6 +2293,7 @@ True 12 + vertical 6 @@ -2451,6 +2457,31 @@ 3 + + + True + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + False + 4 + + -- cgit v1.2.1