Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

hgqt/shellconf: allow only one list item to be selected

Changeset 8d3dec2ffea8

Parent bf230ef59c30

by Adrian Buehlmann

Changes to one file · Browse files at 8d3dec2ffea8 Showing diff from parent bf230ef59c30 Diff from another changeset...

 
85
86
87
88
 
 
89
90
91
92
93
94
 
 
95
96
97
 
273
274
275
 
 
 
 
 
 
 
276
277
278
 
85
86
87
 
88
89
90
91
92
93
94
 
95
96
97
98
99
 
275
276
277
278
279
280
281
282
283
284
285
286
287
@@ -85,13 +85,15 @@
  grid.addWidget(w, 0, 0)   self.topmenulist = w = QListWidget()   grid.addWidget(w, 1, 0, 4, 1) - self.connect(w, SIGNAL("itemSelectionChanged ()"), self.update_states) + self.connect(w, SIGNAL("itemClicked(QListWidgetItem*)"), + self.listItemClicked)     w = QLabel(_("Sub menu items:"))   grid.addWidget(w, 0, 2)   self.submenulist = w = QListWidget()   grid.addWidget(w, 1, 2, 4, 1) - self.connect(w, SIGNAL("itemSelectionChanged ()"), self.update_states) + self.connect(w, SIGNAL("itemClicked(QListWidgetItem*)"), + self.listItemClicked)     style = QApplication.style()   icon = style.standardIcon(QStyle.SP_ArrowLeft) @@ -273,6 +275,13 @@
  self.dirty = True   self.update_states()   + def listItemClicked(self, item): + itemlist = item.listWidget() + for list in (self.topmenulist, self.submenulist): + if list != itemlist: + list.setCurrentItem(None) + self.update_states() +  if __name__ == "__main__":   app = QApplication(sys.argv)   form = ShellConfigWindow()