def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = build_menu_radio_list( self.config['tray_download_speed_list'], self.on_tray_setbwdown, self.max_download_speed, _('K/s'), show_notset=True, show_other=True, ) # Create the Upload speed list sub-menu submenu_bwupset = build_menu_radio_list( self.config['tray_upload_speed_list'], self.on_tray_setbwup, self.max_upload_speed, _('K/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 _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_global, 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, _('K/s'), show_notset=True, show_other=True) menu.show_all() menu.popup(None, None, None, event.button, event.time)
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_global, 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, _('K/s'), show_notset=True, show_other=True) menu.show_all() menu.popup(None, None, None, event.button, event.time)
def build_tray_bwsetsubmenu(self): # Create the Download speed list sub-menu submenu_bwdownset = build_menu_radio_list( self.config['tray_download_speed_list'], self.on_tray_setbwdown, self.max_download_speed, _('K/s'), show_notset=True, show_other=True ) # Create the Upload speed list sub-menu submenu_bwupset = build_menu_radio_list( self.config['tray_upload_speed_list'], self.on_tray_setbwup, self.max_upload_speed, _('K/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()