Fix #1112225 (Column icons . Add rule)

This commit is contained in:
Kovid Goyal 2013-02-01 13:26:14 +05:30
parent 9b32d5abd9
commit 9cba7ea0a5

View File

@ -306,11 +306,12 @@ class RuleEditor(QDialog): # {{{
self.filename_box.setInsertPolicy(self.filename_box.InsertAlphabetically) self.filename_box.setInsertPolicy(self.filename_box.InsertAlphabetically)
d = os.path.join(config_dir, 'cc_icons') d = os.path.join(config_dir, 'cc_icons')
self.icon_file_names = [] self.icon_file_names = []
for icon_file in os.listdir(d): if os.path.exists(d):
icon_file = lower(icon_file) for icon_file in os.listdir(d):
if os.path.exists(os.path.join(d, icon_file)): icon_file = lower(icon_file)
if icon_file.endswith('.png'): if os.path.exists(os.path.join(d, icon_file)):
self.icon_file_names.append(icon_file) if icon_file.endswith('.png'):
self.icon_file_names.append(icon_file)
self.icon_file_names.sort(key=sort_key) self.icon_file_names.sort(key=sort_key)
self.update_filename_box() self.update_filename_box()