Recent files: Disable mnemonic accelerator key for menu item

If recent file name contains underscore, menu item parses it as mnemonic accelerator. So disabled using underline for recent file menu item.

Change-Id: I1253a0103e750a14a69f0d064587e0eb56581b82
Reviewed-on: https://code.wireshark.org/review/8325
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jiří Engelthaler 2015-05-07 07:54:00 +02:00 committed by Anders Broman
parent f77e02ccc6
commit 7d0049c7fd
1 changed files with 8 additions and 0 deletions

View File

@ -3787,8 +3787,10 @@ add_recent_items (guint merge_id, GtkUIManager *ui_manager)
GtkActionGroup *action_group;
GtkAction *action;
GtkWidget *submenu_recent_files;
GtkWidget *submenu_recent_file;
GList *items, *l;
gchar *action_name;
gchar *recent_path;
guint i;
/* Reset the recent files list in the welcome screen */
@ -3855,9 +3857,15 @@ add_recent_items (guint merge_id, GtkUIManager *ui_manager)
GTK_UI_MANAGER_MENUITEM,
FALSE);
/* Disable mnemonic accelerator key for recent file name */
recent_path = g_strdup_printf ("/Menubar/FileMenu/OpenRecent/RecentFiles/recent-info-%u", i);
submenu_recent_file = gtk_ui_manager_get_widget(ui_manager, recent_path);
g_object_set(G_OBJECT (submenu_recent_file), "use-underline", 0);
/* Add the file name to the recent files list on the Welcome screen */
main_welcome_add_recent_capture_file(item_name, G_OBJECT(action));
g_free (recent_path);
g_free (action_name);
}
/* Add a Separator */