aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-07-22 16:29:10 +0000
committerDan Nicolaescu2008-07-22 16:29:10 +0000
commitcc98b6a06aa7505a2c5c08c3851f48bfabd5ccf0 (patch)
tree36eaf17bedfc3e1feea579657697178e4611a706
parent1baa62364ead97b5d7e5c08feb6d253e61ccadef (diff)
downloademacs-cc98b6a06aa7505a2c5c08c3851f48bfabd5ccf0.tar.gz
emacs-cc98b6a06aa7505a2c5c08c3851f48bfabd5ccf0.zip
(x_set_menu_bar_lines, x_set_tool_bar_lines): Remove
forwarding functions. (ns_set_menu_bar_lines): Rename to x_set_menu_bar_lines, make non-static. (ns_set_tool_bar_lines): Rename to x_set_tool_bar_lines, make non-static. (ns_frame_parm_handlers): Use the new names. (syms_of_nsfns): Move to the end of file.
-rw-r--r--src/ChangeLog9
-rw-r--r--src/nsfns.m180
2 files changed, 90 insertions, 99 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d545e9e4ef8..122b58a502e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12008-07-22 Dan Nicolaescu <dann@ics.uci.edu> 12008-07-22 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * nsfns.m (x_set_menu_bar_lines, x_set_tool_bar_lines): Remove
4 forwarding functions.
5 (ns_set_menu_bar_lines): Rename to x_set_menu_bar_lines, make
6 non-static.
7 (ns_set_tool_bar_lines): Rename to x_set_tool_bar_lines, make
8 non-static.
9 (ns_frame_parm_handlers): Use the new names.
10 (syms_of_nsfns): Move to the end of file.
11
3 * nsterm.m (syms_of_nsterm): Move to the end of file. 12 * nsterm.m (syms_of_nsterm): Move to the end of file.
4 13
5 * dispnew.c (init_display): Remove code for X10. 14 * dispnew.c (init_display): Remove code for X10.
diff --git a/src/nsfns.m b/src/nsfns.m
index 40016d9479b..4595ea51f17 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -712,8 +712,8 @@ ns_set_doc_edited (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
712} 712}
713 713
714 714
715static void 715void
716ns_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 716x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
717{ 717{
718 int nlines; 718 int nlines;
719 int olines = FRAME_MENU_BAR_LINES (f); 719 int olines = FRAME_MENU_BAR_LINES (f);
@@ -729,30 +729,22 @@ ns_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
729 if (nlines) 729 if (nlines)
730 { 730 {
731 FRAME_EXTERNAL_MENU_BAR (f) = 1; 731 FRAME_EXTERNAL_MENU_BAR (f) = 1;
732/* does for all frames, whereas we just want for one frame 732 /* does for all frames, whereas we just want for one frame
733 [NSMenu setMenuBarVisible: YES]; */ 733 [NSMenu setMenuBarVisible: YES]; */
734 } 734 }
735 else 735 else
736 { 736 {
737 if (FRAME_EXTERNAL_MENU_BAR (f) == 1) 737 if (FRAME_EXTERNAL_MENU_BAR (f) == 1)
738 free_frame_menubar (f); 738 free_frame_menubar (f);
739/* [NSMenu setMenuBarVisible: NO]; */ 739 /* [NSMenu setMenuBarVisible: NO]; */
740 FRAME_EXTERNAL_MENU_BAR (f) = 0; 740 FRAME_EXTERNAL_MENU_BAR (f) = 0;
741 } 741 }
742} 742}
743 743
744 744
745/* 23: XXX: there is an erroneous direct call in window.c to this fn */
746void
747x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
748{
749 ns_set_menu_bar_lines (f, value, oldval);
750}
751
752
753/* 23: toolbar support */ 745/* 23: toolbar support */
754static void 746void
755ns_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 747x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
756{ 748{
757 int nlines; 749 int nlines;
758 Lisp_Object root_window; 750 Lisp_Object root_window;
@@ -783,14 +775,6 @@ ns_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
783} 775}
784 776
785 777
786/* 23: XXX: there is an erroneous direct call in window.c to this fn */
787void
788x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
789{
790 ns_set_tool_bar_lines (f, value, oldval);
791}
792
793
794void 778void
795ns_implicitly_set_icon_type (struct frame *f) 779ns_implicitly_set_icon_type (struct frame *f)
796{ 780{
@@ -1023,7 +1007,7 @@ frame_parm_handler ns_frame_parm_handlers[] =
1023 ns_set_icon_name, 1007 ns_set_icon_name,
1024 ns_set_icon_type, 1008 ns_set_icon_type,
1025 x_set_internal_border_width, /* generic OK */ 1009 x_set_internal_border_width, /* generic OK */
1026 ns_set_menu_bar_lines, 1010 x_set_menu_bar_lines,
1027 ns_set_mouse_color, 1011 ns_set_mouse_color,
1028 ns_explicitly_set_name, 1012 ns_explicitly_set_name,
1029 x_set_scroll_bar_width, /* generic OK */ 1013 x_set_scroll_bar_width, /* generic OK */
@@ -1031,7 +1015,7 @@ frame_parm_handler ns_frame_parm_handlers[] =
1031 x_set_unsplittable, /* generic OK */ 1015 x_set_unsplittable, /* generic OK */
1032 x_set_vertical_scroll_bars, /* generic OK */ 1016 x_set_vertical_scroll_bars, /* generic OK */
1033 x_set_visibility, /* generic OK */ 1017 x_set_visibility, /* generic OK */
1034 ns_set_tool_bar_lines, 1018 x_set_tool_bar_lines,
1035 0, /* x_set_scroll_bar_foreground, will ignore (not possible on NS) */ 1019 0, /* x_set_scroll_bar_foreground, will ignore (not possible on NS) */
1036 0, /* x_set_scroll_bar_background, will ignore (not possible on NS) */ 1020 0, /* x_set_scroll_bar_background, will ignore (not possible on NS) */
1037 x_set_screen_gamma, /* generic OK */ 1021 x_set_screen_gamma, /* generic OK */
@@ -2592,6 +2576,78 @@ Value is t if tooltip was open, nil otherwise. */)
2592 2576
2593/* ========================================================================== 2577/* ==========================================================================
2594 2578
2579 Class implementations
2580
2581 ========================================================================== */
2582
2583
2584@implementation EmacsSavePanel
2585#ifdef NS_IMPL_COCOA
2586/* --------------------------------------------------------------------------
2587 These are overridden to intercept on OS X: ending panel restarts NSApp
2588 event loop if it is stopped. Not sure if this is correct behavior,
2589 perhaps should check if running and if so send an appdefined.
2590 -------------------------------------------------------------------------- */
2591- (void) ok: (id)sender
2592{
2593 [super ok: sender];
2594 panelOK = 1;
2595 [NSApp stop: self];
2596}
2597- (void) cancel: (id)sender
2598{
2599 [super cancel: sender];
2600 [NSApp stop: self];
2601}
2602#endif
2603@end
2604
2605
2606@implementation EmacsOpenPanel
2607#ifdef NS_IMPL_COCOA
2608/* --------------------------------------------------------------------------
2609 These are overridden to intercept on OS X: ending panel restarts NSApp
2610 event loop if it is stopped. Not sure if this is correct behavior,
2611 perhaps should check if running and if so send an appdefined.
2612 -------------------------------------------------------------------------- */
2613- (void) ok: (id)sender
2614{
2615 [super ok: sender];
2616 panelOK = 1;
2617 [NSApp stop: self];
2618}
2619- (void) cancel: (id)sender
2620{
2621 [super cancel: sender];
2622 [NSApp stop: self];
2623}
2624#endif
2625@end
2626
2627
2628@implementation EmacsFileDelegate
2629/* --------------------------------------------------------------------------
2630 Delegate methods for Open/Save panels
2631 -------------------------------------------------------------------------- */
2632- (BOOL)panel: (id)sender isValidFilename: (NSString *)filename
2633{
2634 return YES;
2635}
2636- (BOOL)panel: (id)sender shouldShowFilename: (NSString *)filename
2637{
2638 return YES;
2639}
2640- (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename
2641 confirmed: (BOOL)okFlag
2642{
2643 return filename;
2644}
2645@end
2646
2647#endif
2648
2649/* ==========================================================================
2650
2595 Lisp interface declaration 2651 Lisp interface declaration
2596 2652
2597 ========================================================================== */ 2653 ========================================================================== */
@@ -2684,78 +2740,4 @@ be used as the image of the icon representing the frame. */);
2684 2740
2685} 2741}
2686 2742
2687
2688
2689/* ==========================================================================
2690
2691 Class implementations
2692
2693 ========================================================================== */
2694
2695
2696@implementation EmacsSavePanel
2697#ifdef NS_IMPL_COCOA
2698/* --------------------------------------------------------------------------
2699 These are overridden to intercept on OS X: ending panel restarts NSApp
2700 event loop if it is stopped. Not sure if this is correct behavior,
2701 perhaps should check if running and if so send an appdefined.
2702 -------------------------------------------------------------------------- */
2703- (void) ok: (id)sender
2704{
2705 [super ok: sender];
2706 panelOK = 1;
2707 [NSApp stop: self];
2708}
2709- (void) cancel: (id)sender
2710{
2711 [super cancel: sender];
2712 [NSApp stop: self];
2713}
2714#endif
2715@end
2716
2717
2718@implementation EmacsOpenPanel
2719#ifdef NS_IMPL_COCOA
2720/* --------------------------------------------------------------------------
2721 These are overridden to intercept on OS X: ending panel restarts NSApp
2722 event loop if it is stopped. Not sure if this is correct behavior,
2723 perhaps should check if running and if so send an appdefined.
2724 -------------------------------------------------------------------------- */
2725- (void) ok: (id)sender
2726{
2727 [super ok: sender];
2728 panelOK = 1;
2729 [NSApp stop: self];
2730}
2731- (void) cancel: (id)sender
2732{
2733 [super cancel: sender];
2734 [NSApp stop: self];
2735}
2736#endif
2737@end
2738
2739
2740@implementation EmacsFileDelegate
2741/* --------------------------------------------------------------------------
2742 Delegate methods for Open/Save panels
2743 -------------------------------------------------------------------------- */
2744- (BOOL)panel: (id)sender isValidFilename: (NSString *)filename
2745{
2746 return YES;
2747}
2748- (BOOL)panel: (id)sender shouldShowFilename: (NSString *)filename
2749{
2750 return YES;
2751}
2752- (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename
2753 confirmed: (BOOL)okFlag
2754{
2755 return filename;
2756}
2757@end
2758
2759#endif
2760
2761// arch-tag: dc2a3f74-1123-4daa-8eed-fb78db6a5642 2743// arch-tag: dc2a3f74-1123-4daa-8eed-fb78db6a5642