public boolean addCategory(DialogCategory category) {
		if(editor.controller.categories.containsKey(category.getID())){
			category.setID(editor.controller.getUniqueCategoryID());
		}
		if(editor.controller.containsCategoryName(category, category.getTitle())){
			String[] buttons = {"Overwrite", "Change", "Cancel"};
			int result = JOptionPane.showOptionDialog(this, category + "\nCategory found with the same namey", "Conflict warning", JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);
			if(result == 0)
				editor.controller.removeCategory(editor.controller.getCategoryFromName(category, category.getTitle()).getID());
			if(result == 1){
	    		while(editor.controller.containsCategoryName(category, category.getTitle()))
	    			category.setTitle(category.getTitle() + "_");
			}
			if(result == 2)
				return false;
		}
		editor.controller.saveCategory(category);		
		return true;
	}