[gnome-builder/wip/file-marks: 2/2] application: load file-marks on application startup.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/file-marks: 2/2] application: load file-marks on application startup.
- Date: Wed, 8 Oct 2014 20:32:29 +0000 (UTC)
commit 168a2fe8ff8494e4b3b5fb9c576b8393d081754b
Author: Christian Hergert <christian hergert me>
Date: Wed Oct 8 13:32:08 2014 -0700
application: load file-marks on application startup.
src/app/gb-application.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 83548dd..f7114ae 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -26,6 +26,7 @@
#include <glib/gi18n.h>
#include "gb-application.h"
+#include "gb-editor-file-marks.h"
#include "gb-editor-workspace.h"
#include "gb-log.h"
#include "gb-keybindings.h"
@@ -36,6 +37,23 @@
G_DEFINE_TYPE (GbApplication, gb_application, GTK_TYPE_APPLICATION)
static void
+gb_application_load_file_marks (GbApplication *application)
+{
+ GbEditorFileMarks *marks;
+ GError *error = NULL;
+
+ g_return_if_fail (GB_IS_APPLICATION (application));
+
+ marks = gb_editor_file_marks_get_default ();
+
+ if (!gb_editor_file_marks_load (marks, &error))
+ {
+ g_warning ("%s", error->message);
+ g_clear_error (&error);
+ }
+}
+
+static void
gb_application_on_theme_changed (GbApplication *self,
GParamSpec *pspec,
GtkSettings *settings)
@@ -372,6 +390,7 @@ gb_application_startup (GApplication *app)
gb_application_register_actions (self);
gb_application_register_keybindings (self);
gb_application_register_theme_overrides (self);
+ gb_application_load_file_marks (self);
EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]