[libegg] smclient: Add egg_desktop_file_get_integer()
- From: Chris Coulson <ccoulson src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libegg] smclient: Add egg_desktop_file_get_integer()
- Date: Fri, 29 Jan 2010 14:47:53 +0000 (UTC)
commit 48ccfc55d4a9424b8928025fe13ae819ab57567b
Author: Chris Coulson <chrisccoulson googlemail com>
Date: Fri Jan 29 01:24:10 2010 +0000
smclient: Add egg_desktop_file_get_integer()
Add egg_desktop_file_get_integer() for reading integer values from
desktop files
libegg/smclient/eggdesktopfile.c | 10 ++++++++++
libegg/smclient/eggdesktopfile.h | 3 +++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libegg/smclient/eggdesktopfile.c b/libegg/smclient/eggdesktopfile.c
index 6f6b946..9b12af5 100644
--- a/libegg/smclient/eggdesktopfile.c
+++ b/libegg/smclient/eggdesktopfile.c
@@ -431,6 +431,16 @@ egg_desktop_file_get_numeric (EggDesktopFile *desktop_file,
error);
}
+int
+egg_desktop_file_get_integer (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error)
+{
+ return g_key_file_get_integer (desktop_file->key_file,
+ EGG_DESKTOP_FILE_GROUP, key,
+ error);
+}
+
char **
egg_desktop_file_get_string_list (EggDesktopFile *desktop_file,
const char *key,
diff --git a/libegg/smclient/eggdesktopfile.h b/libegg/smclient/eggdesktopfile.h
index 18fe463..16c5426 100644
--- a/libegg/smclient/eggdesktopfile.h
+++ b/libegg/smclient/eggdesktopfile.h
@@ -127,6 +127,9 @@ gboolean egg_desktop_file_get_boolean (EggDesktopFile *desktop_file
double egg_desktop_file_get_numeric (EggDesktopFile *desktop_file,
const char *key,
GError **error);
+int egg_desktop_file_get_integer (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error);
char **egg_desktop_file_get_string_list (EggDesktopFile *desktop_file,
const char *key,
gsize *length,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]