aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/plugin.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-28 23:48:07 +0200
committerfiaxh <git@mx.ax.lt>2017-10-31 15:41:45 +0100
commitb9df78e4494879752e9e68dcc5d54e03fffe9467 (patch)
treed1c74fde4aedea42773bc411c557f2184003defa /plugins/omemo/src/plugin.vala
parentd9b91206c0291fa8aa58df572292784a4f8ff878 (diff)
downloaddino-b9df78e4494879752e9e68dcc5d54e03fffe9467.tar.gz
dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.zip
Move DatabaseError handling into Qlite
Diffstat (limited to 'plugins/omemo/src/plugin.vala')
-rw-r--r--plugins/omemo/src/plugin.vala42
1 files changed, 19 insertions, 23 deletions
diff --git a/plugins/omemo/src/plugin.vala b/plugins/omemo/src/plugin.vala
index 18661403..b9ce500d 100644
--- a/plugins/omemo/src/plugin.vala
+++ b/plugins/omemo/src/plugin.vala
@@ -30,31 +30,27 @@ public class Plugin : RootInterface, Object {
public ContactDetailsProvider contact_details_provider;
public void registered(Dino.Application app) {
- try {
- ensure_context();
- this.app = app;
- this.db = new Database(Path.build_filename(Application.get_storage_dir(), "omemo.db"));
- this.list_entry = new EncryptionListEntry(this);
- this.settings_entry = new AccountSettingsEntry(this);
- this.contact_details_provider = new ContactDetailsProvider(this);
- this.app.plugin_registry.register_encryption_list_entry(list_entry);
- this.app.plugin_registry.register_account_settings_entry(settings_entry);
- this.app.plugin_registry.register_contact_details_entry(contact_details_provider);
- this.app.stream_interactor.module_manager.initialize_account_modules.connect((account, list) => {
- list.add(new StreamModule());
- });
- Manager.start(this.app.stream_interactor, db);
+ ensure_context();
+ this.app = app;
+ this.db = new Database(Path.build_filename(Application.get_storage_dir(), "omemo.db"));
+ this.list_entry = new EncryptionListEntry(this);
+ this.settings_entry = new AccountSettingsEntry(this);
+ this.contact_details_provider = new ContactDetailsProvider(this);
+ this.app.plugin_registry.register_encryption_list_entry(list_entry);
+ this.app.plugin_registry.register_account_settings_entry(settings_entry);
+ this.app.plugin_registry.register_contact_details_entry(contact_details_provider);
+ this.app.stream_interactor.module_manager.initialize_account_modules.connect((account, list) => {
+ list.add(new StreamModule());
+ });
+ Manager.start(this.app.stream_interactor, db);
- string locales_dir;
- if (app.search_path_generator != null) {
- locales_dir = ((!)app.search_path_generator).get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR);
- } else {
- locales_dir = LOCALE_INSTALL_DIR;
- }
- internationalize(GETTEXT_PACKAGE, locales_dir);
- } catch (Error e) {
- print(@"Error initializing OMEMO: $(e.message)\n");
+ string locales_dir;
+ if (app.search_path_generator != null) {
+ locales_dir = ((!)app.search_path_generator).get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR);
+ } else {
+ locales_dir = LOCALE_INSTALL_DIR;
}
+ internationalize(GETTEXT_PACKAGE, locales_dir);
}
public void shutdown() {