bc3b375f |
#! /usr/bin/python2
#
# Copyright (C) 2015 vmware inc.
#
# Author: Mahmoud Bassiouny <mbassiouny@vmware.com>
from window import Window
from actionresult import ActionResult
from textpane import TextPane
class License(object):
def __init__(self, maxy, maxx):
self.maxx = maxx
self.maxy = maxy
self.win_width = maxx - 4
self.win_height = maxy - 4
self.win_starty = (self.maxy - self.win_height) / 2
self.win_startx = (self.maxx - self.win_width) / 2
self.text_starty = self.win_starty + 4
self.text_height = self.win_height - 6
self.text_width = self.win_width - 6
self.window = Window(self.win_height, self.win_width, self.maxy, self.maxx, 'Welcome to the Photon installer', False)
def display(self, params):
accept_decline_items = [
('<Accept>', self.accept_function),
('<Cancel>', self.exit_function)
]
|
779776af |
self.text_pane = TextPane(self.text_starty, self.maxx, self.text_width, "EULA.txt", self.text_height, accept_decline_items) |