mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-07-16 10:17:23 +00:00
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.
This commit is contained in:
parent
44af9fae6c
commit
7a030297d9
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
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.
|
||||
|
||||
2001-11-21 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* src/nautilus-main.c (main): kill g_log_domain_glib.
|
||||
|
|
|
@ -3044,12 +3044,6 @@ nautilus_directory_async_state_changed (NautilusDirectory *directory)
|
|||
* is not longer needed once the callbacks are satisfied.
|
||||
*/
|
||||
|
||||
#ifdef GNOME2_CONVERSION_COMPLETE
|
||||
if (GTK_OBJECT_DESTROYED (directory)) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (directory->details->in_async_service_loop) {
|
||||
directory->details->state_changed = TRUE;
|
||||
return;
|
||||
|
|
|
@ -63,8 +63,9 @@ static guint signals[LAST_SIGNAL];
|
|||
|
||||
static GHashTable *directories;
|
||||
|
||||
static void nautilus_directory_destroy (GtkObject *object);
|
||||
static void nautilus_directory_init (gpointer object,
|
||||
static void nautilus_directory_finalize (GObject *object);
|
||||
static void nautilus_directory_dispose (GObject *object);
|
||||
static void nautilus_directory_init (gpointer object,
|
||||
gpointer klass);
|
||||
static void nautilus_directory_class_init (NautilusDirectoryClass *klass);
|
||||
static NautilusDirectory *nautilus_directory_new (const char *uri);
|
||||
|
@ -73,17 +74,18 @@ static void set_directory_uri (NautilusDirectory
|
|||
const char *new_uri);
|
||||
|
||||
EEL_CLASS_BOILERPLATE (NautilusDirectory,
|
||||
nautilus_directory,
|
||||
GTK_TYPE_OBJECT)
|
||||
nautilus_directory,
|
||||
GTK_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (klass);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->destroy = nautilus_directory_destroy;
|
||||
object_class->finalize = nautilus_directory_finalize;
|
||||
object_class->dispose = nautilus_directory_dispose;
|
||||
|
||||
signals[FILES_ADDED] =
|
||||
g_signal_new ("files_added",
|
||||
|
@ -160,12 +162,14 @@ nautilus_directory_unref (NautilusDirectory *directory)
|
|||
}
|
||||
|
||||
static void
|
||||
nautilus_directory_destroy (GtkObject *object)
|
||||
nautilus_directory_dispose (GObject *object)
|
||||
{
|
||||
NautilusDirectory *directory;
|
||||
|
||||
directory = NAUTILUS_DIRECTORY (object);
|
||||
|
||||
g_hash_table_remove (directories, directory->details->uri);
|
||||
|
||||
nautilus_directory_cancel (directory);
|
||||
g_assert (directory->details->count_in_progress == NULL);
|
||||
g_assert (directory->details->top_left_read_state == NULL);
|
||||
|
@ -173,32 +177,49 @@ nautilus_directory_destroy (GtkObject *object)
|
|||
if (directory->details->monitor_list != NULL) {
|
||||
g_warning ("destroying a NautilusDirectory while it's being monitored");
|
||||
eel_g_list_free_deep (directory->details->monitor_list);
|
||||
directory->details->monitor_list = NULL;
|
||||
}
|
||||
|
||||
if (directory->details->monitor != NULL) {
|
||||
nautilus_monitor_cancel (directory->details->monitor);
|
||||
directory->details->monitor = NULL;
|
||||
}
|
||||
|
||||
if (directory->details->metafile_monitor != NULL) {
|
||||
nautilus_directory_unregister_metadata_monitor (directory);
|
||||
directory->details->metafile_monitor = NULL;
|
||||
}
|
||||
|
||||
if (directory->details->metafile_corba_object != CORBA_OBJECT_NIL) {
|
||||
bonobo_object_release_unref (directory->details->metafile_corba_object, NULL);
|
||||
}
|
||||
|
||||
g_hash_table_remove (directories, directory->details->uri);
|
||||
directory->details->metafile_corba_object =
|
||||
bonobo_object_release_unref (
|
||||
directory->details->metafile_corba_object, NULL);
|
||||
|
||||
if (directory->details->dequeue_pending_idle_id != 0) {
|
||||
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
|
||||
directory->details->dequeue_pending_idle_id = 0;
|
||||
}
|
||||
|
||||
g_free (directory->details->uri);
|
||||
directory->details->uri = NULL;
|
||||
|
||||
if (directory->details->vfs_uri != NULL) {
|
||||
gnome_vfs_uri_unref (directory->details->vfs_uri);
|
||||
directory->details->vfs_uri = NULL;
|
||||
}
|
||||
|
||||
EEL_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_directory_finalize (GObject *object)
|
||||
{
|
||||
NautilusDirectory *directory;
|
||||
|
||||
directory = NAUTILUS_DIRECTORY (object);
|
||||
|
||||
g_assert (directory->details->file_list == NULL);
|
||||
g_hash_table_destroy (directory->details->file_hash);
|
||||
|
||||
nautilus_file_queue_destroy (directory->details->high_priority_queue);
|
||||
nautilus_file_queue_destroy (directory->details->low_priority_queue);
|
||||
nautilus_idle_queue_destroy (directory->details->idle_queue);
|
||||
|
@ -209,7 +230,7 @@ nautilus_directory_destroy (GtkObject *object)
|
|||
|
||||
g_free (directory->details);
|
||||
|
||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
||||
EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -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 =\
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
26
test/test.c
26
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue