summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);