Mercurial > pidgin
changeset 28969:757a386a5c93
merge of '7f93eb293109127d6a055f9a6aaa8baaa85207d1'
and '9028ac0daaa1f7e565726fa39aca22ce7d3ecc49'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 04 Feb 2010 05:46:37 +0000 |
parents | 5f6571bb128d (diff) 86ee7772936f (current diff) |
children | 2afc3f95ab33 eb024bcff0c9 a32da45d80ba |
files | |
diffstat | 4 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c Thu Feb 04 02:18:37 2010 +0000 +++ b/libpurple/protocols/irc/msgs.c Thu Feb 04 05:46:37 2010 +0000 @@ -1069,7 +1069,7 @@ nick = irc_mask_nick(from); if (!purple_utf8_strcasecmp(nick, purple_connection_get_display_name(gc))) { - char *escaped = g_markup_escape_text(args[1], -1); + char *escaped = args[1] ? g_markup_escape_text(args[1], -1) : NULL; msg = g_strdup_printf(_("You have parted the channel%s%s"), (args[1] && *args[1]) ? ": " : "", (escaped && *escaped) ? escaped : "");
--- a/pidgin/gtkconv.c Thu Feb 04 02:18:37 2010 +0000 +++ b/pidgin/gtkconv.c Thu Feb 04 05:46:37 2010 +0000 @@ -497,17 +497,15 @@ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); if ((prpl_info != NULL) && (prpl_info->options & OPT_PROTO_SLASH_COMMANDS_NATIVE)) { - char *firstspace; - char *slash; - - firstspace = strchr(cmdline, ' '); - if (firstspace != NULL) { - slash = strrchr(firstspace, '/'); - } else { - slash = strchr(cmdline, '/'); - } - - if (slash == NULL) { + char *spaceslash; + + /* If the first word in the entered text has a '/' in it, then the user + * probably didn't mean it as a command. So send the text as message. */ + spaceslash = cmdline; + while (*spaceslash && *spaceslash != ' ' && *spaceslash != '/') + spaceslash++; + + if (*spaceslash != '/') { purple_conversation_write(conv, "", _("Unknown command."), PURPLE_MESSAGE_NO_LOG, time(NULL)); retval = TRUE; }
--- a/pidgin/gtkdebug.c Thu Feb 04 02:18:37 2010 +0000 +++ b/pidgin/gtkdebug.c Thu Feb 04 05:46:37 2010 +0000 @@ -766,11 +766,12 @@ gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); /* regex toggle button */ + image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); win->filter = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, _("Filter"), _("Filter"), - NULL, NULL, + NULL, image, G_CALLBACK(regex_filter_toggled_cb), win); /* we purposely disable the toggle button here in case
--- a/pidgin/gtkimhtml.c Thu Feb 04 02:18:37 2010 +0000 +++ b/pidgin/gtkimhtml.c Thu Feb 04 05:46:37 2010 +0000 @@ -4934,7 +4934,9 @@ mark = gtk_text_buffer_get_insert(imhtml->text_buffer); gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, mark); + gtk_text_buffer_begin_user_action(imhtml->text_buffer); gtk_imhtml_insert_smiley_at_iter(imhtml, sml, smiley, &iter); + gtk_text_buffer_end_user_action(imhtml->text_buffer); } static gboolean