[california] Fix GSettings schema problem when running from source dir
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Fix GSettings schema problem when running from source dir
- Date: Thu, 12 Jun 2014 22:53:17 +0000 (UTC)
commit ecf5d03720cb64ea0d26067af8a0ede374605111
Author: Jim Nelson <jim yorba org>
Date: Thu Jun 12 15:52:20 2014 -0700
Fix GSettings schema problem when running from source dir
Thought this was fixed when first implemented, but apparently not.
This ensures California can be executed from source directory w/o
installing.
src/application/california-application.vala | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/application/california-application.vala b/src/application/california-application.vala
index e28afa3..bab1a70 100644
--- a/src/application/california-application.vala
+++ b/src/application/california-application.vala
@@ -114,6 +114,10 @@ public class Application : Gtk.Application {
Object (application_id: ID);
}
+ ~Application() {
+ Settings.terminate();
+ }
+
// This method is executed from run() every time.
public override bool local_command_line(ref unowned string[] args, out int exit_status) {
exec_file = File.new_for_path(Posix.realpath(Environment.find_program_in_path(args[0])));
@@ -123,6 +127,13 @@ public class Application : Gtk.Application {
if (!Commandline.parse(args, out exit_status))
return true;
+ // need to initialize this as early as possible
+ try {
+ Settings.init();
+ } catch (Error err) {
+ error("Unable to initialize Settings: %s", err.message);
+ }
+
try {
register();
} catch (Error err) {
@@ -156,7 +167,6 @@ public class Application : Gtk.Application {
// unit initialization
try {
- Settings.init();
Host.init();
Manager.init();
Activator.init();
@@ -178,7 +188,6 @@ public class Application : Gtk.Application {
Activator.terminate();
Manager.terminate();
Host.terminate();
- Settings.terminate();
base.shutdown();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]