summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2001-11-21 08:34:57 +0000
committerMichael Meeks <mmeeks@src.gnome.org>2001-11-21 08:34:57 +0000
commit7a030297d96722f9c7255b46ea971d8c848d83e7 (patch)
tree01493597bd465a91f43ffee91bea0dcf086885ae /test
parent44af9fae6c0e1ab24a4a3314dd3a5ebb8285e8b0 (diff)
downloadnautilus-7a030297d96722f9c7255b46ea971d8c848d83e7.tar.gz
fix.
2001-11-21 Michael Meeks <michael@ximian.com> * test/test-nautilus-wrap-table.c (main): fix. * test/test-nautilus-mime-actions.c (main): upd. init. * test/test.c (test_init): upd. (test_label_new): kill tile_pixbuf support. (test_image_new): ditto. * test/test-nautilus-async-activation.c (main): upd. * test/Makefile.am: add CORE_CFLAGS, update LDADD. * libnautilus-private/nautilus-directory.c (nautilus_directory_destroy): rename to (nautilus_directory_dispose): this, but leave as a gtk object for now, double emission protect, move removal from directories list to head & split into: (nautilus_directory_finalize): here. * libnautilus-private/nautilus-directory-async.c (nautilus_directory_async_state_changed): fully remove GTK_OBJECT_DESTROYED check.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am3
-rw-r--r--test/test-nautilus-async-activation.c13
-rw-r--r--test/test-nautilus-mime-actions-set.c9
-rw-r--r--test/test-nautilus-mime-actions.c9
-rw-r--r--test/test-nautilus-smooth-graphics.c5
-rw-r--r--test/test-nautilus-wrap-table.c8
-rw-r--r--test/test.c26
-rw-r--r--test/test.h2
8 files changed, 18 insertions, 57 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index e90b85a61..1f3be9843 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,6 +2,7 @@ NULL=
INCLUDES =\
-I$(top_srcdir) \
+ $(CORE_CFLAGS) \
$(NAUTILUS_PRIVATE_CFLAGS) \
-DVERSION="\"$(VERSION)\"" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
@@ -11,7 +12,7 @@ INCLUDES =\
LDADD =\
$(top_builddir)/libnautilus/libnautilus.la \
$(top_builddir)/libnautilus-private/libnautilus-private.la \
- $(NAUTILUS_PRIVATE_LIBS) \
+ $(LIBNAUTILUS_PRIVATE_LIBS) \
$(NULL)
noinst_PROGRAMS =\
diff --git a/test/test-nautilus-async-activation.c b/test/test-nautilus-async-activation.c
index 7a1efa51e..8969ec374 100644
--- a/test/test-nautilus-async-activation.c
+++ b/test/test-nautilus-async-activation.c
@@ -26,9 +26,7 @@
#include <gtk/gtk.h>
#include <libnautilus-private/nautilus-bonobo-extensions.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-main.h>
-#include <liboaf/oaf-mainloop.h>
+#include <libbonoboui.h>
#define IID "OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f"
@@ -60,15 +58,12 @@ main (int argc, char *argv[])
GtkWidget *window;
NautilusBonoboActivationHandle *handle;
- gtk_init (&argc, &argv);
- bonobo_activation_init (argc, argv);
- bonobo_init (bonobo_orb (),
- bonobo_poa (),
- bonobo_poa_manager ());
+ bonobo_ui_init ("test-nautilus-activation-async",
+ "1.0", &argc, argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy",
- gtk_main_quit, NULL);
+ gtk_main_quit, NULL);
gtk_widget_show_all (GTK_WIDGET (window));
diff --git a/test/test-nautilus-mime-actions-set.c b/test/test-nautilus-mime-actions-set.c
index f3dee2577..4b2ed3234 100644
--- a/test/test-nautilus-mime-actions-set.c
+++ b/test/test-nautilus-mime-actions-set.c
@@ -110,13 +110,8 @@ main (int argc, char **argv)
NautilusFile *file;
GList *attributes;
- gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
- bonobo_activation_init (argc, argv);
-
- g_thread_init (NULL);
- gnome_vfs_init ();
- gnome_init ("test-nautilus-mime-actions-set", "0.0",
- argc, argv);
+ gnome_program_init ("test-nautilus-mime-actions-set", "0.0",
+ LIBGNOMEUI_MODULE, argc, argv, NULL);
if (argc < 3) {
usage (argv[0]);
diff --git a/test/test-nautilus-mime-actions.c b/test/test-nautilus-mime-actions.c
index 962295ab8..2cc31d8fe 100644
--- a/test/test-nautilus-mime-actions.c
+++ b/test/test-nautilus-mime-actions.c
@@ -154,13 +154,8 @@ main (int argc, char **argv)
NautilusFile *file;
GList *attributes;
- g_thread_init (NULL);
- gnome_vfs_init ();
-
- gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
- bonobo_activation_init (argc, argv);
- gnome_init("test-nautilus-mime-actions", "0.0",
- argc, argv);
+ gnome_program_init ("test-nautilus-mime-actions", "0.0",
+ LIBGNOMEUI_MODULE, argc, argv, NULL);
if (argc != 2) {
fprintf (stderr, "Usage: %s uri\n", *argv);
diff --git a/test/test-nautilus-smooth-graphics.c b/test/test-nautilus-smooth-graphics.c
index 3795cd711..e274aa703 100644
--- a/test/test-nautilus-smooth-graphics.c
+++ b/test/test-nautilus-smooth-graphics.c
@@ -1,7 +1,7 @@
#include <config.h>
#include <gtk/gtk.h>
-#include <libgnome/gnome-init.h>
+#include <libgnomeui/libgnomeui.h>
#include <libnautilus-private/nautilus-global-preferences.h>
static void
@@ -35,7 +35,8 @@ main (int argc, char * argv[])
GtkWidget *window;
GtkWidget *button;
- gnome_init ("foo", "bar", argc, argv);
+ gnome_program_init ("test-nautilus-smooth-graphics", "1.0",
+ LIBGNOMEUI_MODULE, argc, argv, NULL);
nautilus_global_preferences_init ();
diff --git a/test/test-nautilus-wrap-table.c b/test/test-nautilus-wrap-table.c
index 6eb5a84ba..3e502fa68 100644
--- a/test/test-nautilus-wrap-table.c
+++ b/test/test-nautilus-wrap-table.c
@@ -79,10 +79,10 @@ main (int argc, char* argv[])
g_object_unref (G_OBJECT (pixbuf));
/* Attach parameters and signal handler. */
- g_object_set_data (G_OBJECT (button),
- "nautilus_property_name",
- emblem_name,
- g_free);
+ g_object_set_data_full (G_OBJECT (button),
+ "nautilus_property_name",
+ emblem_name,
+ (GDestroyNotify) g_free);
gtk_container_add (GTK_CONTAINER (emblems_table), button);
}
diff --git a/test/test.c b/test/test.c
index bab6c0f7f..fef875e42 100644
--- a/test/test.c
+++ b/test/test.c
@@ -12,7 +12,7 @@ test_init (int *argc,
gnome_vfs_init ();
eel_make_warnings_and_criticals_stop_in_debugger
- (G_LOG_DOMAIN, g_log_domain_glib,
+ (G_LOG_DOMAIN,
"Bonobo",
"Gdk",
"GnomeUI",
@@ -142,7 +142,6 @@ test_pixbuf_new_named (const char *name, float scale)
GtkWidget *
test_image_new (const char *pixbuf_name,
- const char *tile_name,
float scale,
gboolean with_background)
{
@@ -165,23 +164,11 @@ test_image_new (const char *pixbuf_name,
}
}
- if (tile_name != NULL) {
- GdkPixbuf *tile_pixbuf;
-
- tile_pixbuf = test_pixbuf_new_named (tile_name, 1.0);
-
- if (tile_pixbuf != NULL) {
- eel_image_set_tile_pixbuf (EEL_IMAGE (image), tile_pixbuf);
- g_object_unref (G_OBJECT (tile_pixbuf));
- }
- }
-
return image;
}
GtkWidget *
test_label_new (const char *text,
- const char *tile_name,
gboolean with_background,
int num_sizes_larger)
{
@@ -203,17 +190,6 @@ test_label_new (const char *text,
eel_label_make_larger (EEL_LABEL (label), num_sizes_larger);
}
- if (tile_name != NULL) {
- GdkPixbuf *tile_pixbuf;
-
- tile_pixbuf = test_pixbuf_new_named (tile_name, 1.0);
-
- if (tile_pixbuf != NULL) {
- eel_label_set_tile_pixbuf (EEL_LABEL (label), tile_pixbuf);
- g_object_unref (G_OBJECT (tile_pixbuf));
- }
- }
-
return label;
}
diff --git a/test/test.h b/test/test.h
index 4db869e06..c5e760f9e 100644
--- a/test/test.h
+++ b/test/test.h
@@ -43,11 +43,9 @@ void test_gtk_widget_set_background_color (GtkWidget *wi
GdkPixbuf *test_pixbuf_new_named (const char *name,
float scale);
GtkWidget *test_image_new (const char *pixbuf_name,
- const char *tile_name,
float scale,
gboolean with_background);
GtkWidget *test_label_new (const char *text,
- const char *tile_name,
gboolean with_background,
int num_sizes_larger);
void test_pixbuf_draw_rectangle_tiled (GdkPixbuf *pixbuf,