Mercurial > pidgin.yaz
changeset 27829:2f05586afa12
propagate from branch 'im.pidgin.pidgin' (head 018afa661b9c72b48f2277e33e2fe55cc8b19235)
to branch 'im.pidgin.pidgin.yaz' (head 0a588adc7efbf9575fd8245aa8ac7775a7e03026)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 30 Apr 2008 12:53:12 +0000 |
parents | cc8903c59d6b (diff) 474a510587ff (current diff) |
children | c18e82b59f02 |
files | configure.ac libpurple/conversation.c libpurple/protocols/yahoo/yahoo.c libpurple/server.c |
diffstat | 30 files changed, 215 insertions(+), 85 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Apr 28 09:27:44 2008 +0000 +++ b/ChangeLog Wed Apr 30 12:53:12 2008 +0000 @@ -16,6 +16,8 @@ hard time with the lack of the button. * Clicking on the buddyicon in the conversation window toggles the size of the icon between small and large. + * The settings of a chat (e.g. Handle in an XMPP chat, or Exchange in an + AIM chat) can be edited from its context menu in the buddy list. General: * The configure script now dies on more absent dependencies. The
--- a/doc/finch.1.in Mon Apr 28 09:27:44 2008 +0000 +++ b/doc/finch.1.in Wed Apr 30 12:53:12 2008 +0000 @@ -111,9 +111,12 @@ .B Alt \+ Shift \+ Tab Jump to the previous URGENT (highlighted) window. .TP -.B Ctrl \+ o +.B Ctrl \+ o \fR or \fB F10 Bring up the menu (if there is one) for a window. .TP +.B F11 +Popup the context menu (if there is one) for the selected widget. +.TP .B Alt \+ / Show a list of available key-bindings for the current widget in focus. .TP
--- a/finch/gntaccount.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/gntaccount.c Wed Apr 30 12:53:12 2008 +0000 @@ -122,7 +122,7 @@ if (value == NULL || *value == '\0') { purple_notify_error(NULL, _("Error"), _("Account was not added"), - _("Screenname of an account must be non-empty.")); + _("Username of an account must be non-empty.")); return; } @@ -526,7 +526,7 @@ gnt_box_add_widget(GNT_BOX(window), hbox); dialog->screenname = entry = gnt_entry_new(NULL); - gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Screen name:"))); + gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Username:"))); gnt_box_add_widget(GNT_BOX(hbox), entry); /* User splits */
--- a/finch/gntblist.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/gntblist.c Wed Apr 30 12:53:12 2008 +0000 @@ -380,6 +380,27 @@ fnode = FINCH_GET_DATA(node); if (fnode && fnode->signed_timer) flag |= GNT_TEXT_FLAG_BLINK; + } else if (PURPLE_BLIST_NODE_IS_GROUP(node)) { + /* If the node is collapsed, then check to see if any of the priority buddies of + * any of the contacts within this group recently signed on/off, and set the blink + * flag appropriately. */ + /* XXX: Refs #5444 */ + /* XXX: there's no way I can ask if the node is expanded or not? *sigh* + * API addition would be necessary */ +#if 0 + if (!gnt_tree_get_expanded(GNT_TREE(ggblist->tree), node)) { + for (node = purple_blist_node_get_first_child(node); node; + node = purple_blist_node_get_sibling_next(node)) { + PurpleBlistNode *pnode; + pnode = purple_contact_get_priority_buddy((PurpleContact*)node); + fnode = FINCH_GET_DATA(node); + if (fnode && fnode->signed_timer) { + flag |= GNT_TEXT_FLAG_BLINK; + break; + } + } + } +#endif } return flag; @@ -560,7 +581,7 @@ PurpleBuddy *buddy; if (!username) - error = _("You must provide a screename for the buddy."); + error = _("You must provide a username for the buddy."); else if (!group) error = _("You must provide a group."); else if (!account) @@ -598,7 +619,7 @@ purple_request_fields_add_group(fields, group); - field = purple_request_field_string_new("screenname", _("Screen Name"), username, FALSE); + field = purple_request_field_string_new("screenname", _("Username"), username, FALSE); purple_request_field_group_add_field(group, field); field = purple_request_field_string_new("alias", _("Alias (optional)"), alias, FALSE); @@ -1034,7 +1055,11 @@ else val = g_strdup(purple_request_field_string_get_value(field)); - g_hash_table_replace(purple_chat_get_components(chat), g_strdup(id), val); /* val should not be free'd */ + if (!val) { + g_hash_table_remove(purple_chat_get_components(chat), id); + } else { + g_hash_table_replace(purple_chat_get_components(chat), g_strdup(id), val); /* val should not be free'd */ + } } } } @@ -1065,8 +1090,13 @@ } else { field = purple_request_field_string_new(pce->identifier, pce->label, g_hash_table_lookup(purple_chat_get_components(chat), pce->identifier), FALSE); + if (pce->secret) + purple_request_field_string_set_masked(field, TRUE); } + if (pce->required) + purple_request_field_set_required(field, TRUE); + purple_request_field_group_add_field(group, field); g_free(pce); } @@ -2597,7 +2627,7 @@ purple_request_fields(purple_get_blist(), _("Block/Unblock"), NULL, - _("Please enter the screen name or alias of the person " + _("Please enter the username or alias of the person " "you would like to Block/Unblock."), fields, _("OK"), G_CALLBACK(block_select_cb), @@ -2648,7 +2678,7 @@ purple_request_fields(purple_get_blist(), _("New Instant Message"), NULL, - _("Please enter the screen name or alias of the person " + _("Please enter the username or alias of the person " "you would like to IM."), fields, _("OK"), G_CALLBACK(send_im_select_cb),
--- a/finch/gntlog.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/gntlog.c Wed Apr 30 12:53:12 2008 +0000 @@ -139,7 +139,8 @@ } -static void destroy_cb(GntWidget *w, struct log_viewer_hash_t *ht) { +static void destroy_cb(GntWidget *w, struct log_viewer_hash_t *ht) +{ FinchLogViewer *lv = syslog_viewer; if (ht != NULL) { @@ -162,12 +163,12 @@ gnt_widget_destroy(w); } -static void log_select_cb(GntWidget *w, gpointer old, gpointer new, FinchLogViewer *viewer) { +static void log_select_cb(GntWidget *w, gpointer old, gpointer new, FinchLogViewer *viewer) +{ GntTree *tree = GNT_TREE(w); PurpleLog *log = NULL; PurpleLogReadFlags flags; char *read = NULL, *strip, *newline; - int h; if (!viewer->search && !gnt_tree_get_parent_key(tree, new)) return; @@ -204,8 +205,6 @@ gnt_text_view_clear(GNT_TEXT_VIEW(viewer->text)); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(viewer->text), strip, GNT_TEXT_FLAG_NORMAL); - gnt_widget_get_size(viewer->text, NULL, &h); - gnt_text_view_scroll(GNT_TEXT_VIEW(viewer->text), h - 2); g_free(read); g_free(strip); } @@ -321,6 +320,7 @@ /* Viewer ************/ lv->text = gnt_text_view_new(); gnt_box_add_widget(GNT_BOX(hbox), lv->text); + gnt_text_view_set_flag(GNT_TEXT_VIEW(lv->text), GNT_TEXT_VIEW_TOP_ALIGN); hbox = gnt_hbox_new(FALSE); gnt_box_add_widget(GNT_BOX(vbox), hbox);
--- a/finch/gntrequest.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/gntrequest.c Wed Apr 30 12:53:12 2008 +0000 @@ -295,8 +295,7 @@ * updating the fields at the end like here, it updates the appropriate field * instantly whenever a change is made. That allows it to make sure the * 'required' fields are entered before the user can hit OK. It's not the case - * here, althought it can be done. I am not honouring the 'required' fields - * for the moment. */ + * here, althought it can be done. */ for (list = purple_request_fields_get_groups(fields); list; list = list->next) { PurpleRequestFieldGroup *group = list->data; @@ -368,6 +367,15 @@ } } + purple_notify_close_with_handle(button); + + if (!purple_request_fields_all_required_filled(fields)) { + purple_notify_error(button, _("Error"), + _("You must fill all the required fields."), + _("The required fields are underlined.")); + return; + } + if (callback) callback(data, fields); @@ -587,7 +595,11 @@ if (type != PURPLE_REQUEST_FIELD_BOOLEAN && label) { - GntWidget *l = gnt_label_new(label); + GntWidget *l; + if (purple_request_field_is_required(field)) + l = gnt_label_new_with_format(label, GNT_TEXT_FLAG_UNDERLINE); + else + l = gnt_label_new(label); gnt_widget_set_size(l, 0, 1); gnt_box_add_widget(GNT_BOX(hbox), l); }
--- a/finch/gntsound.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/gntsound.c Wed Apr 30 12:53:12 2008 +0000 @@ -103,7 +103,7 @@ {PURPLE_SOUND_CHAT_YOU_SAY, N_("You talk in chat"), "send_chat_msg", "send.wav", NULL}, {PURPLE_SOUND_CHAT_SAY, N_("Others talk in chat"), "chat_msg_recv", "receive.wav", NULL}, {PURPLE_SOUND_POUNCE_DEFAULT, NULL, "pounce_default", "alert.wav", NULL}, - {PURPLE_SOUND_CHAT_NICK, N_("Someone says your screen name in chat"), "nick_said", "alert.wav", NULL} + {PURPLE_SOUND_CHAT_NICK, N_("Someone says your username in chat"), "nick_said", "alert.wav", NULL} }; const char *
--- a/finch/libgnt/gntws.c Mon Apr 28 09:27:44 2008 +0000 +++ b/finch/libgnt/gntws.c Wed Apr 30 12:53:12 2008 +0000 @@ -13,7 +13,8 @@ GntNode *node = g_hash_table_lookup(nodes, widget); if (GNT_IS_WINDOW(widget)) gnt_window_workspace_hiding(GNT_WINDOW(widget)); - hide_panel(node->panel); + if (node) + hide_panel(node->panel); } static void
--- a/libpurple/plugins/newline.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/plugins/newline.c Wed Apr 30 12:53:12 2008 +0000 @@ -102,11 +102,11 @@ "core-plugin_pack-newline", /**< id */ N_("New Line"), /**< name */ - DISPLAY_VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Prepends a newline to displayed message."), /**< summary */ N_("Prepends a newline to messages so that the " "rest of the message appears below the " - "screen name in the conversation window."), /**< description */ + "username in the conversation window."), /**< description */ "Stu Tomlinson <stu@nosnilmot.com>", /**< author */ PURPLE_WEBSITE, /**< homepage */
--- a/libpurple/protocols/jabber/buddy.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.c Wed Apr 30 12:53:12 2008 +0000 @@ -56,8 +56,7 @@ { g_return_if_fail(jb != NULL); - if(jb->error_msg) - g_free(jb->error_msg); + g_free(jb->error_msg); while(jb->resources) jabber_buddy_resource_free(jb->resources->data); @@ -155,12 +154,8 @@ } jbr->priority = priority; jbr->state = state; - if(jbr->status) - g_free(jbr->status); - if (status) - jbr->status = g_markup_escape_text(status, -1); - else - jbr->status = NULL; + g_free(jbr->status); + jbr->status = status != NULL ? g_markup_escape_text(status, -1) : NULL; return jbr; } @@ -502,6 +497,11 @@ if(((JabberStream*)gc->proto_data)->pep) { /* XEP-0084: User Avatars */ if(img) { + /* + * TODO: This is pretty gross. The Jabber PRPL really shouldn't + * do voodoo to try to determine the image type, height + * and width. + */ /* A PNG header, including the IHDR, but nothing else */ const struct { guchar signature[8]; /* must be hex 89 50 4E 47 0D 0A 1A 0A */
--- a/libpurple/protocols/jabber/presence.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/jabber/presence.c Wed Apr 30 12:53:12 2008 +0000 @@ -369,17 +369,29 @@ typedef struct _JabberPresenceCapabilities { JabberStream *js; - JabberBuddyResource *jbr; + JabberBuddy *jb; char *from; } JabberPresenceCapabilities; static void jabber_presence_set_capabilities(JabberCapsClientInfo *info, gpointer user_data) { JabberPresenceCapabilities *userdata = user_data; + JabberID *jid; + JabberBuddyResource *jbr; GList *iter; - if(userdata->jbr->caps) - jabber_caps_free_clientinfo(userdata->jbr->caps); - userdata->jbr->caps = info; + jid = jabber_id_new(userdata->from); + jbr = jabber_buddy_find_resource(userdata->jb, jid->resource); + jabber_id_free(jid); + + if(!jbr) { + g_free(userdata->from); + g_free(userdata); + return; + } + + if(jbr->caps) + jabber_caps_free_clientinfo(jbr->caps); + jbr->caps = info; if (info) { for(iter = info->features; iter; iter = g_list_next(iter)) { @@ -741,7 +753,7 @@ if(node && ver) { JabberPresenceCapabilities *userdata = g_new0(JabberPresenceCapabilities, 1); userdata->js = js; - userdata->jbr = jbr; + userdata->jb = jb; userdata->from = g_strdup(from); jabber_caps_get_info(js, from, node, ver, ext, jabber_presence_set_capabilities, userdata); }
--- a/libpurple/protocols/msn/error.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/msn/error.c Wed Apr 30 12:53:12 2008 +0000 @@ -56,7 +56,7 @@ g_snprintf(msg, sizeof(msg), _("Already logged in")); break; case 208: - g_snprintf(msg, sizeof(msg), _("Invalid screen name")); + g_snprintf(msg, sizeof(msg), _("Invalid username")); break; case 209: g_snprintf(msg, sizeof(msg), _("Invalid friendly name"));
--- a/libpurple/protocols/msn/userlist.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/msn/userlist.c Wed Apr 30 12:53:12 2008 +0000 @@ -714,7 +714,7 @@ char *str = g_strdup_printf(_("Unable to add \"%s\"."), who); purple_notify_error(NULL, NULL, str, - _("The screen name specified is invalid.")); + _("The username specified is invalid.")); g_free(str); return;
--- a/libpurple/protocols/msnp9/error.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/msnp9/error.c Wed Apr 30 12:53:12 2008 +0000 @@ -56,7 +56,7 @@ g_snprintf(msg, sizeof(msg), _("Already logged in")); break; case 208: - g_snprintf(msg, sizeof(msg), _("Invalid screen name")); + g_snprintf(msg, sizeof(msg), _("Invalid username")); break; case 209: g_snprintf(msg, sizeof(msg), _("Invalid friendly name"));
--- a/libpurple/protocols/msnp9/userlist.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/msnp9/userlist.c Wed Apr 30 12:53:12 2008 +0000 @@ -652,7 +652,7 @@ { char *str = g_strdup_printf(_("Unable to add \"%s\"."), who); purple_notify_error(NULL, NULL, str, - _("The screen name specified is invalid.")); + _("The username specified is invalid.")); g_free(str); }
--- a/libpurple/protocols/novell/nmuser.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/novell/nmuser.c Wed Apr 30 12:53:12 2008 +0000 @@ -1919,10 +1919,10 @@ case NMERR_AUTHENTICATION_FAILED: case NMERR_CREDENTIALS_MISSING: - return _("Incorrect screen name or password"); + return _("Incorrect username or password"); case NMERR_HOST_NOT_FOUND: - return _("Could not recognize the host of the screen name you entered"); + return _("Could not recognize the host of the username you entered"); case NMERR_ACCESS_DENIED: return _("Your account has been disabled because too many incorrect passwords were entered"); @@ -1935,7 +1935,7 @@ return _("You have reached your limit for the number of contacts allowed"); case NMERR_OBJECT_NOT_FOUND: - return _("You have entered an incorrect screen name"); + return _("You have entered an incorrect username"); case NMERR_DIRECTORY_UPDATE: return _("An error occurred while updating the directory");
--- a/libpurple/protocols/oscar/family_admin.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/oscar/family_admin.c Wed Apr 30 12:53:12 2008 +0000 @@ -120,10 +120,6 @@ * Subtype 0x0004 - Set screenname formatting. * */ -/* - * Subtype 0x0004 - Set screenname formatting. - * - */ int aim_admin_setnick(OscarData *od, FlapConnection *conn, const char *newnick) {
--- a/libpurple/protocols/oscar/misc.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/oscar/misc.c Wed Apr 30 12:53:12 2008 +0000 @@ -39,7 +39,6 @@ void aim_genericreq_n(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) { - FlapFrame *frame; aim_snacid_t snacid = 0x00000000; flap_connection_send_snac(od, conn, family, subtype, 0x0000, snacid, NULL); @@ -48,7 +47,6 @@ void aim_genericreq_n_snacid(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) { - FlapFrame *frame; aim_snacid_t snacid; snacid = aim_cachesnac(od, family, subtype, 0x0000, NULL, 0); @@ -74,7 +72,7 @@ byte_stream_put32(&bs, *longdata); - flap_connection_send_snac(od, conn, family, subtype, 0x0000, snacid, NULL); + flap_connection_send_snac(od, conn, family, subtype, 0x0000, snacid, &bs); byte_stream_destroy(&bs); } @@ -97,7 +95,7 @@ byte_stream_put16(&bs, *shortdata); - flap_connection_send_snac(od, conn, family, subtype, 0x0000, snacid, NULL); + flap_connection_send_snac(od, conn, family, subtype, 0x0000, snacid, &bs); byte_stream_destroy(&bs); }
--- a/libpurple/protocols/simple/simple.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/simple/simple.c Wed Apr 30 12:53:12 2008 +0000 @@ -1890,7 +1890,7 @@ if (strpbrk(username, " \t\v\r\n") != NULL) { purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, - _("SIP screen names may not contain whitespaces or @ symbols")); + _("SIP usernames may not contain whitespaces or @ symbols")); return; }
--- a/libpurple/protocols/toc/toc.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/toc/toc.c Wed Apr 30 12:53:12 2008 +0000 @@ -546,7 +546,7 @@ g_snprintf(buf, sizeof(buf), _("Failure unknown: %s."), w); break; case 980: - g_snprintf(buf, sizeof(buf), _("Incorrect screen name or password.")); + g_snprintf(buf, sizeof(buf), _("Incorrect username or password.")); break; case 981: g_snprintf(buf, sizeof(buf), _("The service is temporarily unavailable."));
--- a/libpurple/protocols/yahoo/yahoo.c Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Apr 30 12:53:12 2008 +0000 @@ -2133,7 +2133,7 @@ switch (err) { case 3: - msg = g_strdup(_("Invalid screen name.")); + msg = g_strdup(_("Invalid username.")); reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME; break; case 13:
--- a/libpurple/prpl.h Mon Apr 28 09:27:44 2008 +0000 +++ b/libpurple/prpl.h Wed Apr 30 12:53:12 2008 +0000 @@ -186,7 +186,7 @@ * A protocol plugin information structure. * * Every protocol plugin initializes this structure. It is the gateway - * between purple and the protocol plugin. Many of this callbacks can be + * between purple and the protocol plugin. Many of these callbacks can be * NULL. If a callback must be implemented, it has a comment indicating so. */ struct _PurplePluginProtocolInfo
--- a/pidgin/gtkaccount.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtkaccount.c Wed Apr 30 12:53:12 2008 +0000 @@ -408,7 +408,7 @@ g_object_set(G_OBJECT(dialog->screenname_entry), "truncate-multiline", TRUE, NULL); #endif - add_pref_box(dialog, vbox, _("Screen _name:"), dialog->screenname_entry); + add_pref_box(dialog, vbox, _("_Username:"), dialog->screenname_entry); g_signal_connect(G_OBJECT(dialog->screenname_entry), "changed", G_CALLBACK(screenname_changed_cb), dialog); @@ -496,10 +496,6 @@ dialog->password_box = add_pref_box(dialog, vbox, _("_Password:"), dialog->password_entry); - /* Alias */ - dialog->alias_entry = gtk_entry_new(); - add_pref_box(dialog, vbox, _("_Local alias:"), dialog->alias_entry); - /* Remember Password */ dialog->remember_pass_check = gtk_check_button_new_with_mnemonic(_("Remember pass_word")); @@ -571,6 +567,10 @@ gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); + /* Alias */ + dialog->alias_entry = gtk_entry_new(); + add_pref_box(dialog, vbox, _("_Local alias:"), dialog->alias_entry); + /* New mail notifications */ dialog->new_mail_check = gtk_check_button_new_with_mnemonic(_("New _mail notifications")); @@ -654,6 +654,7 @@ set_dialog_icon(dialog, NULL, 0, NULL); } +#if 0 if (!dialog->prpl_info || (!(dialog->prpl_info->options & OPT_PROTO_MAIL_CHECK) && (dialog->prpl_info->icon_spec.format == NULL))) { @@ -661,6 +662,7 @@ /* Nothing to see :( aww. */ gtk_widget_hide(dialog->user_frame); } +#endif } static void @@ -1911,7 +1913,7 @@ /* Screen Name column */ column = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(column, _("Screen Name")); + gtk_tree_view_column_set_title(column, _("Username")); gtk_tree_view_insert_column(GTK_TREE_VIEW(treeview), column, -1); gtk_tree_view_column_set_resizable(column, TRUE);
--- a/pidgin/gtkblist.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtkblist.c Wed Apr 30 12:53:12 2008 +0000 @@ -614,6 +614,78 @@ pidgin_blist_refresh(list); } +static void +chat_components_edit_ok(PurpleChat *chat, PurpleRequestFields *allfields) +{ + GList *groups, *fields; + + for (groups = purple_request_fields_get_groups(allfields); groups; groups = groups->next) { + fields = purple_request_field_group_get_fields(groups->data); + for (; fields; fields = fields->next) { + PurpleRequestField *field = fields->data; + const char *id; + char *val; + + id = purple_request_field_get_id(field); + if (purple_request_field_get_type(field) == PURPLE_REQUEST_FIELD_INTEGER) + val = g_strdup_printf("%d", purple_request_field_int_get_value(field)); + else + val = g_strdup(purple_request_field_string_get_value(field)); + + if (!val) { + g_hash_table_remove(purple_chat_get_components(chat), id); + } else { + g_hash_table_replace(purple_chat_get_components(chat), g_strdup(id), val); /* val should not be free'd */ + } + } + } +} + +static void chat_components_edit(GtkWidget *w, PurpleBlistNode *node) +{ + PurpleRequestFields *fields = purple_request_fields_new(); + PurpleRequestFieldGroup *group = purple_request_field_group_new(NULL); + PurpleRequestField *field; + GList *parts, *iter; + struct proto_chat_entry *pce; + PurpleConnection *gc; + PurpleChat *chat = (PurpleChat*)node; + + purple_request_fields_add_group(fields, group); + + gc = purple_account_get_connection(purple_chat_get_account(chat)); + parts = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info(gc); + + for (iter = parts; iter; iter = iter->next) { + pce = iter->data; + if (pce->is_int) { + int val; + const char *str = g_hash_table_lookup(purple_chat_get_components(chat), pce->identifier); + if (!str || sscanf(str, "%d", &val) != 1) + val = pce->min; + field = purple_request_field_int_new(pce->identifier, pce->label, val); + } else { + field = purple_request_field_string_new(pce->identifier, pce->label, + g_hash_table_lookup(purple_chat_get_components(chat), pce->identifier), FALSE); + if (pce->secret) + purple_request_field_string_set_masked(field, TRUE); + } + + if (pce->required) + purple_request_field_set_required(field, TRUE); + + purple_request_field_group_add_field(group, field); + g_free(pce); + } + + g_list_free(parts); + + purple_request_fields(NULL, _("Edit Chat"), NULL, _("Please Update the necessary fields."), + fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL, + NULL, NULL, NULL, + chat); +} + static void gtk_blist_menu_alias_cb(GtkWidget *w, PurpleBlistNode *node) { GtkTreeIter iter; @@ -1510,6 +1582,8 @@ pidgin_separator(menu); + pidgin_new_item_from_stock(menu, _("_Edit Settings..."), NULL, + G_CALLBACK(chat_components_edit), node, 0, 0, NULL); pidgin_new_item_from_stock(menu, _("_Alias..."), PIDGIN_STOCK_ALIAS, G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); pidgin_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, @@ -3665,13 +3739,13 @@ } return text; } - else - if (hidden_conv) { - char *tmp = esc; - esc = g_strdup_printf("<b>%s</b>", esc); - g_free(tmp); - } - return esc; + else if (hidden_conv) + { + char *tmp = esc; + esc = g_strdup_printf("<b>%s</b>", esc); + g_free(tmp); + } + return esc; } prpl = purple_find_prpl(purple_account_get_protocol_id(b->account)); @@ -6393,7 +6467,7 @@ gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 0, 2, 0, 1); - label = gtk_label_new_with_mnemonic(_("Buddy's _screen name:")); + label = gtk_label_new_with_mnemonic(_("Buddy's _username:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
--- a/pidgin/gtkdialogs.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtkdialogs.c Wed Apr 30 12:53:12 2008 +0000 @@ -760,7 +760,7 @@ purple_request_fields(purple_get_blist(), _("New Instant Message"), NULL, - _("Please enter the screen name or alias of the person " + _("Please enter the username or alias of the person " "you would like to IM."), fields, _("OK"), G_CALLBACK(pidgin_dialogs_im_cb), @@ -899,7 +899,7 @@ purple_request_fields(purple_get_blist(), _("Get User Info"), NULL, - _("Please enter the screen name or alias of the person " + _("Please enter the username or alias of the person " "whose info you would like to view."), fields, _("OK"), G_CALLBACK(pidgin_dialogs_info_cb), @@ -991,7 +991,7 @@ purple_request_fields(purple_get_blist(), _("View User Log"), NULL, - _("Please enter the screen name or alias of the person " + _("Please enter the username or alias of the person " "whose log you would like to view."), fields, _("OK"), G_CALLBACK(pidgin_dialogs_log_cb),
--- a/pidgin/gtkrequest.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtkrequest.c Wed Apr 30 12:53:12 2008 +0000 @@ -1120,6 +1120,16 @@ gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); gtk_widget_show(img); + /* Cancel button */ + button = pidgin_dialog_add_button(GTK_DIALOG(win), text_to_stock(cancel_text), G_CALLBACK(multifield_cancel_cb), data); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + + /* OK button */ + button = pidgin_dialog_add_button(GTK_DIALOG(win), text_to_stock(ok_text), G_CALLBACK(multifield_ok_cb), data); + data->ok_button = button; + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_window_set_default(GTK_WINDOW(win), button); + /* Setup the vbox */ vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); @@ -1393,18 +1403,8 @@ g_object_unref(sg); - /* Cancel button */ - button = pidgin_dialog_add_button(GTK_DIALOG(win), text_to_stock(cancel_text), G_CALLBACK(multifield_cancel_cb), data); - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - - /* OK button */ - button = pidgin_dialog_add_button(GTK_DIALOG(win), text_to_stock(ok_text), G_CALLBACK(multifield_ok_cb), data); - data->ok_button = button; - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - gtk_window_set_default(GTK_WINDOW(win), button); - if (!purple_request_fields_all_required_filled(fields)) - gtk_widget_set_sensitive(button, FALSE); + gtk_widget_set_sensitive(data->ok_button, FALSE); pidgin_auto_parent_window(win);
--- a/pidgin/gtksavedstatuses.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtksavedstatuses.c Wed Apr 30 12:53:12 2008 +0000 @@ -968,7 +968,7 @@ /* Screen Name column */ column = gtk_tree_view_column_new(); gtk_tree_view_column_set_resizable(column, TRUE); - gtk_tree_view_column_set_title(column, _("Screen Name")); + gtk_tree_view_column_set_title(column, _("Username")); gtk_tree_view_insert_column(GTK_TREE_VIEW(dialog->treeview), column, -1); gtk_tree_view_column_set_resizable(column, TRUE);
--- a/pidgin/gtksound.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/gtksound.c Wed Apr 30 12:53:12 2008 +0000 @@ -70,7 +70,7 @@ {N_("Others talk in chat"), "chat_msg_recv", "receive.wav"}, /* this isn't a terminator, it's the buddy pounce default sound event ;-) */ {NULL, "pounce_default", "alert.wav"}, - {N_("Someone says your screen name in chat"), "nick_said", "alert.wav"} + {N_("Someone says your username in chat"), "nick_said", "alert.wav"} }; static gboolean
--- a/pidgin/plugins/gevolution/new_person_dialog.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/plugins/gevolution/new_person_dialog.c Wed Apr 30 12:53:12 2008 +0000 @@ -267,7 +267,7 @@ } else { - label = gtk_label_new(_("Please enter the buddy's screen name and " + label = gtk_label_new(_("Please enter the buddy's username and " "account type below.")); } @@ -291,7 +291,7 @@ /* Screen Name */ dialog->screenname = gtk_entry_new(); - add_pref_box(sg, vbox, _("Screen name:"), dialog->screenname); + add_pref_box(sg, vbox, _("Username:"), dialog->screenname); if (username != NULL) gtk_entry_set_text(GTK_ENTRY(dialog->screenname), username);
--- a/pidgin/plugins/notify.c Mon Apr 28 09:27:44 2008 +0000 +++ b/pidgin/plugins/notify.c Wed Apr 30 12:53:12 2008 +0000 @@ -694,7 +694,7 @@ G_CALLBACK(type_toggle_cb), "type_chat"); ref = toggle; - toggle = gtk_check_button_new_with_mnemonic(_("\t_Only when someone says your screen name")); + toggle = gtk_check_button_new_with_mnemonic(_("\t_Only when someone says your username")); gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), purple_prefs_get_bool("/plugins/gtk/X11/notify/type_chat_nick"));