本文整理汇总了Python中dtk.ui.application.Application.raise_to_top方法的典型用法代码示例。如果您正苦于以下问题:Python Application.raise_to_top方法的具体用法?Python Application.raise_to_top怎么用?Python Application.raise_to_top使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dtk.ui.application.Application
的用法示例。
在下文中一共展示了Application.raise_to_top方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DeepinSoftwareCenter
# 需要导入模块: from dtk.ui.application import Application [as 别名]
# 或者: from dtk.ui.application.Application import raise_to_top [as 别名]
#.........这里部分代码省略.........
self.show_wizard_win(True, callback=self.wizard_callback)
self.init_ui()
else:
self.init_ui()
if not self.init_hide:
self.application.window.show_all()
#self.paned_box.bottom_window.set_composited(True)
def show_wizard_win(self, show_button=False, callback=None):
program_dir = get_parent_dir(__file__, 2)
wizard_dir = os.path.join(program_dir, 'wizard', LANGUAGE)
if not os.path.exists(wizard_dir):
wizard_dir = os.path.join(program_dir, 'wizard', 'en_US')
wizard_root_dir = os.path.dirname(wizard_dir)
self.wizard = Wizard(
[os.path.join(wizard_dir, "%d.png" % i) for i in range(3)],
(os.path.join(wizard_root_dir, "dot_normal.png"),
os.path.join(wizard_root_dir, "dot_active.png"),
),
(os.path.join(wizard_dir, "start_normal.png"),
os.path.join(wizard_dir, "start_press.png"),
),
show_button,
callback
)
self.wizard.set_icon(utils.get_common_image_pixbuf("logo48.png"))
if not self.init_hide:
self.wizard.show_all()
def wizard_callback(self):
self.in_wizard_showing = False
self.application.window.show_all()
gtk.timeout_add(200, self.application.raise_to_top)
def init_home_page(self, recommend_status="publish"):
# Init DBus.
self.system_bus = dbus.SystemBus()
bus_object = self.system_bus.get_object(DSC_SERVICE_NAME, DSC_SERVICE_PATH)
self.bus_interface = dbus.Interface(bus_object, DSC_SERVICE_NAME)
# Say hello to backend.
#self.bus_interface.say_hello(self.simulate)
self.set_software_download_dir()
self.inhibit_obj = InhibitObject()
self.loginfo("Init data manager")
# Init data manager.
self.data_manager = DataManager(self.bus_interface, debug_flag)
# Init packages status
self.packages_status = {}
# Init home page.
self.home_page = HomePage(self.data_manager, recommend_status)
# Init switch page.
self.switch_page(self.home_page)
self.in_update_list = False
self.init_backend()
def init_backend(self):