diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-05-30 14:45:24 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-05-30 14:45:24 -0400 |
commit | 2baba250b8b7fe27b22065039d7978fcde0185e1 (patch) | |
tree | b988ac65980973a5b6806a27b91830490b0c303b /tests | |
parent | dbf44fdf2a264c663ab6a6f2fa486597438990e3 (diff) | |
download | gtk+-2baba250b8b7fe27b22065039d7978fcde0185e1.tar.gz |
Revert "gtkmenubutton: Add menu button widget"
This reverts commit 9d35f7e5121c863685375d1afb7e14e886e46348.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rw-r--r-- | tests/testmenubutton.c | 78 |
2 files changed, 0 insertions, 84 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 567e46ca8c..c3a6ac0476 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -67,7 +67,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \ testkineticscrolling \ testlockbutton \ testmenubars \ - testmenubutton \ testmountoperation \ testmultidisplay \ testmultiscreen \ @@ -187,7 +186,6 @@ testimage_DEPENDENCIES = $(TEST_DEPS) testkineticscrolling_DEPENDENCIES = $(TEST_DEPS) testlockbutton_DEPENDENCIES = $(TEST_DEPS) testmenubars_DEPENDENCIES = $(TEST_DEPS) -testmenubutton_DEPENDENCIES = $(TEST_DEPS) testmountoperation_DEPENDENCIES = $(TEST_DEPS) testmultidisplay_DEPENDENCIES = $(TEST_DEPS) testmultiscreen_DEPENDENCIES = $(TEST_DEPS) @@ -307,10 +305,6 @@ testtoolbar_SOURCES = \ testtoolbar.c \ prop-editor.c -testmenubutton_SOURCES = \ - testmenubutton.c \ - prop-editor.c - testprint_SOURCES = \ testprint.c \ testprintfileoperation.h \ diff --git a/tests/testmenubutton.c b/tests/testmenubutton.c deleted file mode 100644 index cf48b2e5ec..0000000000 --- a/tests/testmenubutton.c +++ /dev/null @@ -1,78 +0,0 @@ -#include <gtk/gtk.h> -#include "prop-editor.h" - -int main (int argc, char **argv) -{ - GtkWidget *window; - GtkWidget *button; - GtkWidget *grid; - GtkWidget *entry; - GtkWidget *menu_widget; - guint i; - GMenu *menu; - - gtk_init (&argc, &argv); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_resize (GTK_WINDOW (window), 400, 300); - - grid = gtk_grid_new (); - gtk_container_add (GTK_CONTAINER (window), grid); - - /* Button next to entry */ - entry = gtk_entry_new (); - gtk_grid_attach (GTK_GRID (grid), - entry, - 0, 0, - 1, 1); - button = gtk_menu_button_new (); - gtk_grid_attach (GTK_GRID (grid), - button, - 1, 0, - 1, 1); - - /* Button with GtkMenu */ - menu_widget = gtk_menu_new (); - for (i = 5; i > 0; i--) { - GtkWidget *item; - char *label; - - label = g_strdup_printf ("Item %d", i); - item = gtk_menu_item_new_with_label (label); - g_free (label); - gtk_menu_attach (GTK_MENU (menu_widget), - item, - 0, 1, - i - 1, i); - } - gtk_widget_show_all (menu_widget); - - button = gtk_menu_button_new (); - gtk_menu_button_set_menu (GTK_MENU_BUTTON (button), menu_widget); - gtk_grid_attach (GTK_GRID (grid), - button, - 1, 1, - 1, 1); - gtk_widget_show (create_prop_editor (G_OBJECT (button), 0)); - - /* Button with GMenuModel */ - menu = g_menu_new (); - for (i = 5; i > 0; i--) { - char *label; - label = g_strdup_printf ("Item %d", i); - g_menu_insert (menu, i - 1, label, NULL); - g_free (label); - } - button = gtk_menu_button_new (); - gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), G_MENU_MODEL (menu)); - gtk_grid_attach (GTK_GRID (grid), - button, - 1, 2, - 1, 1); - - gtk_widget_show_all (window); - - gtk_main (); - - return 0; -} |