diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-08-18 12:08:05 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-08-18 12:08:05 -0400 |
| commit | 35108fe1936a280318ad8935b89277f049a6428e (patch) | |
| tree | f4f82f13eba7c823457ce5b4a5b62b21a178c628 /main | |
| parent | 7cf1a12faa2c7781f6277c75702f62f1404752a2 (diff) | |
Split notification settings
Diffstat (limited to 'main')
3 files changed, 73 insertions, 7 deletions
diff --git a/main/data/preferences_window/general_preferences_page.ui b/main/data/preferences_window/general_preferences_page.ui index ca240511..50efd425 100644 --- a/main/data/preferences_window/general_preferences_page.ui +++ b/main/data/preferences_window/general_preferences_page.ui @@ -27,13 +27,56 @@ </child> <child> <object class="AdwPreferencesGroup"> + <property name="title" translatable="yes">Notifications</property> <child> - <object class="AdwSwitchRow" id="notification_row"> - <property name="title" translatable="yes">_Notifications</property> + <object class="AdwSwitchRow" id="notification_messages_row"> + <property name="title" translatable="yes">_Messages</property> <property name="subtitle" translatable="yes">Notify when a new message arrives</property> <property name="use-underline">True</property> </object> </child> + <child> + <object class="AdwSwitchRow" id="notification_files_row"> + <property name="title" translatable="yes">_Files</property> + <property name="subtitle" translatable="yes">Notify when a new file arrives</property> + <property name="use-underline">True</property> + </object> + </child> + <child> + <object class="AdwSwitchRow" id="notification_calls_row"> + <property name="title" translatable="yes">_Calls</property> + <property name="subtitle" translatable="yes">Notify about incoming calls</property> + <property name="use-underline">True</property> + </object> + </child> + <child> + <object class="AdwSwitchRow" id="notification_subscription_requests_row"> + <property name="title" translatable="yes">_Subscription Requests</property> + <property name="subtitle" translatable="yes">Notify when someone wants to add you as a contact</property> + <property name="use-underline">True</property> + </object> + </child> + <child> + <object class="AdwSwitchRow" id="notification_group_chat_invitations_row"> + <property name="title" translatable="yes">_Group Chat Invitations</property> + <property name="subtitle" translatable="yes">Notify when someone invites you to a group chat</property> + <property name="use-underline">True</property> + </object> + </child> + <child> + <object class="AdwSwitchRow" id="notification_permission_requests_row"> + <property name="title" translatable="yes">_Permission Requests</property> + <property name="subtitle" translatable="yes">Notify when someone requests permission to write in a group chat</property> + <property name="use-underline">True</property> + </object> + </child> + <child> + <object class="AdwSwitchRow" id="notification_connection_errors_row"> + <property name="title" translatable="yes">Connection _Errors</property> + <property name="subtitle" translatable="yes">Notify when an account cannot connect</property> + <property name="use-underline">True</property> + </object> + </child> </object> </child> <child> diff --git a/main/src/view_model/preferences_dialog.vala b/main/src/view_model/preferences_dialog.vala index 20e11ae3..5b5412f8 100644 --- a/main/src/view_model/preferences_dialog.vala +++ b/main/src/view_model/preferences_dialog.vala @@ -110,7 +110,13 @@ public class Dino.Ui.ViewModel.PreferencesDialog : Object { settings.bind_property("send-typing", general_page, "send-typing", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); settings.bind_property("send-marker", general_page, "send-marker", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); settings.bind_property("share-time", general_page, "share-time", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); - settings.bind_property("notifications", general_page, "notifications", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications", general_page, "notifications-messages", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-files", general_page, "notifications-files", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-calls", general_page, "notifications-calls", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-subscription-requests", general_page, "notifications-subscription-requests", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-group-chat-invitations", general_page, "notifications-group-chat-invitations", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-permission-requests", general_page, "notifications-permission-requests", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + settings.bind_property("notifications-connection-errors", general_page, "notifications-connection-errors", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); settings.bind_property("convert-utf8-smileys", general_page, "convert-emojis", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); } } @@ -127,4 +133,3 @@ public class Dino.Ui.ViewModel.ChangePasswordDialog : Object { return res; } } - diff --git a/main/src/windows/preferences_window/general_preferences_page.vala b/main/src/windows/preferences_window/general_preferences_page.vala index 0dcf2118..81906643 100644 --- a/main/src/windows/preferences_window/general_preferences_page.vala +++ b/main/src/windows/preferences_window/general_preferences_page.vala @@ -4,7 +4,13 @@ public class Dino.Ui.ViewModel.GeneralPreferencesPage : Object { public bool send_typing { get; set; } public bool send_marker { get; set; } public bool share_time { get; set; } - public bool notifications { get; set; } + public bool notifications_messages { get; set; } + public bool notifications_files { get; set; } + public bool notifications_calls { get; set; } + public bool notifications_subscription_requests { get; set; } + public bool notifications_group_chat_invitations { get; set; } + public bool notifications_permission_requests { get; set; } + public bool notifications_connection_errors { get; set; } public bool convert_emojis { get; set; } } @@ -13,7 +19,13 @@ public class Dino.Ui.GeneralPreferencesPage : Adw.PreferencesPage { [GtkChild] private unowned Adw.SwitchRow typing_row; [GtkChild] private unowned Adw.SwitchRow marker_row; [GtkChild] private unowned Adw.SwitchRow time_row; - [GtkChild] private unowned Adw.SwitchRow notification_row; + [GtkChild] private unowned Adw.SwitchRow notification_messages_row; + [GtkChild] private unowned Adw.SwitchRow notification_files_row; + [GtkChild] private unowned Adw.SwitchRow notification_calls_row; + [GtkChild] private unowned Adw.SwitchRow notification_subscription_requests_row; + [GtkChild] private unowned Adw.SwitchRow notification_group_chat_invitations_row; + [GtkChild] private unowned Adw.SwitchRow notification_permission_requests_row; + [GtkChild] private unowned Adw.SwitchRow notification_connection_errors_row; [GtkChild] private unowned Adw.SwitchRow emoji_row; public ViewModel.GeneralPreferencesPage model { get; set; default = new ViewModel.GeneralPreferencesPage(); } @@ -32,7 +44,13 @@ public class Dino.Ui.GeneralPreferencesPage : Adw.PreferencesPage { model.bind_property("send-typing", typing_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), model.bind_property("send-marker", marker_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), model.bind_property("share-time", time_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), - model.bind_property("notifications", notification_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-messages", notification_messages_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-files", notification_files_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-calls", notification_calls_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-subscription-requests", notification_subscription_requests_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-group-chat-invitations", notification_group_chat_invitations_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-permission-requests", notification_permission_requests_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), + model.bind_property("notifications-connection-errors", notification_connection_errors_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL), model.bind_property("convert-emojis", emoji_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL) }; } else { |
