本文整理匯總了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):