# HG changeset patch # User Sadrul Habib Chowdhury # Date 1178683681 0 # Node ID 1a336cfc410ed0e88675679a0ebeca2666a85257 # Parent 81ce12035b3227d442162ebe17d11b23c1054a91 Change a string, and make sure non-functional items are not added in the conversation window menu. diff -r 81ce12035b32 -r 1a336cfc410e finch/gntblist.c --- a/finch/gntblist.c Wed May 09 03:12:57 2007 +0000 +++ b/finch/gntblist.c Wed May 09 04:08:01 2007 +0000 @@ -955,7 +955,7 @@ prompt = g_strdup_printf(_("Please enter the new name for %s"), name); - text = PURPLE_BLIST_NODE_IS_GROUP(node) ? _("Rename") : _("Alias"); + text = PURPLE_BLIST_NODE_IS_GROUP(node) ? _("Rename") : _("Set Alias"); purple_request_input(node, text, prompt, _("Enter empty string to reset the name."), name, FALSE, FALSE, NULL, text, G_CALLBACK(rename_blist_node), _("Cancel"), NULL, diff -r 81ce12035b32 -r 1a336cfc410e finch/gntconv.c --- a/finch/gntconv.c Wed May 09 03:12:57 2007 +0000 +++ b/finch/gntconv.c Wed May 09 04:08:01 2007 +0000 @@ -396,17 +396,26 @@ gnt_menuitem_set_callback(item, toggle_timestamps_cb, ggc); if (purple_conversation_get_type(ggc->active_conv) == PURPLE_CONV_TYPE_IM) { - item = gnt_menuitem_new(_("Send File")); - gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(item, send_file_cb, ggc); + PurpleAccount *account = purple_conversation_get_account(ggc->active_conv); + PurplePluginProtocolInfo *pinfo = account->gc ? PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl) : NULL; + + if (pinfo && pinfo->get_info) { + item = gnt_menuitem_new(_("Get Info")); + gnt_menu_add_item(GNT_MENU(sub), item); + gnt_menuitem_set_callback(item, get_info_cb, ggc); + } item = gnt_menuitem_new(_("Add Buddy Pounce...")); gnt_menu_add_item(GNT_MENU(sub), item); gnt_menuitem_set_callback(item, add_pounce_cb, ggc); - item = gnt_menuitem_new(_("Get Info")); - gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(item, get_info_cb, ggc); + if (pinfo && pinfo->send_file && + (!pinfo->can_receive_file || + pinfo->can_receive_file(account->gc, purple_conversation_get_name(ggc->active_conv)))) { + item = gnt_menuitem_new(_("Send File")); + gnt_menu_add_item(GNT_MENU(sub), item); + gnt_menuitem_set_callback(item, send_file_cb, ggc); + } generate_send_to_menu(ggc); }