summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
805e82e)
Adding _write_im_cb to update the conversation message at UI
Signed-off-by: Ragner Magalhaes <ragner.magalhaes@indt.org.br>
git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1333
596f6dd7-e928-0410-a184-
9e12fd12cf7e
time_t mtime):
debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
try:
time_t mtime):
debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
try:
- (<object>conversation_cbs["write_im"])("write_im")
+ (<object>conversation_cbs["write_im"])(conv.account.username, <char *> message)
conv_cbs["create_conversation"] = conv_callback
conv_cbs["destroy_conversation"] = conv_callback
conv_cbs["write_chat"] = conv_callback
conv_cbs["create_conversation"] = conv_callback
conv_cbs["destroy_conversation"] = conv_callback
conv_cbs["write_chat"] = conv_callback
-conv_cbs["write_im"] = conv_callback
conv_cbs["write_conv"] = conv_callback
conv_cbs["chat_add_users"] = conv_callback
conv_cbs["chat_rename_user"] = conv_callback
conv_cbs["write_conv"] = conv_callback
conv_cbs["chat_add_users"] = conv_callback
conv_cbs["chat_rename_user"] = conv_callback
class MainWindow:
def __init__(self, quit_cb):
class MainWindow:
def __init__(self, quit_cb):
self.bt_cbs = {}
self.quit_cb = quit_cb
self.bt_cbs = {}
self.quit_cb = quit_cb
+ conv_cbs["write_im"] = self._write_im_cb
def init_window(self):
# Main vbox
def init_window(self):
# Main vbox
vbox_txt_area = etk.VBox()
self.txt_area = etk.Label()
vbox_txt_area = etk.VBox()
self.txt_area = etk.Label()
+ self.txt_area.text = "<br> "
+
vbox_txt_area.append(self.txt_area, etk.VBox.START, etk.VBox.EXPAND_FILL, 0)
hbox_panel.append(vbox_txt_area, etk.HBox.START, etk.HBox.EXPAND_FILL, 0)
vbox_txt_area.append(self.txt_area, etk.VBox.START, etk.VBox.EXPAND_FILL, 0)
hbox_panel.append(vbox_txt_area, etk.HBox.START, etk.HBox.EXPAND_FILL, 0)
if callable(cb):
self.quit_cb = cb
if callable(cb):
self.quit_cb = cb
+ def _write_im_cb(self, name, message):
+ self.txt_area.text += str(name) + ": " + str(message) + "<br> "
+ self._window.show_all()
+
class NullClientPurple:
def __init__(self):
class NullClientPurple:
def __init__(self):
self.username = "carmanplugintest@gmail.com"
self.password = "abc123def"
self.username = "carmanplugintest@gmail.com"
self.password = "abc123def"
global cbs
global signal_cbs
cbs["blist"]["update"] = self._purple_blist_new_cb
global cbs
global signal_cbs
cbs["blist"]["update"] = self._purple_blist_new_cb
if __name__ == '__main__':
nullpurple = NullClientPurple()
if __name__ == '__main__':
nullpurple = NullClientPurple()
- ecore.main_loop_begin()
\ No newline at end of file
+ ecore.main_loop_begin()