Пример #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")
Пример #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")
Пример #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
Пример #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)
Пример #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)
Пример #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)
Пример #7
0
    def __init__(self,
                 parent,
                 tag,
                 maxArea):


        self.tag = tag
        self.maxArea = maxArea

        Dialog.__init__(self, parent)
Пример #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
Пример #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
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #14
0
 def __init__(self, values, *args, **kwargs):
     self.values = values
     Dialog.__init__(self, *args, **kwargs)
Пример #15
0
 def ok(self, unused=None):
 	self.result = True
     Dialog.ok(self)
     return True
Пример #16
0
 def ok(self, val=None):
     self.__clickedOK = True  # save that this wasn't a cancel
     Dialog.ok(self, val)
Пример #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)
Пример #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)
Пример #20
0
 def __init__(self, parent, main):
     self.main = main
     Dialog.__init__(self, parent, title="Address Book")
Пример #21
0
 def __init__(self, title, prompt, parent):
     self.prompt = prompt
     Dialog.__init__(self, parent, title)
Пример #22
0
 def __init__(self, master, errors):
     self.errors = errors
     self.cancelPressed = True
     Dialog.__init__(self, master, title='Validation')
Пример #23
0
 def ok(self, unused=None):
     self.result = True
     Dialog.ok(self)
     return True
Пример #24
0
 def __init__(self, parent, settings, title):
     self.settings = settings
     Dialog.__init__(self, parent, title)
Пример #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)
Пример #26
0
 def click(self, value):
     self.result = value
     self.filters = self.text.get("1.0", "end")
     Dialog.ok(self)
Пример #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)
Пример #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")
Пример #29
0
 def __init__(self, master=None, app=None):
     self.app = app
     Dialog.__init__(self, master)
Пример #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)
Пример #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")
Пример #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)
Пример #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
Пример #35
0
 def destroy(self):
   self.entry = None
   Dialog.destroy(self)
   return
Пример #36
0
 def click(self, value):
     self.result = value
     Dialog.ok(self)
Пример #37
0
 def __init__(self, master=None, colours=None):
     self.colours = colours
     Dialog.__init__(self, master)
Пример #38
0
 def __init__(self, parent, main):
     self.main = main
     Dialog.__init__(self, parent, title="Address Book")
Пример #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)
Пример #40
0
 def __init__(self, parent, title = None, dialogOptions=None):
     self.initComplete = 0
     self.dialogOptions = dialogOptions
     Dialog.__init__(self, parent, title)
Пример #41
0
 def __init__(self, master=None, colours=None):
     self.colours = colours
     Dialog.__init__(self, master)
Пример #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)
Пример #43
0
 def click(self, value):
     self.result = value
     self.filters = self.text.get("1.0","end")
     Dialog.ok(self)
Пример #44
0
 def click(self, value):
     self.result = value        
     Dialog.ok(self)
Пример #45
0
 def __init__(self, addrdlg, book, entry):
     self.addrdlg = addrdlg
     self.entry = entry
     self.book = book
     Dialog.__init__(self, addrdlg, title="Edit Contact")
Пример #46
0
 def ok(self, val=None):
     self.__clickedOK = True # save that this wasn't a cancel
     Dialog.ok(self, val)
Пример #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)
Пример #48
0
 def __init__(self, title, prompt, parent):
     self.prompt = prompt
     Dialog.__init__(self, parent, title)
Пример #49
0
 def __init__(self, master=None, app=None):
     self.app = app
     Dialog.__init__(self, master)
Пример #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)
Пример #51
0
    def __init__(self, parent, title=None, dialogOptions=None):

        self.dialogOptions = dialogOptions
        Dialog.__init__(self, parent, title)
Пример #52
0
 def __init__(self, main, *args, **kwargs):
     self.main, self.ok_clicked, self.changed = main, False, False
     Dialog.__init__(self, *args, **kwargs)