|
Karsten Hopp |
81c285 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
81c285 |
Subject: Patch 7.2.181
|
|
Karsten Hopp |
81c285 |
Fcc: outbox
|
|
Karsten Hopp |
81c285 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
81c285 |
Mime-Version: 1.0
|
|
Karsten Hopp |
81c285 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
81c285 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
81c285 |
------------
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
Patch 7.2.181
|
|
Karsten Hopp |
81c285 |
Problem: Some more compiler warnings when using gcc -Wextra.
|
|
Karsten Hopp |
81c285 |
Solution: Add UNUSED and type casts.
|
|
Karsten Hopp |
81c285 |
Files: src/if_mzsch.c, src/gui.c, src/gui_gtk.c, src/gui_gtk_x11.c,
|
|
Karsten Hopp |
81c285 |
src/gui_gtk_f.c, src/gui_beval.c, src/netbeans.c
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/if_mzsch.c 2007-07-06 19:43:08.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/if_mzsch.c 2009-05-16 22:24:18.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 667,679 ****
|
|
Karsten Hopp |
81c285 |
static void CALLBACK
|
|
Karsten Hopp |
81c285 |
timer_proc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_GTK)
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! timer_proc(gpointer data)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! timer_proc(XtPointer timed_out, XtIntervalId *interval_id)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_MAC)
|
|
Karsten Hopp |
81c285 |
pascal void
|
|
Karsten Hopp |
81c285 |
timer_proc(EventLoopTimerRef theTimer, void *userData)
|
|
Karsten Hopp |
81c285 |
--- 667,677 ----
|
|
Karsten Hopp |
81c285 |
static void CALLBACK
|
|
Karsten Hopp |
81c285 |
timer_proc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_GTK)
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! timer_proc(gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! timer_proc(XtPointer timed_out UNUSED, XtIntervalId *interval_id UNUSED)
|
|
Karsten Hopp |
81c285 |
# elif defined(FEAT_GUI_MAC)
|
|
Karsten Hopp |
81c285 |
pascal void
|
|
Karsten Hopp |
81c285 |
timer_proc(EventLoopTimerRef theTimer, void *userData)
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/gui.c 2008-12-03 18:50:09.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/gui.c 2009-05-17 15:52:18.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 678,688 ****
|
|
Karsten Hopp |
81c285 |
* Return OK when able to set the font. When it failed FAIL is returned and
|
|
Karsten Hopp |
81c285 |
* the fonts are unchanged.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
int
|
|
Karsten Hopp |
81c285 |
gui_init_font(font_list, fontset)
|
|
Karsten Hopp |
81c285 |
char_u *font_list;
|
|
Karsten Hopp |
81c285 |
! int fontset;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#define FONTLEN 320
|
|
Karsten Hopp |
81c285 |
char_u font_name[FONTLEN];
|
|
Karsten Hopp |
81c285 |
--- 678,687 ----
|
|
Karsten Hopp |
81c285 |
* Return OK when able to set the font. When it failed FAIL is returned and
|
|
Karsten Hopp |
81c285 |
* the fonts are unchanged.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
int
|
|
Karsten Hopp |
81c285 |
gui_init_font(font_list, fontset)
|
|
Karsten Hopp |
81c285 |
char_u *font_list;
|
|
Karsten Hopp |
81c285 |
! int fontset UNUSED;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#define FONTLEN 320
|
|
Karsten Hopp |
81c285 |
char_u font_name[FONTLEN];
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1138,1147 ****
|
|
Karsten Hopp |
81c285 |
* Position the various GUI components (text area, menu). The vertical
|
|
Karsten Hopp |
81c285 |
* scrollbars are NOT handled here. See gui_update_scrollbars().
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
gui_position_components(total_width)
|
|
Karsten Hopp |
81c285 |
! int total_width;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int text_area_x;
|
|
Karsten Hopp |
81c285 |
int text_area_y;
|
|
Karsten Hopp |
81c285 |
--- 1137,1145 ----
|
|
Karsten Hopp |
81c285 |
* Position the various GUI components (text area, menu). The vertical
|
|
Karsten Hopp |
81c285 |
* scrollbars are NOT handled here. See gui_update_scrollbars().
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
gui_position_components(total_width)
|
|
Karsten Hopp |
81c285 |
! int total_width UNUSED;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int text_area_x;
|
|
Karsten Hopp |
81c285 |
int text_area_y;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1374,1383 ****
|
|
Karsten Hopp |
81c285 |
* If "fit_to_display" is TRUE then the size may be reduced to fit the window
|
|
Karsten Hopp |
81c285 |
* on the screen.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_set_shellsize(mustset, fit_to_display, direction)
|
|
Karsten Hopp |
81c285 |
! int mustset; /* set by the user */
|
|
Karsten Hopp |
81c285 |
int fit_to_display;
|
|
Karsten Hopp |
81c285 |
int direction; /* RESIZE_HOR, RESIZE_VER */
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 1372,1380 ----
|
|
Karsten Hopp |
81c285 |
* If "fit_to_display" is TRUE then the size may be reduced to fit the window
|
|
Karsten Hopp |
81c285 |
* on the screen.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_set_shellsize(mustset, fit_to_display, direction)
|
|
Karsten Hopp |
81c285 |
! int mustset UNUSED; /* set by the user */
|
|
Karsten Hopp |
81c285 |
int fit_to_display;
|
|
Karsten Hopp |
81c285 |
int direction; /* RESIZE_HOR, RESIZE_VER */
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3120,3126 ****
|
|
Karsten Hopp |
81c285 |
* If "oldval" is not NULL, "oldval" is the previous value, the new value is
|
|
Karsten Hopp |
81c285 |
* in p_go.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_init_which_components(oldval)
|
|
Karsten Hopp |
81c285 |
char_u *oldval;
|
|
Karsten Hopp |
81c285 |
--- 3117,3122 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4411,4417 ****
|
|
Karsten Hopp |
81c285 |
if (curwin->w_p_wrap)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if (curwin->w_leftcol == scrollbar_value)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
curwin->w_leftcol = (colnr_T)scrollbar_value;
|
|
Karsten Hopp |
81c285 |
--- 4407,4413 ----
|
|
Karsten Hopp |
81c285 |
if (curwin->w_p_wrap)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! if ((long_u)curwin->w_leftcol == scrollbar_value)
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
curwin->w_leftcol = (colnr_T)scrollbar_value;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4424,4430 ****
|
|
Karsten Hopp |
81c285 |
&& longest_lnum < curwin->w_botline
|
|
Karsten Hopp |
81c285 |
&& !virtual_active())
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! if (scrollbar_value > scroll_line_len(curwin->w_cursor.lnum))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.lnum = longest_lnum;
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.col = 0;
|
|
Karsten Hopp |
81c285 |
--- 4420,4426 ----
|
|
Karsten Hopp |
81c285 |
&& longest_lnum < curwin->w_botline
|
|
Karsten Hopp |
81c285 |
&& !virtual_active())
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! if (scrollbar_value > (long_u)scroll_line_len(curwin->w_cursor.lnum))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.lnum = longest_lnum;
|
|
Karsten Hopp |
81c285 |
curwin->w_cursor.col = 0;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4670,4676 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Find window where the mouse pointer "y" coordinate is in.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static win_T *
|
|
Karsten Hopp |
81c285 |
xy2win(x, y)
|
|
Karsten Hopp |
81c285 |
int x;
|
|
Karsten Hopp |
81c285 |
--- 4666,4671 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5124,5130 ****
|
|
Karsten Hopp |
81c285 |
* of dropped files, they will be freed in this function, and caller can't use
|
|
Karsten Hopp |
81c285 |
* fnames after call this function.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_handle_drop(x, y, modifiers, fnames, count)
|
|
Karsten Hopp |
81c285 |
int x;
|
|
Karsten Hopp |
81c285 |
--- 5119,5124 ----
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/gui_gtk.c 2008-07-31 22:29:28.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/gui_gtk.c 2009-05-17 16:06:30.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 285,298 ****
|
|
Karsten Hopp |
81c285 |
return image;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
! {
|
|
Karsten Hopp |
81c285 |
! /* When we're in a GtkPlug, we don't have window focus events, only widget focus.
|
|
Karsten Hopp |
81c285 |
! * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug)
|
|
Karsten Hopp |
81c285 |
! * immediately pass it to mainwin.
|
|
Karsten Hopp |
81c285 |
! */
|
|
Karsten Hopp |
81c285 |
if (gtk_socket_id != 0)
|
|
Karsten Hopp |
81c285 |
gtk_widget_grab_focus(gui.drawarea);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 285,298 ----
|
|
Karsten Hopp |
81c285 |
return image;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! toolbar_button_focus_in_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventFocus *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
! {
|
|
Karsten Hopp |
81c285 |
! /* When we're in a GtkPlug, we don't have window focus events, only widget
|
|
Karsten Hopp |
81c285 |
! * focus. To emulate stand-alone gvim, if a button gets focus (e.g.,
|
|
Karsten Hopp |
81c285 |
! * <Tab> into GtkPlug) immediately pass it to mainwin. */
|
|
Karsten Hopp |
81c285 |
if (gtk_socket_id != 0)
|
|
Karsten Hopp |
81c285 |
gtk_widget_grab_focus(gui.drawarea);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 585,593 ****
|
|
Karsten Hopp |
81c285 |
gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! menu_item_activate(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_menu_cb((vimmenu_T *)data);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 585,592 ----
|
|
Karsten Hopp |
81c285 |
gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! menu_item_activate(GtkWidget *widget UNUSED, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_menu_cb((vimmenu_T *)data);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1202,1210 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifndef USE_FILE_CHOOSER
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! browse_ok_cb(GtkWidget *widget, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_T *vw = (gui_T *)cbdata;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 1201,1208 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifndef USE_FILE_CHOOSER
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! browse_ok_cb(GtkWidget *widget UNUSED, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_T *vw = (gui_T *)cbdata;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1218,1226 ****
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! browse_cancel_cb(GtkWidget *widget, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_T *vw = (gui_T *)cbdata;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 1216,1223 ----
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! browse_cancel_cb(GtkWidget *widget UNUSED, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_T *vw = (gui_T *)cbdata;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1234,1242 ****
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! browse_destroy_cb(GtkWidget * widget)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (gui.browse_fname != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 1231,1238 ----
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! browse_destroy_cb(GtkWidget *widget UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (gui.browse_fname != NULL)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1262,1275 ****
|
|
Karsten Hopp |
81c285 |
* initdir initial directory, NULL for current dir
|
|
Karsten Hopp |
81c285 |
* filter not used (file name filter)
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
! gui_mch_browse(int saving,
|
|
Karsten Hopp |
81c285 |
char_u *title,
|
|
Karsten Hopp |
81c285 |
char_u *dflt,
|
|
Karsten Hopp |
81c285 |
! char_u *ext,
|
|
Karsten Hopp |
81c285 |
char_u *initdir,
|
|
Karsten Hopp |
81c285 |
! char_u *filter)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef USE_FILE_CHOOSER
|
|
Karsten Hopp |
81c285 |
GtkWidget *fc;
|
|
Karsten Hopp |
81c285 |
--- 1258,1270 ----
|
|
Karsten Hopp |
81c285 |
* initdir initial directory, NULL for current dir
|
|
Karsten Hopp |
81c285 |
* filter not used (file name filter)
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
! gui_mch_browse(int saving UNUSED,
|
|
Karsten Hopp |
81c285 |
char_u *title,
|
|
Karsten Hopp |
81c285 |
char_u *dflt,
|
|
Karsten Hopp |
81c285 |
! char_u *ext UNUSED,
|
|
Karsten Hopp |
81c285 |
char_u *initdir,
|
|
Karsten Hopp |
81c285 |
! char_u *filter UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef USE_FILE_CHOOSER
|
|
Karsten Hopp |
81c285 |
GtkWidget *fc;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1377,1383 ****
|
|
Karsten Hopp |
81c285 |
* dflt default name
|
|
Karsten Hopp |
81c285 |
* initdir initial directory, NULL for current dir
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
gui_mch_browsedir(
|
|
Karsten Hopp |
81c285 |
char_u *title,
|
|
Karsten Hopp |
81c285 |
--- 1372,1377 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1460,1466 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_GUI_GNOME
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
gui_gnome_dialog( int type,
|
|
Karsten Hopp |
81c285 |
char_u *title,
|
|
Karsten Hopp |
81c285 |
--- 1454,1459 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1611,1617 ****
|
|
Karsten Hopp |
81c285 |
GtkWidget *dialog;
|
|
Karsten Hopp |
81c285 |
} CancelData;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
dlg_button_clicked(GtkWidget * widget, ButtonData *data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 1604,1609 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1622,1628 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* This makes the Escape key equivalent to the cancel button.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 1614,1619 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1655,1661 ****
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
int
|
|
Karsten Hopp |
81c285 |
gui_mch_dialog( int type, /* type of dialog */
|
|
Karsten Hopp |
81c285 |
char_u *title, /* title of dialog */
|
|
Karsten Hopp |
81c285 |
--- 1646,1651 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2215,2221 ****
|
|
Karsten Hopp |
81c285 |
GtkDialog *dialog; /* Widget of the dialog */
|
|
Karsten Hopp |
81c285 |
} DialogInfo;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2205,2210 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2398,2411 ****
|
|
Karsten Hopp |
81c285 |
* Note: The push_in output argument seems to affect scrolling of huge
|
|
Karsten Hopp |
81c285 |
* menus that don't fit on the screen. Leave it at the default for now.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! popup_menu_position_func(GtkMenu *menu,
|
|
Karsten Hopp |
81c285 |
gint *x, gint *y,
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
! gboolean *push_in,
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
! gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gdk_window_get_origin(gui.drawarea->window, x, y);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 2387,2399 ----
|
|
Karsten Hopp |
81c285 |
* Note: The push_in output argument seems to affect scrolling of huge
|
|
Karsten Hopp |
81c285 |
* menus that don't fit on the screen. Leave it at the default for now.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! popup_menu_position_func(GtkMenu *menu UNUSED,
|
|
Karsten Hopp |
81c285 |
gint *x, gint *y,
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
! gboolean *push_in UNUSED,
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
! gpointer user_data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gdk_window_get_origin(gui.drawarea->window, x, y);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2464,2476 ****
|
|
Karsten Hopp |
81c285 |
GtkWidget *all; /* 'Replace All' action button */
|
|
Karsten Hopp |
81c285 |
} SharedFindReplace;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static SharedFindReplace find_widgets = { NULL, };
|
|
Karsten Hopp |
81c285 |
! static SharedFindReplace repl_widgets = { NULL, };
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
find_key_press_event(
|
|
Karsten Hopp |
81c285 |
! GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
GdkEventKey *event,
|
|
Karsten Hopp |
81c285 |
SharedFindReplace *frdp)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2452,2463 ----
|
|
Karsten Hopp |
81c285 |
GtkWidget *all; /* 'Replace All' action button */
|
|
Karsten Hopp |
81c285 |
} SharedFindReplace;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
|
Karsten Hopp |
81c285 |
! static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static int
|
|
Karsten Hopp |
81c285 |
find_key_press_event(
|
|
Karsten Hopp |
81c285 |
! GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
GdkEventKey *event,
|
|
Karsten Hopp |
81c285 |
SharedFindReplace *frdp)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2962,2970 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Callback for actions of the find and replace dialogs
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! find_replace_cb(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int flags;
|
|
Karsten Hopp |
81c285 |
char_u *find_text;
|
|
Karsten Hopp |
81c285 |
--- 2949,2956 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Callback for actions of the find and replace dialogs
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int flags;
|
|
Karsten Hopp |
81c285 |
char_u *find_text;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3010,3018 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* our usual callback function */
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! entry_activate_cb(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gtk_widget_grab_focus(GTK_WIDGET(data));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 2996,3003 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* our usual callback function */
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! entry_activate_cb(GtkWidget *widget UNUSED, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gtk_widget_grab_focus(GTK_WIDGET(data));
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3055,3064 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* ":helpfind"
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
ex_helpfind(eap)
|
|
Karsten Hopp |
81c285 |
! exarg_T *eap;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* This will fail when menus are not loaded. Well, it's only for
|
|
Karsten Hopp |
81c285 |
* backwards compatibility anyway. */
|
|
Karsten Hopp |
81c285 |
--- 3040,3048 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* ":helpfind"
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
ex_helpfind(eap)
|
|
Karsten Hopp |
81c285 |
! exarg_T *eap UNUSED;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* This will fail when menus are not loaded. Well, it's only for
|
|
Karsten Hopp |
81c285 |
* backwards compatibility anyway. */
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/gui_gtk_x11.c 2008-11-28 21:26:50.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/gui_gtk_x11.c 2009-05-17 15:53:02.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 619,627 ****
|
|
Karsten Hopp |
81c285 |
* Doesn't seem possible, since check_copy_area() relies on
|
|
Karsten Hopp |
81c285 |
* this information. --danielk
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! visibility_event(GtkWidget *widget, GdkEventVisibility *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui.visibility = event->state;
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
--- 625,634 ----
|
|
Karsten Hopp |
81c285 |
* Doesn't seem possible, since check_copy_area() relies on
|
|
Karsten Hopp |
81c285 |
* this information. --danielk
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! visibility_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventVisibility *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui.visibility = event->state;
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 638,646 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Redraw the corresponding portions of the screen.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Skip this when the GUI isn't set up yet, will redraw later. */
|
|
Karsten Hopp |
81c285 |
if (gui.starting)
|
|
Karsten Hopp |
81c285 |
--- 645,654 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Redraw the corresponding portions of the screen.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! expose_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventExpose *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Skip this when the GUI isn't set up yet, will redraw later. */
|
|
Karsten Hopp |
81c285 |
if (gui.starting)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 668,676 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle changes to the "Comm" property
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! property_event(GtkWidget *widget, GdkEventProperty *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->type == GDK_PROPERTY_NOTIFY
|
|
Karsten Hopp |
81c285 |
&& event->state == (int)GDK_PROPERTY_NEW_VALUE
|
|
Karsten Hopp |
81c285 |
--- 676,685 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle changes to the "Comm" property
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! property_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventProperty *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->type == GDK_PROPERTY_NOTIFY
|
|
Karsten Hopp |
81c285 |
&& event->state == (int)GDK_PROPERTY_NEW_VALUE
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 740,748 ****
|
|
Karsten Hopp |
81c285 |
blink_state = BLINK_NONE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! blink_cb(gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state == BLINK_ON)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 749,756 ----
|
|
Karsten Hopp |
81c285 |
blink_state = BLINK_NONE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! blink_cb(gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state == BLINK_ON)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 781,789 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state == BLINK_NONE)
|
|
Karsten Hopp |
81c285 |
gui_mch_start_blink();
|
|
Karsten Hopp |
81c285 |
--- 789,798 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! enter_notify_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventCrossing *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state == BLINK_NONE)
|
|
Karsten Hopp |
81c285 |
gui_mch_start_blink();
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 795,803 ****
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state != BLINK_NONE)
|
|
Karsten Hopp |
81c285 |
gui_mch_stop_blink();
|
|
Karsten Hopp |
81c285 |
--- 804,813 ----
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! leave_notify_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventCrossing *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (blink_state != BLINK_NONE)
|
|
Karsten Hopp |
81c285 |
gui_mch_stop_blink();
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 805,813 ****
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_focus_change(TRUE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 815,824 ----
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! focus_in_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventFocus *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_focus_change(TRUE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 826,834 ****
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_focus_change(FALSE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 837,846 ----
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! focus_out_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventFocus *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_focus_change(FALSE);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 956,964 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Main keyboard handler:
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
/* 256 bytes is way over the top, but for safety let's reduce it only
|
|
Karsten Hopp |
81c285 |
--- 968,977 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Main keyboard handler:
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! key_press_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventKey *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
/* 256 bytes is way over the top, but for safety let's reduce it only
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1225,1233 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_XIM) && defined(HAVE_GTK2)
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* GTK+ 2 input methods may do fancy stuff on key release events too.
|
|
Karsten Hopp |
81c285 |
--- 1238,1247 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_XIM) && defined(HAVE_GTK2)
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! key_release_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventKey *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* GTK+ 2 input methods may do fancy stuff on key release events too.
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1243,1253 ****
|
|
Karsten Hopp |
81c285 |
* Selection handlers:
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! selection_clear_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
GdkEventSelection *event,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->selection == clip_plus.gtk_sel_atom)
|
|
Karsten Hopp |
81c285 |
clip_lose_selection(&clip_plus);
|
|
Karsten Hopp |
81c285 |
--- 1257,1266 ----
|
|
Karsten Hopp |
81c285 |
* Selection handlers:
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! selection_clear_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
GdkEventSelection *event,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->selection == clip_plus.gtk_sel_atom)
|
|
Karsten Hopp |
81c285 |
clip_lose_selection(&clip_plus);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1265,1276 ****
|
|
Karsten Hopp |
81c285 |
#define RS_FAIL 2 /* selection_received_cb() called and failed */
|
|
Karsten Hopp |
81c285 |
static int received_selection = RS_NONE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! selection_received_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *data,
|
|
Karsten Hopp |
81c285 |
! guint time_,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
VimClipboard *cbd;
|
|
Karsten Hopp |
81c285 |
char_u *text;
|
|
Karsten Hopp |
81c285 |
--- 1278,1288 ----
|
|
Karsten Hopp |
81c285 |
#define RS_FAIL 2 /* selection_received_cb() called and failed */
|
|
Karsten Hopp |
81c285 |
static int received_selection = RS_NONE;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! selection_received_cb(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *data,
|
|
Karsten Hopp |
81c285 |
! guint time_ UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
VimClipboard *cbd;
|
|
Karsten Hopp |
81c285 |
char_u *text;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1414,1426 ****
|
|
Karsten Hopp |
81c285 |
* Prepare our selection data for passing it to the external selection
|
|
Karsten Hopp |
81c285 |
* client.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! selection_get_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *selection_data,
|
|
Karsten Hopp |
81c285 |
guint info,
|
|
Karsten Hopp |
81c285 |
! guint time_,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *string;
|
|
Karsten Hopp |
81c285 |
char_u *tmpbuf;
|
|
Karsten Hopp |
81c285 |
--- 1426,1437 ----
|
|
Karsten Hopp |
81c285 |
* Prepare our selection data for passing it to the external selection
|
|
Karsten Hopp |
81c285 |
* client.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! selection_get_cb(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *selection_data,
|
|
Karsten Hopp |
81c285 |
guint info,
|
|
Karsten Hopp |
81c285 |
! guint time_ UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
char_u *string;
|
|
Karsten Hopp |
81c285 |
char_u *tmpbuf;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1678,1684 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
offshoot = dx > dy ? dx : dy;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! /* Make a linearly declaying timer delay with a threshold of 5 at a
|
|
Karsten Hopp |
81c285 |
* distance of 127 pixels from the main window.
|
|
Karsten Hopp |
81c285 |
*
|
|
Karsten Hopp |
81c285 |
* One could think endlessly about the most ergonomic variant here.
|
|
Karsten Hopp |
81c285 |
--- 1689,1695 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
offshoot = dx > dy ? dx : dy;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! /* Make a linearly decaying timer delay with a threshold of 5 at a
|
|
Karsten Hopp |
81c285 |
* distance of 127 pixels from the main window.
|
|
Karsten Hopp |
81c285 |
*
|
|
Karsten Hopp |
81c285 |
* One could think endlessly about the most ergonomic variant here.
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1707,1715 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Timer used to recognize multiple clicks of the mouse button.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! motion_repeat_timer_cb(gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int x;
|
|
Karsten Hopp |
81c285 |
int y;
|
|
Karsten Hopp |
81c285 |
--- 1718,1725 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Timer used to recognize multiple clicks of the mouse button.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! motion_repeat_timer_cb(gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int x;
|
|
Karsten Hopp |
81c285 |
int y;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1749,1757 ****
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->is_hint)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 1759,1768 ----
|
|
Karsten Hopp |
81c285 |
return FALSE;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! motion_notify_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventMotion *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (event->is_hint)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1777,1785 ****
|
|
Karsten Hopp |
81c285 |
* by our own timeout mechanism instead of the one provided by GTK+ itself.
|
|
Karsten Hopp |
81c285 |
* This is due to the way the generic VIM code is recognizing multiple clicks.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int button;
|
|
Karsten Hopp |
81c285 |
int repeated_click = FALSE;
|
|
Karsten Hopp |
81c285 |
--- 1788,1797 ----
|
|
Karsten Hopp |
81c285 |
* by our own timeout mechanism instead of the one provided by GTK+ itself.
|
|
Karsten Hopp |
81c285 |
* This is due to the way the generic VIM code is recognizing multiple clicks.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! button_press_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventButton *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int button;
|
|
Karsten Hopp |
81c285 |
int repeated_click = FALSE;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1855,1863 ****
|
|
Karsten Hopp |
81c285 |
* GTK+ 2 doesn't handle mouse buttons 4, 5, 6 and 7 the same way as GTK+ 1.
|
|
Karsten Hopp |
81c285 |
* Instead, it abstracts scrolling via the new GdkEventScroll.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int button;
|
|
Karsten Hopp |
81c285 |
int_u vim_modifiers;
|
|
Karsten Hopp |
81c285 |
--- 1867,1876 ----
|
|
Karsten Hopp |
81c285 |
* GTK+ 2 doesn't handle mouse buttons 4, 5, 6 and 7 the same way as GTK+ 1.
|
|
Karsten Hopp |
81c285 |
* Instead, it abstracts scrolling via the new GdkEventScroll.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! scroll_event(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventScroll *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int button;
|
|
Karsten Hopp |
81c285 |
int_u vim_modifiers;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1896,1904 ****
|
|
Karsten Hopp |
81c285 |
#endif /* HAVE_GTK2 */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int x, y;
|
|
Karsten Hopp |
81c285 |
int_u vim_modifiers;
|
|
Karsten Hopp |
81c285 |
--- 1909,1918 ----
|
|
Karsten Hopp |
81c285 |
#endif /* HAVE_GTK2 */
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! button_release_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventButton *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int x, y;
|
|
Karsten Hopp |
81c285 |
int_u vim_modifiers;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2100,2106 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* DND receiver.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
drag_data_received_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
GdkDragContext *context,
|
|
Karsten Hopp |
81c285 |
--- 2114,2119 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2109,2115 ****
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *data,
|
|
Karsten Hopp |
81c285 |
guint info,
|
|
Karsten Hopp |
81c285 |
guint time_,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GdkModifierType state;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 2122,2128 ----
|
|
Karsten Hopp |
81c285 |
GtkSelectionData *data,
|
|
Karsten Hopp |
81c285 |
guint info,
|
|
Karsten Hopp |
81c285 |
guint time_,
|
|
Karsten Hopp |
81c285 |
! gpointer user_data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GdkModifierType state;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2143,2149 ****
|
|
Karsten Hopp |
81c285 |
* be abandoned and pop up a dialog asking the user for confirmation if
|
|
Karsten Hopp |
81c285 |
* necessary.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
sm_client_check_changed_any(GnomeClient *client,
|
|
Karsten Hopp |
81c285 |
gint key,
|
|
Karsten Hopp |
81c285 |
--- 2156,2161 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2251,2257 ****
|
|
Karsten Hopp |
81c285 |
* for confirmation if necessary. Save the current editing session and tell
|
|
Karsten Hopp |
81c285 |
* the session manager how to restart Vim.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
sm_client_save_yourself(GnomeClient *client,
|
|
Karsten Hopp |
81c285 |
gint phase,
|
|
Karsten Hopp |
81c285 |
--- 2263,2268 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2339,2345 ****
|
|
Karsten Hopp |
81c285 |
* here since "save_yourself" has been emitted before (unless serious trouble
|
|
Karsten Hopp |
81c285 |
* is happening).
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
sm_client_die(GnomeClient *client, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2350,2355 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2379,2388 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* GTK tells us that XSMP needs attention
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
local_xsmp_handle_requests(source, condition, data)
|
|
Karsten Hopp |
81c285 |
! GIOChannel *source;
|
|
Karsten Hopp |
81c285 |
GIOCondition condition;
|
|
Karsten Hopp |
81c285 |
gpointer data;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2389,2397 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* GTK tells us that XSMP needs attention
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
local_xsmp_handle_requests(source, condition, data)
|
|
Karsten Hopp |
81c285 |
! GIOChannel *source UNUSED;
|
|
Karsten Hopp |
81c285 |
GIOCondition condition;
|
|
Karsten Hopp |
81c285 |
gpointer data;
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2480,2495 ****
|
|
Karsten Hopp |
81c285 |
* WM_SAVE_YOURSELF hack it actually stores the session... And yes,
|
|
Karsten Hopp |
81c285 |
* it should work with KDE as well.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! global_event_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent = (XEvent *)xev;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (xevent != NULL
|
|
Karsten Hopp |
81c285 |
&& xevent->type == ClientMessage
|
|
Karsten Hopp |
81c285 |
&& xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
|
|
Karsten Hopp |
81c285 |
! && xevent->xclient.data.l[0] == GET_X_ATOM(save_yourself_atom))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
out_flush();
|
|
Karsten Hopp |
81c285 |
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
|
|
Karsten Hopp |
81c285 |
--- 2489,2506 ----
|
|
Karsten Hopp |
81c285 |
* WM_SAVE_YOURSELF hack it actually stores the session... And yes,
|
|
Karsten Hopp |
81c285 |
* it should work with KDE as well.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! global_event_filter(GdkXEvent *xev,
|
|
Karsten Hopp |
81c285 |
! GdkEvent *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent = (XEvent *)xev;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (xevent != NULL
|
|
Karsten Hopp |
81c285 |
&& xevent->type == ClientMessage
|
|
Karsten Hopp |
81c285 |
&& xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
|
|
Karsten Hopp |
81c285 |
! && (long_u)xevent->xclient.data.l[0]
|
|
Karsten Hopp |
81c285 |
! == GET_X_ATOM(save_yourself_atom))
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
out_flush();
|
|
Karsten Hopp |
81c285 |
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2512,2518 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* GDK handler for X ClientMessage events.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
gdk_wm_protocols_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2523,2528 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2558,2566 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Setup the window icon & xcmdsrv comm after the main window has been realized.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! mainwin_realize(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* If you get an error message here, you still need to unpack the runtime
|
|
Karsten Hopp |
81c285 |
* archive! */
|
|
Karsten Hopp |
81c285 |
--- 2568,2575 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Setup the window icon & xcmdsrv comm after the main window has been realized.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* If you get an error message here, you still need to unpack the runtime
|
|
Karsten Hopp |
81c285 |
* archive! */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2712,2722 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK_MULTIHEAD
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
mainwin_screen_changed_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkScreen *previous_screen,
|
|
Karsten Hopp |
81c285 |
! gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (!gtk_widget_has_screen(widget))
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
--- 2721,2730 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK_MULTIHEAD
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
mainwin_screen_changed_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkScreen *previous_screen UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (!gtk_widget_has_screen(widget))
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2757,2765 ****
|
|
Karsten Hopp |
81c285 |
* Don't try to set any VIM scrollbar sizes anywhere here. I'm relying on the
|
|
Karsten Hopp |
81c285 |
* fact that the main VIM engine doesn't take them into account anywhere.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_realize_cb(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkWidget *sbar;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 2765,2772 ----
|
|
Karsten Hopp |
81c285 |
* Don't try to set any VIM scrollbar sizes anywhere here. I'm relying on the
|
|
Karsten Hopp |
81c285 |
* fact that the main VIM engine doesn't take them into account anywhere.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkWidget *sbar;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2789,2797 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Properly clean up on shutdown.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_unrealize_cb(GtkWidget *widget, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Don't write messages to the GUI anymore */
|
|
Karsten Hopp |
81c285 |
full_screen = FALSE;
|
|
Karsten Hopp |
81c285 |
--- 2796,2803 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Properly clean up on shutdown.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Don't write messages to the GUI anymore */
|
|
Karsten Hopp |
81c285 |
full_screen = FALSE;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2827,2837 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_style_set_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GtkStyle *previous_style,
|
|
Karsten Hopp |
81c285 |
! gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_mch_new_colors();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 2833,2842 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! drawarea_style_set_cb(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GtkStyle *previous_style UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_mch_new_colors();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2840,2848 ****
|
|
Karsten Hopp |
81c285 |
* Callback routine for the "delete_event" signal on the toplevel window.
|
|
Karsten Hopp |
81c285 |
* Tries to vim gracefully, or refuses to exit with changed buffers.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! delete_event_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_shell_closed();
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
--- 2845,2854 ----
|
|
Karsten Hopp |
81c285 |
* Callback routine for the "delete_event" signal on the toplevel window.
|
|
Karsten Hopp |
81c285 |
* Tries to vim gracefully, or refuses to exit with changed buffers.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! delete_event_cb(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventAny *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gui_shell_closed();
|
|
Karsten Hopp |
81c285 |
return TRUE;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2964,2970 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* At start-up, don't try to set the hints until the initial
|
|
Karsten Hopp |
81c285 |
* values have been used (those that dictate our initial size)
|
|
Karsten Hopp |
81c285 |
! * Let forced (i.e., correct) values thruogh always.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
if (!(force_width && force_height) && init_window_hints_state > 0)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 2970,2976 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* At start-up, don't try to set the hints until the initial
|
|
Karsten Hopp |
81c285 |
* values have been used (those that dictate our initial size)
|
|
Karsten Hopp |
81c285 |
! * Let forced (i.e., correct) values through always.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
if (!(force_width && force_height) && init_window_hints_state > 0)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3142,3150 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle selecting an item in the tab line popup menu.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Add the string cmd into input buffer */
|
|
Karsten Hopp |
81c285 |
send_tabline_menu_event(clicked_page, (int)(long)user_data);
|
|
Karsten Hopp |
81c285 |
--- 3148,3155 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle selecting an item in the tab line popup menu.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! tabline_menu_handler(GtkMenuItem *item UNUSED, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Add the string cmd into input buffer */
|
|
Karsten Hopp |
81c285 |
send_tabline_menu_event(clicked_page, (int)(long)user_data);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3244,3256 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle selecting one of the tabs.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
on_select_tab(
|
|
Karsten Hopp |
81c285 |
! GtkNotebook *notebook,
|
|
Karsten Hopp |
81c285 |
! GtkNotebookPage *page,
|
|
Karsten Hopp |
81c285 |
gint idx,
|
|
Karsten Hopp |
81c285 |
! gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (!ignore_tabline_evt)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 3249,3260 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Handle selecting one of the tabs.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
on_select_tab(
|
|
Karsten Hopp |
81c285 |
! GtkNotebook *notebook UNUSED,
|
|
Karsten Hopp |
81c285 |
! GtkNotebookPage *page UNUSED,
|
|
Karsten Hopp |
81c285 |
gint idx,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (!ignore_tabline_evt)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3784,3790 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (gtk_socket_id != 0)
|
|
Karsten Hopp |
81c285 |
! /* make sure keybord input can go to the drawarea */
|
|
Karsten Hopp |
81c285 |
GTK_WIDGET_SET_FLAGS(gui.drawarea, GTK_CAN_FOCUS);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
--- 3788,3794 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (gtk_socket_id != 0)
|
|
Karsten Hopp |
81c285 |
! /* make sure keyboard input can go to the drawarea */
|
|
Karsten Hopp |
81c285 |
GTK_WIDGET_SET_FLAGS(gui.drawarea, GTK_CAN_FOCUS);
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3922,3931 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* This signal informs us about the need to rearrange our sub-widgets.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! form_configure_event(GtkWidget *widget, GdkEventConfigure *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int usable_height = event->height;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 3926,3935 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* This signal informs us about the need to rearrange our sub-widgets.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! form_configure_event(GtkWidget *widget UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkEventConfigure *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int usable_height = event->height;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3948,3956 ****
|
|
Karsten Hopp |
81c285 |
* We can't do much more here than to trying to preserve what had been done,
|
|
Karsten Hopp |
81c285 |
* since the window is already inevitably going away.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! mainwin_destroy_cb(GtkObject *object, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Don't write messages to the GUI anymore */
|
|
Karsten Hopp |
81c285 |
full_screen = FALSE;
|
|
Karsten Hopp |
81c285 |
--- 3952,3959 ----
|
|
Karsten Hopp |
81c285 |
* We can't do much more here than to trying to preserve what had been done,
|
|
Karsten Hopp |
81c285 |
* since the window is already inevitably going away.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* Don't write messages to the GUI anymore */
|
|
Karsten Hopp |
81c285 |
full_screen = FALSE;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3980,3988 ****
|
|
Karsten Hopp |
81c285 |
* scrollbar init.), actually do the standard hinst and stop the timer.
|
|
Karsten Hopp |
81c285 |
* We'll not let the default hints be set while this timer's active.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! check_startup_plug_hints(gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (init_window_hints_state == 1)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 3983,3990 ----
|
|
Karsten Hopp |
81c285 |
* scrollbar init.), actually do the standard hinst and stop the timer.
|
|
Karsten Hopp |
81c285 |
* We'll not let the default hints be set while this timer's active.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
! check_startup_plug_hints(gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (init_window_hints_state == 1)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4055,4061 ****
|
|
Karsten Hopp |
81c285 |
Columns = w;
|
|
Karsten Hopp |
81c285 |
if (mask & HeightValue)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! if (p_window > h - 1 || !option_was_set((char_u *)"window"))
|
|
Karsten Hopp |
81c285 |
p_window = h - 1;
|
|
Karsten Hopp |
81c285 |
Rows = h;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 4057,4063 ----
|
|
Karsten Hopp |
81c285 |
Columns = w;
|
|
Karsten Hopp |
81c285 |
if (mask & HeightValue)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
|
|
Karsten Hopp |
81c285 |
p_window = h - 1;
|
|
Karsten Hopp |
81c285 |
Rows = h;
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4229,4237 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! gui_mch_exit(int rc)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (gui.mainwin != NULL)
|
|
Karsten Hopp |
81c285 |
gtk_widget_destroy(gui.mainwin);
|
|
Karsten Hopp |
81c285 |
--- 4231,4238 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! gui_mch_exit(int rc UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
if (gui.mainwin != NULL)
|
|
Karsten Hopp |
81c285 |
gtk_widget_destroy(gui.mainwin);
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4286,4292 ****
|
|
Karsten Hopp |
81c285 |
* report the new size through form_configure_event(). That caused the window
|
|
Karsten Hopp |
81c285 |
* layout to be messed up.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static gboolean
|
|
Karsten Hopp |
81c285 |
force_shell_resize_idle(gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4287,4292 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4314,4325 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Set the windows size.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_mch_set_shellsize(int width, int height,
|
|
Karsten Hopp |
81c285 |
! int min_width, int min_height,
|
|
Karsten Hopp |
81c285 |
! int base_width, int base_height,
|
|
Karsten Hopp |
81c285 |
! int direction)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifndef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
/* Hack: When the form already is at the desired size, the window might
|
|
Karsten Hopp |
81c285 |
--- 4314,4324 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Set the windows size.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
gui_mch_set_shellsize(int width, int height,
|
|
Karsten Hopp |
81c285 |
! int min_width UNUSED, int min_height UNUSED,
|
|
Karsten Hopp |
81c285 |
! int base_width UNUSED, int base_height UNUSED,
|
|
Karsten Hopp |
81c285 |
! int direction UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifndef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
/* Hack: When the form already is at the desired size, the window might
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4413,4421 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_TITLE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! gui_mch_settitle(char_u *title, char_u *icon)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
if (title != NULL && output_conv.vc_type != CONV_NONE)
|
|
Karsten Hopp |
81c285 |
--- 4412,4419 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_TITLE) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! gui_mch_settitle(char_u *title, char_u *icon UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
if (title != NULL && output_conv.vc_type != CONV_NONE)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4493,4499 ****
|
|
Karsten Hopp |
81c285 |
* Get a font structure for highlighting.
|
|
Karsten Hopp |
81c285 |
* "cbdata" is a pointer to the global gui structure.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
font_sel_ok(GtkWidget *wgt, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4491,4496 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4509,4515 ****
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
font_sel_cancel(GtkWidget *wgt, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4506,4511 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4520,4526 ****
|
|
Karsten Hopp |
81c285 |
gtk_main_quit();
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
font_sel_destroy(GtkWidget *wgt, gpointer cbdata)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4516,4521 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4620,4626 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Try to load the requested fontset.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
GuiFontset
|
|
Karsten Hopp |
81c285 |
gui_mch_get_fontset(char_u *name, int report_error, int fixed_width)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4615,4620 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 4863,4869 ****
|
|
Karsten Hopp |
81c285 |
styled_font[1] = &gui.ital_font;
|
|
Karsten Hopp |
81c285 |
styled_font[2] = &gui.boldital_font;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! /* First free whatever was freviously there. */
|
|
Karsten Hopp |
81c285 |
for (i = 0; i < 3; ++i)
|
|
Karsten Hopp |
81c285 |
if (*styled_font[i])
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 4857,4863 ----
|
|
Karsten Hopp |
81c285 |
styled_font[1] = &gui.ital_font;
|
|
Karsten Hopp |
81c285 |
styled_font[2] = &gui.boldital_font;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
! /* First free whatever was previously there. */
|
|
Karsten Hopp |
81c285 |
for (i = 0; i < 3; ++i)
|
|
Karsten Hopp |
81c285 |
if (*styled_font[i])
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5012,5020 ****
|
|
Karsten Hopp |
81c285 |
* Initialize Vim to use the font or fontset with the given name.
|
|
Karsten Hopp |
81c285 |
* Return FAIL if the font could not be loaded, OK otherwise.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
int
|
|
Karsten Hopp |
81c285 |
! gui_mch_init_font(char_u *font_name, int fontset)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
PangoFontDescription *font_desc;
|
|
Karsten Hopp |
81c285 |
--- 5006,5013 ----
|
|
Karsten Hopp |
81c285 |
* Initialize Vim to use the font or fontset with the given name.
|
|
Karsten Hopp |
81c285 |
* Return FAIL if the font could not be loaded, OK otherwise.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
int
|
|
Karsten Hopp |
81c285 |
! gui_mch_init_font(char_u *font_name, int fontset UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
PangoFontDescription *font_desc;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5326,5334 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Return the name of font "font" in allocated memory.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
! gui_mch_get_fontname(GuiFont font, char_u *name)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
if (font != NOFONT)
|
|
Karsten Hopp |
81c285 |
--- 5319,5326 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Return the name of font "font" in allocated memory.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
char_u *
|
|
Karsten Hopp |
81c285 |
! gui_mch_get_fontname(GuiFont font, char_u *name UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
# ifdef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
if (font != NOFONT)
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 5732,5738 ****
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
int offset;
|
|
Karsten Hopp |
81c285 |
! const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
|
|
Karsten Hopp |
81c285 |
int y = FILL_Y(row + 1) - 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Undercurl: draw curl at the bottom of the character cell. */
|
|
Karsten Hopp |
81c285 |
--- 5724,5730 ----
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
int i;
|
|
Karsten Hopp |
81c285 |
int offset;
|
|
Karsten Hopp |
81c285 |
! static const int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
|
|
Karsten Hopp |
81c285 |
int y = FILL_Y(row + 1) - 1;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* Undercurl: draw curl at the bottom of the character cell. */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6402,6408 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Callback function, used when data is available on the SNiFF connection.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /* ARGSUSED */
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
sniff_request_cb(
|
|
Karsten Hopp |
81c285 |
gpointer data,
|
|
Karsten Hopp |
81c285 |
--- 6394,6399 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6711,6719 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Disown the selection.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! clip_mch_lose_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* WEIRD: when using NULL to actually disown the selection, we lose the
|
|
Karsten Hopp |
81c285 |
* selection the first time we own it. */
|
|
Karsten Hopp |
81c285 |
--- 6702,6709 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Disown the selection.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! clip_mch_lose_selection(VimClipboard *cbd UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
/* WEIRD: when using NULL to actually disown the selection, we lose the
|
|
Karsten Hopp |
81c285 |
* selection the first time we own it. */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6741,6749 ****
|
|
Karsten Hopp |
81c285 |
* Send the current selection to the clipboard. Do nothing for X because we
|
|
Karsten Hopp |
81c285 |
* will fill in the selection only when requested by another app.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! clip_mch_set_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 6731,6738 ----
|
|
Karsten Hopp |
81c285 |
* Send the current selection to the clipboard. Do nothing for X because we
|
|
Karsten Hopp |
81c285 |
* will fill in the selection only when requested by another app.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! clip_mch_set_selection(VimClipboard *cbd UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 6950,6956 ****
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
id &= ~1; /* they are always even (why?) */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! else if (shape < sizeof(mshape_ids) / sizeof(int))
|
|
Karsten Hopp |
81c285 |
id = mshape_ids[shape];
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
--- 6939,6945 ----
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
id &= ~1; /* they are always even (why?) */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
! else if (shape < (int)(sizeof(mshape_ids) / sizeof(int)))
|
|
Karsten Hopp |
81c285 |
id = mshape_ids[shape];
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
return;
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/gui_gtk_f.c 2007-05-10 19:50:33.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/gui_gtk_f.c 2009-05-17 15:48:51.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 227,240 ****
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (!form_type)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! GtkTypeInfo form_info =
|
|
Karsten Hopp |
81c285 |
! {
|
|
Karsten Hopp |
81c285 |
! "GtkForm",
|
|
Karsten Hopp |
81c285 |
! sizeof(GtkForm),
|
|
Karsten Hopp |
81c285 |
! sizeof(GtkFormClass),
|
|
Karsten Hopp |
81c285 |
! (GtkClassInitFunc) gtk_form_class_init,
|
|
Karsten Hopp |
81c285 |
! (GtkObjectInitFunc) gtk_form_init
|
|
Karsten Hopp |
81c285 |
! };
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
--- 227,239 ----
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
if (!form_type)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
! GtkTypeInfo form_info;
|
|
Karsten Hopp |
81c285 |
!
|
|
Karsten Hopp |
81c285 |
! form_info.type_name = "GtkForm";
|
|
Karsten Hopp |
81c285 |
! form_info.object_size = sizeof(GtkForm);
|
|
Karsten Hopp |
81c285 |
! form_info.class_size = sizeof(GtkFormClass);
|
|
Karsten Hopp |
81c285 |
! form_info.class_init_func = (GtkClassInitFunc)gtk_form_class_init;
|
|
Karsten Hopp |
81c285 |
! form_info.object_init_func = (GtkObjectInitFunc)gtk_form_init;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 611,620 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
gtk_form_forall(GtkContainer *container,
|
|
Karsten Hopp |
81c285 |
! gboolean include_internals,
|
|
Karsten Hopp |
81c285 |
GtkCallback callback,
|
|
Karsten Hopp |
81c285 |
gpointer callback_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 610,618 ----
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
gtk_form_forall(GtkContainer *container,
|
|
Karsten Hopp |
81c285 |
! gboolean include_internals UNUSED,
|
|
Karsten Hopp |
81c285 |
GtkCallback callback,
|
|
Karsten Hopp |
81c285 |
gpointer callback_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 786,794 ****
|
|
Karsten Hopp |
81c285 |
* them or discards them, depending on whether we are obscured
|
|
Karsten Hopp |
81c285 |
* or not.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent;
|
|
Karsten Hopp |
81c285 |
GtkForm *form;
|
|
Karsten Hopp |
81c285 |
--- 784,791 ----
|
|
Karsten Hopp |
81c285 |
* them or discards them, depending on whether we are obscured
|
|
Karsten Hopp |
81c285 |
* or not.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event UNUSED, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent;
|
|
Karsten Hopp |
81c285 |
GtkForm *form;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 821,829 ****
|
|
Karsten Hopp |
81c285 |
* there is no corresponding event in GTK, so we have
|
|
Karsten Hopp |
81c285 |
* to get the events from a filter
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED1*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! gtk_form_main_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent;
|
|
Karsten Hopp |
81c285 |
GtkForm *form;
|
|
Karsten Hopp |
81c285 |
--- 818,827 ----
|
|
Karsten Hopp |
81c285 |
* there is no corresponding event in GTK, so we have
|
|
Karsten Hopp |
81c285 |
* to get the events from a filter
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static GdkFilterReturn
|
|
Karsten Hopp |
81c285 |
! gtk_form_main_filter(GdkXEvent *gdk_xevent,
|
|
Karsten Hopp |
81c285 |
! GdkEvent *event UNUSED,
|
|
Karsten Hopp |
81c285 |
! gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
XEvent *xevent;
|
|
Karsten Hopp |
81c285 |
GtkForm *form;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 911,919 ****
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! gtk_form_child_map(GtkWidget *widget, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkFormChild *child;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 909,916 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! gtk_form_child_map(GtkWidget *widget UNUSED, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkFormChild *child;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 923,931 ****
|
|
Karsten Hopp |
81c285 |
gdk_window_show(child->window);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED0*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! gtk_form_child_unmap(GtkWidget *widget, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkFormChild *child;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 920,927 ----
|
|
Karsten Hopp |
81c285 |
gdk_window_show(child->window);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! gtk_form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
GtkFormChild *child;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/gui_beval.c 2009-03-18 12:20:35.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/gui_beval.c 2009-05-17 15:53:22.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 15,21 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Common code, invoked when the mouse is resting for a moment.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
general_beval_cb(beval, state)
|
|
Karsten Hopp |
81c285 |
BalloonEval *beval;
|
|
Karsten Hopp |
81c285 |
--- 15,20 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 551,559 ****
|
|
Karsten Hopp |
81c285 |
return FALSE; /* continue emission */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! mainwin_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
BalloonEval *beval = (BalloonEval *)data;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--- 550,557 ----
|
|
Karsten Hopp |
81c285 |
return FALSE; /* continue emission */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! mainwin_event_cb(GtkWidget *widget UNUSED, GdkEvent *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
BalloonEval *beval = (BalloonEval *)data;
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 663,671 ****
|
|
Karsten Hopp |
81c285 |
return FALSE; /* don't call me again */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! balloon_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gtk_paint_flat_box(widget->style, widget->window,
|
|
Karsten Hopp |
81c285 |
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
|
|
Karsten Hopp |
81c285 |
--- 661,670 ----
|
|
Karsten Hopp |
81c285 |
return FALSE; /* don't call me again */
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
static gint
|
|
Karsten Hopp |
81c285 |
! balloon_expose_event_cb(GtkWidget *widget,
|
|
Karsten Hopp |
81c285 |
! GdkEventExpose *event,
|
|
Karsten Hopp |
81c285 |
! gpointer data UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
gtk_paint_flat_box(widget->style, widget->window,
|
|
Karsten Hopp |
81c285 |
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 676,682 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
# ifndef HAVE_GTK2
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED2*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
balloon_draw_cb(GtkWidget *widget, GdkRectangle *area, gpointer data)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 675,680 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 726,732 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* The X event handler. All it does is call the real event handler.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
pointerEventEH(w, client_data, event, unused)
|
|
Karsten Hopp |
81c285 |
Widget w;
|
|
Karsten Hopp |
81c285 |
--- 724,729 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 877,883 ****
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
timerRoutine(dx, id)
|
|
Karsten Hopp |
81c285 |
XtPointer dx;
|
|
Karsten Hopp |
81c285 |
--- 874,879 ----
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/netbeans.c 2009-02-21 22:12:43.000000000 +0100
|
|
Karsten Hopp |
81c285 |
--- src/netbeans.c 2009-05-17 15:51:14.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 700,706 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Read and process a command from netbeans.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
#if defined(FEAT_GUI_W32) || defined(PROTO)
|
|
Karsten Hopp |
81c285 |
/* Use this one when generating prototypes, the others are static. */
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
--- 700,705 ----
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 708,719 ****
|
|
Karsten Hopp |
81c285 |
#else
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_GUI_MOTIF
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! messageFromNetbeans(XtPointer clientData, int *unused1, XtInputId *unused2)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_GUI_GTK
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! messageFromNetbeans(gpointer clientData, gint unused1,
|
|
Karsten Hopp |
81c285 |
! GdkInputCondition unused2)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
--- 707,721 ----
|
|
Karsten Hopp |
81c285 |
#else
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_GUI_MOTIF
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! messageFromNetbeans(XtPointer clientData UNUSED
|
|
Karsten Hopp |
81c285 |
! int *unused1 UNUSED,
|
|
Karsten Hopp |
81c285 |
! XtInputId *unused2 UNUSED)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
# ifdef FEAT_GUI_GTK
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
! messageFromNetbeans(gpointer clientData UNUSED,
|
|
Karsten Hopp |
81c285 |
! gint unused1 UNUSED,
|
|
Karsten Hopp |
81c285 |
! GdkInputCondition unused2 UNUSED)
|
|
Karsten Hopp |
81c285 |
# endif
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 1585,1591 ****
|
|
Karsten Hopp |
81c285 |
--- 1587,1595 ----
|
|
Karsten Hopp |
81c285 |
buf_delsign(buf->bufp, id);
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
+ {
|
|
Karsten Hopp |
81c285 |
nbdebug((" No sign on line %d\n", i));
|
|
Karsten Hopp |
81c285 |
+ }
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
nbdebug((" Deleting lines %d through %d\n", del_from_lnum, del_to_lnum));
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2144,2150 ****
|
|
Karsten Hopp |
81c285 |
--- 2148,2156 ----
|
|
Karsten Hopp |
81c285 |
#endif
|
|
Karsten Hopp |
81c285 |
}
|
|
Karsten Hopp |
81c285 |
else
|
|
Karsten Hopp |
81c285 |
+ {
|
|
Karsten Hopp |
81c285 |
nbdebug((" BAD POSITION in setDot: %s\n", s));
|
|
Karsten Hopp |
81c285 |
+ }
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/* gui_update_cursor(TRUE, FALSE); */
|
|
Karsten Hopp |
81c285 |
/* update_curbuf(NOT_VALID); */
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 2744,2754 ****
|
|
Karsten Hopp |
81c285 |
* cursor and sends it to the debugger for evaluation. The debugger should
|
|
Karsten Hopp |
81c285 |
* respond with a showBalloon command when there is a useful result.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
netbeans_beval_cb(
|
|
Karsten Hopp |
81c285 |
BalloonEval *beval,
|
|
Karsten Hopp |
81c285 |
! int state)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
char_u *text;
|
|
Karsten Hopp |
81c285 |
--- 2750,2759 ----
|
|
Karsten Hopp |
81c285 |
* cursor and sends it to the debugger for evaluation. The debugger should
|
|
Karsten Hopp |
81c285 |
* respond with a showBalloon command when there is a useful result.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
netbeans_beval_cb(
|
|
Karsten Hopp |
81c285 |
BalloonEval *beval,
|
|
Karsten Hopp |
81c285 |
! int state UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
win_T *wp;
|
|
Karsten Hopp |
81c285 |
char_u *text;
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3061,3069 ****
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Send netbeans an unmodufied command.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! netbeans_unmodified(buf_T *bufp)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#if 0
|
|
Karsten Hopp |
81c285 |
char_u buf[128];
|
|
Karsten Hopp |
81c285 |
--- 3066,3073 ----
|
|
Karsten Hopp |
81c285 |
/*
|
|
Karsten Hopp |
81c285 |
* Send netbeans an unmodufied command.
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
void
|
|
Karsten Hopp |
81c285 |
! netbeans_unmodified(buf_T *bufp UNUSED)
|
|
Karsten Hopp |
81c285 |
{
|
|
Karsten Hopp |
81c285 |
#if 0
|
|
Karsten Hopp |
81c285 |
char_u buf[128];
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 3370,3382 ****
|
|
Karsten Hopp |
81c285 |
* buf->signmapused[] maps buffer-local annotation IDs to an index in
|
|
Karsten Hopp |
81c285 |
* globalsignmap[].
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
- /*ARGSUSED*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
addsigntype(
|
|
Karsten Hopp |
81c285 |
nbbuf_T *buf,
|
|
Karsten Hopp |
81c285 |
int typeNum,
|
|
Karsten Hopp |
81c285 |
char_u *typeName,
|
|
Karsten Hopp |
81c285 |
! char_u *tooltip,
|
|
Karsten Hopp |
81c285 |
char_u *glyphFile,
|
|
Karsten Hopp |
81c285 |
int use_fg,
|
|
Karsten Hopp |
81c285 |
int fg,
|
|
Karsten Hopp |
81c285 |
--- 3374,3385 ----
|
|
Karsten Hopp |
81c285 |
* buf->signmapused[] maps buffer-local annotation IDs to an index in
|
|
Karsten Hopp |
81c285 |
* globalsignmap[].
|
|
Karsten Hopp |
81c285 |
*/
|
|
Karsten Hopp |
81c285 |
static void
|
|
Karsten Hopp |
81c285 |
addsigntype(
|
|
Karsten Hopp |
81c285 |
nbbuf_T *buf,
|
|
Karsten Hopp |
81c285 |
int typeNum,
|
|
Karsten Hopp |
81c285 |
char_u *typeName,
|
|
Karsten Hopp |
81c285 |
! char_u *tooltip UNUSED,
|
|
Karsten Hopp |
81c285 |
char_u *glyphFile,
|
|
Karsten Hopp |
81c285 |
int use_fg,
|
|
Karsten Hopp |
81c285 |
int fg,
|
|
Karsten Hopp |
81c285 |
*** ../vim-7.2.180/src/version.c 2009-05-17 13:30:58.000000000 +0200
|
|
Karsten Hopp |
81c285 |
--- src/version.c 2009-05-17 16:07:26.000000000 +0200
|
|
Karsten Hopp |
81c285 |
***************
|
|
Karsten Hopp |
81c285 |
*** 678,679 ****
|
|
Karsten Hopp |
81c285 |
--- 678,681 ----
|
|
Karsten Hopp |
81c285 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
81c285 |
+ /**/
|
|
Karsten Hopp |
81c285 |
+ 181,
|
|
Karsten Hopp |
81c285 |
/**/
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
--
|
|
Karsten Hopp |
81c285 |
I am always surprised in the Linux world how quickly solutions can be
|
|
Karsten Hopp |
81c285 |
obtained. (Imagine sending an email to Bill Gates, asking why Windows
|
|
Karsten Hopp |
81c285 |
crashed, and how to fix it... and then getting an answer that fixed the
|
|
Karsten Hopp |
81c285 |
problem... <0>_<0> !) -- Mark Langdon
|
|
Karsten Hopp |
81c285 |
|
|
Karsten Hopp |
81c285 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
81c285 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
81c285 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
81c285 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|