- Timestamp:
- 02/15/08 22:07:14 (2 years ago)
- Location:
- trunk
- Files:
-
- 14 modified
-
English.lproj/MainMenu.nib/info.nib (modified) (1 diff)
-
English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
-
English.lproj/QDocument.nib/info.nib (modified) (1 diff)
-
English.lproj/QDocument.nib/keyedobjects.nib (modified) (previous)
-
English.lproj/QEditVM.nib/info.nib (modified) (1 diff)
-
English.lproj/QEditVM.nib/keyedobjects.nib (modified) (previous)
-
QControl/QControlController.m (modified) (3 diffs)
-
QControl/QControlTableViewController.m (modified) (4 diffs)
-
QDocument/QDocument.m (modified) (1 diff)
-
QDocument/QDocumentEditVMController.h (modified) (3 diffs)
-
QDocument/QDocumentEditVMController.m (modified) (5 diffs)
-
QDocument/QDocumentOpenGLView.m (modified) (4 diffs)
-
QDocument/QDocumentWindowController.m (modified) (2 diffs)
-
changelog.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/English.lproj/MainMenu.nib/info.nib
r120 r121 11 11 <key>IBOpenObjects</key> 12 12 <array> 13 <integer>2 18</integer>13 <integer>224</integer> 14 14 </array> 15 15 <key>IBSystem Version</key> 16 <string>9 B18</string>16 <string>9C31</string> 17 17 <key>targetFramework</key> 18 18 <string>IBCocoaFramework</string> -
trunk/English.lproj/QDocument.nib/info.nib
r112 r121 11 11 <key>IBOpenObjects</key> 12 12 <array> 13 <integer> 6</integer>13 <integer>5</integer> 14 14 </array> 15 15 <key>IBSystem Version</key> 16 <string>9 B18</string>16 <string>9C31</string> 17 17 <key>targetFramework</key> 18 18 <string>IBCocoaFramework</string> -
trunk/English.lproj/QEditVM.nib/info.nib
r116 r121 11 11 <key>IBOpenObjects</key> 12 12 <array> 13 <integer> 12</integer>13 <integer>6</integer> 14 14 </array> 15 15 <key>IBSystem Version</key> 16 <string>9 B18</string>16 <string>9C31</string> 17 17 <key>targetFramework</key> 18 18 <string>IBCocoaFramework</string> -
trunk/QControl/QControlController.m
r120 r121 78 78 79 79 // search for qvms 80 81 80 query = [[NSMetadataQuery alloc] init]; 82 81 [query setDelegate:self]; … … 84 83 predicate = [NSPredicate predicateWithFormat:@"kMDItemDisplayName ENDSWITH 'qvm'", nil]; 85 84 [query setPredicate:predicate]; 86 [query setSearchScopes:[NSArray arrayWithObject: @"/Users/"]];85 [query setSearchScopes:[NSArray arrayWithObject:NSMetadataQueryUserHomeScope]]; 87 86 [query startQuery]; 88 87 89 90 88 // preferences 91 89 if ([[qApplication userDefaults] boolForKey:@"SUCheckAtStartup"]) { … … 180 178 NSMutableDictionary *tempVM = [[QQvmManager sharedQvmManager] loadVMConfiguration:path]; 181 179 if (tempVM) { 182 [knownVMs addObject:path]; 183 [VMs addObject:tempVM]; 184 [table reloadData]; 185 [[qApplication userDefaults] setObject:knownVMs forKey:@"knownVMs"]; 180 if (![knownVMs containsObject:path]) { 181 [knownVMs addObject:path]; 182 [VMs addObject:tempVM]; 183 [table reloadData]; 184 [[qApplication userDefaults] setObject:knownVMs forKey:@"knownVMs"]; 185 } 186 186 } 187 187 } -
trunk/QControl/QControlTableViewController.m
r120 r121 63 63 // set infos for microIcons 64 64 [table setQControl:qControl]; 65 [table setTarget:self]; 66 [table setDoubleAction:@selector(tableDoubleClick:)]; 65 67 66 68 // loading initial Thumbnails … … 85 87 NSString *name; 86 88 NSString *path; 87 NSColor *color;88 89 QDocument *qDocument; 89 NSMutableParagraphStyle *paragraphStyle;90 90 NSMutableAttributedString *attrString; 91 91 … … 135 135 name = [path lastPathComponent]; 136 136 name = [name substringToIndex:[name length] - 4]; 137 paragraphStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];138 139 color = [NSColor colorWithDeviceRed:0.75 green:0.75 blue:0.75 alpha:1.0];140 [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingHead];141 137 142 138 attrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat: @"%@\n", name] attributes:[NSDictionary dictionaryWithObject: [NSFont boldSystemFontOfSize:[NSFont smallSystemFontSize]] forKey:NSFontAttributeName]] autorelease]; 143 139 [attrString appendAttributedString: [[[NSAttributedString alloc] initWithString:[NSString stringWithFormat: @"%@\n", state] attributes:[NSDictionary dictionaryWithObject:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]] forKey:NSFontAttributeName]] autorelease]]; 144 [attrString appendAttributedString: [[[NSAttributedString alloc] initWithString:[NSString stringWithFormat: @"\n%@", [path stringByDeletingLastPathComponent]] attributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, paragraphStyle, NSParagraphStyleAttributeName, color, NSForegroundColorAttributeName, nil]] autorelease]];145 140 146 141 return attrString; … … 156 151 { 157 152 Q_DEBUG(@"toolTipForCell"); 158 159 return [[[qControl VMs] objectAtIndex:rowIndex] objectForKey:@"Arguments"]; 153 NSString *path; 154 155 path = [[[[[qControl VMs] objectAtIndex:rowIndex] objectForKey:@"Temporary"] objectForKey:@"URL"] path]; 156 return [NSString stringWithFormat:@"%@\n\n%@", [[[qControl VMs] objectAtIndex:rowIndex] objectForKey:@"Arguments"], [path stringByDeletingLastPathComponent]]; 160 157 } 161 158 -
trunk/QDocument/QDocument.m
r120 r121 185 185 // Add any code here that needs to be executed once the windowController has loaded the document's window. 186 186 187 // [screenView updateSavedImage:self];188 189 187 // Tiger compatible custom butoonCell 190 188 [buttonEdit setCell:[[[QButtonCell alloc] initImageCell:[[buttonEdit cell] image] buttonType:QButtonCellAlone target:[[buttonEdit cell] target] action:[[buttonEdit cell] action]] autorelease]]; -
trunk/QDocument/QDocumentEditVMController.h
r116 r121 25 25 #import <Cocoa/Cocoa.h> 26 26 27 typedef enum { 28 QDocumentEditVMMachinePc = 0, 29 QDocumentEditVMMachineIsapc = 1, 30 QDocumentEditVMMachineG3bw = 2, 31 QDocumentEditVMMachineMac99 = 3, 32 QDocumentEditVMMachinePrep = 4, 33 QDocumentEditVMMachineRef405ep = 5, 34 QDocumentEditVMMachineTaihu = 6, 35 QDocumentEditVMMachineSS2 = 7, 36 QDocumentEditVMMachineSS5 = 8, 37 QDocumentEditVMMachineSS10 = 9, 38 QDocumentEditVMMachineSS20 = 10, 39 QDocumentEditVMMachineSS600MP = 11, 40 QDocumentEditVMMachineSS1000 = 12, 41 QDocumentEditVMMachineSS2000 = 13, 42 QDocumentEditVMMachineMips = 14, 43 QDocumentEditVMMachineMalta = 15, 44 QDocumentEditVMMachinePica61 = 16, 45 QDocumentEditVMMachineMipssim = 17, 46 QDocumentEditVMMachineArm1 = 18, 47 QDocumentEditVMMachineArm2 = 19, 48 QDocumentEditVMMachineArm3 = 20, 49 QDocumentEditVMMachineArm4 = 21, 50 QDocumentEditVMMachineArm5 = 22, 51 QDocumentEditVMMachineArm6 = 23, 52 QDocumentEditVMMachineArm7 = 24, 53 QDocumentEditVMMachineM68k1 = 25, 54 QDocumentEditVMMachineM68k2 = 26, 55 QDocumentEditVMMachineCris = 27 56 } QDocumentEditVMMachine; 57 27 58 28 59 @interface QDocumentEditVMController : NSObject { … … 31 62 id document; 32 63 NSMutableDictionary *VM; 64 65 // niccount 66 int niccount; 33 67 34 68 // Panel … … 82 116 83 117 - (void) resetPanel:(id)sender; 118 - (void) setMachine:(QDocumentEditVMMachine)machine; 84 119 - (BOOL) setOption:(NSString *)key withArgument:(NSString *)argument; 85 120 - (void) populatePanel:(id)sender; -
trunk/QDocument/QDocumentEditVMController.m
r116 r121 86 86 [M selectItemAtIndex:0]; 87 87 [cpu selectItemAtIndex:0]; 88 [smp setStringValue:@" 0"];88 [smp setStringValue:@"1"]; 89 89 [m setStringValue:@"128"]; // 128 90 90 [vga selectItemAtIndex:0]; … … 115 115 } 116 116 117 - (void) setMachine:(QDocumentEditVMMachine)machine 118 { 119 // here, we show the items available for this machine 120 } 121 117 122 - (BOOL)setOption:(NSString *)key withArgument:(NSString *)argument 118 123 { … … 123 128 [grabless setState:NSOffState]; 124 129 return TRUE; 125 126 // Q Windows driver TODO: add second CD ROM 127 // } else if ([key isEqual:@"-usb"] && [argument isEqual:@"tablet"]) { 128 // [grabless setState:NSOffState]; 129 // return TRUE; 130 130 /* 131 // TODO: see if we can add a second CD ROM with the drivers, else make floppy 132 // Q Windows driver 133 } else if ([key isEqual:@"-usb"] && [argument isEqual:@"tablet"]) { 134 [grabless setState:NSOffState]; 135 return TRUE; 136 */ 131 137 // -smb 132 138 } else if ([key isEqual:@"-smb"]) { … … 138 144 } 139 145 return TRUE; 146 147 // TODO: add other machines 148 // select machine 149 } else if ([key isEqual:@"-M"]) { 150 if ([argument isEqual:@"pc"]) { 151 [M selectItemAtIndex:1]; 152 [self setMachine:QDocumentEditVMMachinePc]; 153 } else if ([argument isEqual:@"isapc"]) { 154 [M selectItemAtIndex:2]; 155 [self setMachine:QDocumentEditVMMachineIsapc]; 156 } 157 return TRUE; 158 159 // TODO: if we have other machines, we must make shure the correct machine is selected 160 // select cpu 161 } else if ([key isEqual:@"-cpu"]) { 162 if ([argument isEqual:@"qemu32"]) { 163 [cpu selectItemAtIndex:0]; 164 } else if ([argument isEqual:@"486"]) { 165 [cpu selectItemAtIndex:1]; 166 } else if ([argument isEqual:@"pentium"]) { 167 [cpu selectItemAtIndex:2]; 168 } else if ([argument isEqual:@"pentium2"]) { 169 [cpu selectItemAtIndex:3]; 170 } else if ([argument isEqual:@"pentium3"]) { 171 [cpu selectItemAtIndex:4]; 172 } 173 return TRUE; 174 175 // smp 176 } else if ([key isEqual:@"-smp"]) { 177 [smp setStringValue:argument]; 178 return TRUE; 140 179 141 } else if ([key isEqual:@"-M"]) { 142 if ([argument isEqual:@""]) { 143 [smb selectItemAtIndex:1]; 144 } else { 145 [smb insertItemWithTitle:[NSString stringWithString:argument] atIndex:2]; 146 [smb selectItemAtIndex:2]; 147 } 148 149 return TRUE; 180 // m 181 } else if ([key isEqual:@"-m"]) { 182 [m setStringValue:argument]; 183 return TRUE; 184 185 // graphicscards 186 } else if ([key isEqual:@"-std-vga"]) { 187 [vga selectItemAtIndex:1]; 188 return true; 189 } else if ([key isEqual:@"-vmwarevga"]) { 190 [vga selectItemAtIndex:2]; 191 return true; 192 193 // soundcards 194 } else if ([key isEqual:@"-soundhw"]) { 195 if ([argument rangeOfString:@"pcspk"].location != NSNotFound) 196 [pcspk setState:NSOnState]; 197 if ([argument rangeOfString:@"adlib"].location != NSNotFound) 198 [adlib setState:NSOnState]; 199 if ([argument rangeOfString:@"sb16"].location != NSNotFound) 200 [sb16 setState:NSOnState]; 201 if ([argument rangeOfString:@"es1370"].location != NSNotFound) 202 [es1370 setState:NSOnState]; 203 return true; 204 205 // networkcards 206 } else if ([key isEqual:@"-nic"]) { 207 // we can only handle the first to nics with the gui 208 niccount++; 209 id nicModel; 210 if (niccount == 1) { 211 nicModel = nicModel1; 212 } else if (niccount == 2) { 213 nicModel = nicModel1; 214 } else { 215 return false; 216 } 217 if ([argument isEqual:@"i82551"]) { 218 [nicModel selectItemAtIndex:1]; 219 } else if ([argument isEqual:@"i82557b"]) { 220 [nicModel selectItemAtIndex:2]; 221 } else if ([argument isEqual:@"i82559er"]) { 222 [nicModel selectItemAtIndex:3]; 223 } else if ([argument isEqual:@"ne2k_pci"]) { 224 [nicModel selectItemAtIndex:4]; 225 } else if ([argument isEqual:@"ne2k_isa"]) { 226 [nicModel selectItemAtIndex:5]; 227 } else if ([argument isEqual:@"rtl8139"]) { 228 [nicModel selectItemAtIndex:6]; 229 } else if ([argument isEqual:@"smc91c111"]) { 230 [nicModel selectItemAtIndex:7]; 231 } else if ([argument isEqual:@"lance"]) { 232 [nicModel selectItemAtIndex:8]; 233 } else if ([argument isEqual:@"mcf_fec"]) { 234 [nicModel selectItemAtIndex:9]; 235 } 236 return TRUE; 237 238 // fda 239 // TODO: 240 241 // cdrom 242 // TODO: 243 244 // hda 245 // TODO: 246 247 // hdb 248 // TODO: 249 250 // hdc 251 // TODO: 252 253 // hdd 254 // TODO: 255 256 // boot 257 } else if ([key isEqual:@"-boot"]) { 258 if ([argument isEqual:@"a"]) { 259 [boot selectItemAtIndex:0]; 260 } else if ([argument isEqual:@"c"]) { 261 [boot selectItemAtIndex:1]; 262 } else if ([argument isEqual:@"d"]) { 263 [boot selectItemAtIndex:2]; 264 } else if ([argument isEqual:@"n"]) { 265 [boot selectItemAtIndex:3]; 266 } 267 return TRUE; 268 269 // localtime 270 } else if ([key isEqual:@"-localtime"]) { 271 [localtime setState:NSOnState]; 272 return true; 273 274 // win2khack 275 } else if ([key isEqual:@"-win2khack"]) { 276 [win2kHack setState:NSOnState]; 277 return true; 278 279 // kernel 280 // TODO: 281 282 // append 283 } else if ([key isEqual:@"-append"]) { 284 [append setStringValue:argument]; 285 return TRUE; 286 287 // initrd 288 // TODO: 150 289 151 290 } … … 160 299 NSMutableString *optionalArguments; 161 300 NSString *key; 301 302 niccount = 0; 162 303 163 304 optionalArguments = [NSMutableString stringWithString:@""]; -
trunk/QDocument/QDocumentOpenGLView.m
r116 r121 662 662 displayProperties.x = ([[NSScreen mainScreen] frame].size.width - displayProperties.width) / 2.0; 663 663 displayProperties.y = ([[NSScreen mainScreen] frame].size.height - displayProperties.height) / 2.0; 664 [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 664 665 } else { 665 666 displayProperties.dx = rect.size.width / (float)screenProperties.width; … … 671 672 } 672 673 673 [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)];674 // [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 674 675 [self display]; // apply the new rect 675 676 [self update]; … … 747 748 [fullScreenWindow close]; 748 749 [[normalWindow contentView] addSubview:self]; 750 [self setContentDimensionsForFrame:NSMakeRect(0.0, 0.0, screenProperties.width * displayProperties.zoom, screenProperties.height * displayProperties.zoom)]; 751 [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 749 752 [normalWindow makeKeyAndOrderFront: self]; 750 753 [NSMenu setMenuBarVisible:YES]; 751 [self setContentDimensionsForFrame:NSMakeRect(0.0, 0.0, screenProperties.width * displayProperties.zoom, screenProperties.height * displayProperties.zoom)];752 754 753 755 } else { … … 816 818 817 819 // keep Window in correct aspect ratio 818 [normalWindow setMaxSize:NSMakeSize( normalWindowSize.width, normalWindowSize.height)];819 [normalWindow setAspectRatio:NSMakeSize(normalWindowSize.width, normalWindowSize.height)];820 820 [normalWindow setMaxSize:NSMakeSize(screenProperties.width, screenProperties.height + TITLE_BAR_HEIGHT + ICON_BAR_HEIGHT)]; 821 // [normalWindow setAspectRatio:NSMakeSize(screenProperties.width, screenProperties.height + TITLE_BAR_HEIGHT + ICON_BAR_HEIGHT)]; 822 // [normalWindow setResizeIncrements:NSMakeSize(10,10)]; 821 823 // update windows 822 824 if (isFullscreen) { -
trunk/QDocument/QDocumentWindowController.m
r113 r121 84 84 return proposedFrameSize; 85 85 } 86 86 /* 87 87 - (void)windowDidResize:(NSNotification *)notification 88 88 { … … 90 90 91 91 if (![screenView isFullscreen]) { 92 // update zoom 93 [screenView displayPropertiesSetZoom:([window frame].size.width / (float)[screenView screenProperties].width)]; 94 92 95 [screenView setContentDimensionsForFrame:NSMakeRect(0, 0, [window frame].size.width, [window frame].size.height - TITLE_BAR_HEIGHT - ICON_BAR_HEIGHT)]; 96 [screenView reshape]; 93 97 } 94 98 } 99 */ 100 95 101 @end -
trunk/changelog.txt
r120 r121 1 121 2 [fix] QControlTableViewController moved VM path to tooltip 3 [fix] QControlTableViewController tableDoubleAction 4 [fix] QControlController searchscope fixed for Filevault 5 [fix] QControlController add dragged vms only once 6 1 7 120 2 8 [fix] QControlController adapted for smartfolder
