Exemplo n.º 1
0
    def onClick(self, sender):
        if (sender == self.signOutLink):
            Window.alert("If this were implemented, you would be signed out now.")
        elif (sender == self.aboutLink):
            # When the 'About' item is selected, show the AboutDialog.
            # Note that showing a dialog box does not block -- execution continues
            # normally, and the dialog fires an event when it is closed.
            dlg = AboutDialog()

            # Position it roughly in the middle of the screen.
            left = (Window.getClientWidth() - 512) / 2
            top = (Window.getClientHeight() - 256) / 2
            #Logger("TopPanel", "left: " + left)
            #Logger("TopPanel", "top: " + top)
            dlg.setPopupPosition(left, top)

            dlg.show()
Exemplo n.º 2
0
    def onClick(self, sender):
        if (sender == self.signOutLink):
            Window.alert(
                "If this were implemented, you would be signed out now.")
        elif (sender == self.aboutLink):
            # When the 'About' item is selected, show the AboutDialog.
            # Note that showing a dialog box does not block -- execution continues
            # normally, and the dialog fires an event when it is closed.
            dlg = AboutDialog()

            # Position it roughly in the middle of the screen.
            left = (Window.getClientWidth() - 512) / 2
            top = (Window.getClientHeight() - 256) / 2
            Logger("TopPanel", "left: %d" % left)
            Logger("TopPanel", "top: %d" % top)
            dlg.setPopupPosition(left, top)

            dlg.show()