[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.get_widget('nickname_entry').set_text(nick)
self.xml.signal_autoconnect(self) self.xml.signal_autoconnect(self)
gajim.interface.instances[account]['join_gc'] = self #now add us to open windows 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: if len(gajim.connections) > 1:
title = _('Join Group Chat as %s') % our_jid title = _('Join Group Chat with account %s') % account
else: else:
title = _('Join Group Chat') title = _('Join Group Chat')
self.window.set_title(title) self.window.set_title(title)
@ -729,12 +727,10 @@ class NewMessageDialog:
def __init__(self, account): def __init__(self, account):
self.account = 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: if len(gajim.connections) > 1:
title = _('New Message as %s') % our_jid title = _('Start Chat with account %s') % account
else: 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:') 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) InputDialog(title, prompt_text, is_modal = False, ok_handler = self.new_message_response)
@ -1046,10 +1042,8 @@ class SingleMessageWindow:
self.save_pos() self.save_pos()
def prepare_widgets_for(self, action): 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: if len(gajim.connections) > 1:
title = _('Single Message as %s') % our_jid title = _('Single Message with account %s') % self.account
else: else:
title = _('Single Message') title = _('Single Message')

View file

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

View file

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