diff options
author | Marvin W <git@larma.de> | 2017-05-04 22:05:48 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-08-17 19:53:34 +0200 |
commit | 5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d (patch) | |
tree | 764b4770607e0a2997a69a5651c81e90ca3d4e99 /plugins | |
parent | f78818abbee52dc187812428d3eb6542853611a0 (diff) | |
download | dino-5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d.tar.gz dino-5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d.zip |
libdino: remove dependency to GTK+ (all GTK+ code is in main+plugins)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/http-files/src/contact_titlebar_entry.vala | 13 | ||||
-rw-r--r-- | plugins/omemo/src/account_settings_entry.vala | 7 | ||||
-rw-r--r-- | plugins/openpgp/src/account_settings_entry.vala | 7 | ||||
-rw-r--r-- | plugins/openpgp/src/contact_details_provider.vala | 8 |
4 files changed, 22 insertions, 13 deletions
diff --git a/plugins/http-files/src/contact_titlebar_entry.vala b/plugins/http-files/src/contact_titlebar_entry.vala index 74966c0e..064adca9 100644 --- a/plugins/http-files/src/contact_titlebar_entry.vala +++ b/plugins/http-files/src/contact_titlebar_entry.vala @@ -4,8 +4,8 @@ using Dino.Entities; namespace Dino.Plugins.HttpFiles { -public class ConversationsTitlebarEntry : Plugins.ConversationTitlebarEntry { - public override string id { get { return "send_files"; } } +public class ConversationsTitlebarEntry : Plugins.ConversationTitlebarEntry, Object { + public string id { get { return "send_files"; } } StreamInteractor stream_interactor; @@ -13,9 +13,12 @@ public class ConversationsTitlebarEntry : Plugins.ConversationTitlebarEntry { this.stream_interactor = stream_interactor; } - public override double order { get { return 4; } } - public override Plugins.ConversationTitlebarWidget get_widget() { - return new ConversationTitlebarWidget(stream_interactor) { visible=true }; + public double order { get { return 4; } } + public Plugins.ConversationTitlebarWidget get_widget(WidgetType type) { + if (type == WidgetType.GTK) { + return new ConversationTitlebarWidget(stream_interactor) { visible=true }; + } + return null; } } diff --git a/plugins/omemo/src/account_settings_entry.vala b/plugins/omemo/src/account_settings_entry.vala index c6871f6e..3866febe 100644 --- a/plugins/omemo/src/account_settings_entry.vala +++ b/plugins/omemo/src/account_settings_entry.vala @@ -15,8 +15,11 @@ public class AccountSettingsEntry : Plugins.AccountSettingsEntry { return "OMEMO"; }} - public override Plugins.AccountSettingsWidget get_widget() { - return new AccountSettingWidget(plugin); + public override Plugins.AccountSettingsWidget? get_widget(WidgetType type) { + if (type == WidgetType.GTK) { + return new AccountSettingWidget(plugin); + } + return null; } } diff --git a/plugins/openpgp/src/account_settings_entry.vala b/plugins/openpgp/src/account_settings_entry.vala index c7d11d72..75220c30 100644 --- a/plugins/openpgp/src/account_settings_entry.vala +++ b/plugins/openpgp/src/account_settings_entry.vala @@ -16,8 +16,11 @@ public class AccountSettingsEntry : Plugins.AccountSettingsEntry { return "OpenPGP"; }} - public override Plugins.AccountSettingsWidget get_widget() { - return new AccountSettingsWidget(plugin); + public override Plugins.AccountSettingsWidget? get_widget(WidgetType type) { + if (type == WidgetType.GTK) { + return new AccountSettingsWidget(plugin); + } + return null; } } diff --git a/plugins/openpgp/src/contact_details_provider.vala b/plugins/openpgp/src/contact_details_provider.vala index 39b6de2c..b9cc4b42 100644 --- a/plugins/openpgp/src/contact_details_provider.vala +++ b/plugins/openpgp/src/contact_details_provider.vala @@ -4,8 +4,8 @@ using Dino.Entities; namespace Dino.Plugins.OpenPgp { -public class ContactDetailsProvider : Plugins.ContactDetailsProvider { - public override string id { get { return "pgp_info"; } } +public class ContactDetailsProvider : Plugins.ContactDetailsProvider, Object { + public string id { get { return "pgp_info"; } } private StreamInteractor stream_interactor; @@ -13,8 +13,8 @@ public class ContactDetailsProvider : Plugins.ContactDetailsProvider { this.stream_interactor = stream_interactor; } - public override void populate(Conversation conversation, Plugins.ContactDetails contact_details) { - if (conversation.type_ == Conversation.Type.CHAT) { + public void populate(Conversation conversation, Plugins.ContactDetails contact_details, WidgetType type) { + if (conversation.type_ == Conversation.Type.CHAT && type == WidgetType.GTK) { string? key_id = stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart); if (key_id != null) { Gee.List<GPG.Key> keys = GPGHelper.get_keylist(key_id); |