Example #1
0
 def __init__(self, params):
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_CONFIRM)
     
     self.geometry("320x50+" + str(int(self.winfo_screenwidth() / 2 - 160)) + "+" + str(int(self.winfo_screenheight() / 2 - 25)))
     Label(self, text="Please confirm: "+" ".join(params[1].split(settings.HMC_SEPARATOR)), name="i").pack() 
     Label(self, text="(say \"confirm\" or \"cancel\")", name="i2").pack()       
Example #2
0
 def __init__(self, params):
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_CONFIRM)
     
     self.geometry("320x50+" + str(int(self.winfo_screenwidth() / 2 - 160)) + "+" + str(int(self.winfo_screenheight() / 2 - 25)))
     Label(self, text="Please confirm: "+" ".join(params[1].split(settings.HMC_SEPARATOR)), name="i").pack() 
     Label(self, text="(say \"confirm\" or \"disconfirm\")", name="i2").pack()       
Example #3
0
 def __init__(self, params):
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_DIRECTORY)
     
     self.geometry("640x50+" + str(int(self.winfo_screenwidth() / 2 - 320)) + "+" + str(int(self.winfo_screenheight() / 2 - 25)))
     Label(self, text="Enter directory or say 'browse'", name="pathlabel").pack()
     self.content = StringVar()
     self.word_box = Entry(self, name="word_box", width=640, textvariable=self.content)
     self.word_box.pack()
Example #4
0
    def __init__(self, params):
        Homunculus.__init__(self, params[0])
        self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_DIRECTORY)

        self.geometry("640x50+" + str(int(self.winfo_screenwidth()/2 - 320)) + "+" +
                      str(int(self.winfo_screenheight()/2 - 25)))
        Label(self, text="Enter directory or say 'browse'", name="pathlabel").pack()
        self.content = StringVar()
        self.word_box = Entry(self, name="word_box", width=640, textvariable=self.content)
        self.word_box.pack()
Example #5
0
 def __init__(self, params):
     self.grid_row = 0
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_RECORDING)
     
     self.geometry("640x480+" + str(int(self.winfo_screenwidth() / 2 - 320)) + "+" + str(int(self.winfo_screenheight() / 2 - 240)))
     self.instructions = "Macro Recording Options"
     Label(self, text=self.instructions, name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)
                       
     wf_row = self.get_row()
     Label(self, text="Command Words:", name="wordlabel").grid(row=wf_row, column=0, sticky=tk.W)
     self.word_box = Entry(self, name="word_box")
     self.word_box.grid(row=wf_row, column=1, sticky=tk.W)
     
     self.repeatable = tk.IntVar()
     Checkbutton(self, text="Make Repeatable", variable=self.repeatable).grid(row=self.get_row(), column=0, sticky=tk.W)
     
     Label(self, text="Dictation History", name="optionslabel").grid(row=self.get_row(), column=1, sticky=tk.E)
     self.word_state = []
     cb_number = 1
     
     sentences = params[1].split("[s]")
     sentences.pop()
     for sentence in sentences:
         sentence_words = sentence.split("[w]")
         sentence_words.pop()
         display_sentence = " ".join(sentence_words)
         
         cb_row = 0  # self.get_row()
         cb_col = 0
         row_cut_off = 14
         col2_inc = -1
         word_state_var = tk.IntVar()
         
         if cb_number == 1:
             word_state_var.set(True)
             
         if cb_number < row_cut_off:
             cb_row = cb_row = self.get_row()
         else :
             cb_row = cb_row = self.get_row(row_cut_off + col2_inc)
             cb_col = 2
             col2_inc += 1
         
         Checkbutton(self, text="(" + str(cb_number) + ")", variable=word_state_var).grid(row=cb_row, column=cb_col + 1, sticky=tk.W)
         self.word_state.append((word_state_var, cb_number))
         cb_number += 1
         Label(self, text=display_sentence, name="cb_label" + str(cb_number)).grid(row=cb_row, column=cb_col, sticky=tk.W)
         
     self.cb_max = cb_number
Example #6
0
    def __init__(self, params):
        self.grid_row = 0
        Homunculus.__init__(self, params[0])
        self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_RECORDING)

        self.geometry("640x480+" +
                      str(int(self.winfo_screenwidth() / 2 - 320)) + "+" +
                      str(int(self.winfo_screenheight() / 2 - 240)))
        self.instructions = "Macro Recording Options"
        Label(self, text=self.instructions,
              name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)

        wf_row = self.get_row()
        Label(self, text="Command Words:", name="wordlabel").grid(row=wf_row,
                                                                  column=0,
                                                                  sticky=tk.W)
        self.word_box = Entry(self, name="word_box")
        self.word_box.grid(row=wf_row, column=1, sticky=tk.W)

        self.repeatable = tk.IntVar()
        Checkbutton(self, text="Make Repeatable",
                    variable=self.repeatable).grid(row=self.get_row(),
                                                   column=0,
                                                   sticky=tk.W)

        Label(self, text="Dictation History",
              name="optionslabel").grid(row=self.get_row(),
                                        column=1,
                                        sticky=tk.E)
        self.word_state = []
        cb_number = 1

        sentences = params[1].split("[s]")
        sentences.pop()
        for sentence in sentences:
            sentence_words = sentence.split("[w]")
            sentence_words.pop()
            display_sentence = " ".join(sentence_words)

            cb_row = 0  # self.get_row()
            cb_col = 0
            row_cut_off = 14
            col2_inc = -1
            word_state_var = tk.IntVar()

            if cb_number == 1:
                word_state_var.set(True)

            if cb_number < row_cut_off:
                cb_row = cb_row = self.get_row()
            else:
                cb_row = cb_row = self.get_row(row_cut_off + col2_inc)
                cb_col = 2
                col2_inc += 1

            Checkbutton(self,
                        text="(" + str(cb_number) + ")",
                        variable=word_state_var).grid(row=cb_row,
                                                      column=cb_col + 1,
                                                      sticky=tk.W)
            self.word_state.append((word_state_var, cb_number))
            cb_number += 1
            Label(self,
                  text=display_sentence,
                  name="cb_label" + str(cb_number)).grid(row=cb_row,
                                                         column=cb_col,
                                                         sticky=tk.W)

        self.cb_max = cb_number
Example #7
0
 def __init__(self, params):
     self.grid_row = 0
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_VOCABULARY)
         
     self.mode = params[0]
     clipboard_text = params[1]
     
     if self.mode == settings.QTYPE_SET:
         self.geometry("640x480+" + str(int(self.winfo_screenwidth() / 2 - 320)) + "+" + str(int(self.winfo_screenheight() / 2 - 240)))
         self.instructions = "Add/Modify Word"
         Label(self, text=self.instructions, name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)
                   
         wf_row = self.get_row()
         Label(self, text="(W)ord:", name="wordlabel").grid(row=wf_row, column=0, sticky=tk.W)
         self.word_box = Entry(self, name="word_box")
         self.word_box.grid(row=wf_row, column=1, sticky=tk.W)
         if clipboard_text != None:
             self.word_box.insert(0, clipboard_text)
         
         p_row = self.get_row()
         Label(self, text="(P)ronunciation:", name="pronunciationlabel").grid(row=p_row, column=0, sticky=tk.W)
         self.pronunciation_box = Entry(self, name="pronunciation_box")
         self.pronunciation_box.grid(row=p_row, column=1, sticky=tk.W)
         
         self.force_add_var = tk.IntVar()
         self.force_add_var.set(True)
         self.force_add = Checkbutton(self, text="Force Add", variable=self.force_add_var).grid(row=self.get_row(), column=0, sticky=tk.W)            
         
         Label(self, text="Options", name="optionslabel").grid(row=self.get_row(), column=1, sticky=tk.E)
         self.word_state = []
         cb_number = 1
         for state in [("Word added by user", 0x00000001),
                       ("Can't be deleted", 0x00000008),
                       ("Usually cap next (like period)", 0x00000010),
                       ("Always cap next (like Cap Next)", 0x00000020),
                       ("Uppercase next (All Caps Next)", 0x00000040),
                       ("Lowercase next (No Caps Next)", 0x00000080),
                       ("No space following (left paren)", 0x00000100),
                       ("Two spaces following (period)", 0x00000200),
                       ("No spaces between words (numbers)", 0x00000400),
                       ("Capitalization mode on (Caps On)", 0x00000800),
                       ("Uppercase mode on (All Caps On)", 0x00001000),
                       ("Lowercase mode on (No Caps On)", 0x00002000),
                       ("Space betw words off (No Space On)", 0x00004000),
                       ("Restore normal spacing (No Space Off)", 0x00008000),
                       ("Suppress period (...)", 0x00020000),
                       ("No formatting (like Cap)", 0x00040000),
                       ("No reset spacing (like Cap)", 0x00080000),
                       ("No reset caps (close quote)", 0x00100000),
                       ("No space preceeding (comma)", 0x00200000),
                       ("Restore normal caps (Caps Off)", 0x00400000),
                       ("Follow with new line (New-Line)", 0x00800000),
                       ("Follow with new-p (New-Paragraph)", 0x01000000),
                       ("Don't cap in title (like and)", 0x02000000),
                       ("Follow with extra space (space)", 0x08000000),
                       ("Word added by vocab builder.", 0x40000000)
                       
                       ]:
             cb_row = 0  # self.get_row()
             cb_col = 0
             row_cut_off = 14
             col2_inc = -1
             word_state_var = tk.IntVar()
             
             if cb_number == 1:
                 word_state_var.set(True)
                 
             if cb_number < row_cut_off:
                 cb_row = cb_row = self.get_row()
             else :
                 cb_row = cb_row = self.get_row(row_cut_off + col2_inc)
                 cb_col = 2
                 col2_inc += 1
             
             Checkbutton(self, text="(" + str(cb_number) + ")", variable=word_state_var).grid(row=cb_row, column=cb_col + 1, sticky=tk.W)
             cb_number += 1
             Label(self, text=state[0], name="cb_label" + str(cb_number)).grid(row=cb_row, column=cb_col, sticky=tk.W)
             self.word_state.append((word_state_var, state[1]))
     elif self.mode == settings.QTYPE_REM:
         self.geometry("300x100+" + str(int(self.winfo_screenwidth() / 2 - 150)) + "+" + str(int(self.winfo_screenheight() / 2 - 50)))
         
         self.instructions = "Delete Word"
         Label(self, text=self.instructions, name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)
                   
         wf_row = self.get_row()
         Label(self, text="(W)ord:", name="wordlabel").grid(row=wf_row, column=0, sticky=tk.W)
         self.word_box = Entry(self, name="word_box")
         self.word_box.grid(row=wf_row, column=1, sticky=tk.W)
Example #8
0
 def __init__(self, params):
     self.grid_row = 0
     Homunculus.__init__(self, params[0])
     self.title(settings.HOMUNCULUS_VERSION + settings.HMC_TITLE_VOCABULARY)
     
     self.mode = params[0]
     clipboard_text = params[1]
     
     if self.mode == settings.QTYPE_SET:
         self.geometry("640x480+" + str(int(self.winfo_screenwidth() / 2 - 320)) + "+" + str(int(self.winfo_screenheight() / 2 - 240)))
         self.instructions = "Add/Modify Word"
         Label(self, text=self.instructions, name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)
                   
         wf_row = self.get_row()
         Label(self, text="(W)ord:", name="wordlabel").grid(row=wf_row, column=0, sticky=tk.W)
         self.word_box = Entry(self, name="word_box")
         self.word_box.grid(row=wf_row, column=1, sticky=tk.W)
         if clipboard_text != None:
             self.word_box.insert(0, clipboard_text)
         
         p_row = self.get_row()
         Label(self, text="(P)ronunciation:", name="pronunciationlabel").grid(row=p_row, column=0, sticky=tk.W)
         self.pronunciation_box = Entry(self, name="pronunciation_box")
         self.pronunciation_box.grid(row=p_row, column=1, sticky=tk.W)
         
         self.force_add_var = tk.IntVar()
         self.force_add_var.set(True)
         self.force_add = Checkbutton(self, text="Force Add", variable=self.force_add_var).grid(row=self.get_row(), column=0, sticky=tk.W)            
         
         Label(self, text="Options", name="optionslabel").grid(row=self.get_row(), column=1, sticky=tk.E)
         self.word_state = []
         cb_number = 1
         for state in [("Word added by user", 0x00000001),
                       ("Can't be deleted", 0x00000008),
                       ("Usually cap next (like period)", 0x00000010),
                       ("Always cap next (like Cap Next)", 0x00000020),
                       ("Uppercase next (All Caps Next)", 0x00000040),
                       ("Lowercase next (No Caps Next)", 0x00000080),
                       ("No space following (left paren)", 0x00000100),
                       ("Two spaces following (period)", 0x00000200),
                       ("No spaces between words (numbers)", 0x00000400),
                       ("Capitalization mode on (Caps On)", 0x00000800),
                       ("Uppercase mode on (All Caps On)", 0x00001000),
                       ("Lowercase mode on (No Caps On)", 0x00002000),
                       ("Space betw words off (No Space On)", 0x00004000),
                       ("Restore normal spacing (No Space Off)", 0x00008000),
                       ("Suppress period (...)", 0x00020000),
                       ("No formatting (like Cap)", 0x00040000),
                       ("No reset spacing (like Cap)", 0x00080000),
                       ("No reset caps (close quote)", 0x00100000),
                       ("No space preceeding (comma)", 0x00200000),
                       ("Restore normal caps (Caps Off)", 0x00400000),
                       ("Follow with new line (New-Line)", 0x00800000),
                       ("Follow with new-p (New-Paragraph)", 0x01000000),
                       ("Don't cap in title (like and)", 0x02000000),
                       ("Follow with extra space (space)", 0x08000000),
                       ("Word added by vocab builder.", 0x40000000)
                       
                       ]:
             cb_row = 0  # self.get_row()
             cb_col = 0
             row_cut_off = 14
             col2_inc = -1
             word_state_var = tk.IntVar()
             
             if cb_number == 1:
                 word_state_var.set(True)
                 
             if cb_number < row_cut_off:
                 cb_row = cb_row = self.get_row()
             else :
                 cb_row = cb_row = self.get_row(row_cut_off + col2_inc)
                 cb_col = 2
                 col2_inc += 1
             
             Checkbutton(self, text="(" + str(cb_number) + ")", variable=word_state_var).grid(row=cb_row, column=cb_col + 1, sticky=tk.W)
             cb_number += 1
             Label(self, text=state[0], name="cb_label" + str(cb_number)).grid(row=cb_row, column=cb_col, sticky=tk.W)
             self.word_state.append((word_state_var, state[1]))
     elif self.mode == settings.QTYPE_REM:
         self.geometry("300x100+" + str(int(self.winfo_screenwidth() / 2 - 150)) + "+" + str(int(self.winfo_screenheight() / 2 - 50)))
         
         self.instructions = "Delete Word"
         Label(self, text=self.instructions, name="pathlabel").grid(row=self.get_row(), column=1, sticky=tk.E)
                   
         wf_row = self.get_row()
         Label(self, text="(W)ord:", name="wordlabel").grid(row=wf_row, column=0, sticky=tk.W)
         self.word_box = Entry(self, name="word_box")
         self.word_box.grid(row=wf_row, column=1, sticky=tk.W)