Mercurial > vim
comparison src/gui_athena.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 |
---|---|
1017 ui_new_shellsize(); | 1017 ui_new_shellsize(); |
1018 if (oldpuller != None) | 1018 if (oldpuller != None) |
1019 XFreePixmap(gui.dpy, oldpuller); | 1019 XFreePixmap(gui.dpy, oldpuller); |
1020 } | 1020 } |
1021 | 1021 |
1022 #if defined(FEAT_BEVAL) || defined(PROTO) | 1022 #if defined(FEAT_BEVAL_GUI) || defined(PROTO) |
1023 void | 1023 void |
1024 gui_mch_new_tooltip_font(void) | 1024 gui_mch_new_tooltip_font(void) |
1025 { | 1025 { |
1026 # ifdef FEAT_TOOLBAR | 1026 # ifdef FEAT_TOOLBAR |
1027 vimmenu_T *menu; | 1027 vimmenu_T *menu; |
1074 get_toolbar_pixmap(mp, &mp->image); | 1074 get_toolbar_pixmap(mp, &mp->image); |
1075 if (mp->image != (Pixmap)0) | 1075 if (mp->image != (Pixmap)0) |
1076 XtVaSetValues(mp->id, XtNbitmap, mp->image, NULL); | 1076 XtVaSetValues(mp->id, XtNbitmap, mp->image, NULL); |
1077 } | 1077 } |
1078 | 1078 |
1079 # ifdef FEAT_BEVAL | 1079 # ifdef FEAT_BEVAL_GUI |
1080 /* If we have a tooltip, then we need to change it's colors */ | 1080 /* If we have a tooltip, then we need to change it's colors */ |
1081 if (mp->tip != NULL) | 1081 if (mp->tip != NULL) |
1082 { | 1082 { |
1083 Arg args[2]; | 1083 Arg args[2]; |
1084 | 1084 |
1092 #endif | 1092 #endif |
1093 } | 1093 } |
1094 else | 1094 else |
1095 { | 1095 { |
1096 gui_athena_menu_font(mp->id); | 1096 gui_athena_menu_font(mp->id); |
1097 #ifdef FEAT_BEVAL | 1097 #ifdef FEAT_BEVAL_GUI |
1098 /* If we have a tooltip, then we need to change it's font */ | 1098 /* If we have a tooltip, then we need to change it's font */ |
1099 /* Assume XtNinternational == True (in createBalloonEvalWindow) | 1099 /* Assume XtNinternational == True (in createBalloonEvalWindow) |
1100 */ | 1100 */ |
1101 if (mp->tip != NULL) | 1101 if (mp->tip != NULL) |
1102 { | 1102 { |
1199 } | 1199 } |
1200 else | 1200 else |
1201 XtSetValues(menu->id, args, n); | 1201 XtSetValues(menu->id, args, n); |
1202 gui_athena_menu_colors(menu->id); | 1202 gui_athena_menu_colors(menu->id); |
1203 | 1203 |
1204 #ifdef FEAT_BEVAL | 1204 #ifdef FEAT_BEVAL_GUI |
1205 gui_mch_menu_set_tip(menu); | 1205 gui_mch_menu_set_tip(menu); |
1206 #endif | 1206 #endif |
1207 | 1207 |
1208 menu->parent = parent; | 1208 menu->parent = parent; |
1209 menu->submenu_id = NULL; | 1209 menu->submenu_id = NULL; |
1536 XtNborderWidth, &border, | 1536 XtNborderWidth, &border, |
1537 NULL); | 1537 NULL); |
1538 XtVaGetValues(menu->id, | 1538 XtVaGetValues(menu->id, |
1539 XtNheight, &height, | 1539 XtNheight, &height, |
1540 NULL); | 1540 NULL); |
1541 #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL) | 1541 #if defined(FEAT_TOOLBAR) && defined(FEAT_BEVAL_GUI) |
1542 if (parent == toolBar && menu->tip != NULL) | 1542 if (parent == toolBar && menu->tip != NULL) |
1543 { | 1543 { |
1544 /* We try to destroy this before the actual menu, because there are | 1544 /* We try to destroy this before the actual menu, because there are |
1545 * callbacks, etc. that will be unregistered during the tooltip | 1545 * callbacks, etc. that will be unregistered during the tooltip |
1546 * destruction. | 1546 * destruction. |
1841 { | 1841 { |
1842 gui.menu_fg_pixel = gui_get_color((char_u *)gui.rsrc_menu_fg_name); | 1842 gui.menu_fg_pixel = gui_get_color((char_u *)gui.rsrc_menu_fg_name); |
1843 gui.menu_bg_pixel = gui_get_color((char_u *)gui.rsrc_menu_bg_name); | 1843 gui.menu_bg_pixel = gui_get_color((char_u *)gui.rsrc_menu_bg_name); |
1844 gui.scroll_fg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_fg_name); | 1844 gui.scroll_fg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_fg_name); |
1845 gui.scroll_bg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_bg_name); | 1845 gui.scroll_bg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_bg_name); |
1846 #ifdef FEAT_BEVAL | 1846 #ifdef FEAT_BEVAL_GUI |
1847 gui.tooltip_fg_pixel = gui_get_color((char_u *)gui.rsrc_tooltip_fg_name); | 1847 gui.tooltip_fg_pixel = gui_get_color((char_u *)gui.rsrc_tooltip_fg_name); |
1848 gui.tooltip_bg_pixel = gui_get_color((char_u *)gui.rsrc_tooltip_bg_name); | 1848 gui.tooltip_bg_pixel = gui_get_color((char_u *)gui.rsrc_tooltip_bg_name); |
1849 #endif | 1849 #endif |
1850 } | 1850 } |
1851 } | 1851 } |