예제 #1
0
파일: tk_ui.py 프로젝트: haledeng/Blackhole
    def writeConfig(self):
        # Text widget has an extra \n
        # The tkinter text widget guarantees that there is always a newline following the last character in the widget.

        data = self.edit.get('1.0', 'end-1c')

        with open(config.config_file, 'w') as f:
            f.write(data)

        self.tip.config(text='Settings was Saved!')
        self.after(2000, lambda: self.tip.config(text=''))

        global config
        config = getConfig(config.config_file)
        server.reload(config)
예제 #2
0
    def writeConfig(self):
        # Text widget has an extra \n
        # The tkinter text widget guarantees that there is always a newline following the last character in the widget.

        data = self.edit.get('1.0', 'end-1c')

        with open(config.config_file, 'w') as f:
            f.write(data)

        self.tip.config(text='Settings was Saved!')
        self.after(2000, lambda: self.tip.config(text=''))

        global config
        config = getConfig(config.config_file)
        server.reload(config)
예제 #3
0
 def get_config(self, key):
     return getConfig().getAddonConfig('weinre', key)
예제 #4
0
 def get_config(self, key):
     return getConfig().getAddonConfig('weinre', key)