Skip to content

Commit

Permalink
* An attempt to fix the closing window confirmation panel.
Browse files Browse the repository at this point in the history
git-svn-id: https://iterm.svn.sourceforge.net/svnroot/iterm/trunk@1484 a86d2aa4-6e2d-4ff4-9c10-3c044852e7c9
  • Loading branch information
yfabian committed Dec 7, 2006
1 parent afa9e3a commit 95a8f5b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
4 changes: 4 additions & 0 deletions Changelog
@@ -1,3 +1,7 @@
2006-12-6 fabian

* An attempt to fix the closing window confirmation panel.

2006-12-5 fabian

* Added support for xterm's 256-color mode
Expand Down
1 change: 1 addition & 0 deletions English.lproj/iTerm.strings
Expand Up @@ -23,6 +23,7 @@

/* Close window */
"Close Window?" = "Close Window?";
"Quit iTerm?" = "Quit iTerm?";

/* Close Session */
"This session will be closed."="This session will be closed.";
Expand Down
6 changes: 3 additions & 3 deletions PreferencePanel.m
@@ -1,4 +1,4 @@
// $Id: PreferencePanel.m,v 1.147 2006-12-05 02:59:52 yfabian Exp $
// $Id: PreferencePanel.m,v 1.148 2006-12-07 06:19:33 yfabian Exp $
/*
** PreferencePanel.m
**
Expand Down Expand Up @@ -530,14 +530,14 @@ - (IBAction)connectURL:(id)sender
NSLocalizedStringFromTableInBundle(@"There is no handler currently.",@"iTerm", [NSBundle bundleForClass: [self class]], @"URL Handler"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil);
,nil) == NSAlertDefaultReturn;
}
else if (![[[NSFileManager defaultManager] displayNameAtPath:[appURL path]] isEqualToString:@"iTerm"]) {
set = NSRunAlertPanel([NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"iTerm is not the default handler for %@. Would you like to set iTerm as the default handler?", @"iTerm", [NSBundle bundleForClass: [self class]], @"URL Handler"), [urlTypes objectAtIndex: i]],
[NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"The current handler is: %@" ,@"iTerm", [NSBundle bundleForClass: [self class]], @"URL Handler"), [[NSFileManager defaultManager] displayNameAtPath:[appURL path]]],
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil);
,nil) == NSAlertDefaultReturn;
}

if (set) {
Expand Down
16 changes: 8 additions & 8 deletions PseudoTerminal.m
@@ -1,5 +1,5 @@
// -*- mode:objc -*-
// $Id: PseudoTerminal.m,v 1.377 2006-12-06 01:58:30 yfabian Exp $
// $Id: PseudoTerminal.m,v 1.378 2006-12-07 06:19:33 yfabian Exp $
//
/*
** PseudoTerminal.m
Expand Down Expand Up @@ -560,7 +560,7 @@ - (IBAction) closeCurrentSession: (id) sender
NSLocalizedStringFromTableInBundle(@"This session will be closed.",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close Session"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil) == 0) return;
,nil) != NSAlertDefaultReturn) return;
}

[self closeSession:[[TABVIEW selectedTabViewItem] identifier]];
Expand Down Expand Up @@ -1118,7 +1118,7 @@ - (void) setSendInputToAllSessions: (BOOL) flag
sendInputToAllSessions = (NSRunAlertPanel(NSLocalizedStringFromTableInBundle(@"Warning!",@"iTerm", [NSBundle bundleForClass: [self class]], @"Warning"),
NSLocalizedStringFromTableInBundle(@"Keyboard input will be sent to all sessions in this terminal.",@"iTerm", [NSBundle bundleForClass: [self class]], @"Keyboard Input"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"Profile"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel"), nil) == 1);
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel"), nil) == NSAlertDefaultReturn);

}

Expand Down Expand Up @@ -1401,12 +1401,12 @@ - (BOOL)showCloseWindow
#if DEBUG_METHOD_TRACE
NSLog(@"%s(%d):-[PseudoTerminal showCloseWindow]", __FILE__, __LINE__);
#endif

return (NSRunAlertPanel(NSLocalizedStringFromTableInBundle(@"Close Window?",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close window"),
return (NSRunAlertPanel(NSLocalizedStringFromTableInBundle(@"Close Window?",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close window"),
NSLocalizedStringFromTableInBundle(@"All sessions will be closed",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close window"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil)==1);
,nil)==NSAlertDefaultReturn);
}

- (IBAction)showConfigWindow:(id)sender;
Expand Down Expand Up @@ -1613,11 +1613,11 @@ - (BOOL)tabView:(NSTabView*)tabView shouldCloseTabViewItem:(NSTabViewItem *)tabV

return [aSession exited] ||
![[PreferencePanel sharedInstance] promptOnClose] ||
NSRunAlertPanel([NSString stringWithFormat:@"%@ #%d", [aSession name], [aSession realObjectCount]],
(NSRunAlertPanel([NSString stringWithFormat:@"%@ #%d", [aSession name], [aSession realObjectCount]],
NSLocalizedStringFromTableInBundle(@"This session will be closed.",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close Session"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil);
,nil) == NSAlertDefaultReturn);

}

Expand Down
8 changes: 6 additions & 2 deletions iTermApplicationDelegate.m
@@ -1,5 +1,5 @@
// -*- mode:objc -*-
// $Id: iTermApplicationDelegate.m,v 1.48 2006-12-05 02:59:52 yfabian Exp $
// $Id: iTermApplicationDelegate.m,v 1.49 2006-12-07 06:19:33 yfabian Exp $
/*
** iTermApplicationDelegate.m
**
Expand Down Expand Up @@ -115,7 +115,11 @@ - (BOOL) applicationShouldTerminate: (NSNotification *) theNotification
terminals = [[iTermController sharedInstance] terminals];
if(([terminals count] > 0) &&
[[PreferencePanel sharedInstance] promptOnClose] &&
![[terminals objectAtIndex: 0] showCloseWindow])
NSRunAlertPanel(NSLocalizedStringFromTableInBundle(@"Quit iTerm?",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close window"),
NSLocalizedStringFromTableInBundle(@"All sessions will be closed",@"iTerm", [NSBundle bundleForClass: [self class]], @"Close window"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"OK"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel")
,nil)!=NSAlertDefaultReturn)
return (NO);

// save preferences
Expand Down
11 changes: 10 additions & 1 deletion website/header.html
@@ -1,2 +1,11 @@
<A HREF="index.shtml"><IMG SRC="iTerm_header.png" TITLE="" ALT="iTerm" BORDER="0"></A>

<script type="text/javascript"><!--
google_ad_client = "pub-5743532873543938";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
14 changes: 13 additions & 1 deletion website/sidebar.html
Expand Up @@ -26,7 +26,7 @@
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<input type="hidden" name="domains" value="iterm.sourceforge.net"></input>
<input type="text" name="q" size="31" maxlength="150" value=""></input>
<input type="text" name="q" size="31" maxlength="125" value=""></input>
</td></tr>
<tr>
<td nowrap="nowrap">
Expand All @@ -53,6 +53,18 @@
</form>
<!-- SiteSearch Google -->

<script type="text/javascript"><!--
google_ad_client = "pub-5743532873543938";
google_ad_width = 110;
google_ad_height = 32;
google_ad_format = "110x32_as_rimg";
google_cpa_choice = "CAAQ_-KZzgEaCHfyBUS9wT0_KOP143Q";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br>
<br>
<A HREF="http://sourceforge.net">
<IMG SRC="http://sourceforge.net/sflogo.php?group_id=67789&amp;type=2" WIDTH="125" HEIGHT="37" BORDER="0" ALT="SourceForge Logo">
</A>
Expand Down

0 comments on commit 95a8f5b

Please sign in to comment.