Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Fomin <fominde@gmail.com>2013-05-15 21:38:53 +0400
committerDenis Fomin <fominde@gmail.com>2013-05-15 21:38:53 +0400
commit20966ee5a5d4e8cb40665e3767efe0e6d4943ba0 (patch)
treeffc6ad678a79f292915645b928247ec51de91b5a
parentda695ed7a7d993e9ef0962bcbd7db6ef3061bcfc (diff)
BirthDayPlugin. porting to gtk3
-rw-r--r--birthday_reminder/__init__.py2
-rw-r--r--birthday_reminder/manifest.ini1
-rw-r--r--birthday_reminder/plugin.py9
3 files changed, 6 insertions, 6 deletions
diff --git a/birthday_reminder/__init__.py b/birthday_reminder/__init__.py
index 99840b0..a07a3bd 100644
--- a/birthday_reminder/__init__.py
+++ b/birthday_reminder/__init__.py
@@ -1 +1 @@
-from plugin import BirthDayPlugin
+from .plugin import BirthDayPlugin
diff --git a/birthday_reminder/manifest.ini b/birthday_reminder/manifest.ini
index fa523ea..9fa626d 100644
--- a/birthday_reminder/manifest.ini
+++ b/birthday_reminder/manifest.ini
@@ -5,3 +5,4 @@ version: 0.0.2
description: Birthday reminder plugin
authors: Evgeniy Popov <evgeniypopov@gmail.com>
homepage: https://bitbucket.org/axce1/bday
+min_gajim_version: 0.15.10
diff --git a/birthday_reminder/plugin.py b/birthday_reminder/plugin.py
index 6476685..60fb5c6 100644
--- a/birthday_reminder/plugin.py
+++ b/birthday_reminder/plugin.py
@@ -2,7 +2,7 @@ import os
import glob
import datetime
from xml.dom.minidom import *
-import gobject
+from gi.repository import GObject
from plugins import GajimPlugin
from plugins.helpers import log_calls
@@ -46,7 +46,7 @@ class BirthDayPlugin(GajimPlugin):
today = datetime.date.today()
- for key, value in date_dict.iteritems():
+ for key, value in date_dict.items():
try:
convert_date = datetime.datetime.strptime(value, "%Y-%m-%d")
user_bday = datetime.date(today.year, convert_date.month,
@@ -78,11 +78,10 @@ class BirthDayPlugin(GajimPlugin):
@log_calls('BirthDayPlugin')
def activate(self):
self.check_birthdays()
- self.timeout_id = gobject.timeout_add_seconds(24*3600,
+ self.timeout_id = GObject.timeout_add_seconds(24*3600,
self.check_birthdays)
@log_calls('BirthDayPlugin')
def deactivate(self):
if self.timeout_id > 0:
- gobject.source_remove(self.timeout_id)
-
+ GObject.source_remove(self.timeout_id)