コード例 #1
0
ファイル: widgets_2.py プロジェクト: khrysro/monocute
    def save_console_config(self):
        conf = MccmConfig()
        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)
コード例 #2
0
ファイル: widgets_2.py プロジェクト: khrysro/monocute
 def save_connections_config(self):
     conf = MccmConfig()
     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)
コード例 #3
0
ファイル: widgets_2.py プロジェクト: khrysro/monocute
 def fill_console(self):
     conf = MccmConfig()
     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())
コード例 #4
0
ファイル: widgets_2.py プロジェクト: khrysro/monocute
    def insert_default_options(self, widget):
        type = widget.get_active_text()
        conf = MccmConfig()
        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)
コード例 #5
0
ファイル: connections.py プロジェクト: khrysro/monocute
 def conn_args(self):
     conf = MccmConfig()
     post_cmd_args = "; python %s $? ftp \"%s\" 2> /dev/null; exit \n" % (error_dialog, connection_error)
     self.client, not_used = conf.get_ftp_conf()
     return self.cx_args(self.client, self.options, '-u', self.user, '-p', self.port, self.host, post_cmd_args)
コード例 #6
0
ファイル: connections.py プロジェクト: khrysro/monocute
 def conn_args(self):
     conf = MccmConfig()
     post_cmd_args = "; python %s $? vnc \"%s\" 2> /dev/null; exit \n" % (error_dialog, connection_error)
     self.client, options, embedded = conf.get_vnc_conf()
     return self.cx_args(self.client, self.options, self.vnchost(), post_cmd_args)
コード例 #7
0
ファイル: connections.py プロジェクト: khrysro/monocute
 def conn_args(self):
     conf = MccmConfig()
     post_cmd_args = "; python %s $? ssh \"%s\" 2> /dev/null; exit \n" % (error_dialog, connection_error)
     self.client, not_used = conf.get_ssh_conf()
     return self.cx_args(self.client, self.hostname(), "-p", self.port, self.options, post_cmd_args)