[gnome-robots/arnaudb/wip/gtk4: 15/33] Adapt to MenuButton API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-robots/arnaudb/wip/gtk4: 15/33] Adapt to MenuButton API.
- Date: Mon, 25 May 2020 20:27:21 +0000 (UTC)
commit f0b86fa95d4ac6191b2ca570da3f07086cb9322c
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon May 25 18:30:19 2020 +0200
Adapt to MenuButton API.
src/gnome-robots.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-robots.c b/src/gnome-robots.c
index efbe16a..e1af39a 100644
--- a/src/gnome-robots.c
+++ b/src/gnome-robots.c
@@ -342,7 +342,7 @@ create_category_from_key (const char *key, gpointer user_data)
static void
activate (GtkApplication *app, gpointer user_data)
{
- GtkWidget *errordialog, *vbox, *hbox, *label, *button, *gridframe, *icon;
+ GtkWidget *errordialog, *vbox, *hbox, *label, *button, *gridframe;
GMenu *appmenu;
GtkSizeGroup *size_group;
GtkStyleContext *style_context;
@@ -362,8 +362,7 @@ activate (GtkApplication *app, gpointer user_data)
appmenu = gtk_application_get_menu_by_id (app, "primary-menu");
button = gtk_menu_button_new ();
- icon = gtk_image_new_from_icon_name ("open-menu-symbolic", GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (button), icon);
+ gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (button), "open-menu-symbolic");
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), (GMenuModel *) appmenu);
gtk_widget_show (button);
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]