Commit Graph

8 Commits

Author SHA1 Message Date
Tom Schoonjans
0e7d6bb71e GtkFileChooserNativeWin32: add support for get_filter and set_filter
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:30:45 -04:00
Christoph Reiter
a1dc9e4660 gtkfilechoosernativewin32: Fix support for non-ASCII paths
The code used SIGDN_URL to get an URL for the selected item, but Windows URLs
are a mix of unicode and percent encoded characters in the locale encoding
and not something GFile can understand. The result is a garbage file
path.

Instead use SIGDN_FILESYSPATH to get a real file path if available.

Also checks the return value of g_utf16_to_utf8 because file paths on
Windows can contain lone surrogates which would make the conversion fail.

https://bugzilla.gnome.org/show_bug.cgi?id=783347
2017-06-02 13:22:36 +02:00
Matthias Clasen
bbd94b5a9f gtk: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Benjamin Otte
9efb275a13 filechoosernativewin32: Remove unused variables 2016-02-11 03:44:47 +01:00
Benjamin Otte
ccc7e3058c filechoosernativewin32: Silence gcc 2016-02-11 03:44:47 +01:00
Benjamin Otte
068f8a3da1 filechoosernativewin32: Add missing return type
Looks like a line accidentally was deleted there.
2016-02-11 03:44:47 +01:00
Benjamin Otte
117e303b44 filechoosernativewin32: Define MSC_VER at top of file
The headers we include might include windows headers which define _MSC_VER already.
2016-02-11 03:44:47 +01:00
Alexander Larsson
5094900180 GtkFileChooserNative: Fallback and win32 implementation
This is a subclass on GtkNativeDialog that uses GtkFileChooserDialog
as a fallback, but also has support for the win32 file chooser dialog.
2015-11-05 16:54:07 +01:00