X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=purple.pyx;h=5ff3e775588bcc83799a992ea6932cc07beb95cb;hp=17411e78233f6ae7c2035846ba327b5f242f1219;hb=refs%2Fheads%2Fmaster;hpb=39c1c26cdc38fe7dc79122c45bba7731b08ed1cd diff --git a/purple.pyx b/purple.pyx index 17411e7..5ff3e77 100644 --- a/purple.pyx +++ b/purple.pyx @@ -22,7 +22,6 @@ cimport purple cdef extern from "c_purple.h": glib.guint glib_input_add(glib.gint fd, eventloop.PurpleInputCondition condition, eventloop.PurpleInputFunction function, glib.gpointer data) -import ecore import signal cdef glib.GHashTable *c_ui_info @@ -91,9 +90,6 @@ cdef class Purple: if default_path: util.purple_util_set_user_dir(default_path) - # adds glib iteration inside ecore main loop - ecore.timer_add(0.001, self.__glib_iteration_when_idle) - # libpurple's built-in DNS resolution forks processes to perform # blocking lookups without blocking the main process. It does not # handle SIGCHLD itself, so if the UI does not you quickly get an army @@ -169,10 +165,6 @@ cdef class Purple: glib.g_hash_table_insert(c_ui_info, "dev_website", c_ui_dev_website) return c_ui_info - def __glib_iteration_when_idle(self): - glib.g_main_context_iteration(NULL, False) - return True - def purple_init(self): '''Initializes the purple. @@ -303,7 +295,7 @@ cdef class Purple: "request": request_cbs }[type][name] = callback def signal_connect(self, name=None, cb=None): - '''Connects a signal handler to a signal for a particular object. + '''Connects a signal handler to a callback for a particular object. Take care not to register a handler function twice. Purple will not correct any mistakes for you in this area. @@ -418,6 +410,10 @@ cdef class Purple: return account_list + def iterate_main_loop(self): + glib.g_main_context_iteration(NULL, False) + return True + def protocols_get_all(self): '''Returns a list of all protocols. @@ -442,8 +438,5 @@ cdef class Purple: include "protocol.pyx" #include "plugin.pyx" include "proxy.pyx" -#include "protocol.pyx" include "account.pyx" -include "buddy.pyx" -#include "connection.pyx" include "conversation.pyx"