[gnome-builder] ide-application: plumb default language settings
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ide-application: plumb default language settings
- Date: Tue, 8 Nov 2016 22:27:13 +0000 (UTC)
commit 3ef288ffcb262f47091405ded9f1441b5e109045
Author: Sebastien Lafargue <slafargue gnome org>
Date: Tue Nov 8 23:10:24 2016 +0100
ide-application: plumb default language settings
libide/application/ide-application-private.h | 1 +
libide/application/ide-application.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libide/application/ide-application-private.h b/libide/application/ide-application-private.h
index 3988ae6..7dcaa10 100644
--- a/libide/application/ide-application-private.h
+++ b/libide/application/ide-application-private.h
@@ -24,6 +24,7 @@
#include <libpeas/peas.h>
#include "application/ide-application.h"
+#include "gsettings/ide-language-defaults.h"
#include "keybindings/ide-keybindings.h"
#include "projects/ide-recent-projects.h"
#include "theming/ide-theme-manager.h"
diff --git a/libide/application/ide-application.c b/libide/application/ide-application.c
index c0218a5..0ae4e2e 100644
--- a/libide/application/ide-application.c
+++ b/libide/application/ide-application.c
@@ -346,6 +346,23 @@ ide_application_activate (GApplication *application)
}
static void
+ide_application_language_defaults_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GError *error = NULL;
+ G_GNUC_UNUSED gboolean ret;
+
+ ret = ide_language_defaults_init_finish (result, &error);
+
+ if (error != NULL)
+ {
+ g_warning ("%s\n", error->message);
+ g_clear_error (&error);
+ }
+}
+
+static void
ide_application_startup (GApplication *application)
{
IdeApplication *self = (IdeApplication *)application;
@@ -365,6 +382,7 @@ ide_application_startup (GApplication *application)
if ((self->mode == IDE_APPLICATION_MODE_PRIMARY) || (self->mode == IDE_APPLICATION_MODE_TESTS))
{
ide_application_make_skeleton_dirs (self);
+ ide_language_defaults_init_async (NULL, ide_application_language_defaults_cb, NULL);
ide_application_register_theme_overrides (self);
ide_application_register_keybindings (self);
ide_application_actions_init (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]