From 19bab6832e2f880b1543e83e25a40e8cc4d1732d Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Fri, 3 Feb 2006 01:15:03 +0000 Subject: [PATCH] also commit glade file --- src/common/helpers.py | 21 +++ src/history_manager.glade | 344 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 src/history_manager.glade diff --git a/src/common/helpers.py b/src/common/helpers.py index 1b35204e5..c35368b4a 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -533,3 +533,24 @@ def decode_string(string): break return string + +def read_about_me_from_eds(): + '''reads gnome-about-me information from Evolution Database''' + path_to_db = os.path.expanduser( + '~/.evolution/addressbook/local/system/addressbook.db') + if not os.path.exists(path_to_db): + return + + import dbhash + db = dbhash.open(path_to_db) + db.next() # throw to garbage first row (has db meta info) + for i in xrange(1, len(db)): + row = db.next() + if len(row) >= 2: # row[0] is key, row[1] has data + data = row[1] + if data.find('X-EVOLUTION-FILE-AS:Myself') == -1: + continue + nickname_start = data.find('NICKNAME:') + 9 # 9 = len('NICKNAME:') + nickname_end = data.find('\r\n', nickname_start) + nickname = data[nickname_start:nickname_end] + print nickname diff --git a/src/history_manager.glade b/src/history_manager.glade new file mode 100644 index 000000000..8da8c1c59 --- /dev/null +++ b/src/history_manager.glade @@ -0,0 +1,344 @@ + + + + + + + 6 + Gajim History Logs Manager + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 650 + 500 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + + + + + True + False + 6 + + + + True + True + 200 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + True + False + True + False + False + False + + + + + + True + False + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + True + False + False + False + False + False + + + + + True + True + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_END + 6 + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-find + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Search Database + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-clear + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Remove Contact Logs + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + + True + False + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-delete + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Remove Message(s) + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + True + + + + + + +