Mercurial > emacs
diff lwlib/xlwmenu.c @ 109141:fa173b9bd9ce
Fix some bad prototypes and formatting after conversion from K&R declaration.
* lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit.
(fill_xft_data, set_text): Remove unused variable screen.
(draw_text): Cast bp to FcChar8*.
(find_xft_data): Return 0 if inst or xft_data is not set.
(wm_delete_window): Correct prototype. Initialize widget to 0
and return if widget is still 0 after loop.
* lwlib/xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
(display_menu_item): Remove unused variable gi.
(make_windows_if_needed): Remove unused variable screen.
(XlwMenuRedisplay): Remove unused variable i.
* src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
(xg_get_image_for_pixmap, create_dialog)
(xg_get_file_with_selection, xg_get_file_name, update_cl_data)
(menuitem_highlight_callback, make_menu_item)
(xg_create_one_menuitem, create_menus, xg_update_menu_item)
(xg_create_scroll_bar, xg_update_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
(xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
(xg_tool_bar_item_expose_callback): Reformat prototype.
(xg_update_menubar): GList *group => GSList *group.
(xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
before use.
(update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
to GTK_IMAGE (wimage).
* src/xsettings.c (something_changedCB, parse_settings)
(apply_xft_settings): Reformat prototype.
(something_changedCB, init_gconf): Remove unused variable i.
(read_settings): Remove unused variable long_len.
* src/xsmfns.c (SSDATA): New macro.
(smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
passed to strlen/strcpy/strcat.
(create_client_leader_window): Surround with #ifndef USE_GTK. Cast
7:th arg to XChangeProperty to (unsigned char *)
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Mon, 05 Jul 2010 11:17:12 +0200 |
parents | 384b3408c143 |
children | 750db9f3e6d8 |
line wrap: on
line diff
--- a/lwlib/xlwmenu.c Sun Jul 04 21:57:13 2010 -0700 +++ b/lwlib/xlwmenu.c Mon Jul 05 11:17:12 2010 +0200 @@ -185,10 +185,11 @@ }; #undef offset -static Boolean XlwMenuSetValues(Widget current, Widget request, Widget new); +static Boolean XlwMenuSetValues(Widget current, Widget request, Widget new, + ArgList args, Cardinal *num_args); static void XlwMenuRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes); static void XlwMenuResize(Widget w); -static void XlwMenuInitialize(Widget request, XlwMenuWidget mw, ArgList args, Cardinal *num_args); +static void XlwMenuInitialize(Widget request, Widget mw, ArgList args, Cardinal *num_args); static void XlwMenuRedisplay(Widget w, XEvent *ev, Region region); static void XlwMenuDestroy(Widget w); static void XlwMenuClassInitialize(void); @@ -1086,7 +1087,6 @@ #ifdef HAVE_XFT if (ws->xft_draw) { - XGlyphInfo gi; int draw_x = ws->width - ws->max_rest_width + mw->menu.arrow_spacing; int draw_y = y + v_spacing + shadow + font_ascent; @@ -1277,9 +1277,6 @@ int i; int start_at; window_state* windows; -#ifdef HAVE_XFT - int screen = XScreenNumberOfScreen (mw->core.screen); -#endif if (mw->menu.windows_length >= n) return; @@ -1852,10 +1849,10 @@ #endif static void -XlwMenuInitialize (Widget request, XlwMenuWidget mw, ArgList args, Cardinal *num_args) +XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args) { /* Get the GCs and the widget size */ - + XlwMenuWidget mw = (XlwMenuWidget) w; Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); Display* display = XtDisplay (mw); @@ -2003,7 +2000,6 @@ XlwMenuRedisplay (Widget w, XEvent *ev, Region region) { XlwMenuWidget mw = (XlwMenuWidget)w; - int i; /* If we have a depth beyond 1, it's because a submenu was displayed. If the submenu has been destroyed, set the depth back to 1. */ @@ -2106,7 +2102,8 @@ #endif static Boolean -XlwMenuSetValues (Widget current, Widget request, Widget new) +XlwMenuSetValues (Widget current, Widget request, Widget new, + ArgList args, Cardinal *num_args) { XlwMenuWidget oldmw = (XlwMenuWidget)current; XlwMenuWidget newmw = (XlwMenuWidget)new;