Author: Yu Chen <[email protected]>
Date: Thu Mar 29 13:15:44 2012 +0800
Release focus after user finished zoom factor by hitting enter key
so that user can user accelerator keys streamlined
---
synfig-studio/src/gui/preview.cpp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/synfig-studio/src/gui/preview.cpp
b/synfig-studio/src/gui/preview.cpp
index 35cbdc0..2dd9941 100644
--- a/synfig-studio/src/gui/preview.cpp
+++ b/synfig-studio/src/gui/preview.cpp
@@ -1055,7 +1055,9 @@ void Widget_Preview::on_zoom_entry_activated()
if (first == string::npos)
{
entry->set_text(_("Fit"));
- entry->set_position(-1);
+
+ //release the focus to enable accelerator keys
+ preview_window.grab_focus();
return ;
}
@@ -1074,7 +1076,8 @@ void Widget_Preview::on_zoom_entry_activated()
else entry->set_text(str.substr(first, last - first) + "%");
- entry->set_position(-1);
+ //release the focus to enable accelerator keys
+ preview_window.grab_focus();
}
void Widget_Preview::hide_toolbar()
@@ -1082,6 +1085,7 @@ void Widget_Preview::hide_toolbar()
toolbar->hide();
toolbarisshown = 0;
+ //release the focus to enable accelerator keys
preview_window.grab_focus();
}
@@ -1094,7 +1098,6 @@ void Widget_Preview::show_toolbar()
}
//shortcut keys TODO: customizable shortcut keys would be awesome.
-
bool studio::Widget_Preview::on_key_pressed(GdkEventKey *ev)
{
//hide and show toolbar
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl