Mercurial > pidgin
changeset 15828:2edbd4fede72
merge of '921657d3f21f5190639852247331d608f5946095'
and 'fab2ec4334c8c32a4a33cf74896fdbf48dc76365'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 13:31:34 +0000 |
parents | 32c366eeeb99 (current diff) eec0d0202ffd (diff) |
children | c12bf63ba2cc e04c98c1bce9 |
files | finch/gntgaim.c finch/gntgaim.h finch/gntrequest.c libpurple/connection.c libpurple/dbus-gaim.h libpurple/dnsquery.c libpurple/dnssrv.c libpurple/gaim-client.h libpurple/plugins/tcl/tcl_gaim.h libpurple/protocols/silc/silcgaim.h |
diffstat | 5 files changed, 58 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntrequest.c Mon Mar 19 07:01:17 2007 +0000 +++ b/finch/gntrequest.c Mon Mar 19 13:31:34 2007 +0000 @@ -384,10 +384,21 @@ } else if (type == PURPLE_REQUEST_FIELD_STRING) { + const char *hint = gaim_request_field_get_type_hint(field); GntWidget *entry = gnt_entry_new( purple_request_field_string_get_default_value(field)); gnt_entry_set_masked(GNT_ENTRY(entry), purple_request_field_string_is_masked(field)); + if (gaim_str_has_prefix(hint, "screenname")) { + GaimBlistNode *node = gaim_blist_get_root(); + gboolean offline = gaim_str_has_suffix(hint, "all"); + for (; node; node = gaim_blist_node_next(node, offline)) { + if (!GAIM_BLIST_NODE_IS_BUDDY(node)) + continue; + gnt_entry_add_suggest(GNT_ENTRY(entry), gaim_buddy_get_name((GaimBuddy*)node)); + } + gnt_entry_set_always_suggest(GNT_ENTRY(entry), TRUE); + } gnt_box_add_widget(GNT_BOX(hbox), entry); field->ui_data = entry; }
--- a/libpurple/connection.c Mon Mar 19 07:01:17 2007 +0000 +++ b/libpurple/connection.c Mon Mar 19 13:31:34 2007 +0000 @@ -435,7 +435,7 @@ g_return_if_fail(gc != NULL); - if (text != NULL) { + if (text == NULL) { g_critical("purple_connection_error: check `text != NULL' failed"); text = _("Unknown error"); }
--- a/libpurple/dnsquery.c Mon Mar 19 07:01:17 2007 +0000 +++ b/libpurple/dnsquery.c Mon Mar 19 13:31:34 2007 +0000 @@ -758,7 +758,7 @@ { char message[1024]; g_snprintf(message, sizeof(message), _("Thread creation failure: %s"), - err ? err->message : _("Unknown reason")); + (err && err->message) ? err->message : _("Unknown reason")); g_error_free(err); purple_dnsquery_failed(query_data, message); }
--- a/libpurple/dnssrv.c Mon Mar 19 07:01:17 2007 +0000 +++ b/libpurple/dnssrv.c Mon Mar 19 13:31:34 2007 +0000 @@ -110,7 +110,7 @@ #ifdef HAVE_SIGNAL_H purple_restore_default_signal_handlers(); #endif - + if (read(in, query, 256) <= 0) _exit(0); @@ -222,9 +222,9 @@ PurpleSrvResponse *srvres_tmp = NULL; GSList *lst = query_data->results; - size = g_slist_length(query_data->results); + size = g_slist_length(lst); - if(query_data->cb) + if(query_data->cb && size > 0) srvres_tmp = srvres = g_new0(PurpleSrvResponse, size); while (lst) { if(query_data->cb) @@ -234,9 +234,9 @@ } query_data->results = NULL; - } purple_debug_info("dnssrv", "found %d SRV entries\n", size); + } if(query_data->cb) query_data->cb(srvres, size, query_data->extradata); @@ -367,29 +367,22 @@ query_data->query = query; query_data->extradata = extradata; - if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree) { - query_data->error_message = g_strdup_printf("System missing DNS API (Requires W2K+)\n"); - - /* Asynchronously call the callback since stuff may not expect - * the callback to be called before this returns */ - query_data->handle = g_idle_add(res_main_thread_cb, query_data); - - return query_data; + if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree) + query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n"); + else { + query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); + if (query_data->resolver == NULL) { + query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : ""); + g_error_free(err); + } } - query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); - if (query_data->resolver == NULL) - { - query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", err ? err->message : ""); - g_error_free(err); - - /* Asynchronously call the callback since stuff may not expect - * the callback to be called before this returns */ + /* The query isn't going to happen, so finish the SRV lookup now. + * Asynchronously call the callback since stuff may not expect + * the callback to be called before this returns */ + if (query_data->error_message != NULL) query_data->handle = g_idle_add(res_main_thread_cb, query_data); - return query_data; - } - return query_data; #endif }
--- a/po/POTFILES.in Mon Mar 19 07:01:17 2007 +0000 +++ b/po/POTFILES.in Mon Mar 19 13:31:34 2007 +0000 @@ -1,33 +1,33 @@ pidgin.desktop.in -console/gntaccount.c -console/gntblist.c -console/gntconn.c -console/gntconv.c -console/gntdebug.c -console/gntgaim.c -console/gntnotify.c -console/gntplugin.c -console/gntprefs.c -console/gntrequest.c -console/gntstatus.c -console/gntui.c -console/libgnt/gntbox.c -console/libgnt/gntbutton.c -console/libgnt/gntcheckbox.c -console/libgnt/gntcolors.c -console/libgnt/gntcombobox.c -console/libgnt/gntentry.c -console/libgnt/gntkeys.c -console/libgnt/gntlabel.c -console/libgnt/gntline.c -console/libgnt/gntstyle.c -console/libgnt/gnttextview.c -console/libgnt/gnttree.c -console/libgnt/gntutils.c -console/libgnt/gntwidget.c -console/plugins/gntgf.c -console/plugins/gnthistory.c -console/plugins/lastlog.c +finch/gntaccount.c +finch/gntblist.c +finch/gntconn.c +finch/gntconv.c +finch/gntdebug.c +finch/gntgaim.c +finch/gntnotify.c +finch/gntplugin.c +finch/gntprefs.c +finch/gntrequest.c +finch/gntstatus.c +finch/gntui.c +finch/libgnt/gntbox.c +finch/libgnt/gntbutton.c +finch/libgnt/gntcheckbox.c +finch/libgnt/gntcolors.c +finch/libgnt/gntcombobox.c +finch/libgnt/gntentry.c +finch/libgnt/gntkeys.c +finch/libgnt/gntlabel.c +finch/libgnt/gntline.c +finch/libgnt/gntstyle.c +finch/libgnt/gnttextview.c +finch/libgnt/gnttree.c +finch/libgnt/gntutils.c +finch/libgnt/gntwidget.c +finch/plugins/gntgf.c +finch/plugins/gnthistory.c +finch/plugins/lastlog.c pidgin/eggtrayicon.c pidgin/gaimcombobox.c pidgin/gaimstock.c