def __init__(self): Gtk.Window.__init__(self, title="GMusic") self.set_default_size(800, 400) self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.setup_uimanager() self.setup_menu() self.add(self.box) User.check_login()
def check_login(self, widget): if User.login(self.email_input.get_text(), self.password_input.get_text()): self.close() self.main_window.activate() else: self.error_label.set_text("Error logging in")