17908043da
Fix crash when restoring from snapshot (bz #1085632)
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 6b4fcd4bb73c86c7754bcc912a557ba62180ae0b Mon Sep 17 00:00:00 2001
|
|
From: Cole Robinson <crobinso@redhat.com>
|
|
Date: Wed, 19 Mar 2014 14:57:27 -0400
|
|
Subject: [PATCH] Change gtk quit accelerator to ctrl+shift+q (bz 1062393)
|
|
|
|
Similar patches queued for 2.1
|
|
---
|
|
ui/gtk.c | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/ui/gtk.c b/ui/gtk.c
|
|
index 00fbbcc..264326a 100644
|
|
--- a/ui/gtk.c
|
|
+++ b/ui/gtk.c
|
|
@@ -1351,7 +1351,6 @@ static GtkWidget *gd_create_menu_machine(GtkDisplayState *s, GtkAccelGroup *acce
|
|
{
|
|
GtkWidget *machine_menu;
|
|
GtkWidget *separator;
|
|
- GtkStockItem item;
|
|
|
|
machine_menu = gtk_menu_new();
|
|
gtk_menu_set_accel_group(GTK_MENU(machine_menu), accel_group);
|
|
@@ -1371,11 +1370,11 @@ 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->quit_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, NULL);
|
|
- gtk_stock_lookup(GTK_STOCK_QUIT, &item);
|
|
+ s->quit_item = gtk_menu_item_new_with_mnemonic(_("_Quit"));
|
|
gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->quit_item),
|
|
"<QEMU>/Machine/Quit");
|
|
- gtk_accel_map_add_entry("<QEMU>/Machine/Quit", item.keyval, item.modifier);
|
|
+ gtk_accel_map_add_entry("<QEMU>/Machine/Quit",
|
|
+ GDK_KEY_q, HOTKEY_MODIFIERS);
|
|
gtk_menu_shell_append(GTK_MENU_SHELL(machine_menu), s->quit_item);
|
|
|
|
return machine_menu;
|