]> Pileus Git - ~andy/gtk/commitdiff
tests: Add test for mnemonics in GtkMenuButton
authorBastien Nocera <hadess@hadess.net>
Mon, 10 Sep 2012 16:38:35 +0000 (17:38 +0100)
committerBastien Nocera <hadess@hadess.net>
Mon, 10 Sep 2012 16:39:27 +0000 (17:39 +0100)
To check https://bugzilla.gnome.org/show_bug.cgi?id=680962

tests/testmenubutton.c

index b7d5b5265b64ee2f76eb57d482f2ecca3506096c..e4775ba580cabc9daf4c9fdd5afd16441afbf395 100644 (file)
@@ -37,8 +37,8 @@ int main (int argc, char **argv)
                GtkWidget *item;
                char *label;
 
-               label = g_strdup_printf ("Item %d", i);
-               item = gtk_menu_item_new_with_label (label);
+               label = g_strdup_printf ("Item _%d", i);
+               item = gtk_menu_item_new_with_mnemonic (label);
                g_free (label);
                gtk_menu_attach (GTK_MENU (menu_widget),
                                 item,
@@ -59,7 +59,7 @@ int main (int argc, char **argv)
        menu = g_menu_new ();
        for (i = 5; i > 0; i--) {
                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_free (label);
        }