Mercurial > pidgin.yaz
changeset 19425:4fced00fdc9f
merge of '3b5ffa9dc2dec5443f83a219ac14382a0e3ccf03'
and '6f352e89294bdd1ce546d3a5db327e7fc965b095'
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sat, 25 Aug 2007 05:41:25 +0000 |
parents | 1096aea98217 (diff) 93dfc16efbda (current diff) |
children | 6395c2e96bc2 5e76304ebcc8 |
files | |
diffstat | 13 files changed, 143 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Aug 25 05:40:12 2007 +0000 +++ b/ChangeLog Sat Aug 25 05:41:25 2007 +0000 @@ -1,5 +1,9 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul +version 2.1.2: + * New protocol plugin: MySpaceIM (Jeff Connelly, Google Summer of + Code) + version 2.1.1 (08/20/2007): Yahoo: * Added an account action to open your inbox in the yahoo prpl.
--- a/finch/gntsound.c Sat Aug 25 05:40:12 2007 +0000 +++ b/finch/gntsound.c Sat Aug 25 05:41:25 2007 +0000 @@ -996,6 +996,8 @@ pref_dialog->volume = slider = gnt_slider_new(FALSE, 100, 0); gnt_slider_set_step(GNT_SLIDER(slider), 5); + gnt_slider_set_small_step(GNT_SLIDER(slider), 1); + gnt_slider_set_large_step(GNT_SLIDER(slider), 20); label = gnt_label_new(""); gnt_slider_reflect_label(GNT_SLIDER(slider), GNT_LABEL(label)); gnt_box_set_pad(GNT_BOX(tmpbox), 1);
--- a/finch/libgnt/gntslider.c Sat Aug 25 05:40:12 2007 +0000 +++ b/finch/libgnt/gntslider.c Sat Aug 25 05:41:25 2007 +0000 @@ -125,22 +125,66 @@ step_back(GntBindable *bindable, GList *null) { GntSlider *slider = GNT_SLIDER(bindable); - if (slider->current <= slider->min) - return FALSE; gnt_slider_advance_step(slider, -1); return TRUE; } static gboolean +small_step_back(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->current - slider->smallstep); + return TRUE; +} + +static gboolean +large_step_back(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->current - slider->largestep); + return TRUE; +} + +static gboolean step_forward(GntBindable *bindable, GList *list) { GntSlider *slider = GNT_SLIDER(bindable); - if (slider->current >= slider->max) - return FALSE; gnt_slider_advance_step(slider, 1); return TRUE; } +static gboolean +small_step_forward(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->current + slider->smallstep); + return TRUE; +} + +static gboolean +large_step_forward(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->current + slider->largestep); + return TRUE; +} + +static gboolean +move_min_value(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->min); + return TRUE; +} + +static gboolean +move_max_value(GntBindable *bindable, GList *null) +{ + GntSlider *slider = GNT_SLIDER(bindable); + gnt_slider_set_value(slider, slider->max); + return TRUE; +} + static void gnt_slider_class_init(GntSliderClass *klass) { @@ -165,8 +209,14 @@ gnt_bindable_register_binding(bindable, "step-backward", GNT_KEY_DOWN, NULL); gnt_bindable_class_register_action(bindable, "step-forward", step_forward, GNT_KEY_RIGHT, NULL); gnt_bindable_register_binding(bindable, "step-forward", GNT_KEY_UP, NULL); - - /* XXX: how would home/end work? */ + gnt_bindable_class_register_action(bindable, "small-step-backward", small_step_back, GNT_KEY_CTRL_LEFT, NULL); + gnt_bindable_register_binding(bindable, "small-step-backward", GNT_KEY_CTRL_DOWN, NULL); + gnt_bindable_class_register_action(bindable, "small-step-forward", small_step_forward, GNT_KEY_CTRL_RIGHT, NULL); + gnt_bindable_register_binding(bindable, "small-step-forward", GNT_KEY_CTRL_UP, NULL); + gnt_bindable_class_register_action(bindable, "large-step-backward", large_step_back, GNT_KEY_PGDOWN, NULL); + gnt_bindable_class_register_action(bindable, "large-step-forward", large_step_forward, GNT_KEY_PGUP, NULL); + gnt_bindable_class_register_action(bindable, "min-value", move_min_value, GNT_KEY_HOME, NULL); + gnt_bindable_class_register_action(bindable, "max-value", move_max_value, GNT_KEY_END, NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); } @@ -233,10 +283,14 @@ void gnt_slider_set_value(GntSlider *slider, int value) { + int old; if (slider->current == value) return; + old = slider->current; slider->current = value; sanitize_value(slider); + if (old == slider->current) + return; redraw_slider(slider); slider_value_changed(slider); } @@ -248,10 +302,7 @@ int gnt_slider_advance_step(GntSlider *slider, int steps) { - slider->current += steps * slider->step; - sanitize_value(slider); - redraw_slider(slider); - slider_value_changed(slider); + gnt_slider_set_value(slider, slider->current + steps * slider->step); return slider->current; } @@ -260,6 +311,16 @@ slider->step = step; } +void gnt_slider_set_small_step(GntSlider *slider, int step) +{ + slider->smallstep = step; +} + +void gnt_slider_set_large_step(GntSlider *slider, int step) +{ + slider->largestep = step; +} + void gnt_slider_set_range(GntSlider *slider, int max, int min) { slider->max = MAX(max, min);
--- a/finch/libgnt/gntslider.h Sat Aug 25 05:40:12 2007 +0000 +++ b/finch/libgnt/gntslider.h Sat Aug 25 05:41:25 2007 +0000 @@ -56,6 +56,8 @@ int min; /* minimum value */ int step; /* amount to change at each step */ int current; /* current value */ + int smallstep; + int largestep; }; struct _GntSliderClass @@ -103,11 +105,27 @@ * Sets the amount of change at each step. * * @param slider The slider - * @param step The amount for each ste + * @param step The amount for each step */ void gnt_slider_set_step(GntSlider *slider, int step); /** + * Sets the amount of change a small step. + * + * @param slider The slider + * @param step The amount for a small step (for the slider) + */ +void gnt_slider_set_small_step(GntSlider *slider, int step); + +/** + * Sets the amount of change a large step. + * + * @param slider The slider + * @param step The amount for a large step (for the slider) + */ +void gnt_slider_set_large_step(GntSlider *slider, int step); + +/** * Advance the slider forward or backward. * * @param slider The slider
--- a/libpurple/Makefile.am Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/Makefile.am Sat Aug 25 05:41:25 2007 +0000 @@ -22,9 +22,9 @@ win32/giowin32.c \ win32/win32dep.h -if USE_GCONFTOOL -GCONF_DIR=gconf -endif +# if USE_GCONFTOOL +# GCONF_DIR=gconf +# endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = purple.pc
--- a/libpurple/network.c Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/network.c Sat Aug 25 05:41:25 2007 +0000 @@ -436,7 +436,7 @@ static gint wpurple_get_connected_network_count(void) { - guint net_cnt = 0; + gint net_cnt = 0; WSAQUERYSET qs; HANDLE h; @@ -521,7 +521,7 @@ HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion) = NULL; - + if (!(MyWSANSPIoctl = (void*) wpurple_find_and_loadproc("ws2_32.dll", "WSANSPIoctl"))) { g_thread_exit(NULL); return NULL; @@ -636,7 +636,7 @@ purple_network_get_handle(void) { static int handle; - + return &handle; } @@ -675,7 +675,7 @@ purple_signal_register(purple_network_get_handle(), "network-configuration-changed", purple_marshal_VOID, NULL, 0); - + purple_pmp_init(); purple_upnp_init(); }
--- a/libpurple/protocols/sametime/sametime.c Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sat Aug 25 05:41:25 2007 +0000 @@ -3183,13 +3183,12 @@ PurpleConnection *gc; struct mwPurplePluginData *pd; struct mwAwareIdBlock t = { mwAware_USER, b->name, NULL }; - const char *ret; - - gc = b->account->gc; - pd = gc->proto_data; - - ret = mwServiceAware_getText(pd->srvc_aware, &t); - + const char *ret = NULL; + + if ((gc = purple_account_get_connection(b->account)) + && (pd = gc->proto_data)) + ret = mwServiceAware_getText(pd->srvc_aware, &t); + return (ret && g_utf8_validate(ret, -1, NULL)) ? g_markup_escape_text(ret, -1): NULL; } @@ -3242,17 +3241,17 @@ static void mw_prpl_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full) { PurpleConnection *gc; - struct mwPurplePluginData *pd; + struct mwPurplePluginData *pd = NULL; struct mwAwareIdBlock idb = { mwAware_USER, b->name, NULL }; - const char *message; + const char *message = NULL; const char *status; char *tmp; - gc = b->account->gc; - pd = gc->proto_data; - - message = mwServiceAware_getText(pd->srvc_aware, &idb); + if ((gc = purple_account_get_connection(b->account)) + && (pd = gc->proto_data)) + message = mwServiceAware_getText(pd->srvc_aware, &idb); + status = status_text(b); if(message != NULL && g_utf8_validate(message, -1, NULL) && purple_utf8_strcasecmp(status, message)) { @@ -3264,7 +3263,7 @@ purple_notify_user_info_add_pair(user_info, _("Status"), status); } - if(full) { + if(full && pd != NULL) { tmp = user_supports_text(pd->srvc_aware, b->name); if(tmp) { purple_notify_user_info_add_pair(user_info, _("Supports"), tmp);
--- a/libpurple/request.c Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/request.c Sat Aug 25 05:41:25 2007 +0000 @@ -1172,7 +1172,7 @@ void * purple_request_choice(void *handle, const char *title, const char *primary, - const char *secondary, unsigned int default_value, + const char *secondary, int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -1197,7 +1197,7 @@ void * purple_request_choice_varg(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_value, + int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -1233,7 +1233,7 @@ void * purple_request_action(void *handle, const char *title, const char *primary, - const char *secondary, unsigned int default_action, + const char *secondary, int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, ...) { @@ -1254,7 +1254,7 @@ void * purple_request_action_varg(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_action, + int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions) {
--- a/libpurple/request.h Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/request.h Sat Aug 25 05:41:25 2007 +0000 @@ -190,13 +190,13 @@ PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); void *(*request_choice)(const char *title, const char *primary, - const char *secondary, unsigned int default_value, + const char *secondary, int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, va_list choices); void *(*request_action)(const char *title, const char *primary, - const char *secondary, unsigned int default_action, + const char *secondary, int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions); @@ -1215,7 +1215,7 @@ * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param ... The choices. This argument list should be * terminated with a NULL parameter. @@ -1224,7 +1224,7 @@ */ void *purple_request_choice(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_value, + int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -1246,7 +1246,7 @@ * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param choices The choices. This argument list should be * terminated with a @c NULL parameter. @@ -1255,7 +1255,7 @@ */ void *purple_request_choice_varg(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_value, + int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -1275,7 +1275,7 @@ * @param default_action The default value. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param action_count The number of actions. * @param ... A list of actions. These are pairs of @@ -1290,7 +1290,7 @@ */ void *purple_request_action(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_action, + int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, ...); @@ -1308,7 +1308,7 @@ * @param default_action The default value. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param action_count The number of actions. * @param actions A list of actions and callbacks. @@ -1317,7 +1317,7 @@ */ void *purple_request_action_varg(void *handle, const char *title, const char *primary, const char *secondary, - unsigned int default_action, + int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions); @@ -1338,7 +1338,7 @@ * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy associated with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. @@ -1411,7 +1411,7 @@ * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. @@ -1435,7 +1435,7 @@ * @param cancel_cb The callback for the @c Cancel button. * @param account The PurpleAccount associated with this request, or NULL if none is * @param who The username of the buddy assocaited with this request, or NULL if none is - * @param conv The PurpleConversation associated with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle.
--- a/libpurple/util.c Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/util.c Sat Aug 25 05:41:25 2007 +0000 @@ -1374,7 +1374,7 @@ g_string_free(cdata, TRUE); cdata = NULL; } - + } if(tags == tag) break; @@ -1425,7 +1425,7 @@ ALLOW_TAG("strong"); ALLOW_TAG("ul"); - + /* we skip <HR> because it's not legal in XHTML-IM. However, * we still want to send something sensible, so we put a * linebreak in its place. <BR> also needs special handling @@ -2539,7 +2539,7 @@ * people's settings if there is a problem writing the new values. */ gboolean -purple_util_write_data_to_file(const char *filename, const char *data, size_t size) +purple_util_write_data_to_file(const char *filename, const char *data, gssize size) { const char *user_dir = purple_user_dir(); gchar *filename_temp, *filename_full; @@ -4305,7 +4305,7 @@ } } -gboolean purple_message_meify(char *message, size_t len) +gboolean purple_message_meify(char *message, gssize len) { char *c; gboolean inside_html = FALSE;
--- a/libpurple/util.h Sat Aug 25 05:40:12 2007 +0000 +++ b/libpurple/util.h Sat Aug 25 05:41:25 2007 +0000 @@ -586,7 +586,7 @@ * @return TRUE if the file was written successfully. FALSE otherwise. */ gboolean purple_util_write_data_to_file(const char *filename, const char *data, - size_t size); + gssize size); /** * Read the contents of a given file and parse the results into an @@ -1113,7 +1113,7 @@ * @return TRUE if it starts with "/me ", and it has been removed, otherwise * FALSE */ -gboolean purple_message_meify(char *message, size_t len); +gboolean purple_message_meify(char *message, gssize len); /** * Removes the underscore characters from a string used identify the mnemonic
--- a/pidgin/gtkrequest.c Sat Aug 25 05:40:12 2007 +0000 +++ b/pidgin/gtkrequest.c Sat Aug 25 05:41:25 2007 +0000 @@ -442,7 +442,7 @@ static void * pidgin_request_choice(const char *title, const char *primary, - const char *secondary, unsigned int default_value, + const char *secondary, int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -548,7 +548,7 @@ static void * pidgin_request_action(const char *title, const char *primary, - const char *secondary, unsigned int default_action, + const char *secondary, int default_action, PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions) { @@ -1083,7 +1083,7 @@ data->cbs[0] = ok_cb; data->cbs[1] = cancel_cb; - + #ifdef _WIN32 data->dialog = win = pidgin_create_window(PIDGIN_ALERT_TITLE, PIDGIN_HIG_BORDER, "multifield", TRUE) ; #else /* !_WIN32 */
--- a/pidgin/plugins/spellchk.c Sat Aug 25 05:40:12 2007 +0000 +++ b/pidgin/plugins/spellchk.c Sat Aug 25 05:41:25 2007 +0000 @@ -667,7 +667,7 @@ return; } -static int buf_get_line(char *ibuf, char **buf, int *position, int len) +static int buf_get_line(char *ibuf, char **buf, int *position, gsize len) { int pos = *position; int spos = pos;