Commit 26625480 authored by Nicolas Boulenguez's avatar Nicolas Boulenguez

Prepare upload 1.4.3-8 to unstable.

Ignore python-gtk2 if installed. Closes: #897380.
parent 4f7f76f9
taskcoach (1.4.3-8) unstable; urgency=medium
* Ignore python-gtk2 if installed. Closes: #897380.
-- Nicolas Boulenguez <nicolas@debian.org> Wed, 02 May 2018 19:16:31 +0200
taskcoach (1.4.3-7) unstable; urgency=medium
* Really disable parallel execution of upstream Makefile under xvfb.
......
Description: use gtk3 notification when available
Origin: https://sourceforge.net/p/taskcoach/bugs/1593
Bug-Debian: https://bugs.debian.org/897380
--- a/taskcoachlib/gui/printer.py
+++ b/taskcoachlib/gui/printer.py
@@ -25,8 +25,9 @@
# Prepare for printing. On Jolicloud, printing crashes unless we do this:
if operating_system.isGTK():
try:
- import gtk # pylint: disable=F0401
- gtk.remove_log_handlers()
+ if 'gtk3' not in wx.PlatformInfo:
+ import gtk # pylint: disable=F0401
+ gtk.remove_log_handlers()
except ImportError:
pass
--- a/taskcoachlib/notify/notifier_libnotify.py
+++ b/taskcoachlib/notify/notifier_libnotify.py
@@ -27,11 +27,17 @@
super(LibnotifyNotifier, self).__init__()
try:
- import pynotify
+ if 'gtk3' in wx.PlatformInfo:
+ import gi.repository.Notify
+ else:
+ import pynotify
except ImportError:
self.__notify = None
else:
- self.__notify = pynotify
+ if 'gtk3' in wx.PlatformInfo:
+ self.__notify = gi.repository.Notify
+ else:
+ self.__notify = pynotify
self.__notify.init(data.name)
def getName(self):
@@ -46,9 +52,14 @@
os.close(fd)
bitmap.SaveFile(filename, wx.BITMAP_TYPE_PNG)
try:
- n = self.__notify.Notification(title.encode('UTF-8'),
- summary.encode('UTF-8'),
- filename)
+ if 'gtk3' in wx.PlatformInfo:
+ n = self.__notify.Notification.new(title.encode('UTF-8'),
+ summary.encode('UTF-8'),
+ filename)
+ else:
+ n = self.__notify.Notification(title.encode('UTF-8'),
+ summary.encode('UTF-8'),
+ filename)
n.show()
finally:
os.remove(filename)
--- a/taskcoachlib/render.py
+++ b/taskcoachlib/render.py
@@ -29,6 +29,7 @@
import codecs
import locale
import re
+import wx
# pylint: disable=W0621
@@ -225,7 +226,8 @@
elif desktop.get_desktop() == 'KDE4':
try:
# Import gtk first because when it's imported indirectly it generates a RuntimeWarning.
- import gtk
+ if 'gtk3' not in wx.PlatformInfo:
+ import gtk
from PyKDE4.kdecore import KGlobal, KLocale
from PyQt4.QtCore import QTime, QDate
except ImportError:
--- a/taskcoachlib/thirdparty/smartdatetimectrl.py
+++ b/taskcoachlib/thirdparty/smartdatetimectrl.py
@@ -902,7 +902,8 @@
elif platform.system() == 'Linux':
try:
# Without this gtk import there's a warning if you try to import wx.lib.masked
- import gtk
+ if 'gtk3' not in wx.PlatformInfo:
+ import gtk
from PyKDE4.kdecore import KLocale, KGlobal
from PyQt4.QtCore import QTime
except ImportError:
......@@ -25,3 +25,5 @@ disable_failing_test.diff
missing-import-in-openfile.diff
reproducible_build.diff
twisted-version-compare.diff
gtk3_v3.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment