0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.0029

This commit is contained in:
Bram Moolenaar 2005-01-03 20:58:59 +00:00
parent 306cf5720e
commit f9980f116b
2 changed files with 18 additions and 49 deletions

View File

@ -0,0 +1,7 @@
" Menu Translations: Simplified Chinese (Windows)
" Last Change: Tue Sep 4 11:26:52 CST 2001
" $LANG on Windows 95/98/NT is Chinese(GB)_GB.936
" $LANG on Windows 2000/ME is Chinese_GB.936
" Source the other one from here.
source <sfile>:p:h/menu_chinese_gb.936.vim

View File

@ -76,15 +76,11 @@ static Widget menuBar;
static void scroll_cb __ARGS((Widget w, XtPointer client_data, XtPointer call_data)); static void scroll_cb __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
#ifdef FEAT_TOOLBAR #ifdef FEAT_TOOLBAR
# if 0
static void toolbar_enter_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *));
static void toolbar_leave_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *));
# endif
# ifdef FEAT_FOOTER # ifdef FEAT_FOOTER
static void toolbarbutton_enter_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *)); static void toolbarbutton_enter_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *));
static void toolbarbutton_leave_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *)); static void toolbarbutton_leave_cb __ARGS((Widget, XtPointer, XEvent *, Boolean *));
# endif # endif
static void gui_mch_reset_focus __ARGS((void)); static void reset_focus __ARGS((void));
#endif #endif
#ifdef FEAT_FOOTER #ifdef FEAT_FOOTER
static int gui_mch_compute_footer_height __ARGS((void)); static int gui_mch_compute_footer_height __ARGS((void));
@ -320,12 +316,6 @@ gui_x11_create_widgets()
NULL); NULL);
gui_motif_menu_colors(toolBar); gui_motif_menu_colors(toolBar);
# if 0 /* these don't work, because of the XmNtraversalOn above. */
XtAddEventHandler(toolBar, EnterWindowMask, False,
toolbar_enter_cb, NULL);
XtAddEventHandler(toolBar, LeaveWindowMask, False,
toolbar_leave_cb, NULL);
# endif
#endif #endif
textAreaForm = XtVaCreateManagedWidget("textAreaForm", textAreaForm = XtVaCreateManagedWidget("textAreaForm",
@ -408,7 +398,7 @@ gui_mch_set_text_area_pos(x, y, w, h)
{ {
#ifdef FEAT_TOOLBAR #ifdef FEAT_TOOLBAR
/* Give keyboard focus to the textArea instead of the toolbar. */ /* Give keyboard focus to the textArea instead of the toolbar. */
gui_mch_reset_focus(); reset_focus();
#endif #endif
} }
@ -540,7 +530,7 @@ static void gui_motif_add_actext __ARGS((vimmenu_T *menu));
static void toggle_tearoff __ARGS((Widget wid)); static void toggle_tearoff __ARGS((Widget wid));
static void gui_mch_recurse_tearoffs __ARGS((vimmenu_T *menu)); static void gui_mch_recurse_tearoffs __ARGS((vimmenu_T *menu));
#endif #endif
static void gui_mch_submenu_change __ARGS((vimmenu_T *mp, int colors)); static void submenu_change __ARGS((vimmenu_T *mp, int colors));
static void do_set_mnemonics __ARGS((int enable)); static void do_set_mnemonics __ARGS((int enable));
static int menu_enabled = TRUE; static int menu_enabled = TRUE;
@ -1026,6 +1016,7 @@ gui_mch_add_menu_item(menu, idx)
XtSetArg(args[n], XmNhighlightOnEnter, True); n++; XtSetArg(args[n], XmNhighlightOnEnter, True); n++;
XtSetArg(args[n], XmNmarginWidth, 0); n++; XtSetArg(args[n], XmNmarginWidth, 0); n++;
XtSetArg(args[n], XmNmarginHeight, 0); n++; XtSetArg(args[n], XmNmarginHeight, 0); n++;
XtSetArg(args[n], XmNtraversalOn, False); n++;
/* Set the label here, so that we can switch between icons/text /* Set the label here, so that we can switch between icons/text
* by changing the XmNlabelType resource. */ * by changing the XmNlabelType resource. */
xms = XmStringCreate((char *)menu->dname, STRING_TAG); xms = XmStringCreate((char *)menu->dname, STRING_TAG);
@ -1053,7 +1044,6 @@ gui_mch_add_menu_item(menu, idx)
{ {
XtAddCallback(menu->id, XtAddCallback(menu->id,
XmNactivateCallback, gui_x11_menu_cb, menu); XmNactivateCallback, gui_x11_menu_cb, menu);
# ifdef FEAT_FOOTER # ifdef FEAT_FOOTER
XtAddEventHandler(menu->id, EnterWindowMask, False, XtAddEventHandler(menu->id, EnterWindowMask, False,
toolbarbutton_enter_cb, menu); toolbarbutton_enter_cb, menu);
@ -1190,7 +1180,7 @@ gui_mch_new_menu_colors()
gui_motif_menu_colors(toolBar); gui_motif_menu_colors(toolBar);
#endif #endif
gui_mch_submenu_change(root_menu, TRUE); submenu_change(root_menu, TRUE);
} }
void void
@ -1198,7 +1188,7 @@ gui_mch_new_menu_font()
{ {
if (menuBar == (Widget)0) if (menuBar == (Widget)0)
return; return;
gui_mch_submenu_change(root_menu, FALSE); submenu_change(root_menu, FALSE);
{ {
Dimension height; Dimension height;
Position w, h; Position w, h;
@ -1229,7 +1219,7 @@ gui_mch_new_tooltip_font()
menu = gui_find_menu((char_u *)"ToolBar"); menu = gui_find_menu((char_u *)"ToolBar");
if (menu != NULL) if (menu != NULL)
gui_mch_submenu_change(menu, FALSE); submenu_change(menu, FALSE);
# endif # endif
} }
@ -1244,13 +1234,13 @@ gui_mch_new_tooltip_colors()
toolbar = gui_find_menu((char_u *)"ToolBar"); toolbar = gui_find_menu((char_u *)"ToolBar");
if (toolbar != NULL) if (toolbar != NULL)
gui_mch_submenu_change(toolbar, TRUE); submenu_change(toolbar, TRUE);
# endif # endif
} }
#endif #endif
static void static void
gui_mch_submenu_change(menu, colors) submenu_change(menu, colors)
vimmenu_T *menu; vimmenu_T *menu;
int colors; /* TRUE for colors, FALSE for font */ int colors; /* TRUE for colors, FALSE for font */
{ {
@ -1330,7 +1320,7 @@ gui_mch_submenu_change(menu, colors)
} }
#endif #endif
/* Set the colors for the children */ /* Set the colors for the children */
gui_mch_submenu_change(mp->children, colors); submenu_change(mp->children, colors);
} }
} }
} }
@ -2800,7 +2790,7 @@ gui_mch_show_toolbar(int showit)
* input go to the editor window, not the button * input go to the editor window, not the button
*/ */
static void static void
gui_mch_reset_focus() reset_focus()
{ {
if (textArea != NULL) if (textArea != NULL)
XmProcessTraversal(textArea, XmTRAVERSE_CURRENT); XmProcessTraversal(textArea, XmTRAVERSE_CURRENT);
@ -2853,34 +2843,6 @@ gui_mch_compute_toolbar_height()
return (int)(height + (borders << 1)); return (int)(height + (borders << 1));
} }
#if 0 /* these are never called. */
/*
* The next toolbar enter/leave callbacks make sure the text area gets the
* keyboard focus when the pointer is not in the toolbar.
*/
/*ARGSUSED*/
static void
toolbar_enter_cb(w, client_data, event, cont)
Widget w;
XtPointer client_data;
XEvent *event;
Boolean *cont;
{
XmProcessTraversal(toolBar, XmTRAVERSE_CURRENT);
}
/*ARGSUSED*/
static void
toolbar_leave_cb(w, client_data, event, cont)
Widget w;
XtPointer client_data;
XEvent *event;
Boolean *cont;
{
XmProcessTraversal(textArea, XmTRAVERSE_CURRENT);
}
#endif
# ifdef FEAT_FOOTER # ifdef FEAT_FOOTER
/* /*
* The next toolbar enter/leave callbacks should really do balloon help. But * The next toolbar enter/leave callbacks should really do balloon help. But