annotate finch/libgnt/pygnt/dbus-gnt @ 16146:7a22ddc43685

Adding the real name for JensenDied.
author Richard Laager <rlaager@wiktel.com>
date Sun, 15 Apr 2007 18:19:33 +0000
parents 598b1b15b199
children 5e1412f4e67a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 #!/usr/bin/env python
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 # This script requires Python 2.4 and pygnt bindings
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 #
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 # Note that all function names are resolved dynamically, no
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 # purple-specific library is needed.
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 import dbus
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 import dbus.glib
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 import dbus.decorators
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 import gobject
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 import os
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 import gnt
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 from time import strftime
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 convwins = {}
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 def buddysignedon():
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 pass
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 def conv_closed(conv):
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 key = get_dict_key(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24 stuff = convwins[key]
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 stuff[0].destroy()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 convwins[key] = None
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 def wrote_msg(account, who, msg, conv, flags):
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 stuff = show_conversation(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 tv = stuff[1]
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31 tv.append_text_with_flags("\n", 0)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32 tv.append_text_with_flags(strftime("(%X) "), 8)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33 tv.append_text_with_flags(who + ": ", 1)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34 tv.append_text_with_flags(msg, 0)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35 tv.scroll(0)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 gnt.gnt_init()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 bus = dbus.SessionBus()
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
40 obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
41 purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 bus.add_signal_receiver(buddysignedon,
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
44 dbus_interface = "im.pidgin.purple.PurpleInterface",
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
45 signal_name = "BuddySignedOn")
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
46
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
47 bus.add_signal_receiver(wrote_msg,
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
48 dbus_interface = "im.pidgin.purple.PurpleInterface",
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
49 signal_name = "WroteImMsg")
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51 bus.add_signal_receiver(wrote_msg,
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
52 dbus_interface = "im.pidgin.purple.PurpleInterface",
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 signal_name = "WroteChatMsg")
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 bus.add_signal_receiver(conv_closed,
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15929
diff changeset
56 dbus_interface = "im.pidgin.purple.PurpleInterface",
15929
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 signal_name = "DeletingConversation")
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59 def get_dict_key(conv):
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
60 val = purple.PurpleConversationGetName(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61 return val
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
63 def send_im_cb(entry, key, conv):
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
64 if key[0] == '\r':
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
65 # XXX: do something about the / commands
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
66 type = purple.PurpleConversationGetType(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
67 if type == 1:
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
68 imdata = purple.PurpleConversationGetImData(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
69 purple.PurpleConvImSend(imdata, entry.get_text())
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
70 else:
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
71 chatdata = purple.PurpleConversationGetChatData(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72 purple.PurpleConvChatSend(chatdata, entry.get_text())
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73 entry.clear()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75 def show_conversation(conv):
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 key = get_dict_key(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77 if key in convwins:
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 return convwins[key]
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79 win = gnt.Window()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 vbox = gnt.Box(0, 1)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81 win.add_widget(vbox)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82 win.set_title(purple.PurpleConversationGetName(conv))
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
83 win.set_pad(0)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
84 vbox.set_pad(0)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
85 tv = gnt.TextView()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
86 entry = gnt.Entry("")
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
87 vbox.add_widget(tv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
88 entry.set_size(40, 1)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
89 vbox.add_widget(entry)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
90 entry.connect("key_pressed", send_im_cb, conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
91 tv.clear()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
92 win.show()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
93 convwins[key] = [win, tv, entry]
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
94 return convwins[key]
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
95
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
96 convs = purple.PurpleGetConversations()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
97 for conv in convs:
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98 show_conversation(conv)
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
100 gnt.gnt_main()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
101
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
102 gnt.gnt_quit()
8fd5ab3f9716 python bindings for libgnt. dbus-gnt is a gnt-ui (sort of) for gaim over dbus. It allows continuing with the currently opened conversations. pygnt/README.txt explains what to do. Use at your own risk.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
103