[gnome-panel] panel: Add helper API to get file in the user config directory for panel



commit 464c8666f20e885b22f255884580746aa8339b18
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Oct 11 17:24:00 2011 +0200

    panel: Add helper API to get file in the user config directory for panel
    
    This just returns ~/.config/gnome-panel/$foo (with $foo optional, and
    respecting $XDG_CONFIG_HOME).

 gnome-panel/panel-util.c |   10 ++++++++--
 gnome-panel/panel-util.h |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index d8b08ad..1172af4 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -333,11 +333,17 @@ panel_load_icon (GtkIconTheme  *icon_theme,
 	return retval;
 }
 
+char *
+panel_util_get_from_personal_path (const char *file)
+{
+	return g_build_filename (g_get_user_config_dir (),
+				 "gnome-panel", file, NULL);
+}
+
 static char *
 panel_launcher_get_personal_path (void)
 {
-	return g_build_filename (g_get_user_config_dir (),
-				 "gnome-panel", "launchers", NULL);
+	return panel_util_get_from_personal_path ("launchers");
 }
 
 gboolean
diff --git a/gnome-panel/panel-util.h b/gnome-panel/panel-util.h
index fc8e9de..6856a6c 100644
--- a/gnome-panel/panel-util.h
+++ b/gnome-panel/panel-util.h
@@ -30,6 +30,8 @@ GdkPixbuf *     panel_load_icon         (GtkIconTheme  *icon_theme,
 					 int            desired_height,
 					 char         **error_msg);
 
+char       *panel_util_get_from_personal_path  (const char *file);
+
 GFile      *panel_launcher_get_gfile           (const char *location);
 char       *panel_launcher_get_uri             (const char *location);
 char       *panel_launcher_get_filename        (const char *location);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]