[SF] show "with account acct_name" instead of "as jid" in menus

This commit is contained in:
Yann Leboulanger 2005-11-28 16:29:04 +00:00
parent 258c0541e0
commit 3f2cbf7c46
3 changed files with 7 additions and 17 deletions

View File

@ -645,10 +645,8 @@ _('You can not join a group chat unless you are connected.')).get_response()
self.xml.get_widget('nickname_entry').set_text(nick)
self.xml.signal_autoconnect(self)
gajim.interface.instances[account]['join_gc'] = self #now add us to open windows
our_jid = gajim.config.get_per('accounts', self.account, 'name') + '@' + \
gajim.config.get_per('accounts', self.account, 'hostname')
if len(gajim.connections) > 1:
title = _('Join Group Chat as %s') % our_jid
title = _('Join Group Chat with account %s') % account
else:
title = _('Join Group Chat')
self.window.set_title(title)
@ -729,12 +727,10 @@ class NewMessageDialog:
def __init__(self, account):
self.account = account
our_jid = gajim.config.get_per('accounts', self.account, 'name') + '@' + \
gajim.config.get_per('accounts', self.account, 'hostname')
if len(gajim.connections) > 1:
title = _('New Message as %s') % our_jid
title = _('Start Chat with account %s') % account
else:
title = _('New Message')
title = _('Start Chat')
prompt_text = _('Fill in the contact ID of the contact you would like\nto send a chat message to:')
InputDialog(title, prompt_text, is_modal = False, ok_handler = self.new_message_response)
@ -1046,10 +1042,8 @@ class SingleMessageWindow:
self.save_pos()
def prepare_widgets_for(self, action):
our_jid = gajim.config.get_per('accounts', self.account, 'name') + '@' + \
gajim.config.get_per('accounts', self.account, 'hostname')
if len(gajim.connections) > 1:
title = _('Single Message as %s') % our_jid
title = _('Single Message with account %s') % self.account
else:
title = _('Single Message')

View File

@ -516,9 +516,7 @@ class RosterWindow:
if gajim.connections[account].connected <= 1:
#if offline or connecting
continue
our_jid = gajim.config.get_per('accounts', account, 'name') + '@' +\
gajim.config.get_per('accounts', account, 'hostname')
item = gtk.MenuItem(_('as %s') % our_jid)
item = gtk.MenuItem(_('with account %s') % account)
sub_menu.append(item)
item.connect('activate', self.on_new_message_menuitem_activate,
account)

View File

@ -173,15 +173,13 @@ class Systray:
new_message_menuitem.set_submenu(account_menu_for_new_message)
for account in gajim.connections:
our_jid = gajim.config.get_per('accounts', account, 'name') + '@' +\
gajim.config.get_per('accounts', account, 'hostname')
#for chat_with
item = gtk.MenuItem(_('as ') + our_jid)
item = gtk.MenuItem(_('with account ') + account)
account_menu_for_chat_with.append(item)
group_menu = self.make_groups_submenus_for_chat_with(account)
item.set_submenu(group_menu)
#for new_message
item = gtk.MenuItem(_('as ') + our_jid)
item = gtk.MenuItem(_('with account ') + account)
item.connect('activate',
self.on_new_message_menuitem_activate, account)
account_menu_for_new_message.append(item)