1 /* 2 * Copyright 2005, Jérôme DUVAL. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include <View.h> 7 #include <stdlib.h> 8 #include <string.h> 9 10 #include "PartitionMenuItem.h" 11 12 PartitionMenuItem::PartitionMenuItem(const char *name, const char *label, const char *menuLabel, 13 BMessage *msg, partition_id id) 14 : BMenuItem(label, msg) 15 { 16 fID = id; 17 fMenuLabel = strdup(menuLabel); 18 fName = strdup(name); 19 } 20 21 22 PartitionMenuItem::~PartitionMenuItem() 23 { 24 free(fMenuLabel); 25 free(fName); 26 } 27