X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-window.c;h=0b4f849906900225de653b83f21d8976818633ec;hb=dafad623b1c0f184142ce09a51882fa967d7eb09;hp=194f4d0fc52162eebff17a91bb48917f410c091d;hpb=4bdeb5032c190279409ac03af0527464bed1b354;p=modest diff --git a/src/widgets/modest-window.c b/src/widgets/modest-window.c index 194f4d0..0b4f849 100644 --- a/src/widgets/modest-window.c +++ b/src/widgets/modest-window.c @@ -31,6 +31,8 @@ #include "modest-window-priv.h" #include "modest-ui-actions.h" #include "modest-tny-platform-factory.h" +#include "modest-runtime.h" +#include "modest-window-mgr.h" /* 'private'/'protected' functions */ static void modest_window_class_init (ModestWindowClass *klass); @@ -317,17 +319,25 @@ on_key_pressed (GtkWidget *self, GdkEventKey *event, gpointer user_data) { + ModestWindowMgr *mgr = NULL; + + mgr = modest_runtime_get_window_mgr (); + switch (event->keyval) { - case GDK_F6: + case GDK_F6: modest_ui_actions_on_change_fullscreen (NULL, MODEST_WINDOW(self)); - break; + return TRUE; case GDK_F7: modest_ui_actions_on_zoom_plus (NULL, MODEST_WINDOW(self)); - break; + return TRUE; case GDK_F8: modest_ui_actions_on_zoom_minus (NULL, MODEST_WINDOW(self)); + return TRUE; + case GDK_Escape: + if (modest_window_mgr_get_fullscreen_mode (mgr)) + modest_ui_actions_on_change_fullscreen (NULL, MODEST_WINDOW(self)); break; } - return TRUE; + return FALSE; }