To: vim-dev@vim.org Subject: Patch 6.1.389 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.389 (depends on 6.1.366) Problem: Balloon evaluation doesn't work for GTK. has("balloon_eval") doesn't work. Solution: Add balloon evaluation for GTK. Also improve displaying of signs. (Daniel Elstner) Also make ":gui" start the netbeans connection and avoid using netbeans functions when the connection is not open. Files: src/Makefile, src/feature.h, src/gui.c, src/gui.h, src/gui_beval.c, src/gui_beval.h, src/gui_gtk.c, src/gui_gtk_x11.c, src/eval.c, src/memline.c, src/menu.c, src/netbeans.c, src/proto/gui_beval.pro, src/proto/gui_gtk.pro, src/structs.h, src/syntax.c, src/ui.c, src/workshop.c *** ../vim61.388/src/Makefile Sat Mar 8 20:33:31 2003 --- src/Makefile Mon Mar 10 20:49:41 2003 *************** *** 977,985 **** #GUI_TESTTARGET = $(NONE_TESTTARGET) ### GTK GUI ! GTK_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_gtk_f.c GTK_OBJ = objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o \ ! objects/pty.o objects/gui_gtk_f.o GTK_DEFS = -DFEAT_GUI_GTK $(NARROW_PROTO) GTK_IPATH = $(GUI_INC_LOC) GTK_LIBS_DIR = $(GUI_LIB_LOC) --- 983,993 ---- #GUI_TESTTARGET = $(NONE_TESTTARGET) ### GTK GUI ! GTK_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_gtk_f.c \ ! gui_beval.c GTK_OBJ = objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o \ ! objects/pty.o objects/gui_gtk_f.o \ ! objects/gui_beval.o GTK_DEFS = -DFEAT_GUI_GTK $(NARROW_PROTO) GTK_IPATH = $(GUI_INC_LOC) GTK_LIBS_DIR = $(GUI_LIB_LOC) *** ../vim61.388/src/feature.h Sat Mar 8 20:33:31 2003 --- src/feature.h Mon Mar 10 22:46:22 2003 *************** *** 1089,1102 **** * debugger and for tooltips. * Currently only for Athena and Motif. */ ! #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \ ! && ( defined(FEAT_TOOLBAR) \ || defined(FEAT_SUN_WORKSHOP) \ || defined(FEAT_NETBEANS_INTG)) # define FEAT_BEVAL ! # ifndef FEAT_XFONTSET # define FEAT_XFONTSET # endif #endif #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) --- 1089,1107 ---- * debugger and for tooltips. * Currently only for Athena and Motif. */ ! #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \ ! || defined(FEAT_GUI_GTK)) \ ! && ( (defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_GTK)) \ || defined(FEAT_SUN_WORKSHOP) \ || defined(FEAT_NETBEANS_INTG)) # define FEAT_BEVAL ! # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) # define FEAT_XFONTSET # endif + #endif + + #if defined(FEAT_BEVAL) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) + # define FEAT_BEVAL_TIP /* balloon eval used for toolbar tooltip */ #endif #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) *** ../vim61.388/src/gui.c Sat Mar 8 20:33:32 2003 --- src/gui.c Mon Mar 10 22:48:00 2003 *************** *** 253,259 **** #if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF) gui.footer_height = 0; #endif ! #ifdef FEAT_BEVAL gui.tooltip_fontset = NOFONTSET; #endif --- 254,260 ---- #if defined(FEAT_FOOTER) && defined(FEAT_GUI_MOTIF) gui.footer_height = 0; #endif ! #ifdef FEAT_BEVAL_TIP gui.tooltip_fontset = NOFONTSET; #endif *************** *** 509,514 **** --- 510,520 ---- gui_mch_update(); /* Now make sure the shell fits on the screen. */ gui_set_shellsize(FALSE, TRUE); + #endif + #ifdef FEAT_NETBEANS_INTG + if (starting == 0 && usingNetbeans) + /* Tell the client that it can start sending commands. */ + netbeans_startup_done(); #endif return; } *** ../vim61.388/src/gui.h Sat May 4 22:23:07 2002 --- src/gui.h Mon Mar 10 22:48:30 2003 *************** *** 404,410 **** int toolbar_height; /* height of the toolbar */ #endif ! #ifdef FEAT_BEVAL /* Tooltip properties; also used for balloon evaluation */ char_u *rsrc_tooltip_font_name; /* tooltip font name */ char *rsrc_tooltip_fg_name; /* tooltip foreground color name */ --- 404,410 ---- int toolbar_height; /* height of the toolbar */ #endif ! #ifdef FEAT_BEVAL_TIP /* Tooltip properties; also used for balloon evaluation */ char_u *rsrc_tooltip_font_name; /* tooltip font name */ char *rsrc_tooltip_fg_name; /* tooltip foreground color name */ *** ../vim61.388/src/gui_beval.c Sat Mar 8 20:33:32 2003 --- src/gui_beval.c Tue Mar 11 12:31:15 2003 *************** *** 12,40 **** #if defined(FEAT_BEVAL) || defined(PROTO) ! #include ! #ifdef FEAT_GUI_MOTIF ! #include ! #include ! #include ! #include ! #include ! #include #else ! /* Assume Athena */ ! #include ! #include #endif #include "gui_beval.h" extern Widget vimShell; static void addEventHandler __ARGS((Widget, BalloonEval *)); static void removeEventHandler __ARGS((BalloonEval *)); static void pointerEventEH __ARGS((Widget, XtPointer, XEvent *, Boolean *)); static void pointerEvent __ARGS((BalloonEval *, XEvent *)); static void timerRoutine __ARGS((XtPointer, XtIntervalId *)); static void cancelBalloon __ARGS((BalloonEval *)); static void requestBalloon __ARGS((BalloonEval *)); static void drawBalloon __ARGS((BalloonEval *)); --- 12,59 ---- #if defined(FEAT_BEVAL) || defined(PROTO) ! #ifdef FEAT_GUI_GTK ! # include ! # include #else ! # include ! # ifdef FEAT_GUI_MOTIF ! # include ! # include ! # include ! # include ! # include ! # include ! # else ! /* Assume Athena */ ! # include ! # include ! # endif #endif #include "gui_beval.h" + #ifndef FEAT_GUI_GTK extern Widget vimShell; + #endif + #ifdef FEAT_GUI_GTK + static void addEventHandler __ARGS((GtkWidget *, BalloonEval *)); + static void removeEventHandler __ARGS((BalloonEval *)); + static gint target_event_cb __ARGS((GtkWidget *, GdkEvent *, gpointer)); + static gint mainwin_event_cb __ARGS((GtkWidget *, GdkEvent *, gpointer)); + static void pointer_event __ARGS((BalloonEval *, int, int, unsigned int)); + static void key_event __ARGS((BalloonEval *, unsigned, int)); + static gint timeout_cb __ARGS((gpointer)); + static gint balloon_expose_event_cb __ARGS((GtkWidget *, GdkEventExpose *, gpointer)); + static void balloon_draw_cb __ARGS((GtkWidget *, GdkRectangle *area, gpointer)); + #else static void addEventHandler __ARGS((Widget, BalloonEval *)); static void removeEventHandler __ARGS((BalloonEval *)); static void pointerEventEH __ARGS((Widget, XtPointer, XEvent *, Boolean *)); static void pointerEvent __ARGS((BalloonEval *, XEvent *)); static void timerRoutine __ARGS((XtPointer, XtIntervalId *)); + #endif static void cancelBalloon __ARGS((BalloonEval *)); static void requestBalloon __ARGS((BalloonEval *)); static void drawBalloon __ARGS((BalloonEval *)); *************** *** 53,66 **** */ BalloonEval * gui_mch_create_beval_area(target, mesg, mesgCB, clientData) ! Widget target; char_u *mesg; void (*mesgCB)__ARGS((BalloonEval *, int)); ! XtPointer clientData; { char *display_name; /* get from gui.dpy */ int screen_num; char *p; BalloonEval *beval; if (mesg != NULL && mesgCB != NULL) --- 72,87 ---- */ BalloonEval * gui_mch_create_beval_area(target, mesg, mesgCB, clientData) ! void *target; char_u *mesg; void (*mesgCB)__ARGS((BalloonEval *, int)); ! void *clientData; { + #ifndef FEAT_GUI_GTK char *display_name; /* get from gui.dpy */ int screen_num; char *p; + #endif BalloonEval *beval; if (mesg != NULL && mesgCB != NULL) *************** *** 72,81 **** beval = (BalloonEval *)alloc(sizeof(BalloonEval)); if (beval != NULL) { ! beval->target = target; beval->balloonShell = NULL; beval->timerID = (XtIntervalId)NULL; ! beval->appContext = XtWidgetToApplicationContext(target); beval->showState = ShS_NEUTRAL; beval->x = 0; beval->y = 0; --- 93,108 ---- beval = (BalloonEval *)alloc(sizeof(BalloonEval)); if (beval != NULL) { ! #ifdef FEAT_GUI_GTK ! beval->target = GTK_WIDGET(target); ! beval->balloonShell = NULL; ! beval->timerID = 0; ! #else ! beval->target = (Widget)target; beval->balloonShell = NULL; beval->timerID = (XtIntervalId)NULL; ! beval->appContext = XtWidgetToApplicationContext((Widget)target); ! #endif beval->showState = ShS_NEUTRAL; beval->x = 0; beval->y = 0; *************** *** 88,112 **** * and when the pointer rests in a certain spot for a given time * interval, show the beval. */ ! addEventHandler(target, beval); createBalloonEvalWindow(beval); /* * Now create and save the screen width and height. Used in drawing. */ display_name = DisplayString(gui.dpy); p = strrchr(display_name, '.'); ! if (p++ != NULL) ! screen_num = atoi(p); else screen_num = 0; beval->screen_width = DisplayWidth(gui.dpy, screen_num); beval->screen_height = DisplayHeight(gui.dpy, screen_num); } return beval; } /* * Destroy a ballon-eval and free its associated memory. */ --- 115,142 ---- * and when the pointer rests in a certain spot for a given time * interval, show the beval. */ ! addEventHandler(beval->target, beval); createBalloonEvalWindow(beval); + #ifndef FEAT_GUI_GTK /* * Now create and save the screen width and height. Used in drawing. */ display_name = DisplayString(gui.dpy); p = strrchr(display_name, '.'); ! if (p != NULL) ! screen_num = atoi(++p); else screen_num = 0; beval->screen_width = DisplayWidth(gui.dpy, screen_num); beval->screen_height = DisplayHeight(gui.dpy, screen_num); + #endif } return beval; } + #if defined(FEAT_BEVAL_TIP) || defined(PROTO) /* * Destroy a ballon-eval and free its associated memory. */ *************** *** 117,125 **** --- 147,160 ---- cancelBalloon(beval); removeEventHandler(beval); /* Children will automatically be destroyed */ + # ifdef FEAT_GUI_GTK + gtk_widget_destroy(beval->balloonShell); + # else XtDestroyWidget(beval->balloonShell); + # endif vim_free(beval); } + #endif void gui_mch_enable_beval_area(beval) *************** *** 258,263 **** --- 293,544 ---- } #endif + #ifdef FEAT_GUI_GTK + /* + * We can unconditionally use ANSI-style prototypes here since + * GTK+ requires an ANSI C compiler anyway. + */ + static void + addEventHandler(GtkWidget *target, BalloonEval *beval) + { + /* + * Connect to the generic "event" signal instead of the individual + * signals for each event type, because the former is emitted earlier. + * This allows us to catch events independently of the signal handlers + * in gui_gtk_x11.c. + */ + /* Should use GTK_OBJECT() here, but that causes a lint warning... */ + gtk_signal_connect((GtkObject*)(target), "event", + GTK_SIGNAL_FUNC(target_event_cb), + beval); + /* + * Nasty: Key press events go to the main window thus the drawing area + * will never see them. This means we have to connect to the main window + * as well in order to catch those events. + */ + if (gtk_socket_id == 0 && gui.mainwin != NULL + && gtk_widget_is_ancestor(target, gui.mainwin)) + { + gtk_signal_connect((GtkObject*)(gui.mainwin), "event", + GTK_SIGNAL_FUNC(mainwin_event_cb), + beval); + } + } + + static void + removeEventHandler(BalloonEval *beval) + { + gtk_signal_disconnect_by_func((GtkObject*)(beval->target), + GTK_SIGNAL_FUNC(target_event_cb), + beval); + + if (gtk_socket_id == 0 && gui.mainwin != NULL + && gtk_widget_is_ancestor(beval->target, gui.mainwin)) + { + gtk_signal_disconnect_by_func((GtkObject*)(gui.mainwin), + GTK_SIGNAL_FUNC(mainwin_event_cb), + beval); + } + } + + static gint + target_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) + { + BalloonEval *beval = (BalloonEval *)data; + + switch (event->type) + { + case GDK_ENTER_NOTIFY: + pointer_event(beval, (int)event->crossing.x, + (int)event->crossing.y, + event->crossing.state); + break; + case GDK_MOTION_NOTIFY: + if (event->motion.is_hint) + { + int x; + int y; + GdkModifierType state; + /* + * GDK_POINTER_MOTION_HINT_MASK is set, thus we cannot obtain + * the coordinates from the GdkEventMotion struct directly. + */ + gdk_window_get_pointer(widget->window, &x, &y, &state); + pointer_event(beval, x, y, (unsigned int)state); + } + else + { + pointer_event(beval, (int)event->motion.x, + (int)event->motion.y, + event->motion.state); + } + break; + case GDK_LEAVE_NOTIFY: + /* + * Ignore LeaveNotify events that are not "normal". + * Apparently we also get it when somebody else grabs focus. + */ + if (event->crossing.mode == GDK_CROSSING_NORMAL) + cancelBalloon(beval); + break; + case GDK_BUTTON_PRESS: + cancelBalloon(beval); + break; + case GDK_KEY_PRESS: + key_event(beval, event->key.keyval, TRUE); + break; + case GDK_KEY_RELEASE: + key_event(beval, event->key.keyval, FALSE); + break; + default: + break; + } + + return FALSE; /* continue emission */ + } + + /*ARGSUSED*/ + static gint + mainwin_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) + { + BalloonEval *beval = (BalloonEval *)data; + + switch (event->type) + { + case GDK_KEY_PRESS: + key_event(beval, event->key.keyval, TRUE); + break; + case GDK_KEY_RELEASE: + key_event(beval, event->key.keyval, FALSE); + break; + default: + break; + } + + return FALSE; /* continue emission */ + } + + static void + pointer_event(BalloonEval *beval, int x, int y, unsigned state) + { + int distance; + + distance = ABS(x - beval->x) + ABS(y - beval->y); + + if (distance > 4) + { + /* + * Moved out of the balloon location: cancel it. + * Remember button state + */ + beval->state = state; + cancelBalloon(beval); + + /* Mouse buttons are pressed - no balloon now */ + if (!(state & ((int)GDK_BUTTON1_MASK | (int)GDK_BUTTON2_MASK + | (int)GDK_BUTTON3_MASK))) + { + beval->x = x; + beval->y = y; + + if (state & ((int)GDK_MOD1_MASK | (int)GDK_MOD2_MASK + | (int)GDK_MOD3_MASK)) + { + /* + * Alt is pressed -- enter super-evaluate-mode, + * where there is no time delay + */ + if (beval->msgCB != NULL) + { + beval->showState = ShS_PENDING; + (*beval->msgCB)(beval, state); + } + } + else + { + beval->timerID = gtk_timeout_add((unsigned)p_bdlay, + &timeout_cb, beval); + } + } + } + } + + static void + key_event(BalloonEval *beval, unsigned keyval, int is_keypress) + { + if (beval->showState == ShS_SHOWING && beval->msgCB != NULL) + { + switch (keyval) + { + case GDK_Shift_L: + case GDK_Shift_R: + beval->showState = ShS_UPDATE_PENDING; + (*beval->msgCB)(beval, (is_keypress) + ? (int)GDK_SHIFT_MASK : 0); + break; + case GDK_Control_L: + case GDK_Control_R: + beval->showState = ShS_UPDATE_PENDING; + (*beval->msgCB)(beval, (is_keypress) + ? (int)GDK_CONTROL_MASK : 0); + break; + default: + cancelBalloon(beval); + break; + } + } + else + cancelBalloon(beval); + } + + static gint + timeout_cb(gpointer data) + { + BalloonEval *beval = (BalloonEval *)data; + + beval->timerID = 0; + /* + * If the timer event happens then the mouse has stopped long enough for + * a request to be started. The request will only send to the debugger if + * there the mouse is pointing at real data. + */ + requestBalloon(beval); + + return FALSE; /* don't call me again */ + } + + /*ARGSUSED*/ + static gint + balloon_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data) + { + gtk_paint_flat_box(widget->style, widget->window, + GTK_STATE_NORMAL, GTK_SHADOW_OUT, + &event->area, widget, "tooltip", + 0, 0, -1, -1); + return FALSE; + } + + /*ARGSUSED*/ + static void + balloon_draw_cb(GtkWidget *widget, GdkRectangle *area, gpointer data) + { + GtkWidget *child; + GdkRectangle child_area; + + gtk_paint_flat_box(widget->style, widget->window, + GTK_STATE_NORMAL, GTK_SHADOW_OUT, + area, widget, "tooltip", + 0, 0, -1, -1); + + child = GTK_BIN(widget)->child; + + if (gtk_widget_intersect(child, area, &child_area)) + gtk_widget_draw(child, &child_area); + } + + + #else /* !FEAT_GUI_GTK */ + static void addEventHandler(target, beval) Widget target; *************** *** 452,457 **** --- 733,740 ---- requestBalloon(beval); } + #endif /* !FEAT_GUI_GTK */ + static void requestBalloon(beval) BalloonEval *beval; *************** *** 469,474 **** --- 752,855 ---- } } + #ifdef FEAT_GUI_GTK + + /* + * Draw a balloon. + */ + static void + drawBalloon(BalloonEval *beval) + { + if (beval->msg != NULL) + { + GtkRequisition requisition; + int screen_w; + int screen_h; + int x; + int y; + + screen_w = gdk_screen_width(); + screen_h = gdk_screen_height(); + + gtk_widget_ensure_style(beval->balloonShell); + gtk_widget_ensure_style(beval->balloonLabel); + + gtk_label_set_text(GTK_LABEL(beval->balloonLabel), + (const char *)beval->msg); + + /* Calculate the balloon's width and height */ + gtk_widget_size_request(beval->balloonShell, &requisition); + + /* Compute position of the balloon area */ + gdk_window_get_origin(beval->target->window, &x, &y); + x += beval->x + EVAL_OFFSET_X; + y += beval->y + EVAL_OFFSET_Y; + x = MIN(x, screen_w - requisition.width); + y = MIN(y, screen_h - requisition.height); + + /* Show the balloon */ + gtk_widget_set_uposition(beval->balloonShell, x, y); + gtk_widget_show(beval->balloonShell); + + beval->showState = ShS_SHOWING; + } + } + + /* + * Undraw a balloon. + */ + static void + undrawBalloon(BalloonEval *beval) + { + if (beval->balloonShell != NULL) + gtk_widget_hide(beval->balloonShell); + beval->showState = ShS_NEUTRAL; + } + + static void + cancelBalloon(BalloonEval *beval) + { + if (beval->showState == ShS_SHOWING + || beval->showState == ShS_UPDATE_PENDING) + undrawBalloon(beval); + + if (beval->timerID != 0) + { + gtk_timeout_remove(beval->timerID); + beval->timerID = 0; + } + beval->showState = ShS_NEUTRAL; + } + + static void + createBalloonEvalWindow(BalloonEval *beval) + { + beval->balloonShell = gtk_window_new(GTK_WINDOW_POPUP); + + gtk_widget_set_app_paintable(beval->balloonShell, TRUE); + gtk_window_set_policy(GTK_WINDOW(beval->balloonShell), FALSE, FALSE, TRUE); + gtk_widget_set_name(beval->balloonShell, "gtk-tooltips"); + gtk_container_border_width(GTK_CONTAINER(beval->balloonShell), 4); + + gtk_signal_connect((GtkObject*)(beval->balloonShell), "expose_event", + GTK_SIGNAL_FUNC(balloon_expose_event_cb), NULL); + gtk_signal_connect((GtkObject*)(beval->balloonShell), "draw", + GTK_SIGNAL_FUNC(balloon_draw_cb), NULL); + + beval->balloonLabel = gtk_label_new(NULL); + + gtk_label_set_line_wrap(GTK_LABEL(beval->balloonLabel), FALSE); + gtk_label_set_justify(GTK_LABEL(beval->balloonLabel), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment(GTK_MISC(beval->balloonLabel), + (float)0.5, (float)0.5); + gtk_widget_set_name(beval->balloonLabel, "vim-balloon-label"); + gtk_widget_show(beval->balloonLabel); + + gtk_container_add(GTK_CONTAINER(beval->balloonShell), beval->balloonLabel); + } + + #else /* !FEAT_GUI_GTK */ + /* * Draw a balloon. */ *************** *** 622,626 **** --- 1003,1009 ---- labelWidgetClass, beval->balloonShell, args, n); #endif } + + #endif /* !FEAT_GUI_GTK */ #endif /* FEAT_BEVAL */ *** ../vim61.388/src/gui_beval.h Tue Apr 10 16:06:14 2001 --- src/gui_beval.h Mon Mar 10 20:04:17 2003 *************** *** 10,16 **** #if !defined(GUI_BEVAL_H) && (defined(FEAT_BEVAL) || defined(PROTO)) #define GUI_BEVAL_H ! #include typedef enum { --- 10,20 ---- #if !defined(GUI_BEVAL_H) && (defined(FEAT_BEVAL) || defined(PROTO)) #define GUI_BEVAL_H ! #ifdef FEAT_GUI_GTK ! # include ! #else ! # include ! #endif typedef enum { *************** *** 22,31 **** typedef struct { Widget target; /* widget we are monitoring */ Widget balloonShell; Widget balloonLabel; - XtIntervalId timerID; /* timer for run */ BeState showState; /* tells us whats currently going on */ XtAppContext appContext; /* used in event handler */ --- 26,44 ---- typedef struct { + #ifdef FEAT_GUI_GTK + GtkWidget *target; /* widget we are monitoring */ + GtkWidget *balloonShell; + GtkWidget *balloonLabel; + unsigned int timerID; /* timer for run */ + BeState showState; /* tells us whats currently going on */ + int x; + int y; + unsigned int state; /* Button/Modifier key state */ + #else Widget target; /* widget we are monitoring */ Widget balloonShell; Widget balloonLabel; XtIntervalId timerID; /* timer for run */ BeState showState; /* tells us whats currently going on */ XtAppContext appContext; /* used in event handler */ *************** *** 34,45 **** --- 47,61 ---- Position x_root; Position y_root; int state; /* Button/Modifier key state */ + #endif int ts; /* tabstop setting for this buffer */ char_u *msg; void (*msgCB)(); void *clientData; /* For callback */ + #ifndef FEAT_GUI_GTK Dimension screen_width; /* screen width in pixels */ Dimension screen_height; /* screen height in pixels */ + #endif } BalloonEval; #define EVAL_OFFSET_X 10 /* displacement of beval topleft corner from pointer */ *** ../vim61.388/src/gui_gtk.c Sun Oct 27 20:38:46 2002 --- src/gui_gtk.c Mon Mar 10 20:04:17 2003 *************** *** 660,665 **** --- 660,684 ---- } #endif + + #if defined(FEAT_TOOLBAR) || defined(PROTO) + void + gui_mch_menu_set_tip(vimmenu_T *menu) + { + if (menu->id != NULL && menu->parent != NULL && + gui.toolbar != NULL && menu_is_toolbar(menu->parent->name)) + { + char_u *tooltip; + + tooltip = menu->strings[MENU_INDEX_TIP]; + + gtk_tooltips_set_tip(GTK_TOOLBAR(gui.toolbar)->tooltips, + menu->id, (const char *)tooltip, NULL); + } + } + #endif /* FEAT_TOOLBAR */ + + #if defined(FEAT_MENU) || defined(PROTO) /* * Destroy the machine specific menu widget. *************** *** 1415,1427 **** if (butcount > 0) { --def_but; /* 1 is first button */ - if (def_but < 0) - def_but = 0; if (def_but >= butcount) ! def_but = butcount - 1; ! ! gtk_widget_grab_focus(button[def_but]); ! gtk_widget_grab_default(button[def_but]); } if (textfield != NULL) --- 1434,1446 ---- if (butcount > 0) { --def_but; /* 1 is first button */ if (def_but >= butcount) ! def_but = -1; ! if (def_but >= 0) ! { ! gtk_widget_grab_focus(button[def_but]); ! gtk_widget_grab_default(button[def_but]); ! } } if (textfield != NULL) *** ../vim61.388/src/gui_gtk_x11.c Sat Mar 8 20:33:32 2003 --- src/gui_gtk_x11.c Tue Mar 11 10:32:16 2003 *************** *** 629,636 **** } /*ARGSUSED*/ ! static void ! enter_notify_event(GtkContainer * container, gpointer data) { if (blink_state == BLINK_NONE) gui_mch_start_blink(); --- 629,636 ---- } /*ARGSUSED*/ ! static gint ! enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data) { if (blink_state == BLINK_NONE) gui_mch_start_blink(); *************** *** 638,651 **** /* make sure keyboard input goes there */ if (gtk_socket_id == 0 || !GTK_WIDGET_HAS_FOCUS(gui.drawarea)) gtk_widget_grab_focus(gui.drawarea); } /*ARGSUSED*/ ! static void ! leave_notify_event(GtkContainer * container, gpointer data) { if (blink_state != BLINK_NONE) gui_mch_stop_blink(); } /*ARGSUSED*/ --- 638,655 ---- /* make sure keyboard input goes there */ if (gtk_socket_id == 0 || !GTK_WIDGET_HAS_FOCUS(gui.drawarea)) gtk_widget_grab_focus(gui.drawarea); + + return FALSE; } /*ARGSUSED*/ ! static gint ! leave_notify_event(GtkWidget* widget, GdkEventCrossing *event, gpointer data) { if (blink_state != BLINK_NONE) gui_mch_stop_blink(); + + return FALSE; } /*ARGSUSED*/ *************** *** 1976,1981 **** --- 1980,1987 ---- GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_KEY_PRESS_MASK | + GDK_KEY_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); *************** *** 2252,2259 **** /* Make this run after any internal handling of the client event happened * to make sure that all changes implicated by it are already in place and ! * we thus can make our own adjustments. ! */ gtk_signal_connect_after(GTK_OBJECT(gui.mainwin), "client_event", GTK_SIGNAL_FUNC(client_event_cb), NULL); --- 2258,2264 ---- /* Make this run after any internal handling of the client event happened * to make sure that all changes implicated by it are already in place and ! * we thus can make our own adjustments. */ gtk_signal_connect_after(GTK_OBJECT(gui.mainwin), "client_event", GTK_SIGNAL_FUNC(client_event_cb), NULL); *************** *** 3744,3760 **** GdkVisual *visual; GdkColormap *cmap; GdkColorContext *cc; ! GdkColor c; visual = gtk_widget_get_visual(gui.mainwin); cmap = gtk_widget_get_colormap(gui.mainwin); cc = gdk_color_context_new(visual, cmap); ! c.pixel = pixel; ! gdk_color_context_query_color(cc, &c); ! ! return ((c.red & 0xff00) << 8) + (c.green & 0xff00) ! + ((unsigned)c.blue >> 8); } /* --- 3749,3767 ---- GdkVisual *visual; GdkColormap *cmap; GdkColorContext *cc; ! GdkColor color; visual = gtk_widget_get_visual(gui.mainwin); cmap = gtk_widget_get_colormap(gui.mainwin); cc = gdk_color_context_new(visual, cmap); ! color.pixel = pixel; ! gdk_color_context_query_color(cc, &color); ! gdk_color_context_free(cc); ! ! return (((unsigned)color.red & 0xff00) << 8) ! + ((unsigned)color.green & 0xff00) ! + (((unsigned)color.blue & 0xff00) >> 8); } /* *************** *** 3882,3950 **** #endif #if defined(FEAT_SIGN_ICONS) || defined(PROTO) ! ! /* Signs are currently always 2 chars wide. Hopefully the font is big enough ! * to provide room for the bitmap! */ ! # define SIGN_WIDTH (gui.char_width * 2) # define SIGN_HEIGHT (gui.char_height) ! #if 0 /* not used */ ! void ! gui_mch_clearsign(row) ! int row; { ! if (gui.in_use) ! XClearArea(gui.dpy, gui.wid, 0, TEXT_Y(row) - gui.char_height, ! SIGN_WIDTH, gui.char_height, FALSE); } ! #endif void ! gui_mch_drawsign(row, col, typenr) ! int row; ! int col; ! int typenr; { ! GdkPixmap *sign = 0; ! gint width; ! gint height; ! if (gui.in_use && (sign = (GdkPixmap *)sign_get_image(typenr)) != NULL) { ! gdk_window_get_size(sign, &width, &height); ! gdk_window_clear_area(gui.drawarea->window, TEXT_X(col), ! TEXT_Y(row) - height, ! SIGN_WIDTH, gui.char_height); ! gdk_draw_pixmap(gui.drawarea->window, gui.text_gc, sign, 0, 0, ! TEXT_X(col) + (SIGN_WIDTH - width) / 2, ! TEXT_Y(row) - (SIGN_HEIGHT - height) / 2 - height, ! width, height); } } void * ! gui_mch_register_sign(signfile) ! char_u *signfile; { ! GdkPixmap *sign; ! sign = NULL; ! if (signfile[0] != NUL && signfile[0] != '-') { ! sign = gdk_pixmap_create_from_xpm(gui.drawarea->window, NULL, NULL, ! (char *)signfile); ! if (sign == NULL) ! EMSG(_("E255: Couldn't read in sign data!")); ! } ! return (void *)sign; } - /*ARGSUSED*/ void ! gui_mch_destroy_sign(sign) ! void *sign; { ! /* ??? */ } #endif /* FEAT_SIGN_ICONS */ --- 3889,4009 ---- #endif #if defined(FEAT_SIGN_ICONS) || defined(PROTO) ! /* ! * Signs are currently always 2 chars wide. The pixmap will be cut off ! * if the current font is not big enough, or centered if it's too small. ! */ ! # define SIGN_WIDTH (2 * gui.char_width) # define SIGN_HEIGHT (gui.char_height) ! typedef struct { ! GdkPixmap *pixmap; ! GdkBitmap *mask; } ! signicon_T; void ! gui_mch_drawsign(int row, int col, int typenr) { ! signicon_T *sign; ! sign = (signicon_T *)sign_get_image(typenr); ! ! if (sign != NULL && sign->pixmap != NULL ! && gui.drawarea != NULL && gui.drawarea->window != NULL) { ! int width; ! int height; ! int xoffset; ! int yoffset; ! ! gdk_window_get_size(sign->pixmap, &width, &height); ! ! /* The origin is the upper-left corner of the pixmap. Therefore ! * these offset may become negative if the pixmap is smaller than ! * the 2x1 cells reserved for the sign icon. */ ! xoffset = (width - SIGN_WIDTH) / 2; ! yoffset = (height - SIGN_HEIGHT) / 2; ! ! gdk_gc_set_exposures(gui.text_gc, ! gui.visibility != GDK_VISIBILITY_UNOBSCURED); ! gdk_gc_set_foreground(gui.text_gc, gui.bgcolor); ! ! gdk_draw_rectangle(gui.drawarea->window, ! gui.text_gc, ! TRUE, ! FILL_X(col), ! FILL_Y(row), ! SIGN_WIDTH, ! SIGN_HEIGHT); ! ! /* Set the clip mask for bilevel transparency */ ! if (sign->mask != NULL) ! { ! gdk_gc_set_clip_origin(gui.text_gc, ! FILL_X(col) - xoffset, ! FILL_Y(row) - yoffset); ! gdk_gc_set_clip_mask(gui.text_gc, sign->mask); ! } ! ! gdk_draw_pixmap(gui.drawarea->window, ! gui.text_gc, ! sign->pixmap, ! MAX(0, xoffset), ! MAX(0, yoffset), ! FILL_X(col) - MIN(0, xoffset), ! FILL_Y(row) - MIN(0, yoffset), ! MIN(width, SIGN_WIDTH), ! MIN(height, SIGN_HEIGHT)); ! ! gdk_gc_set_clip_mask(gui.text_gc, NULL); } } void * ! gui_mch_register_sign(char_u *signfile) { ! signicon_T *sign = NULL; ! if (signfile[0] != NUL && signfile[0] != '-' ! && gui.drawarea != NULL && gui.drawarea->window != NULL) { ! sign = (signicon_T *)alloc(sizeof(signicon_T)); ! if (sign != NULL) /* NULL == OOM == "cannot really happen" */ ! { ! sign->mask = NULL; ! sign->pixmap = gdk_pixmap_colormap_create_from_xpm( ! gui.drawarea->window, NULL, ! &sign->mask, NULL, ! (const char *)signfile); ! ! if (sign->pixmap == NULL) ! { ! vim_free(sign); ! sign = NULL; ! EMSG(_("E255: Couldn't read in sign data!")); ! } ! } ! } ! return sign; } void ! gui_mch_destroy_sign(void *sign) { ! if (sign != NULL) ! { ! signicon_T *signicon = (signicon_T *)sign; ! ! if (signicon->pixmap != NULL) ! gdk_pixmap_unref(signicon->pixmap); ! if (signicon->mask != NULL) ! gdk_bitmap_unref(signicon->mask); ! ! vim_free(signicon); ! } } + #endif /* FEAT_SIGN_ICONS */ *** ../vim61.388/src/eval.c Tue Mar 11 12:43:38 2003 --- src/eval.c Tue Mar 11 11:59:42 2003 *************** *** 4230,4235 **** --- 4231,4239 ---- #ifdef FEAT_AUTOCMD "autocmd", #endif + #ifdef FEAT_BEVAL + "balloon_eval", + #endif #if defined(SOME_BUILTIN_TCAPS) || defined(ALL_BUILTIN_TCAPS) "builtin_terms", # ifdef ALL_BUILTIN_TCAPS *************** *** 4469,4474 **** --- 4473,4481 ---- #ifdef FEAT_SUN_WORKSHOP "sun_workshop", #endif + #ifdef FEAT_NETBEANS_INTG + "netbeans_intg", + #endif #ifdef FEAT_SYN_HL "syntax", #endif *** ../vim61.388/src/memline.c Sat Mar 8 20:33:32 2003 --- src/memline.c Mon Mar 10 22:30:31 2003 *************** *** 2436,2444 **** ml_updatechunk(buf, lnum + 1, (long)len, ML_CHNK_ADDLINE); #endif #ifdef FEAT_NETBEANS_INTG ! if (STRLEN(line) > 0) ! netbeans_inserted(buf, lnum+1, (colnr_T)0, 0, line, STRLEN(line)); ! netbeans_inserted(buf, lnum+1, (colnr_T)STRLEN(line), 0, (char_u *)"\n", 1); #endif return OK; } --- 2436,2448 ---- ml_updatechunk(buf, lnum + 1, (long)len, ML_CHNK_ADDLINE); #endif #ifdef FEAT_NETBEANS_INTG ! if (usingNetbeans) ! { ! if (STRLEN(line) > 0) ! netbeans_inserted(buf, lnum+1, (colnr_T)0, 0, line, STRLEN(line)); ! netbeans_inserted(buf, lnum+1, (colnr_T)STRLEN(line), 0, ! (char_u *)"\n", 1); ! } #endif return OK; } *************** *** 2470,2477 **** if (copy && (line = vim_strsave(line)) == NULL) /* allocate memory */ return FAIL; #ifdef FEAT_NETBEANS_INTG ! netbeans_removed(curbuf, lnum, 0, (long)STRLEN(ml_get(lnum))); ! netbeans_inserted(curbuf, lnum, 0, 0, line, STRLEN(line)); #endif if (curbuf->b_ml.ml_line_lnum != lnum) /* other line buffered */ ml_flush_line(curbuf); /* flush it */ --- 2474,2484 ---- if (copy && (line = vim_strsave(line)) == NULL) /* allocate memory */ return FAIL; #ifdef FEAT_NETBEANS_INTG ! if (usingNetbeans) ! { ! netbeans_removed(curbuf, lnum, 0, (long)STRLEN(ml_get(lnum))); ! netbeans_inserted(curbuf, lnum, 0, 0, line, STRLEN(line)); ! } #endif if (curbuf->b_ml.ml_line_lnum != lnum) /* other line buffered */ ml_flush_line(curbuf); /* flush it */ *************** *** 2574,2580 **** line_size = ((dp->db_index[idx - 1]) & DB_INDEX_MASK) - line_start; #ifdef FEAT_NETBEANS_INTG ! netbeans_removed(buf, lnum, 0, line_size); #endif /* --- 2581,2588 ---- line_size = ((dp->db_index[idx - 1]) & DB_INDEX_MASK) - line_start; #ifdef FEAT_NETBEANS_INTG ! if (usingNetbeans) ! netbeans_removed(buf, lnum, 0, line_size); #endif /* *** ../vim61.388/src/menu.c Sun Oct 13 20:12:29 2002 --- src/menu.c Mon Mar 10 22:48:47 2003 *************** *** 570,576 **** #ifdef FEAT_GUI_MOTIF menu->sensitive = TRUE; /* the default */ #endif ! #ifdef FEAT_BEVAL menu->tip = NULL; #endif #ifdef FEAT_GUI_ATHENA --- 570,576 ---- #ifdef FEAT_GUI_MOTIF menu->sensitive = TRUE; /* the default */ #endif ! #ifdef FEAT_BEVAL_TIP menu->tip = NULL; #endif #ifdef FEAT_GUI_ATHENA *************** *** 764,770 **** menu->silent[i] = menuarg->silent[0]; } } ! #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL) /* Need to update the menu tip. */ if (modes & MENU_TIP_MODE) gui_mch_menu_set_tip(menu); --- 764,770 ---- menu->silent[i] = menuarg->silent[0]; } } ! #if defined(FEAT_TOOLBAR) && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK)) /* Need to update the menu tip. */ if (modes & MENU_TIP_MODE) gui_mch_menu_set_tip(menu); *************** *** 942,948 **** if (modes & MENU_TIP_MODE) { free_menu_string(menu, MENU_INDEX_TIP); ! #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL) /* Need to update the menu tip. */ if (gui.in_use) gui_mch_menu_set_tip(menu); --- 942,948 ---- if (modes & MENU_TIP_MODE) { free_menu_string(menu, MENU_INDEX_TIP); ! #if defined(FEAT_TOOLBAR) && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK)) /* Need to update the menu tip. */ if (gui.in_use) gui_mch_menu_set_tip(menu); *** ../vim61.388/src/netbeans.c Sat Mar 8 20:33:32 2003 --- src/netbeans.c Mon Mar 10 22:32:25 2003 *************** *** 57,62 **** --- 57,65 ---- static int nb_do_cmd __ARGS((int, char_u *, int, int, char_u *)); static void nb_send __ARGS((char *buf, char *fun)); static void warn __ARGS((char *fmt, ...)); + #ifdef FEAT_BEVAL + static void netbeans_beval_cb __ARGS((BalloonEval *beval, int state)); + #endif static int sd = -1; /* socket fd for Netbeans connection */ #ifdef FEAT_GUI_MOTIF *************** *** 72,79 **** static int oldFire = 1; static int exit_delay = 2; /* exit delay in seconds */ ! #if defined(FEAT_BEVAL) extern Widget textArea; BalloonEval *balloonEval = NULL; #endif --- 75,84 ---- static int oldFire = 1; static int exit_delay = 2; /* exit delay in seconds */ ! #ifdef FEAT_BEVAL ! # if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) extern Widget textArea; + # endif BalloonEval *balloonEval = NULL; #endif *************** *** 118,123 **** --- 123,139 ---- void netbeans_gtk_connect(void) { + # ifdef FEAT_BEVAL + /* + * Set up the Balloon Expression Evaluation area. + * Always create it but disable it when 'ballooneval' isn't set. + */ + balloonEval = gui_mch_create_beval_area(gui.drawarea, NULL, + &netbeans_beval_cb, NULL); + if (!p_beval) + gui_mch_disable_beval_area(balloonEval); + # endif + netbeans_connect(); if (sd > 0) { *************** *** 2175,2193 **** { char *cmd = "0:startupDone=0\n"; nbdebug(("EVT: %s", cmd)); nb_send(cmd, "netbeans_startup_done"); ! #if defined(FEAT_BEVAL) ! /* ! * Set up the Balloon Expression Evaluation area. ! * Always create it but disable it when 'ballooneval' isn't set. ! */ ! balloonEval = gui_mch_create_beval_area(textArea, NULL, ! netbeans_beval_cb, NULL); ! if (!p_beval) ! gui_mch_disable_beval_area(balloonEval); ! #endif } #if defined(FEAT_GUI_MOTIF) || defined(PROTO) --- 2191,2216 ---- { char *cmd = "0:startupDone=0\n"; + if (!haveConnection) + return; + nbdebug(("EVT: %s", cmd)); nb_send(cmd, "netbeans_startup_done"); ! # if defined(FEAT_BEVAL) && defined(FEAT_GUI_MOTIF) ! if (gui.in_use) ! { ! /* ! * Set up the Balloon Expression Evaluation area for Motif. ! * GTK can do it earlier... ! * Always create it but disable it when 'ballooneval' isn't set. ! */ ! balloonEval = gui_mch_create_beval_area(textArea, NULL, ! &netbeans_beval_cb, NULL); ! if (!p_beval) ! gui_mch_disable_beval_area(balloonEval); ! } ! # endif } #if defined(FEAT_GUI_MOTIF) || defined(PROTO) *************** *** 2199,2204 **** --- 2222,2230 ---- { char buf[128]; + if (!haveConnection) + return; + sprintf(buf, "0:geometry=%d %d %d %d %d\n", cmdno, (int)Columns, (int)Rows, new_x, new_y); nbdebug(("EVT: %s", buf)); *************** *** 2214,2219 **** --- 2240,2248 ---- { char buffer[2*MAXPATHLEN]; + if (!haveConnection) + return; + sprintf(buffer, "0:fileOpened=%d \"%s\" %s %s\n", 0, filename, *************** *** 2237,2242 **** --- 2266,2274 ---- nbbuf_T *nbbuf = nb_get_buf(bufno); char buffer[2*MAXPATHLEN]; + if (!haveConnection) + return; + if (!netbeansCloseFile) { nbdebug(("ignoring file_closed for %s\n", bufp->b_ffname)); *************** *** 2271,2277 **** int bufno; nbbuf_T *nbbuf; ! if (!netbeansFireChanges) return NULL; /* changes are not reported at all */ bufno = nb_getbufno(bufp); --- 2303,2309 ---- int bufno; nbbuf_T *nbbuf; ! if (!haveConnection || !netbeansFireChanges) return NULL; /* changes are not reported at all */ bufno = nb_getbufno(bufp); *** ../vim61.388/src/proto/gui_beval.pro Sat Mar 8 20:33:32 2003 --- src/proto/gui_beval.pro Mon Mar 10 20:04:17 2003 *************** *** 1,5 **** /* gui_beval.c */ ! BalloonEval *gui_mch_create_beval_area __ARGS((Widget target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), XtPointer clientData)); void gui_mch_destroy_beval_area __ARGS((BalloonEval *beval)); void gui_mch_enable_beval_area __ARGS((BalloonEval *beval)); void gui_mch_disable_beval_area __ARGS((BalloonEval *beval)); --- 1,5 ---- /* gui_beval.c */ ! BalloonEval *gui_mch_create_beval_area __ARGS((void *target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), void *clientData)); void gui_mch_destroy_beval_area __ARGS((BalloonEval *beval)); void gui_mch_enable_beval_area __ARGS((BalloonEval *beval)); void gui_mch_disable_beval_area __ARGS((BalloonEval *beval)); *** ../vim61.388/src/proto/gui_gtk.pro Fri Mar 22 21:41:26 2002 --- src/proto/gui_gtk.pro Mon Mar 10 20:04:17 2003 *************** *** 4,9 **** --- 4,10 ---- void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h)); void gui_gtk_set_mnemonics __ARGS((int enable)); void gui_mch_toggle_tearoffs __ARGS((int enable)); + void gui_mch_menu_set_tip __ARGS((vimmenu_T *menu)); void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max)); void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h)); *** ../vim61.388/src/structs.h Sun Mar 9 14:35:27 2003 --- src/structs.h Mon Mar 10 22:49:53 2003 *************** *** 1614,1620 **** #ifdef FEAT_GUI_MOTIF Pixmap image_ins; /* Toolbar image insensitive */ #endif ! #ifdef FEAT_BEVAL BalloonEval *tip; /* tooltip for this menu item */ #endif #ifdef FEAT_GUI_W16 --- 1616,1622 ---- #ifdef FEAT_GUI_MOTIF Pixmap image_ins; /* Toolbar image insensitive */ #endif ! #ifdef FEAT_BEVAL_TIP BalloonEval *tip; /* tooltip for this menu item */ #endif #ifdef FEAT_GUI_W16 *** ../vim61.388/src/syntax.c Sun Mar 9 14:35:27 2003 --- src/syntax.c Mon Mar 10 22:51:01 2003 *************** *** 6173,6179 **** */ if (gui.in_use) { ! # ifdef FEAT_BEVAL gui_init_tooltip_font(); # endif # if defined(FEAT_MENU) && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) --- 6173,6179 ---- */ if (gui.in_use) { ! # ifdef FEAT_BEVAL_TIP gui_init_tooltip_font(); # endif # if defined(FEAT_MENU) && (defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)) *************** *** 7179,7185 **** # ifdef FONTSET_ALWAYS || do_menu # endif ! # ifdef FEAT_BEVAL /* In Athena & Motif, the Tooltip highlight group is always a fontset */ || do_tooltip # endif --- 7179,7185 ---- # ifdef FONTSET_ALWAYS || do_menu # endif ! # ifdef FEAT_BEVAL_TIP /* In Athena & Motif, the Tooltip highlight group is always a fontset */ || do_tooltip # endif *************** *** 7188,7194 **** # ifdef FONTSET_ALWAYS || do_menu # endif ! # ifdef FEAT_BEVAL || do_tooltip # endif ); --- 7188,7194 ---- # ifdef FONTSET_ALWAYS || do_menu # endif ! # ifdef FEAT_BEVAL_TIP || do_tooltip # endif ); *** ../vim61.388/src/ui.c Sun Mar 9 14:08:43 2003 --- src/ui.c Mon Mar 10 22:34:08 2003 *************** *** 2682,2688 **** if (col < 0) { #ifdef FEAT_NETBEANS_INTG ! netbeans_gutter_click(lnum); #endif col = 0; } --- 2682,2689 ---- if (col < 0) { #ifdef FEAT_NETBEANS_INTG ! if (usingNetbeans) ! netbeans_gutter_click(lnum); #endif col = 0; } *** ../vim61.388/src/workshop.c Sat Mar 8 20:33:33 2003 --- src/workshop.c Mon Mar 10 20:04:17 2003 *************** *** 226,232 **** --- 226,237 ---- * Set up the Balloon Expression Evaluation area. * It's enabled by default. Disable it when 'ballooneval' is off. */ + # ifdef FEAT_GUI_GTK + balloonEval = gui_mch_create_beval_area(gui.drawarea, NULL, + &bevalCB, NULL); + # else balloonEval = gui_mch_create_beval_area(textArea, NULL, bevalCB, NULL); + # endif if (!p_beval) gui_mch_disable_beval_area(balloonEval); } *** ../vim61.388/src/version.c Tue Mar 11 12:43:38 2003 --- src/version.c Tue Mar 11 12:45:58 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 389, /**/ -- How To Keep A Healthy Level Of Insanity: 15. Five days in advance, tell your friends you can't attend their party because you're not in the mood. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///