コード例 #1
0
    def __init__(self, modelwrapper, alerts):
        SectionView.__init__(self)
        get_control_panel()._section_toolbar.cancel_button.hide()

        bundleregistry.get_registry().disable_directory_monitoring()

        self._in_sugar = (modelwrapper is not None)
        self.set_spacing(style.DEFAULT_SPACING)
        self.set_border_width(style.DEFAULT_SPACING * 2)

        # top labels.
        self.top_label = Gtk.Label()
        self.top_label.set_line_wrap(True)
        self.top_label.set_justify(Gtk.Justification.LEFT)
        self.top_label.set_property('xalign', 0)
        self.top_label.set_markup('<big>%s</big>' %
                                  _('Checking for updates...'))
        bottom_label = Gtk.Label()
        bottom_label.set_line_wrap(True)  # doesn't really work right =(
        bottom_label.set_justify(Gtk.Justification.LEFT)
        bottom_label.set_property('xalign', 0)
        bottom_label.set_markup(
            _('Software updates correct errors, eliminate security vulnerabilities, and provide new features.'
              ))
        vbox2 = Gtk.VBox()
        vbox2.pack_start(self.top_label, False, True, 0)
        vbox2.pack_start(Gtk.HSeparator(), False, False, 0)
        vbox2.pack_start(bottom_label, True, True, 0)
        self.pack_start(vbox2, False, True, 0)

        # activity/group pane ####
        self.activity_list = model.UpdateList()
        self.activity_pane = ActivityPane(self)
        self.pack_start(self.activity_pane, True, True, 0)

        # progress pane ###########
        self.progress_pane = ProgressPane(self)
        self.pack_start(self.progress_pane, True, False, 0)

        # special little extension to progress pane.
        self.expander = Gtk.Expander(label=_('Modify activity groups'))

        def expander_cb(expander, param_):
            if expander.get_expanded():
                self.activity_pane.switch()
                self.activity_pane.expander.set_expanded(True)
                expander.set_expanded(False)

        self.expander.connect("notify::expanded", expander_cb)
        self.pack_end(self.expander, False, True, 0)

        # show our work!
        self.show_all()
        # and start refreshing.
        self.refresh_cb(None, None)
コード例 #2
0
    def __init__(self, modelwrapper, alerts):
        SectionView.__init__(self)
        get_control_panel()._section_toolbar.cancel_button.hide()

        bundleregistry.get_registry().disable_directory_monitoring()

        self._in_sugar = (modelwrapper is not None)
        self.set_spacing(style.DEFAULT_SPACING)
        self.set_border_width(style.DEFAULT_SPACING * 2)

        # top labels.
        self.top_label = Gtk.Label()
        self.top_label.set_line_wrap(True)
        self.top_label.set_justify(Gtk.Justification.LEFT)
        self.top_label.set_property('xalign',0)
        self.top_label.set_markup('<big>%s</big>'%_('Checking for updates...'))
        bottom_label = Gtk.Label()
        bottom_label.set_line_wrap(True) # doesn't really work right =(
        bottom_label.set_justify(Gtk.Justification.LEFT)
        bottom_label.set_property('xalign', 0)
        bottom_label.set_markup(_('Software updates correct errors, eliminate security vulnerabilities, and provide new features.'))
        vbox2 = Gtk.VBox()
        vbox2.pack_start(self.top_label, False, True, 0)
        vbox2.pack_start(Gtk.HSeparator(), False, False, 0)
        vbox2.pack_start(bottom_label, True, True, 0)
        self.pack_start(vbox2, False, True, 0)

        # activity/group pane ####
        self.activity_list = model.UpdateList()
        self.activity_pane = ActivityPane(self)
        self.pack_start(self.activity_pane, True, True, 0)

        # progress pane ###########
        self.progress_pane = ProgressPane(self)
        self.pack_start(self.progress_pane, True, False, 0)

        # special little extension to progress pane.
        self.expander = Gtk.Expander(label=_('Modify activity groups'))
        def expander_cb(expander, param_):
            if expander.get_expanded():
                self.activity_pane.switch()
                self.activity_pane.expander.set_expanded(True)
                expander.set_expanded(False)
        self.expander.connect("notify::expanded", expander_cb)
        self.pack_end(self.expander, False, True, 0)

        # show our work!
        self.show_all()
        # and start refreshing.
        self.refresh_cb(None, None)
コード例 #3
0
 def perform_accept_actions(self):
     bundleregistry.get_registry().enable_directory_monitoring()
     get_control_panel()._section_toolbar.cancel_button.show()
コード例 #4
0
 def perform_accept_actions(self):
     bundleregistry.get_registry().enable_directory_monitoring()
     get_control_panel()._section_toolbar.cancel_button.show()
コード例 #5
0
 def cancel_cb(self, widget, event, data=None):
     """Callback when the cancel button is clicked.
     Do the same thing that you would have done had you exited the
     section-view"""
     get_control_panel()._section_toolbar.accept_button.emit('clicked')
コード例 #6
0
 def cancel_cb(self, widget, event, data=None):
     """Callback when the cancel button is clicked.
     Do the same thing that you would have done had you exited the
     section-view"""
     get_control_panel()._section_toolbar.accept_button.emit('clicked')