Example #1
0
    def __init__(self, parent, id):
        """
        This is the BIG function. It initiates EVERYTHING that gets initiated at start, 
        including settings, and all components that must run as long as the app is running.
        It SHOULD initiate GPS, Phone, and anything else that could take a while to start,
        as soon as possible. It also initiates everything that must run constantly.
        """
        wx.Frame.__init__(self, parent, id, '',
                          style=wx.NO_BORDER)  # init the main frame

        # setup the settings
        print "Loaded skin " + self.settings.skin._currentSkinName + " from file " + self.settings.skin._currentSkinFile

        # setup the main frame
        self.SetPosition(
            self.settings.skin.topWindowPos)  # set the main window position
        self.SetSize(
            self.settings.skin.topWindowSize)  # set the main window size
        if self.settings.skin.topWindowCentered == 1:
            # check whether to center the window or not
            self.CenterOnScreen()
        self.SetWindowStyle(wx.NO_BORDER)  # set window style to have no border

        # add and init the toolbar
        self.toolbar = TuxTruck_Toolbar(self, -1)

        # add main audio panel
        self.audioPanel_main = TuxTruck_AudioPanel_Main(self, -1)
        # add home clock panel
        # TODO: figure out how to skin this
        self.homePanel_clock = TuxTruck_HomePanel_Clock(self, -1)
        # commented out for mplayer debugging

        # now SET THE SKINS on EVERYTHING
        self.reSkin("day")