[kupfer] icons: Manually override generic folder icon



commit b7e1acdc8b8981dc3e6c7256753eee588b8e105d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sun Apr 3 17:03:50 2011 +0200

    icons: Manually override generic folder icon
    
    Always use the icon 'folder' instead of 'inode-directory'

 kupfer/icons.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/icons.py b/kupfer/icons.py
index 074c7e6..151f5b8 100644
--- a/kupfer/icons.py
+++ b/kupfer/icons.py
@@ -214,6 +214,10 @@ def get_gicon_for_file(uri):
 
 	finfo = gfile.query_info(FILE_ATTRIBUTE_STANDARD_ICON)
 	gicon = finfo.get_attribute_object(FILE_ATTRIBUTE_STANDARD_ICON)
+	# very manually override generic folder icon name
+	if isinstance(gicon, ThemedIcon):
+		if gicon.get_names()[0] == "inode-directory":
+			return ThemedIcon("folder")
 	return gicon
 
 def get_icon_for_gicon(gicon, icon_size):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]