diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c --- a/pidgin/gtkblist.c +++ b/pidgin/gtkblist.c @@ -85,8 +85,10 @@ PidginBlistRequestData rq_data; GtkWidget *combo; GtkWidget *entry; + GtkWidget *entry_label; GtkWidget *entry_for_alias; GtkWidget *entry_for_invite; + GtkWidget *entry_for_invite_box; } PidginAddBuddyData; @@ -7044,6 +7046,7 @@ PurplePlugin *prpl = NULL; PurplePluginProtocolInfo *prpl_info = NULL; gboolean invite_enabled = TRUE; + const char *login_label = NULL; /* Save our account */ data->rq_data.account = account; @@ -7056,8 +7059,24 @@ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); if (prpl_info && !(prpl_info->options & OPT_PROTO_INVITE_MESSAGE)) invite_enabled = FALSE; - - gtk_widget_set_sensitive(data->entry_for_invite, invite_enabled); + if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_account_text_table)) + { + GHashTable *table = prpl_info->get_account_text_table(account); + login_label = _(g_hash_table_lookup(table, "login_label")); + g_hash_table_destroy(table); + } + + gtk_widget_set_visible(data->entry_for_invite_box, invite_enabled); + + if (login_label) + { + gchar *widget_label = g_strdup_printf( + _("Buddy's _username (%s):"), login_label); + gtk_label_set_text_with_mnemonic(GTK_LABEL(data->entry_label), widget_label); + g_free(widget_label); + } + else + gtk_label_set_text_with_mnemonic(GTK_LABEL(data->entry_label), _("Buddy's _username:")); } static void @@ -7169,9 +7188,10 @@ G_CALLBACK(destroy_add_buddy_dialog_cb), data); data->entry = gtk_entry_new(); + data->entry_label = NULL; pidgin_add_widget_to_vbox(data->rq_data.vbox, _("Buddy's _username:"), - data->rq_data.sg, data->entry, TRUE, NULL); + data->rq_data.sg, data->entry, TRUE, &data->entry_label); gtk_widget_grab_focus(data->entry); if (username != NULL) @@ -7198,9 +7218,9 @@ gtk_widget_grab_focus(GTK_WIDGET(data->entry_for_alias)); data->entry_for_invite = gtk_entry_new(); - pidgin_add_widget_to_vbox(data->rq_data.vbox, _("(Optional) _Invite message:"), - data->rq_data.sg, data->entry_for_invite, TRUE, - NULL); + data->entry_for_invite_box = pidgin_add_widget_to_vbox( + data->rq_data.vbox, _("(Optional) _Invite message:"), + data->rq_data.sg, data->entry_for_invite, TRUE, NULL); data->combo = pidgin_text_combo_box_entry_new(group, groups_tree()); pidgin_add_widget_to_vbox(data->rq_data.vbox, _("Add buddy to _group:"),