示例#1
0
 def _slotFileio(self, actiontype):
     filesel = KFileDialog('.', '', self,
                           '%sEnvironment' % actiontype.upper(), True)
     filesel.actiontype = actiontype
     self.connect(filesel, SIGNAL('okClicked()'), self.file_selected)
     filesel.show()
     self.filesel = filesel
示例#2
0
 def selectWithinSystemTarballDialog(self, filename):
     win = KFileDialog('.', '', self, 'SystemTarball', True)
     win.setURL(KURL('tar://%s' % filename))
     win.connect(win, SIGNAL('okClicked()'), self.newTemplateSelected)
     win.tarball_filename = filename
     win.show()
     self._dialog = win
示例#3
0
 def selectWithinSystemTarballDialog(self, filename):
     win = KFileDialog('.', '', self, 'SystemTarball', True)
     win.setURL(KURL('tar://%s' % filename))
     win.connect(win, SIGNAL('okClicked()'), self.newTemplateSelected)
     win.tarball_filename = filename
     win.show()
     self._dialog = win
示例#4
0
 def fileSelected(self):
     filesel = self._dialog
     filename = str(filesel.selectedFile())
     print filename
     filesel.close()
     filesel = KFileDialog('.', '', self, 'SystemTarball', True)
     url = 'tar://%s' % filename
     filesel.setURL(KURL(url))
     filesel.connect(filesel, SIGNAL('okClicked()'), self.newTemplateSelected)
     filesel.show()
     self._dialog = filesel
 def select_launch_command(self):
     if self.select_launch_command_dlg is None:
         file_filter = "*.exe *.bat *.com|Dos Executables\n*|All Files"
         dlg = KFileDialog(self.fullpath, file_filter,  self, 'select_launch_command_dlg', True)
         dlg.connect(dlg, SIGNAL('okClicked()'), self.launch_command_selected)
         dlg.connect(dlg, SIGNAL('cancelClicked()'), self.destroy_select_launch_command_dlg)
         dlg.connect(dlg, SIGNAL('closeClicked()'), self.destroy_select_launch_command_dlg)
         dlg.show()
         self.select_launch_command_dlg = dlg
     else:
         # we shouldn't need this with a modal dialog
         KMessageBox.error(self, opendlg_errormsg)
示例#6
0
 def fileSelected(self):
     filesel = self._dialog
     filename = str(filesel.selectedFile())
     print filename
     filesel.close()
     filesel = KFileDialog('.', '', self, 'SystemTarball', True)
     url = 'tar://%s' % filename
     filesel.setURL(KURL(url))
     filesel.connect(filesel, SIGNAL('okClicked()'),
                     self.newTemplateSelected)
     filesel.show()
     self._dialog = filesel
 def select_title_screenshot(self, name):
     #raise StandardError, 'select_title_screenshot has a few problems.'
     if self.select_title_screenshot_dlg is None:
         file_filter = "*.png|PNG Images\n*|All Files"
         path = self.app.dosbox.get_capture_path(name)
         dlg = KFileDialog(path, file_filter, self.dialog_parent,
                           'select_title_screenshot_dlg', True)
         dlg.connect(dlg, SIGNAL('okClicked()'), self.title_screenshot_selected)
         dlg.connect(dlg, SIGNAL('cancelClicked()'), self.destroy_select_title_screenshot_dlg)
         dlg.connect(dlg, SIGNAL('closeClicked()'), self.destroy_select_title_screenshot_dlg)
         dlg.game_name = name
         dlg.show()
         self.select_title_screenshot_dlg = dlg
     else:
         # we shouldn't need this with a modal dialog
         KMessageBox.error(self.dialog_parent, opendlg_errormsg)
示例#8
0
 def selectSystemTarballDialog(self):
     win = KFileDialog('.', '', self, 'SystemTarball', True)
     win.connect(win, SIGNAL('okClicked()'), self.fileSelected)
     win.show()
     self._dialog = win
示例#9
0
 def selectSystemTarballDialog(self):
     win = KFileDialog('.', '', self, 'SystemTarball', True)
     win.connect(win, SIGNAL('okClicked()'), self.fileSelected)
     win.show()
     self._dialog = win
示例#10
0
 def _slotFileio(self, actiontype):
     filesel = KFileDialog('.', '', self, '%sEnvironment' % actiontype.upper(), True)
     filesel.actiontype = actiontype
     self.connect(filesel, SIGNAL('okClicked()'), self.file_selected)
     filesel.show()
     self.filesel = filesel