Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1470286 Details for
Bug 1603507
Evolution locks up after attaching multiple (3) files from a WebDAV location
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
thumbs.c
thumbs.c (text/plain), 2.30 KB, created by
Milan Crha
on 2018-07-24 12:51:18 UTC
(
hide
)
Description:
thumbs.c
Filename:
MIME Type:
Creator:
Milan Crha
Created:
2018-07-24 12:51:18 UTC
Size:
2.30 KB
patch
obsolete
>/* gcc `pkg-config --cflags --libs gnome-desktop-3.0` thumbs.c -g -O0 -o thumbs && ./thumbs */ > >#include <stdio.h> >#include <sys/stat.h> > >#include <glib/gstdio.h> > >#define GNOME_DESKTOP_USE_UNSTABLE_API >#include <libgnome-desktop/gnome-desktop-thumbnail.h> >#undef GNOME_DESKTOP_USE_UNSTABLE_API > >static gchar * >e_icon_factory_create_thumbnail (const gchar *filename) >{ > static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL; > struct stat file_stat; > gchar *thumbnail = NULL; > > g_return_val_if_fail (filename != NULL, NULL); > > if (thumbnail_factory == NULL) { > thumbnail_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL); > } > > if (g_stat (filename, &file_stat) != -1 && S_ISREG (file_stat.st_mode)) { > gchar *content_type, *mime = NULL; > gboolean uncertain = FALSE; > > content_type = g_content_type_guess (filename, NULL, 0, &uncertain); > if (content_type) > mime = g_content_type_get_mime_type (content_type); > > if (mime) { > gchar *uri = g_filename_to_uri (filename, NULL, NULL); > > g_return_val_if_fail (uri != NULL, NULL); > > thumbnail = gnome_desktop_thumbnail_factory_lookup (thumbnail_factory, uri, file_stat.st_mtime); > if (!thumbnail && gnome_desktop_thumbnail_factory_can_thumbnail (thumbnail_factory, uri, mime, file_stat.st_mtime)) { > GdkPixbuf *pixbuf; > > pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory, uri, mime); > > if (pixbuf) { > gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory, pixbuf, uri, file_stat.st_mtime); > g_object_unref (pixbuf); > > thumbnail = gnome_desktop_thumbnail_factory_lookup (thumbnail_factory, uri, file_stat.st_mtime); > } > } > > g_free (uri); > } > > g_free (content_type); > g_free (mime); > } > > return thumbnail; >} > >int >main (int argc, > const char *argv[]) >{ > int ii; > > if (argc == 1) { > printf ("Usage: File names to create thumbnails for\n"); > return 1; > } > > for (ii = 1; ii < argc; ii++) { > GTimer *timer; > gchar *thumbnail; > > timer = g_timer_new (); > printf ("[%d] processing:'%s'\r", ii, argv[ii]); fflush (stdout); > thumbnail = e_icon_factory_create_thumbnail (argv[ii]); > printf ("[%d] file:'%s' thumbnail:'%s' took: %g s\n", ii, argv[ii], thumbnail ? thumbnail : "none", g_timer_elapsed (timer, NULL)); > g_timer_destroy (timer); > g_free (thumbnail); > } > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1603507
: 1470286 |
1470518