diff options
| author | Daniel Colascione | 2013-03-10 14:55:25 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2013-03-10 14:55:25 -0800 |
| commit | 819e2da92a18d7af03ccd9cf0a2e5b940eb7b54f (patch) | |
| tree | 99d41020f39fd757e30622c6437e99902785a371 /src/w32term.c | |
| parent | d2e24f924a37982172ec0708369570a0af315c7e (diff) | |
| download | emacs-819e2da92a18d7af03ccd9cf0a2e5b940eb7b54f.tar.gz emacs-819e2da92a18d7af03ccd9cf0a2e5b940eb7b54f.zip | |
2013-03-10 Daniel Colascione <dancol@dancol.org>
* w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
(GUI_SDATA, guichar_t): Macros to abstract out differences between
NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
w32fns.c.
* w32term.c (construct_drag_n_drop): Use the above macros to make
drag-and-drop work for non-ASCII filenames in cygw32 builds.
* w32fns.c (x_set_name, x_set_title): Use the above macros to
properly display non-ASCII frame titles in cygw32 builds.
* w32fns.c (Fw32_shell_execute): Use the above macros to properly
call ShellExecute in cygw32 builds.
* w32fn.c (Fx_file_dialog): Use the above macros to simplify the
common file dialog code.
* w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
can just use du like other systems.
* coding.c (from_unicode_buffer): Declare.
* coding.c (from_unicode_buffer): Implement.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/w32term.c b/src/w32term.c index 170f33ecd67..6137d54c837 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3161,7 +3161,7 @@ construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) | |||
| 3161 | HDROP hdrop; | 3161 | HDROP hdrop; |
| 3162 | POINT p; | 3162 | POINT p; |
| 3163 | WORD num_files; | 3163 | WORD num_files; |
| 3164 | char *name; | 3164 | guichar_t *name; |
| 3165 | int i, len; | 3165 | int i, len; |
| 3166 | 3166 | ||
| 3167 | result->kind = DRAG_N_DROP_EVENT; | 3167 | result->kind = DRAG_N_DROP_EVENT; |
| @@ -3186,12 +3186,17 @@ construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) | |||
| 3186 | 3186 | ||
| 3187 | for (i = 0; i < num_files; i++) | 3187 | for (i = 0; i < num_files; i++) |
| 3188 | { | 3188 | { |
| 3189 | len = DragQueryFile (hdrop, i, NULL, 0); | 3189 | len = GUI_FN (DragQueryFile) (hdrop, i, NULL, 0); |
| 3190 | if (len <= 0) | 3190 | if (len <= 0) |
| 3191 | continue; | 3191 | continue; |
| 3192 | name = alloca (len + 1); | 3192 | |
| 3193 | DragQueryFile (hdrop, i, name, len + 1); | 3193 | name = alloca ((len + 1) * sizeof (*name)); |
| 3194 | GUI_FN (DragQueryFile) (hdrop, i, name, len + 1); | ||
| 3195 | #ifdef NTGUI_UNICODE | ||
| 3196 | files = Fcons (from_unicode_buffer (name), files); | ||
| 3197 | #else | ||
| 3194 | files = Fcons (DECODE_FILE (build_string (name)), files); | 3198 | files = Fcons (DECODE_FILE (build_string (name)), files); |
| 3199 | #endif /* NTGUI_UNICODE */ | ||
| 3195 | } | 3200 | } |
| 3196 | 3201 | ||
| 3197 | DragFinish (hdrop); | 3202 | DragFinish (hdrop); |