mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Add support for a number of special directories, as defined by the
2007-06-04 Matthias Clasen <mclasen@redhat.com> Add support for a number of special directories, as defined by the xdg-user-dirs specification. (#432651, Bastien Nocera, Emmanuele Bassi, Michael Natterer) * glib/glib.symbols: * glib/gutils.[hc]: Add the GUserDirectory enum and g_get_user_special_dir(), with implementations based on the xdg-user-dirs spec and on native interfaces for Win32 and Carbon. * configure.in: Add Carbon checks. * tests/tetsglib.c: Test g_get_user_special_dir(). svn path=/trunk/; revision=5528
This commit is contained in:
committed by
Matthias Clasen
parent
c68dc0aef5
commit
d154485bc7
@@ -596,6 +596,14 @@ main (int argc,
|
||||
sv = (gchar **) g_get_language_names ();
|
||||
g_print ("languages: %s\n", s ? g_strjoinv (":", sv) : "NULL!");
|
||||
|
||||
/* special dirs */
|
||||
s = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
|
||||
g_print ("user_special[DESKTOP]: %s\n", s ? s : "NULL!");
|
||||
s = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
|
||||
g_print ("user_special[DOCUMENTS]: %s\n", s ? s : "NULL!");
|
||||
s = g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE);
|
||||
g_print ("user_special[PUBLIC_SHARE]: %s\n", s ? s : "NULL!");
|
||||
|
||||
/* type sizes */
|
||||
g_print ("checking size of gint8: %" G_GSIZE_FORMAT, sizeof (gint8));
|
||||
TEST (NULL, sizeof (gint8) == 1);
|
||||
|
Reference in New Issue
Block a user