Rev | Line | |
---|
[172] | 1 | # Module for editing checklists
|
---|
| 2 |
|
---|
| 3 | #------------------------------------------------------------------------------
|
---|
| 4 |
|
---|
| 5 | from common import *
|
---|
| 6 |
|
---|
| 7 | from mlx.i18n import xstr
|
---|
| 8 |
|
---|
| 9 | #------------------------------------------------------------------------------
|
---|
| 10 |
|
---|
| 11 | class ChecklistEditor(gtk.Dialog):
|
---|
| 12 | """The dialog to edit the checklists."""
|
---|
| 13 | def __init__(self, gui):
|
---|
| 14 | super(ChecklistEditor, self).__init__(WINDOW_TITLE_BASE + " " +
|
---|
| 15 | xstr("chklst_title"),
|
---|
| 16 | gui.mainWindow,
|
---|
| 17 | DIALOG_MODAL)
|
---|
| 18 |
|
---|
| 19 | self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
|
---|
| 20 | self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
|
---|
| 21 |
|
---|
| 22 | contentArea = self.get_content_area()
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | self._fileChooser = gtk.FileChooserWidget()
|
---|
| 26 | self._fileChooser.set_select_multiple(True)
|
---|
| 27 |
|
---|
| 28 | self._fileChooser.set_current_folder("/home/vi")
|
---|
| 29 |
|
---|
| 30 | contentArea.pack_start(self._fileChooser, True, True, 4)
|
---|
| 31 |
|
---|
| 32 | def run(self):
|
---|
| 33 | """Run the checklist editor dialog."""
|
---|
| 34 | self.show_all()
|
---|
| 35 | response = super(ChecklistEditor, self).run()
|
---|
| 36 | self.hide()
|
---|
| 37 |
|
---|
| 38 | #------------------------------------------------------------------------------
|
---|
Note:
See
TracBrowser
for help on using the repository browser.