diff --git a/Mailnag/common/credentialstore.py b/Mailnag/common/credentialstore.py index 25c4451..10d082d 100644 --- a/Mailnag/common/credentialstore.py +++ b/Mailnag/common/credentialstore.py @@ -3,7 +3,7 @@ # # credentialstore.py # -# Copyright 2015 Patrick Ulbrich +# Copyright 2015, 2016 Patrick Ulbrich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,6 +35,8 @@ class CredentialStoreType: _credentialstoretype = CredentialStoreType.NONE try: + import gi + gi.require_version('GnomeKeyring', '1.0') from gi.repository import GnomeKeyring _credentialstoretype = CredentialStoreType.GNOME except: pass diff --git a/Mailnag/configuration/accountdialog.py b/Mailnag/configuration/accountdialog.py index 5eb645c..244a9b0 100644 --- a/Mailnag/configuration/accountdialog.py +++ b/Mailnag/configuration/accountdialog.py @@ -3,7 +3,7 @@ # # accountdialog.py # -# Copyright 2011 - 2015 Patrick Ulbrich +# Copyright 2011 - 2016 Patrick Ulbrich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +21,10 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') +gi.require_version('GLib', '2.0') + from gi.repository import GObject, GLib, Gtk from thread import start_new_thread from Mailnag.common.dist_cfg import PACKAGE_NAME diff --git a/Mailnag/configuration/configwindow.py b/Mailnag/configuration/configwindow.py index 08bc24a..e27b4c1 100644 --- a/Mailnag/configuration/configwindow.py +++ b/Mailnag/configuration/configwindow.py @@ -3,7 +3,7 @@ # # configwindow.py # -# Copyright 2011 - 2015 Patrick Ulbrich +# Copyright 2011 - 2016 Patrick Ulbrich # Copyright 2011 Ralf Hersel # # This program is free software; you can redistribute it and/or modify @@ -22,6 +22,10 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') +gi.require_version('GLib', '2.0') + import os import shutil import xdg.BaseDirectory as bd diff --git a/Mailnag/configuration/plugindialog.py b/Mailnag/configuration/plugindialog.py index c437b07..1afa776 100644 --- a/Mailnag/configuration/plugindialog.py +++ b/Mailnag/configuration/plugindialog.py @@ -21,6 +21,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') + from gi.repository import Gtk from Mailnag.common.i18n import _ diff --git a/Mailnag/plugins/libnotifyplugin.py b/Mailnag/plugins/libnotifyplugin.py index a8f013c..3e13a98 100644 --- a/Mailnag/plugins/libnotifyplugin.py +++ b/Mailnag/plugins/libnotifyplugin.py @@ -3,7 +3,7 @@ # # libnotifyplugin.py # -# Copyright 2013 - 2015 Patrick Ulbrich +# Copyright 2013 - 2016 Patrick Ulbrich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +21,12 @@ # MA 02110-1301, USA. # +import gi + +gi.require_version('Notify', '0.7') +gi.require_version('GLib', '2.0') +gi.require_version('Gtk', '3.0') + import os import dbus import threading diff --git a/Mailnag/plugins/soundplugin.py b/Mailnag/plugins/soundplugin.py index 822d86d..0ad4a12 100644 --- a/Mailnag/plugins/soundplugin.py +++ b/Mailnag/plugins/soundplugin.py @@ -3,7 +3,7 @@ # # soundplugin.py # -# Copyright 2013 - 2015 Patrick Ulbrich +# Copyright 2013 - 2016 Patrick Ulbrich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +21,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gst', '1.0') + import os import threading from gi.repository import Gst diff --git a/Mailnag/plugins/spamfilterplugin.py b/Mailnag/plugins/spamfilterplugin.py index bd6df93..0433b04 100644 --- a/Mailnag/plugins/spamfilterplugin.py +++ b/Mailnag/plugins/spamfilterplugin.py @@ -1,9 +1,9 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- # -# smamfilterplugin.py +# spamfilterplugin.py # -# Copyright 2013 - 2015 Patrick Ulbrich +# Copyright 2013 - 2016 Patrick Ulbrich # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,6 +21,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') + from gi.repository import Gtk from Mailnag.common.plugins import Plugin, HookTypes from Mailnag.common.i18n import _ diff --git a/Mailnag/plugins/userscriptplugin.py b/Mailnag/plugins/userscriptplugin.py index 5499686..9511ec9 100644 --- a/Mailnag/plugins/userscriptplugin.py +++ b/Mailnag/plugins/userscriptplugin.py @@ -21,6 +21,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') + import os from gi.repository import Gtk from Mailnag.common.plugins import Plugin, HookTypes diff --git a/mailnag b/mailnag index db3248c..59113b3 100755 --- a/mailnag +++ b/mailnag @@ -23,6 +23,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('GLib', '2.0') + from gi.repository import GObject, GLib from dbus.mainloop.glib import DBusGMainLoop import threading diff --git a/mailnag-config b/mailnag-config index 9e50c52..2eb4b66 100755 --- a/mailnag-config +++ b/mailnag-config @@ -22,6 +22,9 @@ # MA 02110-1301, USA. # +import gi +gi.require_version('Gtk', '3.0') + import os import subprocess from gi.repository import Gtk