aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/contact_details
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/contact_details')
-rw-r--r--main/src/ui/contact_details/dialog.vala6
-rw-r--r--main/src/ui/contact_details/muc_config_form_provider.vala7
-rw-r--r--main/src/ui/contact_details/settings_provider.vala7
3 files changed, 12 insertions, 8 deletions
diff --git a/main/src/ui/contact_details/dialog.vala b/main/src/ui/contact_details/dialog.vala
index a5b8ea38..4e61a3f5 100644
--- a/main/src/ui/contact_details/dialog.vala
+++ b/main/src/ui/contact_details/dialog.vala
@@ -45,7 +45,7 @@ public class Dialog : Gtk.Dialog {
app.plugin_registry.register_contact_details_entry(new MucConfigFormProvider(stream_interactor));
foreach (Plugins.ContactDetailsProvider provider in app.plugin_registry.contact_details_entries) {
- provider.populate(conversation, contact_details);
+ provider.populate(conversation, contact_details, Plugins.WidgetType.GTK);
}
destroy.connect(() => {
@@ -72,7 +72,9 @@ public class Dialog : Gtk.Dialog {
Util.image_set_from_scaled_pixbuf(avatar, (new AvatarGenerator(50, 50, avatar.scale_factor)).draw_conversation(stream_interactor, conversation));
}
- private void add_entry(string category, string label, string? description, Widget w) {
+ private void add_entry(string category, string label, string? description, Object wo) {
+ if (!(wo is Widget)) return;
+ Widget w = (Widget) wo;
add_category(category);
ListBoxRow list_row = new ListBoxRow() { activatable=false, visible=true };
diff --git a/main/src/ui/contact_details/muc_config_form_provider.vala b/main/src/ui/contact_details/muc_config_form_provider.vala
index 438f41c4..47bbbe28 100644
--- a/main/src/ui/contact_details/muc_config_form_provider.vala
+++ b/main/src/ui/contact_details/muc_config_form_provider.vala
@@ -6,15 +6,16 @@ using Xmpp.Xep;
namespace Dino.Ui.ContactDetails {
-public class MucConfigFormProvider : Plugins.ContactDetailsProvider {
- public override string id { get { return "muc_config_form"; } }
+public class MucConfigFormProvider : Plugins.ContactDetailsProvider, Object {
+ public string id { get { return "muc_config_form"; } }
private StreamInteractor stream_interactor;
public MucConfigFormProvider(StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
}
- public override void populate(Conversation conversation, Plugins.ContactDetails contact_details) {
+ public void populate(Conversation conversation, Plugins.ContactDetails contact_details, Plugins.WidgetType type) {
+ if (type != Plugins.WidgetType.GTK) return;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
Xmpp.Core.XmppStream? stream = stream_interactor.get_stream(conversation.account);
if (stream == null) return;
diff --git a/main/src/ui/contact_details/settings_provider.vala b/main/src/ui/contact_details/settings_provider.vala
index 70eab72c..64d4598c 100644
--- a/main/src/ui/contact_details/settings_provider.vala
+++ b/main/src/ui/contact_details/settings_provider.vala
@@ -4,8 +4,8 @@ using Dino.Entities;
namespace Dino.Ui.ContactDetails {
-public class SettingsProvider : Plugins.ContactDetailsProvider {
- public override string id { get { return "chat_settings"; } }
+public class SettingsProvider : Plugins.ContactDetailsProvider, Object {
+ public string id { get { return "chat_settings"; } }
private StreamInteractor stream_interactor;
@@ -13,7 +13,8 @@ public class SettingsProvider : Plugins.ContactDetailsProvider {
this.stream_interactor = stream_interactor;
}
- public override void populate(Conversation conversation, Plugins.ContactDetails contact_details) {
+ public void populate(Conversation conversation, Plugins.ContactDetails contact_details, Plugins.WidgetType type) {
+ if (type != Plugins.WidgetType.GTK) return;
if (conversation.type_ == Conversation.Type.CHAT) {
ComboBoxText[] comboboxes = new ComboBoxText[2];
for (int i = 0; i < 3; i++) {