Esempio n. 1
0
    def __create_widgets(self):

        ###
        # Vertical box to keep 3 boxes
        self.main_whole_box = HIGVBox()

        self.upper_box = HIGVBox()
        self.middle_box = HIGHBox()
        self.lower_box = HIGHBox()

        #self.main_vbox = HIGVBox()
        self.command_expander = HIGExpander('<b>' + _('Command') + '</b>')
        self.command_expander.set_expanded(True)
        self.command_entry = gtk.Entry()
        self.command_entry.set_editable(False)

        self.notebook = gtk.Notebook()

        # Profile info page
        self.profile_info_vbox = HIGVBox()
        self.profile_info_label = HIGSectionLabel(_('Profile Information'))
        self.profile_name_label = HIGEntryLabel(_('Profile name'))
        self.profile_name_entry = gtk.Entry()
        self.profile_name_entry.connect('enter-notify-event',
                                        self.update_help_name)
        self.profile_description_label = HIGEntryLabel(_('Description'))
        self.profile_description_scroll = HIGScrolledWindow()
        self.profile_description_scroll.set_border_width(0)
        self.profile_description_text = HIGTextView()
        self.profile_description_text.connect('motion-notify-event',
                                              self.update_help_desc)

        # Buttons
        self.buttons_hbox = HIGHBox()

        self.help_button = HIGButton(stock=gtk.STOCK_HELP)
        self.help_button.connect('clicked', self.help)

        self.cancel_button = HIGButton(stock=gtk.STOCK_CANCEL)
        self.cancel_button.connect('clicked', self.exit)

        self.delete_button = HIGButton(stock=gtk.STOCK_DELETE)
        self.delete_button.connect('clicked', self.delete_profile)

        self.ok_button = HIGButton(stock=gtk.STOCK_OK)
        self.ok_button.connect('clicked', self.save_profile)

        ###
        self.help_vbox = HIGVBox()
        self.help_label = HIGSectionLabel(_('Help'))
        self.help_scroll = HIGScrolledWindow()
        self.help_scroll.set_border_width(0)
        self.help_field = HIGTextView()
        self.help_field.set_cursor_visible(False)
        self.help_field.set_left_margin(5)
        self.help_field.set_editable(False)
        self.help_vbox.set_size_request(200, -1)
Esempio n. 2
0
    def _create_widgets(self):
        # Search box and buttons
        self.search_top_hbox = HIGHBox()
        self.search_label = HIGSectionLabel(_("Search:"))
        self.search_entry = gtk.Entry()
        self.expressions_btn = HIGToggleButton(_("Expressions "),
                                               gtk.STOCK_EDIT)

        # The quick reference tooltip button
        self.search_tooltip_btn = HIGButton(" ", gtk.STOCK_INFO)

        # The expression VBox. This is only visible once the user clicks on
        # "Expressions"
        self.expr_vbox = gtk.VBox()

        # Results section
        self.result_list = gtk.ListStore(str, str, int)  # title, date, id
        self.result_view = gtk.TreeView(self.result_list)
        self.result_scrolled = gtk.ScrolledWindow()
        self.result_title_column = gtk.TreeViewColumn(_("Scan"))
        self.result_date_column = gtk.TreeViewColumn(_("Date"))

        self.no_db_warning = gtk.Label()
        self.no_db_warning.set_line_wrap(True)
        self.no_db_warning.set_no_show_all(True)

        self.expr_window = None
 def _create_widgets (self):
     self.hbox = HIGHBox ()
     self.lbl_diff = HIGSectionLabel ("<b>%s</b>" % _("Diff Result"))
     self.scrolled = gtk.ScrolledWindow()
     self.txt_diff_result = gtk.TextView()
     self.txg_tag = gtk.TextTag ("diff_style")
     self.txg_added = gtk.TextTag ('added style')
     self.txg_removed = gtk.TextTag ('removed style')
Esempio n. 4
0
 def _create_widgets(self):
     self.lbl_scan = HIGSectionLabel(self.title)
     self.hbox = HIGHBox()
     self.table = HIGTable()
     self.list_scan = gtk.ListStore(str)
     self.combo_scan = gtk.ComboBoxEntry(self.list_scan, 0)
     self.btn_open_scan = gtk.Button(stock=gtk.STOCK_OPEN)
     self.exp_scan = gtk.Expander(_("Scan Output"))
     self.scrolled = gtk.ScrolledWindow()
     self.txt_scan_result = gtk.TextView()
     self.txg_tag = gtk.TextTag("scan_style")
 def _create_widgets(self):
     self.diff_box = HIGHBox()
     self.diff_title = HIGSectionLabel("Comparison")
     self.diff_scrolled = gtk.ScrolledWindow()
     self.diff_tree = gtk.TreeStore(str, str, str, str, str, str)
     self.diff_view = gtk.TreeView(self.diff_tree)
     self.diff_column1 = gtk.TreeViewColumn("")
     self.diff_column2 = gtk.TreeViewColumn(_("Section"))
     self.diff_column3 = gtk.TreeViewColumn(_("Property"))
     self.diff_column4 = gtk.TreeViewColumn(_("Original value"))
     self.diff_column5 = gtk.TreeViewColumn(_("Current value"))
     self.diff_cell = gtk.CellRendererText()
Esempio n. 6
0
 def __create_tab(self, tab_name, section_name, tab):
     log.debug(">>> Tab name: %s" % tab_name)
     log.debug(">>>Creating profile editor section: %s" % section_name)
     vbox = HIGVBox()
     if  tab.notscripttab: # if notscripttab is set
         table = HIGTable()
         table.set_row_spacings(2)
         section = HIGSectionLabel(section_name)
         vbox._pack_noexpand_nofill(section)
         vbox._pack_noexpand_nofill(HIGSpacer(table))
         vbox.set_border_width(5)
         tab.fill_table(table, True)
     else:
         hbox = tab.get_hmain_box()
         vbox.pack_start(hbox,True,True,0)
     self.notebook.append_page(vbox, gtk.Label(tab_name))
Esempio n. 7
0
    def __create_tab(self, tab_name, section_name, tab):
        log.debug(">>> Tab name: %s" % tab_name)
        log.debug(">>>Creating profile editor section: %s" % section_name)

        vbox = HIGVBox()
        table = HIGTable()
        table.set_row_spacings(2)
        section = HIGSectionLabel(section_name)

        vbox._pack_noexpand_nofill(section)
        vbox._pack_noexpand_nofill(HIGSpacer(table))
        vbox.set_border_width(5)

        tab.fill_table(table, True)

        self.notebook.append_page(vbox, gtk.Label(tab_name))