packages: vim/7.3.262 (NEW) - new: 7.3.262

marti marti at pld-linux.org
Mon Aug 29 20:44:27 CEST 2011


Author: marti                        Date: Mon Aug 29 18:44:27 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new: 7.3.262

---- Files affected:
packages/vim:
   7.3.262 (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/vim/7.3.262
diff -u /dev/null packages/vim/7.3.262:1.1
--- /dev/null	Mon Aug 29 20:44:27 2011
+++ packages/vim/7.3.262	Mon Aug 29 20:44:22 2011
@@ -0,0 +1,1356 @@
+To: vim_dev at googlegroups.com
+Subject: Patch 7.3.262
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.262
+Problem:    Photon code style doesn't match Vim style.
+Solution:   Clean up some of it.  (Elias Diem)
+Files:	    src/gui_photon.c
+
+
+*** ../vim-7.3.261/src/gui_photon.c	2011-01-17 20:08:03.000000000 +0100
+--- src/gui_photon.c	2011-07-27 14:07:02.000000000 +0200
+***************
+*** 32,40 ****
+  #endif
+  
+  #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0]))
+! #define RGB(r,g,b) PgRGB(r,g,b)
+  
+! #define EVENT_BUFFER_SIZE sizeof( PhEvent_t ) + 1000
+  
+  /* Some defines for gui_mch_mousehide() */
+  #define MOUSE_HIDE		TRUE
+--- 32,40 ----
+  #endif
+  
+  #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0]))
+! #define RGB(r, g, b) PgRGB(r, g, b)
+  
+! #define EVENT_BUFFER_SIZE sizeof(PhEvent_t) + 1000
+  
+  /* Some defines for gui_mch_mousehide() */
+  #define MOUSE_HIDE		TRUE
+***************
+*** 206,258 ****
+  static PtCallbackF_t gui_ph_handle_menu_unrealized;
+  
+  #ifdef USE_PANEL_GROUP
+! static void gui_ph_get_panelgroup_margins( short*, short*, short*, short* );
+  #endif
+  
+  #ifdef FEAT_TOOLBAR
+! static PhImage_t *gui_ph_toolbar_find_icon( vimmenu_T *menu );
+  #endif
+  
+! static void gui_ph_draw_start( void );
+! static void gui_ph_draw_end( void );
+  
+  /* Set the text for the balloon */
+! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window,
+  			     PtWidget_t *widget,
+  			     int position,
+  			     char *text,
+  			     char *font,
+  			     PgColor_t fill_color,
+! 			     PgColor_t text_color );
+  
+  /****************************************************************************/
+  
+! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window,
+  			     PtWidget_t *widget,
+  			     int position,
+  			     char *text,
+  			     char *font,
+  			     PgColor_t fill_color,
+! 			     PgColor_t text_color )
+  {
+      PtArg_t arg;
+      vimmenu_T *menu;
+      char_u  *tooltip;
+  
+!     PtSetArg( &arg, Pt_ARG_POINTER, &menu, 0 );
+!     PtGetResources( widget, 1, &arg );
+  
+      /* Override the text and position */
+  
+      tooltip = text;
+!     if( menu != NULL )
+      {
+  	int index = MENU_INDEX_TIP;
+! 	if( menu->strings[ index ] != NULL )
+  	    tooltip = menu->strings[ index ];
+      }
+  
+!     return( PtInflateBalloon(
+  	    window,
+  	    widget,
+  	    /* Don't put the balloon at the bottom,
+--- 206,258 ----
+  static PtCallbackF_t gui_ph_handle_menu_unrealized;
+  
+  #ifdef USE_PANEL_GROUP
+! static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*);
+  #endif
+  
+  #ifdef FEAT_TOOLBAR
+! static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu);
+  #endif
+  
+! static void gui_ph_draw_start(void);
+! static void gui_ph_draw_end(void);
+  
+  /* Set the text for the balloon */
+! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window,
+  			     PtWidget_t *widget,
+  			     int position,
+  			     char *text,
+  			     char *font,
+  			     PgColor_t fill_color,
+! 			     PgColor_t text_color);
+  
+  /****************************************************************************/
+  
+! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window,
+  			     PtWidget_t *widget,
+  			     int position,
+  			     char *text,
+  			     char *font,
+  			     PgColor_t fill_color,
+! 			     PgColor_t text_color)
+  {
+      PtArg_t arg;
+      vimmenu_T *menu;
+      char_u  *tooltip;
+  
+!     PtSetArg(&arg, Pt_ARG_POINTER, &menu, 0);
+!     PtGetResources(widget, 1, &arg);
+  
+      /* Override the text and position */
+  
+      tooltip = text;
+!     if (menu != NULL)
+      {
+  	int index = MENU_INDEX_TIP;
+! 	if (menu->strings[ index ] != NULL)
+  	    tooltip = menu->strings[ index ];
+      }
+  
+!     return PtInflateBalloon(
+  	    window,
+  	    widget,
+  	    /* Don't put the balloon at the bottom,
+***************
+*** 261,285 ****
+  	    tooltip,
+  	    font,
+  	    fill_color,
+! 	    text_color ) );
+  }
+  
+      static void
+! gui_ph_resize_container( void )
+  {
+      PhArea_t area;
+  
+!     PtWidgetArea( gui.vimWindow, &area );
+!     PtWidgetPos ( gui.vimContainer, &area.pos );
+  
+!     PtSetResource( gui.vimContainer, Pt_ARG_AREA, &area, 0 );
+  }
+  
+      static int
+  gui_ph_handle_menu_resize(
+  	PtWidget_t *widget,
+  	void *other,
+! 	PtCallbackInfo_t *info )
+  {
+      PtContainerCallback_t *sizes = info->cbdata;
+      PtWidget_t		*container;
+--- 261,285 ----
+  	    tooltip,
+  	    font,
+  	    fill_color,
+! 	    text_color);
+  }
+  
+      static void
+! gui_ph_resize_container(void)
+  {
+      PhArea_t area;
+  
+!     PtWidgetArea(gui.vimWindow, &area);
+!     PtWidgetPos (gui.vimContainer, &area.pos);
+  
+!     PtSetResource(gui.vimContainer, Pt_ARG_AREA, &area, 0);
+  }
+  
+      static int
+  gui_ph_handle_menu_resize(
+  	PtWidget_t *widget,
+  	void *other,
+! 	PtCallbackInfo_t *info)
+  {
+      PtContainerCallback_t *sizes = info->cbdata;
+      PtWidget_t		*container;
+***************
+*** 291,297 ****
+      /* Because vim treats the toolbar and menubar separately,
+       * and here they're lumped together into a PtToolbarGroup,
+       * we only need either menu_height or toolbar_height set at once */
+!     if( gui.menu_is_active )
+      {
+  	gui.menu_height = height;
+  	gui.toolbar_height = 0;
+--- 291,297 ----
+      /* Because vim treats the toolbar and menubar separately,
+       * and here they're lumped together into a PtToolbarGroup,
+       * we only need either menu_height or toolbar_height set at once */
+!     if (gui.menu_is_active)
+      {
+  	gui.menu_height = height;
+  	gui.toolbar_height = 0;
+***************
+*** 310,325 ****
+      container = gui.vimContainer;
+  #endif
+  
+!     PtSetResource( container, Pt_ARG_POS, &below_menu, 0 );
+  
+      gui_ph_resize_container();
+  
+  #ifdef USE_PANEL_GROUP
+      gui_ph_get_panelgroup_margins(
+  	    &pg_margin_top, &pg_margin_bottom,
+! 	    &pg_margin_left, &pg_margin_right );
+  #endif
+!     return( Pt_CONTINUE );
+  }
+  
+  /*
+--- 310,325 ----
+      container = gui.vimContainer;
+  #endif
+  
+!     PtSetResource(container, Pt_ARG_POS, &below_menu, 0);
+  
+      gui_ph_resize_container();
+  
+  #ifdef USE_PANEL_GROUP
+      gui_ph_get_panelgroup_margins(
+  	    &pg_margin_top, &pg_margin_bottom,
+! 	    &pg_margin_left, &pg_margin_right);
+  #endif
+!     return Pt_CONTINUE;
+  }
+  
+  /*
+***************
+*** 330,352 ****
+  gui_ph_handle_timer_cursor(
+  	PtWidget_t *widget,
+  	void *data,
+! 	PtCallbackInfo_t *info )
+  {
+!     if( blink_state == BLINK_ON )
+      {
+  	gui_undraw_cursor();
+  	blink_state = BLINK_OFF;
+! 	PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! 		blink_offtime, 0 );
+      }
+      else
+      {
+  	gui_update_cursor(TRUE, FALSE);
+  	blink_state = BLINK_ON;
+! 	PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! 		blink_ontime, 0 );
+      }
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 330,352 ----
+  gui_ph_handle_timer_cursor(
+  	PtWidget_t *widget,
+  	void *data,
+! 	PtCallbackInfo_t *info)
+  {
+!     if (blink_state == BLINK_ON)
+      {
+  	gui_undraw_cursor();
+  	blink_state = BLINK_OFF;
+! 	PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! 		blink_offtime, 0);
+      }
+      else
+      {
+  	gui_update_cursor(TRUE, FALSE);
+  	blink_state = BLINK_ON;
+! 	PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! 		blink_ontime, 0);
+      }
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 354,360 ****
+  {
+      is_timeout = TRUE;
+  
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 354,360 ----
+  {
+      is_timeout = TRUE;
+  
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 402,408 ****
+  	    break;
+      }
+  
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 402,408 ----
+  	    break;
+      }
+  
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 426,438 ****
+  
+  	    case Pt_SCROLL_SET:
+  		/* FIXME: return straight away here? */
+! 		return( Pt_CONTINUE );
+  		break;
+  	}
+  
+  	gui_drag_scrollbar(sb, value, dragging);
+      }
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 426,438 ----
+  
+  	    case Pt_SCROLL_SET:
+  		/* FIXME: return straight away here? */
+! 		return Pt_CONTINUE;
+  		break;
+  	}
+  
+  	gui_drag_scrollbar(sb, value, dragging);
+      }
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 453,459 ****
+      /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
+      if( key->key_flags & Pk_KF_Compose )
+      {
+! 	return( Pt_CONTINUE );
+      }
+  
+      if( (key->key_flags & Pk_KF_Cap_Valid) &&
+--- 453,459 ----
+      /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
+      if( key->key_flags & Pk_KF_Compose )
+      {
+! 	return Pt_CONTINUE;
+      }
+  
+      if( (key->key_flags & Pk_KF_Cap_Valid) &&
+***************
+*** 473,479 ****
+  		gui_is_menu_shortcut( key->key_cap ) ) ) )
+  	{
+  	    /* Fallthrough and let photon look for the hotkey */
+! 	    return( Pt_CONTINUE );
+  	}
+  #endif
+  
+--- 473,479 ----
+  		gui_is_menu_shortcut( key->key_cap ) ) ) )
+  	{
+  	    /* Fallthrough and let photon look for the hotkey */
+! 	    return Pt_CONTINUE;
+  	}
+  #endif
+  
+***************
+*** 544,550 ****
+  			add_to_input_buf( string, len );
+  		    }
+  
+! 		    return( Pt_CONSUME );
+  		}
+  		len = 0;
+  #endif
+--- 544,550 ----
+  			add_to_input_buf( string, len );
+  		    }
+  
+! 		    return Pt_CONSUME;
+  		}
+  		len = 0;
+  #endif
+***************
+*** 579,585 ****
+  		}
+  		else
+  		{
+! 		    return( Pt_CONTINUE );
+  		}
+  	    }
+  	    else
+--- 579,585 ----
+  		}
+  		else
+  		{
+! 		    return Pt_CONTINUE;
+  		}
+  	    }
+  	    else
+***************
+*** 622,632 ****
+  	if( len > 0 )
+  	{
+  	    add_to_input_buf( string, len );
+! 	    return( Pt_CONSUME );
+  	}
+      }
+  
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 622,632 ----
+  	if( len > 0 )
+  	{
+  	    add_to_input_buf( string, len );
+! 	    return Pt_CONSUME;
+  	}
+      }
+  
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 652,658 ****
+      if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
+      {
+  	gui_mouse_moved( mouse_x, mouse_y );
+! 	return( Pt_CONTINUE );
+      }
+  
+      if( pointer->key_mods & Pk_KM_Shift )
+--- 652,658 ----
+      if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
+      {
+  	gui_mouse_moved( mouse_x, mouse_y );
+! 	return Pt_CONTINUE;
+      }
+  
+      if( pointer->key_mods & Pk_KM_Shift )
+***************
+*** 702,708 ****
+  	gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
+      }
+  
+!     return( Pt_CONTINUE );
+  }
+  
+  /* Handle a focus change of the PtRaw widget */
+--- 702,708 ----
+  	gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
+      }
+  
+!     return Pt_CONTINUE;
+  }
+  
+  /* Handle a focus change of the PtRaw widget */
+***************
+*** 721,727 ****
+  	PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+  		gui_ph_handle_mouse, NULL );
+      }
+!     return( Pt_CONTINUE );
+  }
+  
+      static void
+--- 721,727 ----
+  	PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+  		gui_ph_handle_mouse, NULL );
+      }
+!     return Pt_CONTINUE;
+  }
+  
+      static void
+***************
+*** 793,799 ****
+  	PtRealizeWidget( menu->submenu_id );
+      }
+  
+!     return( Pt_CONTINUE );
+  }
+  
+  /* This is used for pulldown/popup menus and also toolbar buttons */
+--- 793,799 ----
+  	PtRealizeWidget( menu->submenu_id );
+      }
+  
+!     return Pt_CONTINUE;
+  }
+  
+  /* This is used for pulldown/popup menus and also toolbar buttons */
+***************
+*** 805,811 ****
+  	vimmenu_T *menu = (vimmenu_T *) data;
+  	gui_menu_cb( menu );
+      }
+!     return( Pt_CONTINUE );
+  }
+  
+  /* Stop focus from disappearing into the menubar... */
+--- 805,811 ----
+  	vimmenu_T *menu = (vimmenu_T *) data;
+  	gui_menu_cb( menu );
+      }
+!     return Pt_CONTINUE;
+  }
+  
+  /* Stop focus from disappearing into the menubar... */
+***************
+*** 816,822 ****
+  	PtCallbackInfo_t *info )
+  {
+      PtGiveFocus( gui.vimTextArea, NULL );
+!     return( Pt_CONTINUE );
+  }
+  
+      static int
+--- 816,822 ----
+  	PtCallbackInfo_t *info )
+  {
+      PtGiveFocus( gui.vimTextArea, NULL );
+!     return Pt_CONTINUE;
+  }
+  
+      static int
+***************
+*** 826,832 ****
+  	PtCallbackInfo_t *info )
+  {
+      gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
+!     return( Pt_CONTINUE );
+  }
+  
+  /****************************************************************************/
+--- 826,832 ----
+  	PtCallbackInfo_t *info )
+  {
+      gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
+!     return Pt_CONTINUE;
+  }
+  
+  /****************************************************************************/
+***************
+*** 878,884 ****
+  		( STRCMP( items->dname, name ) != 0 ) )
+  	    items = items->next;
+      }
+!     return( items );
+  }
+  
+      static void
+--- 878,884 ----
+  		( STRCMP( items->dname, name ) != 0 ) )
+  	    items = items->next;
+      }
+!     return items;
+  }
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list