Remove hardcoded PORT and SERVER values.
Signed-off-by: Dinorah Monteiro <dinorah.monteiro@openbossa.org>
Acked-by: Ragner Magalhaes <ragner.magalhaes@openbossa.org>
git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1454
596f6dd7-e928-0410-a184-
9e12fd12cf7e
str_value = <char *> accountopt.purple_account_option_get_default_string(option)
str_value = <char *> accountopt.purple_account_option_get_default_string(option)
- # Google Talk default domain hackery!
- if str_value == NULL and str(<char *> label_name) == "Connect server":
- str_value = "talk.google.com"
+ # Hack to set string "" as default value to Account options when
+ # the default value of the protocol is NULL
+ if str_value == NULL:
+ str_value = ""
str_value = <char *> account.purple_account_get_string(c_account, setting, str_value)
val = str(<char *> str_value)
str_value = <char *> account.purple_account_get_string(c_account, setting, str_value)
val = str(<char *> str_value)
if type == prefs.PURPLE_PREF_STRING:
str_value = accountopt.purple_account_option_get_default_string(option)
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 label == "Connect server":
- str_value = "talk.google.com"
if c_account != NULL:
str_value = account.purple_account_get_string(c_account, setting, str_value)
if c_account != NULL:
str_value = account.purple_account_get_string(c_account, setting, str_value)
elif type == prefs.PURPLE_PREF_INT:
int_value = accountopt.purple_account_option_get_default_int(option)
elif type == prefs.PURPLE_PREF_INT:
int_value = accountopt.purple_account_option_get_default_int(option)
- if sett == "port":
- int_value = int(443)
if c_account != NULL:
int_value = account.purple_account_get_int(c_account, setting, int_value)
if c_account != NULL:
int_value = account.purple_account_get_int(c_account, setting, int_value)
if type == prefs.PURPLE_PREF_STRING:
str_value = accountopt.purple_account_option_get_default_string(option)
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(<char *> str_value)
elif type == prefs.PURPLE_PREF_INT:
int_value = accountopt.purple_account_option_get_default_int(option)
val = str(<char *> 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:
val = int(int_value)
elif type == prefs.PURPLE_PREF_BOOLEAN: