Mercurial > pidgin.yaz
changeset 27806:07915e7a4c08
propagate from branch 'im.pidgin.pidgin' (head ccf8998cb268f07fd8ef3f817b6cb5f1bc32cf02)
to branch 'im.pidgin.pidgin.yaz' (head 91de8e43f6b89d2bb2ca63b700acf3395cdf0e57)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 20 Mar 2008 11:57:02 +0000 |
parents | 80d3f4ff1cae (current diff) 49deb72ffdc1 (diff) |
children | aceb6c9734a4 |
files | configure.ac |
diffstat | 9 files changed, 85 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Mar 20 11:48:40 2008 +0000 +++ b/ChangeLog Thu Mar 20 11:57:02 2008 +0000 @@ -16,6 +16,7 @@ * Fix a crash when starting if you have a Zephyr account * Increase XMPP ping timeout to 120 seconds, to prevent poor network connections from timing out unnecessarily. + * Don't crash on XMPP forms with empty default values. Pidgin: * Remove a workaround for older versions gstreamer that was causing
--- a/configure.ac Thu Mar 20 11:48:40 2008 +0000 +++ b/configure.ac Thu Mar 20 11:57:02 2008 +0000 @@ -1380,7 +1380,7 @@ oldCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" - AC_CHECK_HEADERS_ONCE(EXTERN.h) + AC_CHECK_HEADERS(EXTERN.h) AC_CHECK_HEADERS(perl.h, [], enable_perl=no, [#if HAVE_EXTERN_H # include <EXTERN.h>
--- a/libpurple/account.c Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/account.c Thu Mar 20 11:57:02 2008 +0000 @@ -751,6 +751,7 @@ description = g_strdup(""); current_error = g_new0(PurpleConnectionErrorInfo, 1); + PURPLE_DBUS_REGISTER_POINTER(current_error, PurpleConnectionErrorInfo); current_error->type = type; current_error->description = description; @@ -1009,6 +1010,7 @@ purple_log_free(account->system_log); priv = PURPLE_ACCOUNT_GET_PRIVATE(account); + PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error); g_free(priv->current_error); g_free(priv); @@ -2365,8 +2367,7 @@ } static void -set_current_error(PurpleAccount *account, - PurpleConnectionErrorInfo *new_err) +set_current_error(PurpleAccount *account, PurpleConnectionErrorInfo *new_err) { PurpleAccountPrivate *priv; PurpleConnectionErrorInfo *old_err; @@ -2389,6 +2390,7 @@ if(old_err) g_free(old_err->description); + PURPLE_DBUS_UNREGISTER_POINTER(old_err); g_free(old_err); } @@ -2406,6 +2408,7 @@ g_return_if_fail(account != NULL); err = g_new0(PurpleConnectionErrorInfo, 1); + PURPLE_DBUS_REGISTER_POINTER(err, PurpleConnectionErrorInfo); err->type = type; err->description = g_strdup(description);
--- a/libpurple/plugins/test.pl Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/plugins/test.pl Thu Mar 20 11:57:02 2008 +0000 @@ -1,6 +1,4 @@ -#!/usr/bin/env perl -w - -use Gaim; +use Purple; %PLUGIN_INFO = ( perl_api_version => 2, @@ -8,51 +6,37 @@ version => '1.0', summary => 'Provides as a test base for the perl plugin.', description => 'Provides as a test base for the perl plugin.', - author => 'Christian Hammond <chipx86@gnupdate.org>', + author => 'Etan Reisner <deryni\@pidgin.im>', url => 'http://pidgin.im', - load => "plugin_load", - unload => "plugin_unload" + load => "plugin_load" ); -sub account_away_cb { - Gaim::debug_info("perl test plugin", "In account_away_cb\n"); - - my ($account, $state, $message, $data) = @_; - - Gaim::debug_info("perl test plugin", "Account " . - $account->get_username() . " went away.\n"); - Gaim::debug_info("perl test plugin", $data . "\n"); -} - sub plugin_init { return %PLUGIN_INFO; } +sub account_status_cb { + my ($account, $old, $new, $data) = @_; + + Purple::Debug::info("perl test plugin", "In account_status_cb\n"); + + Purple::Debug::info("perl test plugin", "Account " . + $account->get_username() . " changed status.\n"); + Purple::Debug::info("perl test plugin", $data . "\n"); +} + sub plugin_load { - Gaim::debug_info("perl test plugin", "plugin_load\n"); my $plugin = shift; - Gaim::debug_info("perl test plugin", "Listing accounts.\n"); - foreach $account (Gaim::accounts()) { - Gaim::debug_info("perl test plugin", $account->get_username() . "\n"); + Purple::Debug::info("perl test plugin", "plugin_load\n"); + + Purple::Debug::info("perl test plugin", "Listing accounts.\n"); + foreach $account (Purple::Accounts::get_all()) { + Purple::Debug::info("perl test plugin", $account->get_username() . "\n"); } - Gaim::debug_info("perl test plugin", "Listing buddy list.\n"); - foreach $group (Gaim::BuddyList::groups()) { - Gaim::debug_info("perl test plugin", - $group->get_name() . ":\n"); - - foreach $buddy ($group->buddies()) { - Gaim::debug_info("perl test plugin", - " " . $buddy->get_name() . "\n"); - } - } - - Gaim::signal_connect(Gaim::Accounts::handle, "account-away", - $plugin, \&account_away_cb, "test"); + Purple::Signal::connect(Purple::Accounts::get_handle(), + "account-status-changed", $plugin, + \&account_status_cb, "test"); } - -sub plugin_unload { - my $plugin = shift; -}
--- a/libpurple/protocols/jabber/auth.c Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Thu Mar 20 11:57:02 2008 +0000 @@ -490,6 +490,12 @@ { char *mech_name = xmlnode_get_data(mechnode); #ifdef HAVE_CYRUS_SASL + /* Skip the GSSAPI mechanism unless it's enabled for this account */ + if (mech_name && !strcmp(mech_name, "GSSAPI") && + !purple_account_get_bool(js->gc->account, "auth_gssapi", TRUE)) { + continue; + } + g_string_append(js->sasl_mechs, mech_name); g_string_append_c(js->sasl_mechs, ' '); #else
--- a/libpurple/protocols/jabber/libxmpp.c Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Thu Mar 20 11:57:02 2008 +0000 @@ -224,6 +224,14 @@ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); +#ifdef HAVE_CYRUS_SASL + option = purple_account_option_bool_new( + _("Use GSSAPI (Kerberos v5) for authentication"), + "auth_gssapi", TRUE); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, + option); +#endif + option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/libpurple/protocols/jabber/xdata.c Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/protocols/jabber/xdata.c Thu Mar 20 11:57:02 2008 +0000 @@ -285,7 +285,10 @@ for(valuenode = xmlnode_get_child(fn, "value"); valuenode; valuenode = xmlnode_get_next_twin(valuenode)) { - selected = g_list_prepend(selected, xmlnode_get_data(valuenode)); + char *data = xmlnode_get_data(valuenode); + if (data != NULL) { + selected = g_list_prepend(selected, data); + } } for(optnode = xmlnode_get_child(fn, "option"); optnode;
--- a/libpurple/protocols/myspace/markup.c Thu Mar 20 11:48:40 2008 +0000 +++ b/libpurple/protocols/myspace/markup.c Thu Mar 20 11:57:02 2008 +0000 @@ -181,7 +181,7 @@ { guint dpi; - dpi = purple_account_get_int(session->account, "port", MSIM_DEFAULT_DPI); + dpi = purple_account_get_int(session->account, "dpi", MSIM_DEFAULT_DPI); return (guint)msim_round((POINTS_PER_INCH * 1. / dpi) * height); @@ -195,7 +195,7 @@ { guint dpi; - dpi = purple_account_get_int(session->account, "port", MSIM_DEFAULT_DPI); + dpi = purple_account_get_int(session->account, "dpi", MSIM_DEFAULT_DPI); return (guint)msim_round((dpi * 1. / POINTS_PER_INCH) * point); }
--- a/pidgin/gtkblist.c Thu Mar 20 11:48:40 2008 +0000 +++ b/pidgin/gtkblist.c Thu Mar 20 11:57:02 2008 +0000 @@ -3354,24 +3354,34 @@ purple_notify_user_info_destroy(user_info); } else if (PURPLE_BLIST_NODE_IS_GROUP(node)) { + gint count; PurpleGroup *group = (PurpleGroup*)node; PurpleNotifyUserInfo *user_info; user_info = purple_notify_user_info_new(); - /* Total buddies (from online accounts) in group */ - tmp = g_strdup_printf("%d", - purple_blist_get_group_size(group, FALSE)); - purple_notify_user_info_add_pair(user_info, _("Total Buddies"), - tmp); - g_free(tmp); - - /* Online buddies in group */ - tmp = g_strdup_printf("%d", - purple_blist_get_group_online_count(group)); - purple_notify_user_info_add_pair(user_info, _("Online Buddies"), - tmp); - g_free(tmp); + count = purple_blist_get_group_online_count(group); + + if (count != 0) { + /* Online buddies in group */ + tmp = g_strdup_printf("%d", count); + purple_notify_user_info_add_pair(user_info, + _("Online Buddies"), + tmp); + g_free(tmp); + } + count = 0; + + count = purple_blist_get_group_size(group, FALSE); + if (count != 0) { + /* Total buddies (from online accounts) in group */ + tmp = g_strdup_printf("%d", count); + purple_notify_user_info_add_pair(user_info, + _("Total Buddies"), + tmp); + g_free(tmp); + } + count = 0; tmp = purple_notify_user_info_get_text_with_newline(user_info, "\n"); g_string_append(str, tmp); @@ -6356,43 +6366,25 @@ vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(hbox), vbox); - label = gtk_label_new( - _("Please enter the screen name of the person you would like " - "to add to your buddy list. You may optionally enter an alias, " - "or nickname, for the buddy. The alias will be displayed in " - "place of the screen name whenever possible.\n")); - - gtk_widget_set_size_request(GTK_WIDGET(label), 400, -1); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + g_signal_connect(G_OBJECT(data->window), "destroy", + G_CALLBACK(destroy_add_buddy_dialog_cb), data); + + label = gtk_label_new(_("Add a buddy.\n")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - - g_signal_connect(G_OBJECT(data->window), "destroy", - G_CALLBACK(destroy_add_buddy_dialog_cb), data); - table = gtk_table_new(4, 2, FALSE); gtk_table_set_row_spacings(GTK_TABLE(table), 5); gtk_table_set_col_spacings(GTK_TABLE(table), 5); gtk_container_set_border_width(GTK_CONTAINER(table), 0); gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); - /* Set up stuff for the account box */ - label = gtk_label_new_with_mnemonic(_("A_ccount:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); - data->account_box = pidgin_account_option_menu_new(account, FALSE, G_CALLBACK(add_buddy_select_account_cb), NULL, data); - gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 1, 2, 0, 1); - gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->account_box); - pidgin_set_accessible_label (data->account_box, label); - /* End of account box */ - - label = gtk_label_new_with_mnemonic(_("_Screen name:")); + gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 0, 2, 0, 1); + + label = gtk_label_new_with_mnemonic(_("Buddy's _screen name:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); @@ -6404,23 +6396,23 @@ gtk_entry_set_text(GTK_ENTRY(data->entry), username); else gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window), - GTK_RESPONSE_OK, FALSE); + GTK_RESPONSE_OK, FALSE); gtk_entry_set_activates_default (GTK_ENTRY(data->entry), TRUE); gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->entry); pidgin_set_accessible_label (data->entry, label); g_signal_connect(G_OBJECT(data->entry), "changed", - G_CALLBACK(pidgin_set_sensitive_if_input), - data->window); - - label = gtk_label_new_with_mnemonic(_("A_lias:")); + G_CALLBACK(pidgin_set_sensitive_if_input), + data->window); + + label = gtk_label_new_with_mnemonic(_("(Optional) A_lias:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3); data->entry_for_alias = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(table), - data->entry_for_alias, 1, 2, 2, 3); + data->entry_for_alias, 1, 2, 2, 3); if (alias != NULL) gtk_entry_set_text(GTK_ENTRY(data->entry_for_alias), alias); @@ -6432,7 +6424,7 @@ gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->entry_for_alias); pidgin_set_accessible_label (data->entry_for_alias, label); - label = gtk_label_new_with_mnemonic(_("_Group:")); + label = gtk_label_new_with_mnemonic(_("Add buddy to _group:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);