diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-03 14:58:59 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-03 14:58:59 (EDT) |
commit | c7e81ecc057ebdfb6cacc930bbb6b59c9cd3a471 (patch) | |
tree | 4c135de379a9a023ea4bd4f4c5c603ab7c37744c /src | |
parent | cfef9428c14c7e4c54a0c97db657d1b4f2da2e82 (diff) | |
download | marquee-c7e81ecc057ebdfb6cacc930bbb6b59c9cd3a471.zip marquee-c7e81ecc057ebdfb6cacc930bbb6b59c9cd3a471.tar.gz marquee-c7e81ecc057ebdfb6cacc930bbb6b59c9cd3a471.tar.bz2 |
MqMainMenu: Add preferences button next to profile button
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbars/navigation/main-menu.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c index 9fc14bc..50c2cff 100644 --- a/src/toolbars/navigation/main-menu.c +++ b/src/toolbars/navigation/main-menu.c @@ -341,9 +341,11 @@ create_main_grid(MqMainMenu *main_menu) #undef CLICKED_CB static GtkWidget * -create_profile_buttons(MqMainMenu G_GNUC_UNUSED *main_menu) +create_profile_buttons(MqMainMenu *main_menu) { GtkWidget *profile_button; + GtkWidget *preferences_button; + GtkWidget *grid; profile_button = gtk_button_new(); gtk_button_set_image(GTK_BUTTON(profile_button), @@ -353,7 +355,21 @@ create_profile_buttons(MqMainMenu G_GNUC_UNUSED *main_menu) gtk_button_set_image_position(GTK_BUTTON(profile_button), GTK_POS_LEFT); gtk_button_set_always_show_image(GTK_BUTTON(profile_button), TRUE); - return profile_button; + preferences_button = gtk_button_new_from_icon_name( + "preferences-desktop", GTK_ICON_SIZE_BUTTON); + gtk_widget_set_tooltip_text(preferences_button, "Preferences"); + g_signal_connect(preferences_button, "clicked", + G_CALLBACK(preferences_clicked_cb), main_menu); + + /* Set up the grid. */ + grid = gtk_grid_new(); + gtk_grid_set_column_homogeneous(GTK_GRID(grid), TRUE); + gtk_style_context_add_class(gtk_widget_get_style_context(grid), + "linked"); + gtk_grid_attach(GTK_GRID(grid), profile_button, 0, 0, 2, 1); + gtk_grid_attach(GTK_GRID(grid), preferences_button, 2, 0, 1, 1); + + return grid; } static void |