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

Back to archive index

Yasumichi Akahoshi yasum****@users*****
2005年 9月 1日 (木) 23:43:06 JST


Index: cxplorer/src/cxp-right-pane.c
diff -u cxplorer/src/cxp-right-pane.c:1.54 cxplorer/src/cxp-right-pane.c:1.55
--- cxplorer/src/cxp-right-pane.c:1.54	Thu Sep  1 01:00:32 2005
+++ cxplorer/src/cxp-right-pane.c	Thu Sep  1 23:43:06 2005
@@ -786,6 +786,7 @@
 	gchar *preview_cmd = NULL;
 	gchar *cmd = NULL;
 	gchar *filetype;
+	gchar *key;
 	gchar *standard_output;
 	gchar *stdout_utf8;
 	gint exit_status;
@@ -812,20 +813,25 @@
 				}
 			}
 
-			if (g_strrstr (filetype, "text") != NULL)
+			key = g_strdup_printf ("/apps/cxp/mime-types/%s/preview", filetype);
+			if ((preview_cmd = gconf_client_get_string (priv->client, key, NULL)) == NULL)
 			{
-				preview_cmd =
-					gconf_client_get_string (priv->client,
-							"/apps/cxp/cxplorer/PreviewText",
-							NULL);
-			}
-			else
-			{
-				preview_cmd =
-					gconf_client_get_string (priv->client,
-							"/apps/cxp/cxplorer/PreviewBinary",
-							NULL);
+				if (g_strrstr (filetype, "text") != NULL)
+				{
+					preview_cmd =
+						gconf_client_get_string (priv->client,
+								"/apps/cxp/cxplorer/PreviewText",
+								NULL);
+				}
+				else
+				{
+					preview_cmd =
+						gconf_client_get_string (priv->client,
+								"/apps/cxp/cxplorer/PreviewBinary",
+								NULL);
+				}
 			}
+			g_free (key);
 			g_free (filetype);
 			break;
 		case S_IFDIR:


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