Exemplo n.º 1
0
 def __init__(self, parent, main, opts):
     self.main = main
     self.opts = opts
     self.options = {}
     self.choiceoptions = {}
     self.booloptions = {}
     Dialog.__init__(self, parent, title="Preferences")
Exemplo n.º 2
0
 def __init__(self, parent, main, opts):
     self.main = main
     self.opts = opts
     self.options = {}
     self.choiceoptions = {}
     self.booloptions = {}
     Dialog.__init__(self, parent, title="Preferences")
Exemplo n.º 3
0
 def __init__(self, title, prompt, pattern=None, default=None, master=None):
   if not master:
     master = Tkinter._default_root
   self.prompt = prompt
   self.default = default
   self.pattern = re.compile(pattern)
   Dialog.__init__(self, master, title)
   return
Exemplo n.º 4
0
    def __init__(self, parent, title, components):

        if not parent:
            parent = Tkinter._default_root

        self.results = None
        self.components = components
        Dialog.__init__(self, parent, title)
Exemplo n.º 5
0
 def __init__(self,master=None, Title="No Annotation File Found", Filename="",
              Msg="The file you have loaded does not have an associated annotation file"):
     self.Title=Title
     self.Msg=Msg
     self.filename = Filename
     
     #self.Short = Short
     
     Dialog.__init__(self,master,title=self.Title)
Exemplo n.º 6
0
 def __init__(self, master, title='', content=''):
     self.content = content
     self.style = ttk.Style(master)
     if sys.platform == 'darwin':
         self.bg = 'SystemDialogBackgroundActive'
     else:
         self.bg = self.style.lookup('Button', 'background')
     self.image = Tk_.PhotoImage(file=icon_file)
     Dialog.__init__(self, master, title=title)
Exemplo n.º 7
0
    def __init__(self,
                 parent,
                 tag,
                 maxArea):


        self.tag = tag
        self.maxArea = maxArea

        Dialog.__init__(self, parent)
Exemplo n.º 8
0
    def __init__(self, title, prompt, choice_list, parent=None):

        if not parent:
            import Tkinter
            parent = Tkinter._default_root
            parent.withdraw()

        self.__prompt = prompt
        self.__choices = choice_list
        self.__retval = None
        self.__clickedOK = False
        parent.update()
        Dialog.__init__(self, parent, title)  # enters main loop here
Exemplo n.º 9
0
    def __init__(self, title, prompt, choiceList, parent=None):

        if not parent:
            import Tkinter
            parent = Tkinter._default_root
            parent.withdraw()

        self.__prompt = prompt
        self.__choices = choiceList
        self.__retval = None
        self.__clickedOK = False
        parent.update()
        Dialog.__init__(self, parent, title) # enters main loop here
Exemplo n.º 10
0
    def __init__(
        self,
        master=None,
        Title="No Annotation File Found",
        Filename="",
        Msg="The file you have loaded does not have an associated annotation file"
    ):
        self.Title = Title
        self.Msg = Msg
        self.filename = Filename

        #self.Short = Short

        Dialog.__init__(self, master, title=self.Title)
Exemplo n.º 11
0
    def destroy(self):
        # first save the selected index before it is destroyed
        idx = self.get_current_index()
        # in PyRAF, assume they meant the first one if they clicked nothing,
        # since it is already active (underlined)
        if idx < 0: idx = 0
        # get the object at that index
        if self.__clickedOK and idx >= 0:  # otherwise is None
            self.__retval = self.__choices[idx]
        if self.__retval and type(self.__retval) == str:
            self.__retval = self.__retval.strip()

        # now destroy
        self.__lb = None
        Dialog.destroy(self)
Exemplo n.º 12
0
    def destroy(self):
        # first save the selected index before it is destroyed
        idx = self.get_current_index()
        # in PyRAF, assume they meant the first one if they clicked nothing,
        # since it is already active (underlined)
        if idx < 0: idx = 0
        # get the object at that index
        if self.__clickedOK and idx >= 0: # otherwise is None
            self.__retval = self.__choices[idx]
        if self.__retval and type(self.__retval) == str:
            self.__retval = self.__retval.strip()

        # now destroy
        self.__lb = None
        Dialog.destroy(self)
Exemplo n.º 13
0
 def removeAscii(self):
     from Dialog import *
     #        dir = os.getcwd() +os.sep+'ASCII'+os.sep+'*.txt'
     dir = self.txtpath + os.sep + '*.txt'
     dir = 'rm -fr ' + dir
     pa = {
         'title':
         'Remove ASCII files',
         'text':
         dir + '\n\n'
         'All ascii text files will be removed\n'
         'from the sub-directory ASCII.\n'
         'Is it OK to remove all files ?\n ',
         'bitmap':
         DIALOG_ICON,
         'default':
         1,
         'strings': ('OK', 'Cancel')
     }
     dialog = Dialog(self.interior(), pa)
     ans = dialog.num
     if ans == 0:
         print dir
         os.system(dir)
Exemplo n.º 14
0
 def __init__(self, values, *args, **kwargs):
     self.values = values
     Dialog.__init__(self, *args, **kwargs)
Exemplo n.º 15
0
 def ok(self, unused=None):
 	self.result = True
     Dialog.ok(self)
     return True
Exemplo n.º 16
0
 def ok(self, val=None):
     self.__clickedOK = True  # save that this wasn't a cancel
     Dialog.ok(self, val)
Exemplo n.º 17
0
 def __init__(self, master=None, Title="Error", Short="", Msg=""):
     self.Title = Title
     self.Msg = Msg
     self.Short = Short
     Dialog.__init__(self, parent=master, title=Title)
Exemplo n.º 18
0
 def __init__(self,master=None, Title="Add Filter", Filters="",Heads=[]):
     self.Title=Title
     self.Heads =Heads
     self.filters = Filters
     Dialog.__init__(self,master,title=self.Title)
    def __init__(self, parent, title=None, dialogOptions=None):

        self.dialogOptions = dialogOptions
        self.label_text = ' '.join(title.split()[:2])
        Dialog.__init__(self, parent, title)
Exemplo n.º 20
0
 def __init__(self, parent, main):
     self.main = main
     Dialog.__init__(self, parent, title="Address Book")
Exemplo n.º 21
0
 def __init__(self, title, prompt, parent):
     self.prompt = prompt
     Dialog.__init__(self, parent, title)
Exemplo n.º 22
0
 def __init__(self, master, errors):
     self.errors = errors
     self.cancelPressed = True
     Dialog.__init__(self, master, title='Validation')
Exemplo n.º 23
0
 def ok(self, unused=None):
     self.result = True
     Dialog.ok(self)
     return True
Exemplo n.º 24
0
 def __init__(self, parent, settings, title):
     self.settings = settings
     Dialog.__init__(self, parent, title)
Exemplo n.º 25
0
 def __init__(self, master=None, Title="Question", Short="", Msg=""):
     self.Title = Title
     self.Msg = Msg
     self.Short = Short
     Dialog.__init__(self, master, title=Title)
Exemplo n.º 26
0
 def click(self, value):
     self.result = value
     self.filters = self.text.get("1.0", "end")
     Dialog.ok(self)
Exemplo n.º 27
0
 def __init__(self, master=None, Title="Add Filter", Filters="", Heads=[]):
     self.Title = Title
     self.Heads = Heads
     self.filters = Filters
     Dialog.__init__(self, master, title=self.Title)
Exemplo n.º 28
0
 def __init__(self,parent,scores,cols,highlighted=None):
     self.scores = scores
     self.cols = cols
     self.highlighted = highlighted
     Dialog.__init__(self,parent,"High Scores")
Exemplo n.º 29
0
 def __init__(self, master=None, app=None):
     self.app = app
     Dialog.__init__(self, master)
Exemplo n.º 30
0
 def __init__(self, parent, title = None, dialogOptionsD=None):
     
     self.dialogOptionsD = dialogOptionsD
     self.my_title = title
     self.parent = parent
     Dialog.__init__(self, parent, title)
Exemplo n.º 31
0
 def __init__(self,addrdlg,book,entry):
     self.addrdlg = addrdlg
     self.entry = entry
     self.book = book
     Dialog.__init__(self, addrdlg, title="Edit Contact")
 def __init__(self, parentRoutine, index=None):
     self.parentRoutine = parentRoutine
     self.index = index
     Dialog.__init__(self, parentRoutine.master, title="Add Step")
Exemplo n.º 33
0
 def __init__(self, parent, title, gameManager):
     self._master = parent
     self._manager = gameManager
     self._load_entry_box_vars()
     self.result = False
     Dialog.__init__(self, parent, title)
Exemplo n.º 34
0
 def __init__(self, title, prompt, master=None):
   if not master:
     master = Tkinter._default_root
   self.prompt = prompt
   Dialog.__init__(self, master, title)
   return
Exemplo n.º 35
0
 def destroy(self):
   self.entry = None
   Dialog.destroy(self)
   return
Exemplo n.º 36
0
 def click(self, value):
     self.result = value
     Dialog.ok(self)
Exemplo n.º 37
0
 def __init__(self, master=None, colours=None):
     self.colours = colours
     Dialog.__init__(self, master)
Exemplo n.º 38
0
 def __init__(self, parent, main):
     self.main = main
     Dialog.__init__(self, parent, title="Address Book")
Exemplo n.º 39
0
 def __init__(self,master=None, Title="Error", Short="",Msg=""):
     self.Title=Title
     self.Msg=Msg
     self.Short = Short
     Dialog.__init__(self,parent=master,title=Title)
Exemplo n.º 40
0
 def __init__(self, parent, title = None, dialogOptions=None):
     self.initComplete = 0
     self.dialogOptions = dialogOptions
     Dialog.__init__(self, parent, title)
Exemplo n.º 41
0
 def __init__(self, master=None, colours=None):
     self.colours = colours
     Dialog.__init__(self, master)
Exemplo n.º 42
0
 def __init__(self,master=None, Title="Question", Short="",Msg=""):
     self.Title=Title
     self.Msg=Msg
     self.Short = Short
     Dialog.__init__(self,master,title=Title)
Exemplo n.º 43
0
 def click(self, value):
     self.result = value
     self.filters = self.text.get("1.0","end")
     Dialog.ok(self)
Exemplo n.º 44
0
 def click(self, value):
     self.result = value        
     Dialog.ok(self)
Exemplo n.º 45
0
 def __init__(self, addrdlg, book, entry):
     self.addrdlg = addrdlg
     self.entry = entry
     self.book = book
     Dialog.__init__(self, addrdlg, title="Edit Contact")
Exemplo n.º 46
0
 def ok(self, val=None):
     self.__clickedOK = True # save that this wasn't a cancel
     Dialog.ok(self, val)
Exemplo n.º 47
0
 def __init__(self, parent, title, font, size):
     self._master = parent
     self.result = False
     self.font = font
     self.size = size
     Dialog.__init__(self, parent, title)
Exemplo n.º 48
0
 def __init__(self, title, prompt, parent):
     self.prompt = prompt
     Dialog.__init__(self, parent, title)
Exemplo n.º 49
0
 def __init__(self, master=None, app=None):
     self.app = app
     Dialog.__init__(self, master)
Exemplo n.º 50
0
 def __init__(self, parent, title, font, size):
     self._master = parent
     self.result = False
     self.font = font
     self.size = size
     Dialog.__init__(self, parent, title)
Exemplo n.º 51
0
    def __init__(self, parent, title=None, dialogOptions=None):

        self.dialogOptions = dialogOptions
        Dialog.__init__(self, parent, title)
Exemplo n.º 52
0
 def __init__(self, main, *args, **kwargs):
     self.main, self.ok_clicked, self.changed = main, False, False
     Dialog.__init__(self, *args, **kwargs)