diff options
author | Mathieu Lacage <mathieu@eazel.com> | 2000-09-18 00:48:37 +0000 |
---|---|---|
committer | Mathieu Lacage <mathieu@src.gnome.org> | 2000-09-18 00:48:37 +0000 |
commit | e9e4d6ddca116806ae680a42f6153459088895df (patch) | |
tree | b0560872410626abb4fd65d799cd29621600a7c7 /test | |
parent | bda09ed1ea2285277b880336f58d42832caad905 (diff) | |
download | nautilus-e9e4d6ddca116806ae680a42f6153459088895df.tar.gz |
make it check if a target is begin copied into itself before doing the
2000-09-17 Mathieu Lacage <mathieu@eazel.com>
* src/file-manager/fm-list-view.c: (fm_list_receive_dropped_icons):
make it check if a target is begin copied into itself before doing
the actual file operation. ie: bug 3085
* test/Makefile.am: add brand new test I used in my quest for bug
1963
* test/test-nautilus-background.c: (main): the actual test :)
run and you will see beautiful background.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 61 | ||||
-rw-r--r-- | test/test-nautilus-background.c | 46 |
2 files changed, 78 insertions, 29 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index ec76ff214..cb63c6b3c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,41 +1,43 @@ NULL= INCLUDES =\ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_builddir)/libnautilus \ - $(BONOBO_CFLAGS) \ - $(OAF_CFLAGS) \ - $(GCONF_CFLAGS) \ - $(GNOMEUI_CFLAGS) \ - $(VFS_CFLAGS) \ - $(XML_CFLAGS) \ - -DVERSION="\"$(VERSION)\"" \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_builddir)/libnautilus \ + $(BONOBO_CFLAGS) \ + $(OAF_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(GNOMEUI_CFLAGS) \ + $(VFS_CFLAGS) \ + $(XML_CFLAGS) \ + -DVERSION="\"$(VERSION)\"" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ $(NULL) +# -DBACKGROUNDS_DIR=\""$(top_srcdir)/data/backgrounds"\" \ LDADD =\ - $(top_builddir)/libnautilus/libnautilus.la \ - $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ - $(BONOBO_LIBS) \ - $(OAF_LIBS) \ - $(GCONF_LIBS) \ - $(GNOMEUI_LIBS) \ - $(VFS_LIBS) \ - $(XML_LIBS) \ + $(top_builddir)/libnautilus/libnautilus.la \ + $(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \ + $(BONOBO_LIBS) \ + $(OAF_LIBS) \ + $(GCONF_LIBS) \ + $(GNOMEUI_LIBS) \ + $(VFS_LIBS) \ + $(XML_LIBS) \ $(NULL) noinst_PROGRAMS =\ - test-nautilus-font \ - test-nautilus-font-picker \ - test-nautilus-image \ - test-nautilus-label \ - test-nautilus-mime-actions \ - test-nautilus-mime-actions-set \ - test-nautilus-password-dialog \ - test-nautilus-preferences \ - test-nautilus-widgets \ + test-nautilus-font \ + test-nautilus-font-picker \ + test-nautilus-image \ + test-nautilus-label \ + test-nautilus-mime-actions \ + test-nautilus-mime-actions-set \ + test-nautilus-password-dialog \ + test-nautilus-preferences \ + test-nautilus-widgets \ + test-nautilus-background \ $(NULL) test_nautilus_font_SOURCES = test-nautilus-font.c @@ -47,6 +49,7 @@ test_nautilus_mime_actions_set_SOURCES = test-nautilus-mime-actions-set.c test_nautilus_password_dialog_SOURCES = test-nautilus-password-dialog.c test_nautilus_preferences_SOURCES = test-nautilus-preferences.c test_nautilus_widgets_SOURCES = test-nautilus-widgets.c +test_nautilus_background_SOURCES = test-nautilus-background.c EXTRA_DIST =\ font-test.sh \ diff --git a/test/test-nautilus-background.c b/test/test-nautilus-background.c new file mode 100644 index 000000000..6fa22c27f --- /dev/null +++ b/test/test-nautilus-background.c @@ -0,0 +1,46 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +#include <libnautilus-extensions/nautilus-background.h> +#include <libgnomevfs/gnome-vfs-init.h> +#include <gtk/gtk.h> + +#define BACKGROUNDS_DIR "/gnome-source/nautilus/data/backgrounds" + +int +main (int argc, char *argv[]) +{ + GtkWidget *window, *ctree; + NautilusBackground *background; + char *image_uri; + char *titles[] = { "test 1", "test 2", "test 3"}; + + gtk_init (&argc, &argv); + + gnome_vfs_init (); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + ctree = gtk_ctree_new_with_titles (3, 2, titles); +#if 0 + gtk_container_add (GTK_CONTAINER (window), ctree); +#endif + gtk_signal_connect (GTK_OBJECT (window), "destroy", + gtk_main_quit, NULL); + + background = nautilus_get_widget_background (window); + + nautilus_background_set_color (background, + "red-blue:h"); + + image_uri = g_strconcat ("file://", BACKGROUNDS_DIR, "/50s.png", NULL); + +#if 1 + nautilus_background_set_image_uri (background, image_uri); +#endif + g_free (image_uri); + + + gtk_widget_show_all (window); + gtk_main (); + + return 0; +} |