comparison src/gui_motif.c @ 12871:1a450ce6980c v8.0.1312

patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI commit https://github.com/vim/vim/commit/c3719bd87beca9f72d2e9f11e36d561c2c3b57b0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 18 22:13:31 2017 +0100 patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI Problem: balloon_show() only works in terminal when compiled with the GUI. Solution: Add FEAT_BEVAL_GUI and refactor to move common code out of the GUI specific file.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Nov 2017 22:15:05 +0100
parents 68d7bc045dbe
children 27b9a84395b5
comparison
equal deleted inserted replaced
12870:0469872186f5 12871:1a450ce6980c
1358 else 1358 else
1359 XtSetValues(menu->id, args, n); 1359 XtSetValues(menu->id, args, n);
1360 if (xms != NULL) 1360 if (xms != NULL)
1361 XmStringFree(xms); 1361 XmStringFree(xms);
1362 1362
1363 # ifdef FEAT_BEVAL 1363 # ifdef FEAT_BEVAL_GUI
1364 gui_mch_menu_set_tip(menu); 1364 gui_mch_menu_set_tip(menu);
1365 # endif 1365 # endif
1366 1366
1367 menu->parent = parent; 1367 menu->parent = parent;
1368 menu->submenu_id = NULL; 1368 menu->submenu_id = NULL;
1507 } 1507 }
1508 gui_set_shellsize(FALSE, TRUE, RESIZE_VERT); 1508 gui_set_shellsize(FALSE, TRUE, RESIZE_VERT);
1509 ui_new_shellsize(); 1509 ui_new_shellsize();
1510 } 1510 }
1511 1511
1512 #if defined(FEAT_BEVAL) || defined(PROTO) 1512 #if defined(FEAT_BEVAL_GUI) || defined(PROTO)
1513 void 1513 void
1514 gui_mch_new_tooltip_font(void) 1514 gui_mch_new_tooltip_font(void)
1515 { 1515 {
1516 # ifdef FEAT_TOOLBAR 1516 # ifdef FEAT_TOOLBAR
1517 vimmenu_T *menu; 1517 vimmenu_T *menu;
1564 Arg args[18]; 1564 Arg args[18];
1565 1565
1566 n = add_pixmap_args(mp, args, n); 1566 n = add_pixmap_args(mp, args, n);
1567 XtSetValues(mp->id, args, n); 1567 XtSetValues(mp->id, args, n);
1568 } 1568 }
1569 # ifdef FEAT_BEVAL 1569 # ifdef FEAT_BEVAL_GUI
1570 /* If we have a tooltip, then we need to change it's font */ 1570 /* If we have a tooltip, then we need to change it's font */
1571 if (mp->tip != NULL) 1571 if (mp->tip != NULL)
1572 { 1572 {
1573 Arg args[2]; 1573 Arg args[2];
1574 1574
1582 #endif 1582 #endif
1583 } 1583 }
1584 else 1584 else
1585 { 1585 {
1586 gui_motif_menu_fontlist(mp->id); 1586 gui_motif_menu_fontlist(mp->id);
1587 #ifdef FEAT_BEVAL 1587 #ifdef FEAT_BEVAL_GUI
1588 /* If we have a tooltip, then we need to change it's font */ 1588 /* If we have a tooltip, then we need to change it's font */
1589 if (mp->tip != NULL) 1589 if (mp->tip != NULL)
1590 { 1590 {
1591 Arg args[1]; 1591 Arg args[1];
1592 1592
1640 if (menu->id != (Widget)0) 1640 if (menu->id != (Widget)0)
1641 { 1641 {
1642 Widget parent; 1642 Widget parent;
1643 1643
1644 parent = XtParent(menu->id); 1644 parent = XtParent(menu->id);
1645 #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL) 1645 #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL_GUI)
1646 if (parent == toolBar && menu->tip != NULL) 1646 if (parent == toolBar && menu->tip != NULL)
1647 { 1647 {
1648 /* We try to destroy this before the actual menu, because there are 1648 /* We try to destroy this before the actual menu, because there are
1649 * callbacks, etc. that will be unregistered during the tooltip 1649 * callbacks, etc. that will be unregistered during the tooltip
1650 * destruction. 1650 * destruction.
1701 * window manager or a resources file. */ 1701 * window manager or a resources file. */
1702 gui.menu_fg_pixel = gui.menu_def_fg_pixel; 1702 gui.menu_fg_pixel = gui.menu_def_fg_pixel;
1703 gui.menu_bg_pixel = gui.menu_def_bg_pixel; 1703 gui.menu_bg_pixel = gui.menu_def_bg_pixel;
1704 gui.scroll_fg_pixel = gui.scroll_def_fg_pixel; 1704 gui.scroll_fg_pixel = gui.scroll_def_fg_pixel;
1705 gui.scroll_bg_pixel = gui.scroll_def_bg_pixel; 1705 gui.scroll_bg_pixel = gui.scroll_def_bg_pixel;
1706 #ifdef FEAT_BEVAL 1706 #ifdef FEAT_BEVAL_GUI
1707 gui.tooltip_fg_pixel = 1707 gui.tooltip_fg_pixel =
1708 gui_get_color((char_u *)gui.rsrc_tooltip_fg_name); 1708 gui_get_color((char_u *)gui.rsrc_tooltip_fg_name);
1709 gui.tooltip_bg_pixel = 1709 gui.tooltip_bg_pixel =
1710 gui_get_color((char_u *)gui.rsrc_tooltip_bg_name); 1710 gui_get_color((char_u *)gui.rsrc_tooltip_bg_name);
1711 #endif 1711 #endif