forked from osmocom/wireshark
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:
parent
f77e02ccc6
commit
7d0049c7fd
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue