Mercurial > pidgin.yaz
changeset 32412:e86e00f77ca4
merge of '832455fec73731ef93c992a46f78b79981bb4105'
and '9d78a21f49219b234b21c2dd2023c4ad160a2c9c'
author | andrew.victor@mxit.com |
---|---|
date | Thu, 25 Aug 2011 06:40:04 +0000 |
parents | 16b33ffd75f8 (diff) e4ae42f9da68 (current diff) |
children | 022a82d394c2 |
files | |
diffstat | 7 files changed, 80 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnsquery.c Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/dnsquery.c Thu Aug 25 06:40:04 2011 +0000 @@ -297,6 +297,10 @@ } rc = read(child_in, &dns_params, sizeof(dns_params_t)); if (rc < 0) { + if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { + /* Try again */ + continue; + } fprintf(stderr, "dns[%d]: Error: Could not read dns_params: " "%s\n", getpid(), strerror(errno)); break;
--- a/libpurple/pounce.c Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/pounce.c Thu Aug 25 06:40:04 2011 +0000 @@ -32,6 +32,31 @@ #include "pounce.h" #include "util.h" +/** + * A buddy pounce structure. + * + * Buddy pounces are actions triggered by a buddy-related event. For + * example, a sound can be played or an IM window opened when a buddy + * signs on or returns from away. Such responses are handled in the + * UI. The events themselves are done in the core. + */ +struct _PurplePounce +{ + char *ui_type; /**< The type of UI. */ + + PurplePounceEvent events; /**< The event(s) to pounce on. */ + PurplePounceOption options; /**< The pounce options */ + PurpleAccount *pouncer; /**< The user who is pouncing. */ + + char *pouncee; /**< The buddy to pounce on. */ + + GHashTable *actions; /**< The registered actions. */ + + gboolean save; /**< Whether or not the pounce should + be saved after activation. */ + void *data; /**< Pounce-specific data. */ +}; + typedef struct { GString *buffer;
--- a/libpurple/pounce.h Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/pounce.h Thu Aug 25 06:40:04 2011 +0000 @@ -59,31 +59,6 @@ /** A pounce callback. */ typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *); -/** - * A buddy pounce structure. - * - * Buddy pounces are actions triggered by a buddy-related event. For - * example, a sound can be played or an IM window opened when a buddy - * signs on or returns from away. Such responses are handled in the - * UI. The events themselves are done in the core. - */ -struct _PurplePounce -{ - char *ui_type; /**< The type of UI. */ - - PurplePounceEvent events; /**< The event(s) to pounce on. */ - PurplePounceOption options; /**< The pounce options */ - PurpleAccount *pouncer; /**< The user who is pouncing. */ - - char *pouncee; /**< The buddy to pounce on. */ - - GHashTable *actions; /**< The registered actions. */ - - gboolean save; /**< Whether or not the pounce should - be saved after activation. */ - void *data; /**< Pounce-specific data. */ -}; - #ifdef __cplusplus extern "C" { #endif
--- a/libpurple/status.c Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/status.c Thu Aug 25 06:40:04 2011 +0000 @@ -763,29 +763,29 @@ specified_attr_ids = g_list_prepend(specified_attr_ids, (gpointer)id); - if (value->type == PURPLE_TYPE_STRING) + if (purple_value_get_type(value) == PURPLE_TYPE_STRING) { const gchar *string_data = l->data; l = l->next; - if (purple_strequal(string_data, value->data.string_data)) + if (purple_strequal(string_data, purple_value_get_string(value))) continue; purple_status_set_attr_string(status, id, string_data); changed = TRUE; } - else if (value->type == PURPLE_TYPE_INT) + else if (purple_value_get_type(value) == PURPLE_TYPE_INT) { int int_data = GPOINTER_TO_INT(l->data); l = l->next; - if (int_data == value->data.int_data) + if (int_data == purple_value_get_int(value)) continue; purple_status_set_attr_int(status, id, int_data); changed = TRUE; } - else if (value->type == PURPLE_TYPE_BOOLEAN) + else if (purple_value_get_type(value) == PURPLE_TYPE_BOOLEAN) { gboolean boolean_data = GPOINTER_TO_INT(l->data); l = l->next; - if (boolean_data == value->data.boolean_data) + if (boolean_data == purple_value_get_boolean(value)) continue; purple_status_set_attr_boolean(status, id, boolean_data); changed = TRUE; @@ -809,7 +809,7 @@ if (!g_list_find_custom(specified_attr_ids, attr->id, (GCompareFunc)strcmp)) { PurpleValue *default_value; default_value = purple_status_attr_get_value(attr); - if (default_value->type == PURPLE_TYPE_STRING) { + if (purple_value_get_type(default_value) == PURPLE_TYPE_STRING) { const char *cur = purple_status_get_attr_string(status, attr->id); const char *def = purple_value_get_string(default_value); if ((cur == NULL && def == NULL) @@ -819,14 +819,14 @@ } purple_status_set_attr_string(status, attr->id, def); - } else if (default_value->type == PURPLE_TYPE_INT) { + } else if (purple_value_get_type(default_value) == PURPLE_TYPE_INT) { int cur = purple_status_get_attr_int(status, attr->id); int def = purple_value_get_int(default_value); if (cur == def) continue; purple_status_set_attr_int(status, attr->id, def); - } else if (default_value->type == PURPLE_TYPE_BOOLEAN) { + } else if (purple_value_get_type(default_value) == PURPLE_TYPE_BOOLEAN) { gboolean cur = purple_status_get_attr_boolean(status, attr->id); gboolean def = purple_value_get_boolean(default_value); if (cur == def)
--- a/libpurple/value.c Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/value.c Thu Aug 25 06:40:04 2011 +0000 @@ -29,6 +29,44 @@ #define OUTGOING_FLAG 0x01 +/** + * A wrapper for a type, subtype, and specific type of value. + */ +struct _PurpleValue +{ + PurpleType type; + unsigned short flags; + + union + { + char char_data; + unsigned char uchar_data; + gboolean boolean_data; + short short_data; + unsigned short ushort_data; + int int_data; + unsigned int uint_data; + long long_data; + unsigned long ulong_data; + gint64 int64_data; + guint64 uint64_data; + char *string_data; + void *object_data; + void *pointer_data; + int enum_data; + void *boxed_data; + + } data; + + union + { + unsigned int subtype; + char *specific_type; + + } u; + +}; + PurpleValue * purple_value_new(PurpleType type, ...) {
--- a/libpurple/value.h Wed Aug 24 06:45:30 2011 +0000 +++ b/libpurple/value.h Thu Aug 25 06:40:04 2011 +0000 @@ -86,40 +86,7 @@ /** * A wrapper for a type, subtype, and specific type of value. */ -typedef struct -{ - PurpleType type; - unsigned short flags; - - union - { - char char_data; - unsigned char uchar_data; - gboolean boolean_data; - short short_data; - unsigned short ushort_data; - int int_data; - unsigned int uint_data; - long long_data; - unsigned long ulong_data; - gint64 int64_data; - guint64 uint64_data; - char *string_data; - void *object_data; - void *pointer_data; - int enum_data; - void *boxed_data; - - } data; - - union - { - unsigned int subtype; - char *specific_type; - - } u; - -} PurpleValue; +typedef struct _PurpleValue PurpleValue; #ifdef __cplusplus extern "C" {
--- a/pidgin/gtkutils.c Wed Aug 24 06:45:30 2011 +0000 +++ b/pidgin/gtkutils.c Thu Aug 25 06:40:04 2011 +0000 @@ -3246,9 +3246,9 @@ { gchar *escaped = g_shell_quote(uri); gchar *param = g_strconcat("/select,\"", uri, "\"", NULL); - gchar *wc_param = g_utf8_to_utf16(param, -1, NULL, NULL, NULL); - - code = (int)ShellExecuteW(NULL, "OPEN", L"explorer.exe", wc_param, NULL, SW_NORMAL); + wchar_t *wc_param = g_utf8_to_utf16(param, -1, NULL, NULL, NULL); + + code = (int)ShellExecuteW(NULL, L"OPEN", L"explorer.exe", wc_param, NULL, SW_NORMAL); g_free(wc_param); g_free(param);