def __init__(self):
        HIGHBox.__init__(self)

        self._create_target()
        self._create_profile()

        self.scan_button = gtk.Button(_("Scan"))

        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.target_entry.set_focus_child(self.target_entry.child)
        self.profile_entry.set_focus_child(self.profile_entry.child)

        self.target_entry.child.grab_focus()

        # Events
        self.target_entry.child.connect('key-press-event',\
                        self.next, self.profile_entry.child)
        self.target_entry.child.connect('activate',
                        lambda x: self.profile_entry.child.grab_focus())
        self.profile_entry.child.connect('activate',
                        lambda x: self.scan_button.clicked())
예제 #2
0
 def __init__(self):
     HIGHBox.__init__(self)
     
     self.frame = gtk.Frame()
     
     self._pack_expand_fill(self.frame)
     self.__create_draw_area()
    def __init__(self):
        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, label=None, option=None, hint=None):

        HIGHBox.__init__(self)

        self.cbutton = OptionCheck(label,option)
        self.option = option
        self.hint = Hint(hint)
        self.pack_start(self.cbutton, False, False)
        self.pack_start(self.hint, False, False, 5)
예제 #5
0
    def __init__(self):
        HIGHBox.__init__(self)
        self.entry = gtk.Entry()
        self.button = HIGButton(stock=gtk.STOCK_OPEN)

        self.entry.set_width_chars(20)
        self.button.connect("clicked", self.open_dialog)
        
        self._pack_expand_fill(self.entry)
        self._pack_noexpand_nofill(self.button)
    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)
    def __init__(self, name, get_function, set_function, increment=1):
        """
        """
        HIGHBox.__init__(self, spacing=0)

        self.__increment_pass = increment
        self.__increment_time = 200
        self.__increment = False

        self.__name = name
        self.__get_function = get_function
        self.__set_function = set_function

        self.__create_widgets()
예제 #8
0
    def __init__(self):
        """ Constructor """
        HIGHBox.__init__(self)
        self.scroll = HIGScrolledWindow()
        self._box = HIGHBox()
        self._icons_list = []
        self._tabstruct = TabStruct()
        self.__current = [0]
        self.__model = gtk.ListStore(str, gtk.gdk.Pixbuf)
        #self.__model = gtk.ListStore(str, HIGHBox)
        self.__pixmap_d = Path.pixmaps_dir

        self.__icon = gtk.IconView()
        self.__icon.set_model(self.__model)
        self.__icon.set_text_column(0)
        self.__icon.set_pixbuf_column(1)


        self.__icon.set_orientation(gtk.ORIENTATION_VERTICAL)
        self.__icon.set_selection_mode(gtk.SELECTION_SINGLE)

        # Change background color -- FIXME
        #self.__icon.set_name("icon tabs")
        #gtk.rc_parse_string(
#"""
#style "iconview"
#{
  #bg[PRELIGHT] = { 0.75, 3, 1 }
#}
#class 'GtkIconView' style 'iconview'

#""")
        map = self.__icon.get_colormap()

        colour = map.alloc_color("#FFF9E9") # light red

        style = self.__icon.get_style().copy()
        style.base[gtk.STATE_NORMAL] = colour
        self.__icon.set_style(style)


        #self.cellpb = gtk.CellRendererPixbuf()
        #self.cellpb.set_property('cell-background', 'yellow')

        #self.__icon.pack_start(self.cellpb, False)
        #self.__icon.set_attributes(self.cellpb, pixbuf=0)
        self.pack_start(self.scroll, True, True)
        self.scroll.add(self.__icon)
예제 #9
0
    def __init__(self):
        HIGHBox.__init__(self)
        self.entry = gtk.SpinButton(gtk.Adjustment(value=30,
                                                   lower=0,
                                                   upper=9999,
                                                   step_incr=1), 1)
        self.time_list = gtk.ListStore(str)
        self.time_combo = gtk.ComboBoxEntry(self.time_list, 0)

        self.entry.set_width_chars(4)

        for i in SearchConfig().time_list:
            self.time_list.append([i])

        self._pack_noexpand_nofill(self.entry)
        self._pack_expand_fill(self.time_combo)
    def __init__(self):
        HIGHBox.__init__(self)

        self._create_profile()

        self.change_button = gtk.Button(_("Change"))

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

        self._pack_noexpand_nofill(self.change_button)

        self.profile_entry.set_focus_child(self.profile_entry.child)

        # Events
        self.profile_entry.child.connect(
            'activate', lambda x: self.change_button.clicked())
예제 #11
0
    def __init__(self):
        HIGHBox.__init__(self)

        self._create_profile()

        self.change_button = gtk.Button(_("Change"))

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

        self._pack_noexpand_nofill(self.change_button)

        self.profile_entry.set_focus_child(self.profile_entry.child)

        # Events
        self.profile_entry.child.connect('activate',
                                         lambda x: self.change_button.clicked())
예제 #12
0
    def __init__(self):
        """ Constructor """
        HIGHBox.__init__(self)
        self.scroll = HIGScrolledWindow()
        self._box = HIGHBox()
        self._icons_list = []
        self._tabstruct = TabStruct()
        self.__current = [0]
        self.__model = gtk.ListStore(str, gtk.gdk.Pixbuf)
        #self.__model = gtk.ListStore(str, HIGHBox)
        self.__pixmap_d = Path.pixmaps_dir

        self.__icon = gtk.IconView()
        self.__icon.set_model(self.__model)
        self.__icon.set_text_column(0)
        self.__icon.set_pixbuf_column(1)

        self.__icon.set_orientation(gtk.ORIENTATION_VERTICAL)
        self.__icon.set_selection_mode(gtk.SELECTION_SINGLE)

        # Change background color -- FIXME
        #self.__icon.set_name("icon tabs")
        #gtk.rc_parse_string(
        #"""
        #style "iconview"
        #{
        #bg[PRELIGHT] = { 0.75, 3, 1 }
        #}
        #class 'GtkIconView' style 'iconview'

        #""")
        map = self.__icon.get_colormap()

        colour = map.alloc_color("#FFF9E9")  # light red

        style = self.__icon.get_style().copy()
        style.base[gtk.STATE_NORMAL] = colour
        self.__icon.set_style(style)

        #self.cellpb = gtk.CellRendererPixbuf()
        #self.cellpb.set_property('cell-background', 'yellow')

        #self.__icon.pack_start(self.cellpb, False)
        #self.__icon.set_attributes(self.cellpb, pixbuf=0)
        self.pack_start(self.scroll, True, True)
        self.scroll.add(self.__icon)
예제 #13
0
    def __init__(self, help=True, cancel=True, back=True, apply=True):
        HIGHBox.__init__(self)
        self.set_homogeneous(True)

        self.help = HIGButton(stock=gtk.STOCK_HELP)
        self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
        self.back = HIGButton(stock=gtk.STOCK_GO_BACK)
        self.apply = HIGButton(stock=gtk.STOCK_APPLY)

        self._pack_expand_fill(self.help)
        self._pack_expand_fill(hig_box_space_holder())
        self._pack_expand_fill(self.cancel)
        self._pack_expand_fill(self.back)
        self._pack_expand_fill(self.apply)

        if not help:
            self.help.set_sensitive(False)
        if not cancel:
            self.cancel.set_sensitive(False)
        if not back:
            self.back.set_sensitive(False)
        if not apply:
            self.apply.set_sensitive(False)
예제 #14
0
    def __init__(self, help=True, cancel=True, back=True, forward=True):
        HIGHBox.__init__(self)
        self.set_homogeneous(True)

        self.help = HIGButton(stock=gtk.STOCK_HELP)
        self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
        self.back = HIGButton(stock=gtk.STOCK_GO_BACK)
        self.forward = HIGButton(stock=gtk.STOCK_GO_FORWARD)

        self._pack_expand_fill(self.help)
        self._pack_expand_fill(hig_box_space_holder())
        self._pack_expand_fill(self.cancel)
        self._pack_expand_fill(self.back)
        self._pack_expand_fill(self.forward)

        if not help:
            self.help.set_sensitive(False)
        if not cancel:
            self.cancel.set_sensitive(False)
        if not back:
            self.back.set_sensitive(False)
        if not forward:
            self.forward.set_sensitive(False)
    def __init__(self):
        """
        """
        HIGHBox.__init__(self)

        # Creating widgets
        self.__create_widgets()

        # Setting scrolled window
        self.__set_scrolled_window()

        # Setting text view
        self.__set_text_view()

        # Getting text buffer
        self.text_buffer = self.text_view.get_buffer()

        # Adding widgets
        self.__boxalign = gtk.Alignment()
        self.__boxalign.set_padding(8, 0, 0, 8)
        self.__boxalign.add(self.__hbox)
        self._pack_expand_fill(self.scrolled)
        self._pack_noexpand_nofill(self.__boxalign)
예제 #16
0
 def __init__(self, help=True, cancel=True, back=True, apply=True):
     HIGHBox.__init__(self)
     self.set_homogeneous(True)
     
     self.help = HIGButton(stock=gtk.STOCK_HELP)
     self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
     self.back = HIGButton(stock=gtk.STOCK_GO_BACK)
     self.apply = HIGButton(stock=gtk.STOCK_APPLY)
     
     self._pack_expand_fill(self.help)
     self._pack_expand_fill(hig_box_space_holder())
     self._pack_expand_fill(self.cancel)
     self._pack_expand_fill(self.back)
     self._pack_expand_fill(self.apply)
     
     if not help:
         self.help.set_sensitive(False)
     if not cancel:
         self.cancel.set_sensitive(False)
     if not back:
         self.back.set_sensitive(False)
     if not apply:
         self.apply.set_sensitive(False)
예제 #17
0
 def __init__(self, help=True, cancel=True, back=True, forward=True):
     HIGHBox.__init__(self)
     self.set_homogeneous(True)
     
     self.help = HIGButton(stock=gtk.STOCK_HELP)
     self.cancel = HIGButton(stock=gtk.STOCK_CANCEL)
     self.back = HIGButton(stock=gtk.STOCK_GO_BACK)
     self.forward = HIGButton(stock=gtk.STOCK_GO_FORWARD)
     
     self._pack_expand_fill(self.help)
     self._pack_expand_fill(hig_box_space_holder())
     self._pack_expand_fill(self.cancel)
     self._pack_expand_fill(self.back)
     self._pack_expand_fill(self.forward)
     
     if not help:
         self.help.set_sensitive(False)
     if not cancel:
         self.cancel.set_sensitive(False)
     if not back:
         self.back.set_sensitive(False)
     if not forward:
         self.forward.set_sensitive(False)
예제 #18
0
 def __init__(self):
     """
     """
     HIGHBox.__init__(self)
     
     # Creating widgets
     self.__create_widgets()
     
     # Setting scrolled window
     self.__set_scrolled_window()
     
     # Setting text view
     self.__set_text_view()
     
     # Getting text buffer
     self.text_buffer = self.text_view.get_buffer()
     
     # Adding widgets
     self.__boxalign = gtk.Alignment()
     self.__boxalign.set_padding(8, 0, 0, 8)
     self.__boxalign.add(self.__hbox)
     self._pack_expand_fill(self.scrolled)
     self._pack_noexpand_nofill(self.__boxalign)
 def __init__(self):
     HIGHBox.__init__(self)
     self._create_profile()
예제 #20
0
 def __init__(self):
     HIGHBox.__init__(self)        
     self._create_profile()