Mercurial > pidgin.yaz
changeset 21077:488796f5ba33
propagate from branch 'im.pidgin.pidgin' (head 4d50bf3b08569aa2108a9f5da47fb1548d0c7dd9)
to branch 'org.maemo.garage.pidgin.pidgin.dialog-transience' (head 2de97b7c8c13f4714a53d342a4dc68ecd8fc2248)
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Tue, 09 Oct 2007 18:01:51 +0000 |
parents | b84655373d7b (current diff) a2b2fc59b571 (diff) |
children | 96612191ded8 8c9aad9479c0 |
files | libpurple/protocols/oscar/oscar.c pidgin/gtkblist.c pidgin/gtkconv.c |
diffstat | 33 files changed, 219 insertions(+), 102 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/C-HOWTO.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/C-HOWTO.dox Tue Oct 09 18:01:51 2007 +0000 @@ -269,3 +269,4 @@ you may have guessed, this also gets read when libpurple is probing your plugin. If this is missing, the plugin will not load. */ +// vim: syntax=c.doxygen
--- a/doc/account-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/account-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -11,6 +11,8 @@ @signal account-status-changed @endsignals + @see account.h + <hr> @signaldef account-added @@ -101,4 +103,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/blist-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/blist-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -13,6 +13,8 @@ @signal blist-node-aliased @endsignals + @see blist.h + <hr> @signaldef buddy-status-changed @@ -105,4 +107,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/certificate-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/certificate-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -5,6 +5,8 @@ @signal certificate-deleted @endsignals + @see certificate.h + <hr> @signaldef certificate-stored @@ -28,4 +30,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/cipher-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/cipher-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -5,6 +5,8 @@ @signal cipher-removed @endsignals + @see cipher.h + <hr> @signaldef cipher-added @@ -26,4 +28,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/connection-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/connection-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -7,6 +7,8 @@ @signal signed-off @endsignals + @see connection.h + <hr> @signaldef signing-on @@ -46,4 +48,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/conversation-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/conversation-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -32,6 +32,8 @@ @signal conversation-extended-menu @endsignals + @see conversation.h + @signaldef writing-im-msg @signalproto gboolean (*writing_im_msg)(PurpleAccount *account, const char *who, @@ -429,4 +431,4 @@ @param list A pointer to the list of actions. @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/core-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/core-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal quitting @endsignals + @see core.h + <hr> @signaldef quitting @@ -15,4 +17,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/dbus-server-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/dbus-server-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -5,6 +5,8 @@ @signal dbus-introspect @endsignals + @see dbus-server.h + <hr> @signaldef dbus-method-called @@ -29,4 +31,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/gtkaccount-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/gtkaccount-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal account-modified @endsignals + @see gtkaccount.h + <hr> @signaldef account-modified @@ -15,4 +17,4 @@ @param account The account that has been modified. @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/gtkblist-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/gtkblist-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -7,6 +7,8 @@ @signal drawing-tooltip @endsignals + @see gtkblist.h + <hr> @signaldef gtkblist-hiding @@ -52,4 +54,4 @@ a compact tooltip for a non-priority buddy. @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/gtkconv-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/gtkconv-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -139,4 +139,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/gtkimhtml-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/gtkimhtml-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -8,6 +8,8 @@ @signal format_function_update @endsignals + @see gtkimhtml.h + <hr> @signaldef url_clicked @@ -57,4 +59,4 @@ @param data User defined data. @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/gtklog-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/gtklog-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal log-displaying @endsignals + @see gtklog.h + <hr> @signaldef log-displaying @@ -17,4 +19,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/imgstore-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/imgstore-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal image-deleting @endsignals + @see imgstore.h + <hr> @signaldef image-deleting @@ -11,7 +13,7 @@ char *(*image_deleting)(const PurpleStoredImage *img); @endsignalproto @signaldesc - Emitted when a PurpleStoredImage is about to be destroyed. This allows + Emitted when a #PurpleStoredImage is about to be destroyed. This allows for what amounts to weak references. Code can hold onto a pointer to the PurpleStoredImage without actually "holding" a reference. They can then use a signal handler to let them know when their img is about to @@ -21,4 +23,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/log-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/log-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal log-timestamp @endsignals + @see log.h + <hr> @signaldef log-timestamp @@ -21,4 +23,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/notify-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/notify-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -6,6 +6,8 @@ @signal displaying-emails-notification @endsignals + @see notify.h + @signaldef displaying-userinfo @signalproto void (*displaying_userinfo)(PurpleAccount *account, const char *who, PurpleNotifyUserInfo *user_info); @@ -53,4 +55,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/plugin-ids.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/plugin-ids.dox Tue Oct 09 18:01:51 2007 +0000 @@ -2,10 +2,10 @@ @section Introduction Every plugin contains a unique identifier to prevent duplicate plugin - loading and conflicts. This, which will be called a plugin ID from here - on, must follow a specific format. This format categorizes a plugin and - makes duplicate IDs unlikely. - + loading and conflicts. Third-party plugins (that is, plugins written by + anyone who is not a libpurple, Pidgin, or Finch developer) are expected + to use a plugin ID that follows a specific format. This format + categorizes plugins and makes duplicate IDs highly unlikely. @section Format The basic format of a plugin ID is as follows: @@ -15,27 +15,79 @@ The @em type indicator specifies the type of plugin. This must be one of the following: - - core - Core plugin, capable of being loaded in any program using - libpurple. It must not use any UI-specific code. - - prpl - Protocol plugin, providing additional protocols to - connect to. - - lopl - Loader plugin, which loads scripts as plugins (like Perl - or TCL). - - gtk - GTK+ 2.x plugin. It may use GTK+ code, but cannot use any - window toolkit code (such as X11 or Win32). - - gtk-x11 - GTK+ 2.x plugin using X11 code. - - gtk-win32 - GTK+ 2.x plugin using Win32 code. - - qpe - Gaim for Qtopia plugin. + - core - A core libpurple plugin, capable of being loaded in any + program using libpurple. Core plugins may not contain any + UI-specific code. + - prpl - A protocol plugin. This is a special type of core plugin, + which provides libpurple the ability to connect to + another IM or chat network. + - lopl - A loader plugin, which loads scripts as plugins. Perl and + Tcl plugins are made possible by loader plugins. + - gtk - A GTK+ 2.x (a.k.a. Pidgin) plugin. These plugins may use + GTK+ code, but may not use window toolkit code, such as + X11, Win32, Cocoa, or Carbon. + - gtk-x11 - A GTK+ 2.x plugin that uses X11 code. These plugins may + use both GTK+ code and X11 code, allowing to hook into + features specific to X11. + - gtk-win32 - A GTK+ plugin that uses Win32 code. These plugins may use + both GTK+ code and Win32 code, allowing to hook into + features available on Windows. + - gnt - A GNT (a.k.a. Finch) plugin. These plugins may use GNT code. + - qpe - A plugin for the (now-abandoned) Qutopia user interface. + + The @em username must be a unique identifier for you. It + @em should be your http://developer.pidgin.im Trac user ID. Failing that, you + could use your SourceForge user ID or your Freenode IRC nickname, if you + have either. The http://developer.pidgin.im Trac user ID is preferred. + Do @em not leave this field blank! + + The @em pluginname is the name of your plugin. It is usually all + lowercase letters and matches the static plugin ID (the first argument to + the PURPLE_INIT_PLUGIN() macro call), although it can be anything you + like. Do @em not include version information in the plugin ID--the + #PurplePluginInfo structure already has a field for this. + + @section nospaces One Last Rule for Plugin IDs + + The last rule of plugin IDs is the most important of all. Plugin IDs may + @em NOT contain spaces. If you need a space, use another hyphen (-). - The @em username must be a unique identifier for that person. It - @em should be your SourceForge ID. Do @em not leave this field - blank. + @section exceptions Exceptions to the Rule + + As with any rule there are exceptions. If you browse through the source + tree you will see that the plugins we distribute with the Pidgin source + do not contain a username field. This is because while one developer may + have written each specific plugin, the plugins are maintained + collectively by the entire development team. This lack of a username + field is also an indicator that the plugin is one of our plugins and not + a third-party plugin. + + Another exception to the rule is the <a + href="http://plugins.guifications.org/trac/wiki/PluginPack">Purple Plugin + Pack</a>. All plugins whose lives started in the Purple Plugin Pack use + <tt>"plugin_pack"</tt> for the username field to indicate origination in + the Purple Plugin Pack. - The @em pluginname is the name of your plugin. It can be whatever you like, - though it's common to keep it all lowercase. Do not use spaces! If you - want a space, use a '-'. Please do not put a version indicator in the ID. - The PurplePlugin structure already has a field for this. + These two exceptions are mentioned here for completeness. We don't + encourage breaking the conventions set forth by the rules outlined above. + + @section examples Examples of Well-Chosen Plugin IDs + + The following is a list of well-chosen Plugin IDs listing a few good examples. + - <tt>"gtk-amc_grim-guifications"</tt> - This is the plugin ID for the + Guifications 2.x plugin. + - <tt>"gtk-rlaager-album"</tt> - This is the plugin ID for the Album + plugin, which is now part of the + Purple Plugin Pack. Its ID follows the + rules because its life started prior + to its inclusion in the Plugin Pack. + - <tt>"core-rlaager-irchelper"</tt> - This is the plugin ID for the IRC + Helper plugin, which is now part + of the Purple Plugin Pack. Its ID + follows the rules because its + life started prior to its + inclusion in the Plugin Pack. @section plugin-db Plugin Database Although it doesn't exist yet, in time there will be a plugin database @@ -45,4 +97,4 @@ */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/plugin-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/plugin-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -5,6 +5,8 @@ @signal plugin-unload @endsignals + @see plugin.h + <hr> @signaldef plugin-load @@ -26,4 +28,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/savedstatus-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/savedstatus-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal savedstatus-changed @endsignals + @see savedstatus.h + <hr> @signaldef savedstatus-changed @@ -15,4 +17,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/sound-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/sound-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -4,6 +4,8 @@ @signal playing-sound-event @endsignals + @see sound.h + <hr> @signaldef playing-sound-event @@ -18,4 +20,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/doc/xfer-signals.dox Mon Oct 08 16:06:39 2007 +0000 +++ b/doc/xfer-signals.dox Tue Oct 09 18:01:51 2007 +0000 @@ -12,6 +12,8 @@ @signal file-send-complete @endsignals + @see ft.h + <hr> @signaldef file-recv-accept @@ -109,4 +111,4 @@ @endsignaldef */ -// vim: syntax=c tw=75 et +// vim: syntax=c.doxygen tw=75 et
--- a/libpurple/plugins/ssl/ssl-nss.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-nss.c Tue Oct 09 18:01:51 2007 +0000 @@ -386,6 +386,7 @@ static GList * ssl_nss_peer_certs(PurpleSslConnection *gsc) { +#if 0 PurpleSslNssData *nss_data = PURPLE_SSL_NSS_DATA(gsc); CERTCertificate *cert; /* @@ -397,6 +398,10 @@ /* TODO: this is a blind guess */ cert = SSL_PeerCertificate(nss_data->fd); + if (cert) + CERT_DestroyCertificate(cert); +#endif + return NULL; @@ -430,11 +435,12 @@ filename); /* Load the raw data up */ - g_return_val_if_fail( - g_file_get_contents(filename, - &rawcert, &len, - NULL ), - NULL); + if (!g_file_get_contents(filename, + &rawcert, &len, + NULL)) { + purple_debug_error("nss/x509", "Unable to read certificate file.\n"); + return NULL; + } /* Decode the certificate */ crt_dat = CERT_DecodeCertFromPackage(rawcert, len);
--- a/libpurple/protocols/bonjour/bonjour.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Tue Oct 09 18:01:51 2007 +0000 @@ -188,6 +188,8 @@ if (bonjour_group != NULL) purple_blist_remove_group(bonjour_group); + g_free(bd); + connection->proto_data = NULL; } static const char * @@ -581,7 +583,7 @@ fullname = g_utf16_to_utf8(username, -1, NULL, NULL, NULL); } - g_idle_add(_set_default_name_cb, fullname); + purple_timeout_add(0, _set_default_name_cb, fullname); return NULL; }
--- a/libpurple/protocols/bonjour/parser.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/bonjour/parser.c Tue Oct 09 18:01:51 2007 +0000 @@ -101,7 +101,7 @@ if(!xmlStrcmp(element_name, (xmlChar*) "stream")) { /* Asynchronously close the conversation to prevent bonjour_parser_setup() * being called from within this context */ - g_idle_add(_async_bonjour_jabber_stream_ended_cb, pb); + purple_timeout_add(0, _async_bonjour_jabber_stream_ended_cb, pb); } return; }
--- a/libpurple/protocols/jabber/roster.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/jabber/roster.c Tue Oct 09 18:01:51 2007 +0000 @@ -67,8 +67,10 @@ if(!groups) { if(!buddies) g2 = g_slist_append(g2, g_strdup(_("Buddies"))); - else + else { + g_slist_free(buddies); return; + } } my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); @@ -229,6 +231,11 @@ remove_purple_buddies(js, jid); } else { GSList *groups = NULL; + + if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) + if (!jabber_google_roster_incoming(js, item)) + continue; + for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) { char *group_name; @@ -237,10 +244,9 @@ if (g_slist_find_custom(groups, group_name, (GCompareFunc)purple_utf8_strcasecmp) == NULL) groups = g_slist_append(groups, group_name); + else + g_free(group_name); } - if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) - if (!jabber_google_roster_incoming(js, item)) - continue; add_purple_buddies_to_groups(js, jid, name, groups); } } @@ -263,6 +269,9 @@ JabberIq *iq; xmlnode *query, *item, *group; + if(!(b = purple_find_buddy(js->gc->account, name))) + return; + if(grps) { groups = grps; } else { @@ -277,9 +286,6 @@ } } - if(!(b = purple_find_buddy(js->gc->account, name))) - return; - iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); query = xmlnode_get_child(iq->node, "query");
--- a/libpurple/protocols/msn/notification.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Tue Oct 09 18:01:51 2007 +0000 @@ -450,7 +450,7 @@ const char *passport; const char *content_type; - purple_debug_info("MSNP14","Process UBM payload:%s\n",payload); + purple_debug_info("MSNP14","Process UBM payload:%.*s\n", len, payload); msg = msn_message_new_from_cmd(cmdproc->session, cmd); msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM); @@ -533,7 +533,7 @@ }else{ g_return_if_fail(cmd->payload_cb != NULL); - purple_debug_info("MSNP14","UBM payload:{%s}\n",cmd->payload); + purple_debug_info("MSNP14","UBM payload:{%.*s}\n", cmd->payload_len, cmd->payload); ubm_cmd_post(cmdproc, cmd, cmd->payload, cmd->payload_len); } }
--- a/libpurple/protocols/msn/soap.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/msn/soap.c Tue Oct 09 18:01:51 2007 +0000 @@ -131,6 +131,7 @@ MsnSoapSslErrorCbFunction error_cb) { purple_debug_misc("MSN SOAP","Initializing SOAP connection\n"); + g_free(soapconn->login_host); soapconn->login_host = g_strdup(host); soapconn->ssl_conn = ssl; soapconn->connect_cb = connect_cb; @@ -204,11 +205,9 @@ void msn_soap_destroy(MsnSoapConn *soapconn) { - if(soapconn->login_host) - g_free(soapconn->login_host); + g_free(soapconn->login_host); - if(soapconn->login_path) - g_free(soapconn->login_path); + g_free(soapconn->login_path); /*remove the write handler*/ if (soapconn->output_handler > 0){
--- a/libpurple/protocols/oscar/oscar.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Tue Oct 09 18:01:51 2007 +0000 @@ -1721,7 +1721,6 @@ { PurpleConnection *gc; PurpleAccount *account; - PurplePresence *presence; struct buddyinfo *bi; time_t time_idle = 0, signon = 0; int type = 0; @@ -1734,7 +1733,6 @@ gc = od->gc; account = purple_connection_get_account(gc); - presence = purple_account_get_presence(account); va_start(ap, fr); info = va_arg(ap, aim_userinfo_t *);
--- a/libpurple/tests/test_cipher.c Mon Oct 08 16:06:39 2007 +0000 +++ b/libpurple/tests/test_cipher.c Tue Oct 09 18:01:51 2007 +0000 @@ -8,7 +8,6 @@ #include "tests.h" #include "../cipher.h" -#include "../signal.h" /****************************************************************************** * MD4 Tests
--- a/pidgin/gtkblist.c Mon Oct 08 16:06:39 2007 +0000 +++ b/pidgin/gtkblist.c Tue Oct 09 18:01:51 2007 +0000 @@ -4347,7 +4347,6 @@ gpointer user_data) { PurpleAccount *account; - PurpleStatusType *status_type; gchar *escaped, *text; GtkWidget *button, *label, *image, *hbox; GdkPixbuf *pixbuf; @@ -4362,8 +4361,8 @@ hbox = gtk_hbox_new(FALSE, 6); /* Create the icon */ - if ((status_type = purple_account_get_status_type_with_primitive(account, - PURPLE_STATUS_OFFLINE))) { + if (purple_account_get_status_type_with_primitive(account, + PURPLE_STATUS_OFFLINE) != NULL) { pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); if (pixbuf != NULL) { image = gtk_image_new_from_pixbuf(pixbuf); @@ -5367,7 +5366,7 @@ BUDDY_ICON_COLUMN, avatar, BUDDY_ICON_VISIBLE_COLUMN, biglist, EMBLEM_COLUMN, emblem, - EMBLEM_VISIBLE_COLUMN, emblem, + EMBLEM_VISIBLE_COLUMN, (emblem != NULL), PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(buddy->account, PIDGIN_PRPL_ICON_SMALL), PROTOCOL_ICON_VISIBLE_COLUMN, purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons"), BGCOLOR_COLUMN, NULL, @@ -5378,6 +5377,8 @@ g_free(mark); g_free(idle); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar) @@ -5549,6 +5550,8 @@ -1); g_free(mark); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar)
--- a/pidgin/gtkconv.c Mon Oct 08 16:06:39 2007 +0000 +++ b/pidgin/gtkconv.c Tue Oct 09 18:01:51 2007 +0000 @@ -2498,11 +2498,16 @@ gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), &(gtkconv->infopane_iter), CONV_EMBLEM_COLUMN, emblem, -1); + if (emblem) + g_object_unref(emblem); if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons")) { + emblem = pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL); gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), &(gtkconv->infopane_iter), - CONV_PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL), -1); + CONV_PROTOCOL_ICON_COLUMN, emblem, -1); + if (emblem) + g_object_unref(emblem); } /* XXX seanegan Why do I have to do this? */ @@ -4358,45 +4363,54 @@ gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 1); } - static void resize_imhtml_cb(PidginConversation *gtkconv) { GtkTextBuffer *buffer; GtkTextIter iter; - int wrapped_lines; - int lines; - GdkRectangle oneline; + int wrapped_lines; + int lines; + GdkRectangle oneline; GtkRequisition sr; - int height; - int pad_top, pad_inside, pad_bottom; + int height, diff; + int pad_top, pad_inside, pad_bottom; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); - wrapped_lines = 1; - gtk_text_buffer_get_start_iter(buffer, &iter); - gtk_text_view_get_iter_location(GTK_TEXT_VIEW(gtkconv->entry), &iter, &oneline); - while (gtk_text_view_forward_display_line(GTK_TEXT_VIEW(gtkconv->entry), &iter)) - wrapped_lines++; - - lines = gtk_text_buffer_get_line_count(buffer); - - /* Show a maximum of 4 lines */ - lines = MIN(lines, 4); - wrapped_lines = MIN(wrapped_lines, 4); - - pad_top = gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(gtkconv->entry)); - pad_bottom = gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(gtkconv->entry)); - pad_inside = gtk_text_view_get_pixels_inside_wrap(GTK_TEXT_VIEW(gtkconv->entry)); - - height = (oneline.height + pad_top + pad_bottom) * lines; - height += (oneline.height + pad_inside) * (wrapped_lines - lines); + wrapped_lines = 1; + gtk_text_buffer_get_start_iter(buffer, &iter); + gtk_text_view_get_iter_location(GTK_TEXT_VIEW(gtkconv->entry), &iter, &oneline); + while (gtk_text_view_forward_display_line(GTK_TEXT_VIEW(gtkconv->entry), &iter)) + wrapped_lines++; + + lines = gtk_text_buffer_get_line_count(buffer); + + /* Show a maximum of 4 lines */ + lines = MIN(lines, 4); + wrapped_lines = MIN(wrapped_lines, 4); + + pad_top = gtk_text_view_get_pixels_above_lines(GTK_TEXT_VIEW(gtkconv->entry)); + pad_bottom = gtk_text_view_get_pixels_below_lines(GTK_TEXT_VIEW(gtkconv->entry)); + pad_inside = gtk_text_view_get_pixels_inside_wrap(GTK_TEXT_VIEW(gtkconv->entry)); + + height = (oneline.height + pad_top + pad_bottom) * lines; + height += (oneline.height + pad_inside) * (wrapped_lines - lines); gtkconv->auto_resize = TRUE; - g_idle_add(reset_auto_resize_cb, gtkconv); - gtk_widget_size_request(gtkconv->lower_hbox, &sr); - if (sr.height < height + PIDGIN_HIG_BOX_SPACE) { + g_idle_add(reset_auto_resize_cb, gtkconv); + + diff = height - gtkconv->entry->allocation.height; + + if (diff > 0) { + gtk_widget_size_request(gtkconv->lower_hbox, &sr); gtkconv->entry_growing = TRUE; - gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height + PIDGIN_HIG_BOX_SPACE); + + /* uncomment this to auto resize even after the user manually + resizes + gtk_paned_set_position(GTK_PANED(gtkconv->lower_hbox->parent->parent), + -1); + */ + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, + diff + gtkconv->lower_hbox->allocation.height); } } @@ -4728,7 +4742,6 @@ g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); #endif - rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_PROTOCOL_ICON_COLUMN, NULL);
--- a/pidgin/win32/winpidgin.c Mon Oct 08 16:06:39 2007 +0000 +++ b/pidgin/win32/winpidgin.c Tue Oct 09 18:01:51 2007 +0000 @@ -545,7 +545,7 @@ if (strstr(lpszCmdLine, "-d") || strstr(lpszCmdLine, "-h") || strstr(lpszCmdLine, "-v")) { /* If stdout hasn't been redirected to a file, alloc a console * (_istty() doesn't work for stuff using the GUI subsystem) */ - if (_fileno(stdout) == -1) { + if (_fileno(stdout) == -1 || _fileno(stdout) == -2) { LPFNATTACHCONSOLE MyAttachConsole = NULL; if ((hmod = GetModuleHandle("kernel32.dll"))) { MyAttachConsole =