Changeset 84

Show
Ignore:
Timestamp:
04/28/07 15:44:17 (2 years ago)
Author:
cordney
Message:

[fix] downloader: check if freeoszoo is up, else show only kju-app guests
[new] hint for keyboard shortcuts when entering fullscreen mode
[fix] localization: German (several)
[fix] some NSLog's ;)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/changelog.txt

    r83 r84  
     1Q-0.9.0d84 
     2[fix] downloader: check if freeoszoo is up, else show only kju-app guests 
     3[new] hint for keyboard shortcuts when entering fullscreen mode 
     4[fix] localization: German (several) 
     5[fix] some NSLog's ;) 
     6 
    17Q-0.9.0d83 
    28[fix] localization: German (downloader) 
  • trunk/host-cocoa/Resources/English.lproj/Localizable.strings

    r65 r84  
    2525"shutdownPC:otherButton:2" = "Don't save PC"; 
    2626"shutdownPC:informativeTextWithFormat:2" = "The Guest OS is still running. If you don't save the guest PC, you may lose Data."; 
     27 
     28"cocoa_refresh:showFullscreen:standardAlert" = "Entering Fullscreen"; 
     29"cocoa_refresh:showFullscreen:defaultButton" = "OK"; 
     30"cocoa_refresh:showFullscreen:informativeText" = "You are about to enter Fullscreen Mode.\n\nUse ⌘-F to exit Fullscreen Mode. You can toggle a toolbar by hitting ⌘-B and switch between running Guest PCs with ⌘-< and ⌘-> (⌘-Shift-<)."; 
    2731 
    2832/* cocoaQemuController */ 
  • trunk/host-cocoa/Resources/French.lproj/Localizable.strings

    r67 r84  
    2626"shutdownPC:informativeTextWithFormat:2" = "Der Gast PC ist noch aktiv. Wenn Sie ihn jetzt herunterfahren können Sie Daten verlieren."; 
    2727 
     28"cocoa_refresh:showFullscreen:standardAlert" = "Entering Fullscreen"; 
     29"cocoa_refresh:showFullscreen:defaultButton" = "OK"; 
     30"cocoa_refresh:showFullscreen:informativeText" = "You are about to enter Fullscreen Mode.\n\nUse ⌘-F to exit Fullscreen Mode. You can toggle a toolbar by hitting ⌘-B and switch between running Guest PCs with ⌘-< and ⌘-> (⌘-Shift-<)."; 
    2831 
    2932/* cocoaQemuProgressWindow */ 
  • trunk/host-cocoa/Resources/German.lproj/Localizable.strings

    r67 r84  
    1616"changeCdrom:message" = "Wählen sie das Image für das CD-ROM Laufwerk."; 
    1717 
    18 "shutdownPC:text:1" = "Fahre Gast PC herunter"; 
     18"shutdownPC:text:1" = "Gast PC herunterfahren"; 
    1919"shutdownPC:defaultButton:1" = "Abbrechen"; 
    2020"shutdownPC:alternateButton:1" = "Herunterfahren"; 
    2121"shutdownPC:informativeTextWithFormat:1" = "Der Gast PC ist noch aktiv. Wenn Sie ihn jetzt herunterfahren können Sie Daten verlieren."; 
    22 "shutdownPC:text:2" = "F"; 
     22"shutdownPC:text:2" = "Gast PC herunterfahren"; 
    2323"shutdownPC:defaultButton:2" = "Speichern"; 
    2424"shutdownPC:alternateButton:2" = "Abbrechen"; 
     
    2626"shutdownPC:informativeTextWithFormat:2" = "Der Gast PC ist noch aktiv. Wenn Sie ihn jetzt herunterfahren können Sie Daten verlieren."; 
    2727 
     28"cocoa_refresh:showFullscreen:standardAlert" = "Vollbildmodus aktivieren"; 
     29"cocoa_refresh:showFullscreen:defaultButton" = "OK"; 
     30"cocoa_refresh:showFullscreen:informativeText" = "Sie aktivieren jetzt den Vollbildmodus.\n\nUm den Vollbildmodus wieder zu verlassen drücken sie ⌘-F. Mit ⌘-B können sie eine Werkzeugliste einblenden und zwischen gestarteten Gast PCs wechseln sie mit ⌘-< und ⌘-> (⌘-Shift-<)."; 
    2831 
    2932/* cocoaQemuProgressWindow */ 
  • trunk/host-cocoa/Resources/pl.lproj/Localizable.strings

    r67 r84  
    2626"shutdownPC:informativeTextWithFormat:2" = "The Guest OS is still running. If you don't save the guest PC, you may lose Data."; 
    2727 
     28"cocoa_refresh:showFullscreen:standardAlert" = "Entering Fullscreen"; 
     29"cocoa_refresh:showFullscreen:defaultButton" = "OK"; 
     30"cocoa_refresh:showFullscreen:informativeText" = "You are about to enter Fullscreen Mode.\n\nUse ⌘-F to exit Fullscreen Mode. You can toggle a toolbar by hitting ⌘-B and switch between running Guest PCs with ⌘-< and ⌘-> (⌘-Shift-<)."; 
    2831 
    2932/* cocoaQemuProgressWindow */ 
  • trunk/host-cocoa/cocoaQemu.m

    r61 r84  
    233233 
    234234        fullscreen = val; 
     235} 
     236 
     237- (void) showFullscreenAlertSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(id)contextInfo 
     238{ 
     239    // return code of no interest here, we just want to have fullscreen activated 
     240    [sheet orderOut:self]; 
     241    [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
    235242} 
    236243 
     
    11661173                                                                /* toggle fullscreen */ 
    11671174                                                                case 3: /* f key */ 
    1168                                                                         [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
    1169                                                                         if([pc fullscreen]) { 
     1175                                                                    // show hint to exit fullscreen, fast os switch, toolbar 
     1176                                                                        if(![pc fullscreen]) { 
     1177                                                                        #if kju_debug 
    11701178                                                                           NSLog(@"init FSController"); 
     1179                                                                    #endif 
     1180                                                                        NSBeginAlertSheet(NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:standardAlert", @"Localizable", @"cocoaQemu"),NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:defaultButton", @"Localizable", @"cocoaQemu"),nil,nil,[pc pcWindow],pc,@selector(showFullscreenAlertSheetDidEnd:returnCode:contextInfo:),nil,nil,NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:informativeText", @"Localizable", @"cocoaQemu")); 
    11711181                                                                           [pc setFullscreenController:[[FSController alloc] initWithSender:pc]]; 
    11721182                                                                    } else { 
     1183                                                                    #if kju_debug 
    11731184                                                                        NSLog(@"release FSController"); 
     1185                                                                    #endif 
     1186                                                                        [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
    11741187                                                                        [[pc fullscreenController] release]; 
    11751188                                                                    } 
     
    12931306                                                                /* toggle Fullscreen */ 
    12941307                                                                case 0x21: /* 'f' key */ 
    1295                                                                         [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
     1308                                                                    // show hint to exit fullscreen, fast os switch, toolbar 
     1309                                                                    if(![pc fullscreen]) { 
     1310                                                                        NSBeginAlertSheet(NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:standardAlert", @"Localizable", @"cocoaQemu"),NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:defaultButton", @"Localizable", @"cocoaQemu"),nil,nil,[pc pcWindow],pc,@selector(showFullscreenAlertSheetDidEnd:returnCode:contextInfo:),nil,nil,NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:informativeText", @"Localizable", @"cocoaQemu")); 
     1311                                                                    } else { 
     1312                                                                        [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
     1313                                                                    } 
    12961314                                                                        break; 
    12971315                                                        } 
  • trunk/host-cocoa/cocoaQemuWindow.m

    r53 r84  
    472472{ 
    473473//      NSLog(@"cocoaQemuWindow: setFullscreen"); 
    474     [pc setFullscreen:[[pc contentView] toggleFullScreen]]; 
     474    // show hint to exit fullscreen, fast os switch, toolbar 
     475    NSBeginAlertSheet(NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:standardAlert", @"Localizable", @"cocoaQemu"),NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:defaultButton", @"Localizable", @"cocoaQemu"),nil,nil,[pc pcWindow],pc,@selector(showFullscreenAlertSheetDidEnd:returnCode:contextInfo:),nil,nil,NSLocalizedStringFromTable(@"cocoa_refresh:showFullscreen:informativeText", @"Localizable", @"cocoaQemu")); 
    475476} 
    476477 
  • trunk/qcontrol/Resources/German.lproj/Localizable.strings

    r83 r84  
    190190/* cocoaDownloadController */ 
    191191 
    192 "showAllDownloads:statusText" = "Lade Liste vom Server.."; 
     192"showAllDownloads:statusText" = "Lade Liste von Server.."; 
    193193"showAllDownloads:statusText2" = "Liste geladen."; 
    194194"showAllDownloads:AlertSheet:standardAlert" = "Kann PCs von free.oszoo.org nicht anzeigen."; 
  • trunk/qcontrol/Resources/German.lproj/cocoaDownload.strings

    r67 r84  
    66 
    77/* NSTextField (Choose your Free OS:) : <title:Choose your Free OS:> (oid:16) */ 
    8 "Choose your Free OS:" = "Wählen Sie ihr Freies Betriebssystem:"; 
     8"Choose your Free OS:" = "Freies Betriebssystem:"; 
    99 
    1010/* NSButton (Continue) : <title:Continue> (oid:39) */ 
  • trunk/qcontrol/cocoaDownloadController.h

    r56 r84  
    6363- (void) resizeBig; // show detailsTextView 
    6464- (void) showAllDownloads; 
     65- (BOOL) checkFreeOSZooIsUp; 
    6566- (void) prepareOSTypeSelector; 
    6667- (IBAction) showDownloadsByType:(id)sender; 
  • trunk/qcontrol/cocoaDownloadController.m

    r83 r84  
    132132        NSArray * dlList = [self getDownloadListFromServer]; 
    133133         
     134        BOOL serverUp = [self checkFreeOSZooIsUp]; 
     135         
    134136        [statusText setStringValue: NSLocalizedStringFromTable(@"showAllDownloads:statusText2", @"Localizable", @"cocoaDownloadController")]; 
    135137        [statusBar setDoubleValue:0.0]; 
     
    141143        // copy downloadList 
    142144        if(dlList != nil) { 
    143             [downloadList addObjectsFromArray:dlList]; 
     145            // check if freeoszoo is up, else only add the kju-app guests 
     146            if(serverUp) { 
     147                [downloadList addObjectsFromArray:dlList]; 
     148            } else { 
     149            int i; 
     150                for (i=0; i < [dlList count]; i++) { 
     151                    if([[dlList objectAtIndex:i] valueForKey:@"Kju"] == [NSNumber numberWithInt:1]) 
     152                        [downloadList addObject: [dlList objectAtIndex:i]]; 
     153                } 
     154            } 
    144155            [self prepareOSTypeSelector]; 
    145156            [self showWindow]; 
     
    163174     
    164175    [pool release];      
     176} 
     177 
     178- (BOOL) checkFreeOSZooIsUp 
     179{ 
     180    BOOL isUp = NO; 
     181    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString:@"http://oszoo.org"]]; 
     182    [request setHTTPMethod:@"HEAD"]; 
     183    NSHTTPURLResponse *response = nil; 
     184    [NSURLConnection sendSynchronousRequest:request 
     185                              returningResponse:&response 
     186                                          error:NULL]; 
     187    if ((response != nil) && ([response statusCode] == 200)) 
     188        isUp = YES; 
     189    return isUp; 
    165190} 
    166191