summaryrefslogtreecommitdiffstats
path: root/src/toolbars/navigation
diff options
context:
space:
mode:
Diffstat (limited to 'src/toolbars/navigation')
-rw-r--r--src/toolbars/navigation/main-menu.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c
index 13c7cc2..7ff3935 100644
--- a/src/toolbars/navigation/main-menu.c
+++ b/src/toolbars/navigation/main-menu.c
@@ -163,8 +163,8 @@ quit_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqMainMenu *main_menu)
g_signal_connect(buttons[Y * BUTTON_COLS + X], "clicked", \
G_CALLBACK(CB), main_menu)
-static void
-menu_clicked_cb(MqMainMenu *main_menu)
+static GtkWidget *
+create_main_grid(MqMainMenu *main_menu)
{
GtkWidget *grid;
GtkWidget *buttons[BUTTON_ROWS * BUTTON_COLS];
@@ -215,12 +215,7 @@ menu_clicked_cb(MqMainMenu *main_menu)
CLICKED_CB(4, 1, about_clicked_cb);
CLICKED_CB(4, 2, quit_clicked_cb);
- /* Set up the popover. */
- main_menu->popover = gtk_popover_new(GTK_WIDGET(main_menu));
- gtk_container_add(GTK_CONTAINER(main_menu->popover), grid);
-
- /* NB: gtk_popover_popup() is new in GTK+ 3.22. */
- gtk_widget_show_all(main_menu->popover);
+ return grid;
}
#undef BUTTON_ROWS
@@ -229,6 +224,24 @@ menu_clicked_cb(MqMainMenu *main_menu)
#undef CLICKED_CB
static void
+menu_clicked_cb(MqMainMenu *main_menu)
+{
+ GtkWidget *box;
+
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+
+ gtk_box_pack_start(GTK_BOX(box), create_main_grid(main_menu),
+ FALSE, FALSE, 0);
+
+ /* Set up the popover. */
+ main_menu->popover = gtk_popover_new(GTK_WIDGET(main_menu));
+ gtk_container_add(GTK_CONTAINER(main_menu->popover), box);
+
+ /* NB: gtk_popover_popup() is new in GTK+ 3.22. */
+ gtk_widget_show_all(main_menu->popover);
+}
+
+static void
get_property(GObject *object, guint property_id, GValue *value,
GParamSpec *param_spec)
{