38 wchar_t *posix = NULL;
41 lcid = GetUserDefaultLCID();
42 int lang_id = PRIMARYLANGID(lcid);
43 int sub_id = SUBLANGID(lcid);
86 case SUBLANG_ENGLISH_UK:
89 case SUBLANG_ENGLISH_AUS:
92 case SUBLANG_ENGLISH_CAN:
129 case LANG_INDONESIAN:
147 case LANG_LITHUANIAN:
150 case LANG_MACEDONIAN:
162 case SUBLANG_NORWEGIAN_BOKMAL:
165 case SUBLANG_NORWEGIAN_NYNORSK:
179 case LANG_PORTUGUESE:
182 case SUBLANG_PORTUGUESE_BRAZILIAN:
209 case SUBLANG_SERBIAN_LATIN:
212 case SUBLANG_SERBIAN_CYRILLIC:
215 case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC:
216 case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN:
219 case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN:
242 case LANG_VIETNAMESE:
251 case SUBLANG_CHINESE_SIMPLIFIED:
254 case SUBLANG_CHINESE_TRADITIONAL:
264 case LANG_BELARUSIAN:
358 SHFILEOPSTRUCTW op = { 0 };
363 wfilename = g_utf8_to_utf16(g_file_get_parse_name(file), -1, NULL, &len, NULL);
365 wfilename = g_renew(
wchar_t, wfilename, len + 2);
366 wfilename[len + 1] = 0;
368 op.wFunc = FO_DELETE;
369 op.pFrom = wfilename;
370 op.fFlags = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION;
372 success = SHFileOperationW(&op) == 0;
374 if(success && op.fAnyOperationsAborted)
376 if(cancellable && !g_cancellable_is_cancelled(cancellable)) g_cancellable_cancel(cancellable);
377 g_set_error(
error, G_IO_ERROR, g_io_error_from_errno(ECANCELED),
"Unable to trash file %s: %s",
378 g_file_get_parse_name(file), g_strerror(ECANCELED));
382 g_set_error(
error, G_IO_ERROR, g_io_error_from_errno(0),
"Unable to trash file %s",
383 g_file_get_parse_name(file));