From 56a392e69a378f28d25b6b66feb62e36125da20c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Nov 2008 17:26:29 +0000 Subject: 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 --- src/gui/RenameWindow.cpp | 9 +++++++++ src/gui/RenameWindow.hpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gui') 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 object) } +void +RenameWindow::present(SharedPtr 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& refGlade); - void present(SharedPtr object) { set_object(object); Gtk::Window::present(); } + void present(SharedPtr object); private: void set_object(SharedPtr object); -- cgit v1.2.1