Changeset 121

Show
Ignore:
Timestamp:
02/15/08 22:07:14 (9 months ago)
Author:
mike
Message:

[fix] QControlTableViewController moved VM path to tooltip
[fix] QControlTableViewController tableDoubleAction
[fix] QControlController searchscope fixed for Filevault
[fix] QControlController add dragged vms only once

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/English.lproj/MainMenu.nib/info.nib

    r120 r121  
    1111        <key>IBOpenObjects</key> 
    1212        <array> 
    13                 <integer>218</integer> 
     13                <integer>224</integer> 
    1414        </array> 
    1515        <key>IBSystem Version</key> 
    16         <string>9B18</string> 
     16        <string>9C31</string> 
    1717        <key>targetFramework</key> 
    1818        <string>IBCocoaFramework</string> 
  • trunk/English.lproj/QDocument.nib/info.nib

    r112 r121  
    1111        <key>IBOpenObjects</key> 
    1212        <array> 
    13                 <integer>6</integer> 
     13                <integer>5</integer> 
    1414        </array> 
    1515        <key>IBSystem Version</key> 
    16         <string>9B18</string> 
     16        <string>9C31</string> 
    1717        <key>targetFramework</key> 
    1818        <string>IBCocoaFramework</string> 
  • trunk/English.lproj/QEditVM.nib/info.nib

    r116 r121  
    1111        <key>IBOpenObjects</key> 
    1212        <array> 
    13                 <integer>12</integer> 
     13                <integer>6</integer> 
    1414        </array> 
    1515        <key>IBSystem Version</key> 
    16         <string>9B18</string> 
     16        <string>9C31</string> 
    1717        <key>targetFramework</key> 
    1818        <string>IBCocoaFramework</string> 
  • trunk/QControl/QControlController.m

    r120 r121  
    7878         
    7979        // search for qvms 
    80  
    8180        query = [[NSMetadataQuery alloc] init]; 
    8281        [query setDelegate:self]; 
     
    8483        predicate = [NSPredicate predicateWithFormat:@"kMDItemDisplayName ENDSWITH 'qvm'", nil]; 
    8584    [query setPredicate:predicate]; 
    86     [query setSearchScopes:[NSArray arrayWithObject:@"/Users/"]]; 
     85    [query setSearchScopes:[NSArray arrayWithObject:NSMetadataQueryUserHomeScope]]; 
    8786        [query startQuery]; 
    8887 
    89          
    9088        // preferences 
    9189    if ([[qApplication userDefaults] boolForKey:@"SUCheckAtStartup"]) { 
     
    180178        NSMutableDictionary *tempVM = [[QQvmManager sharedQvmManager] loadVMConfiguration:path]; 
    181179        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                } 
    186186        } 
    187187} 
  • trunk/QControl/QControlTableViewController.m

    r120 r121  
    6363        // set infos for microIcons 
    6464        [table setQControl:qControl]; 
     65        [table setTarget:self]; 
     66        [table setDoubleAction:@selector(tableDoubleClick:)]; 
    6567 
    6668        // loading initial Thumbnails 
     
    8587        NSString *name; 
    8688        NSString *path; 
    87         NSColor *color; 
    8889        QDocument *qDocument; 
    89         NSMutableParagraphStyle *paragraphStyle; 
    9090        NSMutableAttributedString *attrString; 
    9191 
     
    135135                name = [path lastPathComponent]; 
    136136                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]; 
    141137 
    142138        attrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat: @"%@\n", name] attributes:[NSDictionary dictionaryWithObject: [NSFont boldSystemFontOfSize:[NSFont smallSystemFontSize]] forKey:NSFontAttributeName]] autorelease]; 
    143139        [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]]; 
    145140 
    146141        return attrString; 
     
    156151{ 
    157152        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]]; 
    160157} 
    161158 
  • trunk/QDocument/QDocument.m

    r120 r121  
    185185    // Add any code here that needs to be executed once the windowController has loaded the document's window. 
    186186 
    187 //      [screenView updateSavedImage:self]; 
    188  
    189187        // Tiger compatible custom butoonCell 
    190188        [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  
    2525#import <Cocoa/Cocoa.h> 
    2626 
     27typedef 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 
    2758 
    2859@interface QDocumentEditVMController : NSObject { 
     
    3162        id document; 
    3263        NSMutableDictionary *VM; 
     64         
     65        // niccount 
     66        int niccount; 
    3367         
    3468        // Panel 
     
    82116 
    83117- (void) resetPanel:(id)sender; 
     118- (void) setMachine:(QDocumentEditVMMachine)machine; 
    84119- (BOOL) setOption:(NSString *)key withArgument:(NSString *)argument; 
    85120- (void) populatePanel:(id)sender; 
  • trunk/QDocument/QDocumentEditVMController.m

    r116 r121  
    8686        [M selectItemAtIndex:0]; 
    8787        [cpu selectItemAtIndex:0]; 
    88         [smp setStringValue:@"0"]; 
     88        [smp setStringValue:@"1"]; 
    8989        [m setStringValue:@"128"]; // 128 
    9090        [vga selectItemAtIndex:0]; 
     
    115115} 
    116116 
     117- (void) setMachine:(QDocumentEditVMMachine)machine 
     118{ 
     119        // here, we show the items available for this machine 
     120} 
     121 
    117122- (BOOL)setOption:(NSString *)key withArgument:(NSString *)argument 
    118123{ 
     
    123128                [grabless setState:NSOffState]; 
    124129                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*/ 
    131137        // -smb 
    132138        } else if ([key isEqual:@"-smb"]) { 
     
    138144        } 
    139145                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; 
    140179                 
    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: 
    150289 
    151290        } 
     
    160299        NSMutableString *optionalArguments; 
    161300        NSString *key; 
     301         
     302        niccount = 0; 
    162303 
    163304        optionalArguments = [NSMutableString stringWithString:@""]; 
  • trunk/QDocument/QDocumentOpenGLView.m

    r116 r121  
    662662        displayProperties.x = ([[NSScreen mainScreen] frame].size.width - displayProperties.width) / 2.0; 
    663663        displayProperties.y = ([[NSScreen mainScreen] frame].size.height - displayProperties.height) / 2.0; 
     664                [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 
    664665        } else { 
    665666                displayProperties.dx = rect.size.width / (float)screenProperties.width; 
     
    671672        } 
    672673 
    673       [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 
     674//    [self setFrame:NSMakeRect(displayProperties.x, displayProperties.y, displayProperties.width, displayProperties.height)]; 
    674675        [self display]; // apply the new rect 
    675676    [self update]; 
     
    747748        [fullScreenWindow close]; 
    748749        [[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)]; 
    749752        [normalWindow makeKeyAndOrderFront: self]; 
    750753        [NSMenu setMenuBarVisible:YES]; 
    751         [self setContentDimensionsForFrame:NSMakeRect(0.0, 0.0, screenProperties.width * displayProperties.zoom, screenProperties.height * displayProperties.zoom)]; 
    752754 
    753755    } else { 
     
    816818 
    817819    // 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)]; 
    821823    // update windows 
    822824    if (isFullscreen) { 
  • trunk/QDocument/QDocumentWindowController.m

    r113 r121  
    8484    return proposedFrameSize; 
    8585} 
    86  
     86/* 
    8787- (void)windowDidResize:(NSNotification *)notification 
    8888{ 
     
    9090 
    9191        if (![screenView isFullscreen]) { 
     92                // update zoom 
     93                [screenView displayPropertiesSetZoom:([window frame].size.width / (float)[screenView screenProperties].width)]; 
     94         
    9295                [screenView setContentDimensionsForFrame:NSMakeRect(0, 0, [window frame].size.width, [window frame].size.height - TITLE_BAR_HEIGHT - ICON_BAR_HEIGHT)]; 
     96                [screenView reshape]; 
    9397        } 
    9498} 
     99*/ 
     100 
    95101@end 
  • trunk/changelog.txt

    r120 r121  
     1121 
     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 
    17120 
    28[fix] QControlController adapted for smartfolder