diff options
author | Darin Adler <darin@src.gnome.org> | 2002-02-27 18:05:45 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2002-02-27 18:05:45 +0000 |
commit | 3035a35267191a40a6c7245e69a662037e31dcbc (patch) | |
tree | df634fd7a071160c4b4a08488a0d4735d98eb1c0 /test | |
parent | 57a1da0b53449fa54aae6863a0d6334de16d3877 (diff) | |
download | nautilus-3035a35267191a40a6c7245e69a662037e31dcbc.tar.gz |
Just release, don't unref. (get_metafile): Don't keep a ref. Also fix
* libnautilus-private/nautilus-directory-metafile.c:
(free_factory): Just release, don't unref.
(get_metafile): Don't keep a ref. Also fix CORBA objref leak.
* libnautilus-private/nautilus-icon-factory.c:
(get_icon_from_cache):
* libnautilus-private/nautilus-metafile-factory.c:
(nautilus_metafile_factory_get_instance): Return the same
instance each time, don't ref, since lifetime is not managed
by ref counting.
* libnautilus/nautilus-clipboard.c:
(initialize_clipboard_component_with_callback_data):
Get rid of BonoboUIComponent leak.
* src/nautilus-application.c: Formatting tweaks.
* libnautilus-private/nautilus-bookmark.c: Minor cleanup.
* test/Makefile.am:
* test/test-nautilus-async-activation.c: Remove.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/test-nautilus-async-activation.c | 77 |
2 files changed, 0 insertions, 79 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index dcb8d2941..da9ed1259 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,7 +15,6 @@ LDADD =\ $(NULL) noinst_PROGRAMS =\ - test-nautilus-async-activation \ test-nautilus-mime-actions \ test-nautilus-mime-actions-set \ test-nautilus-preferences-change \ @@ -23,7 +22,6 @@ noinst_PROGRAMS =\ test-nautilus-wrap-table \ $(NULL) -test_nautilus_async_activation_SOURCES = test-nautilus-async-activation.c test.c test_nautilus_mime_actions_SOURCES = test-nautilus-mime-actions.c test.c test_nautilus_mime_actions_set_SOURCES = test-nautilus-mime-actions-set.c test.c test_nautilus_preferences_change_SOURCES = test-nautilus-preferences-change.c test.c diff --git a/test/test-nautilus-async-activation.c b/test/test-nautilus-async-activation.c deleted file mode 100644 index 8969ec374..000000000 --- a/test/test-nautilus-async-activation.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* - Copyright (C) 2000 Eazel - - The Gnome Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The Gnome Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the Gnome Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - Author: Mathieu Lacage <mathieu@eazel.com> -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtk.h> -#include <libnautilus-private/nautilus-bonobo-extensions.h> -#include <libbonoboui.h> - -#define IID "OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f" - -static void -activation_callback (NautilusBonoboActivationHandle *handle, - Bonobo_Unknown activated_object, - gpointer callback_data) -{ - GtkWidget *window; - GtkWidget *control; - - window = GTK_WIDGET (callback_data); - - if (activated_object == CORBA_OBJECT_NIL) { - g_print ("activation failed\n"); - } else { - control = bonobo_widget_new_control_from_objref (activated_object, - CORBA_OBJECT_NIL); - gtk_container_add (GTK_CONTAINER (window), control); - gtk_widget_show (GTK_WIDGET (control)); - - g_print ("activation suceeded\n"); - } -} - -int -main (int argc, char *argv[]) -{ - GtkWidget *window; - NautilusBonoboActivationHandle *handle; - - 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_widget_show_all (GTK_WIDGET (window)); - - - handle = nautilus_bonobo_activate_from_id (IID, activation_callback, window); -#if 0 - nautilus_bonobo_activate_stop (handle); -#endif - bonobo_main (); - - return 0; -} |