~ubuntu-branches/ubuntu/maverick/gnome-session/maverick

« back to all changes in this revision

Viewing changes to gnome-session/gsm-keyfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2009-04-14 19:24:09 UTC
  • mto: (1.3.1 upstream) (2.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: james.westby@ubuntu.com-20090414192409-koxw9bt1lf1zr01z
ImportĀ upstreamĀ versionĀ 2.26.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * gsm-keyfile.h: extensions to GKeyFile
3
 
 * Based on code I wrote for gnome-panel
4
 
 *
5
 
 * Copyright (C) 2007 Vincent Untz <vuntz@gnome.org>
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU General Public License as
9
 
 * published by the Free Software Foundation; either version 2 of the
10
 
 * License, or (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful, but
13
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
 
 * 02111-1307, USA.
21
 
 *
22
 
 * Authors:
23
 
 *      Vincent Untz <vuntz@gnome.org>
24
 
 */
25
 
 
26
 
#ifndef GSM_KEYFILE_H
27
 
#define GSM_KEYFILE_H
28
 
 
29
 
#include <glib/gkeyfile.h>
30
 
 
31
 
G_BEGIN_DECLS
32
 
 
33
 
GKeyFile *gsm_key_file_new_desktop  (void);
34
 
gboolean  gsm_key_file_to_file      (GKeyFile       *keyfile,
35
 
                                     const gchar    *file,
36
 
                                     GError        **error);
37
 
gboolean gsm_key_file_get_boolean   (GKeyFile       *keyfile,
38
 
                                     const gchar    *key,
39
 
                                     gboolean        default_value);
40
 
#define gsm_key_file_get_string(key_file, key) \
41
 
        g_key_file_get_string (key_file, "Desktop Entry", key, NULL)
42
 
#define gsm_key_file_get_locale_string(key_file, key) \
43
 
        g_key_file_get_locale_string(key_file, "Desktop Entry", key, NULL, NULL)
44
 
#define gsm_key_file_get_string_list(key_file, key) \
45
 
        g_key_file_get_string_list (key_file, "Desktop Entry", key, NULL, NULL)
46
 
#define gsm_key_file_set_boolean(key_file, key, value) \
47
 
        g_key_file_set_boolean (key_file, "Desktop Entry", key, value)
48
 
#define gsm_key_file_set_string(key_file, key, value) \
49
 
        g_key_file_set_string (key_file, "Desktop Entry", key, value)
50
 
void    gsm_key_file_set_locale_string (GKeyFile    *keyfile,
51
 
                                        const gchar *key,
52
 
                                        const gchar *value);
53
 
#define gsm_key_file_remove_key(key_file, key) \
54
 
        g_key_file_remove_key (key_file, "Desktop Entry", key, NULL)
55
 
void gsm_key_file_remove_locale_key (GKeyFile    *keyfile,
56
 
                                     const gchar *key);
57
 
void gsm_key_file_remove_all_locale_key (GKeyFile    *keyfile,
58
 
                                         const gchar *key);
59
 
 
60
 
char *gsm_key_file_make_exec_uri (const char *exec);
61
 
 
62
 
G_END_DECLS
63
 
 
64
 
#endif /* GSM_KEYFILE_H */