[gnome-builder] app: create skeleton directories on startup.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: create skeleton directories on startup.
- Date: Thu, 9 Oct 2014 05:34:19 +0000 (UTC)
commit 51420a8e45bbc093d9527a23963fc48ce7382bc1
Author: Christian Hergert <christian hergert me>
Date: Wed Oct 8 22:33:26 2014 -0700
app: create skeleton directories on startup.
src/app/gb-application.c | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 9324606..e9dc052 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -37,6 +37,40 @@
G_DEFINE_TYPE (GbApplication, gb_application, GTK_TYPE_APPLICATION)
static void
+gb_application_make_skeleton_dirs (GbApplication *self)
+{
+ gchar *path;
+
+ g_return_if_fail (GB_IS_APPLICATION (self));
+
+ path = g_build_filename (g_get_user_data_dir (),
+ "gnome-builder",
+ NULL);
+ g_mkdir_with_parents (path, 0750);
+ g_free (path);
+
+ path = g_build_filename (g_get_user_config_dir (),
+ "gnome-builder",
+ NULL);
+ g_mkdir_with_parents (path, 0750);
+ g_free (path);
+
+ path = g_build_filename (g_get_user_config_dir (),
+ "gnome-builder",
+ "snippets",
+ NULL);
+ g_mkdir_with_parents (path, 0750);
+ g_free (path);
+
+ path = g_build_filename (g_get_user_config_dir (),
+ "gnome-builder",
+ "uncrustify",
+ NULL);
+ g_mkdir_with_parents (path, 0750);
+ g_free (path);
+}
+
+static void
gb_application_load_file_marks (GbApplication *application)
{
GbEditorFileMarks *marks;
@@ -387,6 +421,7 @@ gb_application_startup (GApplication *app)
G_APPLICATION_CLASS (gb_application_parent_class)->startup (app);
+ gb_application_make_skeleton_dirs (self);
gb_application_register_actions (self);
gb_application_register_keybindings (self);
gb_application_register_theme_overrides (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]