Xt on behalf of one of the widget sets. */
static int popup_activated_flag;
-static int next_menubar_widget_id;
-
\f
#ifdef USE_X_TOOLKIT
+static int next_menubar_widget_id;
+
/* Return the frame whose ->output_data.x->id equals ID, or 0 if none. */
static struct frame *
#endif
)
{
- EMACS_TIME next_time = timer_check (1), *ntp;
+ EMACS_TIME next_time = timer_check (), *ntp;
long secs = EMACS_SECS (next_time);
long usecs = EMACS_USECS (next_time);
SELECT_TYPE read_fds;
break;
}
#endif
- show_help_echo (help, Qnil, Qnil, Qnil, 1);
+ show_help_echo (help, Qnil, Qnil, Qnil);
}
}
#endif
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
- int i, last_i = 0;
+ EMACS_UINT i, last_i = 0;
int *submenu_start, *submenu_end;
int *submenu_top_level_items, *submenu_n_panes;
/* Check if there is room for the menu. If not, adjust x/y so that
the menu is fully visible. */
- gtk_widget_size_request (GTK_WIDGET (menu), &req);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &req);
if (data->x + req.width > disp_width)
*x -= data->x + req.width - disp_width;
if (data->y + req.height > disp_height)
Lisp_Object
xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
- Lisp_Object title, const char **error, EMACS_UINT timestamp)
+ Lisp_Object title, const char **error_name, EMACS_UINT timestamp)
{
int i;
widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0;
if (! FRAME_X_P (f))
abort ();
- *error = NULL;
+ *error_name = NULL;
if (menu_items_used <= MENU_ITEMS_PANE_LENGTH)
{
- *error = "Empty menu";
+ *error_name = "Empty menu";
return Qnil;
}
{
/* Create a new pane. */
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
representing the text label and buttons. */
{
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
pane_string = (NILP (pane_name)
Fcons (pane_name,
Fcons (make_number (pane), Qnil)));
show_help_echo (help_string ? build_string (help_string) : Qnil,
- Qnil, menu_object, make_number (item), 1);
+ Qnil, menu_object, make_number (item));
}
static Lisp_Object
{
/* Create a new pane. */
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
maxlines = max (maxlines, lines);
lines = 0;