示例#1
0
    def __init__(self):
        """Initialize Scan Toolbar, including Events, and packing all
        of the GUI elements in layout"""
        HIGHBox.__init__(self)

        self._create_target()
        self._create_profile()

        self.scan_button = gtk.Button(_("Scan"))
        #self.scan_button = HIGButton(_("Scan "), gtk.STOCK_MEDIA_PLAY)
        self.cancel_button = gtk.Button(_("Cancel"))
        #self.cancel_button = HIGButton(_("Cancel "), gtk.STOCK_CANCEL)

        self._pack_noexpand_nofill(self.target_label)
        self._pack_expand_fill(self.target_entry)

        self._pack_noexpand_nofill(self.profile_label)
        self._pack_expand_fill(self.profile_entry)

        self._pack_noexpand_nofill(self.scan_button)
        self._pack_noexpand_nofill(self.cancel_button)

        # Skip over the dropdown arrow so you can tab to the profile entry.
        self.target_entry.set_focus_chain((self.target_entry.child,))

        self.target_entry.child.connect('activate',
                        lambda x: self.profile_entry.grab_focus())
        self.profile_entry.child.connect('activate',
                        lambda x: self.scan_button.clicked())
示例#2
0
    def __init__(self):
        """Initialize Scan Toolbar, including Events, and packing all
        of the GUI elements in layout"""
        HIGHBox.__init__(self)

        self._create_target()
        self._create_profile()

        self.scan_button = gtk.Button(_("Scan"))
        #self.scan_button = HIGButton(_("Scan "), gtk.STOCK_MEDIA_PLAY)
        self.cancel_button = gtk.Button(_("Cancel"))
        #self.cancel_button = HIGButton(_("Cancel "), gtk.STOCK_CANCEL)

        self._pack_noexpand_nofill(self.target_label)
        self._pack_expand_fill(self.target_entry)

        self._pack_noexpand_nofill(self.profile_label)
        self._pack_expand_fill(self.profile_entry)

        self._pack_noexpand_nofill(self.scan_button)
        self._pack_noexpand_nofill(self.cancel_button)

        # Skip over the dropdown arrow so you can tab to the profile entry.
        self.target_entry.set_focus_chain((self.target_entry.child, ))

        self.target_entry.child.connect(
            'activate', lambda x: self.profile_entry.grab_focus())
        self.profile_entry.child.connect('activate',
                                         lambda x: self.scan_button.clicked())
示例#3
0
    def __init__(self):
        """Initialize command toolbar"""
        HIGHBox.__init__(self)

        self.command_label = HIGEntryLabel(_("Command:"))
        self.command_entry = gtk.Entry()

        self._pack_noexpand_nofill(self.command_label)
        self._pack_expand_fill(self.command_entry)
示例#4
0
    def __init__(self):
        """Initialize command toolbar"""
        HIGHBox.__init__(self)

        self.command_label = HIGEntryLabel(_("Command:"))
        self.command_entry = gtk.Entry()

        self._pack_noexpand_nofill(self.command_label)
        self._pack_expand_fill(self.command_entry)
    def __init__(self, param=""):
        HIGHBox.__init__(self)

        self.entry = OptionEntry()
        self.button = HIGButton(stock=gtk.STOCK_OPEN)

        self._pack_expand_fill(self.entry)
        self._pack_noexpand_nofill(self.button)

        self.entry.set_text(param)
        self.button.connect('clicked', self.open_dialog_cb)
示例#6
0
    def __init__(self):
        HIGHBox.__init__(self)
        self.information_label = gtk.Label()
        self.entry = gtk.Entry()

        self.pack_start(self.information_label, False)
        self.information_label.show()

        label = gtk.Label(_("Host Filter:"))
        self.pack_start(label, False)
        label.show()

        self.pack_start(self.entry, True, True)
        self.entry.show()

        help_button = gtk.Button()
        icon = gtk.Image()
        icon.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON)
        help_button.add(icon)
        help_button.connect("clicked", self._help_button_clicked)
        self.pack_start(help_button, False)
        help_button.show_all()

        self.entry.connect("changed", lambda x: self.emit("changed"))
示例#7
0
    def __init__(self):
        HIGHBox.__init__(self)
        self.information_label = gtk.Label()
        self.entry = gtk.Entry()

        self.pack_start(self.information_label, False)
        self.information_label.show()

        label = gtk.Label(_("Host Filter:"))
        self.pack_start(label, False)
        label.show()

        self.pack_start(self.entry, True, True)
        self.entry.show()

        help_button = gtk.Button()
        icon = gtk.Image()
        icon.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON)
        help_button.add(icon)
        help_button.connect("clicked", self._help_button_clicked)
        self.pack_start(help_button, False)
        help_button.show_all()

        self.entry.connect("changed", lambda x: self.emit("changed"))