diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-07-25 11:37:50 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-07-25 19:35:35 +0200 |
commit | 1ad357964e6d4e33a3fa4301245318e6e080385f (patch) | |
tree | 0b7658e91ac90a377507273c79c5a21bfec94193 /test | |
parent | 6feed0a28d927a98aa5b09bc6622de1fc146387b (diff) | |
download | nautilus-1ad357964e6d4e33a3fa4301245318e6e080385f.tar.gz |
[eel] remove unused EelLabeledImage
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 5 | ||||
-rw-r--r-- | test/test-eel-labeled-image.c | 79 | ||||
-rw-r--r-- | test/test-nautilus-wrap-table.c | 96 |
3 files changed, 0 insertions, 180 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 89c1d9ab0..c19400f32 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,28 +15,23 @@ LDADD =\ $(NULL) noinst_PROGRAMS =\ - test-nautilus-wrap-table \ test-nautilus-search-engine \ test-nautilus-directory-async \ test-nautilus-copy \ test-eel-background \ test-eel-editable-label \ test-eel-image-scrolled \ - test-eel-labeled-image \ test-eel-pixbuf-scale \ $(NULL) test_nautilus_copy_SOURCES = test-copy.c test.c -test_nautilus_wrap_table_SOURCES = test-nautilus-wrap-table.c test.c - test_nautilus_search_engine_SOURCES = test-nautilus-search-engine.c test_nautilus_directory_async_SOURCES = test-nautilus-directory-async.c test_eel_background_SOURCES = test-eel-background.c test_eel_image_scrolled_SOURCES = test-eel-image-scrolled.c test.c test.h -test_eel_labeled_image_SOURCES = test-eel-labeled-image.c test.c test.h test_eel_pixbuf_scale_SOURCES = test-eel-pixbuf-scale.c test.c test.h EXTRA_DIST = \ diff --git a/test/test-eel-labeled-image.c b/test/test-eel-labeled-image.c deleted file mode 100644 index 14789ac26..000000000 --- a/test/test-eel-labeled-image.c +++ /dev/null @@ -1,79 +0,0 @@ -#include "test.h" - -#include <eel/eel-labeled-image.h> - - -static const char pixbuf_name[] = "/usr/share/pixmaps/gnome-globe.png"; - -static void -button_callback (GtkWidget *button, - gpointer callback_data) -{ - const char *info = callback_data; - g_return_if_fail (GTK_IS_BUTTON (button)); - - g_print ("%s(%p)\n", info, button); -} - -static GtkWidget * -labeled_image_button_window_new (const char *title, - GdkPixbuf *pixbuf) -{ - GtkWidget *window; - GtkWidget *vbox; - GtkWidget *button; - GtkWidget *toggle_button; - GtkWidget *check_button; - GtkWidget *plain; - - window = test_window_new (title, 20); - vbox = gtk_vbox_new (FALSE, 10); - gtk_container_add (GTK_CONTAINER (window), vbox); - - if (1) button = eel_labeled_image_button_new ("GtkButton with LabeledImage", pixbuf); - if (1) toggle_button = eel_labeled_image_toggle_button_new ("GtkToggleButton with LabeledImage", pixbuf); - if (1) check_button = eel_labeled_image_check_button_new ("GtkCheckButton with LabeledImage", pixbuf); - if (1) { - plain = eel_labeled_image_new ("Plain LabeledImage", pixbuf); - eel_labeled_image_set_can_focus (EEL_LABELED_IMAGE (plain), TRUE); - } - - if (button) gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); - if (toggle_button) gtk_box_pack_start (GTK_BOX (vbox), toggle_button, TRUE, TRUE, 0); - if (check_button) gtk_box_pack_start (GTK_BOX (vbox), check_button, TRUE, TRUE, 0); - if (plain) gtk_box_pack_start (GTK_BOX (vbox), plain, TRUE, TRUE, 0); - - if (button) { - g_signal_connect (button, "enter", G_CALLBACK (button_callback), "enter"); - g_signal_connect (button, "leave", G_CALLBACK (button_callback), "leave"); - g_signal_connect (button, "pressed", G_CALLBACK (button_callback), "pressed"); - g_signal_connect (button, "released", G_CALLBACK (button_callback), "released"); - g_signal_connect (button, "clicked", G_CALLBACK (button_callback), "clicked"); - } - - gtk_widget_show_all (vbox); - - return window; -} - -int -main (int argc, char* argv[]) -{ - GtkWidget *labeled_image_window = NULL; - GtkWidget *labeled_image_button_window = NULL; - GdkPixbuf *pixbuf = NULL; - - test_init (&argc, &argv); - - if (1) pixbuf = test_pixbuf_new_named (pixbuf_name, 1.0); - if (1) labeled_image_button_window = labeled_image_button_window_new ("LabeledImage in GtkButton Test", pixbuf); - - eel_gdk_pixbuf_unref_if_not_null (pixbuf); - - if (labeled_image_window) gtk_widget_show (labeled_image_window); - if (labeled_image_button_window) gtk_widget_show (labeled_image_button_window); - - gtk_main (); - - return test_quit (EXIT_SUCCESS); -} diff --git a/test/test-nautilus-wrap-table.c b/test/test-nautilus-wrap-table.c deleted file mode 100644 index 7892b0166..000000000 --- a/test/test-nautilus-wrap-table.c +++ /dev/null @@ -1,96 +0,0 @@ -#include "test.h" - -#include <eel/eel-wrap-table.h> -#include <eel/eel-labeled-image.h> -#include <eel/eel-vfs-extensions.h> -#include <libnautilus-private/nautilus-customization-data.h> -#include <libnautilus-private/nautilus-icon-info.h> - -int -main (int argc, char* argv[]) -{ - NautilusCustomizationData *customization_data; - GtkWidget *window; - GtkWidget *emblems_table, *button, *scroller; - char *emblem_name, *stripped_name; - GdkPixbuf *pixbuf; - char *label; - - test_init (&argc, &argv); - - window = test_window_new ("Wrap Table Test", 10); - - gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); - - /* The emblems wrapped table */ - emblems_table = eel_wrap_table_new (TRUE); - - gtk_widget_show (emblems_table); - gtk_container_set_border_width (GTK_CONTAINER (emblems_table), 8); - - scroller = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - - /* Viewport */ - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scroller), - emblems_table); - - gtk_container_add (GTK_CONTAINER (window), scroller); - - gtk_widget_show (scroller); - -#if 0 - /* Get rid of default lowered shadow appearance. - * This must be done after the widget is realized, due to - * an apparent bug in gtk_viewport_set_shadow_type. - */ - g_signal_connect (GTK_BIN (scroller->child), - "realize", - remove_default_viewport_shadow, - NULL); -#endif - - - /* Use nautilus_customization to make the emblem widgets */ - customization_data = nautilus_customization_data_new ("emblems", TRUE, - NAUTILUS_ICON_SIZE_SMALL, - NAUTILUS_ICON_SIZE_SMALL); - - while (nautilus_customization_data_get_next_element_for_display (customization_data, - &emblem_name, - &pixbuf, - &label)) { - - stripped_name = eel_filename_strip_extension (emblem_name); - g_free (emblem_name); - - if (strcmp (stripped_name, "erase") == 0) { - g_object_unref (pixbuf); - g_free (label); - g_free (stripped_name); - continue; - } - - button = eel_labeled_image_check_button_new (label, pixbuf); - g_free (label); - g_object_unref (pixbuf); - - /* Attach parameters and signal handler. */ - g_object_set_data_full (G_OBJECT (button), - "nautilus_property_name", - stripped_name, - (GDestroyNotify) g_free); - - gtk_container_add (GTK_CONTAINER (emblems_table), button); - } - - gtk_widget_show_all (emblems_table); - - gtk_widget_show (window); - - gtk_main (); - - return 0; -} |