提交 9068f20d 编写于 作者: C Cole Robinson 提交者: Gerd Hoffmann

gtk: Don't use deprecated gtk_image_menu_item_new_with_mnemonic

In these cases we weren't using an image in the menu item anyways, so
just do as the suggestion says. Should be fine for all qemu supported
gtk versions.

ui/gtk.c: In function ‘gd_create_menu_machine’:
ui/gtk.c:1284:5: error: ‘gtk_image_menu_item_new_with_mnemonic’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:76): Use 'gtk_menu_item_new_with_mnemonic' instead [-Werror=deprecated-declarations]
     s->reset_item = gtk_image_menu_item_new_with_mnemonic(_("_Reset"));
     ^
ui/gtk.c:1287:5: error: ‘gtk_image_menu_item_new_with_mnemonic’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:76): Use 'gtk_menu_item_new_with_mnemonic' instead [-Werror=deprecated-declarations]
     s->powerdown_item = gtk_image_menu_item_new_with_mnemonic(_("Power _Down"));
Signed-off-by: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 a3f4d63d
......@@ -1362,10 +1362,10 @@ static GtkWidget *gd_create_menu_machine(GtkDisplayState *s, GtkAccelGroup *acce
separator = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(machine_menu), separator);
s->reset_item = gtk_image_menu_item_new_with_mnemonic(_("_Reset"));
s->reset_item = gtk_menu_item_new_with_mnemonic(_("_Reset"));
gtk_menu_shell_append(GTK_MENU_SHELL(machine_menu), s->reset_item);
s->powerdown_item = gtk_image_menu_item_new_with_mnemonic(_("Power _Down"));
s->powerdown_item = gtk_menu_item_new_with_mnemonic(_("Power _Down"));
gtk_menu_shell_append(GTK_MENU_SHELL(machine_menu), s->powerdown_item);
separator = gtk_separator_menu_item_new();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册