From 20966ee5a5d4e8cb40665e3767efe0e6d4943ba0 Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
Date: Wed, 15 May 2013 21:38:53 +0400
Subject: [PATCH] BirthDayPlugin. porting to gtk3

---
 birthday_reminder/__init__.py  | 2 +-
 birthday_reminder/manifest.ini | 1 +
 birthday_reminder/plugin.py    | 9 ++++-----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/birthday_reminder/__init__.py b/birthday_reminder/__init__.py
index 99840b09..a07a3bdb 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 fa523ea1..9fa626d4 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 6476685b..60fb5c6f 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)
-- 
GitLab