diff --git a/icons/ebook-edit.ico b/icons/ebook-edit.ico index e499af829a..6c850dbd82 100644 Binary files a/icons/ebook-edit.ico and b/icons/ebook-edit.ico differ diff --git a/icons/favicon.ico b/icons/favicon.ico index b8b7c1fd5e..892dc7ec00 100644 Binary files a/icons/favicon.ico and b/icons/favicon.ico differ diff --git a/icons/library.ico b/icons/library.ico index b8b7c1fd5e..892dc7ec00 100644 Binary files a/icons/library.ico and b/icons/library.ico differ diff --git a/icons/make_ico_files.py b/icons/make_ico_files.py index 8f1fc2fe7e..c7e7423a70 100644 --- a/icons/make_ico_files.py +++ b/icons/make_ico_files.py @@ -19,12 +19,15 @@ for name, src in sources.iteritems(): os.mkdir('ico_temp') try: names = [] - for sz in (16, 32, 48, 256): + for sz in (16, 24, 32, 48, 64, 256): iname = os.path.join('ico_temp', '{0}x{0}.png'.format(sz)) subprocess.check_call(['rsvg-convert', src, '-w', str(sz), '-h', str(sz), '-o', iname]) subprocess.check_call(['optipng', '-o7', '-strip', 'all', iname]) + if sz >= 128: + names.append('-r') # store as raw PNG to reduce size + else: + names.extend(['-t', '0']) # see https://bugzilla.gnome.org/show_bug.cgi?id=755200 names.append(iname) - names[-1:-1] = ['-r'] subprocess.check_call(['icotool', '-c', '--output=' + name+'.ico'] + names) finally: shutil.rmtree('ico_temp') diff --git a/icons/viewer.ico b/icons/viewer.ico index a4599ba598..7f229f9643 100644 Binary files a/icons/viewer.ico and b/icons/viewer.ico differ diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 0c84a66d14..9349511240 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -100,7 +100,7 @@ def init_qt(args): override = 'calibre-gui' if islinux else None app = Application(args, override_program_name=override) app.file_event_hook = EventAccumulator() - app.setWindowIcon(QIcon(I('lt.png', allow_user_override=False))) + app.setWindowIcon(QIcon(I('library.png', allow_user_override=False))) return app, opts, args @@ -462,6 +462,16 @@ def main(args=sys.argv): gui_debug = args[1] args = ['calibre'] + if iswindows: + # Ensure that all ebook editor instances are grouped together in the task + # bar. This prevents them from being grouped with viewer process when + # launched from within calibre, as both use calibre-parallel.exe + import ctypes + try: + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('com.calibre-ebook.main-gui') + except Exception: + pass # Only available on windows 7 and newer + try: app, opts, args = init_qt(args) except AbortInit: diff --git a/src/calibre/gui2/tweak_book/main.py b/src/calibre/gui2/tweak_book/main.py index fed5d43e20..535a8b0502 100644 --- a/src/calibre/gui2/tweak_book/main.py +++ b/src/calibre/gui2/tweak_book/main.py @@ -48,7 +48,7 @@ def _run(args, notify=None): import ctypes try: ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('com.calibre-ebook.edit-book') - except: + except Exception: pass # Only available on windows 7 and newer # The following two lines are needed to prevent circular imports causing diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 6a83ea11a4..1335846de3 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -134,6 +134,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ def __init__(self, opts, parent=None, gui_debug=None): global _gui MainWindow.__init__(self, opts, parent=parent, disable_automatic_gc=True) + self.setWindowIcon(QIcon(I('library.png', allow_user_override=False))) self.jobs_pointer = Pointer(self) self.proceed_requested.connect(self.do_proceed, type=Qt.QueuedConnection) diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index 7ebc95fd45..37a1bec7ff 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -16,7 +16,7 @@ from calibre.gui2 import ( Application, ORG_NAME, APP_UID, choose_files, info_dialog, error_dialog, open_url, setup_gui_option_parser) from calibre.ebooks.oeb.iterator.book import EbookIterator -from calibre.constants import islinux, filesystem_encoding, DEBUG +from calibre.constants import islinux, filesystem_encoding, DEBUG, iswindows from calibre.utils.config import Config, StringConfig, JSONConfig from calibre.customize.ui import available_input_formats from calibre import as_unicode, force_unicode, isbytestring, prints @@ -1207,6 +1207,15 @@ def main(args=sys.argv): # Ensure viewer can continue to function if GUI is closed os.environ.pop('CALIBRE_WORKER_TEMP_DIR', None) reset_base_dir() + if iswindows: + # Ensure that all ebook editor instances are grouped together in the task + # bar. This prevents them from being grouped with viewer process when + # launched from within calibre, as both use calibre-parallel.exe + import ctypes + try: + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('com.calibre-ebook.viewer') + except Exception: + pass # Only available on windows 7 and newer parser = option_parser() opts, args = parser.parse_args(args)