Mercurial > pidgin
changeset 21753:e9760c22bab5
merge of '8ae0d2f36bb2689e7de9fcb3245c1e9484bd3fe6'
and 'c93ff822e1d2ed0916468029ebfbbea0ed0f28fa'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 03 Dec 2007 22:57:49 +0000 |
parents | 5ff16647c50d (current diff) 9c2230fe2217 (diff) |
children | 61725f2eb4a6 8922d61c738a |
files | |
diffstat | 8 files changed, 50 insertions(+), 58 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Mon Dec 03 22:56:22 2007 +0000 +++ b/configure.ac Mon Dec 03 22:57:49 2007 +0000 @@ -1659,16 +1659,24 @@ ]) mozilla_nspr="mozilla-nspr" mozilla_nss="mozilla-nss" - else - if `$PKG_CONFIG --exists nss`; then - PKG_CHECK_MODULES(NSS, nss, [ - have_nss="yes" - ], [ - AC_MSG_RESULT(no) - ]) - mozilla_nspr="nspr" - mozilla_nss="nss" - fi + elif `$PKG_CONFIG --exists nss`; then + PKG_CHECK_MODULES(NSS, nss, [ + have_nss="yes" + ], [ + AC_MSG_RESULT(no) + have_nss="no" + ]) + mozilla_nspr="nspr" + mozilla_nss="nss" + elif `$PKG_CONFIG --exists microb-engine-nss`; then + PKG_CHECK_MODULES(NSS, microb-engine-nss, [ + have_nss="yes" + ], [ + AC_MSG_RESULT(no) + have_nss="no" + ]) + mozilla_nspr="mozilla-nspr" + mozilla_nss="microb-engine-nss" fi if test "x$have_nss" = "xyes"; then
--- a/doc/finch.1.in Mon Dec 03 22:56:22 2007 +0000 +++ b/doc/finch.1.in Mon Dec 03 22:57:49 2007 +0000 @@ -157,6 +157,7 @@ .br #See below for details on color .br + [general] .br shadow = 0 @@ -247,8 +248,6 @@ .br urgent = green; black .br -urgent = green; black -.br .br # Remap some keys for GntEntry
--- a/libpurple/blist.c Mon Dec 03 22:56:22 2007 +0000 +++ b/libpurple/blist.c Mon Dec 03 22:57:49 2007 +0000 @@ -1310,7 +1310,7 @@ g = (PurpleGroup *)((PurpleBlistNode *)c)->parent; } else { if (group) { - /* Add chat to blist if isn't already on it. Fixes #2752. */ + /* Add group to blist if isn't already on it. Fixes #2752. */ if (!purple_find_group(group->name)) { purple_blist_add_group(group, purple_blist_get_last_sibling(purplebuddylist->root));
--- a/libpurple/connection.c Mon Dec 03 22:56:22 2007 +0000 +++ b/libpurple/connection.c Mon Dec 03 22:57:49 2007 +0000 @@ -38,6 +38,8 @@ #include "signals.h" #include "util.h" +#define KEEPALIVE_INTERVAL 30 + static GList *connections = NULL; static GList *connections_connecting = NULL; static PurpleConnectionUiOps *connection_ui_ops = NULL; @@ -73,7 +75,7 @@ if (on && !gc->keepalive) { purple_debug_info("connection", "Activating keepalive.\n"); - gc->keepalive = purple_timeout_add_seconds(30, send_keepalive, gc); + gc->keepalive = purple_timeout_add_seconds(KEEPALIVE_INTERVAL, send_keepalive, gc); } else if (!on && gc->keepalive > 0) {
--- a/libpurple/protocols/oscar/family_feedbag.c Mon Dec 03 22:56:22 2007 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Mon Dec 03 22:57:49 2007 +0000 @@ -115,14 +115,10 @@ gboolean exists; struct aim_ssi_item *cur, *new; - new = (struct aim_ssi_item *)g_malloc(sizeof(struct aim_ssi_item)); + new = g_new(struct aim_ssi_item, 1); /* Set the name */ - if (name) { - new->name = (char *)g_malloc((strlen(name)+1)*sizeof(char)); - strcpy(new->name, name); - } else - new->name = NULL; + new->name = g_strdup(name); /* Set the group ID# and buddy ID# */ new->gid = gid; @@ -510,7 +506,7 @@ for (cur1=od->ssi.official; cur1 && (n < 15); cur1=cur1->next) { if (!aim_ssi_itemlist_find(od->ssi.local, cur1->gid, cur1->bid)) { n++; - new = (struct aim_ssi_tmp *)g_malloc(sizeof(struct aim_ssi_tmp)); + new = g_new(struct aim_ssi_tmp, 1); new->action = SNAC_SUBTYPE_FEEDBAG_DEL; new->ack = 0xffff; new->name = NULL; @@ -530,7 +526,7 @@ for (cur1=od->ssi.local; cur1 && (n < 15); cur1=cur1->next) { if (!aim_ssi_itemlist_find(od->ssi.official, cur1->gid, cur1->bid)) { n++; - new = (struct aim_ssi_tmp *)g_malloc(sizeof(struct aim_ssi_tmp)); + new = g_new(struct aim_ssi_tmp, 1); new->action = SNAC_SUBTYPE_FEEDBAG_ADD; new->ack = 0xffff; new->name = NULL; @@ -551,7 +547,7 @@ cur2 = aim_ssi_itemlist_find(od->ssi.official, cur1->gid, cur1->bid); if (cur2 && (aim_ssi_itemlist_cmp(cur1, cur2))) { n++; - new = (struct aim_ssi_tmp *)g_malloc(sizeof(struct aim_ssi_tmp)); + new = g_new(struct aim_ssi_tmp, 1); new->action = SNAC_SUBTYPE_FEEDBAG_MOD; new->ack = 0xffff; new->name = NULL; @@ -1028,8 +1024,7 @@ return -EINVAL; g_free(group->name); - group->name = (char *)g_malloc((strlen(newgn)+1)*sizeof(char)); - strcpy(group->name, newgn); + group->name = g_strdup(newgn); /* Sync our local list with the server list */ return aim_ssi_sync(od); @@ -1461,11 +1456,7 @@ if ((item = aim_ssi_itemlist_find(od->ssi.local, gid, bid))) { item->type = type; g_free(item->name); - if (name) { - item->name = (char *)g_malloc((strlen(name)+1)*sizeof(char)); - strcpy(item->name, name); - } else - item->name = NULL; + item->name = g_strdup(name); aim_tlvlist_free(item->data); item->data = aim_tlvlist_copy(data); } @@ -1473,11 +1464,7 @@ if ((item = aim_ssi_itemlist_find(od->ssi.official, gid, bid))) { item->type = type; g_free(item->name); - if (name) { - item->name = (char *)g_malloc((strlen(name)+1)*sizeof(char)); - strcpy(item->name, name); - } else - item->name = NULL; + item->name = g_strdup(name); aim_tlvlist_free(item->data); item->data = aim_tlvlist_copy(data); } @@ -1555,10 +1542,7 @@ /* Remove the item from the local list */ /* Make sure cur->item is still valid memory */ if (aim_ssi_itemlist_valid(od->ssi.local, cur->item)) { - if (cur->item->name) { - cur->name = (char *)g_malloc((strlen(cur->item->name)+1)*sizeof(char)); - strcpy(cur->name, cur->item->name); - } + cur->name = g_strdup(cur->item->name); aim_ssi_itemlist_del(&od->ssi.local, cur->item); } cur->item = NULL; @@ -1569,11 +1553,7 @@ struct aim_ssi_item *cur1; if ((cur1 = aim_ssi_itemlist_find(od->ssi.official, cur->item->gid, cur->item->bid))) { g_free(cur->item->name); - if (cur1->name) { - cur->item->name = (char *)g_malloc((strlen(cur1->name)+1)*sizeof(char)); - strcpy(cur->item->name, cur1->name); - } else - cur->item->name = NULL; + cur->item->name = g_strdup(cur1->name); aim_tlvlist_free(cur->item->data); cur->item->data = aim_tlvlist_copy(cur1->data); } @@ -1603,11 +1583,7 @@ struct aim_ssi_item *cur1; if ((cur1 = aim_ssi_itemlist_find(od->ssi.official, cur->item->gid, cur->item->bid))) { g_free(cur1->name); - if (cur->item->name) { - cur1->name = (char *)g_malloc((strlen(cur->item->name)+1)*sizeof(char)); - strcpy(cur1->name, cur->item->name); - } else - cur1->name = NULL; + cur1->name = g_strdup(cur->item->name); aim_tlvlist_free(cur1->data); cur1->data = aim_tlvlist_copy(cur->item->data); }
--- a/libpurple/prpl.h Mon Dec 03 22:56:22 2007 +0000 +++ b/libpurple/prpl.h Mon Dec 03 22:57:49 2007 +0000 @@ -292,6 +292,13 @@ void (*chat_whisper)(PurpleConnection *, int id, const char *who, const char *message); int (*chat_send)(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags); + + /** If implemented, this will be called regularly for this prpl's + * active connections. You'd want to do this if you need to repeatedly + * send some kind of keepalive packet to the server to avoid being + * disconnected. ("Regularly" is defined by + * <code>KEEPALIVE_INTERVAL</code> in <tt>libpurple/connection.c</tt>.) + */ void (*keepalive)(PurpleConnection *); /** new user registration */
--- a/pidgin/gtkblist.c Mon Dec 03 22:56:22 2007 +0000 +++ b/pidgin/gtkblist.c Mon Dec 03 22:57:49 2007 +0000 @@ -1398,7 +1398,7 @@ pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, node); pidgin_append_blist_node_extended_menu(menu, node); - if (!contact_expanded) + if (!contact_expanded && contact != NULL) pidgin_append_blist_node_move_to_menu(menu, (PurpleBlistNode *)contact); if (node->parent && node->parent->child->next && @@ -5715,11 +5715,11 @@ esc = g_markup_escape_text(group->name, -1); if (selected) - mark = g_strdup_printf("<span weight='bold'>%s</span>%s", esc, group_count); + mark = g_strdup_printf("<span weight='bold'>%s</span>%s", esc ? esc : "", group_count); else mark = g_strdup_printf("<span color='#%02x%02x%02x' weight='bold'>%s</span>%s", textcolor.red>>8, textcolor.green>>8, textcolor.blue>>8, - esc, group_count); + esc ? esc : "", group_count); g_free(esc); return mark;
--- a/pidgin/gtkimhtml.c Mon Dec 03 22:56:22 2007 +0000 +++ b/pidgin/gtkimhtml.c Mon Dec 03 22:57:49 2007 +0000 @@ -844,19 +844,19 @@ gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_SMILEY, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Smile!")); + mi = gtk_image_menu_item_new_with_mnemonic(_("S_mile!")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_INSERT, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Insert")); + mi = gtk_image_menu_item_new_with_mnemonic(_("_Insert")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(GTK_STOCK_BOLD, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Font")); + mi = gtk_image_menu_item_new_with_mnemonic(_("_Font")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); @@ -4290,19 +4290,19 @@ gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(GTK_STOCK_BOLD, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Font")); + mi = gtk_image_menu_item_new_with_mnemonic(_("_Font")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_INSERT, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Insert")); + mi = gtk_image_menu_item_new_with_mnemonic(_("_Insert")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); img = gtk_image_new_from_stock(PIDGIN_STOCK_TOOLBAR_SMILEY, GTK_ICON_SIZE_MENU); - mi = gtk_image_menu_item_new_with_label(_("_Smile!")); + mi = gtk_image_menu_item_new_with_mnemonic(_("S_mile!")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); gtk_widget_show(mi); gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi);