• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python application.Application类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中miro.frontends.widgets.application.Application的典型用法代码示例。如果您正苦于以下问题:Python Application类的具体用法?Python Application怎么用?Python Application使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Application类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: build_window

    def build_window(self):
        self._set_default_icon()
        Application.build_window(self)
        self.window.connect('save-dimensions', self.set_main_window_dimensions)
        self.window.connect('save-maximized', self.set_main_window_maximized)

        # handle maximized
        maximized = self.get_main_window_maximized()
        if maximized != None:
            if maximized:
                self.window._window.maximize()
            else:
                self.window._window.unmaximize()

        # handle the trayicon
        self.trayicon = trayicon.Trayicon('miro')
        if app.config.get(options.SHOW_TRAYICON):
            self.trayicon.set_visible(True)
        else:
            self.trayicon.set_visible(False)

        # check x, y to make sure the window is visible and fix it
        # if not
        self.window.check_position_and_fix()

        # handle media keys
        self.mediakeyhandler = mediakeys.get_media_key_handler(self.window)
开发者ID:nxmirrors,项目名称:miro,代码行数:27,代码来源:application.py


示例2: startup_ui

 def startup_ui(self):
     sys.excepthook = self.exception_handler
     Application.startup_ui(self)
     call_on_ui_thread(migrateappname.migrateVideos, 'Democracy', 'Miro')
     call_on_ui_thread(flash.check_flash_install)
     call_on_ui_thread(bonjour.check_bonjour_install)
     timer.add(15, self._init_autoupdate)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:7,代码来源:application.py


示例3: build_window

    def build_window(self):
        icopath = self._get_icon_location()
        Application.build_window(self)
        self.window.connect('save-dimensions', self.set_main_window_dimensions)
        self.window.connect('save-maximized', self.set_main_window_maximized)

        maximized = self.get_main_window_maximized()
        if maximized != None:
            if maximized:
                self.window._window.maximize()
            else:
                self.window._window.unmaximize()

        self.trayicon = trayicon.Trayicon(icopath)
        if app.config.get(options.SHOW_TRAYICON):
            self.trayicon.set_visible(True)
        else:
            self.trayicon.set_visible(False)

        if app.config.get(options.WINDOW_DIMENSIONS) == "":
            # Miro is being started for the first time on this computer
            # so we do some figuring to make sure the default width/height
            # fit on this monitor.
            geom = self.window.get_monitor_geometry()
            width = min(1024, geom.width)
            height = min(600, geom.height)
            self.window.set_frame(width=width, height=height)
        else:
            # check x, y to make sure the window is visible and fix it
            # if not
            self.window.check_position_and_fix()
开发者ID:CodeforEvolution,项目名称:miro,代码行数:31,代码来源:application.py


示例4: do_quit

 def do_quit(self):
     if self.window is not None:
         windowFrame = self.window.nswindow.frame()
         windowFrame.size.height -= 22
         app.config.set(prefs.LEFT_VIEW_SIZE, self.window.splitter.get_left_width())
         app.config.set(prefs.MAIN_WINDOW_FRAME, NSStringFromRect(windowFrame))
         app.config.save()
     Application.do_quit(self)
开发者ID:nxmirrors,项目名称:miro,代码行数:8,代码来源:application.py


示例5: startup_ui

 def startup_ui(self):
     migrateappname.migrateVideos('Democracy', 'Miro')
     osxmenus.populate_menu()
     Application.startup_ui(self)
     app.menu_manager.connect('enabled-changed', osxmenus.on_menu_change)
     app.playback_manager.connect('did-start-playing', osxmenus.on_playback_change)
     app.playback_manager.connect('did-stop', osxmenus.on_playback_change)
     quicktime.register_components()
     quicktime.warm_up()
开发者ID:nxmirrors,项目名称:miro,代码行数:9,代码来源:application.py


示例6: connect_to_signals

 def connect_to_signals(self):
     Application.connect_to_signals(self)
     eventloop.connect('thread-will-start', self.beginLoop)
     eventloop.connect('thread-did-start', self.endLoop)
     eventloop.connect('begin-loop', self.beginLoop)
     eventloop.connect('end-loop', self.endLoop)
     httpclient.register_on_start(
         lambda cm: cm.connect('begin-loop', self.beginLoop))
     httpclient.register_on_start(
         lambda cm: cm.connect('end-loop', self.endLoop))
开发者ID:CodeforEvolution,项目名称:miro,代码行数:10,代码来源:application.py


示例7: build_window

    def build_window(self):
        self._set_default_icon()
        Application.build_window(self)
        self.window.connect('save-dimensions', self.set_main_window_dimensions)
        self.window.connect('save-maximized', self.set_main_window_maximized)

        # handle maximized
        maximized = self.get_main_window_maximized()
        if maximized != None:
            if maximized:
                self.window._window.maximize()
            else:
                self.window._window.unmaximize()

        # handle the trayicon
        if APP_INDICATOR_SUPPORT:
            self.trayicon = miroappindicator.MiroAppIndicator('miro')
        else:
            self.trayicon = trayicon.Trayicon('miro')

        if app.config.get(options.SHOW_TRAYICON):
            self.trayicon.set_visible(True)
        else:
            self.trayicon.set_visible(False)

        if options.override_dimensions:
            # if the user specified override dimensions on the command
            # line, set them here.
            self.window.set_frame(
                width=options.override_dimensions[0],
                height=options.override_dimensions[1])

        elif not get_int("width") and not get_int("height"):
            # if this is the first time Miro has been started, we want
            # to set a default size that makes sense in the context of
            # their monitor resolution.  the check here is against
            # whether there are width/height values in gconf already
            # which isn't true in a first-run situation.
            geom = self.window.get_monitor_geometry()
            width = min(1024, geom.width)
            height = min(600, geom.height)
            self.window.set_frame(width=width, height=height)

        else:
            # the user isn't overriding dimensions and this is not the
            # first time Miro has been launched on this computer, so
            # we double-check that the position works on this monitor
            # and if it puts Miro in a bad place, then fix it.
            self.window.check_position_and_fix()

        # handle media keys
        self.mediakeyhandler = mediakeys.get_media_key_handler(self.window)
开发者ID:theeternalsw0rd,项目名称:miro,代码行数:52,代码来源:application.py


示例8: startup_ui

 def startup_ui(self):
     migrateappname.migrateVideos('Democracy', 'Miro')
     self.menubar = osxmenus.MenuBar()
     Application.startup_ui(self)
     # add the Amazon cookie to Safari
     storage = NSHTTPCookieStorage.sharedHTTPCookieStorage()
     if 'dmusic_download_manager_enabled' not in [
         cookie.name() for cookie in storage.cookiesForURL_(
             NSURL.URLWithString_('http://www.amazon.com'))]:
         storage.setCookie_(NSHTTPCookie.cookieWithProperties_(
                 {NSHTTPCookieName: 'dmusic_download_manager_enabled',
                  NSHTTPCookieValue: '1.0.3',
                  NSHTTPCookieDomain: '.amazon.com',
                  NSHTTPCookiePath: '/',
                  NSHTTPCookieMaximumAge: 3600 * 365 * 10}))
     quicktime.register_components()
     quicktime.warm_up()
     self.emit("event-processed")
开发者ID:CodeforEvolution,项目名称:miro,代码行数:18,代码来源:application.py


示例9: build_window

    def build_window(self):
        icopath = self._set_default_icon()
        Application.build_window(self)
        self.window.connect('save-dimensions', self.set_main_window_dimensions)
        self.window.connect('save-maximized', self.set_main_window_maximized)

        maximized = self.get_main_window_maximized()
        if maximized != None:
            if maximized:
                self.window._window.maximize()
            else:
                self.window._window.unmaximize()

        self.trayicon = trayicon.Trayicon(icopath)
        if app.config.get(options.SHOW_TRAYICON):
            self.trayicon.set_visible(True)
        else:
            self.trayicon.set_visible(False)

        # check x, y to make sure the window is visible and fix it if
        # not
        self.window.check_position_and_fix()
开发者ID:cool-RR,项目名称:Miro,代码行数:22,代码来源:application.py


示例10: startup_ui

 def startup_ui(self):
     sys.excepthook = self.exception_handler
     Application.startup_ui(self)
     call_on_ui_thread(migrateappname.migrateVideos, 'Democracy', 'Miro')
     call_on_ui_thread(flash.check_flash_install)
     call_on_ui_thread(bonjour.check_bonjour_install)
     if app.config.get(prefs.APP_FINAL_RELEASE) == u"0":
         # if this is not a final release, look at the beta
         # channel
         url = app.config.get(prefs.AUTOUPDATE_BETA_URL)
         logging.info("Using beta channel")
     else:
         # if this is a final release, look at the final
         # channel
         url = app.config.get(prefs.AUTOUPDATE_URL)
         logging.info("Using the final channel")
     ctypes.cdll.winsparkle.win_sparkle_set_appcast_url(
                                         url.encode('ascii', 'ignore'))
     ctypes.cdll.winsparkle.win_sparkle_set_app_details(
                             unicode(app.config.get(prefs.PUBLISHER)),
                             unicode(app.config.get(prefs.SHORT_APP_NAME)),
                             unicode(app.config.get(prefs.APP_VERSION)))
     ctypes.cdll.winsparkle.win_sparkle_init()
开发者ID:codito,项目名称:miro,代码行数:23,代码来源:application.py


示例11: handle_first_time

 def handle_first_time(self, callback):
     self._set_default_icon()
     Application.handle_first_time(self, callback)
开发者ID:theeternalsw0rd,项目名称:miro,代码行数:3,代码来源:application.py


示例12: startup_ui

 def startup_ui(self):
     sys.excepthook = self.exception_handler
     Application.startup_ui(self)
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:application.py


示例13: startup_ui

 def startup_ui(self):
     sys.excepthook = self.exception_handler
     Application.startup_ui(self)
     call_on_ui_thread(bonjour.check_bonjour_install)
开发者ID:theeternalsw0rd,项目名称:miro,代码行数:4,代码来源:application.py


示例14: __init__

 def __init__(self):
     Application.__init__(self)
     self.gotQuit = False
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:application.py


示例15: __init__

 def __init__(self):
     Application.__init__(self)
     signals.SignalEmitter.__init__(self, "event-processed")
     self.gotQuit = False
开发者ID:CodeforEvolution,项目名称:miro,代码行数:4,代码来源:application.py


示例16: on_window_show

 def on_window_show(self, window):
     Application.on_window_show(self, window)
     self.app_controller.finish_startup()
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:application.py


示例17: __init__

 def __init__(self):
     Application.__init__(self)
     self.showing_update_dialog = False
开发者ID:CodeforEvolution,项目名称:miro,代码行数:3,代码来源:application.py


示例18: handle_first_time

 def handle_first_time(self, callback):
     Application.handle_first_time(self, callback)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:2,代码来源:application.py


示例19: startup_ui

 def startup_ui(self):
     Application.startup_ui(self)
     call_on_ui_thread(migrateappname.migrateVideos, 'Democracy', 'Miro')
     call_on_ui_thread(flash.check_flash_install)
开发者ID:cool-RR,项目名称:Miro,代码行数:4,代码来源:application.py



注:本文中的miro.frontends.widgets.application.Application类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python base.Widget类代码示例发布时间:2022-05-27
下一篇:
Python fileutil.expand_filename函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap