本文整理汇总了Python中jarabe.controlpanel.sectionview.SectionView.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SectionView.__init__方法的具体用法?Python SectionView.__init__怎么用?Python SectionView.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jarabe.controlpanel.sectionview.SectionView
的用法示例。
在下文中一共展示了SectionView.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
self._automatic_pm_valid = True
self._automatic_pm_change_handler = None
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
self._automatic_pm_alert_box = Gtk.HBox(spacing=style.DEFAULT_SPACING)
separator_pm = Gtk.HSeparator()
self.pack_start(separator_pm, False, True, 0)
separator_pm.show()
label_pm = Gtk.Label(label=_('Power management'))
label_pm.set_alignment(0, 0)
self.pack_start(label_pm, False, True, 0)
label_pm.show()
box_pm = Gtk.VBox()
box_pm.set_border_width(style.DEFAULT_SPACING * 2)
box_pm.set_spacing(style.DEFAULT_SPACING)
box_automatic_pm = Gtk.HBox(spacing=style.DEFAULT_SPACING)
label_automatic_pm = Gtk.Label(label=
_('Automatic power management (increases battery life)'))
label_automatic_pm.set_alignment(0, 0.5)
self._automatic_button = Gtk.CheckButton()
self._automatic_button.set_alignment(0, 0)
box_automatic_pm.pack_start(self._automatic_button, False, True, 0)
box_automatic_pm.pack_start(label_automatic_pm, False, True, 0)
self._automatic_button.show()
label_automatic_pm.show()
group.add_widget(label_automatic_pm)
box_pm.pack_start(box_automatic_pm, False, True, 0)
box_automatic_pm.show()
self._automatic_pm_alert = InlineAlert()
label_automatic_pm_error = Gtk.Label()
group.add_widget(label_automatic_pm_error)
self._automatic_pm_alert_box.pack_start(label_automatic_pm_error,
expand=False, fill=True,
padding=0)
label_automatic_pm_error.show()
self._automatic_pm_alert_box.pack_start(self._automatic_pm_alert,
expand=False, fill=True,
padding=0)
box_pm.pack_end(self._automatic_pm_alert_box, False, True, 0)
self._automatic_pm_alert_box.show()
if 'automatic_pm' in self.restart_alerts:
self._automatic_pm_alert.props.msg = self.restart_msg
self._automatic_pm_alert.show()
self.pack_start(box_pm, False, True, 0)
box_pm.show()
self.setup()
示例2: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = UpdateModel()
self._model.connect('progress', self.__progress_cb)
self.set_spacing(style.DEFAULT_SPACING)
self.set_border_width(style.DEFAULT_SPACING * 2)
self._top_label = Gtk.Label()
self._top_label.set_line_wrap(True)
self._top_label.set_justify(Gtk.Justification.LEFT)
self._top_label.props.xalign = 0
self.pack_start(self._top_label, False, True, 0)
self._top_label.show()
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
separator.show()
bottom_label = Gtk.Label()
bottom_label.set_line_wrap(True)
bottom_label.set_justify(Gtk.Justification.LEFT)
bottom_label.props.xalign = 0
bottom_label.set_markup(
_('Software updates correct errors, eliminate security '
'vulnerabilities, and provide new features.'))
self.pack_start(bottom_label, False, True, 0)
bottom_label.show()
self._update_box = None
self._progress_pane = None
self._refresh()
示例3: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
self._zone_sid = 0
self._cursor_change_handler = None
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self.connect('realize', self.__realize_cb)
self._entry = iconentry.IconEntry()
self._entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
'entry-search')
self._entry.add_clear_button()
self.pack_start(self._entry, False, False, 0)
self._entry.show()
self._scrolled_window = Gtk.ScrolledWindow()
self._scrolled_window.set_policy(Gtk.PolicyType.NEVER,
Gtk.PolicyType.AUTOMATIC)
self._scrolled_window.set_shadow_type(Gtk.ShadowType.IN)
self._store = Gtk.ListStore(GObject.TYPE_STRING)
zones = model.read_all_timezones()
for zone in zones:
self._store.append([zone])
self._treeview = Gtk.TreeView(self._store)
self._treeview.set_search_entry(self._entry)
self._treeview.set_search_equal_func(self._search, None)
self._treeview.set_search_column(0)
self._scrolled_window.add(self._treeview)
self._treeview.show()
self._timezone_column = Gtk.TreeViewColumn(_('Timezone'))
self._cell = Gtk.CellRendererText()
self._timezone_column.pack_start(self._cell, True)
self._timezone_column.add_attribute(self._cell, 'text', 0)
self._timezone_column.set_sort_column_id(0)
self._treeview.append_column(self._timezone_column)
self.pack_start(self._scrolled_window, True, True, 0)
self._scrolled_window.show()
self._zone_alert_box = Gtk.HBox(spacing=style.DEFAULT_SPACING)
self.pack_start(self._zone_alert_box, False, False, 0)
self._zone_alert = InlineAlert()
self._zone_alert_box.pack_start(self._zone_alert, True, True, 0)
if 'zone' in self.restart_alerts:
self._zone_alert.props.msg = self.restart_msg
self._zone_alert.show()
self._zone_alert_box.show()
self.setup()
示例4: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts=None):
SectionView.__init__(self)
self.needs_restart = False
# add the initial panel
self.set_canvas(SelectBackupRestorePanel(self))
self.grab_focus()
self.show_all()
self.manager = BackupManager()
示例5: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts=None):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
self._timeout_sid = 0
self.set_border_width(style.DEFAULT_SPACING)
self.set_spacing(style.DEFAULT_SPACING)
self._group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
explanation = _('You will need to provide the following information'
' to set up a mobile broadband connection to a'
' cellular (3G) network.')
self._text = Gtk.Label(label=explanation)
self._text.set_line_wrap(True)
self._text.set_alignment(0, 0)
self.pack_start(self._text, False, False, 0)
self._text.show()
self._username_entry = EntryWithLabel(_('Username:'))
self._username_entry.entry.connect('changed', self.__entry_changed_cb)
self._group.add_widget(self._username_entry.label)
self.pack_start(self._username_entry, False, True, 0)
self._username_entry.show()
self._password_entry = EntryWithLabel(_('Password:'))
self._password_entry.entry.connect('changed', self.__entry_changed_cb)
self._group.add_widget(self._password_entry.label)
self.pack_start(self._password_entry, False, True, 0)
self._password_entry.show()
self._number_entry = EntryWithLabel(_('Number:'))
self._number_entry.entry.connect('changed', self.__entry_changed_cb)
self._group.add_widget(self._number_entry.label)
self.pack_start(self._number_entry, False, True, 0)
self._number_entry.show()
self._apn_entry = EntryWithLabel(_('Access Point Name (APN):'))
self._apn_entry.entry.connect('changed', self.__entry_changed_cb)
self._group.add_widget(self._apn_entry.label)
self.pack_start(self._apn_entry, False, True, 0)
self._apn_entry.show()
self._pin_entry = EntryWithLabel(_('Personal Identity Number (PIN):'))
self._pin_entry.entry.connect('changed', self.__entry_changed_cb)
self._group.add_widget(self._pin_entry.label)
self.pack_start(self._pin_entry, False, True, 0)
self._pin_entry.show()
self.setup()
示例6: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
self._lang_sid = 0
self._selected_lang_count = 0
self._labels = []
self._stores = []
self._comboboxes = []
self._add_remove_boxes = []
self._changed = False
self._cursor_change_handler = None
self._available_locales = self._model.read_all_languages()
self._selected_locales = self._model.get_languages()
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
explanation = gettext.gettext('Add languages in the order you prefer.'
' If a translation is not available,'
' the next in the list will be used.')
self._text = gtk.Label(explanation)
self._text.set_width_chars(100)
self._text.set_line_wrap(True)
self._text.set_alignment(0, 0)
self.pack_start(self._text, False)
self._text.show()
scrolled = gtk.ScrolledWindow()
scrolled.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
scrolled.show()
self.pack_start(scrolled, expand=True)
self._table = gtk.Table(rows=1, columns=3, homogeneous=False)
self._table.set_border_width(style.DEFAULT_SPACING * 2)
self._table.show()
scrolled.add_with_viewport(self._table)
self._lang_alert_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
self.pack_start(self._lang_alert_box, False)
self._lang_alert = InlineAlert()
self._lang_alert_box.pack_start(self._lang_alert)
if 'lang' in self.restart_alerts:
self._lang_alert.props.msg = self.restart_msg
self._lang_alert.show()
self._lang_alert_box.show()
self.setup()
示例7: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
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)
示例8: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
services = get_webaccount_services()
if len(services) == 0:
label = Gtk.Label()
label.set_markup(
'<span size="x-large" weight="bold">' +
glib.markup_escape_text(
_('No web services are installed.\n'
'Please visit %s for more details.' %
'http://wiki.sugarlabs.org/go/WebServices')) +
'</span>')
label.show()
self.add(label)
return
vbox = Gtk.VBox()
hbox = Gtk.HBox(style.DEFAULT_SPACING)
self._service_config_box = Gtk.VBox()
for service in services:
icon = CanvasIcon(icon_name=service.get_icon_name())
icon.connect('button_press_event',
service.config_service_cb,
self._service_config_box)
icon.show()
hbox.pack_start(icon, False, False, 0)
hbox.show()
vbox.pack_start(hbox, False, False, 0)
scrolled = Gtk.ScrolledWindow()
vbox.pack_start(scrolled, True, True, 0)
self.add(vbox)
scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
scrolled.show()
workspace = Gtk.VBox()
scrolled.add_with_viewport(workspace)
workspace.show()
workspace.add(self._service_config_box)
workspace.show_all()
vbox.show()
示例9: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self._corner_delay_sid = 0
self._corner_delay_change_handler = None
self._edge_delay_sid = 0
self._edge_delay_change_handler = None
self._trigger_size_sid = 0
self._trigger_size_change_handler = None
self.restart_alerts = alerts
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self._group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
label = Gtk.Label(label=_("Activation Delay"))
label.set_alignment(0, 0)
self.pack_start(label, False, True, 0)
box = Gtk.VBox()
box.set_border_width(style.DEFAULT_SPACING * 2)
box.set_spacing(style.DEFAULT_SPACING)
box.pack_start(self._setup_corner(), False, True, 0)
box.pack_start(self._setup_edge(), False, True, 0)
self.pack_start(box, False, True, 0)
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
label = Gtk.Label(label=_("Activation Area"))
label.set_alignment(0, 0)
self.pack_start(label, False, True, 0)
box = Gtk.VBox()
box.set_border_width(style.DEFAULT_SPACING * 2)
box.set_spacing(style.DEFAULT_SPACING)
box.pack_start(self._setup_trigger(), False, True, 0)
self.pack_start(box, False, True, 0)
self.show_all()
self.setup()
示例10: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = updater.get_instance()
self._id_progresss = self._model.connect('progress',
self.__progress_cb)
self._id_updates = self._model.connect('updates-available',
self.__updates_available_cb)
self._id_error = self._model.connect('error',
self.__error_cb)
self._id_finished = self._model.connect('finished',
self.__finished_cb)
self.set_spacing(style.DEFAULT_SPACING)
self.set_border_width(style.DEFAULT_SPACING * 2)
self._top_label = Gtk.Label()
self._top_label.set_line_wrap(True)
self._top_label.set_justify(Gtk.Justification.LEFT)
self._top_label.props.xalign = 0
self.pack_start(self._top_label, False, True, 0)
self._top_label.show()
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
separator.show()
self._bottom_label = Gtk.Label()
self._bottom_label.set_line_wrap(True)
self._bottom_label.set_justify(Gtk.Justification.LEFT)
self._bottom_label.props.xalign = 0
self._bottom_label.set_markup(
_('Software updates correct errors, eliminate security '
'vulnerabilities, and provide new features.'))
self.pack_start(self._bottom_label, False, True, 0)
self._bottom_label.show()
self._update_box = None
self._progress_pane = None
state = self._model.get_state()
if state in (updater.STATE_IDLE, updater.STATE_CHECKED):
self._refresh()
elif state in (updater.STATE_CHECKING, updater.STATE_DOWNLOADING,
updater.STATE_UPDATING):
self._switch_to_progress_pane()
self._progress_pane.set_message(_('Update in progress...'))
self.connect('destroy', self.__destroy_cb)
示例11: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self._corner_delay_sid = 0
self._corner_delay_is_valid = True
self._corner_delay_change_handler = None
self._edge_delay_sid = 0
self._edge_delay_is_valid = True
self._edge_delay_change_handler = None
self._trigger_size_sid = 0
self._trigger_size_is_valid = True
self._trigger_size_change_handler = None
self.restart_alerts = alerts
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self._group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
separator.show()
label_activation = Gtk.Label(label=_('Activation Delay'))
label_activation.set_alignment(0, 0)
self.pack_start(label_activation, False, True, 0)
label_activation.show()
self._box_sliders = Gtk.VBox()
self._box_sliders.set_border_width(style.DEFAULT_SPACING * 2)
self._box_sliders.set_spacing(style.DEFAULT_SPACING)
self._corner_delay_slider = None
self._corner_delay_alert = None
self._setup_corner()
self._edge_delay_slider = None
self._edge_delay_alert = None
self._setup_edge()
self._trigger_size_slider = None
self._trigger_size_alert = None
self._setup_trigger()
self.pack_start(self._box_sliders, False, True, 0)
self._box_sliders.show()
self.setup()
示例12: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self.restart_alerts = alerts
self._nick_sid = 0
self._color_valid = True
self._nick_valid = True
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self._group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
self._color_label = Gtk.Grid()
self._color_label.set_row_spacing(style.DEFAULT_SPACING)
self._color_label.set_column_spacing(style.DEFAULT_SPACING)
self._color_box = Gtk.Grid()
self._color_box.set_row_spacing(style.DEFAULT_SPACING)
self._color_box.set_column_spacing(style.DEFAULT_SPACING)
self._color_alert_box = Gtk.Grid()
self._color_alert = None
self._pickers = {
_PREVIOUS_FILL_COLOR: ColorPicker(_PREVIOUS_FILL_COLOR),
_NEXT_FILL_COLOR: ColorPicker(_NEXT_FILL_COLOR),
_CURRENT_COLOR: ColorPicker(_CURRENT_COLOR),
_NEXT_STROKE_COLOR: ColorPicker(_NEXT_STROKE_COLOR),
_PREVIOUS_STROKE_COLOR: ColorPicker(_PREVIOUS_STROKE_COLOR),
}
self._setup_color()
initial_color = XoColor(self._model.get_color_xo())
self._update_pickers(initial_color)
self._nick_box = Gtk.Grid()
self._nick_box.set_row_spacing(style.DEFAULT_SPACING)
self._nick_box.set_column_spacing(style.DEFAULT_SPACING)
self._nick_alert_box = Gtk.Grid()
self._nick_entry = None
self._nick_alert = None
self._setup_nick()
self.setup()
示例13: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self._model = model
self._kmodel = None
self._selected_kmodel = None
self._klayouts = []
self._selected_klayouts = []
self._group_switch_option = None
self._selected_group_switch_option = None
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self._layout_table = Gtk.Table(rows=4, columns=2, homogeneous=False)
_build_ISO_639_dictionary()
self._keyboard_manager = model.KeyboardManager(
GdkX11.x11_get_default_xdisplay())
self._layout_combo_list = []
self._layout_addremovebox_list = []
scrollwindow = Gtk.ScrolledWindow()
scrollwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
self.pack_start(scrollwindow, True, True, 0)
scrollwindow.show()
self._vbox = Gtk.VBox()
scrollwindow.add_with_viewport(self._vbox)
self.__kmodel_sid = None
self.__layout_sid = None
self.__group_switch_sid = None
self._setup_kmodel()
self._setup_layouts()
self._setup_group_switch_option()
self._vbox.show()
示例14: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
self.set_spacing(style.DEFAULT_SPACING)
self.set_border_width(style.DEFAULT_SPACING * 2)
self._top_label = Gtk.Label()
self._top_label.set_line_wrap(True)
self._top_label.set_justify(Gtk.Justification.LEFT)
self._top_label.props.xalign = 0
self._top_label.set_markup('<big>%s</big>' % _('Cleaning...'))
self.pack_start(self._top_label, False, True, 0)
self._top_label.show()
separator = Gtk.HSeparator()
self.pack_start(separator, False, True, 0)
separator.show()
self._bottom_label = Gtk.Label()
self._bottom_label.set_line_wrap(True)
self._bottom_label.set_justify(Gtk.Justification.LEFT)
self._bottom_label.props.xalign = 0
self._bottom_label.set_markup(
_('Software updates correct errors, eliminate security '
'vulnerabilities, and provide new features.'))
self.pack_start(self._bottom_label, False, True, 0)
self._bottom_label.show()
self._update_box = None
self._progress_pane = None
self._set_toolbar_cancellable(False)
self._model = model.SystemUpdaterModel()
self._model.connect('progress', self.__progress_cb)
self._model.connect('progress-detail', self.__detail_cb)
self._model.connect('finished', self.__finished_cb)
self._model.connect('cancellable', self.__cancellable_cb)
self._model.connect('size', self.__size_cb)
GLib.idle_add(self._model.clean)
示例15: __init__
# 需要导入模块: from jarabe.controlpanel.sectionview import SectionView [as 别名]
# 或者: from jarabe.controlpanel.sectionview.SectionView import __init__ [as 别名]
def __init__(self, model, alerts):
SectionView.__init__(self)
logging.debug('GLYCOGEN: init GlycogenLauncher')
self.model = model
self.set_border_width(style.DEFAULT_SPACING * 2)
self.set_spacing(style.DEFAULT_SPACING)
self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
separator = gtk.HSeparator()
self.pack_start(separator, expand=False)
separator.show()
label_activation = gtk.Label('Ready to activate Glycogen?')
label_activation.set_alignment(0, 0)
self.pack_start(label_activation, expand=False)
label_activation.show()
self.box_buttons = gtk.VBox()
self.box_buttons.set_border_width(style.DEFAULT_SPACING * 2)
self.box_buttons.set_spacing(style.DEFAULT_SPACING)
self.button_add_pathway_view = gtk.Button('Add pathway view')
self.button_add_pathway_view.connect('clicked', self._add_pathway_button_cb, None)
self.button_add_pathway_view.show()
# self.button_show_pathway_view = gtk.Button('Show it!')
# self.button_show_pathway_view.connect('clicked', self._show_pathway_button_cb, None)
# self.button_show_pathway_view.set_sensitive(False)
# self.button_show_pathway_view.show()
self.box_buttons.pack_start(self.button_add_pathway_view, expand=False)
# self.box_buttons.pack_start(self.button_show_pathway_view, expand=False)
self.pack_start(self.box_buttons, expand=False)
self.box_buttons.show()