[Cxplorer-cvs 01254] CVS update: cxplorer/src

Back to archive index

Yasumichi Akahoshi yasum****@users*****
2005年 9月 6日 (火) 21:32:01 JST


Index: cxplorer/src/cxp-right-pane.c
diff -u cxplorer/src/cxp-right-pane.c:1.60 cxplorer/src/cxp-right-pane.c:1.61
--- cxplorer/src/cxp-right-pane.c:1.60	Tue Sep  6 20:45:11 2005
+++ cxplorer/src/cxp-right-pane.c	Tue Sep  6 21:32:01 2005
@@ -530,42 +530,14 @@
 				      GtkTreeModel * tree_model,
 				      GtkTreeIter * iter, gpointer data)
 {
-	gchar *filename;
-	gchar *mimetype = NULL;
+	gchar *mimetype;
 	GdkPixbuf *icon;
-	struct stat status;
 
-	gtk_tree_model_get (tree_model, iter, FILE_LIST_COL_FULLPATH,
-			    &filename, -1);
-	lstat (filename, &status);
-	switch (status.st_mode & S_IFMT)
-	{
-		case S_IFSOCK:
-			mimetype = g_strdup("inode/socket");
-			break;
-		case S_IFLNK:
-			mimetype = g_strdup("inode/symlink");
-			break;
-		case S_IFREG:
-			mimetype = cxp_get_mime_type_for_file (filename);
-			break;
-		case S_IFBLK:
-			mimetype = g_strdup("inode/blockdevice");
-			break;
-		case S_IFDIR:
-			mimetype = g_strdup("inode/directory");
-			break;
-		case S_IFCHR:
-			mimetype = g_strdup("inode/chardevice");
-			break;
-		case S_IFIFO:
-			mimetype = g_strdup("inode/fifo");
-			break;
-	}
+	gtk_tree_model_get (tree_model, iter, FILE_LIST_COL_MIMETYPE,
+			    &mimetype, -1);
 	icon = cxp_lookup_icon_from_mime (mimetype);
 	g_object_set (cell, "pixbuf", icon, NULL);
 	g_free (mimetype);
-	g_free (filename);
 }
 
 /**


Cxplorer-cvs メーリングリストの案内
Back to archive index