2 small eel fixes
- From: Damon Chaplin <damon ximian com>
- To: nautilus-list gnome org
- Subject: 2 small eel fixes
- Date: 21 May 2002 16:20:54 -0400
2 small patches.
The first one closes the pixbuf loader when an error occurs.
A warning is output if we unref it without closing it.
The second one fixes a mistake I made with an earlier fix.
I forgot that eel_remove_weak_pointer() will set the pointer to NULL,
but we want to return it. So we copy it first.
Damon
Index: eel-gdk-pixbuf-extensions.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-gdk-pixbuf-extensions.c,v
retrieving revision 1.30
diff -u -r1.30 eel-gdk-pixbuf-extensions.c
--- eel-gdk-pixbuf-extensions.c 28 Mar 2002 22:07:52 -0000 1.30
+++ eel-gdk-pixbuf-extensions.c 21 May 2002 20:18:29 -0000
@@ -137,6 +137,7 @@
}
if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
+ gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (loader);
gnome_vfs_close (handle);
return NULL;
Index: eel-gnome-extensions.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-gnome-extensions.c,v
retrieving revision 1.33
diff -u -r1.33 eel-gnome-extensions.c
--- eel-gnome-extensions.c 8 May 2002 20:31:04 -0000 1.33
+++ eel-gnome-extensions.c 21 May 2002 20:18:39 -0000
@@ -694,7 +694,7 @@
EelIconSelectionFunction selected,
gpointer callback_data)
{
- GtkWidget *dialog, *icon_selection;
+ GtkWidget *dialog, *icon_selection, *retval;
GtkWidget *entry, *file_entry;
IconSelectionData *selection_data;
@@ -756,10 +756,14 @@
gnome_icon_selection_show_icons (GNOME_ICON_SELECTION (icon_selection));
+ /* eel_remove_weak_pointer() will set dialog to NULL, so we need to
+ remember the dialog pointer here, if there is one. */
+ retval = dialog;
+
/* Now remove the weak pointer, if the dialog still exists. */
eel_remove_weak_pointer (&dialog);
- return dialog;
+ return retval;
}
PangoContext *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]