當前位置: 首頁>>代碼示例>>Python>>正文


Python Application.raise_to_top方法代碼示例

本文整理匯總了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):
開發者ID:kissthink,項目名稱:deepin-store,代碼行數:69,代碼來源:software_center.py


注:本文中的dtk.ui.application.Application.raise_to_top方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。