diff options
author | Gene Z. Ragan <gzr@eazel.com> | 2000-10-24 01:13:30 +0000 |
---|---|---|
committer | Gene Ragan <gzr@src.gnome.org> | 2000-10-24 01:13:30 +0000 |
commit | a66e2b6a0d5d9e8b2b3822f347eac6f414d5f2ed (patch) | |
tree | 0dc745da0fda29ee3291ca462e75942eca8e9d7e /components | |
parent | 04f79f65b7f21e30e9b6d6443418878fc673f154 (diff) | |
download | nautilus-a66e2b6a0d5d9e8b2b3822f347eac6f414d5f2ed.tar.gz |
Fixed bug 1945, Image viewer component does not display XPMs Fixed bug
2000-10-23 Gene Z. Ragan <gzr@eazel.com>
Fixed bug 1945, Image viewer component does not display XPMs
Fixed bug 1964, doesn't load xpm images using the loader framework.
* components/image-viewer/nautilus-image-view.c:
(load_image_from_stream):
Fixed some leaks and call close on the loader to fix TIFF and XPM loading.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_load):
Now it does. Loader must be closed to cause callbacks an non-progressive
loaders to complete.
* components/services/install/lib/eazel-install-types.c:
(packagedata_fill_from_rpm_header):
Fixed a couple of build breaking unitilaized variable warnings.
* components/tree/nautilus-tree-view.c:
Updated function call to new prototype that was causing build to fail.
Diffstat (limited to 'components')
-rw-r--r-- | components/image-viewer/nautilus-image-view.c | 29 | ||||
-rw-r--r-- | components/services/install/lib/eazel-install-types.c | 6 | ||||
-rw-r--r-- | components/tree/nautilus-tree-view.c | 3 |
3 files changed, 18 insertions, 20 deletions
diff --git a/components/image-viewer/nautilus-image-view.c b/components/image-viewer/nautilus-image-view.c index 3b2402284..ccc119dfe 100644 --- a/components/image-viewer/nautilus-image-view.c +++ b/components/image-viewer/nautilus-image-view.c @@ -323,39 +323,32 @@ load_image_from_stream (BonoboPersistStream *ps, Bonobo_Stream stream, gtk_object_unref (GTK_OBJECT (loader)); return; } - - if (buffer->_buffer && - !gdk_pixbuf_loader_write (loader, - buffer->_buffer, - buffer->_length)) { - CORBA_free (buffer); - if (ev->_major == CORBA_NO_EXCEPTION) { - gdk_pixbuf_loader_close (loader); - gtk_object_unref (GTK_OBJECT (loader)); - return; - } else { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); + + if (buffer->_buffer != NULL && + !gdk_pixbuf_loader_write (loader, buffer->_buffer, buffer->_length)) { + CORBA_free (buffer); + if (ev->_major != CORBA_NO_EXCEPTION) { + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_Bonobo_Persist_WrongDataType, NULL); + } gdk_pixbuf_loader_close (loader); gtk_object_unref (GTK_OBJECT (loader)); return; - } } + len = buffer->_length; - CORBA_free (buffer); } while (len > 0); + gdk_pixbuf_loader_close (loader); bod->pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (bod->pixbuf == NULL) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL); - gdk_pixbuf_loader_close (loader); gtk_object_unref (GTK_OBJECT (loader)); } else { gdk_pixbuf_ref (bod->pixbuf); - bonobo_embeddable_foreach_view (bod->bonobo_object, - resize_all_cb, bod); + bonobo_embeddable_foreach_view (bod->bonobo_object, resize_all_cb, bod); } } diff --git a/components/services/install/lib/eazel-install-types.c b/components/services/install/lib/eazel-install-types.c index 9a0d840fc..1844b460c 100644 --- a/components/services/install/lib/eazel-install-types.c +++ b/components/services/install/lib/eazel-install-types.c @@ -355,6 +355,8 @@ packagedata_fill_from_rpm_header (PackageData *pack, int index; int num_paths; + num_paths = 0; + /* RPM v.3.0.4 and above has RPMTAG_BASENAMES, Lets see if RPMTAG_PROVIDES works for the older ones */ #ifdef RPMTAG_BASENAMES @@ -382,7 +384,6 @@ packagedata_fill_from_rpm_header (PackageData *pack, RPMTAG_FILENAMES, NULL, (void**)&names, &count); #endif /* RPMTAG_BASENAMES */ - /* Now loop through all the basenames */ /* NOTE: This algorithm has sizeof (paths) * sizeof (names) @@ -390,6 +391,9 @@ packagedata_fill_from_rpm_header (PackageData *pack, for (index=0; index<count; index++) { char *fullname; int index2; + + index2 = 0; + if (paths) { fullname = g_strdup_printf ("%s/%s", paths_copy[indexes[index]], names[index]); } else { diff --git a/components/tree/nautilus-tree-view.c b/components/tree/nautilus-tree-view.c index 35aeb4e55..77773cd3b 100644 --- a/components/tree/nautilus-tree-view.c +++ b/components/tree/nautilus-tree-view.c @@ -2093,7 +2093,8 @@ nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view, NULL, target_uri, context->action, - GTK_WIDGET (tree_view->details->tree)); + GTK_WIDGET (tree_view->details->tree), + NULL, NULL); g_list_free (source_uris); } |