Karsten Hopp 79902d
To: vim-dev@vim.org
Karsten Hopp 79902d
Subject: Patch 7.3.010
Karsten Hopp 79902d
Fcc: outbox
Karsten Hopp 79902d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 79902d
Mime-Version: 1.0
Karsten Hopp 79902d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 79902d
Content-Transfer-Encoding: 8bit
Karsten Hopp 79902d
------------
Karsten Hopp 79902d
Karsten Hopp 79902d
Patch 7.3.010
Karsten Hopp 79902d
Problem:    Mac GUI: Missing break statements.
Karsten Hopp 79902d
Solution:   Add the break statements. (Dominique Pelle)
Karsten Hopp 79902d
Files:	    src/gui_mac.c
Karsten Hopp 79902d
Karsten Hopp 79902d
Karsten Hopp 79902d
*** ../vim-7.3.009/src/gui_mac.c	2010-08-15 21:57:28.000000000 +0200
Karsten Hopp 79902d
--- src/gui_mac.c	2010-09-21 17:33:13.000000000 +0200
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 1480,1486 ****
Karsten Hopp 79902d
   *
Karsten Hopp 79902d
   *  Returns the index inside the menu wher
Karsten Hopp 79902d
   */
Karsten Hopp 79902d
!     short /* Shoulde we return MenuItemIndex? */
Karsten Hopp 79902d
  gui_mac_get_menu_item_index(vimmenu_T *pMenu)
Karsten Hopp 79902d
  {
Karsten Hopp 79902d
      short	index;
Karsten Hopp 79902d
--- 1480,1486 ----
Karsten Hopp 79902d
   *
Karsten Hopp 79902d
   *  Returns the index inside the menu wher
Karsten Hopp 79902d
   */
Karsten Hopp 79902d
!     short /* Should we return MenuItemIndex? */
Karsten Hopp 79902d
  gui_mac_get_menu_item_index(vimmenu_T *pMenu)
Karsten Hopp 79902d
  {
Karsten Hopp 79902d
      short	index;
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 1823,1829 ****
Karsten Hopp 79902d
  	p.h += gui.scrollbar_width;
Karsten Hopp 79902d
      if (gui.which_scrollbars[SBAR_RIGHT])
Karsten Hopp 79902d
  	p.h += gui.scrollbar_width;
Karsten Hopp 79902d
!     /* ideal height is as heigh as we can get */
Karsten Hopp 79902d
      p.v = 15 * 1024;
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      thePart = IsWindowInStandardState(whichWindow, &p, &r)
Karsten Hopp 79902d
--- 1823,1829 ----
Karsten Hopp 79902d
  	p.h += gui.scrollbar_width;
Karsten Hopp 79902d
      if (gui.which_scrollbars[SBAR_RIGHT])
Karsten Hopp 79902d
  	p.h += gui.scrollbar_width;
Karsten Hopp 79902d
!     /* ideal height is as high as we can get */
Karsten Hopp 79902d
      p.v = 15 * 1024;
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      thePart = IsWindowInStandardState(whichWindow, &p, &r)
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 4481,4487 ****
Karsten Hopp 79902d
  	 * event arrives.  No need to check for input_buf_full because we are
Karsten Hopp 79902d
  	 * returning as soon as it contains a single char.
Karsten Hopp 79902d
  	 */
Karsten Hopp 79902d
! 	/* TODO: reduce wtime accordinly???  */
Karsten Hopp 79902d
  	if (wtime > -1)
Karsten Hopp 79902d
  	    sleeppyTick = 60 * wtime / 1000;
Karsten Hopp 79902d
  	else
Karsten Hopp 79902d
--- 4481,4487 ----
Karsten Hopp 79902d
  	 * event arrives.  No need to check for input_buf_full because we are
Karsten Hopp 79902d
  	 * returning as soon as it contains a single char.
Karsten Hopp 79902d
  	 */
Karsten Hopp 79902d
! 	/* TODO: reduce wtime accordingly???  */
Karsten Hopp 79902d
  	if (wtime > -1)
Karsten Hopp 79902d
  	    sleeppyTick = 60 * wtime / 1000;
Karsten Hopp 79902d
  	else
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 5723,5735 ****
Karsten Hopp 79902d
      iconDITL = GetResource('DITL', 131);
Karsten Hopp 79902d
      switch (type)
Karsten Hopp 79902d
      {
Karsten Hopp 79902d
! 	case VIM_GENERIC:  useIcon = kNoteIcon;
Karsten Hopp 79902d
! 	case VIM_ERROR:    useIcon = kStopIcon;
Karsten Hopp 79902d
! 	case VIM_WARNING:  useIcon = kCautionIcon;
Karsten Hopp 79902d
! 	case VIM_INFO:     useIcon = kNoteIcon;
Karsten Hopp 79902d
! 	case VIM_QUESTION: useIcon = kNoteIcon;
Karsten Hopp 79902d
! 	default:      useIcon = kStopIcon;
Karsten Hopp 79902d
!     };
Karsten Hopp 79902d
      AppendDITL(theDialog, iconDITL, overlayDITL);
Karsten Hopp 79902d
      ReleaseResource(iconDITL);
Karsten Hopp 79902d
      GetDialogItem(theDialog, iconItm.idx, &itemType, &itemHandle, &box);
Karsten Hopp 79902d
--- 5723,5735 ----
Karsten Hopp 79902d
      iconDITL = GetResource('DITL', 131);
Karsten Hopp 79902d
      switch (type)
Karsten Hopp 79902d
      {
Karsten Hopp 79902d
! 	case VIM_GENERIC:
Karsten Hopp 79902d
! 	case VIM_INFO:
Karsten Hopp 79902d
! 	case VIM_QUESTION: useIcon = kNoteIcon; break;
Karsten Hopp 79902d
! 	case VIM_WARNING:  useIcon = kCautionIcon; break;
Karsten Hopp 79902d
! 	case VIM_ERROR:    useIcon = kStopIcon; break;
Karsten Hopp 79902d
! 	default:           useIcon = kStopIcon;
Karsten Hopp 79902d
!     }
Karsten Hopp 79902d
      AppendDITL(theDialog, iconDITL, overlayDITL);
Karsten Hopp 79902d
      ReleaseResource(iconDITL);
Karsten Hopp 79902d
      GetDialogItem(theDialog, iconItm.idx, &itemType, &itemHandle, &box);
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 5892,5898 ****
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      return itemHit;
Karsten Hopp 79902d
  /*
Karsten Hopp 79902d
!  * Usefull thing which could be used
Karsten Hopp 79902d
   * SetDialogTimeout(): Auto click a button after timeout
Karsten Hopp 79902d
   * SetDialogTracksCursor() : Get the I-beam cursor over input box
Karsten Hopp 79902d
   * MoveDialogItem():	    Probably better than SetDialogItem
Karsten Hopp 79902d
--- 5892,5898 ----
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      return itemHit;
Karsten Hopp 79902d
  /*
Karsten Hopp 79902d
!  * Useful thing which could be used
Karsten Hopp 79902d
   * SetDialogTimeout(): Auto click a button after timeout
Karsten Hopp 79902d
   * SetDialogTracksCursor() : Get the I-beam cursor over input box
Karsten Hopp 79902d
   * MoveDialogItem():	    Probably better than SetDialogItem
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 6100,6106 ****
Karsten Hopp 79902d
  #endif
Karsten Hopp 79902d
  
Karsten Hopp 79902d
  /*
Karsten Hopp 79902d
!  * Transfered from os_mac.c for MacOS X using os_unix.c prep work
Karsten Hopp 79902d
   */
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      int
Karsten Hopp 79902d
--- 6100,6106 ----
Karsten Hopp 79902d
  #endif
Karsten Hopp 79902d
  
Karsten Hopp 79902d
  /*
Karsten Hopp 79902d
!  * Transferred from os_mac.c for MacOS X using os_unix.c prep work
Karsten Hopp 79902d
   */
Karsten Hopp 79902d
  
Karsten Hopp 79902d
      int
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 6543,6549 ****
Karsten Hopp 79902d
  static ControlRef dataBrowser = NULL;
Karsten Hopp 79902d
  
Karsten Hopp 79902d
  // when the tabline is hidden, vim doesn't call update_tabline(). When
Karsten Hopp 79902d
! // the tabline is shown again, show_tabline() is called before upate_tabline(),
Karsten Hopp 79902d
  // and because of this, the tab labels and vims internal tabs are out of sync
Karsten Hopp 79902d
  // for a very short time. to prevent inconsistent state, we store the labels
Karsten Hopp 79902d
  // of the tabs, not pointers to the tabs (which are invalid for a short time).
Karsten Hopp 79902d
--- 6543,6549 ----
Karsten Hopp 79902d
  static ControlRef dataBrowser = NULL;
Karsten Hopp 79902d
  
Karsten Hopp 79902d
  // when the tabline is hidden, vim doesn't call update_tabline(). When
Karsten Hopp 79902d
! // the tabline is shown again, show_tabline() is called before update_tabline(),
Karsten Hopp 79902d
  // and because of this, the tab labels and vims internal tabs are out of sync
Karsten Hopp 79902d
  // for a very short time. to prevent inconsistent state, we store the labels
Karsten Hopp 79902d
  // of the tabs, not pointers to the tabs (which are invalid for a short time).
Karsten Hopp 79902d
*** ../vim-7.3.009/src/version.c	2010-09-21 17:29:19.000000000 +0200
Karsten Hopp 79902d
--- src/version.c	2010-09-21 17:33:22.000000000 +0200
Karsten Hopp 79902d
***************
Karsten Hopp 79902d
*** 716,717 ****
Karsten Hopp 79902d
--- 716,719 ----
Karsten Hopp 79902d
  {   /* Add new patch number below this line */
Karsten Hopp 79902d
+ /**/
Karsten Hopp 79902d
+     10,
Karsten Hopp 79902d
  /**/
Karsten Hopp 79902d
Karsten Hopp 79902d
-- 
Karsten Hopp 79902d
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 79902d
182. You may not know what is happening in the world, but you know
Karsten Hopp 79902d
     every bit of net-gossip there is.
Karsten Hopp 79902d
Karsten Hopp 79902d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 79902d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 79902d
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 79902d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///