[eog-plugins/multiple-map: 2/6] Display the image mimetype instead of the thumbnail



commit b7a9bbf5619d299f93ac7d1b564dce51e61b090e
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]