def __init_widget(self): self.manual_table = TableAsm() self.manual_radio = self.__row_check(_("Manual"), self.manual_table, None) self.http_entry, self.http_spin = self.__row_entry_spin( _("Http Proxy"), self.manual_table, "http") self.https_entry, self.https_spin = self.__row_entry_spin( _("Https Proxy"), self.manual_table, "https") self.ftp_entry, self.ftp_spin = self.__row_entry_spin( _("FTP Proxy"), self.manual_table, "ftp") self.socks_entry, self.socks_spin = self.__row_entry_spin( _("Socks Proxy"), self.manual_table, "socks") self.auto_table = TableAsm(left_width=STANDARD_LINE, right_width=self.ENTRY_WIDTH) self.auto_radio = self.__row_check(_("Automatic"), self.auto_table, self.manual_radio) self.conf_entry = self.auto_table.row_input_entry( _("Configuration url")) auto_align = gtk.Alignment(0, 0, 0, 0) auto_align.add(self.auto_table) table_box = gtk.VBox(spacing=15) table_box.pack_start(self.manual_table, False, False) table_box.pack_start(auto_align, False, False) align = gtk.Alignment(0, 0, 0, 0) align.set_padding(35, 0, 0, 0) align.add(table_box) self.pack_start(align) apply_button = Button(_("Apply")) apply_button.connect("clicked", self.save_changes) foot_box = FootBox() align.connect("expose-event", self.expose_line) foot_box.set_buttons([apply_button]) self.pack_end(foot_box, False, False) #self.connect("expose-event", self.expose_event) self.manual_radio.connect("toggled", self.manual_radio_selected_cb) self.auto_radio.connect("toggled", self.auto_radio_selected_cb) self.manual_table.table_build() self.auto_table.table_build()
def __init_table(self): self.table = TableAsm() self.mac_entry = self.table.row_mac_entry(_("Device Mac Address:")) self.clone_entry = self.table.row_mac_entry(_("Cloned Mac Address:")) self.mtu_spin = self.table.row_spin(_("MTU:"), 0, 1500) self.table.table_build() # TODO UI change align = gtk.Alignment(0,0,0,0) align.add(self.table) self.pack_start(align)