diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/.cvsignore | 1 | ||||
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/test-nautilus-label-offset.c | 77 | ||||
-rw-r--r-- | test/test.h | 3 |
4 files changed, 83 insertions, 0 deletions
diff --git a/test/.cvsignore b/test/.cvsignore index f451ac77a..c581511e1 100644 --- a/test/.cvsignore +++ b/test/.cvsignore @@ -18,6 +18,7 @@ test-nautilus-label test-nautilus-label-background test-nautilus-label-flavorful test-nautilus-label-scrolled +test-nautilus-label-offset test-nautilus-label-simple test-nautilus-label-wrapped test-nautilus-mime-actions diff --git a/test/Makefile.am b/test/Makefile.am index db9d7c696..4f4de40f0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -41,6 +41,7 @@ noinst_PROGRAMS =\ test-nautilus-label \ test-nautilus-label-background \ test-nautilus-label-flavorful \ + test-nautilus-label-offset \ test-nautilus-label-scrolled \ test-nautilus-label-simple \ test-nautilus-label-wrapped \ @@ -66,6 +67,7 @@ test_nautilus_image_tile_SOURCES = test-nautilus-image-tile.c test.c test_nautilus_label_SOURCES = test-nautilus-label.c test_nautilus_label_background_SOURCES = test-nautilus-label-background.c test.c test_nautilus_label_flavorful_SOURCES = test-nautilus-label-flavorful.c +test_nautilus_label_offset_SOURCES = test-nautilus-label-offset.c test.c test_nautilus_label_scrolled_SOURCES = test-nautilus-label-scrolled.c test.c test_nautilus_label_simple_SOURCES = test-nautilus-label-simple.c test_nautilus_label_wrapped_SOURCES = test-nautilus-label-wrapped.c diff --git a/test/test-nautilus-label-offset.c b/test/test-nautilus-label-offset.c new file mode 100644 index 000000000..27f6add1e --- /dev/null +++ b/test/test-nautilus-label-offset.c @@ -0,0 +1,77 @@ +#include <config.h> + +#include "test.h" + +int +main (int argc, char* argv[]) +{ + GtkWidget *window; + GtkWidget *frame; + GtkWidget *pixmap; + GtkWidget *hbox; + GtkWidget *vbox; + GtkWidget *text; + GtkWidget *main_box; + char *file_name; + + test_init (&argc, &argv); + + window = test_window_new ("Caveat", 10); + main_box = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), main_box); + gtk_widget_show (main_box); + gtk_container_set_border_width (GTK_CONTAINER (window), GNOME_PAD); + gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE); + gtk_window_set_wmclass (GTK_WINDOW (window), "caveat", "Nautilus"); + + hbox = gtk_hbox_new (FALSE, GNOME_PAD); + gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD); + gtk_widget_show (hbox); + gtk_box_pack_start (GTK_BOX (main_box), + hbox, + FALSE, FALSE, 0); + + vbox = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox); + gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); + + file_name = nautilus_pixmap_file ("About_Image.png"); + if (file_name != NULL) { + pixmap = nautilus_image_new (file_name); + g_free (file_name); + + if (pixmap != NULL) { + frame = gtk_frame_new (NULL); + gtk_widget_show (frame); + gtk_frame_set_shadow_type (GTK_FRAME (frame), + GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (vbox), frame, + FALSE, FALSE, 0); + + gtk_widget_show (pixmap); + gtk_container_add (GTK_CONTAINER (frame), pixmap); + } + } + + text = nautilus_label_new + (_("Thank you for your interest in Nautilus.\n " + "\n" + "As with any software under development, you should exercise caution when " + "using Nautilus. Eazel does not provide any guarantee that it will work " + "properly, or assume any liability for your use of it. Please use it at your " + "own risk.\n" + "\n" + "Please visit http://www.eazel.com/feedback.html to provide feedback, " + "comments, and suggestions.")); + nautilus_label_make_larger (NAUTILUS_LABEL (text), 1); + nautilus_label_set_justify (NAUTILUS_LABEL (text), GTK_JUSTIFY_LEFT); + nautilus_label_set_wrap (NAUTILUS_LABEL (text), TRUE); + gtk_widget_show (text); + gtk_box_pack_start (GTK_BOX (hbox), text, FALSE, FALSE, 0); + + gtk_widget_show_all (GTK_WIDGET (window)); + + gtk_main (); + + return 0; +} diff --git a/test/test.h b/test/test.h index 69b6204cd..4517cbb9e 100644 --- a/test/test.h +++ b/test/test.h @@ -4,6 +4,7 @@ #include <config.h> #include <gtk/gtk.h> +#include <gnome.h> #include <libgnomevfs/gnome-vfs-init.h> #include <libnautilus-extensions/nautilus-art-extensions.h> @@ -14,6 +15,7 @@ #include <libnautilus-extensions/nautilus-gdk-extensions.h> #include <libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h> #include <libnautilus-extensions/nautilus-glib-extensions.h> +#include <libnautilus-extensions/nautilus-gnome-extensions.h> #include <libnautilus-extensions/nautilus-gtk-extensions.h> #include <libnautilus-extensions/nautilus-image-with-background.h> #include <libnautilus-extensions/nautilus-image.h> @@ -21,6 +23,7 @@ #include <libnautilus-extensions/nautilus-label.h> #include <libnautilus-extensions/nautilus-string-list.h> #include <libnautilus-extensions/nautilus-string.h> +#include <libnautilus-extensions/nautilus-file-utilities.h> void test_init (int *argc, char ***argv); |