Example #1
0
class MDataSyncApp(wx.PySimpleApp):
    def __init__(self, config=None, *args, **kwargs):
        self.config = config or MSDSConfig.load()
        super(MDataSyncApp, self).__init__(*args, **kwargs)

    def OnInit(self):
        #w = wx.LogChain(wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogGui() )

        win = MainWindow(self.config, None)
        self.win = win
        self.msds = MSDataSyncAPI(self.config, win.getLog())

        #let the jobs execute in threads
        #disable this for debugging
        self.msds.startThread()

        win.MSDSCheckFn = self.msds.checkRsync
        win.MSDSHandshakeFn = self.msds.handshakeRsync
        win.msds = self.msds
        win.resetTimeTillNextSync()
        #wx.Log_SetActiveTarget( wx.LogWindow(None, 'loggin...') )
        win.Show(True)
        self.SetTopWindow(win)
        return True
Example #2
0
class MDataSyncApp(wx.PySimpleApp):
    def __init__(self, config=None, *args, **kwargs):
        self.config = config or MSDSConfig.load()
        super(MDataSyncApp, self).__init__(*args, **kwargs)

    def OnInit(self):
        #w = wx.LogChain(wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogGui() )

        win = MainWindow(self.config, None)
        self.win = win
        self.msds = MSDataSyncAPI(self.config, win.getLog())

        #let the jobs execute in threads
        #disable this for debugging
        self.msds.startThread()

        win.MSDSCheckFn = self.msds.checkRsync
        win.MSDSHandshakeFn = self.msds.handshakeRsync
        win.msds = self.msds
        win.resetTimeTillNextSync()
        #wx.Log_SetActiveTarget( wx.LogWindow(None, 'loggin...') )
        win.Show(True)
        self.SetTopWindow(win)
        return True
Example #3
0
    def OnInit(self):
        #w = wx.LogChain(wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogGui() )

        win = MainWindow(self.config, None)
        self.win = win
        self.msds = MSDataSyncAPI(self.config, win.getLog())

        #let the jobs execute in threads
        #disable this for debugging
        self.msds.startThread()

        win.MSDSCheckFn = self.msds.checkRsync
        win.MSDSHandshakeFn = self.msds.handshakeRsync
        win.msds = self.msds
        win.resetTimeTillNextSync()
        #wx.Log_SetActiveTarget( wx.LogWindow(None, 'loggin...') )
        win.Show(True)
        self.SetTopWindow(win)
        return True
Example #4
0
    def OnInit(self):
        #w = wx.LogChain(wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogStderr() )
        #wx.Log_SetActiveTarget( wx.LogGui() )

        win = MainWindow(self.config, None)
        self.win = win
        self.msds = MSDataSyncAPI(self.config, win.getLog())

        #let the jobs execute in threads
        #disable this for debugging
        self.msds.startThread()

        win.MSDSCheckFn = self.msds.checkRsync
        win.MSDSHandshakeFn = self.msds.handshakeRsync
        win.msds = self.msds
        win.resetTimeTillNextSync()
        #wx.Log_SetActiveTarget( wx.LogWindow(None, 'loggin...') )
        win.Show(True)
        self.SetTopWindow(win)
        return True