diff options
| author | fiaxh <git@lightrise.org> | 2025-10-05 16:31:38 +0200 |
|---|---|---|
| committer | fiaxh <git@lightrise.org> | 2025-10-05 17:59:08 +0200 |
| commit | 61f20787151febd54b7271f686bc4f9de5613c15 (patch) | |
| tree | 08d303a97707a2f7de6fa1b4ca0bd70fde24da56 /main/src/ui/conversation_details.vala | |
| parent | e14c7d933bfa0bdd97781857b9341854232058a2 (diff) | |
Cleanup: Remove LabelHybrid, conversation details preferences
Diffstat (limited to 'main/src/ui/conversation_details.vala')
| -rw-r--r-- | main/src/ui/conversation_details.vala | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/main/src/ui/conversation_details.vala b/main/src/ui/conversation_details.vala index 3b4113ee..a1b7a9ce 100644 --- a/main/src/ui/conversation_details.vala +++ b/main/src/ui/conversation_details.vala @@ -206,8 +206,8 @@ namespace Dino.Ui.ConversationDetails { }); Plugins.ContactDetails contact_details = new Plugins.ContactDetails(); - contact_details.add.connect((c, l, d, wo) => { - add_entry(c, l, d, wo, dialog); + contact_details.add_settings_action_row.connect((entry_row_model) => { + dialog.model.settings_rows.append((Ui.ViewModel.PreferencesRow.Any) entry_row_model); }); Application app = GLib.Application.get_default() as Application; app.plugin_registry.register_contact_details_entry(new ContactDetails.SettingsProvider(stream_interactor)); @@ -223,32 +223,4 @@ namespace Dino.Ui.ConversationDetails { return dialog; } - - private void add_entry(string category, string label, string? description, Object wo, Dialog dialog) { - if (!(wo is Widget)) return; - - Widget widget = (Widget) wo; - if (widget.get_type().is_a(typeof(Entry))) { - Util.EntryLabelHybrid hybrid = new Util.EntryLabelHybrid.wrap(widget as Entry) { xalign=1 }; - widget = hybrid; - } else if (widget.get_type().is_a(typeof(ComboBoxText))) { - Util.ComboBoxTextLabelHybrid hybrid = new Util.ComboBoxTextLabelHybrid.wrap(widget as ComboBoxText) { xalign=1 }; - widget = hybrid; - } - - var view_model = new ViewModel.PreferencesRow.WidgetDeprecated() { - title = label, - widget = widget - }; - - switch (category) { - case "Permissions": - case "Local Settings": - case "Settings": - dialog.model.settings_rows.append(view_model); - break; - default: - break; - } - } } |
