mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
version 0.4.55
This commit is contained in:
parent
0966bcdcc1
commit
50a550794a
@ -13,3 +13,9 @@ src/calibre/manual/cli/
|
|||||||
build
|
build
|
||||||
dist
|
dist
|
||||||
docs
|
docs
|
||||||
|
src/calibre/gui2/pictureflow/Makefile.Debug
|
||||||
|
src/calibre/gui2/pictureflow/Makefile.Release
|
||||||
|
src/calibre/gui2/pictureflow/debug/
|
||||||
|
src/calibre/gui2/pictureflow/pictureflow_resource.rc
|
||||||
|
src/calibre/gui2/pictureflow/release/
|
||||||
|
|
||||||
|
3
setup.py
3
setup.py
@ -60,7 +60,8 @@ if __name__ == '__main__':
|
|||||||
author='Kovid Goyal',
|
author='Kovid Goyal',
|
||||||
author_email='kovid@kovidgoyal.net',
|
author_email='kovid@kovidgoyal.net',
|
||||||
url = 'http://%s.kovidgoyal.net'%APPNAME,
|
url = 'http://%s.kovidgoyal.net'%APPNAME,
|
||||||
package_data = {'': ['*.so.*', '*.so']},
|
package_data = {'calibre':['plugins/*']},
|
||||||
|
include_package_data=True,
|
||||||
entry_points = entry_points,
|
entry_points = entry_points,
|
||||||
zip_safe = False,
|
zip_safe = False,
|
||||||
options = { 'bdist_egg' : {'exclude_source_files': True,}, },
|
options = { 'bdist_egg' : {'exclude_source_files': True,}, },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
''' E-book management software'''
|
''' E-book management software'''
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
__version__ = '0.4.54'
|
__version__ = '0.4.55'
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid at kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid at kovidgoyal.net>"
|
||||||
__appname__ = 'calibre'
|
__appname__ = 'calibre'
|
||||||
@ -552,10 +552,10 @@ if islinux:
|
|||||||
os.chdir(plugins)
|
os.chdir(plugins)
|
||||||
try:
|
try:
|
||||||
import pictureflow
|
import pictureflow
|
||||||
except:
|
pictureflowerror = ''
|
||||||
import traceback
|
except Exception, err:
|
||||||
traceback.print_exc()
|
|
||||||
pictureflow = None
|
pictureflow = None
|
||||||
|
pictureflowerror = str(err)
|
||||||
|
|
||||||
if islinux:
|
if islinux:
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
'''
|
'''
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from PyQt4.QtCore import Qt
|
from PyQt4.QtCore import Qt, QCoreApplication
|
||||||
from PyQt4.QtGui import QDialog, QPixmap, QGraphicsScene, QIcon
|
from PyQt4.QtGui import QDialog, QPixmap, QGraphicsScene, QIcon
|
||||||
|
|
||||||
from calibre.gui2.dialogs.book_info_ui import Ui_BookInfo
|
from calibre.gui2.dialogs.book_info_ui import Ui_BookInfo
|
||||||
@ -25,6 +25,9 @@ class BookInfo(QDialog, Ui_BookInfo):
|
|||||||
Qt.SmoothTransformation)
|
Qt.SmoothTransformation)
|
||||||
|
|
||||||
self.setWindowTitle(info[_('Title')])
|
self.setWindowTitle(info[_('Title')])
|
||||||
|
desktop = QCoreApplication.instance().desktop()
|
||||||
|
screen_height = desktop.availableGeometry().height() - 100
|
||||||
|
self.resize(self.size().width(), screen_height)
|
||||||
self.title.setText('<b>'+info.pop(_('Title')))
|
self.title.setText('<b>'+info.pop(_('Title')))
|
||||||
self.comments.setText(info.pop(_('Comments'), ''))
|
self.comments.setText(info.pop(_('Comments'), ''))
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import os
|
import os, sys
|
||||||
import sipconfig
|
import sipconfig
|
||||||
from PyQt4 import pyqtconfig
|
from PyQt4 import pyqtconfig
|
||||||
|
|
||||||
@ -30,9 +30,10 @@ makefile = pyqtconfig.QtGuiModuleMakefile (
|
|||||||
# Add the library we are wrapping. The name doesn't include any platform
|
# Add the library we are wrapping. The name doesn't include any platform
|
||||||
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
|
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
|
||||||
# ".dll" extension on Windows).
|
# ".dll" extension on Windows).
|
||||||
makefile.extra_lib_dirs = ['../../.build']
|
makefile.extra_lib_dirs = ['../../.build', '..\\..\\release']
|
||||||
makefile.extra_libs = ["pictureflow"]
|
makefile.extra_libs = ['pictureflow0' if 'win' in sys.platform else "pictureflow"]
|
||||||
makefile.extra_lflags = ['-Wl,--rpath=.']
|
if 'linux' in sys.platform:
|
||||||
|
makefile.extra_lflags = ['-Wl,--rpath=.']
|
||||||
|
|
||||||
# Generate the Makefile itself.
|
# Generate the Makefile itself.
|
||||||
makefile.generate()
|
makefile.generate()
|
||||||
|
@ -35,7 +35,7 @@ class AbstractDelayedImage
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AbstractDelayedImage() : imageptr(0) {};
|
AbstractDelayedImage() : imageptr(0) {};
|
||||||
~AbstractDelayedImage() { free(); }
|
virtual ~AbstractDelayedImage() { free(); }
|
||||||
|
|
||||||
virtual bool load();
|
virtual bool load();
|
||||||
virtual void unload();
|
virtual void unload();
|
||||||
|
@ -105,9 +105,12 @@ class LocationDelegate(QAbstractItemDelegate):
|
|||||||
font.setPointSize(8)
|
font.setPointSize(8)
|
||||||
mode = QIcon.Active if active else QIcon.Selected if selected else QIcon.Normal
|
mode = QIcon.Active if active else QIcon.Selected if selected else QIcon.Normal
|
||||||
icon = QIcon(index.model().data(index, Qt.DecorationRole))
|
icon = QIcon(index.model().data(index, Qt.DecorationRole))
|
||||||
|
highlight = getattr(index.model(), 'highlight_row', -1) == index.row()
|
||||||
text = index.model().data(index, Qt.DisplayRole).toString()
|
text = index.model().data(index, Qt.DisplayRole).toString()
|
||||||
painter.save()
|
painter.save()
|
||||||
irect, trect = self.get_rects(index, option)
|
irect, trect = self.get_rects(index, option)
|
||||||
|
if highlight:
|
||||||
|
font.setItalic(True)
|
||||||
painter.setFont(font)
|
painter.setFont(font)
|
||||||
icon.paint(painter, irect, Qt.AlignHCenter|Qt.AlignTop, mode, QIcon.On)
|
icon.paint(painter, irect, Qt.AlignHCenter|Qt.AlignTop, mode, QIcon.On)
|
||||||
if selected:
|
if selected:
|
||||||
@ -121,7 +124,7 @@ class LocationDelegate(QAbstractItemDelegate):
|
|||||||
painter.setBrush(option.palette.highlightedText())
|
painter.setBrush(option.palette.highlightedText())
|
||||||
else:
|
else:
|
||||||
painter.setBrush(option.palette.text())
|
painter.setBrush(option.palette.text())
|
||||||
|
|
||||||
painter.drawText(QRectF(trect), Qt.AlignTop|Qt.AlignHCenter, text)
|
painter.drawText(QRectF(trect), Qt.AlignTop|Qt.AlignHCenter, text)
|
||||||
painter.restore()
|
painter.restore()
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ r'''<?xml version='1.0' encoding='windows-1252'?>
|
|||||||
|
|
||||||
class BuildEXE(build_exe):
|
class BuildEXE(build_exe):
|
||||||
manifest_resource_id = 0
|
manifest_resource_id = 0
|
||||||
QT_PREFIX = r'C:\\Qt\\4.3.3'
|
QT_PREFIX = r'C:\\Qt\\4.4.0'
|
||||||
MANIFEST_TEMPLATE = '''
|
MANIFEST_TEMPLATE = '''
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
@ -379,7 +379,32 @@ class BuildEXE(build_exe):
|
|||||||
</trustInfo>
|
</trustInfo>
|
||||||
</assembly>
|
</assembly>
|
||||||
'''
|
'''
|
||||||
|
def build_plugins(self):
|
||||||
|
cwd = os.getcwd()
|
||||||
|
try:
|
||||||
|
os.chdir(os.path.join('src', 'calibre', 'gui2', 'pictureflow'))
|
||||||
|
subprocess.check_call(['qmake', 'pictureflow-lib.pro'])
|
||||||
|
subprocess.check_call(['mingw32-make', '-f', 'Makefile.Release'])
|
||||||
|
os.chdir('PyQt')
|
||||||
|
if not os.path.exists('.build'):
|
||||||
|
os.mkdir('.build')
|
||||||
|
os.chdir('.build')
|
||||||
|
subprocess.check_call(['python', '..\\configure.py'])
|
||||||
|
subprocess.check_call(['mingw32-make', '-f', 'Makefile'])
|
||||||
|
dd = os.path.join(cwd, self.dist_dir)
|
||||||
|
shutil.copyfile('pictureflow.pyd', os.path.join(dd, 'pictureflow.pyd'))
|
||||||
|
os.chdir('..\\..')
|
||||||
|
shutil.copyfile('release\\pictureflow0.dll', os.path.join(dd, 'pictureflow0.dll'))
|
||||||
|
shutil.rmtree('Release', True)
|
||||||
|
shutil.rmtree('Debug', True)
|
||||||
|
finally:
|
||||||
|
os.chdir(cwd)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not os.path.exists(self.dist_dir):
|
||||||
|
os.makedirs(self.dist_dir)
|
||||||
|
print 'Building custom plugins...'
|
||||||
|
self.build_plugins()
|
||||||
build_exe.run(self)
|
build_exe.run(self)
|
||||||
qtsvgdll = None
|
qtsvgdll = None
|
||||||
for other in self.other_depends:
|
for other in self.other_depends:
|
||||||
@ -407,6 +432,8 @@ class BuildEXE(build_exe):
|
|||||||
if os.path.exists(tg):
|
if os.path.exists(tg):
|
||||||
shutil.rmtree(tg)
|
shutil.rmtree(tg)
|
||||||
shutil.copytree(imfd, tg)
|
shutil.copytree(imfd, tg)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print
|
print
|
||||||
print
|
print
|
||||||
|
Loading…
x
Reference in New Issue
Block a user