gedit r6365 - in trunk: . plugins/filebrowser
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6365 - in trunk: . plugins/filebrowser
- Date: Fri, 8 Aug 2008 13:21:29 +0000 (UTC)
Author: jessevdk
Date: Fri Aug 8 13:21:29 2008
New Revision: 6365
URL: http://svn.gnome.org/viewvc/gedit?rev=6365&view=rev
Log:
* plugins/filebrowser/gedit-file-browser-store.c: removed extra stat
for icon if info is already present
Modified:
trunk/ChangeLog
trunk/plugins/filebrowser/gedit-file-browser-store.c
Modified: trunk/plugins/filebrowser/gedit-file-browser-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-browser-store.c (original)
+++ trunk/plugins/filebrowser/gedit-file-browser-store.c Fri Aug 8 13:21:29 2008
@@ -51,7 +51,8 @@
G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "," \
G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "," \
G_FILE_ATTRIBUTE_STANDARD_NAME "," \
- G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "," \
+ G_FILE_ATTRIBUTE_STANDARD_ICON
typedef struct _FileBrowserNode FileBrowserNode;
typedef struct _FileBrowserNodeDir FileBrowserNodeDir;
@@ -1550,7 +1551,8 @@
static void
model_recomposite_icon_real (GeditFileBrowserStore * tree_model,
- FileBrowserNode * node)
+ FileBrowserNode * node,
+ GFileInfo * info)
{
GtkIconTheme *theme;
GdkPixbuf *icon;
@@ -1562,7 +1564,11 @@
return;
theme = gtk_icon_theme_get_default ();
- icon = gedit_file_browser_utils_pixbuf_from_file (node->file, GTK_ICON_SIZE_MENU);
+
+ if (info)
+ icon = gedit_file_browser_utils_pixbuf_from_icon (g_file_info_get_icon (info), GTK_ICON_SIZE_MENU);
+ else
+ icon = gedit_file_browser_utils_pixbuf_from_file (node->file, GTK_ICON_SIZE_MENU);
if (node->icon)
g_object_unref (node->icon);
@@ -1605,7 +1611,8 @@
model_recomposite_icon_real (tree_model,
(FileBrowserNode *) (iter->
- user_data));
+ user_data),
+ NULL);
}
static FileBrowserNode *
@@ -1823,11 +1830,11 @@
node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_TEXT;
}
+ model_recomposite_icon_real (model, node, info);
+
if (free_info)
g_object_unref (info);
- model_recomposite_icon_real (model, node);
-
if (isadded) {
path = gedit_file_browser_store_get_path_real (model, node);
model_refilter_node (model, node, path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]