Ejemplo n.º 1
0
    def run(self):
        from zoundry.blogapp.startup import RavenApplicationStartup
        from zoundry.blogapp.ui.appwindow import ZRavenApplicationWindow
        from zoundry.blogapp.ui.splash import ZStartupWindow

        client = ZRavenRPCClient()

        # First, check for blogThis
        blogThisInfo = checkCmdLineForBlogThis()
        if blogThisInfo is not None:
            client.blogThis(blogThisInfo)

        # Only allow one instance of the application to be running.
        if client.getVersion() is not None:
            client.bringToFront()
            return

        # Create the user profile (return if none is found/chosen)
        userProfile = self._createUserProfile()
        if not userProfile:
            return
        self.applicationModel.setUserProfile(userProfile)

        # set http proxy settings based on userprofile config
        self._initProxyConfiguration()

        # Startup the Engine (load plugins, etc...)
        splashApp = wx.PySimpleApp()
        try:
            splashWindow = ZStartupWindow()
            appStartup = RavenApplicationStartup(self.applicationModel,
                                                 splashWindow)
            appStartup.start()
            splashApp.MainLoop()

            if appStartup.hasStartupErrors():
                raise ZBlogAppException(
                    _extstr(u"raven.StartupErrorsFoundMsg"))  #$NON-NLS-1$
        except Exception, e:
            ZShowExceptionMessage(None, e)
Ejemplo n.º 2
0
    def run(self):
        from zoundry.blogapp.startup import RavenApplicationStartup
        from zoundry.blogapp.ui.appwindow import ZRavenApplicationWindow
        from zoundry.blogapp.ui.splash import ZStartupWindow

        client = ZRavenRPCClient()

        # First, check for blogThis
        blogThisInfo = checkCmdLineForBlogThis()
        if blogThisInfo is not None:
            client.blogThis(blogThisInfo)

        # Only allow one instance of the application to be running.
        if client.getVersion() is not None:
            client.bringToFront()
            return

        # Create the user profile (return if none is found/chosen)
        userProfile = self._createUserProfile()
        if not userProfile:
            return
        self.applicationModel.setUserProfile(userProfile)
        
        # set http proxy settings based on userprofile config
        self._initProxyConfiguration()

        # Startup the Engine (load plugins, etc...)
        splashApp = wx.PySimpleApp()
        try:
            splashWindow = ZStartupWindow()
            appStartup = RavenApplicationStartup(self.applicationModel, splashWindow)
            appStartup.start()
            splashApp.MainLoop()

            if appStartup.hasStartupErrors():
                raise ZBlogAppException(_extstr(u"raven.StartupErrorsFoundMsg")) #$NON-NLS-1$
        except Exception, e:
            ZShowExceptionMessage(None, e)
Ejemplo n.º 3
0
 def _doCmdLineBlogThis(self):
     blogThisInfo = checkCmdLineForBlogThis()
     if blogThisInfo is not None:
         self.onBlogThis(blogThisInfo)
Ejemplo n.º 4
0
 def _doCmdLineBlogThis(self):
     blogThisInfo = checkCmdLineForBlogThis()
     if blogThisInfo is not None:
         self.onBlogThis(blogThisInfo)