Skip to content

Commit

Permalink
Enabling double-click for VM Settings -> Available Apps <> Menu Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Jul 7, 2024
1 parent e37573a commit f5be125
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qubesmanager/multiselectwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def __init__(self, parent=None):
QtWidgets.QAbstractItemView.ExtendedSelection)
self.selected_list.setSelectionMode(
QtWidgets.QAbstractItemView.ExtendedSelection)
self.available_list.itemDoubleClicked.connect(self.add_selected)
self.selected_list.itemDoubleClicked.connect(self.remove_selected)

def switch_selected(self, src, dst):
selected = src.selectedItems()
Expand All @@ -39,9 +41,11 @@ def switch_selected(self, src, dst):

def add_selected(self):
self.switch_selected(self.available_list, self.selected_list)
self.available_list.selectionModel().clear()

def remove_selected(self):
self.switch_selected(self.selected_list, self.available_list)
self.selected_list.selectionModel().clear()

def move_all(self, src, dst):
items = []
Expand Down

0 comments on commit f5be125

Please sign in to comment.