37 wchar_t *posix = NULL;
40 lcid = GetUserDefaultLCID();
41 int lang_id = PRIMARYLANGID(lcid);
42 int sub_id = SUBLANGID(lcid);
85 case SUBLANG_ENGLISH_UK:
88 case SUBLANG_ENGLISH_AUS:
91 case SUBLANG_ENGLISH_CAN:
128 case LANG_INDONESIAN:
146 case LANG_LITHUANIAN:
149 case LANG_MACEDONIAN:
161 case SUBLANG_NORWEGIAN_BOKMAL:
164 case SUBLANG_NORWEGIAN_NYNORSK:
178 case LANG_PORTUGUESE:
181 case SUBLANG_PORTUGUESE_BRAZILIAN:
208 case SUBLANG_SERBIAN_LATIN:
211 case SUBLANG_SERBIAN_CYRILLIC:
214 case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC:
215 case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN:
218 case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN:
241 case LANG_VIETNAMESE:
250 case SUBLANG_CHINESE_SIMPLIFIED:
253 case SUBLANG_CHINESE_TRADITIONAL:
263 case LANG_BELARUSIAN:
357 SHFILEOPSTRUCTW op = { 0 };
362 wfilename = g_utf8_to_utf16(g_file_get_parse_name(file), -1, NULL, &len, NULL);
364 wfilename = g_renew(
wchar_t, wfilename, len + 2);
365 wfilename[len + 1] = 0;
367 op.wFunc = FO_DELETE;
368 op.pFrom = wfilename;
369 op.fFlags = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION;
371 success = SHFileOperationW(&op) == 0;
373 if(success && op.fAnyOperationsAborted)
375 if(cancellable && !g_cancellable_is_cancelled(cancellable)) g_cancellable_cancel(cancellable);
376 g_set_error(
error, G_IO_ERROR, g_io_error_from_errno(ECANCELED),
"Unable to trash file %s: %s",
377 g_file_get_parse_name(file), g_strerror(ECANCELED));
381 g_set_error(
error, G_IO_ERROR, g_io_error_from_errno(0),
"Unable to trash file %s",
382 g_file_get_parse_name(file));