aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-12 13:19:04 +0100
committerMarvin W <git@larma.de>2017-03-12 14:09:32 +0100
commite8f11178ecc1a333976ba713f532fcae11931b16 (patch)
tree71ef4de63e27203780f3d5bfaa1662d97faaca16 /main
parenta9ea0e9f87e71c60bc570066525d3e3634fbdcc0 (diff)
downloaddino-e8f11178ecc1a333976ba713f532fcae11931b16.tar.gz
dino-e8f11178ecc1a333976ba713f532fcae11931b16.zip
Move storage into user directory and fix plugin search path
Diffstat (limited to 'main')
-rw-r--r--main/src/main.vala24
-rw-r--r--main/src/ui/application.vala3
2 files changed, 16 insertions, 11 deletions
diff --git a/main/src/main.vala b/main/src/main.vala
index dfaa661e..bec2d752 100644
--- a/main/src/main.vala
+++ b/main/src/main.vala
@@ -4,18 +4,22 @@ using Dino.Ui;
namespace Dino {
void main(string[] args) {
- Gtk.init(ref args);
- Dino.Ui.Application app = new Dino.Ui.Application();
- Plugins.Loader loader = new Plugins.Loader();
- foreach(string plugin in new string[]{"omemo", "openpgp"}) {
- try {
- loader.load(plugin, app);
- } catch (Error e) {
- print(@"Error loading plugin $plugin: $(e.message)\n");
+ try{
+ Plugins.Loader loader = new Plugins.Loader(args.length > 0 ? args[0] : null);
+ Gtk.init(ref args);
+ Dino.Ui.Application app = new Dino.Ui.Application();
+ foreach (string plugin in new string[]{"omemo", "openpgp"}) {
+ try {
+ loader.load(plugin, app);
+ } catch (Error e) {
+ print(@"Error loading plugin $plugin: $(e.message)\n");
+ }
}
+ app.run(args);
+ loader.shutdown();
+ } catch (Error e) {
+ print(@"Fatal error: $(e.message)\n");
}
- app.run(args);
- loader.shutdown();
}
} \ No newline at end of file
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index 1adccf8e..fe930b82 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -11,10 +11,11 @@ public class Dino.Ui.Application : Dino.Application {
private ConversationSummary.View? conversation_frame;
private ChatInput? chat_input;
- public Application() {
+ public Application() throws Error {
Notify.init("dino");
notifications = new Notifications(stream_interaction);
notifications.start();
+ Environment.set_application_name("Dino");
load_css();
}