Mercurial > pidgin.yaz
changeset 29738:10eaca0bf01a
propagate from branch 'im.pidgin.pidgin' (head 8f0a3e68547fbc66188357edbf6694bd8dd2d557)
to branch 'im.pidgin.pidgin.next.minor' (head 63bbded7257d603ff4c002350caa652f85d2ff9e)
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Fri, 25 Dec 2009 22:08:46 +0000 |
parents | bf4a33bd020b (current diff) ac6c2dda0eae (diff) |
children | 13fa0fffac6d |
files | ChangeLog.API configure.ac libpurple/ft.c libpurple/media.c pidgin/gtkcelllayout.c pidgin/gtkcelllayout.h pidgin/gtkcellrendererprogress.c pidgin/gtkcellrendererprogress.h pidgin/gtkcellview.c pidgin/gtkcellview.h pidgin/gtkcellviewmenuitem.c pidgin/gtkcellviewmenuitem.h pidgin/gtkexpander.c pidgin/gtkexpander.h pidgin/gtkft.c pidgin/gtkimhtml.c pidgin/gtkprefs.c pidgin/pidgincombobox.c pidgin/pidgincombobox.h pidgin/pixmaps/tray/16/tray-away.png pidgin/pixmaps/tray/16/tray-busy.png pidgin/pixmaps/tray/16/tray-connecting.png pidgin/pixmaps/tray/16/tray-extended-away.png pidgin/pixmaps/tray/16/tray-invisible.png pidgin/pixmaps/tray/16/tray-message.png pidgin/pixmaps/tray/16/tray-new-im.png pidgin/pixmaps/tray/16/tray-offline.png pidgin/pixmaps/tray/16/tray-online.png pidgin/pixmaps/tray/22/tray-away.png pidgin/pixmaps/tray/22/tray-busy.png pidgin/pixmaps/tray/22/tray-connecting.png pidgin/pixmaps/tray/22/tray-extended-away.png pidgin/pixmaps/tray/22/tray-invisible.png pidgin/pixmaps/tray/22/tray-message.png pidgin/pixmaps/tray/22/tray-new-im.png pidgin/pixmaps/tray/22/tray-offline.png pidgin/pixmaps/tray/22/tray-online.png pidgin/pixmaps/tray/32/tray-away.png pidgin/pixmaps/tray/32/tray-busy.png pidgin/pixmaps/tray/32/tray-connecting.png pidgin/pixmaps/tray/32/tray-extended-away.png pidgin/pixmaps/tray/32/tray-invisible.png pidgin/pixmaps/tray/32/tray-message.png pidgin/pixmaps/tray/32/tray-new-im.png pidgin/pixmaps/tray/32/tray-offline.png pidgin/pixmaps/tray/32/tray-online.png pidgin/pixmaps/tray/48/tray-away.png pidgin/pixmaps/tray/48/tray-busy.png pidgin/pixmaps/tray/48/tray-connecting.png pidgin/pixmaps/tray/48/tray-extended-away.png pidgin/pixmaps/tray/48/tray-invisible.png pidgin/pixmaps/tray/48/tray-message.png pidgin/pixmaps/tray/48/tray-new-im.png pidgin/pixmaps/tray/48/tray-offline.png pidgin/pixmaps/tray/48/tray-online.png |
diffstat | 8 files changed, 157 insertions(+), 76 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Fri Dec 25 21:33:50 2009 +0000 +++ b/ChangeLog.API Fri Dec 25 22:08:46 2009 +0000 @@ -28,6 +28,12 @@ * gtk_imhtmltoolbar_switch_active_conversation version 2.6.5 (??/??/20??): + libpurple: + Changed: + * purple_xfer_cancel_local is now called instead of + purple_xfer_request_denied if an error is found when selecting + a file to send. Request denied is still used when a receive + request is not allowed. version 2.6.4 (11/29/2009): No changes
--- a/configure.ac Fri Dec 25 21:33:50 2009 +0000 +++ b/configure.ac Fri Dec 25 22:08:46 2009 +0000 @@ -812,6 +812,10 @@ fi AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno") +dnl ####################################################################### +dnl # Check for Internationalized Domain Name support +dnl ####################################################################### + AC_ARG_ENABLE(idn, [AC_HELP_STRING([--disable-idn], [compile without IDN support])], [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
--- a/libpurple/ft.c Fri Dec 25 21:33:50 2009 +0000 +++ b/libpurple/ft.c Fri Dec 25 22:08:46 2009 +0000 @@ -120,6 +120,10 @@ ui_ops->new_xfer(xfer); xfers = g_list_prepend(xfers, xfer); + + if (purple_debug_is_verbose()) + purple_debug_info("xfer", "new %p [%d]\n", xfer, xfer->ref); + return xfer; } @@ -131,8 +135,6 @@ g_return_if_fail(xfer != NULL); - priv = g_hash_table_lookup(xfers_data, xfer); - /* Close the file browser, if it's open */ purple_request_close_with_handle(xfer); @@ -162,6 +164,9 @@ g_return_if_fail(xfer != NULL); xfer->ref++; + + if (purple_debug_is_verbose()) + purple_debug_info("xfer", "ref'd %p [%d]\n", xfer, xfer->ref); } void @@ -172,6 +177,9 @@ xfer->ref--; + if (purple_debug_is_verbose()) + purple_debug_info("xfer", "unref'd %p [%d]\n", xfer, xfer->ref); + if (xfer->ref == 0) purple_xfer_destroy(xfer); } @@ -282,14 +290,16 @@ purple_xfer_choose_file_ok_cb(void *user_data, const char *filename) { PurpleXfer *xfer; + PurpleXferType type; struct stat st; gchar *dir; xfer = (PurpleXfer *)user_data; + type = purple_xfer_get_type(xfer); if (g_stat(filename, &st) != 0) { /* File not found. */ - if (purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE) { + if (type == PURPLE_XFER_RECEIVE) { #ifndef _WIN32 int mode = W_OK; #else @@ -311,29 +321,26 @@ } else { purple_xfer_show_file_error(xfer, filename); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } } - else if ((purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) && - (st.st_size == 0)) { + else if ((type == PURPLE_XFER_SEND) && (st.st_size == 0)) { purple_notify_error(NULL, NULL, _("Cannot send a file of 0 bytes."), NULL); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } - else if ((purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) && - S_ISDIR(st.st_mode)) { + else if ((type == PURPLE_XFER_SEND) && S_ISDIR(st.st_mode)) { /* * XXX - Sending a directory should be valid for some protocols. */ purple_notify_error(NULL, NULL, _("Cannot send a directory."), NULL); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } - else if ((purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE) && - S_ISDIR(st.st_mode)) { + else if ((type == PURPLE_XFER_RECEIVE) && S_ISDIR(st.st_mode)) { char *msg, *utf8; utf8 = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); msg = g_strdup_printf( @@ -343,6 +350,23 @@ g_free(msg); purple_xfer_request_denied(xfer); } + else if (type == PURPLE_XFER_SEND) { +#ifndef _WIN32 + int mode = R_OK; +#else + int mode = F_OK; +#endif + + if (g_access(filename, mode) == 0) { + purple_xfer_request_accepted(xfer, filename); + } else { + purple_xfer_ref(xfer); + purple_notify_message( + NULL, PURPLE_NOTIFY_MSG_ERROR, NULL, + _("File is not readable."), NULL, + (PurpleNotifyCloseCallback)purple_xfer_choose_file, xfer); + } + } else { purple_xfer_request_accepted(xfer, filename); } @@ -356,7 +380,11 @@ PurpleXfer *xfer = (PurpleXfer *)user_data; purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL); - purple_xfer_request_denied(xfer); + if (purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) + purple_xfer_cancel_local(xfer); + else + purple_xfer_request_denied(xfer); + purple_xfer_unref(xfer); } static int @@ -981,6 +1009,8 @@ r = write(xfer->fd, buffer, s); if (r < 0 && errno == EAGAIN) r = 0; + if ((purple_xfer_get_bytes_sent(xfer)+r) >= purple_xfer_get_size(xfer)) + purple_xfer_set_completed(xfer, TRUE); } return r; @@ -1011,6 +1041,9 @@ return; } + if ((purple_xfer_get_size(xfer) > 0) && + ((purple_xfer_get_bytes_sent(xfer)+r) >= purple_xfer_get_size(xfer))) + purple_xfer_set_completed(xfer, TRUE); } else if(r < 0) { purple_xfer_cancel_remote(xfer); g_free(buffer); @@ -1048,7 +1081,7 @@ xfer->watcher = 0; } /* - * if we requested 0 bytes it's only normal that en up here + * if we requested 0 bytes it's only normal that end up here * we shouldn't return as we still have something to * write in priv->buffer */
--- a/libpurple/protocols/msn/msn.c Fri Dec 25 21:33:50 2009 +0000 +++ b/libpurple/protocols/msn/msn.c Fri Dec 25 22:08:46 2009 +0000 @@ -345,17 +345,23 @@ msn_show_set_friendly_name(PurplePluginAction *action) { PurpleConnection *gc; + PurpleAccount *account; + char *tmp; gc = (PurpleConnection *) action->context; - - purple_request_input(gc, NULL, _("Set your friendly name."), + account = purple_connection_get_account(gc); + + tmp = g_strdup_printf(_("Set friendly name for %s."), + purple_account_get_username(account)); + purple_request_input(gc, _("Set your friendly name."), tmp, _("This is the name that other MSN buddies will " "see you as."), purple_connection_get_display_name(gc), FALSE, FALSE, NULL, _("OK"), G_CALLBACK(msn_act_id), _("Cancel"), NULL, - purple_connection_get_account(gc), NULL, NULL, + account, NULL, NULL, gc); + g_free(tmp); } static void
--- a/libpurple/protocols/oscar/oscar.c Fri Dec 25 21:33:50 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Fri Dec 25 22:08:46 2009 +0000 @@ -378,12 +378,12 @@ } static gchar * -oscar_utf8_try_convert(PurpleAccount *account, const gchar *msg) +oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg) { const char *charset = NULL; char *ret = NULL; - if(oscar_util_valid_name_icq(purple_account_get_username(account))) + if (od->icq) charset = purple_account_get_string(account, "encoding", NULL); if(charset && *charset) @@ -798,24 +798,24 @@ } static void -oscar_user_info_convert_and_add_pair(PurpleAccount *account, PurpleNotifyUserInfo *user_info, +oscar_user_info_convert_and_add_pair(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info, const char *name, const char *value) { gchar *utf8; - if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { + if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) { purple_notify_user_info_add_pair(user_info, name, utf8); g_free(utf8); } } static void -oscar_user_info_convert_and_add(PurpleAccount *account, PurpleNotifyUserInfo *user_info, +oscar_user_info_convert_and_add(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info, const char *name, const char *value) { gchar *utf8; - if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { + if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) { purple_notify_user_info_add_pair(user_info, name, utf8); g_free(utf8); } @@ -1022,7 +1022,7 @@ char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); g_free(tmp); - oscar_user_info_convert_and_add_pair(account, user_info, _("Buddy Comment"), tmp2); + oscar_user_info_convert_and_add_pair(account, od, user_info, _("Buddy Comment"), tmp2); g_free(tmp2); } } @@ -2450,7 +2450,7 @@ * Note: There *may* be some clients which send messages as HTML formatted - * they need to be special-cased somehow. */ - if (oscar_util_valid_name_icq(purple_account_get_username(account)) && oscar_util_valid_name_icq(userinfo->bn)) { + if (od->icq && oscar_util_valid_name_icq(userinfo->bn)) { /* being recevied by ICQ from ICQ - escape HTML so it is displayed as sent */ gchar *tmp2 = g_markup_escape_text(tmp, -1); g_free(tmp); @@ -4173,7 +4173,7 @@ bi = NULL; purple_notify_user_info_add_pair(user_info, _("UIN"), who); - oscar_user_info_convert_and_add(account, user_info, _("Nick"), info->nick); + oscar_user_info_convert_and_add(account, od, user_info, _("Nick"), info->nick); if ((bi != NULL) && (bi->ipaddr != 0)) { char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", (bi->ipaddr & 0xff000000) >> 24, @@ -4183,9 +4183,9 @@ purple_notify_user_info_add_pair(user_info, _("IP Address"), tstr); g_free(tstr); } - oscar_user_info_convert_and_add(account, user_info, _("First Name"), info->first); - oscar_user_info_convert_and_add(account, user_info, _("Last Name"), info->last); - if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(account, info->email))) { + oscar_user_info_convert_and_add(account, od, user_info, _("First Name"), info->first); + oscar_user_info_convert_and_add(account, od, user_info, _("Last Name"), info->last); + if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(account, od, info->email))) { buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); g_free(buf); @@ -4194,7 +4194,7 @@ if (info->numaddresses && info->email2) { int i; for (i = 0; i < info->numaddresses; i++) { - if (info->email2[i] && info->email2[i][0] && (utf8 = oscar_utf8_try_convert(account, info->email2[i]))) { + if (info->email2[i] && info->email2[i][0] && (utf8 = oscar_utf8_try_convert(account, od, info->email2[i]))) { buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); g_free(buf); @@ -4202,7 +4202,7 @@ } } } - oscar_user_info_convert_and_add(account, user_info, _("Mobile Phone"), info->mobile); + oscar_user_info_convert_and_add(account, od, user_info, _("Mobile Phone"), info->mobile); if (info->gender != 0) purple_notify_user_info_add_pair(user_info, _("Gender"), (info->gender == 1 ? _("Female") : _("Male"))); @@ -4222,14 +4222,14 @@ * feel free to remove it. --rlaager */ mktime(tm); - oscar_user_info_convert_and_add(account, user_info, _("Birthday"), purple_date_format_short(tm)); + oscar_user_info_convert_and_add(account, od, user_info, _("Birthday"), purple_date_format_short(tm)); } if ((info->age > 0) && (info->age < 255)) { char age[5]; snprintf(age, sizeof(age), "%hhd", info->age); purple_notify_user_info_add_pair(user_info, _("Age"), age); } - if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(account, info->personalwebpage))) { + if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->personalwebpage))) { buf = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); purple_notify_user_info_add_pair(user_info, _("Personal Web Page"), buf); g_free(buf); @@ -4239,33 +4239,33 @@ if (buddy != NULL) oscar_user_info_append_status(gc, user_info, buddy, /* aim_userinfo_t */ NULL, /* strip_html_tags */ FALSE); - oscar_user_info_convert_and_add(account, user_info, _("Additional Information"), info->info); + oscar_user_info_convert_and_add(account, od, user_info, _("Additional Information"), info->info); purple_notify_user_info_add_section_break(user_info); if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { purple_notify_user_info_add_section_header(user_info, _("Home Address")); - oscar_user_info_convert_and_add(account, user_info, _("Address"), info->homeaddr); - oscar_user_info_convert_and_add(account, user_info, _("City"), info->homecity); - oscar_user_info_convert_and_add(account, user_info, _("State"), info->homestate); - oscar_user_info_convert_and_add(account, user_info, _("Zip Code"), info->homezip); + oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->homeaddr); + oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->homecity); + oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->homestate); + oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->homezip); } if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { purple_notify_user_info_add_section_header(user_info, _("Work Address")); - oscar_user_info_convert_and_add(account, user_info, _("Address"), info->workaddr); - oscar_user_info_convert_and_add(account, user_info, _("City"), info->workcity); - oscar_user_info_convert_and_add(account, user_info, _("State"), info->workstate); - oscar_user_info_convert_and_add(account, user_info, _("Zip Code"), info->workzip); + oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->workaddr); + oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->workcity); + oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->workstate); + oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->workzip); } if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { purple_notify_user_info_add_section_header(user_info, _("Work Information")); - oscar_user_info_convert_and_add(account, user_info, _("Company"), info->workcompany); - oscar_user_info_convert_and_add(account, user_info, _("Division"), info->workdivision); - oscar_user_info_convert_and_add(account, user_info, _("Position"), info->workposition); - - if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(account, info->workwebpage))) { + oscar_user_info_convert_and_add(account, od, user_info, _("Company"), info->workcompany); + oscar_user_info_convert_and_add(account, od, user_info, _("Division"), info->workdivision); + oscar_user_info_convert_and_add(account, od, user_info, _("Position"), info->workposition); + + if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->workwebpage))) { char *webpage = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); purple_notify_user_info_add_pair(user_info, _("Web Page"), webpage); g_free(webpage); @@ -4296,7 +4296,7 @@ info = va_arg(ap, struct aim_icq_info *); va_end(ap); - if (info->uin && info->nick && info->nick[0] && (utf8 = oscar_utf8_try_convert(account, info->nick))) { + if (info->uin && info->nick && info->nick[0] && (utf8 = oscar_utf8_try_convert(account, od, info->nick))) { g_snprintf(who, sizeof(who), "%u", info->uin); serv_got_alias(gc, who, utf8); if ((b = purple_find_buddy(account, who))) { @@ -4751,7 +4751,7 @@ /* Messaging an SMS (mobile) user */ tmp2 = purple_markup_strip_html(tmp1); is_html = FALSE; - } else if (oscar_util_valid_name_icq(purple_account_get_username(account))) { + } else if (od->icq) { if (oscar_util_valid_name_icq(name)) { /* From ICQ to ICQ */ tmp2 = purple_markup_strip_html(tmp1); @@ -5047,6 +5047,9 @@ void oscar_set_status(PurpleAccount *account, PurpleStatus *status) { + PurpleConnection *pc; + OscarData *od; + purple_debug_info("oscar", "Set status to %s\n", purple_status_get_name(status)); if (!purple_status_is_active(status)) @@ -5055,11 +5058,14 @@ if (!purple_account_is_connected(account)) return; + pc = purple_account_get_connection(account); + od = purple_connection_get_protocol_data(pc); + /* Set the AIM-style away message for both AIM and ICQ accounts */ oscar_set_info_and_status(account, FALSE, NULL, TRUE, status); /* Set the ICQ status for ICQ accounts only */ - if (oscar_util_valid_name_icq(purple_account_get_username(account))) + if (od->icq) oscar_set_status_icq(account); } @@ -5404,7 +5410,7 @@ if (g_utf8_validate(gname, -1, NULL)) gname_utf8 = g_strdup(gname); else - gname_utf8 = oscar_utf8_try_convert(account, gname); + gname_utf8 = oscar_utf8_try_convert(account, od, gname); } else gname_utf8 = NULL; @@ -5419,7 +5425,7 @@ if (g_utf8_validate(alias, -1, NULL)) alias_utf8 = g_strdup(alias); else - alias_utf8 = oscar_utf8_try_convert(account, alias); + alias_utf8 = oscar_utf8_try_convert(account, od, alias); g_free(alias); } else alias_utf8 = NULL; @@ -5468,7 +5474,7 @@ if (g_utf8_validate(gname, -1, NULL)) gname_utf8 = g_strdup(gname); else - gname_utf8 = oscar_utf8_try_convert(account, gname); + gname_utf8 = oscar_utf8_try_convert(account, od, gname); } else gname_utf8 = NULL; @@ -5636,7 +5642,7 @@ return 1; gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); - gname_utf8 = gname ? oscar_utf8_try_convert(account, gname) : NULL; + gname_utf8 = gname ? oscar_utf8_try_convert(account, od, gname) : NULL; alias = aim_ssi_getalias(od->ssi.local, gname, name); if (alias != NULL) @@ -5644,7 +5650,7 @@ if (g_utf8_validate(alias, -1, NULL)) alias_utf8 = g_strdup(alias); else - alias_utf8 = oscar_utf8_try_convert(account, alias); + alias_utf8 = oscar_utf8_try_convert(account, od, alias); } else alias_utf8 = NULL; @@ -6417,7 +6423,7 @@ data = g_new(struct name_data, 1); comment = aim_ssi_getcomment(od->ssi.local, purple_group_get_name(g), name); - comment_utf8 = comment ? oscar_utf8_try_convert(account, comment) : NULL; + comment_utf8 = comment ? oscar_utf8_try_convert(account, od, comment) : NULL; data->gc = gc; data->name = g_strdup(name);
--- a/pidgin/gtkft.c Fri Dec 25 21:33:50 2009 +0000 +++ b/pidgin/gtkft.c Fri Dec 25 22:08:46 2009 +0000 @@ -716,6 +716,7 @@ GtkWidget *sw; GtkWidget *button; GtkWidget *expander; + GtkWidget *alignment; GtkWidget *table; GtkWidget *checkbox; @@ -773,9 +774,15 @@ gtk_widget_set_sensitive(expander, FALSE); + /* Small indent make table fall under GtkExpander's label */ + alignment = gtk_alignment_new(1, 0, 1, 1); + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 20, 0); + gtk_container_add(GTK_CONTAINER(expander), alignment); + gtk_widget_show(alignment); + /* The table of information. */ table = make_info_table(dialog); - gtk_container_add(GTK_CONTAINER(expander), table); + gtk_container_add(GTK_CONTAINER(alignment), table); gtk_widget_show(table); /* Open button */
--- a/pidgin/gtkimhtml.c Fri Dec 25 21:33:50 2009 +0000 +++ b/pidgin/gtkimhtml.c Fri Dec 25 22:08:46 2009 +0000 @@ -539,6 +539,7 @@ imhtml->tip_timer = 0; imhtml->tip_window = gtk_window_new (GTK_WINDOW_POPUP); gtk_widget_set_app_paintable (imhtml->tip_window, TRUE); + gtk_window_set_title(GTK_WINDOW(imhtml->tip_window), "GtkIMHtml"); gtk_window_set_resizable (GTK_WINDOW (imhtml->tip_window), FALSE); gtk_widget_set_name (imhtml->tip_window, "gtk-tooltips"); gtk_window_set_type_hint (GTK_WINDOW (imhtml->tip_window),
--- a/pidgin/gtkprefs.c Fri Dec 25 21:33:50 2009 +0000 +++ b/pidgin/gtkprefs.c Fri Dec 25 22:08:46 2009 +0000 @@ -70,27 +70,33 @@ gchar *original_name; }; -static int sound_row_sel = 0; -static GtkWidget *prefsnotebook; - +/* Main dialog */ +static GtkWidget *prefs = NULL; + +/* Notebook */ +static GtkWidget *prefsnotebook = NULL; +static int notebook_page = 0; + +/* Conversations page */ +static GtkWidget *sample_imhtml = NULL; + +/* Themes page */ +static GtkWidget *prefs_sound_themes_combo_box; +static GtkWidget *prefs_blist_themes_combo_box; +static GtkWidget *prefs_status_themes_combo_box; +static GtkWidget *prefs_smiley_themes_combo_box; + +/* Sound theme specific */ static GtkWidget *sound_entry = NULL; - -static GtkWidget *prefs = NULL; -static GtkWidget *debugbutton = NULL; -static int notebook_page = 0; - +static int sound_row_sel = 0; +static gboolean prefs_sound_themes_loading; + +/* These exist outside the lifetime of the prefs dialog */ static GtkListStore *prefs_sound_themes; static GtkListStore *prefs_blist_themes; static GtkListStore *prefs_status_icon_themes; static GtkListStore *prefs_smiley_themes; -static GtkWidget *prefs_sound_themes_combo_box; -static GtkWidget *prefs_blist_themes_combo_box; -static GtkWidget *prefs_status_themes_combo_box; -static GtkWidget *prefs_smiley_themes_combo_box; - -static gboolean prefs_sound_themes_loading; - /* * PROTOTYPES */ @@ -334,10 +340,21 @@ /* Unregister callbacks. */ purple_prefs_disconnect_by_handle(prefs); - prefs = NULL; + /* NULL-ify globals */ sound_entry = NULL; - debugbutton = NULL; + sound_row_sel = 0; + prefs_sound_themes_loading = FALSE; + + prefs_sound_themes_combo_box = NULL; + prefs_blist_themes_combo_box = NULL; + prefs_status_themes_combo_box = NULL; + prefs_smiley_themes_combo_box = NULL; + + sample_imhtml = NULL; + notebook_page = 0; + prefsnotebook = NULL; + prefs = NULL; } static gchar * @@ -949,6 +966,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(prefs_smiley_themes), &new_iter, 2, &new_theme, -1); purple_prefs_set_string(PIDGIN_PREFS_ROOT "/smileys/theme", new_theme); + pidgin_themes_smiley_themeize(sample_imhtml); g_free(new_theme); } @@ -1535,7 +1553,7 @@ G_CALLBACK(formatting_toggle_cb), toolbar); g_signal_connect_after(G_OBJECT(imhtml), "format_function_clear", G_CALLBACK(formatting_clear_cb), NULL); - + sample_imhtml = imhtml; gtk_widget_show(ret); @@ -2835,7 +2853,7 @@ purple_prefs_add_string(PIDGIN_PREFS_ROOT "/smileys/theme", "Default"); /* Smiley Callbacks */ - purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/smileys/theme", + purple_prefs_connect_callback(&prefs, PIDGIN_PREFS_ROOT "/smileys/theme", smiley_theme_pref_cb, NULL); pidgin_prefs_update_old();