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

Back to archive index

Yasumichi Akahoshi yasum****@users*****
2005年 9月 1日 (木) 01:00:33 JST


Index: cxplorer/src/cxp-property-dialog.c
diff -u cxplorer/src/cxp-property-dialog.c:1.4 cxplorer/src/cxp-property-dialog.c:1.5
--- cxplorer/src/cxp-property-dialog.c:1.4	Tue Aug 30 23:49:16 2005
+++ cxplorer/src/cxp-property-dialog.c	Thu Sep  1 01:00:32 2005
@@ -5,7 +5,7 @@
  * A widget of Property dialog
  * @author Yasumichi Akahoshi <yasum****@users*****>
  * @date Sun Apr 3 02:53:00 2005
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
  ****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -250,6 +250,7 @@
 {
 	CxpPropertyDialogPrivate *private = CXP_PROPERTY_DIALOG_GET_PRIVATE(self);
 	gchar *filename = private->filename;
+	gchar *mimetype;
 	gchar *filetype;
 	GtkWidget **labels = private->info_labels;
 	gchar *value;
@@ -273,7 +274,34 @@
 	gtk_label_set_text(GTK_LABEL(labels[INFO_SIZE]), value);
 	g_free (value);
 
-	filetype = cxp_get_mime_type_for_file (filename);
+	switch (status.st_mode & S_IFMT)
+	{
+		case S_IFSOCK:
+			filetype = g_strdup (_("socket"));
+			break;
+		case S_IFLNK:
+			filetype = g_strdup (_("symbolic link"));
+			break;
+		case S_IFREG:
+			mimetype = cxp_get_mime_type_for_file (filename);
+			filetype = cxp_get_mime_comment (mimetype);
+			g_free (mimetype);
+			break;
+		case S_IFBLK:
+			filetype = g_strdup (_("block device"));
+			break;
+		case S_IFDIR:
+			filetype = g_strdup (_("directory"));
+			break;
+		case S_IFCHR:
+			filetype = g_strdup (_("character device"));
+			break;
+		case S_IFIFO:
+			filetype = g_strdup (_("fifo"));
+			break;
+		default:
+			filetype = g_strdup (_("unknown"));
+	}
 	gtk_label_set_text(GTK_LABEL(labels[INFO_FILETYPE]), filetype);
 	g_free (filetype);
 
Index: cxplorer/src/cxp-right-pane.c
diff -u cxplorer/src/cxp-right-pane.c:1.53 cxplorer/src/cxp-right-pane.c:1.54
--- cxplorer/src/cxp-right-pane.c:1.53	Wed Aug 31 23:40:54 2005
+++ cxplorer/src/cxp-right-pane.c	Thu Sep  1 01:00:32 2005
@@ -34,7 +34,6 @@
 	gchar *cur_dir;
 	GdkPixbuf *cxp_dir;
 	GdkPixbuf *cxp_unknown;
-	CxpMimeManager *manager;
 	CxpHandler *handler;
 } CxpRightPanePrivate;
 
@@ -238,7 +237,6 @@
 
 	priv->dispose_has_run = FALSE;
 	priv->cur_dir = NULL;
-	priv->manager = cxp_mime_manager_new ();
 	priv->handler = cxp_handler_new ();
 
 	g_signal_connect (priv->file_list, "cursor_changed",
@@ -270,7 +268,6 @@
 	 * reference.
 	 */
 	g_object_unref (priv->client);
-	g_object_unref (priv->manager);
 	g_object_unref (priv->handler);
 
 
@@ -745,7 +742,7 @@
 			break;
 		case S_IFREG:
 			mimetype = cxp_get_mime_type_for_file (fullpath);
-			filetype = cxp_mime_manager_get_comment_from_mime (priv->manager, mimetype);
+			filetype = cxp_get_mime_comment (mimetype);
 			g_free (mimetype);
 			break;
 		case S_IFBLK:
Index: cxplorer/src/main.c
diff -u cxplorer/src/main.c:1.10 cxplorer/src/main.c:1.11
--- cxplorer/src/main.c:1.10	Tue Aug 30 23:49:16 2005
+++ cxplorer/src/main.c	Thu Sep  1 01:00:32 2005
@@ -5,7 +5,7 @@
  * This file contains main function which init cxplorer and run main loop.
  * @author Yasumichi Akahoshi <yasum****@users*****>
  * @date 2004
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
  */
 
 /**
@@ -71,6 +71,7 @@
 		gtk_widget_show (window);
 
 		gtk_main ();
+		cxp_cleanup ();
 		exit_code = 0;
 	}
 	else


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