mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
* nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
(EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:) (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114) * nsfns.m (ns_set_name_as_filename): Likewise. * nsmenu.m (ns_update_menubar): Likewise. * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
This commit is contained in:
parent
8e7046c395
commit
947b2afddc
@ -1,3 +1,12 @@
|
||||
2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
|
||||
|
||||
* nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
|
||||
(EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
|
||||
(EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
|
||||
* nsfns.m (ns_set_name_as_filename): Likewise.
|
||||
* nsmenu.m (ns_update_menubar): Likewise.
|
||||
* nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
|
||||
|
||||
2012-08-01 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
|
||||
|
@ -607,7 +607,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
{
|
||||
NSView *view;
|
||||
Lisp_Object name, filename;
|
||||
Lisp_Object buf = XWINDOW (FVAR (f, selected_window))->buffer;
|
||||
Lisp_Object buf = WVAR (XWINDOW (FVAR (f, selected_window)), buffer);
|
||||
const char *title;
|
||||
NSAutoreleasePool *pool;
|
||||
struct gcpro gcpro1;
|
||||
|
@ -193,7 +193,7 @@
|
||||
= alloca (previous_menu_items_used * sizeof *previous_items);
|
||||
|
||||
/* lisp preliminaries */
|
||||
buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
|
||||
buffer = WVAR (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
|
||||
specbind (Qinhibit_quit, Qt);
|
||||
specbind (Qdebug_on_next_call, Qnil);
|
||||
record_unwind_save_match_data ();
|
||||
|
@ -62,7 +62,7 @@ Updated by Christian Limpach (chris@nice.ch)
|
||||
if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
|
||||
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
|
||||
if (EQ (sym, QTEXT)) return NSStringPboardType;
|
||||
return [NSString stringWithUTF8String: SSDATA (XSYMBOL (sym)->xname)];
|
||||
return [NSString stringWithUTF8String: SSDATA (SVAR (XSYMBOL (sym), xname))];
|
||||
}
|
||||
|
||||
static NSPasteboard *
|
||||
|
26
src/nsterm.m
26
src/nsterm.m
@ -3624,9 +3624,9 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
EmacsScroller *bar;
|
||||
|
||||
/* optimization; display engine sends WAY too many of these.. */
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
if (!NILP (WVAR (window, vertical_scroll_bar)))
|
||||
{
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
bar = XNS_SCROLL_BAR (WVAR (window, vertical_scroll_bar));
|
||||
if ([bar checkSamePosition: position portion: portion whole: whole])
|
||||
{
|
||||
if (view->scrollbarsNeedingUpdate == 0)
|
||||
@ -3674,27 +3674,27 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
/* we want at least 5 lines to display a scrollbar */
|
||||
if (WINDOW_TOTAL_LINES (window) < 5)
|
||||
{
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
if (!NILP (WVAR (window, vertical_scroll_bar)))
|
||||
{
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
bar = XNS_SCROLL_BAR (WVAR (window, vertical_scroll_bar));
|
||||
[bar removeFromSuperview];
|
||||
window->vertical_scroll_bar = Qnil;
|
||||
WVAR (window, vertical_scroll_bar) = Qnil;
|
||||
}
|
||||
ns_clear_frame_area (f, sb_left, top, width, height);
|
||||
UNBLOCK_INPUT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (NILP (window->vertical_scroll_bar))
|
||||
if (NILP (WVAR (window, vertical_scroll_bar)))
|
||||
{
|
||||
ns_clear_frame_area (f, sb_left, top, width, height);
|
||||
bar = [[EmacsScroller alloc] initFrame: r window: win];
|
||||
window->vertical_scroll_bar = make_save_value (bar, 0);
|
||||
WVAR (window, vertical_scroll_bar) = make_save_value (bar, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSRect oldRect;
|
||||
bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
bar = XNS_SCROLL_BAR (WVAR (window, vertical_scroll_bar));
|
||||
oldRect = [bar frame];
|
||||
r.size.width = oldRect.size.width;
|
||||
if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
|
||||
@ -3741,9 +3741,9 @@ We tell read_avail_input() that input is "expected" because we do expect
|
||||
{
|
||||
id bar;
|
||||
NSTRACE (ns_redeem_scroll_bar);
|
||||
if (!NILP (window->vertical_scroll_bar))
|
||||
if (!NILP (WVAR (window, vertical_scroll_bar)))
|
||||
{
|
||||
bar =XNS_SCROLL_BAR (window->vertical_scroll_bar);
|
||||
bar = XNS_SCROLL_BAR (WVAR (window, vertical_scroll_bar));
|
||||
[bar reprieve];
|
||||
}
|
||||
}
|
||||
@ -6064,7 +6064,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute
|
||||
Lisp_Object str = Qnil;
|
||||
struct frame *f = SELECTED_FRAME ();
|
||||
struct buffer *curbuf
|
||||
= XBUFFER (XWINDOW (FVAR (f, selected_window))->buffer);
|
||||
= XBUFFER (WVAR (XWINDOW (FVAR (f, selected_window)), buffer));
|
||||
|
||||
if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
|
||||
return NSAccessibilityTextFieldRole;
|
||||
@ -6239,7 +6239,7 @@ + (CGFloat) scrollerWidth
|
||||
if (pixel_height == 0) pixel_height = 1;
|
||||
min_portion = 20 / pixel_height;
|
||||
|
||||
frame = XFRAME (XWINDOW (win)->frame);
|
||||
frame = XFRAME (WVAR (XWINDOW (win), frame));
|
||||
if (FRAME_LIVE_P (frame))
|
||||
{
|
||||
int i;
|
||||
@ -6278,7 +6278,7 @@ - (void)dealloc
|
||||
{
|
||||
NSTRACE (EmacsScroller_dealloc);
|
||||
if (!NILP (win))
|
||||
XWINDOW (win)->vertical_scroll_bar = Qnil;
|
||||
WVAR (XWINDOW (win), vertical_scroll_bar) = Qnil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user