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

Back to archive index

Yasumichi Akahoshi yasum****@users*****
2005年 4月 11日 (月) 23:14:47 JST


Index: cxplorer/src/cxp-right-pane.c
diff -u cxplorer/src/cxp-right-pane.c:1.28 cxplorer/src/cxp-right-pane.c:1.29
--- cxplorer/src/cxp-right-pane.c:1.28	Mon Apr 11 22:52:58 2005
+++ cxplorer/src/cxp-right-pane.c	Mon Apr 11 23:14:46 2005
@@ -570,17 +570,14 @@
 {
 	CxpRightPanePrivate *priv = CXP_RIGHT_PANE_GET_PRIVATE(data);
 	gchar *fullpath;
-	gchar *filetype;
-	gchar **element;
+	gchar **filetype;
 
 	gtk_tree_model_get (tree_model, iter, COL_FILE_PATH,
 			    &fullpath, COL_TERMINATOR);
 
-	filetype = g_strdup (magic_file (priv->normal_cookie, fullpath));
-	element = g_strsplit (filetype, ",", 2);
-	g_object_set (cell, "text", element[0], NULL);
-	g_free (filetype);
-	g_strfreev (element);
+	filetype = g_strsplit (magic_file (priv->normal_cookie, fullpath), ",", 2);
+	g_object_set (cell, "text", filetype[0], NULL);
+	g_strfreev (filetype);
 }
 
 /**
@@ -698,7 +695,7 @@
 {
 	CxpRightPanePrivate *priv = CXP_RIGHT_PANE_GET_PRIVATE(self);
 	gchar *cmd;
-	gchar *filetype;
+	const gchar *filetype;
 	gchar *standard_output;
 	gchar *stdout_utf8;
 	gint exit_status;
@@ -710,7 +707,7 @@
 	}
 	else
 	{
-		filetype = g_strdup (magic_file (priv->normal_cookie, filename));
+		filetype = magic_file (priv->normal_cookie, filename);
 		if (g_strrstr (filetype, "text") != NULL)
 		{
 			cmd = g_strdup_printf ("%s '%s'",


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