[eog-plugins] Display the image mimetype instead of the thumbnail
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog-plugins] Display the image mimetype instead of the thumbnail
- Date: Sat, 5 Feb 2011 17:49:00 +0000 (UTC)
commit f1f3b09ef57689b55d5fdb2ae58cc3a3775390d8
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Sat Feb 6 00:47:32 2010 -0500
Display the image mimetype instead of the thumbnail
plugins/map/eog-map-plugin.c | 26 ++++----------------------
1 files changed, 4 insertions(+), 22 deletions(-)
---
diff --git a/plugins/map/eog-map-plugin.c b/plugins/map/eog-map-plugin.c
index 8890dc3..5f10a79 100644
--- a/plugins/map/eog-map-plugin.c
+++ b/plugins/map/eog-map-plugin.c
@@ -72,33 +72,15 @@ static ChamplainMarker *
create_champlain_marker (EogImage *image)
{
ClutterActor *thumb, *marker;
- GdkPixbuf* thumbnail = eog_image_get_thumbnail (image);
marker = champlain_marker_new ();
- thumb = clutter_texture_new ();
-
- if (thumbnail) {
- gfloat width, height;
-
- gtk_clutter_texture_set_from_pixbuf (CLUTTER_TEXTURE (thumb),
- thumbnail,
- NULL);
- /* Clip the thumbnail to cut the border */
- width = gdk_pixbuf_get_width (thumbnail);
- height = gdk_pixbuf_get_height (thumbnail);
-
- clutter_actor_set_clip (thumb, 3, 3, (width / FACTOR) - 7,
- (height / FACTOR) - 7);
- width = clutter_actor_get_width (thumb) / FACTOR;
- height = clutter_actor_get_height (thumb) / FACTOR;
- clutter_actor_set_size (thumb, width, height);
- }
+ champlain_marker_set_draw_background (CHAMPLAIN_MARKER (marker), FALSE);
+ GtkWidget *tmp = gtk_button_new ();
+ thumb = gtk_clutter_texture_new_from_icon_name (tmp, "gnome-mime-image", GTK_ICON_SIZE_MENU);
+ /* don't need to unref tmp because it is floating */
champlain_marker_set_image (CHAMPLAIN_MARKER (marker), thumb);
- if (thumbnail)
- g_object_unref (thumbnail);
-
return CHAMPLAIN_MARKER (marker);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]