mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +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>
|
2001-11-21 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
* src/nautilus-main.c (main): kill g_log_domain_glib.
|
* 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.
|
* 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) {
|
if (directory->details->in_async_service_loop) {
|
||||||
directory->details->state_changed = TRUE;
|
directory->details->state_changed = TRUE;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -63,8 +63,9 @@ static guint signals[LAST_SIGNAL];
|
||||||
|
|
||||||
static GHashTable *directories;
|
static GHashTable *directories;
|
||||||
|
|
||||||
static void nautilus_directory_destroy (GtkObject *object);
|
static void nautilus_directory_finalize (GObject *object);
|
||||||
static void nautilus_directory_init (gpointer object,
|
static void nautilus_directory_dispose (GObject *object);
|
||||||
|
static void nautilus_directory_init (gpointer object,
|
||||||
gpointer klass);
|
gpointer klass);
|
||||||
static void nautilus_directory_class_init (NautilusDirectoryClass *klass);
|
static void nautilus_directory_class_init (NautilusDirectoryClass *klass);
|
||||||
static NautilusDirectory *nautilus_directory_new (const char *uri);
|
static NautilusDirectory *nautilus_directory_new (const char *uri);
|
||||||
|
@ -73,17 +74,18 @@ static void set_directory_uri (NautilusDirectory
|
||||||
const char *new_uri);
|
const char *new_uri);
|
||||||
|
|
||||||
EEL_CLASS_BOILERPLATE (NautilusDirectory,
|
EEL_CLASS_BOILERPLATE (NautilusDirectory,
|
||||||
nautilus_directory,
|
nautilus_directory,
|
||||||
GTK_TYPE_OBJECT)
|
GTK_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_directory_class_init (NautilusDirectoryClass *klass)
|
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] =
|
signals[FILES_ADDED] =
|
||||||
g_signal_new ("files_added",
|
g_signal_new ("files_added",
|
||||||
|
@ -160,12 +162,14 @@ nautilus_directory_unref (NautilusDirectory *directory)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nautilus_directory_destroy (GtkObject *object)
|
nautilus_directory_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
NautilusDirectory *directory;
|
NautilusDirectory *directory;
|
||||||
|
|
||||||
directory = NAUTILUS_DIRECTORY (object);
|
directory = NAUTILUS_DIRECTORY (object);
|
||||||
|
|
||||||
|
g_hash_table_remove (directories, directory->details->uri);
|
||||||
|
|
||||||
nautilus_directory_cancel (directory);
|
nautilus_directory_cancel (directory);
|
||||||
g_assert (directory->details->count_in_progress == NULL);
|
g_assert (directory->details->count_in_progress == NULL);
|
||||||
g_assert (directory->details->top_left_read_state == 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) {
|
if (directory->details->monitor_list != NULL) {
|
||||||
g_warning ("destroying a NautilusDirectory while it's being monitored");
|
g_warning ("destroying a NautilusDirectory while it's being monitored");
|
||||||
eel_g_list_free_deep (directory->details->monitor_list);
|
eel_g_list_free_deep (directory->details->monitor_list);
|
||||||
|
directory->details->monitor_list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (directory->details->monitor != NULL) {
|
if (directory->details->monitor != NULL) {
|
||||||
nautilus_monitor_cancel (directory->details->monitor);
|
nautilus_monitor_cancel (directory->details->monitor);
|
||||||
|
directory->details->monitor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (directory->details->metafile_monitor != NULL) {
|
if (directory->details->metafile_monitor != NULL) {
|
||||||
nautilus_directory_unregister_metadata_monitor (directory);
|
nautilus_directory_unregister_metadata_monitor (directory);
|
||||||
|
directory->details->metafile_monitor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (directory->details->metafile_corba_object != CORBA_OBJECT_NIL) {
|
directory->details->metafile_corba_object =
|
||||||
bonobo_object_release_unref (directory->details->metafile_corba_object, NULL);
|
bonobo_object_release_unref (
|
||||||
}
|
directory->details->metafile_corba_object, NULL);
|
||||||
|
|
||||||
g_hash_table_remove (directories, directory->details->uri);
|
|
||||||
|
|
||||||
if (directory->details->dequeue_pending_idle_id != 0) {
|
if (directory->details->dequeue_pending_idle_id != 0) {
|
||||||
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
|
gtk_idle_remove (directory->details->dequeue_pending_idle_id);
|
||||||
|
directory->details->dequeue_pending_idle_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (directory->details->uri);
|
g_free (directory->details->uri);
|
||||||
|
directory->details->uri = NULL;
|
||||||
|
|
||||||
if (directory->details->vfs_uri != NULL) {
|
if (directory->details->vfs_uri != NULL) {
|
||||||
gnome_vfs_uri_unref (directory->details->vfs_uri);
|
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_assert (directory->details->file_list == NULL);
|
||||||
g_hash_table_destroy (directory->details->file_hash);
|
g_hash_table_destroy (directory->details->file_hash);
|
||||||
|
|
||||||
nautilus_file_queue_destroy (directory->details->high_priority_queue);
|
nautilus_file_queue_destroy (directory->details->high_priority_queue);
|
||||||
nautilus_file_queue_destroy (directory->details->low_priority_queue);
|
nautilus_file_queue_destroy (directory->details->low_priority_queue);
|
||||||
nautilus_idle_queue_destroy (directory->details->idle_queue);
|
nautilus_idle_queue_destroy (directory->details->idle_queue);
|
||||||
|
@ -209,7 +230,7 @@ nautilus_directory_destroy (GtkObject *object)
|
||||||
|
|
||||||
g_free (directory->details);
|
g_free (directory->details);
|
||||||
|
|
||||||
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
|
EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -2,6 +2,7 @@ NULL=
|
||||||
|
|
||||||
INCLUDES =\
|
INCLUDES =\
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
|
$(CORE_CFLAGS) \
|
||||||
$(NAUTILUS_PRIVATE_CFLAGS) \
|
$(NAUTILUS_PRIVATE_CFLAGS) \
|
||||||
-DVERSION="\"$(VERSION)\"" \
|
-DVERSION="\"$(VERSION)\"" \
|
||||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||||
|
@ -11,7 +12,7 @@ INCLUDES =\
|
||||||
LDADD =\
|
LDADD =\
|
||||||
$(top_builddir)/libnautilus/libnautilus.la \
|
$(top_builddir)/libnautilus/libnautilus.la \
|
||||||
$(top_builddir)/libnautilus-private/libnautilus-private.la \
|
$(top_builddir)/libnautilus-private/libnautilus-private.la \
|
||||||
$(NAUTILUS_PRIVATE_LIBS) \
|
$(LIBNAUTILUS_PRIVATE_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
noinst_PROGRAMS =\
|
noinst_PROGRAMS =\
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libnautilus-private/nautilus-bonobo-extensions.h>
|
#include <libnautilus-private/nautilus-bonobo-extensions.h>
|
||||||
#include <bonobo/bonobo-widget.h>
|
#include <libbonoboui.h>
|
||||||
#include <bonobo/bonobo-main.h>
|
|
||||||
#include <liboaf/oaf-mainloop.h>
|
|
||||||
|
|
||||||
#define IID "OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f"
|
#define IID "OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f"
|
||||||
|
|
||||||
|
@ -60,15 +58,12 @@ main (int argc, char *argv[])
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
NautilusBonoboActivationHandle *handle;
|
NautilusBonoboActivationHandle *handle;
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
bonobo_ui_init ("test-nautilus-activation-async",
|
||||||
bonobo_activation_init (argc, argv);
|
"1.0", &argc, argv);
|
||||||
bonobo_init (bonobo_orb (),
|
|
||||||
bonobo_poa (),
|
|
||||||
bonobo_poa_manager ());
|
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
gtk_main_quit, NULL);
|
gtk_main_quit, NULL);
|
||||||
gtk_widget_show_all (GTK_WIDGET (window));
|
gtk_widget_show_all (GTK_WIDGET (window));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,8 @@ main (int argc, char **argv)
|
||||||
NautilusFile *file;
|
NautilusFile *file;
|
||||||
GList *attributes;
|
GList *attributes;
|
||||||
|
|
||||||
gnomelib_register_popt_table (bonobo_activation_popt_options, bonobo_activation_get_popt_table_name ());
|
gnome_program_init ("test-nautilus-mime-actions-set", "0.0",
|
||||||
bonobo_activation_init (argc, argv);
|
LIBGNOMEUI_MODULE, argc, argv, NULL);
|
||||||
|
|
||||||
g_thread_init (NULL);
|
|
||||||
gnome_vfs_init ();
|
|
||||||
gnome_init ("test-nautilus-mime-actions-set", "0.0",
|
|
||||||
argc, argv);
|
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
usage (argv[0]);
|
usage (argv[0]);
|
||||||
|
|
|
@ -154,13 +154,8 @@ main (int argc, char **argv)
|
||||||
NautilusFile *file;
|
NautilusFile *file;
|
||||||
GList *attributes;
|
GList *attributes;
|
||||||
|
|
||||||
g_thread_init (NULL);
|
gnome_program_init ("test-nautilus-mime-actions", "0.0",
|
||||||
gnome_vfs_init ();
|
LIBGNOMEUI_MODULE, argc, argv, NULL);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
fprintf (stderr, "Usage: %s uri\n", *argv);
|
fprintf (stderr, "Usage: %s uri\n", *argv);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libgnome/gnome-init.h>
|
#include <libgnomeui/libgnomeui.h>
|
||||||
#include <libnautilus-private/nautilus-global-preferences.h>
|
#include <libnautilus-private/nautilus-global-preferences.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -35,7 +35,8 @@ main (int argc, char * argv[])
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *button;
|
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 ();
|
nautilus_global_preferences_init ();
|
||||||
|
|
||||||
|
|
|
@ -79,10 +79,10 @@ main (int argc, char* argv[])
|
||||||
g_object_unref (G_OBJECT (pixbuf));
|
g_object_unref (G_OBJECT (pixbuf));
|
||||||
|
|
||||||
/* Attach parameters and signal handler. */
|
/* Attach parameters and signal handler. */
|
||||||
g_object_set_data (G_OBJECT (button),
|
g_object_set_data_full (G_OBJECT (button),
|
||||||
"nautilus_property_name",
|
"nautilus_property_name",
|
||||||
emblem_name,
|
emblem_name,
|
||||||
g_free);
|
(GDestroyNotify) g_free);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (emblems_table), button);
|
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 ();
|
gnome_vfs_init ();
|
||||||
|
|
||||||
eel_make_warnings_and_criticals_stop_in_debugger
|
eel_make_warnings_and_criticals_stop_in_debugger
|
||||||
(G_LOG_DOMAIN, g_log_domain_glib,
|
(G_LOG_DOMAIN,
|
||||||
"Bonobo",
|
"Bonobo",
|
||||||
"Gdk",
|
"Gdk",
|
||||||
"GnomeUI",
|
"GnomeUI",
|
||||||
|
@ -142,7 +142,6 @@ test_pixbuf_new_named (const char *name, float scale)
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
test_image_new (const char *pixbuf_name,
|
test_image_new (const char *pixbuf_name,
|
||||||
const char *tile_name,
|
|
||||||
float scale,
|
float scale,
|
||||||
gboolean with_background)
|
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;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
test_label_new (const char *text,
|
test_label_new (const char *text,
|
||||||
const char *tile_name,
|
|
||||||
gboolean with_background,
|
gboolean with_background,
|
||||||
int num_sizes_larger)
|
int num_sizes_larger)
|
||||||
{
|
{
|
||||||
|
@ -203,17 +190,6 @@ test_label_new (const char *text,
|
||||||
eel_label_make_larger (EEL_LABEL (label), num_sizes_larger);
|
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;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,9 @@ void test_gtk_widget_set_background_color (GtkWidget *wi
|
||||||
GdkPixbuf *test_pixbuf_new_named (const char *name,
|
GdkPixbuf *test_pixbuf_new_named (const char *name,
|
||||||
float scale);
|
float scale);
|
||||||
GtkWidget *test_image_new (const char *pixbuf_name,
|
GtkWidget *test_image_new (const char *pixbuf_name,
|
||||||
const char *tile_name,
|
|
||||||
float scale,
|
float scale,
|
||||||
gboolean with_background);
|
gboolean with_background);
|
||||||
GtkWidget *test_label_new (const char *text,
|
GtkWidget *test_label_new (const char *text,
|
||||||
const char *tile_name,
|
|
||||||
gboolean with_background,
|
gboolean with_background,
|
||||||
int num_sizes_larger);
|
int num_sizes_larger);
|
||||||
void test_pixbuf_draw_rectangle_tiled (GdkPixbuf *pixbuf,
|
void test_pixbuf_draw_rectangle_tiled (GdkPixbuf *pixbuf,
|
||||||
|
|
Loading…
Reference in a new issue