def save_console_config(self):
        conf = McmConfig()
        cfg = conf.get_console_config()

        color = self.widgets["fg_colorbutton"].get_color()
        cfg["fg.color"] = color.to_string().strip("#")
        color = self.widgets["bg_colorbutton"].get_color()
        cfg["bg.color"] = color.to_string().strip("#")

        fname = self.widgets["bgimage_filechooserbutton"].get_filename()
        if fname == None:
            fname = "None"
        cfg["bg.image"] = fname

        active = self.widgets["chk_bg_transparent"].get_active()
        cfg["bg.transparent"] = str(active)

        value = self.widgets["transparency_hscale"].get_value()
        value = int(value)
        cfg["bg.transparency"] = str(value)

        value = self.widgets["buffer_hscale"].get_value()
        value = int(value)
        cfg["buffer.size"] = str(value)

        font = self.widgets["fontbutton"].get_font_name()
        cfg["font.type"] = font

        cfg["word.chars"] = self.widgets["console_char_entry"].get_text()
        conf.save_console_config(cfg)
 def save_connections_config(self):
     conf = McmConfig()
     cfg = conf.get_connections_config()
     # SSH
     cfg["ssh.client"] = self.widgets["ssh_entry"].get_text()
     cfg["ssh.default"] = self.widgets["ssh_options_entry"].get_text()
     # VNC
     cfg["vnc.client"] = self.widgets["vnc_entry"].get_text()
     cfg["vnc.default"] = self.widgets["vnc_options_entry"].get_text()
     # RDP
     cfg["rdp.client"] = self.widgets["rdp_entry"].get_text()
     cfg["rdp.default"] = self.widgets["rdp_options_entry"].get_text()
     # TELNET
     cfg["telnet.client"] = self.widgets["telnet_entry"].get_text()
     cfg["telnet.default"] = self.widgets["telnet_options_entry"].get_text()
     # FTP
     cfg["ftp.client"] = self.widgets["ftp_entry"].get_text()
     cfg["ftp.default"] = self.widgets["ftp_options_entry"].get_text()
     conf.save_connections_config(cfg)
Пример #3
0
 def save_connections_config(self):
     conf = McmConfig()
     cfg = conf.get_connections_config()
     #SSH
     cfg['ssh.client'] = self.widgets['ssh_entry'].get_text()
     cfg['ssh.default'] = self.widgets['ssh_options_entry'].get_text()
     #VNC
     cfg['vnc.client'] = self.widgets['vnc_entry'].get_text()
     cfg['vnc.default'] = self.widgets['vnc_options_entry'].get_text()
     cfg['vnc.embedded'] = str(self.widgets['vnc_embedded_chkbutton'].get_active())
     #RDP
     cfg['rdp.client'] = self.widgets['rdp_entry'].get_text()
     cfg['rdp.default'] = self.widgets['rdp_options_entry'].get_text()
     #TELNET
     cfg['telnet.client'] = self.widgets['telnet_entry'].get_text()
     cfg['telnet.default'] = self.widgets['telnet_options_entry'].get_text()
     #FTP
     cfg['ftp.client'] = self.widgets['ftp_entry'].get_text()
     cfg['ftp.default'] = self.widgets['ftp_options_entry'].get_text()
     conf.save_connections_config(cfg)
 def fill_entries(self):
     conf = McmConfig()
     # SSH
     client, options = conf.get_ssh_conf()
     e1 = self.widgets["ssh_entry"]
     e2 = self.widgets["ssh_options_entry"]
     e1.set_text(client)
     e2.set_text(options)
     # VNC
     client, options = conf.get_vnc_conf()
     e1 = self.widgets["vnc_entry"]
     e2 = self.widgets["vnc_options_entry"]
     e1.set_text(client)
     e2.set_text(options)
     # Telnet
     client, options = conf.get_telnet_conf()
     e1 = self.widgets["telnet_entry"]
     e2 = self.widgets["telnet_options_entry"]
     e1.set_text(client)
     e2.set_text(options)
     # FTP
     client, options = conf.get_ftp_conf()
     e1 = self.widgets["ftp_entry"]
     e2 = self.widgets["ftp_options_entry"]
     e1.set_text(client)
     e2.set_text(options)
     # RDP
     client, options = conf.get_rdp_conf()
     e1 = self.widgets["rdp_entry"]
     e2 = self.widgets["rdp_options_entry"]
     e1.set_text(client)
     e2.set_text(options)
Пример #5
0
 def fill_entries(self):
     conf = McmConfig()
     #SSH
     client, options = conf.get_ssh_conf()
     e1 = self.widgets['ssh_entry']
     e2 = self.widgets['ssh_options_entry']
     e1.set_text(client)
     e2.set_text(options)
     #VNC
     client, options, embedded = conf.get_vnc_conf()
     e1 = self.widgets['vnc_entry']
     e2 = self.widgets['vnc_options_entry']
     e3 = self.widgets['vnc_embedded_chkbutton']
     e1.set_text(client)
     e2.set_text(options)
     e3.set_active(embedded)
     #Telnet
     client, options = conf.get_telnet_conf()
     e1 = self.widgets['telnet_entry']
     e2 = self.widgets['telnet_options_entry']
     e1.set_text(client)
     e2.set_text(options)
     #FTP
     client, options = conf.get_ftp_conf()
     e1 = self.widgets['ftp_entry']
     e2 = self.widgets['ftp_options_entry']
     e1.set_text(client)
     e2.set_text(options)
     #RDP
     client, options = conf.get_rdp_conf()
     e1 = self.widgets['rdp_entry']
     e2 = self.widgets['rdp_options_entry']
     e1.set_text(client)
     e2.set_text(options)
 def fill_console(self):
     conf = McmConfig()
     widget = self.widgets["fg_colorbutton"]
     widget.set_color(gtk.gdk.color_parse(conf.get_fg_color()))
     widget = self.widgets["fontbutton"]
     pango_font = conf.get_font()
     widget.set_font_name(pango_font.to_string())
     widget = self.widgets["chk_bg_transparent"]
     widget.set_active(conf.get_bg_transparent())
     widget.toggled()
     widget = self.widgets["transparency_hscale"]
     widget.set_value(conf.get_bg_transparency())
     widget = self.widgets["bgimage_filechooserbutton"]
     widget.set_filename(conf.get_bg_image())
     widget = self.widgets["bg_colorbutton"]
     widget.set_color(gtk.gdk.color_parse(conf.get_bg_color()))
     widget = self.widgets["console_char_entry"]
     widget.set_text(conf.get_word_chars())
     widget = self.widgets["buffer_hscale"]
     widget.set_value(conf.get_buffer_size())
    def insert_default_options(self, widget):
        type = widget.get_active_text()
        conf = McmConfig()
        config = ""
        if type == "SSH":
            not_used, config = conf.get_ssh_conf()
        elif type == "VNC":
            not_used, config = conf.get_vnc_conf()
        elif type == "RDP":
            not_used, config = conf.get_rdp_conf()
        elif type == "TELNET":
            not_used, config = conf.get_telnet_conf()
        elif type == "FTP":
            not_used, config = conf.get_ftp_conf()

        opts_entry = self.widgets["options_entry1"]
        opts_entry.set_text(config)
Пример #8
0
    def insert_default_options(self, widget):
        type = widget.get_active_text()
        conf = McmConfig()
        config = ""
        if type == 'SSH':
            not_used, config = conf.get_ssh_conf()
        elif type == 'VNC':
            not_used, config = conf.get_vnc_conf()
        elif type == 'RDP':
            not_used, config = conf.get_rdp_conf()
        elif type == 'TELNET':
            not_used, config = conf.get_telnet_conf()
        elif type == 'FTP':
            not_used, config = conf.get_ftp_conf()

        opts_entry = self.widgets['options_entry1']
        opts_entry.set_text(config)