Ejemplo n.º 1
0
    def __init__(self):
        GladeWidget.__init__(self)

        self.connections.set_columns([
            Column("host",
                   title=_("Hostname"),
                   searchable=True,
                   ellipsize=ELLIPSIZE_MIDDLE,
                   expand=True,
                   width=100),
            Column("manager",
                   title=_("Manager"),
                   searchable=True,
                   ellipsize=ELLIPSIZE_END,
                   expand=True,
                   width=50),
            Column("timestamp",
                   title=_("Last used"),
                   sorted=True,
                   order=gtk.SORT_DESCENDING,
                   format_func=format_timestamp),
        ])
        self.connections.add_list(getRecentConnections())
        self.connections.get_treeview().set_search_equal_func(
            self._searchEqual)
        self.connections.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        self.connections.set_property('selection-mode', gtk.SELECTION_SINGLE)
        self.connections.set_size_request(-1, 160)

        self._updateButtons()
Ejemplo n.º 2
0
 def __init__(self, wizard, gladePrefix=''):
     """
     @type  wizard:       L{Wizard}
     @type  gladePrefix: str
     @param gladePrefix: prefix used for glade files for the step
     """
     self.wizard = wizard
     self.gladeFile = gladePrefix + self.name + '.glade'
     GladeWidget.__init__(self)
Ejemplo n.º 3
0
 def __init__(self, wizard, gladePrefix=''):
     """
     @type  wizard:       L{Wizard}
     @type  gladePrefix: str
     @param gladePrefix: prefix used for glade files for the step
     """
     self.wizard = wizard
     self.gladeFile = gladePrefix + self.name + '.glade'
     GladeWidget.__init__(self)
Ejemplo n.º 4
0
    def __init__(self, wizard):
        """
        @param wizard: the wizard this step is a part of
        @type  wizard: L{SectionWizard}
        """
        self.visited = False
        self.wizard = wizard

        GladeWidget.__init__(self)
        self.set_name(self.name)
        if not self.sidebarName:
            self.sidebarName = self.title
        self.setup()
Ejemplo n.º 5
0
    def __init__(self, wizard):
        """
        @param wizard: the wizard this step is a part of
        @type  wizard: L{SectionWizard}
        """
        self.visited = False
        self.wizard = wizard

        GladeWidget.__init__(self)
        self.set_name(self.name)
        if not self.sidebarName:
            self.sidebarName = self.title
        self.setup()
Ejemplo n.º 6
0
    def __init__(self):
        GladeWidget.__init__(self)

        columns = [
            Column("host", title=_("Hostname"), searchable=True),
            Column(
                "timestamp", title=_("Last used"), sorted=True, order=gtk.SORT_DESCENDING, format_func=format_timestamp
            ),
        ]
        self._connections = ObjectList(columns, objects=getRecentConnections(), mode=gtk.SELECTION_SINGLE)
        self._connections.connect("row-activated", self._on_objectlist_row_activated)
        self._connections.connect("selection-changed", self._on_objectlist_selection_changed)
        self._connections.set_size_request(-1, 160)
        self.page.pack_start(self._connections)
        self.page.reorder_child(self._connections, 0)
        self._connections.get_treeview().set_search_equal_func(self._searchEqual)
        self._connections.show()
        self._updateButtons()
Ejemplo n.º 7
0
    def __init__(self, wizard, model, description):
        if self.gladeFile:
            GladeWidget.__init__(self)
        else:
            gtk.VBox.__init__(self)
        self._cb = gtk.CheckButton()

        label = gtk.Label(description)
        label.set_use_underline(True)

        self._cb.add(label)
        self.pack_start(self._cb)
        self._cb.connect('toggled', self.on_checkbutton_toggled)

        self.reorder_child(self._cb, 0)
        self._cb.show_all()

        self.wizard = wizard
        self.model = model
Ejemplo n.º 8
0
    def __init__(self, wizard, model, description):
        if self.gladeFile:
            GladeWidget.__init__(self)
        else:
            gtk.VBox.__init__(self)
        self._cb = gtk.CheckButton()

        label = gtk.Label(description)
        label.set_use_underline(True)

        self._cb.add(label)
        self.pack_start(self._cb)
        self._cb.connect('toggled',
                                 self.on_checkbutton_toggled)

        self.reorder_child(self._cb, 0)
        self._cb.show_all()

        self.wizard = wizard
        self.model = model
Ejemplo n.º 9
0
    def __init__(self):
        GladeWidget.__init__(self)

        self.connections.set_columns(
                  [Column("host", title=_("Hostname"), searchable=True,
                          ellipsize=ELLIPSIZE_MIDDLE, expand=True, width=100),
                   Column("manager", title=_("Manager"), searchable=True,
                          ellipsize=ELLIPSIZE_END, expand=True, width=50),
                   Column("timestamp", title=_("Last used"),
                          sorted=True,
                          order=gtk.SORT_DESCENDING,
                          format_func=format_timestamp),
                   ])
        self.connections.add_list(getRecentConnections())
        self.connections.get_treeview().set_search_equal_func(
            self._searchEqual)
        self.connections.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        self.connections.set_property('selection-mode', gtk.SELECTION_SINGLE)
        self.connections.set_size_request(-1, 160)

        self._updateButtons()
Ejemplo n.º 10
0
 def __init__(self, *args):
     GladeWidget.__init__(self, *args)
     self.set_property('can-activate', False)
     self.user_entry.connect('activate',
                             lambda *x: self.passwd_entry.grab_focus())
     self.connect('grab-focus', self.on_grab_focus)
Ejemplo n.º 11
0
 def __init__(self):
     self.host_entry = self.port_entry = self.ssl_check = None
     GladeWidget.__init__(self)
     self.set_property('can-activate', False)
     self.on_entries_changed()
     self.connect('grab-focus', self.on_grab_focus)
Ejemplo n.º 12
0
 def __init__(self, *args):
     GladeWidget.__init__(self, *args)
     self.set_property('can-activate', False)
     self.user_entry.connect('activate',
                             lambda *x: self.passwd_entry.grab_focus())
     self.connect('grab-focus', self.on_grab_focus)
Ejemplo n.º 13
0
 def __init__(self):
     self.host_entry = self.port_entry = self.ssl_check = None
     GladeWidget.__init__(self)
     self.set_property('can-activate', False)
     self.on_entries_changed()
     self.connect('grab-focus', self.on_grab_focus)