def askUserForNewFileName(self, fullPath):
     base = basename(fullPath)
     defaultValue, extension = splitext(base)
     dialog = InputDialog('Renaming %s' % defaultValue,
                          self.out,
                          self.system,
                          label='Name this file or forever hold your peace:',
                          defaultValue=defaultValue,
                          imageFileName=fullPath)
     response = dialog.show()
     if not response:
         result = fullPath
     else:
         result = '%s/%s%s' % (dirname(fullPath), response, extension.lower())
     return result
Exemplo n.º 2
0
inputWindow = InputDialog('Test Input Window',
                          out,
                          system,
                          "A question to ask the user:",
                          'default value',
                          '/home/luke/Reference/Code/Windows/Netsync/Netsync/logo-luke.png',
                          '''
                          the free text\nand more free text
                          this is where the netsync contents will be....
                          like    <----    this.
                          
                          and another go...
                          
                          the free text
                          and more free text
                          this is where the netsync contents will be....
                              like    <----    this.
                          and another go...
                          the free text\nand more free text
                          this is where the netsync contents will be....
                          like    <----    this.
                          
                          and another go...
                          
                          the free text
                          and more free text
                          this is where the netsync contents will be....
                              like    <----    this.
                          and another go...
                          the free text\nand more free text
                          this is where the netsync contents will be....
                          like    <----    this.
                          
                          and another go...
                          
                          the free text
                          and more free text
                          this is where the netsync contents will be....
                              like    <----    this.
                          and another go...
                          the free text\nand more free text
                          this is where the netsync contents will be....
                          like    <----    this.
                          
                          and another go...
                          
                          the free text
                          and more free text
                          this is where the netsync contents will be....
                              like    <----    this.
                          and another go...
                          ''')