aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorKarl Heuer1995-05-25 16:01:12 +0000
committerKarl Heuer1995-05-25 16:01:12 +0000
commitcc17e9bf31bd6d541b2438781007bf95dfc8581a (patch)
tree27c132306b5b4b6d9f8a6add8c9f65fbf2406e23 /src/xmenu.c
parentb7975ee4094cc2b2e7b2df4833294b63c3ee9608 (diff)
downloademacs-cc17e9bf31bd6d541b2438781007bf95dfc8581a.tar.gz
emacs-cc17e9bf31bd6d541b2438781007bf95dfc8581a.zip
(xmenu_show, xdialog_show): Increment widget_id_tick
in the same was as in xfns.c. Use LWLIB_ID type where appropriate. (set_frame_menubar, free_frame_menubar): Add casts to LWLIB_ID.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 6835ebdca92..c403438e99c 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1539,7 +1539,7 @@ set_frame_menubar (f, first_time)
1539 1539
1540 /* The third arg is DEEP_P, which says to consider the entire 1540 /* The third arg is DEEP_P, which says to consider the entire
1541 menu trees we supply, rather than just the menu bar item names. */ 1541 menu trees we supply, rather than just the menu bar item names. */
1542 lw_modify_all_widgets (id, first_wv, 1); 1542 lw_modify_all_widgets ((LWLIB_ID) id, first_wv, 1);
1543 1543
1544 /* Re-enable the edit widget to resize. */ 1544 /* Re-enable the edit widget to resize. */
1545 lw_allow_resizing (f->display.x->widget, True); 1545 lw_allow_resizing (f->display.x->widget, True);
@@ -1547,7 +1547,7 @@ set_frame_menubar (f, first_time)
1547 else 1547 else
1548 { 1548 {
1549 menubar_widget = lw_create_widget ("menubar", "menubar", 1549 menubar_widget = lw_create_widget ("menubar", "menubar",
1550 id, first_wv, 1550 (LWLIB_ID) id, first_wv,
1551 f->display.x->column_widget, 1551 f->display.x->column_widget,
1552 0, 1552 0,
1553 popup_activate_callback, 1553 popup_activate_callback,
@@ -1614,7 +1614,7 @@ free_frame_menubar (f)
1614 { 1614 {
1615 id = frame_vector_add_frame (f); 1615 id = frame_vector_add_frame (f);
1616 BLOCK_INPUT; 1616 BLOCK_INPUT;
1617 lw_destroy_all_widgets (id); 1617 lw_destroy_all_widgets ((LWLIB_ID) id);
1618 XVECTOR (frame_vector)->contents[id] = Qnil; 1618 XVECTOR (frame_vector)->contents[id] = Qnil;
1619 UNBLOCK_INPUT; 1619 UNBLOCK_INPUT;
1620 } 1620 }
@@ -1641,8 +1641,13 @@ free_frame_menubar (f)
1641#ifdef USE_X_TOOLKIT 1641#ifdef USE_X_TOOLKIT
1642 1642
1643/* We need a unique id for each widget handled by the Lucid Widget 1643/* We need a unique id for each widget handled by the Lucid Widget
1644 library. This includes the frame main windows, popup menu and 1644 library.
1645 dialog box. */ 1645
1646 For the main windows, and popup menus, we use this counter,
1647 which we increment each time after use.
1648
1649 For menu bars, we use the index of the frame in frame_vector
1650 as the id. */
1646LWLIB_ID widget_id_tick; 1651LWLIB_ID widget_id_tick;
1647 1652
1648#ifdef __STDC__ 1653#ifdef __STDC__
@@ -1671,7 +1676,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
1671 char **error; 1676 char **error;
1672{ 1677{
1673 int i; 1678 int i;
1674 int menu_id; 1679 LWLIB_ID menu_id;
1675 Widget menu; 1680 Widget menu;
1676 Arg av [2]; 1681 Arg av [2];
1677 int ac = 0; 1682 int ac = 0;
@@ -1821,7 +1826,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
1821 } 1826 }
1822 1827
1823 /* Actually create the menu. */ 1828 /* Actually create the menu. */
1824 menu_id = ++widget_id_tick; 1829 menu_id = widget_id_tick++;
1825 menu = lw_create_widget ("popup", first_wv->name, menu_id, first_wv, 1830 menu = lw_create_widget ("popup", first_wv->name, menu_id, first_wv,
1826 f->display.x->widget, 1, 0, 1831 f->display.x->widget, 1, 0,
1827 popup_selection_callback, 1832 popup_selection_callback,
@@ -1934,7 +1939,7 @@ xdialog_show (f, keymaps, title, error)
1934 char **error; 1939 char **error;
1935{ 1940{
1936 int i, nb_buttons=0; 1941 int i, nb_buttons=0;
1937 int dialog_id; 1942 LWLIB_ID dialog_id;
1938 Widget menu; 1943 Widget menu;
1939 char dialog_name[6]; 1944 char dialog_name[6];
1940 1945
@@ -2044,7 +2049,7 @@ xdialog_show (f, keymaps, title, error)
2044 } 2049 }
2045 2050
2046 /* Actually create the dialog. */ 2051 /* Actually create the dialog. */
2047 dialog_id = ++widget_id_tick; 2052 dialog_id = widget_id_tick++;
2048 menu = lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv, 2053 menu = lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
2049 f->display.x->widget, 1, 0, 2054 f->display.x->widget, 1, 0,
2050 dialog_selection_callback, 0); 2055 dialog_selection_callback, 0);