[Xfce4-commits] r29788 - in thunar/branches/migration-to-gio: . thunar
Jannis Pohlmann
jannis at xfce.org
Mon Apr 13 01:59:07 CEST 2009
Author: jannis
Date: 2009-04-12 23:59:06 +0000 (Sun, 12 Apr 2009)
New Revision: 29788
Modified:
thunar/branches/migration-to-gio/ChangeLog
thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c
Log:
* thunar/thunar-properties-dialog.c: Remove ThunarVfsMimeInfo and use
a content type string in thunar_properties_dialog_update().
Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog 2009-04-12 23:44:41 UTC (rev 29787)
+++ thunar/branches/migration-to-gio/ChangeLog 2009-04-12 23:59:06 UTC (rev 29788)
@@ -1,5 +1,10 @@
2009-04-13 Jannis Pohlmann <jannis at xfce.org>
+ * thunar/thunar-properties-dialog.c: Remove ThunarVfsMimeInfo and use
+ a content type string in thunar_properties_dialog_update().
+
+2009-04-13 Jannis Pohlmann <jannis at xfce.org>
+
* thunar/thunar-create-dialog.{c,h}: Replace the ThunarVfsMimeInfo
member/property of ThunarCreateDialog with a content type string
member/property. Rename thunar_create_dialog_{get,set}_mime_info()
Modified: thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c 2009-04-12 23:44:41 UTC (rev 29787)
+++ thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c 2009-04-12 23:59:06 UTC (rev 29788)
@@ -783,10 +783,10 @@
thunar_properties_dialog_update (ThunarPropertiesDialog *dialog)
{
ThunarIconFactory *icon_factory;
- ThunarVfsMimeInfo *info;
ThunarDateStyle date_style;
ThunarVfsVolume *volume;
GtkIconTheme *icon_theme;
+ const gchar *content_type;
const gchar *icon_name;
const gchar *name;
const gchar *path;
@@ -857,15 +857,15 @@
}
}
- /* update the mime type */
- info = thunar_file_get_mime_info (dialog->file);
- if (G_UNLIKELY (strcmp (thunar_vfs_mime_info_get_name (info), "inode/symlink") == 0))
+ /* update the content type */
+ content_type = thunar_file_get_content_type (dialog->file);
+ if (G_UNLIKELY (g_content_type_equals (content_type, "inode/symlink")))
str = g_strdup (_("broken link"));
else if (G_UNLIKELY (thunar_file_is_symlink (dialog->file)))
- str = g_strdup_printf (_("link to %s"), thunar_vfs_mime_info_get_comment (info));
+ str = g_strdup_printf (_("link to %s"), thunar_file_get_symlink_target (dialog->file));
else
- str = g_strdup (thunar_vfs_mime_info_get_comment (info));
- thunar_gtk_widget_set_tooltip (dialog->kind_ebox, "%s", thunar_vfs_mime_info_get_name (info));
+ str = g_content_type_get_description (content_type);
+ thunar_gtk_widget_set_tooltip (dialog->kind_ebox, "%s", str);
gtk_label_set_text (GTK_LABEL (dialog->kind_label), str);
g_free (str);
More information about the Xfce4-commits
mailing list