def setSelection(self):
model, rows = self.listView.get_selection().get_selected_rows()
self.selection = ("F", [])
for row in rows:
if model[row.get_indices()[0]][1] == "D":
alertBox = Gtk.MessageDialog(parent=self,
flags=Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.ERROR,
buttons=Gtk.ButtonsType.OK,
message_format="Only multiple files may be selected.")
alertBox.connect(FileListDialog.closeAlert)
alertBox.show_all()
return
self.selection[1].append(self.listStore[row.get_indices()[0]][0])
self.emit('response', Gtk.ResponseType.ACCEPT)
评论列表
文章目录