From 653cbd13e76c529e27ba4c1fe1f0dd96405e9359 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Dec 2008 21:06:23 -0800 Subject: [PATCH] Fix regression affecting recipes that use the time module. Fix regression affecting creation of eggs for linux distribution. Fix #1455 (Growl Messages - Encoding of Umlaute) --- setup.py | 4 +++- .../images/news/{time.png => time_magazine.png} | Bin src/calibre/gui2/main.py | 2 +- src/calibre/gui2/status.py | 7 +++++-- src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/{time.py => time_magazine.py} | 0 6 files changed, 10 insertions(+), 5 deletions(-) rename src/calibre/gui2/images/news/{time.png => time_magazine.png} (100%) rename src/calibre/web/feeds/recipes/{time.py => time_magazine.py} (100%) diff --git a/setup.py b/setup.py index 51200de8e9..dbb422f1f3 100644 --- a/setup.py +++ b/setup.py @@ -402,6 +402,8 @@ if __name__ == '__main__': extra_link_args=['-framework', 'IOKit']) ) + plugins = ['plugins/%s.so'%(x.name.rpartition('.')[-1]) for x in ext_modules] + setup( name = APPNAME, packages = find_packages('src'), @@ -410,7 +412,7 @@ if __name__ == '__main__': author = 'Kovid Goyal', author_email = 'kovid@kovidgoyal.net', url = 'http://%s.kovidgoyal.net'%APPNAME, - package_data = {'calibre':['plugins/*']}, + package_data = {'calibre':plugins}, include_package_data = True, entry_points = entry_points, zip_safe = False, diff --git a/src/calibre/gui2/images/news/time.png b/src/calibre/gui2/images/news/time_magazine.png similarity index 100% rename from src/calibre/gui2/images/news/time.png rename to src/calibre/gui2/images/news/time_magazine.png diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index f87b827a82..4bbde629e5 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -120,7 +120,7 @@ class Main(MainWindow, Ui_MainWindow): self.hide() if self.isVisible() else self.show() self.connect(self.system_tray_icon, SIGNAL('activated(QSystemTrayIcon::ActivationReason)'), sta) def tcme(self, *args): - print args + pass self.tool_bar.contextMenuEvent = tcme ####################### Location View ######################## QObject.connect(self.location_view, SIGNAL('location_selected(PyQt_PyObject)'), diff --git a/src/calibre/gui2/status.py b/src/calibre/gui2/status.py index 221a6fd12b..31fd0c9112 100644 --- a/src/calibre/gui2/status.py +++ b/src/calibre/gui2/status.py @@ -5,7 +5,7 @@ import re, collections from PyQt4.QtGui import QStatusBar, QMovie, QLabel, QWidget, QHBoxLayout, QPixmap, \ QVBoxLayout, QSizePolicy, QToolButton, QIcon, QScrollArea, QFrame from PyQt4.QtCore import Qt, QSize, SIGNAL, QCoreApplication -from calibre import fit_image, preferred_encoding +from calibre import fit_image, preferred_encoding, isosx from calibre.gui2 import qstring_to_unicode class BookInfoDisplay(QWidget): @@ -196,9 +196,12 @@ class StatusBar(QStatusBar): self.book_info.show_data({}) def showMessage(self, msg, timeout=0): + ret = QStatusBar.showMessage(self, msg, timeout) if self.systray is not None: + if isosx and isinstance(msg, unicode): + msg = msg.encode(preferred_encoding) self.systray.showMessage('calibre', msg, self.systray.Information, 10000) - return QStatusBar.showMessage(self, msg, timeout) + return ret def jobs(self): src = qstring_to_unicode(self.movie_button.jobs.text()) diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 5634678e7a..019e6a2c97 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -19,7 +19,7 @@ recipe_modules = [ 'clarin', 'financial_times', 'heise', 'le_monde', 'harpers', 'science_aas', 'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation', 'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily', 'forbes', - 'time', 'endgadget', 'fudzilla', + 'time_magazine', 'endgadget', 'fudzilla', ] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/time.py b/src/calibre/web/feeds/recipes/time_magazine.py similarity index 100% rename from src/calibre/web/feeds/recipes/time.py rename to src/calibre/web/feeds/recipes/time_magazine.py