version 0.4.55

This commit is contained in:
Kovid Goyal 2008-05-16 18:31:29 -07:00
parent 0966bcdcc1
commit 50a550794a
8 changed files with 54 additions and 13 deletions

View File

@ -13,3 +13,9 @@ src/calibre/manual/cli/
build
dist
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/

View File

@ -60,7 +60,8 @@ if __name__ == '__main__':
author='Kovid Goyal',
author_email='kovid@kovidgoyal.net',
url = 'http://%s.kovidgoyal.net'%APPNAME,
package_data = {'': ['*.so.*', '*.so']},
package_data = {'calibre':['plugins/*']},
include_package_data=True,
entry_points = entry_points,
zip_safe = False,
options = { 'bdist_egg' : {'exclude_source_files': True,}, },

View File

@ -1,7 +1,7 @@
''' E-book management software'''
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
__version__ = '0.4.54'
__version__ = '0.4.55'
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid at kovidgoyal.net>"
__appname__ = 'calibre'
@ -552,10 +552,10 @@ if islinux:
os.chdir(plugins)
try:
import pictureflow
except:
import traceback
traceback.print_exc()
pictureflowerror = ''
except Exception, err:
pictureflow = None
pictureflowerror = str(err)
if islinux:
os.chdir(cwd)

View File

@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
'''
import textwrap
from PyQt4.QtCore import Qt
from PyQt4.QtCore import Qt, QCoreApplication
from PyQt4.QtGui import QDialog, QPixmap, QGraphicsScene, QIcon
from calibre.gui2.dialogs.book_info_ui import Ui_BookInfo
@ -25,6 +25,9 @@ class BookInfo(QDialog, Ui_BookInfo):
Qt.SmoothTransformation)
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.comments.setText(info.pop(_('Comments'), ''))

View File

@ -1,4 +1,4 @@
import os
import os, sys
import sipconfig
from PyQt4 import pyqtconfig
@ -30,9 +30,10 @@ makefile = pyqtconfig.QtGuiModuleMakefile (
# 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
# ".dll" extension on Windows).
makefile.extra_lib_dirs = ['../../.build']
makefile.extra_libs = ["pictureflow"]
makefile.extra_lflags = ['-Wl,--rpath=.']
makefile.extra_lib_dirs = ['../../.build', '..\\..\\release']
makefile.extra_libs = ['pictureflow0' if 'win' in sys.platform else "pictureflow"]
if 'linux' in sys.platform:
makefile.extra_lflags = ['-Wl,--rpath=.']
# Generate the Makefile itself.
makefile.generate()

View File

@ -35,7 +35,7 @@ class AbstractDelayedImage
{
public:
AbstractDelayedImage() : imageptr(0) {};
~AbstractDelayedImage() { free(); }
virtual ~AbstractDelayedImage() { free(); }
virtual bool load();
virtual void unload();

View File

@ -105,9 +105,12 @@ class LocationDelegate(QAbstractItemDelegate):
font.setPointSize(8)
mode = QIcon.Active if active else QIcon.Selected if selected else QIcon.Normal
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()
painter.save()
irect, trect = self.get_rects(index, option)
if highlight:
font.setItalic(True)
painter.setFont(font)
icon.paint(painter, irect, Qt.AlignHCenter|Qt.AlignTop, mode, QIcon.On)
if selected:
@ -121,7 +124,7 @@ class LocationDelegate(QAbstractItemDelegate):
painter.setBrush(option.palette.highlightedText())
else:
painter.setBrush(option.palette.text())
painter.drawText(QRectF(trect), Qt.AlignTop|Qt.AlignHCenter, text)
painter.restore()

View File

@ -357,7 +357,7 @@ r'''<?xml version='1.0' encoding='windows-1252'?>
class BuildEXE(build_exe):
manifest_resource_id = 0
QT_PREFIX = r'C:\\Qt\\4.3.3'
QT_PREFIX = r'C:\\Qt\\4.4.0'
MANIFEST_TEMPLATE = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
@ -379,7 +379,32 @@ class BuildEXE(build_exe):
</trustInfo>
</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):
if not os.path.exists(self.dist_dir):
os.makedirs(self.dist_dir)
print 'Building custom plugins...'
self.build_plugins()
build_exe.run(self)
qtsvgdll = None
for other in self.other_depends:
@ -407,6 +432,8 @@ class BuildEXE(build_exe):
if os.path.exists(tg):
shutil.rmtree(tg)
shutil.copytree(imfd, tg)
print
print