本文整理汇总了Python中sugar3.graphics.alert.Alert.hide方法的典型用法代码示例。如果您正苦于以下问题:Python Alert.hide方法的具体用法?Python Alert.hide怎么用?Python Alert.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sugar3.graphics.alert.Alert
的用法示例。
在下文中一共展示了Alert.hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Network
# 需要导入模块: from sugar3.graphics.alert import Alert [as 别名]
# 或者: from sugar3.graphics.alert.Alert import hide [as 别名]
#.........这里部分代码省略.........
social_help_box.pack_start(self._social_help_entry, False, True, 0)
self._social_help_entry.show()
box_mesh.pack_start(social_help_box, False, True, 0)
social_help_box.show()
workspace.pack_start(box_mesh, False, True, 0)
box_mesh.show()
separator_proxy = Gtk.HSeparator()
workspace.pack_start(separator_proxy, False, False, 0)
separator_proxy.show()
self._add_proxy_section(workspace)
self.setup()
def _add_proxy_section(self, workspace):
label_proxy = Gtk.Label(_('Proxy'))
label_proxy.set_alignment(0, 0)
workspace.pack_start(label_proxy, False, True, 0)
label_proxy.show()
box_proxy = Gtk.VBox()
box_proxy.set_border_width(style.DEFAULT_SPACING * 2)
box_proxy.set_spacing(style.DEFAULT_SPACING)
workspace.pack_start(box_proxy, False, True, 0)
box_proxy.show()
self._proxy_alert = Alert()
self._proxy_alert.props.title = _('Error')
self._proxy_alert.props.msg = _('Proxy settings cannot be verified')
box_proxy.pack_start(self._proxy_alert, False, False, 0)
self._proxy_alert.connect('response', self._response_cb)
self._proxy_alert.hide()
# GSettings schemas for proxy:
schemas = ['org.sugarlabs.system.proxy',
'org.sugarlabs.system.proxy.http',
'org.sugarlabs.system.proxy.https',
'org.sugarlabs.system.proxy.ftp',
'org.sugarlabs.system.proxy.socks']
for schema in schemas:
proxy_setting = Gio.Settings.new(schema)
# We are not going to apply the settings immediatly.
# We'll apply them if the user presses the "accept"
# button, or we'll revert them if the user presses the
# "cancel" button.
proxy_setting.delay()
alert = InlineAlert()
self._proxy_settings[schema] = proxy_setting
self._proxy_inline_alerts[schema] = alert
size_group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
automatic_proxy_box = Gtk.VBox(spacing=style.DEFAULT_SPACING)
manual_proxy_box = Gtk.VBox(spacing=style.DEFAULT_SPACING)
option_sets = [('None', 'none', Gtk.VBox()),
('Use system proxy', 'system', Gtk.VBox()),
('Manual', 'manual', manual_proxy_box),
('Automatic', 'auto', automatic_proxy_box)]
box_mode = ComboSettingBox(