mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'py3' of https://github.com/eli-schwartz/calibre
This commit is contained in:
commit
bc9ac66ae2
@ -429,7 +429,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
b.setMinimumContentsLength(15)
|
b.setMinimumContentsLength(15)
|
||||||
|
|
||||||
for key in sorted(displayable_columns(fm),
|
for key in sorted(displayable_columns(fm),
|
||||||
key=lambda k: sort_key(fm[k]['name']) if k != color_row_key else 0):
|
key=lambda k: sort_key(fm[k]['name']) if k != color_row_key else b''):
|
||||||
if key == color_row_key and self.rule_kind != 'color':
|
if key == color_row_key and self.rule_kind != 'color':
|
||||||
continue
|
continue
|
||||||
name = all_columns_string if key == color_row_key else fm[key]['name']
|
name = all_columns_string if key == color_row_key else fm[key]['name']
|
||||||
|
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import glob, os, string, shutil
|
import glob, os, shutil
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from PyQt5.Qt import (
|
from PyQt5.Qt import (
|
||||||
QDialog, QVBoxLayout, QListWidget, QListWidgetItem, Qt, QIcon,
|
QDialog, QVBoxLayout, QListWidget, QListWidgetItem, Qt, QIcon,
|
||||||
@ -72,7 +72,7 @@ class TextureChooser(QDialog):
|
|||||||
images = [{
|
images = [{
|
||||||
'fname': ':'+os.path.basename(x),
|
'fname': ':'+os.path.basename(x),
|
||||||
'path': x,
|
'path': x,
|
||||||
'name': ' '.join(map(string.capitalize, os.path.splitext(os.path.basename(x))[0].split('_')))
|
'name': ' '.join(map(lambda s: s.capitalize(), os.path.splitext(os.path.basename(x))[0].split('_')))
|
||||||
} for x in glob.glob(I('textures/*.png'))] + [{
|
} for x in glob.glob(I('textures/*.png'))] + [{
|
||||||
'fname': os.path.basename(x),
|
'fname': os.path.basename(x),
|
||||||
'path': x,
|
'path': x,
|
||||||
@ -81,7 +81,8 @@ class TextureChooser(QDialog):
|
|||||||
|
|
||||||
images.sort(key=lambda x:sort_key(x['name']))
|
images.sort(key=lambda x:sort_key(x['name']))
|
||||||
|
|
||||||
map(self.create_item, images)
|
for i in images:
|
||||||
|
self.create_item(i)
|
||||||
self.update_remove_state()
|
self.update_remove_state()
|
||||||
|
|
||||||
if initial:
|
if initial:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user