本文整理汇总了Python中gi.repository.Gtk.Statusbar方法的典型用法代码示例。如果您正苦于以下问题:Python Gtk.Statusbar方法的具体用法?Python Gtk.Statusbar怎么用?Python Gtk.Statusbar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.Gtk
的用法示例。
在下文中一共展示了Gtk.Statusbar方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import Statusbar [as 别名]
def __init__(self, core, tviews):
super(Statusbar,self).__init__()
self.uicore = core
self.tviews = tviews
self.icons = {
'Arch':datafile_path('processor_small.png'),
'Name':Gtk.STOCK_FILE,
'Format':Gtk.STOCK_EXECUTE,
'Size':Gtk.STOCK_PREFERENCES,
'OS':Gtk.STOCK_INFO,
'Type':Gtk.STOCK_INFO,
'va':Gtk.STOCK_UNINDENT,
'ep': Gtk.STOCK_INDENT,
}
示例2: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import Statusbar [as 别名]
def __init__(self, *args, **kwargs):
StatusbarBase.__init__(self, *args, **kwargs)
Gtk.Statusbar.__init__(self)
self._context = self.get_context_id('message')
示例3: __create_window
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import Statusbar [as 别名]
def __create_window(self):
box = Gtk.VBox(spacing=8)
self.add(box)
# Pasek postępu
self.progress_bar = Gtk.ProgressBar()
self.progress_bar.set_show_text(True)
box.pack_start(self.progress_bar, True, True, 0)
# Pasek statusu
self.status_bar = Gtk.Statusbar()
self.status_context = self.status_bar.get_context_id("Status")
box.pack_start(self.status_bar, True, True, 0)
示例4: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import Statusbar [as 别名]
def __init__(self, app):
super(MainWindow, self).__init__(application=app, title='RunSQLRun')
self.app = app
self._internal_state = {}
self.set_default_size(800, 600)
self.set_icon(Pixbuf.new_from_resource(
'/org/runsqlrun/icons/runsqlrun.svg'))
self.headerbar = HeaderBar(self)
self.set_titlebar(self.headerbar)
self.docview = DocViewer(self)
self.statusbar = Gtk.Statusbar()
self.statusbar.set_margin_top(0)
self.statusbar.set_margin_bottom(0)
self.statusbar.push(303, 'Ready when you are')
GObject.timeout_add(3000, self.statusbar.pop, 303)
self.statusbar.set_spacing(6)
self.statusbar.pack_end(ConnectionIndicator(self), False, False, 0)
vbox = Gtk.VBox()
vbox.pack_start(self.docview, True, True, 0)
vbox.pack_start(self.statusbar, False, False, 0)
self.add(vbox)
# TODO: Statusbar
# track window settings
self.connect('window-state-event', self.on_window_state_event)
self.connect('configure-event', self.on_configure_event)
# Actions
self._setup_actions()
self.show_all()
示例5: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import Statusbar [as 别名]
def __init__(self, parent, application):
"""
:param parent: The parent window for this object.
:type parent: :py:class:`Gtk.Window`
:param application: The main client application instance.
:type application: :py:class:`Gtk.Application`
"""
super(MailSenderTab, self).__init__()
self.parent = parent
self.application = application
self.config = application.config
self.box = Gtk.Box()
self.box.set_property('orientation', Gtk.Orientation.VERTICAL)
self.box.show()
self.label = Gtk.Label(label='Send Messages')
"""The :py:class:`Gtk.Label` representing this tabs name."""
self.notebook = Gtk.Notebook()
""" The :py:class:`Gtk.Notebook` for holding sub-tabs."""
self.notebook.connect('switch-page', self.signal_notebook_switch_page)
self.notebook.set_scrollable(True)
self.box.pack_start(self.notebook, True, True, 0)
self.status_bar = Gtk.Statusbar()
self.status_bar.show()
self.box.pack_end(self.status_bar, False, False, 0)
self.tabs = utilities.FreezableDict()
"""A dict object holding the sub tabs managed by this object."""
current_page = self.notebook.get_current_page()
self.last_page_id = current_page
config_tab = MailSenderConfigurationTab(self.application)
self.tabs['config'] = config_tab
self.notebook.append_page(config_tab.box, config_tab.label)
edit_tab = MailSenderEditTab(self.application)
self.tabs['edit'] = edit_tab
self.notebook.append_page(edit_tab.box, edit_tab.label)
preview_tab = MailSenderPreviewTab(self.application)
self.tabs['preview'] = preview_tab
self.notebook.append_page(preview_tab.box, preview_tab.label)
send_messages_tab = MailSenderSendTab(self.application)
self.tabs['send_messages'] = send_messages_tab
self.notebook.append_page(send_messages_tab.box, send_messages_tab.label)
self.tabs.freeze()
for tab in self.tabs.values():
tab.box.show()
self.notebook.show()
self.application.connect('campaign-set', self.signal_kpc_campaign_set)