[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src nsterm.m
From: |
Adrian Robert |
Subject: |
[Emacs-diffs] emacs/src nsterm.m |
Date: |
Wed, 23 Sep 2009 18:20:04 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Adrian Robert <arobert> 09/09/23 18:20:04
Modified files:
src : nsterm.m
Log message:
* nsterm.m (EV_TIMESTAMP, x_set_window_size)
(EmacsApp-application:openFiles:): Remove GNUstep conditionals.
(EmacsScroller-setPosition:portion:whole:): Remove -display call
under GNUstep.
(EmacsView-initFrameFromEmacs:): Set autoresizing mask.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsterm.m?cvsroot=emacs&r1=1.89&r2=1.90
Patches:
Index: nsterm.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsterm.m,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- nsterm.m 23 Sep 2009 01:07:45 -0000 1.89
+++ nsterm.m 23 Sep 2009 18:20:03 -0000 1.90
@@ -248,12 +248,7 @@
[e buttonNumber] - 1)
/* Convert the time field to a timestamp in milliseconds. */
-#ifdef NS_IMPL_GNUSTEP
-/* Apple says timestamp is in seconds, but GNUstep seems to be returning msec
*/
-#define EV_TIMESTAMP(e) ([e timestamp])
-#else
#define EV_TIMESTAMP(e) ([e timestamp] * 1000)
-#endif /* not gnustep */
/* This is a piece of code which is common to all the event handling
methods. Maybe it should even be a function. */
@@ -1139,18 +1134,11 @@
/* If we have a toolbar, take its height into account. */
if (tb)
- FRAME_NS_TOOLBAR_HEIGHT (f) =
- /* XXX: GNUstep has not yet implemented the first method below, added
- in Panther, however the second is incorrect under Cocoa. */
-#ifdef NS_IMPL_COCOA
- NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
/* NOTE: previously this would generate wrong result if toolbar not
yet displayed and fixing toolbar_height=32 helped, but
now (200903) seems no longer needed */
-#else
- NSHeight ([NSWindow frameRectForContentRect: NSMakeRect (0, 0, 0, 0)
- styleMask: [window styleMask]])
-#endif
+ FRAME_NS_TOOLBAR_HEIGHT (f) =
+ NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
- FRAME_NS_TITLEBAR_HEIGHT (f);
else
FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
@@ -4155,11 +4143,7 @@
while ((file = [files nextObject]) != nil)
[ns_pending_files addObject: file];
-/* TODO: when GNUstep implements this (and we require that version of
- GNUstep), remove. */
-#ifndef NS_IMPL_GNUSTEP
[self replyToOpenOrPrint: NSApplicationDelegateReplySuccess];
-#endif /* !NS_IMPL_GNUSTEP */
}
@@ -5100,6 +5084,7 @@
r = NSMakeRect (0, 0, FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, f->text_cols),
FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, f->text_lines));
[self initWithFrame: r];
+ [self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
FRAME_NS_VIEW (f) = self;
emacsframe = f;
@@ -5711,8 +5696,13 @@
[self setEnabled: YES];
/* Ensure auto resizing of scrollbars occurs within the emacs frame's view
- locked against the right, top and bottom edges. */
+ locked against the top and bottom edges, and right edge on OS X, where
+ scrollers are on right. */
+#ifdef NS_IMPL_GNUSTEP
+ [self setAutoresizingMask: NSViewMaxXMargin | NSViewHeightSizable];
+#else
[self setAutoresizingMask: NSViewMinXMargin | NSViewHeightSizable];
+#endif
win = nwin;
condemned = NO;
@@ -5833,9 +5823,6 @@
por = (float)portion/whole;
[self setFloatValue: pos knobProportion: por];
}
-#ifdef NS_IMPL_GNUSTEP
- [self display];
-#endif
return self;
}