diff options
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 @@ | |||
| 1 | 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Miscellaneous fixes for non-default X toolkits. | ||
| 4 | * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings. | ||
| 5 | * xterm.c (x_frame_of_widget): Remove redundant prototype. | ||
| 6 | Move under #ifdef USE_LUCID. | ||
| 7 | (x_create_toolkit_scroll_bar): Adjust scroll_bar_name | ||
| 8 | definition and usage to avoid warnings. | ||
| 9 | |||
| 1 | 2012-07-31 Jan Djärv <jan.h.d@swipnet.se> | 10 | 2012-07-31 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 11 | ||
| 3 | * nsterm.m (openFiles): Fix previous checkin. | 12 | * 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. */) | |||
| 5382 | /* Create the dialog with PROMPT as title, using DIR as initial | 5382 | /* Create the dialog with PROMPT as title, using DIR as initial |
| 5383 | directory and using "*" as pattern. */ | 5383 | directory and using "*" as pattern. */ |
| 5384 | dir = Fexpand_file_name (dir, Qnil); | 5384 | dir = Fexpand_file_name (dir, Qnil); |
| 5385 | dir_xmstring = XmStringCreateLocalized (SDATA (dir)); | 5385 | dir_xmstring = XmStringCreateLocalized (SSDATA (dir)); |
| 5386 | pattern_xmstring = XmStringCreateLocalized ("*"); | 5386 | pattern_xmstring = XmStringCreateLocalized ("*"); |
| 5387 | 5387 | ||
| 5388 | XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac; | 5388 | 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. */) | |||
| 5435 | 5435 | ||
| 5436 | XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext); | 5436 | XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext); |
| 5437 | XmTextFieldReplace (wtext, 0, last_pos, | 5437 | XmTextFieldReplace (wtext, 0, last_pos, |
| 5438 | (SDATA (Ffile_name_nondirectory (default_filename)))); | 5438 | (SSDATA (Ffile_name_nondirectory (default_filename)))); |
| 5439 | 5439 | ||
| 5440 | /* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME | 5440 | /* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME |
| 5441 | must include the path for this to work. */ | 5441 | must include the path for this to work. */ |
| 5442 | 5442 | ||
| 5443 | default_xmstring = XmStringCreateLocalized (SDATA (default_filename)); | 5443 | default_xmstring = XmStringCreateLocalized (SSDATA (default_filename)); |
| 5444 | 5444 | ||
| 5445 | if (XmListItemExists (list, default_xmstring)) | 5445 | if (XmListItemExists (list, default_xmstring)) |
| 5446 | { | 5446 | { |
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) | |||
| 1438 | 1438 | ||
| 1439 | #ifdef USE_X_TOOLKIT | 1439 | #ifdef USE_X_TOOLKIT |
| 1440 | 1440 | ||
| 1441 | static struct frame *x_frame_of_widget (Widget); | ||
| 1442 | static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *, | 1441 | static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *, |
| 1443 | XrmValue *, XrmValue *, XtPointer *); | 1442 | XrmValue *, XrmValue *, XtPointer *); |
| 1444 | static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer, | 1443 | static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer, |
| 1445 | XrmValue *, Cardinal *); | 1444 | XrmValue *, Cardinal *); |
| 1446 | 1445 | ||
| 1446 | #ifdef USE_LUCID | ||
| 1447 | 1447 | ||
| 1448 | /* Return the frame on which widget WIDGET is used.. Abort if frame | 1448 | /* Return the frame on which widget WIDGET is used.. Abort if frame |
| 1449 | cannot be determined. */ | 1449 | cannot be determined. */ |
| @@ -1478,9 +1478,6 @@ x_frame_of_widget (Widget widget) | |||
| 1478 | abort (); | 1478 | abort (); |
| 1479 | } | 1479 | } |
| 1480 | 1480 | ||
| 1481 | |||
| 1482 | #ifdef USE_LUCID | ||
| 1483 | |||
| 1484 | /* Allocate a color which is lighter or darker than *PIXEL by FACTOR | 1481 | /* Allocate a color which is lighter or darker than *PIXEL by FACTOR |
| 1485 | or DELTA. Try a color with RGB values multiplied by FACTOR first. | 1482 | or DELTA. Try a color with RGB values multiplied by FACTOR first. |
| 1486 | If this produces the same color as PIXEL, try a color where all RGB | 1483 | 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 | |||
| 1496 | return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); | 1493 | return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); |
| 1497 | } | 1494 | } |
| 1498 | 1495 | ||
| 1499 | #endif | 1496 | #endif /* USE_LUCID */ |
| 1500 | 1497 | ||
| 1501 | 1498 | ||
| 1502 | /* Structure specifying which arguments should be passed by Xt to | 1499 | /* 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) | |||
| 4635 | Widget widget; | 4632 | Widget widget; |
| 4636 | Arg av[20]; | 4633 | Arg av[20]; |
| 4637 | int ac = 0; | 4634 | int ac = 0; |
| 4638 | char const *scroll_bar_name = SCROLL_BAR_NAME; | 4635 | const char *scroll_bar_name = SCROLL_BAR_NAME; |
| 4639 | unsigned long pixel; | 4636 | unsigned long pixel; |
| 4640 | 4637 | ||
| 4641 | BLOCK_INPUT; | 4638 | BLOCK_INPUT; |
| @@ -4665,7 +4662,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) | |||
| 4665 | } | 4662 | } |
| 4666 | 4663 | ||
| 4667 | widget = XmCreateScrollBar (f->output_data.x->edit_widget, | 4664 | widget = XmCreateScrollBar (f->output_data.x->edit_widget, |
| 4668 | scroll_bar_name, av, ac); | 4665 | (char *) scroll_bar_name, av, ac); |
| 4669 | 4666 | ||
| 4670 | /* Add one callback for everything that can happen. */ | 4667 | /* Add one callback for everything that can happen. */ |
| 4671 | XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback, | 4668 | XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback, |