X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=protocol.pyx;h=afde2ccb284e276ef480c49d29ba82b76b151ae2;hp=c348d7fc1b6ee420aba9a46e93936c2e16e42be4;hb=refs%2Fheads%2Fmaster;hpb=33bcafac77ebb7410c058807d64eaad2c33771f9
diff --git a/protocol.pyx b/protocol.pyx
index c348d7f..afde2cc 100644
--- a/protocol.pyx
+++ b/protocol.pyx
@@ -17,7 +17,15 @@
# along with this program. If not, see .
#
-cimport purple
+cimport glib
+
+cimport accountopt
+cimport plugin
+cimport prefs
+cimport prpl
+
+cdef extern from *:
+ ctypedef char const_char "const char"
cdef class Protocol:
"""
@@ -120,17 +128,14 @@ cdef class Protocol:
if type == prefs.PURPLE_PREF_STRING:
str_value = accountopt.purple_account_option_get_default_string(option)
- # Google Talk default domain hackery!
- if str_value == NULL and sett == "connect_server":
- str_value = "talk.google.com"
-
+ # Hack to set string "" as default value when the
+ # protocol's option is NULL
+ if str_value == NULL:
+ str_value = ""
val = str( str_value)
elif type == prefs.PURPLE_PREF_INT:
int_value = accountopt.purple_account_option_get_default_int(option)
- if sett == "port":
- int_value = int(443)
-
val = int(int_value)
elif type == prefs.PURPLE_PREF_BOOLEAN: