def info_button_clicked_cb(self, button): info = "We cannot accurately predict the image contents before they are built so instead a best" info = info + " attempt at estimating what the image will contain is listed." dialog = CrumbsDialog(self, info, gtk.STOCK_DIALOG_INFO) dialog.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_OK) resp = dialog.run() dialog.destroy()
def info_button_clicked_cb(self, button): info = "We cannot accurately predict the image contents before they are built so instead a best" info = info + " attempt at estimating what the image will contain is listed." dialog = CrumbsDialog(self, info, gtk.STOCK_DIALOG_INFO) dialog.add_buttons(gtk.STOCK_CLOSE, gtk.RESPONSE_OK) resp = dialog.run() dialog.destroy()
def quit(self): if self.dirty and len(self.model.contents): question = "Would you like to save your customisations?" dialog = CrumbsDialog(self, question, gtk.STOCK_DIALOG_WARNING) dialog.add_buttons(gtk.STOCK_NO, gtk.RESPONSE_NO, gtk.STOCK_YES, gtk.RESPONSE_YES) resp = dialog.run() dialog.destroy() if resp == gtk.RESPONSE_YES: if not self.save_path: self.get_save_path() if self.save_path: self.save_recipe_file() rep = self.model.get_build_rep() rep.writeRecipe(self.save_path, self.model) gtk.main_quit()
def quit(self): if self.dirty and len(self.model.contents): question = "Would you like to save your customisations?" dialog = CrumbsDialog(self, question, gtk.STOCK_DIALOG_WARNING) dialog.add_buttons(gtk.STOCK_NO, gtk.RESPONSE_NO, gtk.STOCK_YES, gtk.RESPONSE_YES) resp = dialog.run() dialog.destroy() if resp == gtk.RESPONSE_YES: if not self.save_path: self.get_save_path() if self.save_path: self.save_recipe_file() rep = self.model.get_build_rep() rep.writeRecipe(self.save_path, self.model) # Prevent the busy cursor being shown after hob exits if quit is called # whilst the busy cursor is set self.set_busy_cursor(False) self.handler.remove_temp_dir() gtk.main_quit()
def quit(self): if self.dirty and len(self.model.contents): question = "Would you like to save your customisations?" dialog = CrumbsDialog(self, question, gtk.STOCK_DIALOG_WARNING) dialog.add_buttons(gtk.STOCK_NO, gtk.RESPONSE_NO, gtk.STOCK_YES, gtk.RESPONSE_YES) resp = dialog.run() dialog.destroy() if resp == gtk.RESPONSE_YES: if not self.save_path: self.get_save_path() if self.save_path: self.save_recipe_file() rep = self.model.get_build_rep() rep.writeRecipe(self.save_path, self.model) # Prevent the busy cursor being shown after hob exits if quit is called # whilst the busy cursor is set self.set_busy_cursor(False) self.handler.remove_temp_dir() gtk.main_quit()