diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-31 15:37:38 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-31 15:37:38 +0400 |
commit | c09bfb2f140b2885af17185634451e2abfd6e91c (patch) | |
tree | f0529721a19d42d6ba84f0ed96ab10562d40a727 /src | |
parent | 906debc3b7206396a00f9dd91a519909c1c9d3bb (diff) | |
download | emacs-c09bfb2f140b2885af17185634451e2abfd6e91c.tar.gz |
Miscellaneous fixes for non-default X toolkits.
* configure.ac (MOTIF): Check for /usr/include/openmotif
and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif.
* lwlib/lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
* src/xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
* src/xterm.c (x_frame_of_widget): Remove redundant prototype.
Move under #ifdef USE_LUCID.
(x_create_toolkit_scroll_bar): Adjust scroll_bar_name
definition and usage to avoid warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/xfns.c | 6 | ||||
-rw-r--r-- | src/xterm.c | 11 |
3 files changed, 16 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ac16e529b1e..0c791bcd17c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-07-31 Dmitry Antipov <dmantipov@yandex.ru> + + Miscellaneous fixes for non-default X toolkits. + * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings. + * xterm.c (x_frame_of_widget): Remove redundant prototype. + Move under #ifdef USE_LUCID. + (x_create_toolkit_scroll_bar): Adjust scroll_bar_name + definition and usage to avoid warnings. + 2012-07-31 Jan Djärv <jan.h.d@swipnet.se> * nsterm.m (openFiles): Fix previous checkin. diff --git a/src/xfns.c b/src/xfns.c index c8c96b642f0..bca43dbd306 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5382,7 +5382,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) /* Create the dialog with PROMPT as title, using DIR as initial directory and using "*" as pattern. */ dir = Fexpand_file_name (dir, Qnil); - dir_xmstring = XmStringCreateLocalized (SDATA (dir)); + dir_xmstring = XmStringCreateLocalized (SSDATA (dir)); pattern_xmstring = XmStringCreateLocalized ("*"); XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac; @@ -5435,12 +5435,12 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext); XmTextFieldReplace (wtext, 0, last_pos, - (SDATA (Ffile_name_nondirectory (default_filename)))); + (SSDATA (Ffile_name_nondirectory (default_filename)))); /* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME must include the path for this to work. */ - default_xmstring = XmStringCreateLocalized (SDATA (default_filename)); + default_xmstring = XmStringCreateLocalized (SSDATA (default_filename)); if (XmListItemExists (list, default_xmstring)) { diff --git a/src/xterm.c b/src/xterm.c index b5c5ce33d6c..60f65aa9508 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1438,12 +1438,12 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s) #ifdef USE_X_TOOLKIT -static struct frame *x_frame_of_widget (Widget); static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *, XrmValue *, XrmValue *, XtPointer *); static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer, XrmValue *, Cardinal *); +#ifdef USE_LUCID /* Return the frame on which widget WIDGET is used.. Abort if frame cannot be determined. */ @@ -1478,9 +1478,6 @@ x_frame_of_widget (Widget widget) abort (); } - -#ifdef USE_LUCID - /* Allocate a color which is lighter or darker than *PIXEL by FACTOR or DELTA. Try a color with RGB values multiplied by FACTOR first. If this produces the same color as PIXEL, try a color where all RGB @@ -1496,7 +1493,7 @@ x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); } -#endif +#endif /* USE_LUCID */ /* Structure specifying which arguments should be passed by Xt to @@ -4635,7 +4632,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) Widget widget; Arg av[20]; int ac = 0; - char const *scroll_bar_name = SCROLL_BAR_NAME; + const char *scroll_bar_name = SCROLL_BAR_NAME; unsigned long pixel; BLOCK_INPUT; @@ -4665,7 +4662,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) } widget = XmCreateScrollBar (f->output_data.x->edit_widget, - scroll_bar_name, av, ac); + (char *) scroll_bar_name, av, ac); /* Add one callback for everything that can happen. */ XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback, |