use-system-locale-in-gobject-api.diff 1003 B

1234567891011121314151617181920212223242526272829
  1. Index: polkit-0.99/src/polkit/polkitauthority.c
  2. ===================================================================
  3. --- polkit-0.99.orig/src/polkit/polkitauthority.c
  4. +++ polkit-0.99/src/polkit/polkitauthority.c
  5. @@ -23,6 +23,8 @@
  6. # include "config.h"
  7. #endif
  8. +#include <locale.h>
  9. +
  10. #include "polkitauthorizationresult.h"
  11. #include "polkitcheckauthorizationflags.h"
  12. #include "polkitauthority.h"
  13. @@ -650,10 +652,13 @@ polkit_authority_enumerate_actions (Polk
  14. {
  15. g_return_if_fail (POLKIT_IS_AUTHORITY (authority));
  16. g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
  17. +
  18. + char *locale = setlocale(LC_MESSAGES, NULL);
  19. +
  20. g_dbus_proxy_call (authority->proxy,
  21. "EnumerateActions",
  22. g_variant_new ("(s)",
  23. - ""), /* TODO: use system locale */
  24. + locale ? locale : ""),
  25. G_DBUS_CALL_FLAGS_NONE,
  26. -1,
  27. cancellable,