From: <fac...@us...> - 2006-11-26 22:03:28
|
Revision: 17823 http://svn.sourceforge.net/gaim/?rev=17823&view=rev Author: faceprint Date: 2006-11-26 14:03:23 -0800 (Sun, 26 Nov 2006) Log Message: ----------- baby steps: 4 unit tests for libgaim to run these, you'll need check (http://check.sf.net/) 0.9.4 or later installed they run when you run 'make check' Modified Paths: -------------- trunk/configure.ac trunk/libgaim/Makefile.am Added Paths: ----------- trunk/libgaim/tests/ trunk/libgaim/tests/Makefile.am trunk/libgaim/tests/check_libgaim.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-11-26 20:45:29 UTC (rev 17822) +++ trunk/configure.ac 2006-11-26 22:03:23 UTC (rev 17823) @@ -1807,6 +1807,14 @@ fi dnl ####################################################################### +dnl # Check for check +dnl ####################################################################### +PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check=yes, have_check=no) +AM_CONDITIONAL(HAVE_CHECK, test "x$have_check" = "xyes") +AC_SUBST(CHECK_CFLAGS) +AC_SUBST(CHECK_LIBS) + +dnl ####################################################################### dnl # Check for Doxygen and dot (part of GraphViz) dnl ####################################################################### AC_ARG_ENABLE(doxygen, @@ -1906,6 +1914,7 @@ libgaim/protocols/toc/Makefile libgaim/protocols/yahoo/Makefile libgaim/protocols/zephyr/Makefile + libgaim/tests/Makefile console/Makefile console/libgnt/Makefile console/libgnt/gnt.pc Modified: trunk/libgaim/Makefile.am =================================================================== --- trunk/libgaim/Makefile.am 2006-11-26 20:45:29 UTC (rev 17822) +++ trunk/libgaim/Makefile.am 2006-11-26 22:03:23 UTC (rev 17823) @@ -23,7 +23,7 @@ GCONF_DIR=gconf endif -SUBDIRS = $(GCONF_DIR) plugins protocols +SUBDIRS = $(GCONF_DIR) plugins protocols tests gaim_coresources = \ account.c \ Added: trunk/libgaim/tests/Makefile.am =================================================================== --- trunk/libgaim/tests/Makefile.am (rev 0) +++ trunk/libgaim/tests/Makefile.am 2006-11-26 22:03:23 UTC (rev 17823) @@ -0,0 +1,7 @@ +if HAVE_CHECK +TESTS = check_libgaim +check_PROGRAMS = check_libgaim +check_libgaim_SOURCES = check_libgaim.c $(top_builddir)/libgaim/gaim.h +check_libgaim_CFLAGS = @CHECK_CFLAGS@ $(GLIB_CFLAGS) +check_libgaim_LDADD = @CHECK_LIBS@ $(GLIB_LIBS) $(top_builddir)/libgaim/libgaim.la +endif Property changes on: trunk/libgaim/tests/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/libgaim/tests/check_libgaim.c =================================================================== --- trunk/libgaim/tests/check_libgaim.c (rev 0) +++ trunk/libgaim/tests/check_libgaim.c 2006-11-26 22:03:23 UTC (rev 17823) @@ -0,0 +1,69 @@ +#include <glib.h> +#include <check.h> +#include <stdlib.h> +#include "../util.h" + +START_TEST(test_util_base16_encode) +{ + gchar *out = gaim_base16_encode("hello, world!", 14); + fail_unless(strcmp("68656c6c6f2c20776f726c642100", out) == 0, NULL); + g_free(out); +} +END_TEST + +START_TEST(test_util_base16_decode) +{ + gsize sz = 0; + guchar *out = gaim_base16_decode("21646c726f77202c6f6c6c656800", &sz); + fail_unless(sz == 14, NULL); + fail_unless(strcmp("!dlrow ,olleh", out) == 0, NULL); + g_free(out); +} +END_TEST + +START_TEST(test_util_base64_encode) +{ + gchar *out = gaim_base64_encode("forty-two", 10); + fail_unless(strcmp("Zm9ydHktdHdvAA==",out) == 0, NULL); + g_free(out); +} +END_TEST + +START_TEST(test_util_base64_decode) +{ + gsize sz; + guchar *out = gaim_base64_decode("b3d0LXl0cm9mAA==", &sz); + fail_unless(sz == 10, NULL); + fail_unless(strcmp("owt-ytrof", out) == 0, NULL); + g_free(out); +} +END_TEST + +Suite * +util_suite(void) +{ + Suite *s = suite_create("Utility Functions"); + + TCase *tc = tcase_create("Base16"); + tcase_add_test(tc, test_util_base16_encode); + tcase_add_test(tc, test_util_base16_decode); + suite_add_tcase(s, tc); + + tc = tcase_create("Base64"); + tcase_add_test(tc, test_util_base64_encode); + tcase_add_test(tc, test_util_base64_decode); + suite_add_tcase(s, tc); + + return s; +} + +int main(void) +{ + int number_failed; + Suite *s = util_suite (); + SRunner *sr = srunner_create (s); + srunner_run_all (sr, CK_NORMAL); + number_failed = srunner_ntests_failed (sr); + srunner_free (sr); + return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} Property changes on: trunk/libgaim/tests/check_libgaim.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-11-27 22:34:49
|
Revision: 17831 http://svn.sourceforge.net/gaim/?rev=17831&view=rev Author: seanegan Date: 2006-11-27 14:34:46 -0800 (Mon, 27 Nov 2006) Log Message: ----------- - change "global proxy settings" to "GNOME proxy settings," when running GNOME - Make the docklet "click" event happen on mouse-up, rather than mouse-down (otherwise in "pending" mode, the mouse-up event will be sent to some other app, and it will think it's clicked. - Make Jabber not create a new dialog in response to closing a dialog. This is part of a larger change I'm working on to remove all authentication dialogs, and it just happened to be in this tree when I svn ci'ed, and I don't feel like reverting it ;) Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkdocklet-x11.c trunk/libgaim/protocols/jabber/presence.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-11-27 19:29:00 UTC (rev 17830) +++ trunk/gtk/gtkaccount.c 2006-11-27 22:34:46 UTC (rev 17831) @@ -865,7 +865,8 @@ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, - 0, _("Use Global Proxy Settings"), + 0, gaim_running_gnome() ? _("Use GNOME Proxy Settings") + :_("Use Global Proxy Settings"), 1, GAIM_PROXY_USE_GLOBAL, -1); Modified: trunk/gtk/gtkdocklet-x11.c =================================================================== --- trunk/gtk/gtkdocklet-x11.c 2006-11-27 19:29:00 UTC (rev 17830) +++ trunk/gtk/gtkdocklet-x11.c 2006-11-27 22:34:46 UTC (rev 17831) @@ -78,7 +78,7 @@ static void docklet_x11_clicked_cb(GtkWidget *button, GdkEventButton *event, void *data) { - if (event->type != GDK_BUTTON_PRESS) + if (event->type != GDK_BUTTON_RELEASE) return; gaim_gtk_docklet_clicked(event->button); @@ -260,7 +260,7 @@ g_signal_connect(G_OBJECT(docklet), "embedded", G_CALLBACK(docklet_x11_embedded_cb), NULL); g_signal_connect(G_OBJECT(docklet), "destroy", G_CALLBACK(docklet_x11_destroyed_cb), NULL); - g_signal_connect(G_OBJECT(box), "button-press-event", G_CALLBACK(docklet_x11_clicked_cb), NULL); + g_signal_connect(G_OBJECT(box), "button-release-event", G_CALLBACK(docklet_x11_clicked_cb), NULL); gtk_container_add(GTK_CONTAINER(box), image); gtk_container_add(GTK_CONTAINER(docklet), box); Modified: trunk/libgaim/protocols/jabber/presence.c =================================================================== --- trunk/libgaim/protocols/jabber/presence.c 2006-11-27 19:29:00 UTC (rev 17830) +++ trunk/libgaim/protocols/jabber/presence.c 2006-11-27 22:34:46 UTC (rev 17831) @@ -185,7 +185,7 @@ jabber_presence_subscription_set(jap->gc->proto_data, jap->who, "subscribed"); - +#if 0 buddy = gaim_find_buddy(jap->gc->account, jap->who); if (buddy) { @@ -206,7 +206,7 @@ gaim_account_request_add(jap->gc->account, jap->who, NULL, NULL, NULL); } - +#endif g_free(jap->who); g_free(jap); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-11-28 09:05:38
|
Revision: 17838 http://svn.sourceforge.net/gaim/?rev=17838&view=rev Author: thekingant Date: 2006-11-28 01:05:34 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Validate the IP address entered by the user in prefs before trying to use it. This should fix a few crashes. I feel like we could get rid of gaim_network_ip_atoi() and just use inet_aton() Modified Paths: -------------- trunk/gtk/gtkprefs.c trunk/libgaim/core.c trunk/libgaim/network.c Modified: trunk/gtk/gtkprefs.c =================================================================== --- trunk/gtk/gtkprefs.c 2006-11-28 08:44:12 UTC (rev 17837) +++ trunk/gtk/gtkprefs.c 2006-11-28 09:05:34 UTC (rev 17838) @@ -967,6 +967,11 @@ static void network_ip_changed(GtkEntry *entry, gpointer data) { + /* + * TODO: It would be nice if we could validate this and show a + * red background in the box when the IP address is invalid + * and a green background when the IP address is valid. + */ gaim_network_set_public_ip(gtk_entry_get_text(entry)); } Modified: trunk/libgaim/core.c =================================================================== --- trunk/libgaim/core.c 2006-11-28 08:44:12 UTC (rev 17837) +++ trunk/libgaim/core.c 2006-11-28 09:05:34 UTC (rev 17838) @@ -136,7 +136,10 @@ gaim_xfers_init(); gaim_idle_init(); - /* Call this early on to try to auto-detect our IP address */ + /* + * Call this early on to try to auto-detect our IP address and + * hopefully save some time later. + */ gaim_network_get_my_ip(-1); if (ops != NULL && ops->ui_init != NULL) Modified: trunk/libgaim/network.c =================================================================== --- trunk/libgaim/network.c 2006-11-28 08:44:12 UTC (rev 17837) +++ trunk/libgaim/network.c 2006-11-28 09:05:34 UTC (rev 17838) @@ -166,7 +166,8 @@ /* Check if the user specified an IP manually */ if (!gaim_prefs_get_bool("/core/network/auto_ip")) { ip = gaim_network_get_public_ip(); - if ((ip != NULL) && (*ip != '\0')) + /* Make sure the IP address entered by the user is valid */ + if ((ip != NULL) && (gaim_network_ip_atoi(ip) != NULL)) return ip; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-11-29 01:13:21
|
Revision: 17841 http://svn.sourceforge.net/gaim/?rev=17841&view=rev Author: seanegan Date: 2006-11-28 17:13:21 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Ok... let's throw this to the wild. Support for "So-and-so want's authorization" in the core. It creates a new mini-dialog in the blist for this with an Authorize and Deny button, which do as you might imagine. Clicking Authorize will also spawn an "Add buddy" dialog if that person isn't already a buddy. I'm not sure I like this, since I never add buddies that I authorize, but it seems the best option. I considered a checkbox in the dialog (but it only applies when you hit "Authorize," which could be weird), and a third "Authorize and Add" button (but that was too big for the blist). I'll come back to the UI later, I'm sure. I'd like to see that the prpl changes all work. Yahoo, especially, looked confusing, and had the most changes. I'm mostly happy with this. Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkscrollbook.c trunk/libgaim/account.c trunk/libgaim/account.h trunk/libgaim/protocols/jabber/presence.c trunk/libgaim/protocols/msn/userlist.c trunk/libgaim/protocols/oscar/oscar.c trunk/libgaim/protocols/yahoo/yahoo.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/gtk/gtkaccount.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -2358,20 +2358,104 @@ data->alias = g_strdup(alias); buffer = make_info(account, gc, remote_user, id, alias, msg); - alert = gaim_gtk_make_mini_dialog(gc, GAIM_STOCK_DIALOG_INFO, + alert = gaim_gtk_make_mini_dialog(gc, GAIM_STOCK_DIALOG_QUESTION, _("Add buddy to your list?"), buffer, data, - _("Cancel"), G_CALLBACK(free_add_user_data), - _("Add"), G_CALLBACK(add_user_cb), NULL); + _("Add"), G_CALLBACK(add_user_cb), + _("Cancel"), G_CALLBACK(free_add_user_data), NULL); gaim_gtk_blist_add_alert(alert); g_free(buffer); } +struct auth_and_add { + void(*auth_cb)(void*); + void(*deny_cb)(void*); + void *data; + char *username; + char *alias; + GaimAccount *account; +}; + +static void +authorize_and_add_cb(struct auth_and_add *aa) +{ + aa->auth_cb(aa->data); + gaim_blist_request_add_buddy(aa->account, aa->username, + NULL, aa->alias); + + g_free(aa->username); + g_free(aa->alias); + g_free(aa); +} + +static void +deny_no_add_cb(struct auth_and_add *aa) +{ + aa->deny_cb(aa->data); + + g_free(aa->username); + g_free(aa->alias); + g_free(aa); +} + +static void +gaim_gtk_accounts_request_authorization(GaimAccount *account, const char *remote_user, + const char *id, const char *alias, const char *message, + GCallback auth_cb, GCallback deny_cb, void *user_data) +{ + char *buffer; + GaimConnection *gc; + GtkWidget *alert; + + gc = gaim_account_get_connection(account); + if (message != NULL && *message == '\0') + message = NULL; + + buffer = g_strdup_printf(_("%s%s%s%s wants to add %s to his or her buddy list%s%s"), + remote_user, + (alias != NULL ? " (" : ""), + (alias != NULL ? alias : ""), + (alias != NULL ? ")" : ""), + (id != NULL + ? id + : (gaim_connection_get_display_name(gc) != NULL + ? gaim_connection_get_display_name(gc) + : gaim_account_get_username(account))), + (message != NULL ? ": " : "."), + (message != NULL ? message : "")); + + + if (!gaim_find_buddy(account, remote_user)) { + struct auth_and_add *aa = g_new0(struct auth_and_add, 1); + aa->auth_cb = auth_cb; + aa->deny_cb = deny_cb; + aa->data = user_data; + aa->username = g_strdup(remote_user); + aa->alias = g_strdup(alias); + aa->account = account; + alert = gaim_gtk_make_mini_dialog(gc, GAIM_STOCK_DIALOG_QUESTION, + _("Authorize buddy?"), buffer, aa, + _("Authorize"), authorize_and_add_cb, + _("Deny"), deny_no_add_cb, + NULL); + } else { + alert = gaim_gtk_make_mini_dialog(gc, GAIM_STOCK_DIALOG_QUESTION, + _("Authorize buddy?"), buffer, user_data, + _("Authorize"), auth_cb, + _("Deny"), deny_cb, + NULL); + } + gaim_gtk_blist_add_alert(alert); + + g_free(buffer); +} + static GaimAccountUiOps ui_ops = { gaim_gtk_accounts_notify_added, NULL, - gaim_gtk_accounts_request_add + gaim_gtk_accounts_request_add, + gaim_gtk_accounts_request_authorization }; GaimAccountUiOps * Modified: trunk/gtk/gtkscrollbook.c =================================================================== --- trunk/gtk/gtkscrollbook.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/gtk/gtkscrollbook.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -114,7 +114,7 @@ static void -page_count_change_cb(GtkNotebook *notebook, GtkGaimScrollBook *scroll_book) +page_count_change_cb(GtkGaimScrollBook *scroll_book) { int index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); #if GTK_CHECK_VERSION(2,2,0) @@ -183,7 +183,7 @@ gtk_box_pack_start(GTK_BOX(scroll_book), scroll_book->notebook, TRUE, TRUE, 0); - g_signal_connect(G_OBJECT(scroll_book->notebook), "add", G_CALLBACK(page_count_change_cb), scroll_book); + g_signal_connect_swapped(G_OBJECT(scroll_book->notebook), "add", G_CALLBACK(page_count_change_cb), scroll_book); g_signal_connect(G_OBJECT(scroll_book->notebook), "remove", G_CALLBACK(page_count_change_cb), scroll_book); g_signal_connect(G_OBJECT(scroll_book->notebook), "switch-page", G_CALLBACK(switch_page_cb), scroll_book); gtk_widget_hide(scroll_book->hbox); Modified: trunk/libgaim/account.c =================================================================== --- trunk/libgaim/account.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/account.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -1051,6 +1051,23 @@ ui_ops->request_add(account, remote_user, id, alias, message); } +void +gaim_account_request_authorization(GaimAccount *account, const char *remote_user, + const char *id, const char *alias, const char *message, + GCallback auth_cb, GCallback deny_cb, void *user_data) +{ + GaimAccountUiOps *ui_ops; + + g_return_if_fail(account != NULL); + g_return_if_fail(remote_user != NULL); + + ui_ops = gaim_accounts_get_ui_ops(); + + if (ui_ops != NULL && ui_ops->request_authorize != NULL) + ui_ops->request_authorize(account, remote_user, id, alias, message, auth_cb, deny_cb, user_data); + +} + static void change_password_cb(GaimAccount *account, GaimRequestFields *fields) { Modified: trunk/libgaim/account.h =================================================================== --- trunk/libgaim/account.h 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/account.h 2006-11-29 01:13:21 UTC (rev 17841) @@ -27,6 +27,7 @@ #ifndef _GAIM_ACCOUNT_H_ #define _GAIM_ACCOUNT_H_ +#include <glib-object.h> #include <glib.h> typedef struct _GaimAccountUiOps GaimAccountUiOps; @@ -51,6 +52,9 @@ void (*request_add)(GaimAccount *account, const char *remote_user, const char *id, const char *alias, const char *message); + void (*request_authorize)(GaimAccount *account, const char *remote_user, const char *id, + const char *alias, const char *message, + GCallback authorize_cb, GCallback deny_cb, void *user_data); }; struct _GaimAccount @@ -170,7 +174,28 @@ void gaim_account_request_add(GaimAccount *account, const char *remote_user, const char *id, const char *alias, const char *message); + /** + * Notifies the user that a remote user has wants to add the local user + * to his or her buddy list and requires authorization to d oso. + * + * This will present a dialog informing the usre of this and ask if the + * user authorizes or denies the remote user from adding him. + * + * @param account The account that was added + * @param remote_user The name of the usre that added this account. + * @param id The optional ID of the local account. Rarely used. + * @param alias The optional alias of the remote user. + * @param message The optional message sent from the uer requesting you + * @param auth_cb The callback called when the local user accepts + * @param deny_cb The callback called when the local user rejects + * @param user_data Data to be passed back to the above callbacks + */ +void gaim_account_request_authorization(GaimAccount *account, const char *remote_user, + const char *id, const char *alias, const char *message, + GCallback auth_cb, GCallback deny_cb, void *user_data); + +/** * Requests information from the user to change the account's password. * * @param account The account to change the password on. Modified: trunk/libgaim/protocols/jabber/presence.c =================================================================== --- trunk/libgaim/protocols/jabber/presence.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/protocols/jabber/presence.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -181,32 +181,8 @@ static void authorize_add_cb(struct _jabber_add_permit *jap) { - GaimBuddy *buddy = NULL; - jabber_presence_subscription_set(jap->gc->proto_data, jap->who, "subscribed"); -#if 0 - buddy = gaim_find_buddy(jap->gc->account, jap->who); - - if (buddy) { - JabberBuddy *jb = NULL; - - jb = jabber_buddy_find(jap->js, jap->who, TRUE); - - if ((jb->subscription & JABBER_SUB_TO) == 0) { - gaim_account_request_add(jap->gc->account, - jap->who, NULL, - NULL, NULL); - } else { - gaim_account_notify_added(jap->gc->account, - jap->who, NULL, - NULL, NULL); - } - } else { - gaim_account_request_add(jap->gc->account, jap->who, - NULL, NULL, NULL); - } -#endif g_free(jap->who); g_free(jap); } @@ -304,20 +280,13 @@ jb->error_msg = msg ? msg : g_strdup(_("Unknown Error in presence")); } else if(type && !strcmp(type, "subscribe")) { struct _jabber_add_permit *jap = g_new0(struct _jabber_add_permit, 1); - char *msg; - msg = g_strdup_printf(_("The user %s wants to add %s to his or " - "her buddy list."), - from, gaim_account_get_username(js->gc->account)); jap->gc = js->gc; jap->who = g_strdup(from); jap->js = js; - gaim_request_action(js->gc, NULL, msg, NULL, GAIM_DEFAULT_ACTION_NONE, - jap, 2, - _("_Authorize"), G_CALLBACK(authorize_add_cb), - _("_Deny"), G_CALLBACK(deny_add_cb)); - g_free(msg); + gaim_account_request_authorization(gaim_connection_get_account(js->gc), from, NULL, NULL, NULL, + G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); jabber_id_free(jid); return; } else if(type && !strcmp(type, "subscribed")) { Modified: trunk/libgaim/protocols/msn/userlist.c =================================================================== --- trunk/libgaim/protocols/msn/userlist.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/protocols/msn/userlist.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -42,19 +42,9 @@ { MsnSession *session = pa->gc->proto_data; MsnUserList *userlist = session->userlist; - GaimBuddy *buddy; msn_userlist_add_buddy(userlist, pa->who, MSN_LIST_AL, NULL); - buddy = gaim_find_buddy(pa->gc->account, pa->who); - - if (buddy != NULL) - gaim_account_notify_added(pa->gc->account, pa->who, - NULL, pa->friendly, NULL); - else - gaim_account_request_add(pa->gc->account, pa->who, - NULL, pa->friendly, NULL); - g_free(pa->who); g_free(pa->friendly); g_free(pa); @@ -77,35 +67,14 @@ got_new_entry(GaimConnection *gc, const char *passport, const char *friendly) { MsnPermitAdd *pa; - char *msg; pa = g_new0(MsnPermitAdd, 1); pa->who = g_strdup(passport); pa->friendly = g_strdup(friendly); pa->gc = gc; - - if (friendly != NULL) - { - msg = g_strdup_printf( - _("The user %s (%s) wants to add %s to his or her " - "buddy list."), - passport, friendly, - gaim_account_get_username(gc->account)); - } - else - { - msg = g_strdup_printf( - _("The user %s wants to add %s to his or " - "her buddy list."), - passport, gaim_account_get_username(gc->account)); - } - - gaim_request_action(gc, NULL, msg, NULL, - GAIM_DEFAULT_ACTION_NONE, pa, 2, - _("Authorize"), G_CALLBACK(msn_accept_add_cb), - _("Deny"), G_CALLBACK(msn_cancel_add_cb)); - - g_free(msg); + + gaim_account_request_authorization(gaim_connection_get_account(gc), passport, NULL, friendly, NULL, + msn_accept_add_cb, msn_cancel_add_cb, pa); } /************************************************************************** Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -2317,30 +2317,22 @@ struct name_data *data = g_new(struct name_data, 1); gchar *sn = g_strdup_printf("%u", args->uin); gchar *reason; - gchar *dialog_msg; if (msg2[5] != NULL) reason = gaim_plugin_oscar_decode_im_part(account, sn, AIM_CHARSET_CUSTOM, 0x0000, msg2[5], strlen(msg2[5])); else - reason = g_strdup(_("No reason given.")); + reason = NULL; - dialog_msg = g_strdup_printf(_("The user %u wants to add %s to their buddy list for the following reason:\n%s"), - args->uin, gaim_account_get_username(gc->account), reason); - g_free(reason); gaim_debug_info("oscar", "Received an authorization request from UIN %u\n", args->uin); data->gc = gc; data->name = sn; data->nick = NULL; - - gaim_request_action(gc, NULL, _("Authorization Request"), - dialog_msg, GAIM_DEFAULT_ACTION_NONE, data, - 2, _("_Authorize"), - G_CALLBACK(gaim_auth_grant), - _("_Deny"), - G_CALLBACK(gaim_auth_dontgrant_msgprompt)); - g_free(dialog_msg); + + gaim_account_request_authorization(gaim_connection_get_account(gc), sn, NULL, NULL, reason, + G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); + g_free(reason); } } break; @@ -5014,7 +5006,6 @@ GaimAccount *account = gaim_connection_get_account(gc); gchar *nombre; gchar *reason = NULL; - gchar *dialog_msg; struct name_data *data; GaimBuddy *buddy; @@ -5035,26 +5026,15 @@ if (msg != NULL) reason = gaim_plugin_oscar_decode_im_part(account, sn, AIM_CHARSET_CUSTOM, 0x0000, msg, strlen(msg)); - if (reason == NULL) - reason = g_strdup(_("No reason given.")); - - dialog_msg = g_strdup_printf( - _("The user %s wants to add %s to their buddy list for the following reason:\n%s"), - nombre, gaim_account_get_username(account), reason); - g_free(reason); - data = g_new(struct name_data, 1); data->gc = gc; data->name = g_strdup(sn); data->nick = NULL; - gaim_request_action(gc, NULL, _("Authorization Request"), dialog_msg, - GAIM_DEFAULT_ACTION_NONE, data, 2, - _("_Authorize"), G_CALLBACK(gaim_auth_grant), - _("_Deny"), G_CALLBACK(gaim_auth_dontgrant_msgprompt)); - - g_free(dialog_msg); + gaim_account_request_authorization(gaim_connection_get_account(gc), nombre, NULL, NULL, reason, + G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); g_free(nombre); + g_free(reason); return 1; } Modified: trunk/libgaim/protocols/yahoo/yahoo.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo.c 2006-11-28 21:29:12 UTC (rev 17840) +++ trunk/libgaim/protocols/yahoo/yahoo.c 2006-11-29 01:13:21 UTC (rev 17841) @@ -910,16 +910,7 @@ }; static void -yahoo_buddy_add_authorize_cb(struct yahoo_add_request *add_req, const char *msg) { - GaimBuddy *buddy = gaim_find_buddy(add_req->gc->account, add_req->who); - - if (buddy != NULL) - gaim_account_notify_added(add_req->gc->account, add_req->who, - add_req->id, NULL, add_req->msg); - else - gaim_account_request_add(add_req->gc->account, add_req->who, - add_req->id, NULL, add_req->msg); - +yahoo_buddy_add_authorize_cb(struct yahoo_add_request *add_req) { g_free(add_req->id); g_free(add_req->who); g_free(add_req->msg); @@ -956,6 +947,20 @@ g_free(add_req); } +static void +yahoo_buddy_add_deny_noreason_cb(struct yahoo_add_request *add_req, const char*msg) +{ + yahoo_buddy_add_deny_cb(add_req, NULL); +} + +static void +yahoo_buddy_add_deny_reason_cb(struct yahoo_add_request *add_req) { + gaim_request_input(add_req->gc, NULL, _("Authorization denied message:"), + NULL, _("No reason given."), TRUE, FALSE, NULL, + _("OK"), G_CALLBACK(yahoo_buddy_add_deny_cb), + _("Cancel"), G_CALLBACK(yahoo_buddy_add_deny_noreason_cb), add_req); +} + static void yahoo_buddy_added_us(GaimConnection *gc, struct yahoo_packet *pkt) { struct yahoo_add_request *add_req; char *msg = NULL; @@ -984,27 +989,16 @@ } if (add_req->id) { - char *prompt_msg; if (msg) add_req->msg = yahoo_string_decode(gc, msg, FALSE); - /* TODO: this is almost exactly the same as what MSN does, + /* DONE! this is almost exactly the same as what MSN does, * this should probably be moved to the core. */ - prompt_msg = g_strdup_printf(_("The user %s wants to add %s to " - "his or her buddy list%s%s."), - add_req->who, add_req->id, - add_req->msg ? ": " : "", - add_req->msg ? add_req->msg : ""); - gaim_request_input(gc, NULL, prompt_msg, - _("Message (optional) :"), - NULL, TRUE, FALSE, NULL, - _("Authorize"), G_CALLBACK( - yahoo_buddy_add_authorize_cb), - _("Deny"), G_CALLBACK( - yahoo_buddy_add_deny_cb), - add_req); - g_free(prompt_msg); + gaim_account_request_authorization(gaim_connection_get_account(gc), add_req->who, add_req->id, + NULL, add_req->msg, G_CALLBACK(yahoo_buddy_add_authorize_cb), + G_CALLBACK(yahoo_buddy_add_deny_reason_cb), + add_req); } else { g_free(add_req->id); g_free(add_req->who); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-11-29 23:47:08
|
Revision: 17849 http://svn.sourceforge.net/gaim/?rev=17849&view=rev Author: datallah Date: 2006-11-29 15:46:55 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Update the Perl HOWTO to include working samples and various other fixes. In order to actually do this, I had to also make some fixes to the perl bindings. Modified Paths: -------------- trunk/doc/PERL-HOWTO.dox trunk/gtk/plugins/perl/common/GtkConv.xs trunk/libgaim/plugins/perl/common/Account.xs trunk/libgaim/plugins/perl/common/PluginPref.xs Modified: trunk/doc/PERL-HOWTO.dox =================================================================== --- trunk/doc/PERL-HOWTO.dox 2006-11-29 22:43:54 UTC (rev 17848) +++ trunk/doc/PERL-HOWTO.dox 2006-11-29 23:46:55 UTC (rev 17849) @@ -1,9 +1,9 @@ /** @page perl-howto Perl Scripting HOWTO @section Introduction -Gaim Perl Plugins are setup very similarly to their C counterparts. Most of the API calls are implemented and are divided into pacakges. There are some significant differences between the Perl and C API. Much like the C API, the best place to seek guidances is the source located in the plugins/perl/common directory. The tutorial that follows will be example based and attempt to touch on the salient features of the embedded perl interpreter. It is also important to note that some of the C API is missing in Gaim's perl API. +Gaim Perl Plugins are setup very similarly to their C counterparts. Most of the API calls are implemented and are divided into pacakges. There are some significant differences between the Perl and C API. Much like the C API, the best place to seek guidances is the source located in the plugins/perl/common directory. The tutorial that follows will be example based and attempt to touch on the salient features of the embedded perl interpreter. It is also important to note that some of the C API is missing in Gaim's perl API. -It is possible to get Gtk2-Perl to work with Gaim's perl API, however you must not load the module with @c use but with @c require. If you are uninterested in using Gtk with your perl plugins than this still has bearing on you if you would like to use certain perl modules that are dynamically loaded. By always using @c require instead of @c use the problem is avoided. +It is possible to get Gtk2-Perl to work with Gaim's perl API, however you must not load the module with @c use but with @c require. If you are uninterested in using Gtk with your perl plugins than this still has bearing on you if you would like to use certain perl modules that are dynamically loaded. By always using @c require instead of @c use the problem is avoided. @section first-script Writing your first script @@ -13,38 +13,38 @@ use Gaim; %PLUGIN_INFO = ( - perl_api_version => 2, - name => "Perl Test Plugin", - version => "0.1", - summary => "Test plugin for the Perl interpreter.", - description => "Your description here", - author => "John H. Kelm <johnhkelm\@gmail.com", - url => "http://gaim.sourceforge.net/", + perl_api_version => 2, + name => "Perl Test Plugin", + version => "0.1", + summary => "Test plugin for the Perl interpreter.", + description => "Your description here", + author => "John H. Kelm <johnhkelm\@gmail.com", + url => "http://gaim.sourceforge.net/", - load => "plugin_load", - unload => "plugin_unload" + load => "plugin_load", + unload => "plugin_unload" ); sub plugin_init { - return %PLUGIN_INFO; + return %PLUGIN_INFO; } sub plugin_load { - my $plugin = shift; - Gaim::debug_info("plugin_load()", "Test Plugin Loaded."); + my $plugin = shift; + Gaim::Debug::info("testplugin", "plugin_load() - Test Plugin Loaded.\n"); } sub plugin_unload { - my $plugin = shift; - Gaim::debug_info("plugin_unload()", "Test Plugin Unloaded."); + my $plugin = shift; + Gaim::Debug::info("testplugin", "plugin_unload() - Test Plugin Unloaded.\n"); } @endcode -It is necessary to load the Gaim perl package with the line @code use Gaim; @endcode which will make all the Gaim perl API available to the script. The @c \%PLUGIN_INFO has contains all the information that will be displayed in the Plugin frame of the Preferences dialog. In addition to information needed to describe the plugin to the user, information about how the plugin is to be handled is present. The keys @c load and @c unload specify and action to take when the plugin is loaded and when it is unloaded from the Preferences dialog respectively. There are other key values that may be present in the @c \%PLUGIN_INFO hash that will be covered in the following sections. +It is necessary to load the libgaim perl package with the line @code use Gaim; @endcode which will make all the libgaim perl API available to the script. The @c \%PLUGIN_INFO has contains all the information that will be displayed in the Plugin frame of the Preferences dialog. In addition to information needed to describe the plugin to the user, information about how the plugin is to be handled is present. The keys @c load and @c unload specify and action to take when the plugin is loaded and when it is unloaded from the Preferences dialog respectively. There are other key values that may be present in the @c \%PLUGIN_INFO hash that will be covered in the following sections. -The Perl subroutine @c plugin_init is executed when the plugin is probed by the plugin subsystem. What this means is as soon as Gaim is started, this subroutine is run once, regardless of whether the plugin is loaded or not. The other two subroutines present are those defined by the @c \%PLUGIN_INFO hash and take the plugin handle as an argument. When the plugin is loaded and subsequently unloaded it will print a message to the debug window using the @c Gaim::debug_info() Gaim perl API call. +The Perl subroutine @c plugin_init is executed when the plugin is probed by the plugin subsystem. What this means is as soon as Gaim is started, this subroutine is run once, regardless of whether the plugin is loaded or not. The other two subroutines present are those defined by the @c \%PLUGIN_INFO hash and take the plugin handle as an argument. When the plugin is loaded and subsequently unloaded it will print a message to the debug window using the @c Gaim::Debug::info() Gaim perl API call. -The last step is to save the script with a .pl file extention in your ~/.gaim/plugins directory. After restarting gaim the plugin "Perl Test Plugin" should now appear under "Tools -> Preferences -> Plugins". To view the messages make sure you run Gaim from the console with the '-d' flag or open the Debug Window from inside Gaim under "Help". When you enable the checkbox next the plugin you should see a message appear in the Debug Window (or console) and when you disable the checkbox you should see another message appear. You have now created the framework that will allow you to create almost any kind of Gaim plugin you can imagine. +The last step is to save the script with a .pl file extention in your ~/.gaim/plugins directory. After restarting gaim the plugin "Perl Test Plugin" should now appear under "Tools -> Plugins". To view the messages make sure you run Gaim from the console with the '-d' flag or open the Debug Window from inside Gaim under "Help". When you enable the checkbox next the plugin you should see a message appear in the Debug Window (or console) and when you disable the checkbox you should see another message appear. You have now created the framework that will allow you to create almost any kind of Gaim plugin you can imagine. @section account-api Account and Account Option Functions @@ -76,23 +76,24 @@ # Testing was done using Oscar, but this should work regardless of the protocol chosen my $protocol = "prpl-oscar"; + my $account_name = "test"; # Create a new Account print "Testing: Gaim::Account::new()... "; - $account = Gaim::Account->new($TEST_NAME, $PROTOCOL_ID); + $account = Gaim::Account->new($account_name, $protocol); if ($account) { print "ok.\n"; } else { print "fail.\n"; } # Add a new Account - print "Testing: Gaim::Account::add()..."; - Gaim::Accounts::add($account); - print "pending find...\n"; + print "Testing: Gaim::Account::add()..."; + Gaim::Accounts::add($account); + print "pending find...\n"; # Find the account we just added to verify its existence - print "Testing: Gaim::Accounts::find()..."; - $account = Gaim::Accounts::find("TEST_NAME", $protocol); - if ($account) { print "ok.\n"; } else { print "fail.\n"; } + print "Testing: Gaim::Accounts::find()..."; + $account = Gaim::Accounts::find($account_name, $protocol); + if ($account) { print "ok.\n"; } else { print "fail.\n"; } - # Return the username + # Return the username print "Testing: Gaim::Account::get_username()... "; $user_name = $account->get_username(); if ($user_name) { @@ -122,10 +123,10 @@ # "available" similarly we can disconnect a user by setting the account # status to "offline" - $account = Gaim::Accounts::find("TEST_NAME", $protocol); - print "Testing: Gaim::Accounts::connect()...pending...\n"; + print "Testing: Gaim::Accounts::connect()...pending...\n"; $account->set_status("available", TRUE); + $account->set_enabled(Gaim::Core::get_ui(), TRUE); $account->connect(); } @@ -141,114 +142,115 @@ @section buddylist-api Buddylist, Group and Chat API -The BuddList, Group and Chat APIs are very similar and whatever is shown for the @c Gaim::BuddlyList API should carry over to @c Gaim::Chat and @c Gaim::Group. Note that there is a @c Gaim::Find pacakge that was created to keep the naming consistent with how these functions are named in the C API. +The BuddyList, Group and Chat APIs are very similar and whatever is shown for the @c Gaim::BuddyList API should carry over to @c Gaim::BuddyList::Chat and @c Gaim::BuddyList::Group. Note that there is a @c Gaim::Find package that was created to keep the naming consistent with how these functions are named in the C API. @code sub plugin_load { my $plugin = shift; + my $protocol = "prpl-oscar"; - - # This is how we get an account to use in the following tests. You should replace the username - # with an existent user - $account = Gaim::Accounts::find("USERNAME", $protocol); + my $account_name = "test"; + # This is how we get an account to use in the following tests. You should replace the username + # with an existing user + $account = Gaim::Accounts::find($account_name, $protocol); + # Testing a find function: Note Gaim::Find not Gaim::Buddy:find! # Furthermore, this should work the same for chats and groups - print "Testing: Gaim::Find::buddy()..."; - $buddy = Gaim::Find::buddy($account, "BUDDYNAME"); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("testplugin", "Testing: Gaim::Find::buddy()..."); + $buddy = Gaim::Find::buddy($account, "BUDDYNAME"); + Gaim::Debug::info("", ($buddy ? "ok." : "fail.") . "\n"); - # If you should need the handle for some reason, here is how you do it - print "Testing: Gaim::BuddyList::get_handle()..."; - $handle = Gaim::BuddyList::get_handle(); - if ($handle) { print "ok.\n"; } else { print "fail.\n"; } + # If you should need the handle for some reason, here is how you do it + Gaim::Debug::info("testplugin", "Testing: Gaim::BuddyList::get_handle()..."); + $handle = Gaim::BuddyList::get_handle(); + Gaim::Debug::info("", ($handle ? "ok." : "fail.") . "\n"); # This gets the Gaim::BuddyList and references it by $blist - print "Testing: Gaim::BuddyList::get_blist()..."; - $blist = Gaim::BuddyList::get_blist(); - if ($blist) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("testplugin", "Testing: Gaim::get_blist()..."); + $blist = Gaim::get_blist(); + Gaim::Debug::info("", ($blist ? "ok." : "fail.") . "\n"); # This is how you would add a buddy named "NEWNAME" with the alias "ALIAS" - print "Testing: Gaim::Buddy::new..."; - $buddy = Gaim::Buddy::new($account, "NEWNAME", "ALIAS"); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("testplugin", "Testing: Gaim::BuddyList::Buddy::new..."); + $buddy = Gaim::BuddyList::Buddy::new($account, "NEWNAME", "ALIAS"); + Gaim::Debug::info("", ($buddy ? "ok." : "fail.") . "\n"); # Here we add the new buddy '$buddy' to the group "GROUP" # so first we must find the group - print "Testing: Gaim::Find::group..."; - $group = Gaim::Find::group("GROUP"); - if ($group) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("testplugin", "Testing: Gaim::Find::group..."); + $group = Gaim::Find::group("GROUP"); + Gaim::Debug::info("", ($group ? "ok." : "fail.") . "\n"); # To add the buddy we need to have the buddy, contact, group and node for insertion. # For this example we can let contact be undef and set the insertion node as the group - print "Testing: Gaim::BuddyList::add_buddy..."; - Gaim::BuddyList::add_buddy($buddy, undef, $group, $group); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("testplugin", "Testing: Gaim::BuddyList::add_buddy...\n"); + Gaim::BuddyList::add_buddy($buddy, undef, $group, $group); # The example that follows gives an indiction of how an API call that returns a list is handled. # In this case the buddies of the account found earlier are retrieved and put in an array '@buddy_array' - # Further down an accessor method is used, 'get_name()' -- see source for details on the full set of methods - print "Testing: Gaim::Find::buddies...\n"; - @buddy_array = Gaim::Find::buddies($account, "USERNAME"); - if (@buddy_array) { - print "Buddies in list (" . @buddy_array . "): \n"; - foreach $bud (@buddy_array) { - print Gaim::Buddy::get_name($bud) . "\n"; - } - } + # Further down an accessor method is used, 'get_name()' -- see source for details on the full set of methods + Gaim::Debug::info("testplugin", "Testing: Gaim::Find::buddies...\n"); + @buddy_array = Gaim::Find::buddies($account, undef); + if (@buddy_array) { + Gaim::Debug::info("testplugin", "Buddies in list (" . @buddy_array . "): \n"); + foreach $bud (@buddy_array) { + Gaim::Debug::info("testplugin", Gaim::BuddyList::Buddy::get_name($bud) . "\n"); + } + } } @endcode -The BuddyList API allows for plugins to edit buddies in the list, find the buddies on a given account, set alias, and manipulate the structer as needed. It is also contains the methods for accessing @c Gaim::Group and @c Gaim::Chat types. +The BuddyList API allows for plugins to edit buddies in the list, find the buddies on a given account, set alias, and manipulate the structure as needed. It is also contains the methods for accessing @c Gaim::BuddyList::Group and @c Gaim::BuddyList::Chat types. @section conn-api Connection API -The @c Gaim::Connection API is one of the many packages that will not be covered in depth in this tutorial. They are more useful to protocol plugin developers. However, the entire @c gaim_connection_ API has corresponding, functioning perl subroutines. +The @c Gaim::Connection API is one of the many packages that will not be covered in depth in this tutorial. They are more useful to protocol plugin developers. However, the entire @c gaim_connection_ API has corresponding, functioning perl subroutines. @section conv-api Conversation API The Gaim perl API for @c gaim_conversation_ and @c gaim_conv_window_ allow plugins to interact with open conversations, create new conversations, and -modify conversations at will. The following example again replaces the @c -plugin_load subroutine. In the example script, a new window is created, -displayed and a new conversation instant message is created. The @c -Gaim::Conversation::Chat package handles the @c gaim_conv_chat_ portion of the -API very similarly to the examples that follow. +modify conversations at will. In the example script, a new window is created, +displayed and a new conversation instant message is created. The following +example again replaces the @c plugin_load subroutine. The +@c Gaim::Conversation::Chat package handles the @c gaim_conv_chat_ portion of +the API very similarly to the examples that follow. +Notice that the interaction with the conversation window is in the @c Gaim::GtkUI package as it +is UI-specific code interacting with gtkgaim and not libgaim. +To use any of the Gaim::GtkUI functionality, you will need to add the following to the top of your script: @code use Gaim::GtkUI; @endcode + + @code sub plugin_load { my $plugin = shift; my $protocol = "prpl-oscar"; + my $account_name = "test"; - $account = Gaim::Accounts::find("USERNAME", $protocol); + $account = Gaim::Accounts::find($account_name, $protocol); # First we create two new conversations. - print "Testing Gaim::Conversation::new()..."; - $conv1 = Gaim::Conversation::new(1, $account, "Test Conversation 1"); + print "Testing Gaim::Conversation->new()..."; + $conv1 = Gaim::Conversation->new(1, $account, "Test Conversation 1"); if ($conv1) { print "ok.\n"; } else { print "fail.\n"; } - print "Testing Gaim::Conversation::new()..."; - $conv2 = Gaim::Conversation::new(1, $account, "Test Conversation 2"); + print "Testing Gaim::Conversation->new()..."; + $conv2 = Gaim::Conversation->new(1, $account, "Test Conversation 2"); if ($conv2) { print "ok.\n"; } else { print "fail.\n"; } # Second we create a window to display the conversations in. - # Note that the package here is Gaim::Conversation::Window - print "Testing Gaim::Conversation::Window::new()...\n"; - $win = Gaim::Conversation::Window::new(); + # Note that the package here is Gaim::GtkUI::Conversation::Window + print "Testing Gaim::GtkUI::Conversation::Window->new()...\n"; + $win = Gaim::GtkUI::Conversation::Window->new(); - # The third thing to do is to add the two conversations to the windows. - # The subroutine add_conversation() returns the number of conversations + # The third thing to do is to move second the conversation to a new window. + # The subroutine add_gtkconv() returns the number of conversations # present in the window. - print "Testing Gaim::Conversation::Window::add_conversation()..."; - $conv_count = $conv1->add_conversation(); - if ($conv_count) { - print "ok..." . $conv_count . " conversations...\n"; - } else { - print "fail.\n"; - } - - print "Testing Gaim::Conversation::Window::add_conversation()..."; - $conv_count = $win->add_conversation($conv2); + print "Testing Gaim::GtkUI::Conversation::Window::add_conversation()..."; + $gtkconv2 = Gaim::GtkUI::Conversation::get_gtkconv($conv2); + $gtkconv2->get_window()->remove_gtkconv($gtkconv2); + $conv_count = $win->add_gtkconv($gtkconv2); if ($conv_count) { print "ok..." . $conv_count . " conversations...\n"; } else { @@ -256,10 +258,10 @@ } # Now the window is displayed to the user. - print "Testing Gaim::Conversation::Window::show()...\n"; + print "Testing Gaim::GtkUI::Conversation::Window::show()...\n"; $win->show(); - # Use get_im_data() to get a handle for the conversation + # Use get_im_data() to get a handle for the conversation print "Testing Gaim::Conversation::get_im_data()...\n"; $im = $conv1->get_im_data(); if ($im) { print "ok.\n"; } else { print "fail.\n"; } @@ -269,7 +271,7 @@ $im->send("Message Test."); print "Testing Gaim::Conversation::IM::write()...\n"; - $im->write("SENDER", "<b>Message</b> Test.", 0, 0); + $conv2->get_im_data()->write("SENDER", "<b>Message</b> Test.", 0, 0); } @endcode @@ -277,12 +279,12 @@ @c $win. @code - print "Testing Gaim::Conversation::Window::get_conversation_count()...\n"; - $conv_count = $win->get_conversation_count(); + print "Testing Gaim::GtkUI::Conversation::Window::get_gtkconv_count()...\n"; + $conv_count = $win->get_gtkconv_count(); print "...and it returned $conv_count.\n"; if ($conv_count > 0) { - print "Testing Gaim::Conversation::Window::destroy()...\n"; - $win->destroy(); + print "Testing Gaim::GtkUI::Conversation::Window::destroy()...\n"; + $win->destroy(); } @endcode @@ -303,14 +305,15 @@ @code sub plugin_load { - my $plugin = shift; + my $plugin = shift; # Here we are adding a set of preferences # The second argument is the default value for the preference. - Gaim::Prefs::add_none("/plugins/core/perl_test"); - Gaim::Prefs::add_bool("/plugins/core/perl_test/bool", 1); - Gaim::Prefs::add_string("/plugins/core/perl_test/choice", "ch1"); - Gaim::Prefs::add_string("/plugins/core/perl_test/text", "Foobar"); + Gaim::Prefs::add_none("/plugins/core/perl_test"); + Gaim::Prefs::add_bool("/plugins/core/perl_test/bool", 1); + Gaim::Prefs::add_string("/plugins/core/perl_test/choice_str", "ch1"); + Gaim::Prefs::add_int("/plugins/core/perl_test/choice_int", 1); + Gaim::Prefs::add_string("/plugins/core/perl_test/text", "Foobar"); } @endcode @@ -319,38 +322,51 @@ @code sub prefs_info_cb { # The first step is to initialize the Gaim::Pref::Frame that will be returned - $frame = Gaim::PluginPref::Frame->new(); + $frame = Gaim::PluginPref::Frame->new(); # Create a new boolean option with a label "Boolean Label" and then add # it to the frame - $ppref = Gaim::Pref->new_with_label("Boolean Label"); + $ppref = Gaim::PluginPref->new_with_label("Boolean Label"); $frame->add($ppref); $ppref = Gaim::PluginPref->new_with_name_and_label( - "/plugins/core/perl_test/bool", "Boolean Preference"); + "/plugins/core/perl_test/bool", "Boolean Preference"); $frame->add($ppref); # Create a set of choices. To do so we must set the type to 1 which is - # the numerical equivelant of the GaimPrefType for choice. + # the numerical equivalent of the GaimPrefType for choice. $ppref = Gaim::PluginPref->new_with_name_and_label( - "/plugins/core/perl_test/choice", "Choice Preference"); + "/plugins/core/perl_test/choice_str", "Choice Preference"); $ppref->set_type(1); - $ppref->add_choice("ch0", $frame); + $ppref->add_choice("ch0", "ch0"); # The following will be the default value as set from plugin_load - $ppref->add_choice("ch1", $frame); + $ppref->add_choice("ch1", "ch1"); $frame->add($ppref); + # Create a set of choices. To do so we must set the type to 1 which is + # the numerical equivalent of the GaimPrefType for choice. + $ppref = Gaim::PluginPref->new_with_name_and_label( + "/plugins/core/perl_test/choice_int", "Choice Preference 2"); + $ppref->set_type(1); + $ppref->add_choice("zero", 0); + # The following will be the default value as set from plugin_load + $ppref->add_choice("one", 1); + $frame->add($ppref); + + # Create a text box. The default value will be "Foobar" as set by # plugin_load $ppref = Gaim::PluginPref->new_with_name_and_label( - "/plugins/core/perl_test/text", "Text Box Preference"); + "/plugins/core/perl_test/text", "Text Box Preference"); + $ppref->set_type(2); $ppref->set_max_length(16); $frame->add($ppref); - return $frame; + return $frame; } @endcode +<!-- Using the Gtk2-Perl module for Perl it is possible to create tailored @c GtkFrame elements and display them in a preference window. Note that Gtk2-Perl must be loaded with @c require and not @c use . The first step is to create the proper key/value pairs in the @c \%PLUGIN_INFO hash noting that the @c prefs_info key is no longer valid. Instead the keys @c GTK_UI and @c gtk_prefs_info must be set as follows. @code @@ -367,14 +383,14 @@ @code # A simple call back that prints out whatever value it is given as an argument. sub button_cb { - my $widget = shift; - my $data = shift; - print "Clicked button with message: " . $data . "\n"; + my $widget = shift; + my $data = shift; + print "Clicked button with message: " . $data . "\n"; } sub gtk_prefs_info_cb { # Create a button that prints a message to the console and places it in the frame. - use Glib; + use Glib; require Gtk2; $frame = Gtk2::Frame->new(\'Gtk Test Frame\'); @@ -385,12 +401,13 @@ $button->signal_connect("clicked" => \&button_cb, "Message Text"); $frame->add($button); - $button->show(); - $frame->show(); + $button->show(); + $frame->show(); - return $frame; + return $frame; } @endcode +--> @section request-api Request Dialog Box API @@ -398,25 +415,25 @@ These arguments are the same for each of the three request types: @arg @em handle - The plugin handle. - @arg @em title - String title for the dialog. - @arg @em primary - The first sub-heading. - @arg @em secondary - The second sub-heading. - @arg @em ok_text - The Text for the OK button. - @arg @em ok_cb - The string name of the perl subroutine to call when the OK button is clicked. - @arg @em cancel_text - The text for the Cancel button. - @arg @em cancel_cb - The string name of the perl subroutine to call when the Cancel button is clicked. - @arg @em default_value - Default text string to display in the input box. - @arg @em multiline - Boolean where true indicates multiple line input boxes are allowed. + @arg @em title - String title for the dialog. + @arg @em primary - The first sub-heading. + @arg @em secondary - The second sub-heading. + @arg @em ok_text - The Text for the OK button. + @arg @em ok_cb - The string name of the perl subroutine to call when the OK button is clicked. + @arg @em cancel_text - The text for the Cancel button. + @arg @em cancel_cb - The string name of the perl subroutine to call when the Cancel button is clicked. + @arg @em default_value - Default text string to display in the input box. + @arg @em multiline - Boolean where true indicates multiple line input boxes are allowed. @arg @em masked - Boolean indicating if the user can edit the text. @arg @em hint - See source for more information - can be left blank. - @arg @em filename - String defualt file name value. - @arg @em savedialog - Boolean where true indicates use as a save file dialog and false indicates an open file dialog. + @arg @em filename - String defualt file name value. + @arg @em savedialog - Boolean where true indicates use as a save file dialog and false indicates an open file dialog. @code # Create a simple text input box Gaim::Request::input(handle, title, primary, secondary, default_value, multiline, masked, hint, ok_text, ok_cb, cancel_text, cancel_cb); -# Propt user to select a file +# Prompt user to select a file Gaim::Request::file(handle, title, filename, savedialog, ok_cb, cancel_cb); # Create a unique input dialog as shown in the following example @@ -429,10 +446,10 @@ sub ok_cb_test{ # The $fields is passed to the callback function when the button is clicked. # To get the values they must be extracted from $fields by name. - $fields = shift; - $account = Gaim::Request::fields_get_account($fields, "acct_test"); - $int = Gaim::Request::fields_get_integer($fields, "int_test"); - $choice = Gaim::Request::fields_get_choice($fields, "ch_test"); + $fields = shift; + $account = Gaim::Request::Fields::get_account($fields, "acct_test"); + $int = Gaim::Request::Fields::get_integer($fields, "int_test"); + $choice = Gaim::Request::Fields::get_choice($fields, "ch_test"); } sub cancel_cb_test{ @@ -440,44 +457,44 @@ } sub plugin_load { - my $plugin = shift; + my $plugin = shift; # Create a group to pool together mutltiple fields. - $group = Gaim::Request::field_group_new("Group Name"); - + $group = Gaim::Request::Field::Group::new("Group Name"); + # Each fields is created with Gaim::Request::*_new(), is made viewable with Gaim::Request::field_*_set_show_all() # and is then added to the group with Gaim::Request::field_group_add_field() - # Add an account drop down list showing all active accounts - $field = Gaim::Request::field_account_new("acct_test", "Account Text", undef); - Gaim::Request::field_account_set_show_all($field, 0); - Gaim::Request::field_group_add_field($group, $field); + # Add an account drop down list showing all active accounts + $field = Gaim::Request::Field::account_new("acct_test", "Account Text", undef); + Gaim::Request::Field::account_set_show_all($field, 0); + Gaim::Request::Field::Group::add_field($group, $field); # Add an integer input box - $field = Gaim::Request::field_int_new("int_test", "Integer Text", 33); - Gaim::Request::field_group_add_field($group, $field); + $field = Gaim::Request::Field::int_new("int_test", "Integer Text", 33); + Gaim::Request::Field::Group::add_field($group, $field); # Add a list of choices - $field = Gaim::Request::field_choice_new("ch_test", "Choice Text", 1); - Gaim::Request::field_choice_add($field, "Choice 0"); - Gaim::Request::field_choice_add($field, "Choice 1"); - Gaim::Request::field_choice_add($field, "Choice 2"); + $field = Gaim::Request::Field::choice_new("ch_test", "Choice Text", 1); + Gaim::Request::Field::choice_add($field, "Choice 0"); + Gaim::Request::Field::choice_add($field, "Choice 1"); + Gaim::Request::Field::choice_add($field, "Choice 2"); - Gaim::Request::field_group_add_field($group, $field); + Gaim::Request::Field::Group::add_field($group, $field); # Create a Gaim::Request and add the group that was just created. - $request = Gaim::Request::fields_new(); - Gaim::Request::fields_add_group($request, $group); + $request = Gaim::Request::Fields::new(); + Gaim::Request::Fields::add_group($request, $group); # Display the dialog box with the input fields added earlier with the appropriate titles. - Gaim::Request::fields( - $plugin, - "Request Title!", - "Primary Title", - "Secondary Title", - $request, - "Ok Text", "ok_cb_test", - "Cancel Text", "cancel_cb_test"); + Gaim::Request::fields( + $plugin, + "Request Title!", + "Primary Title", + "Secondary Title", + $request, + "Ok Text", "ok_cb_test", + "Cancel Text", "cancel_cb_test"); } @endcode @@ -505,11 +522,11 @@ ); sub action1_cb { - Gaim::debug_info("Test Plugin", "Action 1 activated"); + Gaim::Debug::info("Test Plugin", "Action 1 activated\n"); } sub action2_cb { - Gaim::debug_info("Test Plugin", "Action 2 activated"); + Gaim::Debug::info("Test Plugin", "Action 2 activated\n"); } @endcode @@ -518,17 +535,17 @@ @code sub timeout_cb { my $plugin = shift; - print "Timeout occurred."; - - # Reschedule timeout - Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); + Gaim::Debug::info("testplugin", "Timeout occurred.\n"); + + # Reschedule timeout + Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); } sub plugin_load { $plugin = shift; - # Schedule a timeout for ten seconds from now - Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); + # Schedule a timeout for ten seconds from now + Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); } @endcode @@ -536,9 +553,9 @@ @code sub signal_cb { - # The handle and the user data come in as arguments - my ($handle, $data) = @_; - print "User just connected."; + # The signal data and the user data come in as arguments + my ($account, $data) = @_; + Gaim::Debug::info("testplugin", "Account \"" . $account->get_username() . "\" just connected.\n"); } sub plugin_load { @@ -547,11 +564,11 @@ # User data to be given as an argument to the callback perl subroutine. $data = ""; - # A pointer to the actual plugin handle needed by the callback function - $plugin_handle = Gaim::Accounts::get_handle(); + # A pointer to the handle to which the signal belongs needed by the callback function + $accounts_handle = Gaim::Accounts::get_handle(); - # Connect the perl subroutine 'signal_cb' to the event 'account-connecting' - Gaim::signal_connect($plugin_handle, "account-connecting", $plugin, \&signal_cb, $data); + # Connect the perl subroutine 'signal_cb' to the event 'account-connecting' + Gaim::Signal::connect($accounts_handle, "account-connecting", $plugin, \&signal_cb, $data); } @endcode Modified: trunk/gtk/plugins/perl/common/GtkConv.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkConv.xs 2006-11-29 22:43:54 UTC (rev 17848) +++ trunk/gtk/plugins/perl/common/GtkConv.xs 2006-11-29 23:46:55 UTC (rev 17849) @@ -33,6 +33,15 @@ gaim_gtkconv_is_hidden(gtkconv) Gaim::GtkUI::Conversation gtkconv +void +gaim_gtkconv_get_gtkconv(conv) + Gaim::Conversation conv +PPCODE: + if (conv != NULL && GAIM_IS_GTK_CONVERSATION(conv)) + XPUSHs(sv_2mortal(gaim_perl_bless_object( + GAIM_GTK_CONVERSATION(conv), + "Gaim::GtkUI::Conversation"))); + MODULE = Gaim::GtkUI::Conversation PACKAGE = Gaim::GtkUI::Conversations PREFIX = gaim_gtk_conversations_ PROTOTYPES: ENABLE Modified: trunk/libgaim/plugins/perl/common/Account.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Account.xs 2006-11-29 22:43:54 UTC (rev 17848) +++ trunk/libgaim/plugins/perl/common/Account.xs 2006-11-29 23:46:55 UTC (rev 17849) @@ -78,6 +78,11 @@ Gaim::Account account gboolean value +void gaim_account_set_enabled(account, ui, value) + Gaim::Account account + const char *ui + gboolean value + void gaim_account_set_proxy_info(account, info) Gaim::Account account @@ -162,6 +167,11 @@ gaim_account_get_check_mail(account) Gaim::Account account +gboolean +gaim_account_get_enabled(account, ui) + Gaim::Account account + const char *ui + Gaim::ProxyInfo gaim_account_get_proxy_info(account) Gaim::Account account Modified: trunk/libgaim/plugins/perl/common/PluginPref.xs =================================================================== --- trunk/libgaim/plugins/perl/common/PluginPref.xs 2006-11-29 22:43:54 UTC (rev 17848) +++ trunk/libgaim/plugins/perl/common/PluginPref.xs 2006-11-29 23:46:55 UTC (rev 17849) @@ -33,7 +33,9 @@ gaim_plugin_pref_add_choice(pref, label, choice) Gaim::PluginPref pref const char *label - gpointer choice +# Do the appropriate conversion based on the perl type specified. +# Currently only Strings and Ints will work. + gpointer choice = (SvPOKp($arg) ? SvPV($arg, PL_na) : (SvIOKp($arg) ? GINT_TO_POINTER(SvIV($arg)) : NULL)); void gaim_plugin_pref_destroy(pref) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-11-30 10:19:11
|
Revision: 17854 http://svn.sourceforge.net/gaim/?rev=17854&view=rev Author: markhuetsch Date: 2006-11-30 02:19:09 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Added ability to keep track of non-cached buddy icons Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkstatusbox.c trunk/libgaim/account.c trunk/libgaim/account.h trunk/libgaim/buddyicon.c trunk/libgaim/buddyicon.h trunk/libgaim/prpl.h Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/gtk/gtkaccount.c 2006-11-30 10:19:09 UTC (rev 17854) @@ -118,6 +118,7 @@ GtkWidget *icon_hbox; GtkWidget *icon_check; GtkWidget *icon_entry; + char *cached_icon_path; char *icon_path; GtkWidget *icon_filesel; GtkWidget *icon_preview; @@ -190,15 +191,17 @@ } static void -set_dialog_icon(AccountPrefsDialog *dialog, gchar *new_icon_path) +set_dialog_icon(AccountPrefsDialog *dialog, gchar *new_cached_icon_path, gchar *new_icon_path) { char *filename; GdkPixbuf *pixbuf = NULL; + g_free(dialog->cached_icon_path); g_free(dialog->icon_path); + dialog->cached_icon_path = new_cached_icon_path; dialog->icon_path = new_icon_path; - filename = gaim_buddy_icons_get_full_path(dialog->icon_path); + filename = gaim_buddy_icons_get_full_path(dialog->cached_icon_path); if (filename != NULL) { pixbuf = gdk_pixbuf_new_from_file(filename, NULL); g_free(filename); @@ -298,7 +301,7 @@ dialog = data; if (filename != NULL) - set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, filename)); + set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, filename), g_strdup(filename)); dialog->icon_filesel = NULL; } @@ -313,7 +316,7 @@ static void icon_reset_cb(GtkWidget *button, AccountPrefsDialog *dialog) { - set_dialog_icon(dialog, NULL); + set_dialog_icon(dialog, NULL, NULL); } static void @@ -338,7 +341,7 @@ } if ((rtmp = strchr(tmp, '\r')) || (rtmp = strchr(tmp, '\n'))) *rtmp = '\0'; - set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, tmp)); + set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, tmp), g_strdup(tmp)); g_free(tmp); } gtk_drag_finish(dc, TRUE, FALSE, t); @@ -586,6 +589,7 @@ gtk_widget_show(dialog->icon_entry); /* TODO: Uh, isn't this next line pretty useless? */ gaim_set_accessible_label (dialog->icon_entry, label); + dialog->cached_icon_path = NULL; dialog->icon_path = NULL; vbox2 = gtk_vbox_new(FALSE, 0); @@ -617,12 +621,15 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->icon_check), !gaim_account_get_ui_bool(dialog->account, GAIM_GTK_UI, "use-global-buddyicon", TRUE)); + set_dialog_icon(dialog, + g_strdup(gaim_account_get_ui_string(dialog->account, + GAIM_GTK_UI, "non-global-buddyicon-cached-path", NULL)), + g_strdup(gaim_account_get_ui_string(dialog->account, + GAIM_GTK_UI, "non-global-buddyicon-path", NULL))); + } else { + set_dialog_icon(dialog, NULL, NULL); } - set_dialog_icon(dialog, dialog->account ? - g_strdup(gaim_account_get_ui_string(dialog->account, - GAIM_GTK_UI, "non-global-buddyicon", NULL)) : NULL); - if (!dialog->prpl_info || (!(dialog->prpl_info->options & OPT_PROTO_MAIL_CHECK) && (dialog->prpl_info->icon_spec.format == NULL))) { @@ -1061,21 +1068,24 @@ g_list_free(dialog->protocol_opt_entries); g_free(dialog->protocol_id); - if (dialog->icon_path != NULL) + if (dialog->cached_icon_path != NULL) { - const char *icon = gaim_account_get_ui_string(dialog->account, GAIM_GTK_UI, "non-global-buddyicon", NULL); - if (dialog->icon_path != NULL && (icon == NULL || strcmp(dialog->icon_path, icon))) + const char *icon = gaim_account_get_ui_string(dialog->account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", NULL); + if (dialog->cached_icon_path != NULL && (icon == NULL || strcmp(dialog->cached_icon_path, icon))) { /* The user set an icon, which would've been cached by convert_buddy_icon, * but didn't save the changes. Delete the cache file. */ - char *filename = g_build_filename(gaim_buddy_icons_get_cache_dir(), dialog->icon_path, NULL); + char *filename = g_build_filename(gaim_buddy_icons_get_cache_dir(), dialog->cached_icon_path, NULL); g_unlink(filename); g_free(filename); } - g_free(dialog->icon_path); + g_free(dialog->cached_icon_path); } + if (dialog->cached_icon_path != NULL) + g_free(dialog->icon_path); + if (dialog->icon_filesel) gtk_widget_destroy(dialog->icon_filesel); @@ -1136,14 +1146,18 @@ icon_change = TRUE; } gaim_account_set_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); - gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon", dialog->icon_path); + gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", dialog->cached_icon_path); + gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-path", dialog->icon_path); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) { - gaim_account_set_buddy_icon(account, dialog->icon_path); + gaim_account_set_buddy_icon_path(account, dialog->icon_path); + gaim_account_set_buddy_icon(account, dialog->cached_icon_path); } else if (gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon") && icon_change) { - char *icon = gaim_gtk_convert_buddy_icon(dialog->plugin, gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon")); + const char *filename = gaim_prefs_get_string("/gaim/gtk/accounts/buddyicon"); + char *icon = gaim_gtk_convert_buddy_icon(dialog->plugin, gaim_prefs_get_string(filename)); + gaim_account_set_buddy_icon_path(account, filename); gaim_account_set_buddy_icon(account, icon); g_free(icon); } Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/gtk/gtkstatusbox.c 2006-11-30 10:19:09 UTC (rev 17854) @@ -1228,7 +1228,8 @@ if (filename) icon = gaim_gtk_convert_buddy_icon(plug, filename); gaim_account_set_ui_bool(box->account, GAIM_GTK_UI, "use-global-buddyicon", (filename != NULL)); - gaim_account_set_ui_string(box->account, GAIM_GTK_UI, "non-global-buddyicon", icon); + gaim_account_set_ui_string(box->account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", icon); + gaim_account_set_buddy_icon_path(box->account, filename); gaim_account_set_buddy_icon(box->account, icon); g_free(icon); } @@ -1246,6 +1247,7 @@ char *icon = NULL; if (filename) icon = gaim_gtk_convert_buddy_icon(plug, filename); + gaim_account_set_buddy_icon_path(account, filename); gaim_account_set_buddy_icon(account, icon); g_free(icon); } Modified: trunk/libgaim/account.c =================================================================== --- trunk/libgaim/account.c 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/libgaim/account.c 2006-11-30 10:19:09 UTC (rev 17854) @@ -872,6 +872,8 @@ g_free(account->alias); g_free(account->password); g_free(account->user_info); + g_free(account->buddy_icon); + g_free(account->buddy_icon_path); g_free(account->protocol_id); g_hash_table_destroy(account->settings); @@ -1281,15 +1283,25 @@ if (prpl_info && prpl_info->set_buddy_icon) { - char *filename = gaim_buddy_icons_get_full_path(icon); - prpl_info->set_buddy_icon(gc, filename); - g_free(filename); + char *cached_path = gaim_buddy_icons_get_full_path(icon); + prpl_info->set_buddy_icon(gc, cached_path); + g_free(cached_path); } } schedule_accounts_save(); } +void gaim_account_set_buddy_icon_path(GaimAccount *account, const char *path) +{ + g_return_if_fail(account != NULL); + + g_free(account->buddy_icon_path); + account->buddy_icon_path = g_strdup(path); + + schedule_accounts_save(); +} + void gaim_account_set_protocol_id(GaimAccount *account, const char *protocol_id) { @@ -1663,6 +1675,14 @@ } const char * +gaim_account_get_buddy_icon_path(const GaimAccount *account) +{ + g_return_val_if_fail(account != NULL, NULL); + + return account->buddy_icon_path; +} + +const char * gaim_account_get_protocol_id(const GaimAccount *account) { g_return_val_if_fail(account != NULL, NULL); Modified: trunk/libgaim/account.h =================================================================== --- trunk/libgaim/account.h 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/libgaim/account.h 2006-11-30 10:19:09 UTC (rev 17854) @@ -64,7 +64,8 @@ char *password; /**< The account password. */ char *user_info; /**< User information. */ - char *buddy_icon; /**< The buddy icon. */ + char *buddy_icon; /**< The buddy icon's cached path. */ + char *buddy_icon_path; /**< The buddy icon's non-cached path. */ gboolean remember_pass; /**< Remember the password. */ @@ -251,6 +252,14 @@ void gaim_account_set_buddy_icon(GaimAccount *account, const char *icon); /** + * Sets the account's buddy icon path. + * + * @param account The account. + * @param info The buddy icon non-cached path. + */ +void gaim_account_set_buddy_icon_path(GaimAccount *account, const char *path); + +/** * Sets the account's protocol ID. * * @param account The account. @@ -485,6 +494,15 @@ const char *gaim_account_get_buddy_icon(const GaimAccount *account); /** + * Gets the account's buddy icon path. + * + * @param account The account. + * + * @return The buddy icon's non-cached path. + */ +const char *gaim_account_get_buddy_icon_path(const GaimAccount *account); + +/** * Returns the account's protocol ID. * * @param account The account. Modified: trunk/libgaim/buddyicon.c =================================================================== --- trunk/libgaim/buddyicon.c 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/libgaim/buddyicon.c 2006-11-30 10:19:09 UTC (rev 17854) @@ -77,6 +77,7 @@ gaim_buddy_icon_ref(icon); gaim_buddy_icon_set_data(icon, icon_data, icon_len); + gaim_buddy_icon_set_path(icon, NULL); /* gaim_buddy_icon_set_data() makes blist.c or * conversation.c, or both, take a reference. @@ -134,6 +135,7 @@ g_free(icon->username); g_free(icon->data); + g_free(icon->path); GAIM_DBUS_UNREGISTER_POINTER(icon); g_free(icon); } @@ -339,6 +341,15 @@ gaim_buddy_icon_update(icon); } +void +gaim_buddy_icon_set_path(GaimBuddyIcon *icon, const gchar *path) +{ + g_return_if_fail(icon != NULL); + + g_free(icon->path); + icon->path = (path != NULL ? g_strdup(path) : NULL); +} + GaimAccount * gaim_buddy_icon_get_account(const GaimBuddyIcon *icon) { @@ -367,6 +378,14 @@ } const char * +gaim_buddy_icon_get_path(GaimBuddyIcon *icon) +{ + g_return_val_if_fail(icon != NULL, NULL); + + return icon->path; +} + +const char * gaim_buddy_icon_get_type(const GaimBuddyIcon *icon) { const void *data; @@ -394,7 +413,7 @@ void gaim_buddy_icons_set_for_user(GaimAccount *account, const char *username, - void *icon_data, size_t icon_len) + void *icon_data, size_t icon_len) { g_return_if_fail(account != NULL); g_return_if_fail(username != NULL); Modified: trunk/libgaim/buddyicon.h =================================================================== --- trunk/libgaim/buddyicon.h 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/libgaim/buddyicon.h 2006-11-30 10:19:09 UTC (rev 17854) @@ -38,6 +38,7 @@ void *data; /**< The buddy icon data. */ size_t len; /**< The length of the buddy icon data. */ + char *path; /**< The buddy icon's non-cached path. */ int ref_count; /**< The buddy icon reference count. */ }; @@ -62,7 +63,7 @@ * @return The buddy icon structure. */ GaimBuddyIcon *gaim_buddy_icon_new(GaimAccount *account, const char *username, - void *icon_data, size_t icon_len); + void *icon_data, size_t icon_len); /** * Destroys a buddy icon structure. @@ -142,6 +143,14 @@ void gaim_buddy_icon_set_data(GaimBuddyIcon *icon, void *data, size_t len); /** + * Sets the buddy icon's path. + * + * @param icon The buddy icon. + * @param path The buddy icon's non-cached path. + */ +void gaim_buddy_icon_set_path(GaimBuddyIcon *icon, const gchar *path); + +/** * Returns the buddy icon's account. * * @param icon The buddy icon. @@ -170,6 +179,15 @@ const guchar *gaim_buddy_icon_get_data(const GaimBuddyIcon *icon, size_t *len); /** + * Returns the buddy icon's path. + * + * @param icon The buddy icon. + * + * @preturn The buddy icon's non-cached path. + */ +const gchar *gaim_buddy_icon_get_path(GaimBuddyIcon *icon); + +/** * Returns an extension corresponding to the buddy icon's file type. * * @param icon The buddy icon. @@ -192,9 +210,11 @@ * @param username The username of the user. * @param icon_data The icon data. * @param icon_len The length of the icon data. + * + * @return The buddy icon set, or NULL if no icon was set. */ void gaim_buddy_icons_set_for_user(GaimAccount *account, const char *username, - void *icon_data, size_t icon_len); + void *icon_data, size_t icon_len); /** * Returns the buddy icon information for a user. Modified: trunk/libgaim/prpl.h =================================================================== --- trunk/libgaim/prpl.h 2006-11-30 05:56:29 UTC (rev 17853) +++ trunk/libgaim/prpl.h 2006-11-30 10:19:09 UTC (rev 17854) @@ -276,7 +276,7 @@ const char *(*normalize)(const GaimAccount *, const char *); - void (*set_buddy_icon)(GaimConnection *, const char *filename); + void (*set_buddy_icon)(GaimConnection *, const char *cached_path); void (*remove_group)(GaimConnection *gc, GaimGroup *group); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-11-30 10:30:18
|
Revision: 17855 http://svn.sourceforge.net/gaim/?rev=17855&view=rev Author: markhuetsch Date: 2006-11-30 02:30:13 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Use the QQ faces as buddy icons instead of status icons. Also, a few minor cleanups and a bug fix for faces > 33. Modified Paths: -------------- trunk/configure.ac trunk/gtk/pixmaps/Makefile.am trunk/gtk/pixmaps/status/default/Makefile.am trunk/libgaim/protocols/qq/Makefile.am trunk/libgaim/protocols/qq/buddy_info.c trunk/libgaim/protocols/qq/buddy_info.h trunk/libgaim/protocols/qq/buddy_list.c trunk/libgaim/protocols/qq/group_info.c trunk/libgaim/protocols/qq/keep_alive.c trunk/libgaim/protocols/qq/qq.c trunk/libgaim/protocols/qq/qq.h trunk/libgaim/protocols/qq/utils.c trunk/libgaim/protocols/qq/utils.h Added Paths: ----------- trunk/gtk/pixmaps/buddy_icons/ trunk/gtk/pixmaps/buddy_icons/Makefile.am trunk/gtk/pixmaps/buddy_icons/Makefile.mingw trunk/gtk/pixmaps/buddy_icons/qq/ trunk/gtk/pixmaps/buddy_icons/qq/Makefile.am trunk/gtk/pixmaps/buddy_icons/qq/Makefile.mingw trunk/gtk/pixmaps/buddy_icons/qq/qq_1.png trunk/gtk/pixmaps/buddy_icons/qq/qq_10.png trunk/gtk/pixmaps/buddy_icons/qq/qq_100.png trunk/gtk/pixmaps/buddy_icons/qq/qq_11.png trunk/gtk/pixmaps/buddy_icons/qq/qq_12.png trunk/gtk/pixmaps/buddy_icons/qq/qq_13.png trunk/gtk/pixmaps/buddy_icons/qq/qq_14.png trunk/gtk/pixmaps/buddy_icons/qq/qq_15.png trunk/gtk/pixmaps/buddy_icons/qq/qq_16.png trunk/gtk/pixmaps/buddy_icons/qq/qq_17.png trunk/gtk/pixmaps/buddy_icons/qq/qq_18.png trunk/gtk/pixmaps/buddy_icons/qq/qq_19.png trunk/gtk/pixmaps/buddy_icons/qq/qq_2.png trunk/gtk/pixmaps/buddy_icons/qq/qq_20.png trunk/gtk/pixmaps/buddy_icons/qq/qq_21.png trunk/gtk/pixmaps/buddy_icons/qq/qq_22.png trunk/gtk/pixmaps/buddy_icons/qq/qq_23.png trunk/gtk/pixmaps/buddy_icons/qq/qq_24.png trunk/gtk/pixmaps/buddy_icons/qq/qq_25.png trunk/gtk/pixmaps/buddy_icons/qq/qq_26.png trunk/gtk/pixmaps/buddy_icons/qq/qq_27.png trunk/gtk/pixmaps/buddy_icons/qq/qq_28.png trunk/gtk/pixmaps/buddy_icons/qq/qq_29.png trunk/gtk/pixmaps/buddy_icons/qq/qq_3.png trunk/gtk/pixmaps/buddy_icons/qq/qq_30.png trunk/gtk/pixmaps/buddy_icons/qq/qq_31.png trunk/gtk/pixmaps/buddy_icons/qq/qq_32.png trunk/gtk/pixmaps/buddy_icons/qq/qq_33.png trunk/gtk/pixmaps/buddy_icons/qq/qq_34.png trunk/gtk/pixmaps/buddy_icons/qq/qq_35.png trunk/gtk/pixmaps/buddy_icons/qq/qq_36.png trunk/gtk/pixmaps/buddy_icons/qq/qq_37.png trunk/gtk/pixmaps/buddy_icons/qq/qq_38.png trunk/gtk/pixmaps/buddy_icons/qq/qq_39.png trunk/gtk/pixmaps/buddy_icons/qq/qq_4.png trunk/gtk/pixmaps/buddy_icons/qq/qq_40.png trunk/gtk/pixmaps/buddy_icons/qq/qq_41.png trunk/gtk/pixmaps/buddy_icons/qq/qq_42.png trunk/gtk/pixmaps/buddy_icons/qq/qq_43.png trunk/gtk/pixmaps/buddy_icons/qq/qq_44.png trunk/gtk/pixmaps/buddy_icons/qq/qq_45.png trunk/gtk/pixmaps/buddy_icons/qq/qq_46.png trunk/gtk/pixmaps/buddy_icons/qq/qq_47.png trunk/gtk/pixmaps/buddy_icons/qq/qq_48.png trunk/gtk/pixmaps/buddy_icons/qq/qq_49.png trunk/gtk/pixmaps/buddy_icons/qq/qq_5.png trunk/gtk/pixmaps/buddy_icons/qq/qq_50.png trunk/gtk/pixmaps/buddy_icons/qq/qq_51.png trunk/gtk/pixmaps/buddy_icons/qq/qq_52.png trunk/gtk/pixmaps/buddy_icons/qq/qq_53.png trunk/gtk/pixmaps/buddy_icons/qq/qq_54.png trunk/gtk/pixmaps/buddy_icons/qq/qq_55.png trunk/gtk/pixmaps/buddy_icons/qq/qq_56.png trunk/gtk/pixmaps/buddy_icons/qq/qq_57.png trunk/gtk/pixmaps/buddy_icons/qq/qq_58.png trunk/gtk/pixmaps/buddy_icons/qq/qq_59.png trunk/gtk/pixmaps/buddy_icons/qq/qq_6.png trunk/gtk/pixmaps/buddy_icons/qq/qq_60.png trunk/gtk/pixmaps/buddy_icons/qq/qq_61.png trunk/gtk/pixmaps/buddy_icons/qq/qq_62.png trunk/gtk/pixmaps/buddy_icons/qq/qq_63.png trunk/gtk/pixmaps/buddy_icons/qq/qq_64.png trunk/gtk/pixmaps/buddy_icons/qq/qq_65.png trunk/gtk/pixmaps/buddy_icons/qq/qq_66.png trunk/gtk/pixmaps/buddy_icons/qq/qq_67.png trunk/gtk/pixmaps/buddy_icons/qq/qq_68.png trunk/gtk/pixmaps/buddy_icons/qq/qq_69.png trunk/gtk/pixmaps/buddy_icons/qq/qq_7.png trunk/gtk/pixmaps/buddy_icons/qq/qq_70.png trunk/gtk/pixmaps/buddy_icons/qq/qq_71.png trunk/gtk/pixmaps/buddy_icons/qq/qq_72.png trunk/gtk/pixmaps/buddy_icons/qq/qq_73.png trunk/gtk/pixmaps/buddy_icons/qq/qq_74.png trunk/gtk/pixmaps/buddy_icons/qq/qq_75.png trunk/gtk/pixmaps/buddy_icons/qq/qq_76.png trunk/gtk/pixmaps/buddy_icons/qq/qq_77.png trunk/gtk/pixmaps/buddy_icons/qq/qq_78.png trunk/gtk/pixmaps/buddy_icons/qq/qq_79.png trunk/gtk/pixmaps/buddy_icons/qq/qq_8.png trunk/gtk/pixmaps/buddy_icons/qq/qq_80.png trunk/gtk/pixmaps/buddy_icons/qq/qq_81.png trunk/gtk/pixmaps/buddy_icons/qq/qq_82.png trunk/gtk/pixmaps/buddy_icons/qq/qq_83.png trunk/gtk/pixmaps/buddy_icons/qq/qq_84.png trunk/gtk/pixmaps/buddy_icons/qq/qq_85.png trunk/gtk/pixmaps/buddy_icons/qq/qq_86.png trunk/gtk/pixmaps/buddy_icons/qq/qq_87.png trunk/gtk/pixmaps/buddy_icons/qq/qq_88.png trunk/gtk/pixmaps/buddy_icons/qq/qq_89.png trunk/gtk/pixmaps/buddy_icons/qq/qq_9.png trunk/gtk/pixmaps/buddy_icons/qq/qq_90.png trunk/gtk/pixmaps/buddy_icons/qq/qq_91.png trunk/gtk/pixmaps/buddy_icons/qq/qq_92.png trunk/gtk/pixmaps/buddy_icons/qq/qq_93.png trunk/gtk/pixmaps/buddy_icons/qq/qq_94.png trunk/gtk/pixmaps/buddy_icons/qq/qq_95.png trunk/gtk/pixmaps/buddy_icons/qq/qq_96.png trunk/gtk/pixmaps/buddy_icons/qq/qq_97.png trunk/gtk/pixmaps/buddy_icons/qq/qq_98.png trunk/gtk/pixmaps/buddy_icons/qq/qq_99.png Removed Paths: ------------- trunk/gtk/pixmaps/status/default/qq_1.png trunk/gtk/pixmaps/status/default/qq_10.png trunk/gtk/pixmaps/status/default/qq_100.png trunk/gtk/pixmaps/status/default/qq_11.png trunk/gtk/pixmaps/status/default/qq_12.png trunk/gtk/pixmaps/status/default/qq_13.png trunk/gtk/pixmaps/status/default/qq_14.png trunk/gtk/pixmaps/status/default/qq_15.png trunk/gtk/pixmaps/status/default/qq_16.png trunk/gtk/pixmaps/status/default/qq_17.png trunk/gtk/pixmaps/status/default/qq_18.png trunk/gtk/pixmaps/status/default/qq_19.png trunk/gtk/pixmaps/status/default/qq_2.png trunk/gtk/pixmaps/status/default/qq_20.png trunk/gtk/pixmaps/status/default/qq_21.png trunk/gtk/pixmaps/status/default/qq_22.png trunk/gtk/pixmaps/status/default/qq_23.png trunk/gtk/pixmaps/status/default/qq_24.png trunk/gtk/pixmaps/status/default/qq_25.png trunk/gtk/pixmaps/status/default/qq_26.png trunk/gtk/pixmaps/status/default/qq_27.png trunk/gtk/pixmaps/status/default/qq_28.png trunk/gtk/pixmaps/status/default/qq_29.png trunk/gtk/pixmaps/status/default/qq_3.png trunk/gtk/pixmaps/status/default/qq_30.png trunk/gtk/pixmaps/status/default/qq_31.png trunk/gtk/pixmaps/status/default/qq_32.png trunk/gtk/pixmaps/status/default/qq_33.png trunk/gtk/pixmaps/status/default/qq_34.png trunk/gtk/pixmaps/status/default/qq_35.png trunk/gtk/pixmaps/status/default/qq_36.png trunk/gtk/pixmaps/status/default/qq_37.png trunk/gtk/pixmaps/status/default/qq_38.png trunk/gtk/pixmaps/status/default/qq_39.png trunk/gtk/pixmaps/status/default/qq_4.png trunk/gtk/pixmaps/status/default/qq_40.png trunk/gtk/pixmaps/status/default/qq_41.png trunk/gtk/pixmaps/status/default/qq_42.png trunk/gtk/pixmaps/status/default/qq_43.png trunk/gtk/pixmaps/status/default/qq_44.png trunk/gtk/pixmaps/status/default/qq_45.png trunk/gtk/pixmaps/status/default/qq_46.png trunk/gtk/pixmaps/status/default/qq_47.png trunk/gtk/pixmaps/status/default/qq_48.png trunk/gtk/pixmaps/status/default/qq_49.png trunk/gtk/pixmaps/status/default/qq_5.png trunk/gtk/pixmaps/status/default/qq_50.png trunk/gtk/pixmaps/status/default/qq_51.png trunk/gtk/pixmaps/status/default/qq_52.png trunk/gtk/pixmaps/status/default/qq_53.png trunk/gtk/pixmaps/status/default/qq_54.png trunk/gtk/pixmaps/status/default/qq_55.png trunk/gtk/pixmaps/status/default/qq_56.png trunk/gtk/pixmaps/status/default/qq_57.png trunk/gtk/pixmaps/status/default/qq_58.png trunk/gtk/pixmaps/status/default/qq_59.png trunk/gtk/pixmaps/status/default/qq_6.png trunk/gtk/pixmaps/status/default/qq_60.png trunk/gtk/pixmaps/status/default/qq_61.png trunk/gtk/pixmaps/status/default/qq_62.png trunk/gtk/pixmaps/status/default/qq_63.png trunk/gtk/pixmaps/status/default/qq_64.png trunk/gtk/pixmaps/status/default/qq_65.png trunk/gtk/pixmaps/status/default/qq_66.png trunk/gtk/pixmaps/status/default/qq_67.png trunk/gtk/pixmaps/status/default/qq_68.png trunk/gtk/pixmaps/status/default/qq_69.png trunk/gtk/pixmaps/status/default/qq_7.png trunk/gtk/pixmaps/status/default/qq_70.png trunk/gtk/pixmaps/status/default/qq_71.png trunk/gtk/pixmaps/status/default/qq_72.png trunk/gtk/pixmaps/status/default/qq_73.png trunk/gtk/pixmaps/status/default/qq_74.png trunk/gtk/pixmaps/status/default/qq_75.png trunk/gtk/pixmaps/status/default/qq_76.png trunk/gtk/pixmaps/status/default/qq_77.png trunk/gtk/pixmaps/status/default/qq_78.png trunk/gtk/pixmaps/status/default/qq_79.png trunk/gtk/pixmaps/status/default/qq_8.png trunk/gtk/pixmaps/status/default/qq_80.png trunk/gtk/pixmaps/status/default/qq_81.png trunk/gtk/pixmaps/status/default/qq_82.png trunk/gtk/pixmaps/status/default/qq_83.png trunk/gtk/pixmaps/status/default/qq_84.png trunk/gtk/pixmaps/status/default/qq_85.png trunk/gtk/pixmaps/status/default/qq_86.png trunk/gtk/pixmaps/status/default/qq_87.png trunk/gtk/pixmaps/status/default/qq_88.png trunk/gtk/pixmaps/status/default/qq_89.png trunk/gtk/pixmaps/status/default/qq_9.png trunk/gtk/pixmaps/status/default/qq_90.png trunk/gtk/pixmaps/status/default/qq_91.png trunk/gtk/pixmaps/status/default/qq_92.png trunk/gtk/pixmaps/status/default/qq_93.png trunk/gtk/pixmaps/status/default/qq_94.png trunk/gtk/pixmaps/status/default/qq_95.png trunk/gtk/pixmaps/status/default/qq_96.png trunk/gtk/pixmaps/status/default/qq_97.png trunk/gtk/pixmaps/status/default/qq_98.png trunk/gtk/pixmaps/status/default/qq_99.png Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-11-30 10:19:09 UTC (rev 17854) +++ trunk/configure.ac 2006-11-30 10:30:13 UTC (rev 17855) @@ -1875,6 +1875,8 @@ m4macros/Makefile gtk/Makefile gtk/pixmaps/Makefile + gtk/pixmaps/buddy_icons/Makefile + gtk/pixmaps/buddy_icons/qq/Makefile gtk/pixmaps/smileys/Makefile gtk/pixmaps/smileys/default/Makefile gtk/pixmaps/smileys/none/Makefile Modified: trunk/gtk/pixmaps/Makefile.am =================================================================== --- trunk/gtk/pixmaps/Makefile.am 2006-11-30 10:19:09 UTC (rev 17854) +++ trunk/gtk/pixmaps/Makefile.am 2006-11-30 10:30:13 UTC (rev 17855) @@ -1,4 +1,4 @@ -SUBDIRS = smileys status +SUBDIRS = buddy_icons smileys status EXTRA_DIST = \ about_menu.png \ Added: trunk/gtk/pixmaps/buddy_icons/Makefile.am =================================================================== --- trunk/gtk/pixmaps/buddy_icons/Makefile.am (rev 0) +++ trunk/gtk/pixmaps/buddy_icons/Makefile.am 2006-11-30 10:30:13 UTC (rev 17855) @@ -0,0 +1 @@ +SUBDIRS = qq Property changes on: trunk/gtk/pixmaps/buddy_icons/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/gtk/pixmaps/buddy_icons/Makefile.mingw =================================================================== --- trunk/gtk/pixmaps/buddy_icons/Makefile.mingw (rev 0) +++ trunk/gtk/pixmaps/buddy_icons/Makefile.mingw 2006-11-30 10:30:13 UTC (rev 17855) @@ -0,0 +1,16 @@ +# +# Makefile.mingw +# +# Description: Makefile for win32 (mingw) version of Gaim pixmaps +# + +include ./Makefile.am + +.PHONY: install + +install: + if test '$(SUBDIRS)'; then \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + $(MAKE) -C $$subdir -f Makefile.mingw install; \ + done; \ + fi; Property changes on: trunk/gtk/pixmaps/buddy_icons/Makefile.mingw ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/gtk/pixmaps/buddy_icons/qq/Makefile.am =================================================================== --- trunk/gtk/pixmaps/buddy_icons/qq/Makefile.am (rev 0) +++ trunk/gtk/pixmaps/buddy_icons/qq/Makefile.am 2006-11-30 10:30:13 UTC (rev 17855) @@ -0,0 +1,105 @@ +EXTRA_DIST = \ + qq_1.png \ + qq_2.png \ + qq_3.png \ + qq_4.png \ + qq_5.png \ + qq_6.png \ + qq_7.png \ + qq_8.png \ + qq_9.png \ + qq_10.png \ + qq_11.png \ + qq_12.png \ + qq_13.png \ + qq_14.png \ + qq_15.png \ + qq_16.png \ + qq_17.png \ + qq_18.png \ + qq_19.png \ + qq_20.png \ + qq_21.png \ + qq_22.png \ + qq_23.png \ + qq_24.png \ + qq_25.png \ + qq_26.png \ + qq_27.png \ + qq_28.png \ + qq_29.png \ + qq_30.png \ + qq_31.png \ + qq_32.png \ + qq_33.png \ + qq_34.png \ + qq_35.png \ + qq_36.png \ + qq_37.png \ + qq_38.png \ + qq_39.png \ + qq_40.png \ + qq_41.png \ + qq_42.png \ + qq_43.png \ + qq_44.png \ + qq_45.png \ + qq_46.png \ + qq_47.png \ + qq_48.png \ + qq_49.png \ + qq_50.png \ + qq_51.png \ + qq_52.png \ + qq_53.png \ + qq_54.png \ + qq_55.png \ + qq_56.png \ + qq_57.png \ + qq_58.png \ + qq_59.png \ + qq_60.png \ + qq_61.png \ + qq_62.png \ + qq_63.png \ + qq_64.png \ + qq_65.png \ + qq_66.png \ + qq_67.png \ + qq_68.png \ + qq_69.png \ + qq_70.png \ + qq_71.png \ + qq_72.png \ + qq_73.png \ + qq_74.png \ + qq_75.png \ + qq_76.png \ + qq_77.png \ + qq_78.png \ + qq_79.png \ + qq_80.png \ + qq_81.png \ + qq_82.png \ + qq_83.png \ + qq_84.png \ + qq_85.png \ + qq_86.png \ + qq_87.png \ + qq_88.png \ + qq_89.png \ + qq_90.png \ + qq_91.png \ + qq_92.png \ + qq_93.png \ + qq_94.png \ + qq_95.png \ + qq_96.png \ + qq_97.png \ + qq_98.png \ + qq_99.png \ + qq_100.png + +qqbuddyiconspixdir = $(datadir)/pixmaps/gaim/buddy_icons/qq + +qqbuddyiconspix_DATA = $(EXTRA_DIST) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/gtk/pixmaps/buddy_icons/qq/Makefile.mingw =================================================================== --- trunk/gtk/pixmaps/buddy_icons/qq/Makefile.mingw (rev 0) +++ trunk/gtk/pixmaps/buddy_icons/qq/Makefile.mingw 2006-11-30 10:30:13 UTC (rev 17855) @@ -0,0 +1,18 @@ +# +## Makefile.mingw +# +## Description: Makefile for win32 (mingw) version of Gaim QQ buddy icons +# +# + +GAIM_TOP = ../../../.. +include $(GAIM_TOP)/libgaim/win32/global.mak + +datadir = $(GAIM_INSTALL_DIR) +include ./Makefile.am + +install: + if test '$(qqbuddyiconspix_DATA)'; then \ + mkdir -p $(qqbuddyiconspixdir); \ + cp $(qqbuddyiconspix_DATA) $(qqbuddyiconspixdir); \ + fi; Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/Makefile.mingw ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_1.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_10.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_10.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_100.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_100.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_11.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_11.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_12.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_12.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_13.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_13.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_14.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_14.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_15.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_16.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_17.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_17.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_18.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_18.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_19.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_19.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_2.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_20.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_20.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_21.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_21.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_22.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_22.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_23.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_23.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_24.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_24.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_25.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_25.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_26.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_26.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_27.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_27.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_28.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_28.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_29.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_29.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_3.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_30.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_30.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_31.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_31.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_32.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_33.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_33.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_34.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_34.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_35.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_35.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_36.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_36.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_37.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_37.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_38.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_38.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_39.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_39.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_4.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_40.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_40.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_41.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_41.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_42.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_42.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_43.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_43.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_44.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_44.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_45.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_45.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_46.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_46.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_47.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_47.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_48.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_48.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_49.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_49.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_5.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_5.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_50.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_50.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_51.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_51.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_52.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_52.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_53.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_53.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_54.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_54.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_55.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_55.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_56.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_56.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_57.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_57.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_58.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_58.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_59.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_59.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_6.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_6.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_60.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_60.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_61.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_61.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_62.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_62.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_63.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_63.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_64.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_65.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_65.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_66.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_66.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_67.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_67.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_68.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_68.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_69.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_69.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_7.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_7.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_70.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_70.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_71.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_71.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_72.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_72.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_73.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_73.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_74.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_74.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_75.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_75.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_76.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_76.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_77.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_77.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_78.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_79.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_79.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_8.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_8.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_80.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_80.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_81.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_81.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_82.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_82.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_83.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_83.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_84.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_84.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_85.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_85.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_86.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_86.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_87.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_87.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_88.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_88.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_89.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_89.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_9.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_9.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_90.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_90.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_91.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_91.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_92.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_92.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_93.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_93.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_94.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_94.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_95.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_95.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_96.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_96.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_97.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_97.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_98.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_98.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/gtk/pixmaps/buddy_icons/qq/qq_99.png =================================================================== (Binary files differ) Property changes on: trunk/gtk/pixmaps/buddy_icons/qq/qq_99.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/gtk/pixmaps/status/default/Makefile.am =================================================================== --- trunk/gtk/pixmaps/status/default/Makefile.am 2006-11-30 10:19:09 UTC (rev 17854) +++ trunk/gtk/pixmaps/status/default/Makefile.am 2006-11-30 10:30:13 UTC (rev 17855) @@ -33,106 +33,6 @@ op.png \ pending.png \ qq.png \ - qq_1.png \ - qq_2.png \ - qq_3.png \ - qq_4.png \ - qq_5.png \ - qq_6.png \ - qq_7.png \ - qq_8.png \ - qq_9.png \ - qq_10.png \ - qq_11.png \ - qq_12.png \ - qq_13.png \ - qq_14.png \ - qq_15.png \ - qq_16.png \ - qq_17.png \ - qq_18.png \ - qq_19.png \ - qq_20.png \ - qq_21.png \ - qq_22.png \ - qq_23.png \ - qq_24.png \ - qq_25.png \ - qq_26.png \ - qq_27.png \ - qq_28.png \ - qq_29.png \ - qq_30.png \ - qq_31.png \ - qq_32.png \ - qq_33.png \ - qq_34.png \ - qq_35.png \ - qq_36.png \ - qq_37.png \ - qq_38.png \ - qq_39.png \ - qq_40.png \ - qq_41.png \ - qq_42.png \ - qq_43.png \ - qq_44.png \ - qq_45.png \ - qq_46.png \ - qq_47.png \ - qq_48.png \ - qq_49.png \ - qq_50.png \ - qq_51.png \ - qq_52.png \ - qq_53.png \ - qq_54.png \ - qq_55.png \ - qq_56.png \ - qq_57.png \ - qq_58.png \ - qq_59.png \ - qq_60.png \ - qq_61.png \ - qq_62.png \ - qq_63.png \ - qq_64.png \ - qq_65.png \ - qq_66.png \ - qq_67.png \ - qq_68.png \ - qq_69.png \ - qq_70.png \ - qq_71.png \ - qq_72.png \ - qq_73.png \ - qq_74.png \ - qq_75.png \ - qq_76.png \ - qq_77.png \ - qq_78.png \ - qq_79.png \ - qq_80.png \ - qq_81.png \ - qq_82.png \ - qq_83.png \ - qq_84.png \ - qq_85.png \ - qq_86.png \ - qq_87.png \ - qq_88.png \ - qq_89.png \ - qq_90.png \ - qq_91.png \ - qq_92.png \ - qq_93.png \ - qq_94.png \ - qq_95.png \ - qq_96.png \ - qq_97.png \ - qq_98.png \ - qq_99.png \ - qq_100.png \ secure.png \ silc.png \ simple.png \ Deleted: trunk/gtk/pixmaps/status/default/qq_1.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_10.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_100.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_11.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_12.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_13.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_14.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_15.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_16.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_17.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_18.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_19.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_2.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_20.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_21.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_22.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_23.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_24.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_25.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_26.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_27.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_28.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_29.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_3.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_30.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_31.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_32.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_33.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_34.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_35.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_36.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_37.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_38.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_39.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_4.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_40.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_41.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_42.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_43.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_44.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_45.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_46.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_47.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_48.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_49.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_5.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_50.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_51.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_52.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_53.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_54.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_55.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_56.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_57.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_58.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_59.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_6.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_60.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_61.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_62.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_63.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_64.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_65.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_66.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_67.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_68.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_69.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_7.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_70.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_71.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_72.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_73.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_74.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_75.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/status/default/qq_76.png =================================================================== (Binary files differ) Deleted: trunk/gtk/pixmaps/st... [truncated message content] |
From: <mar...@us...> - 2006-11-30 11:12:14
|
Revision: 17857 http://svn.sourceforge.net/gaim/?rev=17857&view=rev Author: markhuetsch Date: 2006-11-30 03:12:13 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Tweaks. Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/libgaim/buddyicon.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-11-30 10:56:56 UTC (rev 17856) +++ trunk/gtk/gtkaccount.c 2006-11-30 11:12:13 UTC (rev 17857) @@ -118,11 +118,11 @@ GtkWidget *icon_hbox; GtkWidget *icon_check; GtkWidget *icon_entry; - char *cached_icon_path; - char *icon_path; GtkWidget *icon_filesel; GtkWidget *icon_preview; GtkWidget *icon_text; + char *cached_icon_path; + char *icon_path; /* Protocol Options */ GtkWidget *protocol_frame; @@ -1083,8 +1083,7 @@ g_free(dialog->cached_icon_path); } - if (dialog->cached_icon_path != NULL) - g_free(dialog->icon_path); + g_free(dialog->icon_path); if (dialog->icon_filesel) gtk_widget_destroy(dialog->icon_filesel); Modified: trunk/libgaim/buddyicon.c =================================================================== --- trunk/libgaim/buddyicon.c 2006-11-30 10:56:56 UTC (rev 17856) +++ trunk/libgaim/buddyicon.c 2006-11-30 11:12:13 UTC (rev 17857) @@ -347,7 +347,7 @@ g_return_if_fail(icon != NULL); g_free(icon->path); - icon->path = (path != NULL ? g_strdup(path) : NULL); + icon->path = g_strdup(path); } GaimAccount * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-01 04:17:46
|
Revision: 17860 http://svn.sourceforge.net/gaim/?rev=17860&view=rev Author: datallah Date: 2006-11-30 20:16:34 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Upgrade NSS/NSPR for wingaim - we were using relatively old versions. There have been some occasional crashes that may have been caused by some old bugs. I've been using this for a week or so and haven't had any problems. Modified Paths: -------------- trunk/gaim-installer.nsi trunk/libgaim/plugins/ssl/Makefile.mingw trunk/libgaim/win32/global.mak Modified: trunk/gaim-installer.nsi =================================================================== --- trunk/gaim-installer.nsi 2006-11-30 17:45:28 UTC (rev 17859) +++ trunk/gaim-installer.nsi 2006-12-01 04:16:34 UTC (rev 17860) @@ -697,6 +697,7 @@ Delete "$INSTDIR\sounds\gaim\send.wav" RMDir "$INSTDIR\sounds\gaim" RMDir "$INSTDIR\sounds" + Delete "$INSTDIR\freebl3.dll" Delete "$INSTDIR\gaim.exe" Delete "$INSTDIR\gtkgaim.dll" Delete "$INSTDIR\idletrack.dll" Modified: trunk/libgaim/plugins/ssl/Makefile.mingw =================================================================== --- trunk/libgaim/plugins/ssl/Makefile.mingw 2006-11-30 17:45:28 UTC (rev 17859) +++ trunk/libgaim/plugins/ssl/Makefile.mingw 2006-12-01 04:16:34 UTC (rev 17860) @@ -13,7 +13,9 @@ TARGET = ssl TARGET_NSS = ssl-nss -NEEDED_DLLS = $(NSS_TOP)/lib/nss3.dll \ +NEEDED_DLLS = \ + $(NSS_TOP)/lib/freebl3.dll \ + $(NSS_TOP)/lib/nss3.dll \ $(NSS_TOP)/lib/nssckbi.dll \ $(NSS_TOP)/lib/softokn3.dll \ $(NSS_TOP)/lib/ssl3.dll \ Modified: trunk/libgaim/win32/global.mak =================================================================== --- trunk/libgaim/win32/global.mak 2006-11-30 17:45:28 UTC (rev 17859) +++ trunk/libgaim/win32/global.mak 2006-12-01 04:16:34 UTC (rev 17860) @@ -14,8 +14,8 @@ HOWL_TOP := $(WIN32_DEV_TOP)/howl-1.0.0 LIBXML2_TOP := $(WIN32_DEV_TOP)/libxml2 MEANWHILE_TOP := $(WIN32_DEV_TOP)/meanwhile-1.0.2 -NSPR_TOP := $(WIN32_DEV_TOP)/nspr-4.4.1 -NSS_TOP := $(WIN32_DEV_TOP)/nss-3.9 +NSPR_TOP := $(WIN32_DEV_TOP)/nspr-4.6.4 +NSS_TOP := $(WIN32_DEV_TOP)/nss-3.11.4 PERL_LIB_TOP := $(WIN32_DEV_TOP)/perl58 SILC_TOOLKIT := $(WIN32_DEV_TOP)/silc-toolkit-1.0.2 TCL_LIB_TOP := $(WIN32_DEV_TOP)/tcl-8.4.5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-01 08:07:21
|
Revision: 17866 http://svn.sourceforge.net/gaim/?rev=17866&view=rev Author: thekingant Date: 2006-12-01 00:07:17 -0800 (Fri, 01 Dec 2006) Log Message: ----------- Get rid of a bunch of compile warnings Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/libgaim/account.h trunk/libgaim/dbus-server.c trunk/libgaim/plugins/log_reader.c trunk/libgaim/protocols/msn/userlist.c trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/gtk/gtkaccount.c 2006-12-01 08:07:17 UTC (rev 17866) @@ -2381,8 +2381,8 @@ } struct auth_and_add { - void(*auth_cb)(void*); - void(*deny_cb)(void*); + GaimAccountRequestAuthorizationCb auth_cb; + GaimAccountRequestAuthorizationCb deny_cb; void *data; char *username; char *alias; @@ -2440,8 +2440,8 @@ if (!gaim_find_buddy(account, remote_user)) { struct auth_and_add *aa = g_new0(struct auth_and_add, 1); - aa->auth_cb = auth_cb; - aa->deny_cb = deny_cb; + aa->auth_cb = (GaimAccountRequestAuthorizationCb)auth_cb; + aa->deny_cb = (GaimAccountRequestAuthorizationCb)deny_cb; aa->data = user_data; aa->username = g_strdup(remote_user); aa->alias = g_strdup(alias); Modified: trunk/libgaim/account.h =================================================================== --- trunk/libgaim/account.h 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/libgaim/account.h 2006-12-01 08:07:17 UTC (rev 17866) @@ -34,6 +34,7 @@ typedef struct _GaimAccount GaimAccount; typedef gboolean (*GaimFilterAccountFunc)(GaimAccount *account); +typedef void (*GaimAccountRequestAuthorizationCb)(void *); #include "connection.h" #include "log.h" Modified: trunk/libgaim/dbus-server.c =================================================================== --- trunk/libgaim/dbus-server.c 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/libgaim/dbus-server.c 2006-12-01 08:07:17 UTC (rev 17866) @@ -668,7 +668,6 @@ guint xuint; gboolean xboolean; gpointer ptr = NULL; - gboolean allocated = FALSE; if (gaim_value_is_outgoing(gaim_values[i])) { @@ -693,13 +692,14 @@ case GAIM_TYPE_STRING: str = null_to_empty(my_arg(char*)); if (!g_utf8_validate(str, -1, NULL)) { + gchar *tmp; gaim_debug_error("dbus", "Invalid UTF-8 string passed to signal, emitting salvaged string!\n"); - str = gaim_utf8_salvage(str); - allocated = TRUE; + tmp = gaim_utf8_salvage(str); + dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &tmp); + g_free(tmp); + } else { + dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str); } - dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str); - if (allocated) - g_free(str); break; case GAIM_TYPE_SUBTYPE: /* registered pointers only! */ case GAIM_TYPE_POINTER: Modified: trunk/libgaim/plugins/log_reader.c =================================================================== --- trunk/libgaim/plugins/log_reader.c 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/libgaim/plugins/log_reader.c 2006-12-01 08:07:17 UTC (rev 17866) @@ -1640,7 +1640,7 @@ while (*line2 && *line2 != ':') line2++; if (*line2 == ':') { - char *acct_name; + const char *acct_name; line2++; line = line2; acct_name = gaim_account_get_alias(log->account); Modified: trunk/libgaim/protocols/msn/userlist.c =================================================================== --- trunk/libgaim/protocols/msn/userlist.c 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/libgaim/protocols/msn/userlist.c 2006-12-01 08:07:17 UTC (rev 17866) @@ -74,7 +74,7 @@ pa->gc = gc; gaim_account_request_authorization(gaim_connection_get_account(gc), passport, NULL, friendly, NULL, - msn_accept_add_cb, msn_cancel_add_cb, pa); + G_CALLBACK(msn_accept_add_cb), G_CALLBACK(msn_cancel_add_cb), pa); } /************************************************************************** Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-01 07:07:22 UTC (rev 17865) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-01 08:07:17 UTC (rev 17866) @@ -2330,8 +2330,9 @@ data->name = sn; data->nick = NULL; - gaim_account_request_authorization(gaim_connection_get_account(gc), sn, NULL, NULL, reason, - G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); + gaim_account_request_authorization(account, sn, + NULL, NULL, reason, G_CALLBACK(gaim_auth_grant), + G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); g_free(reason); } } break; @@ -5041,8 +5042,9 @@ data->name = g_strdup(sn); data->nick = NULL; - gaim_account_request_authorization(gaim_connection_get_account(gc), nombre, NULL, NULL, reason, - G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); + gaim_account_request_authorization(account, nombre, + NULL, NULL, reason, G_CALLBACK(gaim_auth_grant), + G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); g_free(nombre); g_free(reason); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-01 20:02:36
|
Revision: 17868 http://svn.sourceforge.net/gaim/?rev=17868&view=rev Author: datallah Date: 2006-12-01 12:02:32 -0800 (Fri, 01 Dec 2006) Log Message: ----------- wingaim build process no longer needs to re-build everything for the non-debug version. `make -f Makefile.mingw installers` will now produce the "regular", "no-gtk" and "debug" installers. Modified Paths: -------------- trunk/Makefile.mingw trunk/gaim-installer.nsi Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore - ABOUT-NLS aclocal.m4 autom4te.cache compile confdefs.h config.cache config.guess config.h config.h.in config.h.in~ config.log config.status config.sub configure configure.2.1x depcomp Doxyfile gaim.apspec gaim.desktop gaim.pc gaim.service gaim.spec install-sh intl intltool-extract intltool-extract.in intltool-merge intltool-merge.in intltool-update intltool-update.in libtool ltconfig ltmain.sh Makefile Makefile.in missing mkinstalldirs stamp-h stamp-h1 stamp-h.in *.swp .temp-gettextize win32-install-dir gaim-*.exe VERSION + ABOUT-NLS aclocal.m4 autom4te.cache compile confdefs.h config.cache config.guess config.h config.h.in config.h.in~ config.log config.status config.sub configure configure.2.1x depcomp Doxyfile gaim.apspec gaim.desktop gaim.pc gaim.service gaim.spec install-sh intl intltool-extract intltool-extract.in intltool-merge intltool-merge.in intltool-update intltool-update.in libtool ltconfig ltmain.sh Makefile Makefile.in missing mkinstalldirs stamp-h stamp-h1 stamp-h.in *.swp .temp-gettextize win32-install-dir* gaim-*.exe VERSION Modified: trunk/Makefile.mingw =================================================================== --- trunk/Makefile.mingw 2006-12-01 09:47:20 UTC (rev 17867) +++ trunk/Makefile.mingw 2006-12-01 20:02:32 UTC (rev 17868) @@ -31,8 +31,28 @@ exit; \ }' VERSION) -.PHONY: all install installer installer_nogtk installer_debug installers clean uninstall +# Any *.dll or *.exe files included in win32-install-dir that we don't compile +# should be included in this list so they don't get stripped +NON_GAIM_DLLS = \ + freebl3.dll \ + libgtkspell.dll \ + libmeanwhile-1.dll \ + libxml2.dll \ + nspr4.dll \ + nss3.dll \ + nssckbi.dll \ + plc4.dll \ + plds4.dll \ + silc.dll \ + silcclient.dll \ + softokn3.dll \ + ssl3.dll +#build an expression for `find` to use to ignore the above files +NON_GAIM_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(NON_GAIM_DLLS)) + +.PHONY: all install installer installer_nogtk installer_debug installers clean uninstall create_release_install_dir + all: $(GAIM_CONFIG_H) $(MAKE) -C $(GAIM_LIB_TOP) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) @@ -43,16 +63,22 @@ $(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) install $(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) install -installer: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK gaim-installer.nsi +create_release_install_dir: install + rm -rf $(GAIM_INSTALL_DIR).release + cp -R $(GAIM_INSTALL_DIR) $(GAIM_INSTALL_DIR).release + find $(GAIM_INSTALL_DIR).release \( -name '*.dll' -o -name '*.exe' \) \ + -not \( -false $(NON_GAIM_DLLS_FIND_EXP) \) -exec strip --strip-unneeded {} ';' -installer_nogtk: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" gaim-installer.nsi +installer: create_release_install_dir + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR).release" gaim-installer.nsi +installer_nogtk: create_release_install_dir + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR).release" gaim-installer.nsi + installer_debug: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DDEBUG gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR)" /DDEBUG gaim-installer.nsi -installers: installer installer_nogtk +installers: installer installer_nogtk installer_debug clean: $(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) clean @@ -61,6 +87,6 @@ rm -f $(GAIM_CONFIG_H) gaim*.exe uninstall: - rm -rf $(GAIM_INSTALL_PERLMOD_DIR) $(GAIM_INSTALL_PLUGINS_DIR) $(GAIM_INSTALL_PO_DIR) $(GAIM_INSTALL_DIR) + rm -rf $(GAIM_INSTALL_PERLMOD_DIR) $(GAIM_INSTALL_PLUGINS_DIR) $(GAIM_INSTALL_PO_DIR) $(GAIM_INSTALL_DIR) $(GAIM_INSTALL_DIR).release include $(GAIM_COMMON_TARGETS) Modified: trunk/gaim-installer.nsi =================================================================== --- trunk/gaim-installer.nsi 2006-12-01 09:47:20 UTC (rev 17867) +++ trunk/gaim-installer.nsi 2006-12-01 20:02:32 UTC (rev 17868) @@ -424,7 +424,7 @@ SetOutPath "$INSTDIR" ; Gaim files SetOverwrite on - File /r .\win32-install-dir\*.* + File /r ${GAIM_INSTALL_DIR}\*.* !ifdef DEBUG File "${GAIM_INSTALLER_DEPS}\exchndl.dll" !endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-04 03:49:35
|
Revision: 17889 http://svn.sourceforge.net/gaim/?rev=17889&view=rev Author: datallah Date: 2006-12-03 19:49:34 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Fix some leakage in the perl loader bindings by using a special typedef to handle functions that return g_malloc()-ed values. Thanks to the Gtk-Perl folks for any easy way to do this. Fix gaim_gtk_sound_get_event_label() to correctly indicate that the retval is a constant. Modified Paths: -------------- trunk/gtk/gtksound.c trunk/gtk/gtksound.h trunk/gtk/plugins/perl/common/GtkIMHtml.xs trunk/gtk/plugins/perl/common/GtkSound.xs trunk/gtk/plugins/perl/common/GtkStatusBox.xs trunk/gtk/plugins/perl/common/GtkUtils.xs trunk/libgaim/plugins/perl/common/Log.xs trunk/libgaim/plugins/perl/common/Util.xs trunk/libgaim/plugins/perl/common/XMLNode.xs trunk/libgaim/plugins/perl/common/module.h trunk/libgaim/plugins/perl/common/typemap Modified: trunk/gtk/gtksound.c =================================================================== --- trunk/gtk/gtksound.c 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/gtksound.c 2006-12-04 03:49:34 UTC (rev 17889) @@ -242,7 +242,7 @@ return sounds[event].pref; } -char * +const char * gaim_gtk_sound_get_event_label(GaimSoundEventID event) { if(event >= GAIM_NUM_SOUNDS) Modified: trunk/gtk/gtksound.h =================================================================== --- trunk/gtk/gtksound.h 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/gtksound.h 2006-12-04 03:49:34 UTC (rev 17889) @@ -46,7 +46,7 @@ * @param event The event. * @return The label. */ -char *gaim_gtk_sound_get_event_label(GaimSoundEventID event); +const char *gaim_gtk_sound_get_event_label(GaimSoundEventID event); /** * Gets GTK+ sound UI ops. Modified: trunk/gtk/plugins/perl/common/GtkIMHtml.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkIMHtml.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/plugins/perl/common/GtkIMHtml.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -60,7 +60,7 @@ /* This can't work at the moment since I don't have a typemap for Gtk::Widget. * I thought about using the one from libgtk2-perl but wasn't sure how to go * about doing that. -char * +gchar_own * gtk_imhtml_get_markup_range(imhtml, start, end) Gaim::GtkUI::IMHtml imhtml Gtk::TextIter start @@ -70,7 +70,7 @@ /* This can't work at the moment since I don't have a typemap for Gtk::Widget. * I thought about using the one from libgtk2-perl but wasn't sure how to go * about doing that. -char * +gchar_own * gtk_imhtml_get_text(imhtml, start, end) Gaim::GtkUI::IMHtml imhtml Gtk::TextIter start @@ -215,19 +215,19 @@ gtk_imhtml_get_format_functions(imhtml) Gaim::GtkUI::IMHtml imhtml -char * +gchar_own * gtk_imhtml_get_current_fontface(imhtml) Gaim::GtkUI::IMHtml imhtml -char * +gchar_own * gtk_imhtml_get_current_forecolor(imhtml) Gaim::GtkUI::IMHtml imhtml -char * +gchar_own * gtk_imhtml_get_current_backcolor(imhtml) Gaim::GtkUI::IMHtml imhtml -char * +gchar_own * gtk_imhtml_get_current_background(imhtml) Gaim::GtkUI::IMHtml imhtml @@ -303,7 +303,7 @@ gtk_imhtml_font_grow(imhtml) Gaim::GtkUI::IMHtml imhtml -char * +gchar_own * gtk_imhtml_get_markup(imhtml) Gaim::GtkUI::IMHtml imhtml Modified: trunk/gtk/plugins/perl/common/GtkSound.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkSound.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/plugins/perl/common/GtkSound.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -7,7 +7,7 @@ gaim_gtk_sound_get_event_option(event) Gaim::SoundEventID event -char * +const char * gaim_gtk_sound_get_event_label(event) Gaim::SoundEventID event Modified: trunk/gtk/plugins/perl/common/GtkStatusBox.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkStatusBox.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/plugins/perl/common/GtkStatusBox.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -45,6 +45,6 @@ gtk_gaim_status_box_get_buddy_icon(status_box) Gaim::GtkUI::StatusBox status_box -char * +gchar_own * gtk_gaim_status_box_get_message(status_box) Gaim::GtkUI::StatusBox status_box Modified: trunk/gtk/plugins/perl/common/GtkUtils.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkUtils.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/gtk/plugins/perl/common/GtkUtils.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -10,7 +10,7 @@ void gaim_gtk_load_accels() -char * +gchar_own * gaim_gtk_convert_buddy_icon(plugin, path) Gaim::Plugin plugin const char * path Modified: trunk/libgaim/plugins/perl/common/Log.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Log.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/libgaim/plugins/perl/common/Log.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -21,7 +21,7 @@ gaim_log_free(log) Gaim::Log log -char * +gchar_own * gaim_log_get_log_dir(type, name, account) Gaim::LogType type const char *name @@ -83,7 +83,7 @@ XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); } -char * +gchar_own * gaim_log_read(log, flags) Gaim::Log log Gaim::Log::ReadFlags flags Modified: trunk/libgaim/plugins/perl/common/Util.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Util.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/libgaim/plugins/perl/common/Util.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -74,7 +74,7 @@ gaim_escape_filename(str) const char *str -char * +gchar_own * gaim_fd_get_ip(fd) int fd @@ -104,7 +104,7 @@ const char **end GData **attributes -char * +gchar_own * gaim_markup_get_tag_name(tag) const char *tag @@ -114,17 +114,17 @@ char **dest_xhtml char **dest_plain -char * +gchar_own * gaim_markup_linkify(str) const char *str -char * +gchar_own * gaim_markup_slice(str, x, y) const char *str guint x guint y -char * +gchar_own * gaim_markup_strip_html(str) const char *str @@ -147,11 +147,11 @@ gaim_program_is_valid(program) const char *program -char * +gchar_own * gaim_str_add_cr(str) const char *str -char * +gchar_own * gaim_str_binary_to_ascii(binary, len) const unsigned char *binary guint len @@ -166,11 +166,11 @@ const char *s const char *x -char * +gchar_own * gaim_str_seconds_to_string(sec) guint sec -char * +gchar_own * gaim_str_size_to_units(size) size_t size @@ -187,7 +187,7 @@ long *tz_off const char **rest -gchar * +gchar_own * gaim_strcasereplace(string, delimiter, replacement) const char *string const char *delimiter @@ -198,17 +198,17 @@ const char *haystack const char *needle -gchar * +gchar_own * gaim_strdup_withhtml(src) const gchar *src -gchar * +gchar_own * gaim_strreplace(string, delimiter, replacement) const char *string const char *delimiter const char *replacement -char * +gchar_own * gaim_text_strip_mnemonic(in) const char *in @@ -229,7 +229,7 @@ gaim_unescape_filename(str) const char *str -char * +gchar_own * gaim_unescape_html(html) const char *html Modified: trunk/libgaim/plugins/perl/common/XMLNode.xs =================================================================== --- trunk/libgaim/plugins/perl/common/XMLNode.xs 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/libgaim/plugins/perl/common/XMLNode.xs 2006-12-04 03:49:34 UTC (rev 17889) @@ -36,7 +36,7 @@ const char *name const char *xmlns -char * +gchar_own * xmlnode_get_data(node) Gaim::XMLNode node @@ -77,12 +77,12 @@ const char *attr const char *value -char * +gchar_own * xmlnode_to_formatted_str(node, len) Gaim::XMLNode node int *len -char * +gchar_own * xmlnode_to_str(node, len) Gaim::XMLNode node int *len Modified: trunk/libgaim/plugins/perl/common/module.h =================================================================== --- trunk/libgaim/plugins/perl/common/module.h 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/libgaim/plugins/perl/common/module.h 2006-12-04 03:49:34 UTC (rev 17889) @@ -271,3 +271,6 @@ /* other */ typedef void * Gaim__Handle; + +typedef gchar gchar_own; + Modified: trunk/libgaim/plugins/perl/common/typemap =================================================================== --- trunk/libgaim/plugins/perl/common/typemap 2006-12-04 03:44:42 UTC (rev 17888) +++ trunk/libgaim/plugins/perl/common/typemap 2006-12-04 03:49:34 UTC (rev 17889) @@ -16,6 +16,7 @@ char ** T_PTR gchar T_IV gchar * T_PV +gchar_own * T_GCHAR_OWN guchar T_IV guchar * T_PTR guchar ** T_PTR @@ -195,3 +196,12 @@ T_GaimObj $arg = gaim_perl_bless_object($var, \"$type\"); + +T_GCHAR_OWN + /* used when we can directly own the returned string. */ + /* we have to copy in the case when perl's malloc != gtk's malloc, + * so best copy all the time. */ + sv_setpv ((SV*)$arg, $var); + SvUTF8_on ($arg); + g_free ($var); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-04 04:52:49
|
Revision: 17890 http://svn.sourceforge.net/gaim/?rev=17890&view=rev Author: datallah Date: 2006-12-03 20:52:46 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Fix up some of the example perl plugins. They still could use some work, but these will at least load now. Modified Paths: -------------- trunk/libgaim/plugins/perl/scripts/account.pl trunk/libgaim/plugins/perl/scripts/buddy_list.pl Added Paths: ----------- trunk/gtk/plugins/perl/scripts/ Modified: trunk/libgaim/plugins/perl/scripts/account.pl =================================================================== --- trunk/libgaim/plugins/perl/scripts/account.pl 2006-12-04 03:49:34 UTC (rev 17889) +++ trunk/libgaim/plugins/perl/scripts/account.pl 2006-12-04 04:52:46 UTC (rev 17890) @@ -3,50 +3,47 @@ use Gaim; # All the information Gaim gets about our nifty plugin -%PLUGIN_INFO = ( - perl_api_version => 2, - name => " Perl: $MODULE_NAME", - version => "0.1", - summary => "Test plugin for the Perl interpreter.", +%PLUGIN_INFO = ( + perl_api_version => 2, + name => "Perl: $MODULE_NAME", + version => "0.1", + summary => "Test plugin for the Perl interpreter.", description => "Implements a set of test proccedures to ensure all " . - "functions that work in the C API still work in the " . + "functions that work in the C API still work in the " . "Perl plugin interface. As XSUBs are added, this " . "*should* be updated to test the changes. " . "Furthermore, this will function as the tutorial perl " . "plugin.", - author => "John H. Kelm <johnhkelm\@gmail.com>", - url => "http://sourceforge.net/users/johnhkelm/", - - load => "plugin_load", - unload => "plugin_unload" -); + author => "John H. Kelm <johnhkelm\@gmail.com>", + url => "http://sourceforge.net/users/johnhkelm/", + load => "plugin_load", + unload => "plugin_unload" +); + # These names must already exist - my $GROUP = "UIUC Buddies"; my $USERNAME = "johnhkelm2"; - + # We will create these on load then destroy them on unload - my $TEST_GROUP = "perlTestGroup"; my $TEST_NAME = "perlTestName"; - my $TEST_ALIAS = "perlTestAlias"; my $PROTOCOL_ID = "prpl-oscar"; -sub plugin_init { - return %PLUGIN_INFO; -} +sub plugin_init { + return %PLUGIN_INFO; +} # This is the sub defined in %PLUGIN_INFO to be called when the plugin is loaded # Note: The plugin has a reference to itself on top of the argument stack. -sub plugin_load { - my $plugin = shift; +sub plugin_load { + my $plugin = shift; print "#" x 80 . "\n\n"; - Gaim::debug_info("plugin_load()", "Testing $MODULE_NAME Started."); + Gaim::Debug::info($MODULE_NAME, "plugin_load() - Testing $MODULE_NAME Started."); print "\n\n"; - + ################################# # # # Gaim::Account::Option # @@ -56,7 +53,7 @@ print "Testing: Gaim::Account::Option::new()...\n"; $acc_opt = Gaim::Account::Option->new(1, "TEXT", "pref_name"); $acc_opt2 = Gaim::Account::Option->bool_new("TeXt", "MYprefName", 1); - + ################################# # # # Gaim::Account # @@ -75,7 +72,7 @@ print "Testing: Gaim::Accounts::find()..."; $account = Gaim::Accounts::find($TEST_NAME, $PROTOCOL_ID); if ($account) { print "ok.\n"; } else { print "fail.\n"; } - + print "Testing: Gaim::Account::get_username()... "; $user_name = $account->get_username(); if ($user_name) { @@ -100,26 +97,26 @@ $account = Gaim::Accounts::find($USERNAME, $PROTOCOL_ID); print "Testing: Gaim::Accounts::connect()...pending...\n"; - + $account->set_status("available", TRUE); $account->connect(); print "\n\n"; - Gaim::debug_info("plugin_load()", "Testing $MODULE_NAME Completed."); + Gaim::Debug::info($MODULE_NAME, "plugin_load() - Testing $MODULE_NAME Completed.\n"); print "\n\n" . "#" x 80 . "\n\n"; -} +} -sub plugin_unload { - my $plugin = shift; +sub plugin_unload { + my $plugin = shift; print "#" x 80 . "\n\n"; - Gaim::debug_info("plugin_unload()", "Testing $MODULE_NAME Started."); + Gaim::Debug::info($MODULE_NAME, "plugin_unload() - Testing $MODULE_NAME Started.\n"); print "\n\n"; ######### TEST CODE HERE ########## print "\n\n"; - Gaim::debug_info("plugin_unload()", "Testing $MODULE_NAME Completed."); + Gaim::Debug::info($MODULE_NAME, "plugin_unload() - Testing $MODULE_NAME Completed.\n"); print "\n\n" . "#" x 80 . "\n\n"; } Modified: trunk/libgaim/plugins/perl/scripts/buddy_list.pl =================================================================== --- trunk/libgaim/plugins/perl/scripts/buddy_list.pl 2006-12-04 03:49:34 UTC (rev 17889) +++ trunk/libgaim/plugins/perl/scripts/buddy_list.pl 2006-12-04 04:52:46 UTC (rev 17890) @@ -3,24 +3,23 @@ use Gaim; # All the information Gaim gets about our nifty plugin -%PLUGIN_INFO = ( - perl_api_version => 2, - name => " Perl: $MODULE_NAME", - version => "0.1", - summary => "Test plugin for the Perl interpreter.", - description => "Implements a set of test proccedures to ensure all functions that work in the C API still work in the Perl plugin interface. As XSUBs are added, this *should* be updated to test the changes. Furthermore, this will function as the tutorial perl plugin.", - author => "John H. Kelm <johnhkelm\@gmail.com>", - url => "http://sourceforge.net/users/johnhkelm/", - - load => "plugin_load", - unload => "plugin_unload" -); +%PLUGIN_INFO = ( + perl_api_version => 2, + name => "Perl: $MODULE_NAME", + version => "0.1", + summary => "Test plugin for the Perl interpreter.", + description => "Implements a set of test proccedures to ensure all functions that work in the C API still work in the Perl plugin interface. As XSUBs are added, this *should* be updated to test the changes. Furthermore, this will function as the tutorial perl plugin.", + author => "John H. Kelm <johnhkelm\@gmail.com>", + url => "http://sourceforge.net/users/johnhkelm/", + load => "plugin_load", + unload => "plugin_unload" +); + # These names must already exist - my $GROUP = "UIUC Buddies"; my $USERNAME = "johnhkelm2"; - + # We will create these on load then destroy them on unload my $TEST_GROUP = "UConn Buddies"; my $TEST_NAME = "johnhkelm"; @@ -28,67 +27,74 @@ my $PROTOCOL_ID = "prpl-oscar"; -sub plugin_init { - return %PLUGIN_INFO; -} +sub plugin_init { + return %PLUGIN_INFO; +} # This is the sub defined in %PLUGIN_INFO to be called when the plugin is loaded # Note: The plugin has a reference to itself on top of the argument stack. -sub plugin_load { - my $plugin = shift; - print "#" x 80 . "\n\n"; +sub plugin_load { + my $plugin = shift; - print "PERL: Finding account.\n"; + # This is how we get an account to use in the following tests. You should replace the username + # with an existing user $account = Gaim::Accounts::find($USERNAME, $PROTOCOL_ID); - - ######### TEST CODE HERE ########## - - print "Testing: Gaim::Find::buddy()..."; + + # Testing a find function: Note Gaim::Find not Gaim::Buddy:find! + # Furthermore, this should work the same for chats and groups + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::Find::buddy()..."); $buddy = Gaim::Find::buddy($account, $TEST_NAME); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } - - print "Testing: Gaim::BuddyList::get_handle()..."; + Gaim::Debug::info("", ($buddy ? "ok." : "fail.") . "\n"); + + # If you should need the handle for some reason, here is how you do it + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::BuddyList::get_handle()..."); $handle = Gaim::BuddyList::get_handle(); - if ($handle) { print "ok.\n"; } else { print "fail.\n"; } - - print "Testing: Gaim::BuddyList::get_blist()..."; - $blist = Gaim::BuddyList::get_blist(); - if ($blist) { print "ok.\n"; } else { print "fail.\n"; } - - print "Testing: Gaim::Buddy::new..."; - $buddy = Gaim::Buddy::new($account, $TEST_NAME . "TEST", $TEST_ALIAS); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } + Gaim::Debug::info("", ($handle ? "ok." : "fail.") . "\n"); - print "Testing: Gaim::Find::group..."; + # This gets the Gaim::BuddyList and references it by $blist + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::get_blist()..."); + $blist = Gaim::get_blist(); + Gaim::Debug::info("", ($blist ? "ok." : "fail.") . "\n"); + + # This is how you would add a buddy named $TEST_NAME" with the alias $TEST_ALIAS + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::BuddyList::Buddy::new..."); + $buddy = Gaim::BuddyList::Buddy::new($account, $TEST_NAME, $TEST_ALIAS); + Gaim::Debug::info("", ($buddy ? "ok." : "fail.") . "\n"); + + # Here we add the new buddy '$buddy' to the group $TEST_GROUP + # so first we must find the group + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::Find::group..."); $group = Gaim::Find::group($TEST_GROUP); - if ($group) { print "ok.\n"; } else { print "fail.\n"; } - - print "Testing: Gaim::BuddyList::add_buddy..."; + Gaim::Debug::info("", ($group ? "ok." : "fail.") . "\n"); + + # To add the buddy we need to have the buddy, contact, group and node for insertion. + # For this example we can let contact be undef and set the insertion node as the group + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::BuddyList::add_buddy...\n"); Gaim::BuddyList::add_buddy($buddy, undef, $group, $group); - if ($buddy) { print "ok.\n"; } else { print "fail.\n"; } - - print "Testing: Gaim::Find::buddies...\n"; - @buddy_array = Gaim::Find::buddies($account, $USERNAME); - if (@buddy_array) { - print "Buddies in list (" . @buddy_array . "): \n"; - foreach $bud (@buddy_array) { - print Gaim::Buddy::get_name($bud) . "\n"; + + # The example that follows gives an indication of how an API call that returns a list is handled. + # In this case the buddies of the account found earlier are retrieved and put in an array '@buddy_array' + # Further down an accessor method is used, 'get_name()' -- see source for details on the full set of methods + Gaim::Debug::info($MODULE_NAME, "Testing: Gaim::Find::buddies...\n"); + @buddy_array = Gaim::Find::buddies($account, undef); + if (@buddy_array) { + Gaim::Debug::info($MODULE_NAME, "Buddies in list (" . @buddy_array . "): \n"); + foreach $bud (@buddy_array) { + Gaim::Debug::info($MODULE_NAME, Gaim::BuddyList::Buddy::get_name($bud) . "\n"); } } +} - print "#" x 80 . "\n\n"; -} +sub plugin_unload { + my $plugin = shift; -sub plugin_unload { - my $plugin = shift; - print "#" x 80 . "\n\n"; ######### TEST CODE HERE ########## print "Testing: Gaim::Find::buddy()..."; $buddy = Gaim::Find::buddy($account, $TEST_NAME . TEST); - if ($buddy) { + if ($buddy) { print "ok.\n"; print "Testing: Gaim::BuddyList::remove_buddy()..."; Gaim::BuddyList::remove_buddy($buddy); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fac...@us...> - 2006-12-07 06:03:49
|
Revision: 17909 http://svn.sourceforge.net/gaim/?rev=17909&view=rev Author: faceprint Date: 2006-12-06 21:57:53 -0800 (Wed, 06 Dec 2006) Log Message: ----------- fix 1586525 Modified Paths: -------------- trunk/gtk/gtkroomlist.c trunk/libgaim/protocols/gg/gg.c trunk/libgaim/protocols/irc/irc.c trunk/libgaim/protocols/jabber/chat.c trunk/libgaim/protocols/jabber/chat.h trunk/libgaim/protocols/jabber/jabber.c trunk/libgaim/protocols/msn/msn.c trunk/libgaim/protocols/novell/novell.c trunk/libgaim/protocols/oscar/libaim.c trunk/libgaim/protocols/oscar/libicq.c trunk/libgaim/protocols/qq/qq.c trunk/libgaim/protocols/simple/simple.c trunk/libgaim/protocols/yahoo/yahoo.c trunk/libgaim/protocols/zephyr/zephyr.c trunk/libgaim/prpl.h Modified: trunk/gtk/gtkroomlist.c =================================================================== --- trunk/gtk/gtkroomlist.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/gtk/gtkroomlist.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -199,7 +199,21 @@ static void do_add_room_cb(GtkWidget *w, struct _menu_cb_info *info) { - gaim_blist_request_add_chat(info->list->account, NULL, NULL, info->room->name); + char *name; + GaimConnection *gc = gaim_account_get_connection(info->list->account); + GaimPluginProtocolInfo *prpl_info = NULL; + + if(gc != NULL) + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); + + if(prpl_info != NULL && prpl_info->roomlist_room_serialize) + name = prpl_info->roomlist_room_serialize(info->room); + else + name = g_strdup(info->room->name); + + gaim_blist_request_add_chat(info->list->account, NULL, NULL, name); + + g_free(name); } static void add_room_to_blist_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) Modified: trunk/libgaim/protocols/gg/gg.c =================================================================== --- trunk/libgaim/protocols/gg/gg.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/gg/gg.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -2119,6 +2119,7 @@ ggp_offline_message, /* offline_message */ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; /* }}} */ Modified: trunk/libgaim/protocols/irc/irc.c =================================================================== --- trunk/libgaim/protocols/irc/irc.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/irc/irc.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -868,7 +868,8 @@ irc_dccsend_new_xfer, /* new_xfer */ NULL, /* offline_message */ NULL, /* whiteboard_prpl_ops */ - irc_send_raw, /* send_raw */ + irc_send_raw, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static gboolean load_plugin (GaimPlugin *plugin) { Modified: trunk/libgaim/protocols/jabber/chat.c =================================================================== --- trunk/libgaim/protocols/jabber/chat.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/jabber/chat.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -84,6 +84,8 @@ g_hash_table_insert(defaults, "room", g_strdup(jid->node)); if(jid->domain) g_hash_table_replace(defaults, "server", g_strdup(jid->domain)); + if(jid->resource) + g_hash_table_replace(defaults, "handle", g_strdup(jid->resource)); jabber_id_free(jid); } } @@ -749,6 +751,12 @@ jabber_iq_send(iq); } +char *jabber_roomlist_room_serialize(GaimRoomlistRoom *room) +{ + + return g_strdup_printf("%s@%s", (char*)room->fields->data, (char*)room->fields->next->data); +} + GaimRoomlist *jabber_roomlist_get_list(GaimConnection *gc) { JabberStream *js = gc->proto_data; Modified: trunk/libgaim/protocols/jabber/chat.h =================================================================== --- trunk/libgaim/protocols/jabber/chat.h 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/jabber/chat.h 2006-12-07 05:57:53 UTC (rev 17909) @@ -89,5 +89,7 @@ void jabber_chat_disco_traffic(JabberChat *chat); +char *jabber_roomlist_room_serialize(GaimRoomlistRoom *room); + #endif /* _GAIM_JABBER_CHAT_H_ */ Modified: trunk/libgaim/protocols/jabber/jabber.c =================================================================== --- trunk/libgaim/protocols/jabber/jabber.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/jabber/jabber.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -1902,6 +1902,7 @@ jabber_offline_message, /* offline_message */ NULL, /* whiteboard_prpl_ops */ jabber_prpl_send_raw, /* send_raw */ + jabber_roomlist_room_serialize, /* roomlist_room_serialize */ }; static gboolean load_plugin(GaimPlugin *plugin) Modified: trunk/libgaim/protocols/msn/msn.c =================================================================== --- trunk/libgaim/protocols/msn/msn.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/msn/msn.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -2013,6 +2013,7 @@ NULL, /* offline_message */ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = Modified: trunk/libgaim/protocols/novell/novell.c =================================================================== --- trunk/libgaim/protocols/novell/novell.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/novell/novell.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -3534,6 +3534,8 @@ NULL, /* offline_message */ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ + }; static GaimPluginInfo info = { Modified: trunk/libgaim/protocols/oscar/libaim.c =================================================================== --- trunk/libgaim/protocols/oscar/libaim.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/oscar/libaim.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -89,7 +89,8 @@ oscar_new_xfer, /* new_xfer */ oscar_offline_message, /* offline_message */ NULL, /* whiteboard_prpl_ops */ - NULL, /* send_raw */ + NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = Modified: trunk/libgaim/protocols/oscar/libicq.c =================================================================== --- trunk/libgaim/protocols/oscar/libicq.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/oscar/libicq.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -90,7 +90,8 @@ oscar_new_xfer, /* new_xfer */ oscar_offline_message, /* offline_message */ NULL, /* whiteboard_prpl_ops */ - NULL, /* send_raw */ + NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = Modified: trunk/libgaim/protocols/qq/qq.c =================================================================== --- trunk/libgaim/protocols/qq/qq.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/qq/qq.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -695,6 +695,7 @@ NULL, /* offline_message */ NULL, /* GaimWhiteboardPrplOps */ NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = { Modified: trunk/libgaim/protocols/simple/simple.c =================================================================== --- trunk/libgaim/protocols/simple/simple.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/simple/simple.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -1794,7 +1794,8 @@ NULL, /* new_xfer */ NULL, /* offline_message */ NULL, /* whiteboard_prpl_ops */ - simple_send_raw, /* send_raw */ + simple_send_raw, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; Modified: trunk/libgaim/protocols/yahoo/yahoo.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/yahoo/yahoo.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -3878,7 +3878,8 @@ yahoo_new_xfer, yahoo_offline_message, /* offline_message */ &yahoo_whiteboard_prpl_ops, - NULL /* send_raw */ + NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = Modified: trunk/libgaim/protocols/zephyr/zephyr.c =================================================================== --- trunk/libgaim/protocols/zephyr/zephyr.c 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/protocols/zephyr/zephyr.c 2006-12-07 05:57:53 UTC (rev 17909) @@ -2916,6 +2916,7 @@ NULL, /* offline_message */ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ + NULL, /* roomlist_room_serialize */ }; static GaimPluginInfo info = { Modified: trunk/libgaim/prpl.h =================================================================== --- trunk/libgaim/prpl.h 2006-12-07 04:25:29 UTC (rev 17908) +++ trunk/libgaim/prpl.h 2006-12-07 05:57:53 UTC (rev 17909) @@ -301,6 +301,9 @@ /* For use in plugins that may understand the underlying protocol */ int (*send_raw)(GaimConnection *gc, const char *buf, int len); + + /* room list serialize */ + char *(*roomlist_room_serialize)(GaimRoomlistRoom *room); }; #define GAIM_IS_PROTOCOL_PLUGIN(plugin) \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-07 06:48:30
|
Revision: 17910 http://svn.sourceforge.net/gaim/?rev=17910&view=rev Author: sadrul Date: 2006-12-06 22:43:37 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Fix cursor-prev-word and delete-prev-word for non-ascii characters. Add new action cursor-next-word with a-f as the default binding. Update the manpage for the changes. Modified Paths: -------------- trunk/console/libgnt/gntentry.c trunk/doc/gaim-text.1.in Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-12-07 05:57:53 UTC (rev 17909) +++ trunk/console/libgnt/gntentry.c 2006-12-07 06:43:37 UTC (rev 17910) @@ -334,28 +334,49 @@ return TRUE; } +#define SAME(a,b) ((g_unichar_isalpha(a) && g_unichar_isalpha(b)) || \ + (g_unichar_isdigit(a) && g_unichar_isdigit(b)) || \ + (g_unichar_isspace(a) && g_unichar_isspace(b)) || \ + (g_unichar_iswide(a) && g_unichar_iswide(b))) + static const char * begin_word(const char *text, const char *begin) { - char ch; - while (text > begin && (isspace(*text) || !*text)) - text--; - ch = *text; -#define SAME(a,b) ((isalpha(a) && isalpha(b)) || (isdigit(a) && isdigit(b)) || (isspace(a) && isspace(b))) - while (--text >= begin) { - if (!SAME(ch, *text)) + gunichar ch = 0; + while (text > begin && (!*text || g_unichar_isspace(g_utf8_get_char(text)))) + text = g_utf8_find_prev_char(begin, text); + ch = g_utf8_get_char(text); + while ((text = g_utf8_find_prev_char(begin, text)) >= begin) { + gunichar cur = g_utf8_get_char(text); + if (!SAME(ch, cur)) break; } -#undef SAME - return ++text; + return (text ? g_utf8_find_next_char(text, NULL) : begin); } +static const char * +next_begin_word(const char *text, const char *end) +{ + gunichar ch = 0; + ch = g_utf8_get_char(text); + while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) { + gunichar cur = g_utf8_get_char(text); + if (!SAME(ch, cur)) + break; + } + + while (text && text < end && g_unichar_isspace(g_utf8_get_char(text))) + text = g_utf8_find_next_char(text, end); + return (text ? text : end); +} + +#undef SAME static gboolean move_back_word(GntBindable *bind, GList *null) { GntEntry *entry = GNT_ENTRY(bind); - const char *iter = entry->cursor - 1; + const char *iter = g_utf8_find_prev_char(entry->start, entry->cursor); if (iter < entry->start) return TRUE; @@ -372,7 +393,7 @@ { GntWidget *widget = GNT_WIDGET(bind); GntEntry *entry = GNT_ENTRY(bind); - char *iter = entry->cursor - 1; + char *iter = g_utf8_find_prev_char(entry->start, entry->cursor); int count; if (iter < entry->start) @@ -394,6 +415,32 @@ } static gboolean +move_forward_word(GntBindable *bind, GList *list) +{ + GntEntry *entry = GNT_ENTRY(bind); + GntWidget *widget = GNT_WIDGET(bind); + entry->cursor = (char *)next_begin_word(entry->cursor, entry->end); + while (gnt_util_onscreen_width(entry->scroll, entry->cursor) >= widget->priv.width) { + entry->scroll = g_utf8_find_next_char(entry->scroll, NULL); + } + entry_redraw(widget); + return TRUE; +} + +static gboolean +move_forward_word(GntBindable *bind, GList *list) +{ + GntEntry *entry = GNT_ENTRY(bind); + GntWidget *widget = GNT_WIDGET(bind); + entry->cursor = (char *)next_begin_word(entry->cursor, entry->end); + while (gnt_util_onscreen_width(entry->scroll, entry->cursor) >= widget->priv.width) { + entry->scroll = g_utf8_find_next_char(entry->scroll, NULL); + } + entry_redraw(widget); + return TRUE; +} + +static gboolean gnt_entry_key_pressed(GntWidget *widget, const char *text) { GntEntry *entry = GNT_ENTRY(widget); @@ -571,13 +618,17 @@ NULL, 1, NULL); #endif gnt_bindable_class_register_action(bindable, "cursor-prev-word", move_back_word, - NULL, NULL); + "\033" "b", NULL); gnt_bindable_class_register_action(bindable, "cursor-prev", move_back, GNT_KEY_LEFT, NULL); gnt_bindable_register_binding(bindable, "cursor-prev", GNT_KEY_CTRL_B, NULL); gnt_bindable_class_register_action(bindable, "cursor-next", move_forward, GNT_KEY_RIGHT, NULL); gnt_bindable_register_binding(bindable, "cursor-next", GNT_KEY_CTRL_F, NULL); + gnt_bindable_class_register_action(bindable, "cursor-next-word", move_forward_word, + "\033" "f", NULL); + gnt_bindable_class_register_action(bindable, "cursor-next-word", delete_forward_word, + "\033" "d", NULL); gnt_bindable_class_register_action(bindable, "suggest-show", suggest_show, "\t", NULL); gnt_bindable_class_register_action(bindable, "suggest-next", suggest_next, Modified: trunk/doc/gaim-text.1.in =================================================================== --- trunk/doc/gaim-text.1.in 2006-12-07 05:57:53 UTC (rev 17909) +++ trunk/doc/gaim-text.1.in 2006-12-07 06:43:37 UTC (rev 17910) @@ -245,11 +245,11 @@ .br up = suggest-prev .br -# The following actions don't have any default binding: +c-w = delete-prev-word .br -# delete-prev-word +a-b = cursor-prev-word .br -# cursor-prev-word +a-f = cursor-next-word .br [GntTree::binding] @@ -266,10 +266,13 @@ .br pagedown = page-down .br +# Following is the default binding for the context-menu +.br +menu = context-menu +.br # The following will let you open the context-menu in the buddylist with c-b .br -c-b = context-menu -.br +# c-b = context-menu .br [GntWidget::binding] @@ -341,7 +344,7 @@ .br [GntS::binding] .br -c-t = toggle-buddylist +a-b = toggle-buddylist .SH Conversation Commands There are a few helpful commands in addition to the regular commands. You can This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-07 07:09:50
|
Revision: 17912 http://svn.sourceforge.net/gaim/?rev=17912&view=rev Author: sadrul Date: 2006-12-06 23:03:40 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Forgot to update the manpage. Modified Paths: -------------- trunk/console/libgnt/gntentry.c trunk/doc/gaim-text.1.in Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2006-12-07 07:01:32 UTC (rev 17911) +++ trunk/console/libgnt/gntentry.c 2006-12-07 07:03:40 UTC (rev 17912) @@ -615,10 +615,6 @@ GNT_KEY_CTRL_K, NULL); gnt_bindable_class_register_action(bindable, "delete-prev-word", del_prev_word, GNT_KEY_CTRL_W, NULL); -#if 0 - gnt_bindable_class_register_action(bindable, "delete-next-word", del_next_word, - NULL, 1, NULL); -#endif gnt_bindable_class_register_action(bindable, "cursor-prev-word", move_back_word, "\033" "b", NULL); gnt_bindable_class_register_action(bindable, "cursor-prev", move_back, Modified: trunk/doc/gaim-text.1.in =================================================================== --- trunk/doc/gaim-text.1.in 2006-12-07 07:01:32 UTC (rev 17911) +++ trunk/doc/gaim-text.1.in 2006-12-07 07:03:40 UTC (rev 17912) @@ -250,6 +250,8 @@ a-b = cursor-prev-word .br a-f = cursor-next-word +.br +a-d = delete-next-word .br [GntTree::binding] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-08 02:51:53
|
Revision: 17921 http://svn.sourceforge.net/gaim/?rev=17921&view=rev Author: seanegan Date: 2006-12-07 18:51:47 -0800 (Thu, 07 Dec 2006) Log Message: ----------- Etan had changed the account notify stuff so that the prpl decides if the person is a buddy or not; I totally wiped that out with my authorization stuff. This brings it back. Additionally, I added a googletalk flag to JabberStream which can determine at runtime if you're connected to Google Talk. All of the Google Talk extensions can be detected individually with disco, but this might be used for working with perfectly standard XMPP that's implemented in what might be considered a quirky way in Google Talk. For instance, Google Talk automatically adds buddies to your roster when you authorize them to add you. I was going to use this flag so that the Jabber prpl would never ask me to add a Google Talk buddy who's just been automatically added anyway. I decided to keep it, though, since I may still want to specify what group he's in. This opens the door for more Google Talk customization though >:) Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkutils.c trunk/libgaim/account.c trunk/libgaim/account.h trunk/libgaim/protocols/jabber/disco.c trunk/libgaim/protocols/jabber/jabber.h trunk/libgaim/protocols/jabber/presence.c trunk/libgaim/protocols/msn/userlist.c trunk/libgaim/protocols/oscar/oscar.c trunk/libgaim/protocols/yahoo/yahoo.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/gtk/gtkaccount.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -2420,7 +2420,7 @@ static void gaim_gtk_accounts_request_authorization(GaimAccount *account, const char *remote_user, - const char *id, const char *alias, const char *message, + const char *id, const char *alias, const char *message, gboolean on_list, GCallback auth_cb, GCallback deny_cb, void *user_data) { char *buffer; @@ -2445,7 +2445,7 @@ (message != NULL ? message : "")); - if (!gaim_find_buddy(account, remote_user)) { + if (!on_list) { struct auth_and_add *aa = g_new0(struct auth_and_add, 1); aa->auth_cb = (GaimAccountRequestAuthorizationCb)auth_cb; aa->deny_cb = (GaimAccountRequestAuthorizationCb)deny_cb; Modified: trunk/gtk/gtkutils.c =================================================================== --- trunk/gtk/gtkutils.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/gtk/gtkutils.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -2927,15 +2927,12 @@ primary_esc, secondary ? "\n" : "", secondary?secondary_esc:""); g_free(primary_esc); label = gtk_label_new(NULL); - gtk_widget_set_size_request(label, gaim_prefs_get_int("/gaim/gtk/blist/width")-16,-1); + gtk_widget_set_size_request(label, gaim_prefs_get_int("/gaim/gtk/blist/width")-25,-1); gtk_widget_modify_text(vbox, GTK_STATE_NORMAL, &(label->style->white)); gtk_label_set_markup(GTK_LABEL(label), label_text); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION(2,6,0) - // g_object_set(label, "ellipsize", PANGO_ELLIPSIZE_END, NULL); -#endif hbox2 = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0); Modified: trunk/libgaim/account.c =================================================================== --- trunk/libgaim/account.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/account.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -1055,7 +1055,7 @@ void gaim_account_request_authorization(GaimAccount *account, const char *remote_user, - const char *id, const char *alias, const char *message, + const char *id, const char *alias, const char *message, gboolean on_list, GCallback auth_cb, GCallback deny_cb, void *user_data) { GaimAccountUiOps *ui_ops; @@ -1066,7 +1066,7 @@ ui_ops = gaim_accounts_get_ui_ops(); if (ui_ops != NULL && ui_ops->request_authorize != NULL) - ui_ops->request_authorize(account, remote_user, id, alias, message, auth_cb, deny_cb, user_data); + ui_ops->request_authorize(account, remote_user, id, alias, message, on_list, auth_cb, deny_cb, user_data); } Modified: trunk/libgaim/account.h =================================================================== --- trunk/libgaim/account.h 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/account.h 2006-12-08 02:51:47 UTC (rev 17921) @@ -54,7 +54,7 @@ const char *id, const char *alias, const char *message); void (*request_authorize)(GaimAccount *account, const char *remote_user, const char *id, - const char *alias, const char *message, + const char *alias, const char *message, gboolean on_list, GCallback authorize_cb, GCallback deny_cb, void *user_data); }; @@ -194,7 +194,7 @@ * @param user_data Data to be passed back to the above callbacks */ void gaim_account_request_authorization(GaimAccount *account, const char *remote_user, - const char *id, const char *alias, const char *message, + const char *id, const char *alias, const char *message, gboolean on_list, GCallback auth_cb, GCallback deny_cb, void *user_data); /** Modified: trunk/libgaim/protocols/jabber/disco.c =================================================================== --- trunk/libgaim/protocols/jabber/disco.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/jabber/disco.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -212,8 +212,49 @@ } static void -jabber_disco_server_result_cb(JabberStream *js, xmlnode *packet, gpointer data) +jabber_disco_server_info_result_cb(JabberStream *js, xmlnode *packet, gpointer data) { + xmlnode *query, *child; + const char *from = xmlnode_get_attrib(packet, "from"); + const char *type = xmlnode_get_attrib(packet, "type"); + + if(!from || !type) + return; + + if(strcmp(from, js->user->domain)) + return; + + if(strcmp(type, "result")) + return; + + query = xmlnode_get_child(packet, "query"); + + if (!query) return; + + for (child = xmlnode_get_child(query, "category"); child; + child = xmlnode_get_next_twin(child)) { + const char *category, *type, *name; + category = xmlnode_get_attrib(child, "category"); + if (!category || strcmp(category, "server")) + continue; + type = xmlnode_get_attrib(child, "type"); + if (!type || strcmp(type, "im")) + continue; + + name = xmlnode_get_attrib(child, "name"); + if (!name) + continue; + + g_free(js->server_name); + js->server_name = g_strdup(name); + if (!strcmp(name, "Google Talk")) + js->googletalk = TRUE; + } +} + +static void +jabber_disco_server_items_result_cb(JabberStream *js, xmlnode *packet, gpointer data) +{ xmlnode *query, *child; const char *from = xmlnode_get_attrib(packet, "from"); const char *type = xmlnode_get_attrib(packet, "type"); @@ -255,8 +296,14 @@ xmlnode_set_attrib(iq->node, "to", js->user->domain); - jabber_iq_set_callback(iq, jabber_disco_server_result_cb, NULL); + jabber_iq_set_callback(iq, jabber_disco_server_items_result_cb, NULL); jabber_iq_send(iq); + + iq = jabber_iq_new_query(js, JABBER_IQ_GET, + "http://jabber.org/protocol/disco#info"); + xmlnode_set_attrib(iq->node, "to", js->user->domain); + jabber_iq_set_callback(iq, jabber_disco_server_info_result_cb, NULL); + jabber_iq_send(iq); } void jabber_disco_info_do(JabberStream *js, const char *who, JabberDiscoInfoCallback *callback, gpointer data) Modified: trunk/libgaim/protocols/jabber/jabber.h =================================================================== --- trunk/libgaim/protocols/jabber/jabber.h 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/jabber/jabber.h 2006-12-08 02:51:47 UTC (rev 17921) @@ -120,6 +120,9 @@ gboolean reinit; + gboolean googletalk; + char *server_name; + /* OK, this stays at the end of the struct, so plugins can depend * on the rest of the stuff being in the right place */ Modified: trunk/libgaim/protocols/jabber/presence.c =================================================================== --- trunk/libgaim/protocols/jabber/presence.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/jabber/presence.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -280,13 +280,22 @@ jb->error_msg = msg ? msg : g_strdup(_("Unknown Error in presence")); } else if(type && !strcmp(type, "subscribe")) { struct _jabber_add_permit *jap = g_new0(struct _jabber_add_permit, 1); + gboolean onlist = FALSE; + GaimBuddy *buddy = gaim_find_buddy(gaim_connection_get_account(js->gc), from); + JabberBuddy *jb = NULL; + if (buddy) { + jb = jabber_buddy_find(js, from, TRUE); + if ((jb->subscription & JABBER_SUB_TO) == 0) + onlist = TRUE; + } + jap->gc = js->gc; jap->who = g_strdup(from); jap->js = js; - gaim_account_request_authorization(gaim_connection_get_account(js->gc), from, NULL, NULL, NULL, - G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); + gaim_account_request_authorization(gaim_connection_get_account(js->gc), from, NULL, NULL, NULL, onlist, + G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); jabber_id_free(jid); return; } else if(type && !strcmp(type, "subscribed")) { Modified: trunk/libgaim/protocols/msn/userlist.c =================================================================== --- trunk/libgaim/protocols/msn/userlist.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/msn/userlist.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -74,6 +74,7 @@ pa->gc = gc; gaim_account_request_authorization(gaim_connection_get_account(gc), passport, NULL, friendly, NULL, + gaim_find_buddy(gaim_connection_get_account(gc), passport), G_CALLBACK(msn_accept_add_cb), G_CALLBACK(msn_cancel_add_cb), pa); } Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -2331,7 +2331,7 @@ data->nick = NULL; gaim_account_request_authorization(account, sn, - NULL, NULL, reason, G_CALLBACK(gaim_auth_grant), + NULL, NULL, reason, gaim_find_buddy(account, sn), G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); g_free(reason); } @@ -5043,7 +5043,7 @@ data->nick = NULL; gaim_account_request_authorization(account, nombre, - NULL, NULL, reason, G_CALLBACK(gaim_auth_grant), + NULL, NULL, reason, buddy, G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data); g_free(nombre); g_free(reason); Modified: trunk/libgaim/protocols/yahoo/yahoo.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo.c 2006-12-07 23:16:04 UTC (rev 17920) +++ trunk/libgaim/protocols/yahoo/yahoo.c 2006-12-08 02:51:47 UTC (rev 17921) @@ -996,7 +996,8 @@ * this should probably be moved to the core. */ gaim_account_request_authorization(gaim_connection_get_account(gc), add_req->who, add_req->id, - NULL, add_req->msg, G_CALLBACK(yahoo_buddy_add_authorize_cb), + NULL, add_req->msg, gaim_find_buddy(gaim_connection_get_account(gc),add_req->who), + G_CALLBACK(yahoo_buddy_add_authorize_cb), G_CALLBACK(yahoo_buddy_add_deny_reason_cb), add_req); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-12-09 07:20:47
|
Revision: 17925 http://svn.sourceforge.net/gaim/?rev=17925&view=rev Author: markhuetsch Date: 2006-12-08 23:20:46 -0800 (Fri, 08 Dec 2006) Log Message: ----------- This seems like a reasonable way to tell the prpl if we're using a local or global buddy icon. Modified Paths: -------------- trunk/gtk/gtkaccount.c trunk/gtk/gtkstatusbox.c trunk/libgaim/protocols/qq/buddy_info.c Modified: trunk/gtk/gtkaccount.c =================================================================== --- trunk/gtk/gtkaccount.c 2006-12-09 06:34:48 UTC (rev 17924) +++ trunk/gtk/gtkaccount.c 2006-12-09 07:20:46 UTC (rev 17925) @@ -622,7 +622,7 @@ gaim_account_get_check_mail(dialog->account)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->icon_check), - !gaim_account_get_ui_bool(dialog->account, GAIM_GTK_UI, "use-global-buddyicon", + !gaim_account_get_bool(dialog->account, "use-global-buddyicon", TRUE)); set_dialog_icon(dialog, g_strdup(gaim_account_get_ui_string(dialog->account, @@ -1142,12 +1142,12 @@ prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin); if (prpl_info != NULL && prpl_info->icon_spec.format != NULL) { - if (new || gaim_account_get_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", TRUE) == + if (new || gaim_account_get_bool(account, "use-global-buddyicon", TRUE) == gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) { icon_change = TRUE; } - gaim_account_set_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); + gaim_account_set_bool(account, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", dialog->cached_icon_path); gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-path", dialog->icon_path); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-09 06:34:48 UTC (rev 17924) +++ trunk/gtk/gtkstatusbox.c 2006-12-09 07:20:46 UTC (rev 17925) @@ -331,7 +331,7 @@ gtk_widget_show(status_box->icon_box); if (status_box->account && - !gaim_account_get_ui_bool(status_box->account, GAIM_GTK_UI, "use-global-buddyicon", TRUE)) + !gaim_account_get_bool(status_box->account, "use-global-buddyicon", TRUE)) { char *string = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(status_box->account)); gtk_gaim_status_box_set_buddy_icon(status_box, string); @@ -1340,7 +1340,7 @@ char *icon = NULL; if (filename) icon = gaim_gtk_convert_buddy_icon(plug, filename); - gaim_account_set_ui_bool(box->account, GAIM_GTK_UI, "use-global-buddyicon", (filename != NULL)); + gaim_account_set_bool(box->account, "use-global-buddyicon", (filename != NULL)); gaim_account_set_ui_string(box->account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", icon); gaim_account_set_buddy_icon_path(box->account, filename); gaim_account_set_buddy_icon(box->account, icon); @@ -1355,7 +1355,7 @@ if (plug) { GaimPluginProtocolInfo *prplinfo = GAIM_PLUGIN_PROTOCOL_INFO(plug); if (prplinfo != NULL && - gaim_account_get_ui_bool(account, GAIM_GTK_UI, "use-global-buddyicon", TRUE) && + gaim_account_get_bool(account, "use-global-buddyicon", TRUE) && prplinfo->icon_spec.format) { char *icon = NULL; if (filename) Modified: trunk/libgaim/protocols/qq/buddy_info.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.c 2006-12-09 06:34:48 UTC (rev 17924) +++ trunk/libgaim/protocols/qq/buddy_info.c 2006-12-09 07:20:46 UTC (rev 17925) @@ -548,7 +548,7 @@ } } -/* TODO: custom faces */ +/* TODO: custom faces for QQ members and users with level >= 16 */ void qq_set_my_buddy_icon(GaimConnection *gc, const gchar *iconfile) { gchar *icon; @@ -561,6 +561,7 @@ gint dir_len = strlen(buddy_icon_dir); gint icon_len = strlen(icon_path) - dir_len - 1 - prefix_len - suffix_len; gchar *errmsg = g_strconcat(_("You are attempting to set a custom face. Gaim currently only allows the standard faces. Please choose an image from "), buddy_icon_dir, ".", NULL); + gboolean icon_global = gaim_account_get_bool(gc->account, "use-global-buddyicon", TRUE); /* make sure we're using an appropriate icon */ if (!(g_ascii_strncasecmp(icon_path, buddy_icon_dir, dir_len) == 0 @@ -568,7 +569,10 @@ && g_ascii_strncasecmp(icon_path + dir_len + 1, QQ_ICON_PREFIX, prefix_len) == 0 && g_ascii_strncasecmp(icon_path + dir_len + 1 + prefix_len + icon_len, QQ_ICON_SUFFIX, suffix_len) == 0 && icon_len <= 3)) { - gaim_notify_error(gc, _("Invalid QQ Face"), errmsg, NULL); + if (icon_global) + gaim_debug(GAIM_DEBUG_ERROR, "QQ", "%s\n", errmsg); + else + gaim_notify_error(gc, _("Invalid QQ Face"), errmsg, NULL); g_free(errmsg); return; } @@ -578,7 +582,10 @@ g_free(icon); /* ensure face number in proper range */ if (icon_num > QQ_FACES) { - gaim_notify_error(gc, _("Invalid QQ Face"), errmsg, NULL); + if (icon_global) + gaim_debug(GAIM_DEBUG_ERROR, "QQ", "%s\n", errmsg); + else + gaim_notify_error(gc, _("Invalid QQ Face"), errmsg, NULL); g_free(errmsg); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-09 20:11:55
|
Revision: 17927 http://svn.sourceforge.net/gaim/?rev=17927&view=rev Author: thekingant Date: 2006-12-09 12:11:43 -0800 (Sat, 09 Dec 2006) Log Message: ----------- Stephen Pope in #gaim found a bug in our perl stuff where we were creating some hash tables that used g_direct_hash instead of g_str_hash Modified Paths: -------------- trunk/COPYRIGHT trunk/libgaim/blist.h trunk/libgaim/plugins/perl/common/BuddyList.xs trunk/libgaim/plugins/perl/common/Server.xs trunk/libgaim/server.h Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-12-09 07:39:29 UTC (rev 17926) +++ trunk/COPYRIGHT 2006-12-09 20:11:43 UTC (rev 17927) @@ -241,6 +241,7 @@ Julien Pivotto Ari Pollak Robey Pointer +Stephen Pope Nathan Poznick Jory A. Pratt Brent Priddy Modified: trunk/libgaim/blist.h =================================================================== --- trunk/libgaim/blist.h 2006-12-09 07:39:29 UTC (rev 17926) +++ trunk/libgaim/blist.h 2006-12-09 20:11:43 UTC (rev 17927) @@ -314,7 +314,9 @@ * * @param account The account this chat will get added to * @param alias The alias of the new chat - * @param components The info the prpl needs to join the chat + * @param components The info the prpl needs to join the chat. The + * hash function should be g_str_hash() and the + * equal function should be g_str_equal(). * @return A newly allocated chat */ GaimChat *gaim_chat_new(GaimAccount *account, const char *alias, GHashTable *components); Modified: trunk/libgaim/plugins/perl/common/BuddyList.xs =================================================================== --- trunk/libgaim/plugins/perl/common/BuddyList.xs 2006-12-09 07:39:29 UTC (rev 17926) +++ trunk/libgaim/plugins/perl/common/BuddyList.xs 2006-12-09 20:11:43 UTC (rev 17927) @@ -310,7 +310,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); Modified: trunk/libgaim/plugins/perl/common/Server.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Server.xs 2006-12-09 07:39:29 UTC (rev 17926) +++ trunk/libgaim/plugins/perl/common/Server.xs 2006-12-09 20:11:43 UTC (rev 17927) @@ -80,7 +80,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); @@ -135,7 +135,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); @@ -165,7 +165,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); Modified: trunk/libgaim/server.h =================================================================== --- trunk/libgaim/server.h 2006-12-09 07:39:29 UTC (rev 17926) +++ trunk/libgaim/server.h 2006-12-09 20:11:43 UTC (rev 17927) @@ -59,8 +59,6 @@ void serv_rem_permit(GaimConnection *, const char *); void serv_rem_deny(GaimConnection *, const char *); void serv_set_permit_deny(GaimConnection *); -void serv_join_chat(GaimConnection *, GHashTable *); -void serv_reject_chat(GaimConnection *, GHashTable *); void serv_chat_invite(GaimConnection *, int, const char *, const char *); void serv_chat_leave(GaimConnection *, int); void serv_chat_whisper(GaimConnection *, int, const char *, const char *); @@ -91,9 +89,27 @@ void serv_got_im(GaimConnection *gc, const char *who, const char *msg, GaimMessageFlags flags, time_t mtime); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ +void serv_join_chat(GaimConnection *, GHashTable *); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ +void serv_reject_chat(GaimConnection *, GHashTable *); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ void serv_got_chat_invite(GaimConnection *gc, const char *name, const char *who, const char *message, GHashTable *data); + GaimConversation *serv_got_joined_chat(GaimConnection *gc, int id, const char *name); void serv_got_chat_left(GaimConnection *g, int id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2006-12-10 05:33:44
|
Revision: 17936 http://svn.sourceforge.net/gaim/?rev=17936&view=rev Author: evands Date: 2006-12-09 21:33:44 -0800 (Sat, 09 Dec 2006) Log Message: ----------- Added buddy-got-login-time signal which is emitted when the login time for a buddy is known Modified Paths: -------------- trunk/ChangeLog.API trunk/libgaim/blist.c trunk/libgaim/prpl.c Modified: trunk/ChangeLog.API =================================================================== --- trunk/ChangeLog.API 2006-12-10 05:06:01 UTC (rev 17935) +++ trunk/ChangeLog.API 2006-12-10 05:33:44 UTC (rev 17936) @@ -397,6 +397,7 @@ * "buddy-status-changed" * "buddy-idle-changed": A buddy's idle status changed. * "buddy-icon-changed" + * "buddy-got-login-time": The login time for a buddy is now known * "displaying-userinfo" * "gtkblist-hiding" * "gtkblist-unhiding" Modified: trunk/libgaim/blist.c =================================================================== --- trunk/libgaim/blist.c 2006-12-10 05:06:01 UTC (rev 17935) +++ trunk/libgaim/blist.c 2006-12-10 05:33:44 UTC (rev 17936) @@ -2706,6 +2706,11 @@ gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_BLIST_BUDDY)); + gaim_signal_register(handle, "buddy-got-login-time", + gaim_marshal_VOID__POINTER, NULL, 1, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_BLIST_BUDDY)); + gaim_signal_register(handle, "buddy-added", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, Modified: trunk/libgaim/prpl.c =================================================================== --- trunk/libgaim/prpl.c 2006-12-10 05:06:01 UTC (rev 17935) +++ trunk/libgaim/prpl.c 2006-12-10 05:33:44 UTC (rev 17936) @@ -117,6 +117,8 @@ presence = gaim_buddy_get_presence(buddy); gaim_presence_set_login_time(presence, login_time); + + gaim_signal_emit(gaim_blist_get_handle(), "buddy-got-login-time", buddy); } void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-10 08:18:52
|
Revision: 17938 http://svn.sourceforge.net/gaim/?rev=17938&view=rev Author: sadrul Date: 2006-12-10 00:18:49 -0800 (Sun, 10 Dec 2006) Log Message: ----------- gaim, gaim-text and libgnt fails to compile if you configure with --with-static-prpl=something. This makes them compile in such cases. Modified Paths: -------------- trunk/console/Makefile.am trunk/console/libgnt/Makefile.am trunk/gtk/Makefile.am Modified: trunk/console/Makefile.am =================================================================== --- trunk/console/Makefile.am 2006-12-10 05:55:02 UTC (rev 17937) +++ trunk/console/Makefile.am 2006-12-10 08:18:49 UTC (rev 17938) @@ -36,12 +36,11 @@ gaim_textinclude_HEADERS = \ $(gaim_text_headers) -gaim_text_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS) +gaim_text_DEPENDENCIES = @LIBOBJS@ gaim_text_LDFLAGS = -export-dynamic gaim_text_LDADD = \ @LIBOBJS@ \ $(DBUS_LIBS) \ - $(STATIC_LINK_LIBS) \ $(INTLLIBS) \ $(GLIB_LIBS) \ $(LIBXML_LIBS) \ Modified: trunk/console/libgnt/Makefile.am =================================================================== --- trunk/console/libgnt/Makefile.am 2006-12-10 05:55:02 UTC (rev 17937) +++ trunk/console/libgnt/Makefile.am 2006-12-10 08:18:49 UTC (rev 17938) @@ -56,11 +56,10 @@ libgnt_lainclude_HEADERS = \ $(libgnt_la_headers) -libgnt_la_DEPENDENCIES = $(STATIC_LINK_LIBS) +libgnt_la_DEPENDENCIES = libgnt_la_LDFLAGS = -export-dynamic libgnt_la_LIBADD = \ $(GLIB_LIBS) \ - $(STATIC_LINK_LIBS) \ $(GNT_LIBS) AM_CPPFLAGS = \ Modified: trunk/gtk/Makefile.am =================================================================== --- trunk/gtk/Makefile.am 2006-12-10 05:55:02 UTC (rev 17937) +++ trunk/gtk/Makefile.am 2006-12-10 08:18:49 UTC (rev 17938) @@ -159,13 +159,12 @@ $(gaim_headers) -gaim_DEPENDENCIES = @LIBOBJS@ $(STATIC_LINK_LIBS) +gaim_DEPENDENCIES = @LIBOBJS@ gaim_LDFLAGS = -export-dynamic gaim_LDADD = \ @LIBOBJS@ \ $(DBUS_LIBS) \ $(GSTREAMER_LIBS) \ - $(STATIC_LINK_LIBS) \ $(XSS_LIBS) \ $(SM_LIBS) \ $(INTLLIBS) \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-10 23:08:52
|
Revision: 17949 http://svn.sourceforge.net/gaim/?rev=17949&view=rev Author: seanegan Date: 2006-12-10 15:08:45 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Gmail notifications patch from Chris Stafford - The plugin will only do anything if it sees "google:mail:notify" in disco. - I decided to give Jabber a mail notification option for this, since the feature has traditionally meant "notify me of new mail if I happen to have a mail account that this server will notify me of" - I decided to show the first unread mail in a thread, rather than all unread messages[A - I made a google.c/google.h file to keep code for Google Talk extensions Modified Paths: -------------- trunk/gtk/gtknotify.c trunk/libgaim/protocols/jabber/Makefile.am trunk/libgaim/protocols/jabber/disco.c trunk/libgaim/protocols/jabber/iq.c trunk/libgaim/protocols/jabber/jabber.c trunk/libgaim/protocols/jabber/jabber.h Added Paths: ----------- trunk/libgaim/protocols/jabber/google.c trunk/libgaim/protocols/jabber/google.h Modified: trunk/gtk/gtknotify.c =================================================================== --- trunk/gtk/gtknotify.c 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/gtk/gtknotify.c 2006-12-10 23:08:45 UTC (rev 17949) @@ -313,9 +313,7 @@ GaimNotifyMailData *data = NULL; GtkWidget *dialog = NULL; GtkWidget *vbox = NULL; - GtkWidget *hbox; GtkWidget *label; - GtkWidget *img; char *detail_text; char *label_text; GtkTreeIter iter; @@ -357,27 +355,15 @@ gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), GAIM_HIG_BORDER); - /* Setup the main horizontal box */ - hbox = gtk_hbox_new(FALSE, GAIM_HIG_BORDER); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); - - /* Dialog icon */ - img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_INFO, - GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment(GTK_MISC(img), 0, 0); - gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); - /* Vertical box */ - vbox = gtk_vbox_new(FALSE, GAIM_HIG_BORDER); + vbox = GTK_DIALOG(dialog)->vbox; - gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); - if (mail_dialog == NULL && detailed) { GtkWidget *sw; /* Golden ratio it up! */ - gtk_widget_set_size_request(dialog, 475, 200); + gtk_widget_set_size_request(dialog, 550, 400); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); Modified: trunk/libgaim/protocols/jabber/Makefile.am =================================================================== --- trunk/libgaim/protocols/jabber/Makefile.am 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/libgaim/protocols/jabber/Makefile.am 2006-12-10 23:08:45 UTC (rev 17949) @@ -13,6 +13,8 @@ chat.h \ disco.c \ disco.h \ + google.c \ + google.h \ iq.c \ iq.h \ jabber.c \ Modified: trunk/libgaim/protocols/jabber/disco.c =================================================================== --- trunk/libgaim/protocols/jabber/disco.c 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/libgaim/protocols/jabber/disco.c 2006-12-10 23:08:45 UTC (rev 17949) @@ -23,6 +23,7 @@ #include "prefs.h" #include "buddy.h" +#include "google.h" #include "iq.h" #include "disco.h" #include "jabber.h" @@ -250,6 +251,19 @@ if (!strcmp(name, "Google Talk")) js->googletalk = TRUE; } + + for (child = xmlnode_get_child(query, "feature"); child; + child = xmlnode_get_next_twin(child)) { + const char *var; + var = xmlnode_get_attrib(child, "var"); + if (!var) + continue; + + if (!strcmp("google:mail:notify", var)) { + js->server_caps |= JABBER_CAP_GMAIL_NOTIFY; + jabber_gmail_init(js); + } + } } static void Added: trunk/libgaim/protocols/jabber/google.c =================================================================== --- trunk/libgaim/protocols/jabber/google.c (rev 0) +++ trunk/libgaim/protocols/jabber/google.c 2006-12-10 23:08:45 UTC (rev 17949) @@ -0,0 +1,168 @@ + +/** + * Gaim is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "internal.h" +#include "debug.h" +#include "google.h" +#include "jabber.h" +#include "iq.h" + +static void +jabber_gmail_parse(JabberStream *js, xmlnode *packet, gpointer nul) +{ + const char *type = xmlnode_get_attrib(packet, "type"); + xmlnode *child; + xmlnode *message, *sender_node, *subject_node; + const char *from, *to, *subject, *url, *tid; + const char *in_str; + char *to_name; + int i, count = 1, returned_count; + + const char **tos, **froms, **subjects, **urls; + + if (strcmp(type, "result")) + return; + + child = xmlnode_get_child(packet, "mailbox"); + if (!child) + return; + + in_str = xmlnode_get_attrib(child, "total-matched"); + if (in_str && *in_str) + count = atoi(in_str); + + if (count == 0) + return; + + message = xmlnode_get_child(child, "mail-thread-info"); + + /* Loop once to see how many messages were returned so we can allocate arrays + * accordingly */ + if (!message) + return; + for (returned_count = 0; message; returned_count++, message=xmlnode_get_next_twin(message)); + + froms = g_new0(const char* , returned_count); + tos = g_new0(const char* , returned_count); + subjects = g_new0(const char* , returned_count); + urls = g_new0(const char* , returned_count); + + to = xmlnode_get_attrib(packet, "to"); + to_name = jabber_get_bare_jid(to); + url = xmlnode_get_attrib(child, "url"); + if (!url || !*url) + url = "http://www.gmail.com"; + + message= xmlnode_get_child(child, "mail-thread-info"); + for (i=0; message; message = xmlnode_get_next_twin(message), i++) { + subject_node = xmlnode_get_child(message, "subject"); + sender_node = xmlnode_get_child(message, "senders"); + sender_node = xmlnode_get_child(sender_node, "sender"); + + while (sender_node && (!xmlnode_get_attrib(sender_node, "unread") || + !strcmp(xmlnode_get_attrib(sender_node, "unread"),"0"))) + sender_node = xmlnode_get_next_twin(sender_node); + + if (!sender_node) { + i--; + continue; + } + + from = xmlnode_get_attrib(sender_node, "name"); + if (!from || !*from) + from = xmlnode_get_attrib(sender_node, "address"); + subject = xmlnode_get_data(subject_node); + /* + * url = xmlnode_get_attrib(message, "url"); + */ + tos[i] = (to_name != NULL ? to_name : ""); + froms[i] = (from != NULL ? from : ""); + subjects[i] = (subject != NULL ? subject : ""); + urls[i] = (url != NULL ? url : ""); + + tid = xmlnode_get_attrib(message, "tid"); + if (tid && + (js->gmail_last_tid == NULL || strcmp(tid, js->gmail_last_tid) > 0)) { + g_free(js->gmail_last_tid); + js->gmail_last_tid = g_strdup(tid); + } + } + + if (i>0) + gaim_notify_emails(js->gc, returned_count, TRUE, subjects, froms, tos, + urls, NULL, js->gc->account); + g_free(to_name); + g_free(tos); + g_free(froms); + g_free(subjects); + g_free(urls); + + in_str = xmlnode_get_attrib(child, "result-time"); + if (in_str && *in_str) { + g_free(js->gmail_last_time); + js->gmail_last_time = g_strdup(in_str); + } +} + +void +jabber_gmail_poke(JabberStream *js, xmlnode *packet) +{ + const char *type; + xmlnode *query; + JabberIq *iq; + + /* bail if the user isn't interested */ + if (!gaim_account_get_check_mail(js->gc->account)) + return; + + type = xmlnode_get_attrib(packet, "type"); + + + /* Is this an initial incoming mail notification? If so, send a request for more info */ + if (strcmp(type, "set") || !xmlnode_get_child(packet, "new-mail")) + return; + + gaim_debug(GAIM_DEBUG_MISC, "jabber", + "Got new mail notification. Sending request for more info\n"); + + iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify"); + jabber_iq_set_callback(iq, jabber_gmail_parse, NULL); + query = xmlnode_get_child(iq->node, "query"); + + if (js->gmail_last_time) + xmlnode_set_attrib(query, "newer-than-time", js->gmail_last_time); + if (js->gmail_last_tid) + xmlnode_set_attrib(query, "newer-than-tid", js->gmail_last_tid); + + jabber_iq_send(iq); + return; +} + +void jabber_gmail_init(JabberStream *js) { + JabberIq *iq; + + if (!gaim_account_get_check_mail(js->gc->account)) + return; + + iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify"); + jabber_iq_set_callback(iq, jabber_gmail_parse, NULL); + jabber_iq_send(iq); +} Property changes on: trunk/libgaim/protocols/jabber/google.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/libgaim/protocols/jabber/google.h =================================================================== --- trunk/libgaim/protocols/jabber/google.h (rev 0) +++ trunk/libgaim/protocols/jabber/google.h 2006-12-10 23:08:45 UTC (rev 17949) @@ -0,0 +1,32 @@ +/** + * Gaim is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _GAIM_GOOGLE_H_ +#define _GAIM_GOOGLE_H_ + +/* This is a place for Google Talk-specific XMPP extensions to live + * such that they don't intermingle with code for the XMPP RFCs and XEPs :) */ + +#include "jabber.h" + +void jabber_gmail_init(JabberStream *js); +void jabber_gmail_poke(JabberStream *js, xmlnode *node); + +#endif /* _GAIM_GOOGLE_H_ */ Property changes on: trunk/libgaim/protocols/jabber/google.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/libgaim/protocols/jabber/iq.c =================================================================== --- trunk/libgaim/protocols/jabber/iq.c 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/libgaim/protocols/jabber/iq.c 2006-12-10 23:08:45 UTC (rev 17949) @@ -25,6 +25,7 @@ #include "buddy.h" #include "disco.h" +#include "google.h" #include "iq.h" #include "oob.h" #include "roster.h" @@ -279,12 +280,16 @@ } } - if(xmlnode_get_child_with_namespace(packet, "si", "http://jabber.org/protocol/si")) { jabber_si_parse(js, packet); return; } + if(xmlnode_get_child_with_namespace(packet, "new-mail", "google:mail:notify")) { + jabber_gmail_poke(js, packet); + return; + } + /* If we get here, send the default error reply mandated by XMPP-CORE */ if(type && (!strcmp(type, "set") || !strcmp(type, "get"))) { JabberIq *iq = jabber_iq_new(js, JABBER_IQ_ERROR); Modified: trunk/libgaim/protocols/jabber/jabber.c =================================================================== --- trunk/libgaim/protocols/jabber/jabber.c 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/libgaim/protocols/jabber/jabber.c 2006-12-10 23:08:45 UTC (rev 17949) @@ -998,6 +998,8 @@ g_free(js->sasl_cb); #endif g_free(js->server_name); + g_free(js->gmail_last_time); + g_free(js->gmail_last_tid); g_free(js); gc->proto_data = NULL; @@ -1847,7 +1849,7 @@ static GaimPluginProtocolInfo prpl_info = { - OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME, + OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_MAIL_CHECK, NULL, /* user_splits */ NULL, /* protocol_options */ {"png,gif,jpeg", 0, 0, 96, 96, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ Modified: trunk/libgaim/protocols/jabber/jabber.h =================================================================== --- trunk/libgaim/protocols/jabber/jabber.h 2006-12-10 22:01:22 UTC (rev 17948) +++ trunk/libgaim/protocols/jabber/jabber.h 2006-12-10 23:08:45 UTC (rev 17949) @@ -50,6 +50,12 @@ JABBER_CAP_CHAT_STATES = 1 << 6, JABBER_CAP_IQ_SEARCH = 1 << 7, JABBER_CAP_IQ_REGISTER = 1 << 8, + + /* Google Talk extensions: + * http://code.google.com/apis/talk/jep_extensions/extensions.html + */ + JABBER_CAP_GMAIL_NOTIFY = 1 << 9, + JABBER_CAP_RETRIEVED = 1 << 31 } JabberCapabilities; @@ -120,8 +126,12 @@ gboolean reinit; + JabberCapabilities server_caps; gboolean googletalk; char *server_name; + + char *gmail_last_time; + char *gmail_last_tid; /* OK, this stays at the end of the struct, so plugins can depend * on the rest of the stuff being in the right place This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-13 10:46:45
|
Revision: 17984 http://svn.sourceforge.net/gaim/?rev=17984&view=rev Author: thekingant Date: 2006-12-13 02:46:44 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Jonathan Brossard found some minor flaws in our perl API... basically perl scripts that used the gaim_debug() functions previously had to escape '%' to get it to not behave wonkily. That should no longer be necessary after this change. Modified Paths: -------------- trunk/COPYRIGHT trunk/libgaim/plugins/perl/common/Debug.xs Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-12-13 10:11:31 UTC (rev 17983) +++ trunk/COPYRIGHT 2006-12-13 10:46:44 UTC (rev 17984) @@ -43,6 +43,7 @@ Derrick J Brashear Matt Brenneke Jeremy Brooks +Jonathan Brossard Philip Brown Sean Burke Thomas Butter Modified: trunk/libgaim/plugins/perl/common/Debug.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Debug.xs 2006-12-13 10:11:31 UTC (rev 17983) +++ trunk/libgaim/plugins/perl/common/Debug.xs 2006-12-13 10:46:44 UTC (rev 17984) @@ -8,31 +8,43 @@ Gaim::DebugLevel level const char *category const char *string +CODE: + gaim_debug(level, category, "%s", string); void gaim_debug_misc(category, string) const char *category const char *string +CODE: + gaim_debug_misc(category, "%s", string); void gaim_debug_info(category, string) const char *category const char *string +CODE: + gaim_debug_info(category, "%s", string); void gaim_debug_warning(category, string) const char *category const char *string +CODE: + gaim_debug_warning(category, "%s", string); void gaim_debug_error(category, string) const char *category const char *string +CODE: + gaim_debug_error(category, "%s", string); void gaim_debug_fatal(category, string) const char *category const char *string +CODE: + gaim_debug_fatal(category, "%s", string); void gaim_debug_set_enabled(enabled) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-13 11:10:34
|
Revision: 17985 http://svn.sourceforge.net/gaim/?rev=17985&view=rev Author: thekingant Date: 2006-12-13 03:10:32 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Jonathan Brossard (endrazine) found some more places where we were passing normal strings to printf as format strings, which could cause problems when printing text containing the % character. Modified Paths: -------------- trunk/console/libgnt/gntwm.c trunk/gtk/win32/win_gaim.c trunk/libgaim/protocols/qq/qq_proxy.c Modified: trunk/console/libgnt/gntwm.c =================================================================== --- trunk/console/libgnt/gntwm.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/console/libgnt/gntwm.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -431,11 +431,11 @@ if (now & attr) \ { \ if (!(old & attr)) \ - fprintf(file, start); \ + fprintf(file, "%s", start); \ } \ else if (old & attr) \ { \ - fprintf(file, end); \ + fprintf(file, "%s", end); \ } \ } while (0) Modified: trunk/gtk/win32/win_gaim.c =================================================================== --- trunk/gtk/win32/win_gaim.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/gtk/win32/win_gaim.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -145,7 +145,7 @@ putenv(settingsdir); snprintf(aspelldir, sizeof(aspelldir), "GAIM_ASPELL_DIR=%s\\Aspell\\bin", path); - printf(aspelldir); + printf("%s", aspelldir); putenv(aspelldir); /* set the GTK+ path to be \\path\to\GTK\bin */ @@ -513,7 +513,7 @@ snprintf(errbuf, 512, "Error getting module filename.\nError: (%u) %s", (UINT) dw, err_msg); - printf(errbuf); + printf("%s", errbuf); MessageBox(NULL, errbuf, NULL, MB_OK | MB_TOPMOST); } @@ -542,7 +542,7 @@ (UINT) dw, err_msg, mod_not_found ? "\n" : "", mod_not_found ? "This probably means that GTK+ can't be found." : ""); - printf(errbuf); + printf("%s", errbuf); MessageBox(NULL, errbuf, TEXT("Error"), MB_OK | MB_TOPMOST); return 0; Modified: trunk/libgaim/protocols/qq/qq_proxy.c =================================================================== --- trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -65,7 +65,7 @@ strcat(buf1, buf2); } strcat(buf1, "\n"); - gaim_debug(GAIM_DEBUG_INFO, desc, buf1); + gaim_debug(GAIM_DEBUG_INFO, desc, "%s", buf1); } /* QQ 2003iii uses double MD5 for the pwkey to get the session key */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-13 21:54:53
|
Revision: 17989 http://svn.sourceforge.net/gaim/?rev=17989&view=rev Author: seanegan Date: 2006-12-13 13:54:52 -0800 (Wed, 13 Dec 2006) Log Message: ----------- - Fix a crash when 'detailed' is FALSE - Google Talk will return details for the first 30 e-mails, and give you the total count of new e-mails I made it so that if the total count is > 30, it doesn't show details, and takes you directly to the Inbox - I still need to integrate getting multiple non-detailed mail notifications Modified Paths: -------------- trunk/gtk/gtknotify.c trunk/libgaim/protocols/jabber/google.c Modified: trunk/gtk/gtknotify.c =================================================================== --- trunk/gtk/gtknotify.c 2006-12-13 21:29:16 UTC (rev 17988) +++ trunk/gtk/gtknotify.c 2006-12-13 21:54:52 UTC (rev 17989) @@ -306,6 +306,21 @@ (url == NULL ? NULL : &url)); } +struct inbox_info { + char *url; + void *handle; +}; + +static void +open_inbox_cb(struct inbox_info *inbox) +{ + if (inbox->url) + gaim_notify_uri(inbox->handle, inbox->url); + g_free(inbox->url); + g_free(inbox); +} + + static void * gaim_gtk_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, @@ -322,6 +337,22 @@ account = gaim_connection_get_account(gc); + if (!detailed) { + struct inbox_info *inbox = g_new0(struct inbox_info, 1); + GdkPixbuf *pixbuf = gtk_widget_render_icon(gaim_gtk_blist_get_default_gtk_blist()->headline_hbox, + GAIM_STOCK_ICON_ONLINE_MSG, GTK_ICON_SIZE_BUTTON, NULL); + char *label_text = g_strdup_printf(ngettext("<b>You have %d new e-mail.</b>", + "<b>You have %d new e-mails.</b>", + count),count); + + inbox->handle = gc; + inbox->url = urls ? g_strdup(urls[0]) : NULL; + gaim_gtk_blist_set_headline(label_text, + pixbuf, G_CALLBACK(open_inbox_cb), inbox); + g_object_unref(pixbuf); + return; + } + if (mail_dialog == NULL || !detailed) { GtkCellRenderer *rend; Modified: trunk/libgaim/protocols/jabber/google.c =================================================================== --- trunk/libgaim/protocols/jabber/google.c 2006-12-13 21:29:16 UTC (rev 17988) +++ trunk/libgaim/protocols/jabber/google.c 2006-12-13 21:54:52 UTC (rev 17989) @@ -70,7 +70,7 @@ url = xmlnode_get_attrib(child, "url"); if (!url || !*url) url = "http://www.gmail.com"; - + message= xmlnode_get_child(child, "mail-thread-info"); for (i=0; message; message = xmlnode_get_next_twin(message), i++) { subject_node = xmlnode_get_child(message, "subject"); @@ -106,9 +106,10 @@ } } - if (i>0) - gaim_notify_emails(js->gc, returned_count, TRUE, subjects, froms, tos, - urls, NULL, js->gc->account); + if (i>0) + gaim_notify_emails(js->gc, count, count == returned_count, subjects, froms, tos, + urls, NULL, NULL); + g_free(to_name); g_free(tos); g_free(froms); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |