[Xfce4-commits] <ristretto:master> Add 'F' as another accelerator for fullscreen, fix bug #7817
Stephan Arts
noreply at xfce.org
Wed Sep 21 21:32:01 CEST 2011
Updating branch refs/heads/master
to ad23e1158d78bb54977971d9ab8718f407afa87e (commit)
from c8fbb5a46307dcfe7e4ffd8f69cdee18864c2b2f (commit)
commit ad23e1158d78bb54977971d9ab8718f407afa87e
Author: Stephan Arts <stephan at xfce.org>
Date: Wed Sep 21 21:29:06 2011 +0200
Add 'F' as another accelerator for fullscreen, fix bug #7817
src/main_window.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/main_window.c b/src/main_window.c
index ebca286..0132984 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -393,6 +393,7 @@ rstto_main_window_init (RsttoMainWindow *window)
RsttoWallpaperManager *wallpaper_manager = NULL;
gchar *desktop_type = NULL;
+ GClosure *toggle_fullscreen_closure = g_cclosure_new ((GCallback)cb_rstto_main_window_fullscreen, window, NULL);
GClosure *leave_fullscreen_closure = g_cclosure_new_swap ((GCallback)gtk_window_unfullscreen, window, NULL);
GClosure *next_image_closure = g_cclosure_new ((GCallback)cb_rstto_main_window_next_image, window, NULL);
GClosure *previous_image_closure = g_cclosure_new ((GCallback)cb_rstto_main_window_previous_image, window, NULL);
@@ -439,12 +440,14 @@ rstto_main_window_init (RsttoMainWindow *window)
accel_group = gtk_ui_manager_get_accel_group (window->priv->ui_manager);
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
+ gtk_accel_group_connect_by_path (accel_group, "<Window>/fullscreen", toggle_fullscreen_closure);
gtk_accel_group_connect_by_path (accel_group, "<Window>/unfullscreen", leave_fullscreen_closure);
gtk_accel_group_connect_by_path (accel_group, "<Window>/next-image", next_image_closure);
gtk_accel_group_connect_by_path (accel_group, "<Window>/previous-image", previous_image_closure);
gtk_accel_group_connect_by_path (accel_group, "<Window>/quit", quit_closure);
/* Set default accelerators */
+ gtk_accel_map_change_entry ("<Window>/fullscreen", GDK_F, 0, FALSE);
gtk_accel_map_change_entry ("<Window>/unfullscreen", GDK_Escape, 0, FALSE);
gtk_accel_map_change_entry ("<Window>/next-image", GDK_Page_Down, 0, FALSE);
gtk_accel_map_change_entry ("<Window>/previous-image", GDK_Page_Up, 0, FALSE);
More information about the Xfce4-commits
mailing list