JID in some menus and Account Name in others
In menus we can find Start Chat as jid and Add contact to account name. Dialogs use jid i think.
I think it would be better if account name was used everywhere.
Here is a patch that seems to work and replace jid by account name, but i'm not a developper, so be careful ;)
Index: roster_window.py
===================================================================
--- roster_window.py (révision 4499)
+++ roster_window.py (copie de travail)
@@ -516,9 +516,7 @@
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(_('as %s') % account)
sub_menu.append(item)
item.connect('activate', self.on_new_message_menuitem_activate,
account)
Index: systray.py
===================================================================
--- systray.py (révision 4499)
+++ systray.py (copie de travail)
@@ -176,12 +176,12 @@
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(_('as ') + 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(_('as ') + account)
item.connect('activate',
self.on_new_message_menuitem_activate, account)
account_menu_for_new_message.append(item)
Index: dialogs.py
===================================================================
--- dialogs.py (révision 4499)
+++ dialogs.py (copie de travail)
@@ -645,10 +645,8 @@
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 as %s') % account
else:
title = _('Join Group Chat')
self.window.set_title(title)
@@ -729,12 +727,10 @@
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 as %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 @@
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 as %s') % self.account
else:
title = _('Single Message')