do not use underline in join_gc menu

This commit is contained in:
Yann Leboulanger 2006-01-08 01:08:21 +00:00
parent 29071dda00
commit 47a13bdd2f
1 changed files with 6 additions and 5 deletions

View File

@ -451,33 +451,34 @@ class RosterWindow:
self.new_message_menuitem_handler_id) self.new_message_menuitem_handler_id)
self.new_message_menuitem_handler_id = None self.new_message_menuitem_handler_id = None
#remove the existing submenus # remove the existing submenus
add_new_contact_menuitem.remove_submenu() add_new_contact_menuitem.remove_submenu()
service_disco_menuitem.remove_submenu() service_disco_menuitem.remove_submenu()
join_gc_menuitem.remove_submenu() join_gc_menuitem.remove_submenu()
new_message_menuitem.remove_submenu() new_message_menuitem.remove_submenu()
advanced_menuitem.remove_submenu() advanced_menuitem.remove_submenu()
#remove the existing accelerator # remove the existing accelerator
if self.have_new_message_accel: if self.have_new_message_accel:
ag = gtk.accel_groups_from_object(self.window)[0] ag = gtk.accel_groups_from_object(self.window)[0]
new_message_menuitem.remove_accelerator(ag, gtk.keysyms.n, new_message_menuitem.remove_accelerator(ag, gtk.keysyms.n,
gtk.gdk.CONTROL_MASK) gtk.gdk.CONTROL_MASK)
self.have_new_message_accel = False self.have_new_message_accel = False
#join gc # join gc
sub_menu = gtk.Menu() sub_menu = gtk.Menu()
join_gc_menuitem.set_submenu(sub_menu) join_gc_menuitem.set_submenu(sub_menu)
at_least_one_account_connected = False at_least_one_account_connected = False
multiple_accounts = len(gajim.connections) >= 2 #FIXME: stop using bool var here multiple_accounts = len(gajim.connections) >= 2 #FIXME: stop using bool var here
for account in gajim.connections: for account in gajim.connections:
if gajim.connections[account].connected <= 1: #if offline or connecting if gajim.connections[account].connected <= 1: # if offline or connecting
continue continue
if not at_least_one_account_connected: if not at_least_one_account_connected:
at_least_one_account_connected = True at_least_one_account_connected = True
if multiple_accounts: if multiple_accounts:
label = gtk.Label() label = gtk.Label()
label.set_markup('<u>' + account.upper() +'</u>') label.set_markup('<u>' + account.upper() +'</u>')
label.set_use_underline(False)
item = gtk.MenuItem() item = gtk.MenuItem()
item.add(label) item.add(label)
item.connect('state-changed', self.on_bm_header_changed_state) item.connect('state-changed', self.on_bm_header_changed_state)
@ -488,7 +489,7 @@ class RosterWindow:
sub_menu.append(item) sub_menu.append(item)
for bookmark in gajim.connections[account].bookmarks: for bookmark in gajim.connections[account].bookmarks:
item = gtk.MenuItem(bookmark['name']) item = gtk.MenuItem(bookmark['name'], False) # Do not use underline
item.connect('activate', self.on_bookmark_menuitem_activate, item.connect('activate', self.on_bookmark_menuitem_activate,
account, bookmark) account, bookmark)
sub_menu.append(item) sub_menu.append(item)