예제 #1
0
 def __init__(self, parent):
     builder = Gtk.Builder()
     builder.add_from_file(locate_resource('about.ui'))
     builder.connect_signals(self)
     self.dialog = builder.get_object('dlg_about')
     self.dialog.set_transient_for(parent)
     self.dialog.set_version(__version__)
예제 #2
0
 def __init__(self, parent):
     builder = Gtk.Builder()
     builder.add_from_file(locate_resource('exec_command.ui'))
     self.dialog = builder.get_object('dlg_exec_command')
     self.dialog.set_transient_for(parent)
     self.cbt_command = builder.get_object('cbt_command')
     self.ent_command = self.cbt_command.get_child()
     self.btn_execute = builder.get_object('btn_execute')
     builder.connect_signals(self)
     for cmd in config.history:
         self.cbt_command.append_text(cmd)
예제 #3
0
 def __init__(self, parent):
     builder = Gtk.Builder()
     builder.add_from_file(locate_resource('send_message.ui'))
     self.dialog = builder.get_object('dlg_send_message')
     self.dialog.set_transient_for(parent)
     self.txv_message = builder.get_object('txv_message')
     self.ent_title = builder.get_object('ent_title')
     self.ent_title.set_text(
         config.settings.get('GUI', 'messages_default_title'))
     self.chb_markup = builder.get_object('chb_markup')
     self.chb_markup.set_active(
         config.settings.getboolean('GUI', 'messages_use_markup'))
예제 #4
0
 def __init__(self, parent):
     builder = Gtk.Builder()
     builder.add_from_file(locate_resource('client_information.ui'))
     builder.connect_signals(self)
     self.dialog = builder.get_object('dlg_client_information')
     self.dialog.set_transient_for(parent)
     self.btn_edit_alias = builder.get_object('btn_edit_alias')
     self.dlg_edit_alias = builder.get_object('dlg_edit_alias')
     self.ent_alias = builder.get_object('ent_alias')
     self.lbl_type = builder.get_object('lbl_type')
     self.lbl_alias = builder.get_object('lbl_alias')
     self.lbl_hostname = builder.get_object('lbl_hostname')
     self.lbl_mac = builder.get_object('lbl_mac')
     self.lbl_ip = builder.get_object('lbl_ip')
     self.lbl_user = builder.get_object('lbl_user')
     self.lbl_cpu = builder.get_object('lbl_cpu')
     self.lbl_ram = builder.get_object('lbl_ram')
     self.lbl_vga = builder.get_object('lbl_vga')
     self.client = None
예제 #5
0
 def __init__(self, parent, execute):
     self.clients = {}
     self.countdown_event = None
     self.execute = execute
     self.iperf = None
     self.parent = parent
     self.results = {}
     self.spawn_process = spawn_process.SpawnProcess(self.on_iperf_exit)
     self.timeleft = 0
     builder = Gtk.Builder()
     builder.add_from_file(locate_resource('benchmark.ui'))
     builder.connect_signals(self)
     self.dlg_message = builder.get_object('dlg_message')
     self.dlg_benchmark = builder.get_object('dlg_benchmark')
     self.adj_seconds = builder.get_object('adj_seconds')
     self.box_seconds = builder.get_object('box_seconds')
     self.spb_seconds = builder.get_object('spb_seconds')
     self.box_countdown = builder.get_object('box_countdown')
     self.lbl_countdown = builder.get_object('lbl_countdown')
     self.btn_start = builder.get_object('btn_start')
     self.btn_stop = builder.get_object('btn_stop')
     self.dlg_results = builder.get_object('dlg_results')
     self.lss_results = builder.get_object('lss_results')
     self.tvc_upload = builder.get_object('tvc_upload')
     self.tvc_download = builder.get_object('tvc_download')
     self.crt_upload = builder.get_object('crt_upload')
     self.crt_download = builder.get_object('crt_download')
     self.lbl_avg_down = builder.get_object('lbl_avg_down')
     self.lbl_avg_up = builder.get_object('lbl_avg_up')
     self.lbl_avg_down = builder.get_object('lbl_avg_down')
     self.lbl_avg_up = builder.get_object('lbl_avg_up')
     self.lbl_total_down = builder.get_object('lbl_total_down')
     self.lbl_total_up = builder.get_object('lbl_total_up')
     self.box_partial_results = builder.get_object('box_partial_results')
     self.dlg_message.set_transient_for(self.parent)
     self.dlg_benchmark.set_transient_for(self.parent)
     self.dlg_results.set_transient_for(self.parent)
     self.tvc_upload.set_cell_data_func(self.crt_upload, self.data_func, 1)
     self.tvc_download.set_cell_data_func(
         self.crt_download, self.data_func, 2)