def show_ungraceful_exit_popup(self): if get_dev(): return popup = MOPopup('Ungraceful Exit', 'It seems MO closed unexpectedly last time.\n' 'Get the log from /kivy_logs, and send it to us for support.', 'OK') popup.size = [500, 200] popup.open()
def get_disconnected(self, *args): if self.not_again_flag is False: self.ping_event.cancel() popup = MOPopup("Disconnected", "Seems you might be disconnected from IRC :(", "Okay.") popup.create_button("Don't show this again", False, btn_command=self.set_flag()) popup.size = 800 / 2, 600 / 3 popup.pos_hint = {'top': 1} popup.background_color = [0, 0, 0, 0] popup.open()
def create_item(self, name, description, image_link, user): message_len = len(name) + len(description) + len(image_link) + len( user) if message_len > 420: error_popup = MOPopup( "Character limit exceeded", "IRC has a character limit of roughly 500, please make" " sure your item's combined description, name, and image" " link don't exceed it.", "Close") error_popup.size = (900, 200) error_popup.open() return self.inventory.add_item(name, description, image_link, user)