<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/nsmenu.m, branch pending</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Add 2012 to FSF copyright years for Emacs files</title>
<updated>2012-01-05T09:46:05+00:00</updated>
<author>
<name>Glenn Morris</name>
</author>
<published>2012-01-05T09:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=acaf905b1130aae80fa59d2c861ffd4c8eb75486'/>
<id>acaf905b1130aae80fa59d2c861ffd4c8eb75486</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix biggest memory leaks in NS-port.  More remain.</title>
<updated>2011-12-21T08:04:19+00:00</updated>
<author>
<name>Jan Djärv</name>
</author>
<published>2011-12-21T08:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=204ee57fa0bb286ba4c6f540cefb44ed011a921f'/>
<id>204ee57fa0bb286ba4c6f540cefb44ed011a921f</id>
<content type='text'>
* emacs.c (ns_pool): New variable.
(main): Assign ns_pool.
(Fkill_emacs): Call ns_release_autorelease_pool.

* nsfns.m (x_set_background_color): Assign return value from
ns_index_color to face-background instead of NSColor*.
(ns_implicitly_set_icon_type): Fix indentation.
Change assignment in for loop to comparison.

* nsfont.m (ns_spec_to_descriptor): Fix indentation,
autorelease fdesc, release fdAttrs and tdict.
(ns_get_covering_families): Release charset.
(ns_findfonts): Release NSFontDescriptor created with new.
(ns_uni_to_glyphs): Fix indentation.
(setString): Release attrStr before assigning new value.

* nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
before returning.

* nsterm.m (x_free_frame_resources): Release
f-&gt;output_data.ns-&gt;miniimage
(ns_index_color): Fix indentation.  Do not retain
color_table-&gt;colors[i].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* emacs.c (ns_pool): New variable.
(main): Assign ns_pool.
(Fkill_emacs): Call ns_release_autorelease_pool.

* nsfns.m (x_set_background_color): Assign return value from
ns_index_color to face-background instead of NSColor*.
(ns_implicitly_set_icon_type): Fix indentation.
Change assignment in for loop to comparison.

* nsfont.m (ns_spec_to_descriptor): Fix indentation,
autorelease fdesc, release fdAttrs and tdict.
(ns_get_covering_families): Release charset.
(ns_findfonts): Release NSFontDescriptor created with new.
(ns_uni_to_glyphs): Fix indentation.
(setString): Release attrStr before assigning new value.

* nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
before returning.

* nsterm.m (x_free_frame_resources): Release
f-&gt;output_data.ns-&gt;miniimage
(ns_index_color): Fix indentation.  Do not retain
color_table-&gt;colors[i].
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt code from AquaEmacs to handle occasional blank menus.</title>
<updated>2011-12-18T14:50:19+00:00</updated>
<author>
<name>Jan Djärv</name>
</author>
<published>2011-12-18T14:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5fecd5fce0bac31f1d39d84caa9d2c444c8e7e01'/>
<id>5fecd5fce0bac31f1d39d84caa9d2c444c8e7e01</id>
<content type='text'>
* nsmenu.m (trackingMenu): New variable.
(NSMenuDidBeginTrackingNotification): Declare if OSX &lt; 10.5 and
NS_IMPL_COCOA.
(trackingNotification): New method (from AquaEmacs).
(menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
from AquaEmacs.
(syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.

* nsterm.m (ns_term_init): Subscribe for notifications
NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
to method trackingNotification in EmacsMenu.

Fixes: debbugs:7030
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nsmenu.m (trackingMenu): New variable.
(NSMenuDidBeginTrackingNotification): Declare if OSX &lt; 10.5 and
NS_IMPL_COCOA.
(trackingNotification): New method (from AquaEmacs).
(menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
from AquaEmacs.
(syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.

* nsterm.m (ns_term_init): Subscribe for notifications
NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
to method trackingNotification in EmacsMenu.

Fixes: debbugs:7030
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from trunk.</title>
<updated>2011-07-29T05:31:12+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2011-07-29T05:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=18ab493650d648ab8dca651ea2698861f926e895'/>
<id>18ab493650d648ab8dca651ea2698861f926e895</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tooltip dimensions on NS (Bug#9176).</title>
<updated>2011-07-28T18:30:59+00:00</updated>
<author>
<name>Alp Aker</name>
</author>
<published>2011-07-28T18:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ffe57a7a0e3d4fc66625d6931e6dc925f5bfa9d9'/>
<id>ffe57a7a0e3d4fc66625d6931e6dc925f5bfa9d9</id>
<content type='text'>
* src/nsmenu.m (-setText): Size tooltip dimensions precisely to
contents.
(EmacsTooltip -init): Remove bezels and add shadows to
tooltip windows.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsmenu.m (-setText): Size tooltip dimensions precisely to
contents.
(EmacsTooltip -init): Remove bezels and add shadows to
tooltip windows.
</pre>
</div>
</content>
</entry>
<entry>
<title>* nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons</title>
<updated>2011-07-25T21:49:42+00:00</updated>
<author>
<name>Jan Djärv</name>
</author>
<published>2011-07-25T21:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d6f0886cf1d99d80c45a8a57a7bcce42dc623c3c'/>
<id>d6f0886cf1d99d80c45a8a57a7bcce42dc623c3c</id>
<content type='text'>
are specified.

Fixes: debbugs:9168
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
are specified.

Fixes: debbugs:9168
</pre>
</div>
</content>
</entry>
<entry>
<title>Overflow, signedness and related fixes for images.</title>
<updated>2011-07-17T00:34:43+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2011-07-17T00:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=134643946085b24a695d73b3d8f7af5aa23602aa'/>
<id>134643946085b24a695d73b3d8f7af5aa23602aa</id>
<content type='text'>
* dispextern.h (struct it.stack[0].u.image.image_id)
(struct_it.image_id, struct image.id, struct image_cache.size)
(struct image_cache.used, struct image_cache.ref_count):
* gtkutil.c (update_frame_tool_bar):
* image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
(Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
(cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
* nsmenu.m (update_frame_tool_bar):
* xdisp.c (calc_pixel_width_or_height):
* xfns.c (image_cache_refcount):
Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
on typical 64-bit hosts.

* image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
(x_bitmap_pixmap, x_create_x_image_and_pixmap):
Omit unnecessary casts to int.
(parse_image_spec): Check that integers fall into 'int' range
when the callers expect that.
(image_ascent): Redo ascent calculation to avoid int overflow.
(clear_image_cache): Avoid overflow when sqrt (INT_MAX) &lt; nimages.
(lookup_image): Remove unnecessary tests.
(xbm_image_p): Locals are now of int, not EMACS_INT,
since parse_image_check makes sure they fit into int.
(png_load, gif_load, svg_load_image):
Prefer int to unsigned where either will do.
(tiff_handler): New function, combining the cores of the
old tiff_error_handler and tiff_warning_handler.  This
function is rewritten to use vsnprintf and thereby avoid
stack buffer overflows.  It uses only the features of vsnprintf
that are common to both POSIX and native Microsoft.
(tiff_error_handler, tiff_warning_handler): Use it.
(tiff_load, gif_load, imagemagick_load_image):
Don't assume :index value fits in 'int'.
(gif_load): Omit unnecessary cast to double, and avoid double-rounding.
(imagemagick_load_image): Check that crop parameters fit into
the integer types that MagickCropImage accepts.  Don't assume
Vimagemagick_render_type has a nonnegative value.  Don't assume
size_t fits in 'long'.
(gs_load): Use printmax_t to print the widest integers possible.
Check for integer overflow when computing image height and width.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* dispextern.h (struct it.stack[0].u.image.image_id)
(struct_it.image_id, struct image.id, struct image_cache.size)
(struct image_cache.used, struct image_cache.ref_count):
* gtkutil.c (update_frame_tool_bar):
* image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
(Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
(cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
* nsmenu.m (update_frame_tool_bar):
* xdisp.c (calc_pixel_width_or_height):
* xfns.c (image_cache_refcount):
Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
on typical 64-bit hosts.

* image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
(x_bitmap_pixmap, x_create_x_image_and_pixmap):
Omit unnecessary casts to int.
(parse_image_spec): Check that integers fall into 'int' range
when the callers expect that.
(image_ascent): Redo ascent calculation to avoid int overflow.
(clear_image_cache): Avoid overflow when sqrt (INT_MAX) &lt; nimages.
(lookup_image): Remove unnecessary tests.
(xbm_image_p): Locals are now of int, not EMACS_INT,
since parse_image_check makes sure they fit into int.
(png_load, gif_load, svg_load_image):
Prefer int to unsigned where either will do.
(tiff_handler): New function, combining the cores of the
old tiff_error_handler and tiff_warning_handler.  This
function is rewritten to use vsnprintf and thereby avoid
stack buffer overflows.  It uses only the features of vsnprintf
that are common to both POSIX and native Microsoft.
(tiff_error_handler, tiff_warning_handler): Use it.
(tiff_load, gif_load, imagemagick_load_image):
Don't assume :index value fits in 'int'.
(gif_load): Omit unnecessary cast to double, and avoid double-rounding.
(imagemagick_load_image): Check that crop parameters fit into
the integer types that MagickCropImage accepts.  Don't assume
Vimagemagick_render_type has a nonnegative value.  Don't assume
size_t fits in 'long'.
(gs_load): Use printmax_t to print the widest integers possible.
Check for integer overflow when computing image height and width.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warnings in ns*m files: Replace deprecated methods, declare new interfaces. </title>
<updated>2011-07-08T10:04:23+00:00</updated>
<author>
<name>Jan Djärv</name>
</author>
<published>2011-07-08T10:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4393663bc52fc24c15aa9c1779dfc23d3a0f901f'/>
<id>4393663bc52fc24c15aa9c1779dfc23d3a0f901f</id>
<content type='text'>
* emacs.c: Declare unexec_init_emacs_zone.

* nsfns.m (check_ns_display_info): Cast to long and use %ld in error
to avoid warning.

* nsimage.m (allocInitFromFile): Don't use deprecated method
bestRepresentationForDevice on OSX &gt;= 10.6.

* nsmenu.m (fillWithWidgetValue): Don't use depercated method
sizeToFit on OSX &gt;= 10.2.

* nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
cString and lossyCString on OSX &gt;= 10.4

* nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
(MAC_OS_X_VERSION_10_5): Define if not defined.
(EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX &gt;= 10.6.
(EmacsMenu): Implements NSMenuDelegate on OSX &gt;= 10.6.
(EmacsToolbar): Implements NSToolbarDelegate on OSX &gt;= 10.6.

* nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
variable firstTime not needed on OSX &gt;= 10.6.
(setPosition): setFloatValue:knobProportion: is deprecated on OSX
&gt;= 10.5.  Use setKnobProportion, setDoubleValue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* emacs.c: Declare unexec_init_emacs_zone.

* nsfns.m (check_ns_display_info): Cast to long and use %ld in error
to avoid warning.

* nsimage.m (allocInitFromFile): Don't use deprecated method
bestRepresentationForDevice on OSX &gt;= 10.6.

* nsmenu.m (fillWithWidgetValue): Don't use depercated method
sizeToFit on OSX &gt;= 10.2.

* nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
cString and lossyCString on OSX &gt;= 10.4

* nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
(MAC_OS_X_VERSION_10_5): Define if not defined.
(EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX &gt;= 10.6.
(EmacsMenu): Implements NSMenuDelegate on OSX &gt;= 10.6.
(EmacsToolbar): Implements NSToolbarDelegate on OSX &gt;= 10.6.

* nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
variable firstTime not needed on OSX &gt;= 10.6.
(setPosition): setFloatValue:knobProportion: is deprecated on OSX
&gt;= 10.5.  Use setKnobProportion, setDoubleValue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix services menu empty on OSX 1.6+.</title>
<updated>2011-07-08T08:11:35+00:00</updated>
<author>
<name>Jan Djärv</name>
</author>
<published>2011-07-08T08:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=699c10bd69f9395a5705b86259b957b7ed75f8ef'/>
<id>699c10bd69f9395a5705b86259b957b7ed75f8ef</id>
<content type='text'>
* nsfns.m (Fx_open_connection): Remove NSStringPboardType from
ns_return_types.
(Fns_list_services): Just return Qnil on 10.6, code not working there.

* nsmenu.m (ns_update_menubar): Remove useless setDelegate call
on svcsMenu.

* nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).

* nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
(ns_get_local_selection): Declare.

* nsterm.m (QUTF8_STRING): Declare.
(initFrameFromEmacs): Call registerServicesMenuSendTypes.
(validRequestorForSendType): Return type is (id).
Change indexOfObjectIdenticalTo to indexOfObject.
Check if we have local selection before returning self (Bug#8842).
(writeSelectionToPasteboard): Put local selection into paste board
if we have a local selection (Bug#8842).
(syms_of_nsterm): DEFSYM QUTF8_STRING.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nsfns.m (Fx_open_connection): Remove NSStringPboardType from
ns_return_types.
(Fns_list_services): Just return Qnil on 10.6, code not working there.

* nsmenu.m (ns_update_menubar): Remove useless setDelegate call
on svcsMenu.

* nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).

* nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
(ns_get_local_selection): Declare.

* nsterm.m (QUTF8_STRING): Declare.
(initFrameFromEmacs): Call registerServicesMenuSendTypes.
(validRequestorForSendType): Return type is (id).
Change indexOfObjectIdenticalTo to indexOfObject.
Check if we have local selection before returning self (Bug#8842).
(writeSelectionToPasteboard): Put local selection into paste board
if we have a local selection (Bug#8842).
(syms_of_nsterm): DEFSYM QUTF8_STRING.
</pre>
</div>
</content>
</entry>
<entry>
<title>* nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.</title>
<updated>2011-04-27T06:01:43+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2011-04-27T06:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=96fb4434c80ad33b648231fcc8e5bc6d0721c8ef'/>
<id>96fb4434c80ad33b648231fcc8e5bc6d0721c8ef</id>
<content type='text'>
This makes this file independent of the recent pseudovector change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes this file independent of the recent pseudovector change.
</pre>
</div>
</content>
</entry>
</feed>
