[Racer-svn] SF.net SVN: racer:[325] trunk/racer_editor
Status: Alpha
Brought to you by:
jlegg
From: <jl...@us...> - 2010-08-20 02:48:03
|
Revision: 325 http://racer.svn.sourceforge.net/racer/?rev=325&view=rev Author: jlegg Date: 2010-08-20 02:47:57 +0000 (Fri, 20 Aug 2010) Log Message: ----------- When starting the editor, set keyboard focus to the list of themes, not the quit button on the toolbar. Modified Paths: -------------- trunk/racer_editor/EditorWindow.cpp trunk/racer_editor/NewForm.cpp trunk/racer_editor/NewForm.h Modified: trunk/racer_editor/EditorWindow.cpp =================================================================== --- trunk/racer_editor/EditorWindow.cpp 2010-08-08 01:35:46 UTC (rev 324) +++ trunk/racer_editor/EditorWindow.cpp 2010-08-20 02:47:57 UTC (rev 325) @@ -52,6 +52,9 @@ if (filename != "") { open_file(filename); + } else { + // give the theme list focus. + m_new_form.grab_focus(); } } @@ -825,4 +828,7 @@ m_viewport_top.set_document(*m_document); m_viewport_top.show(); m_guide.set_visible(m_guide_preference); + + // Move keyboard focus to the view controls on the toolbar. + m_ref_ui_manager->get_widget("/ToolBar/ShowTop")->grab_focus(); } Modified: trunk/racer_editor/NewForm.cpp =================================================================== --- trunk/racer_editor/NewForm.cpp 2010-08-08 01:35:46 UTC (rev 324) +++ trunk/racer_editor/NewForm.cpp 2010-08-20 02:47:57 UTC (rev 325) @@ -67,6 +67,11 @@ } } +void NewForm::grab_focus() +{ + theme_icon_view.grab_focus(); +} + void NewForm::set_themes() { add_themes_from("data"); Modified: trunk/racer_editor/NewForm.h =================================================================== --- trunk/racer_editor/NewForm.h 2010-08-08 01:35:46 UTC (rev 324) +++ trunk/racer_editor/NewForm.h 2010-08-20 02:47:57 UTC (rev 325) @@ -47,6 +47,10 @@ * disk doesn't delay the time until the main window appears. */ void find_themes(); + + /** Give the theme list keyboard focus for the window it is inside. + */ + void grab_focus(); protected: /// parent window Gtk::Window & window; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |