'Defines what happens when the window gets the signal to maximize'

def on_maximize_toggle(self, action, value):

    action.set_state(value)
    if value.get_boolean():
        self.maximize()
    else:
        self.unmaximize()
