From a5e8a9dc69306990e57ae4bab258176f991edd22 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 22 Nov 2009 05:58:32 +0000 Subject: [PATCH] Only import `gtk` inside the GtkUi notifications implementation. Like this one won't need have `gtk` installed if only the daemon is running. --- deluge/plugins/notifications/notifications/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/plugins/notifications/notifications/common.py b/deluge/plugins/notifications/notifications/common.py index 0d82b50d5..ed88955f9 100644 --- a/deluge/plugins/notifications/notifications/common.py +++ b/deluge/plugins/notifications/notifications/common.py @@ -37,7 +37,6 @@ # statement from all source files in the program, then also delete it here. # -import gtk import smtplib from twisted.internet import defer, threads from deluge import component @@ -385,6 +384,7 @@ class GtkUiNotifications(CustomNotifications): return defer.succeed(_("Notification Blink shown")) def __popup(self, title='', message=''): + import gtk if not self.config['popup_enabled']: return defer.succeed(_("Popup notification is not enabled.")) if not POPUP_AVAILABLE: