X-Git-Url: http://git.code-monkey.de/?p=raktpdf.git;a=blobdiff_plain;f=src%2Frakt-window.c;h=24fcf50e8e68a44bba9279cd078447d69022de2d;hp=59dfca47a2aa9a44a028472359e405d8e0e71d3d;hb=297bbab4cf70d7b1720b337ebb3b03d03707859e;hpb=63bf23cdcb107e0ff61f0eda0ebfcc264877defe diff --git a/src/rakt-window.c b/src/rakt-window.c index 59dfca4..24fcf50 100644 --- a/src/rakt-window.c +++ b/src/rakt-window.c @@ -30,9 +30,7 @@ #include "rakt-window.h" -typedef struct RaktWindowPriv RaktWindowPriv; - -struct RaktWindowPriv { +typedef struct { GtkWidget *content_vbox; /* Menu & toolbar */ @@ -44,7 +42,7 @@ struct RaktWindowPriv { GdkPixbuf *pixbuf; PopplerDocument *document; gint page_no; -}; +} RaktWindowPriv; static void window_finalize (GObject *object); @@ -60,6 +58,9 @@ static const GtkActionEntry action_entries[] = { { "FileMenu", NULL, "_File", NULL, NULL, NULL }, + { + "GoMenu", NULL, "_Go", NULL, NULL, NULL + }, { "HelpMenu", NULL, "_Help", NULL, NULL, NULL }, @@ -98,6 +99,10 @@ static const gchar *ui_layout = " " " " " " + " " + " " + " " + " " " " " " " " @@ -178,6 +183,7 @@ window_create_menu (RaktWindow *window) { RaktWindowPriv *priv; GtkActionGroup *action_group; + GtkAccelGroup *accel_group; GError *error = NULL; priv = GET_PRIV (window); @@ -193,6 +199,10 @@ window_create_menu (RaktWindow *window) gtk_action_group_add_actions (action_group, action_entries, G_N_ELEMENTS (action_entries), window); gtk_ui_manager_insert_action_group (priv->ui_manager, action_group, 0); + + accel_group = gtk_ui_manager_get_accel_group (priv->ui_manager); + gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); + g_object_unref (action_group); gtk_ui_manager_add_ui_from_string (priv->ui_manager, ui_layout, -1, &error);