def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = common.build_menu_radio_list( self.config["tray_download_speed_list"], self.tray_setbwdown, self.max_download_speed, _("KiB/s"), show_notset=True, show_other=True) # Create the Upload speed list sub-menu submenu_bwupset = common.build_menu_radio_list( self.config["tray_upload_speed_list"], self.tray_setbwup, self.max_upload_speed, _("KiB/s"), show_notset=True, show_other=True) # Add the sub-menus to the tray menu self.builder.get_object("menuitem_download_limit").set_submenu( submenu_bwdownset) self.builder.get_object("menuitem_upload_limit").set_submenu( submenu_bwupset) # Show the sub-menus for all to see submenu_bwdownset.show_all() submenu_bwupset.show_all() # Re-set the menu to partly work around Launchpad bug #608219 if appindicator and self.config["enable_appindicator"]: self.indicator.set_menu(self.tray_menu)
def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = common.build_menu_radio_list( self.config["tray_download_speed_list"], self.on_tray_setbwdown, self.max_download_speed, _("KiB/s"), show_notset=True, show_other=True) # Create the Upload speed list sub-menu submenu_bwupset = common.build_menu_radio_list( self.config["tray_upload_speed_list"], self.on_tray_setbwup, self.max_upload_speed, _("KiB/s"), show_notset=True, show_other=True) # Add the sub-menus to the tray menu self.builder.get_object("menuitem_download_limit").set_submenu( submenu_bwdownset) self.builder.get_object("menuitem_upload_limit").set_submenu( submenu_bwupset) # Show the sub-menus for all to see submenu_bwdownset.show_all() submenu_bwupset.show_all()
def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = common.build_menu_radio_list( self.config["tray_download_speed_list"], self.on_tray_setbwdown, self.max_download_speed, _("KiB/s"), show_notset=True, show_other=True, ) # Create the Upload speed list sub-menu submenu_bwupset = common.build_menu_radio_list( self.config["tray_upload_speed_list"], self.on_tray_setbwup, self.max_upload_speed, _("KiB/s"), show_notset=True, show_other=True, ) # Add the sub-menus to the tray menu self.builder.get_object("menuitem_download_limit").set_submenu(submenu_bwdownset) self.builder.get_object("menuitem_upload_limit").set_submenu(submenu_bwupset) # Show the sub-menus for all to see submenu_bwdownset.show_all() submenu_bwupset.show_all()
def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = common.build_menu_radio_list( self.config["tray_download_speed_list"], self.tray_setbwdown, self.max_download_speed, _("KiB/s"), show_notset=True, show_other=True) # Create the Upload speed list sub-menu submenu_bwupset = common.build_menu_radio_list( self.config["tray_upload_speed_list"], self.tray_setbwup, self.max_upload_speed, _("KiB/s"), show_notset=True, show_other=True) # Add the sub-menus to the tray menu self.tray_glade.get_widget("menuitem_download_limit").set_submenu( submenu_bwdownset) self.tray_glade.get_widget("menuitem_upload_limit").set_submenu( submenu_bwupset) # Show the sub-menus for all to see submenu_bwdownset.show_all() submenu_bwupset.show_all() # Re-set the menu to partly work around Launchpad bug #608219 if appindicator and self.config["enable_appindicator"]: self.indicator.set_menu(self.tray_menu)
def _on_connection_item_clicked(self, widget, event): menu = common.build_menu_radio_list( self.config["connection_limit_list"], self._on_set_connection_limit, self.max_connections, show_notset=True, show_other=True) menu.show_all() menu.popup(None, None, None, event.button, event.time)
def _on_upload_item_clicked(self, widget, event): menu = common.build_menu_radio_list( self.config["tray_upload_speed_list"], self._on_set_upload_speed, self.max_upload_speed, _("KiB/s"), show_notset=True, show_other=True) menu.show_all() menu.popup(None, None, None, event.button, event.time)