def row_pressed(self, treeview, event): # Only handle right mouse on row, not empty or left mouse path_pos_tuple = treeview.get_path_at_pos(int(event.x), int(event.y)) if path_pos_tuple == None: return False if not (event.button == 3): return False # Show pop-up path, column, x, y = path_pos_tuple selection = treeview.get_selection() selection.unselect_all() selection.select_path(path) row = int(max(path)) guicomponents.display_media_linker_popup_menu(row, treeview, _media_asset_menu_item_selected, event) return True