summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-29 17:26:29 +0000
committerDavid Robillard <d@drobilla.net>2008-11-29 17:26:29 +0000
commit56a392e69a378f28d25b6b66feb62e36125da20c (patch)
tree052c69ac9fd2cc33133e59c268e4a68b44794271 /src/gui
parent4dbeb95b6560495fbd4f21fe1ebc7082c2ecad34 (diff)
downloadingen-56a392e69a378f28d25b6b66feb62e36125da20c.tar.gz
ingen-56a392e69a378f28d25b6b66feb62e36125da20c.tar.bz2
ingen-56a392e69a378f28d25b6b66feb62e36125da20c.zip
Always/explicitly focus text entry in rename window on present.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1830 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/RenameWindow.cpp9
-rw-r--r--src/gui/RenameWindow.hpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index b9c252d0..0b89c962 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -56,6 +56,15 @@ RenameWindow::set_object(SharedPtr<ObjectModel> object)
}
+void
+RenameWindow::present(SharedPtr<ObjectModel> object)
+{
+ set_object(object);
+ _name_entry->grab_focus();
+ Gtk::Window::present();
+}
+
+
/** Called every time the user types into the name input box.
* Used to display warning messages, and enable/disable the rename button.
*/
diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp
index 6e6a09f5..524f97ff 100644
--- a/src/gui/RenameWindow.hpp
+++ b/src/gui/RenameWindow.hpp
@@ -37,7 +37,7 @@ class RenameWindow : public Gtk::Window
public:
RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
- void present(SharedPtr<ObjectModel> object) { set_object(object); Gtk::Window::present(); }
+ void present(SharedPtr<ObjectModel> object);
private:
void set_object(SharedPtr<ObjectModel> object);