mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
tests: Add test for mnemonics in GtkMenuButton
To check https://bugzilla.gnome.org/show_bug.cgi?id=680962
This commit is contained in:
parent
42f953eead
commit
4519fb53fc
@ -37,8 +37,8 @@ int main (int argc, char **argv)
|
|||||||
GtkWidget *item;
|
GtkWidget *item;
|
||||||
char *label;
|
char *label;
|
||||||
|
|
||||||
label = g_strdup_printf ("Item %d", i);
|
label = g_strdup_printf ("Item _%d", i);
|
||||||
item = gtk_menu_item_new_with_label (label);
|
item = gtk_menu_item_new_with_mnemonic (label);
|
||||||
g_free (label);
|
g_free (label);
|
||||||
gtk_menu_attach (GTK_MENU (menu_widget),
|
gtk_menu_attach (GTK_MENU (menu_widget),
|
||||||
item,
|
item,
|
||||||
@ -59,7 +59,7 @@ int main (int argc, char **argv)
|
|||||||
menu = g_menu_new ();
|
menu = g_menu_new ();
|
||||||
for (i = 5; i > 0; i--) {
|
for (i = 5; i > 0; i--) {
|
||||||
char *label;
|
char *label;
|
||||||
label = g_strdup_printf ("Item %d", i);
|
label = g_strdup_printf ("Item _%d", i);
|
||||||
g_menu_insert (menu, i - 1, label, NULL);
|
g_menu_insert (menu, i - 1, label, NULL);
|
||||||
g_free (label);
|
g_free (label);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user