mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Provide a method to use unicode command line arguments on Windows
For unicode command line characters Windows uses UTF-16, while Glib and GTK use UTF-8. To solve that we retrieve the command line via __wgetmainargs() and use g_utf16_to_utf8() to convert each argument. The used method should support wildcards passed as arguments (e.g. *.xml). Two new, OS abstracted functions appear in linux.c (NOP), macos.c (NOP), windows.c: subsurface_command_line_init(...) subsurface_command_line_exit(...) which are being called in main() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3917e7b2f7
commit
f928be5061
5 changed files with 78 additions and 0 deletions
10
macos.c
10
macos.c
|
@ -149,3 +149,13 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
|
|||
|
||||
gtk_osxapplication_ready(osx_app);
|
||||
}
|
||||
|
||||
void subsurface_command_line_init(gint *argc, gchar ***argv)
|
||||
{
|
||||
/* this is a no-op */
|
||||
}
|
||||
|
||||
void subsurface_command_line_exit(gint *argc, gchar ***argv)
|
||||
{
|
||||
/* this is a no-op */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue