mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 11:20:09 +00:00
Properly show the Columns menu.
This commit is contained in:
parent
936df09c60
commit
9551aab1c1
1 changed files with 6 additions and 5 deletions
|
@ -164,7 +164,7 @@ class ListView:
|
||||||
|
|
||||||
def create_checklist_menu(self):
|
def create_checklist_menu(self):
|
||||||
"""Creates a menu used for toggling the display of columns."""
|
"""Creates a menu used for toggling the display of columns."""
|
||||||
self.menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
# Iterate through the column_index list to preserve order
|
# Iterate through the column_index list to preserve order
|
||||||
for name in self.column_index:
|
for name in self.column_index:
|
||||||
column = self.columns[name]
|
column = self.columns[name]
|
||||||
|
@ -180,13 +180,14 @@ class ListView:
|
||||||
# Connect to the 'toggled' event
|
# Connect to the 'toggled' event
|
||||||
menuitem.connect("toggled", self.on_menuitem_toggled)
|
menuitem.connect("toggled", self.on_menuitem_toggled)
|
||||||
# Add the new checkmenuitem to the menu
|
# Add the new checkmenuitem to the menu
|
||||||
self.menu.append(menuitem)
|
menu.append(menuitem)
|
||||||
|
|
||||||
# Attach this new menu to all the checklist_menus
|
# Attach this new menu to all the checklist_menus
|
||||||
for menu in self.checklist_menus:
|
for _menu in self.checklist_menus:
|
||||||
menu.set_submenu(self.menu)
|
_menu.set_submenu(menu)
|
||||||
|
_menu.show_all()
|
||||||
|
|
||||||
return self.menu
|
return menu
|
||||||
|
|
||||||
def create_new_liststore(self):
|
def create_new_liststore(self):
|
||||||
"""Creates a new GtkListStore based on the liststore_columns list"""
|
"""Creates a new GtkListStore based on the liststore_columns list"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue