*/
+ (void)setDefaultFont:(NSFont*)font;
-/* Internal method */
+/* Internal methods */
- (AngbandView *)activeView;
+/* Set the title for the primary window. */
+- (void)setDefaultTitle:(int)termIdx;
+
@end
/**
return result;
}
+- (void)setDefaultTitle:(int)termIdx
+{
+ NSMutableString *title =
+ [NSMutableString stringWithCString:angband_term_name[termIdx]
+#ifdef JP
+ encoding:NSJapaneseEUCStringEncoding
+#else
+ encoding:NSMacOSRomanStringEncoding
+#endif
+ ];
+ [title appendFormat:@" %dx%d", self.cols, self.rows];
+ [[self makePrimaryWindow] setTitle:title];
+}
+
- (void)angbandViewDidScale:(AngbandView *)view
{
/* If we're live-resizing with graphics, we're using the live resize
self->_rows = newRows;
[self.changes resize:self.cols rows:self.rows];
+ int termIndex = [self terminalIndex];
+ [self setDefaultTitle:termIndex];
+
if( saveToDefaults )
{
- int termIndex = [self terminalIndex];
NSArray *terminals = [[NSUserDefaults standardUserDefaults] valueForKey: AngbandTerminalsDefaultsKey];
if( termIndex < (int)[terminals count] )
NSWindow *window = [context makePrimaryWindow];
/* Set its title and, for auxiliary terms, tentative size */
- NSString *title =
- [NSString stringWithCString:angband_term_name[termIdx]
-#ifdef JP
- encoding:NSJapaneseEUCStringEncoding
-#else
- encoding:NSMacOSRomanStringEncoding
-#endif
- ];
- [window setTitle:title];
+ [context setDefaultTitle:termIdx];
[context setMinimumWindowSize:termIdx];
/*