fix: app notification settings sync #19

Open
bemeritus wants to merge 18 commits from notificationpage-sync into main
Member

Closes:

  • Notification app permission toggle logic not working: #10
  • Apps page code refactor: #2
  • Fix custom .desktop issue

Resource:

Additional changes:

## Closes: - [x] Notification app permission toggle logic not working: https://git.oss.uzinfocom.uz/xinux/settings/issues/10 - [x] Apps page code refactor: https://git.oss.uzinfocom.uz/xinux/settings/issues/2 - [x] Fix custom .desktop issue ## Resource: - https://gist.github.com/bahrom04/3edb8c765761c9e2aa9aeb54080dce5b ## Additional changes:
chore: add per-app notification GSettings reload support
All checks were successful
Test CI / flake-check (push) Successful in 13s
Test CI / build (push) Successful in 2m30s
Test CI / flake-check (pull_request) Successful in 10s
Test CI / build (pull_request) Successful in 5s
14512e3f32
bahrom04 left a comment

I have custom .desktop file. When i ran the app, I got warnings from these custom schemas:

(settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra 9' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

(settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra X' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &
I have custom .desktop file. When i ran the app, I got warnings from these custom schemas: ``` (settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra 9' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as & (settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra X' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as & ```
chore: move save_app_bool function inside AppNotificationsPageModel
All checks were successful
Test CI / flake-check (push) Successful in 11s
Test CI / build (push) Successful in 2m28s
Test CI / flake-check (pull_request) Successful in 11s
Test CI / build (pull_request) Successful in 5s
b01557e32f
chore: Sync app details notification switch with GSettings
All checks were successful
Test CI / flake-check (push) Successful in 11s
Test CI / build (push) Successful in 2m28s
Test CI / flake-check (pull_request) Successful in 12s
Test CI / build (pull_request) Successful in 6s
c9ebd99443
Owner

related: #10

related: https://git.oss.uzinfocom.uz/xinux/settings/issues/10
Owner

@bemeritus please write what left to do on PR description

@bemeritus please write what left to do on PR description
chore: build app details page function moved to SimpleComponent
All checks were successful
Test CI / flake-check (push) Successful in 11s
Test CI / build (push) Successful in 2m30s
Test CI / flake-check (pull_request) Successful in 10s
Test CI / build (pull_request) Successful in 6s
a75e95ab30
Author
Member

@bahrom04 check this pr

@bahrom04 check this pr
Owner

@bemeritus wrote in #19 (comment):

@bahrom04 check this pr

ok, before that please refactor import of crates. For example put all relm4 crates into on set like relm4::{gtk::, adw::}

@bemeritus wrote in https://git.oss.uzinfocom.uz/xinux/settings/pulls/19#issuecomment-786: > @bahrom04 check this pr ok, before that please refactor import of crates. For example put all relm4 crates into on set like relm4::{gtk::, adw::}
bahrom04 approved these changes 2026-05-21 03:31:26 +00:00
Dismissed
bahrom04 left a comment

why not put these helper functions inside struct method?

why not put these helper functions inside struct method?
@ -0,0 +169,4 @@
}
}
fn setup_notifications_row(app: &AppEntry, row: &adw::SwitchRow) {
Owner

why not put this into view macro too?

why not put this into view macro too?
bahrom04 marked this conversation as resolved
@ -0,0 +208,4 @@
Some(app_settings_for_canonical(canonical_id))
}
fn show_app_details_dialog(app: &AppEntry, button: &gtk::Button) {
Owner

put this inside impl AppEntry {} then call function like self.show_app_details_dialog

put this inside impl AppEntry {} then call function like self.show_app_details_dialog
bahrom04 marked this conversation as resolved
bahrom04 left a comment

needs change

needs change
Owner

@bemeritus please write PR description what changes you did

@bemeritus please write PR description what changes you did
Owner

@bahrom04 wrote in #19 (comment):

I have custom .desktop file. When i ran the app, I got warnings from these custom schemas:

(settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra 9' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

(settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra X' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

what about this?

@bahrom04 wrote in https://git.oss.uzinfocom.uz/xinux/settings/pulls/19#issuecomment-382: > I have custom .desktop file. When i ran the app, I got warnings from these custom schemas: > > ```text > (settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra 9' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as & > > (settings:52969): Gtk-WARNING **: 14:54:15.205: Failed to set text 'Command & Conquer Generals Contra X' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as & > ``` what about this?
Owner
@bemeritus qoʻshimcha custon .desktop yasaganim: https://gist.github.com/bahrom04/3edb8c765761c9e2aa9aeb54080dce5b
chore: put function to impl AppEntry
All checks were successful
Test CI / flake-check (push) Successful in 11s
Test CI / build (push) Successful in 2m24s
Test CI / flake-check (pull_request) Successful in 14s
Test CI / build (pull_request) Successful in 7s
29744984f9
chore: added use markup
Some checks failed
Test CI / flake-check (push) Has been cancelled
Test CI / build (push) Has been cancelled
Test CI / flake-check (pull_request) Has been cancelled
Test CI / build (pull_request) Has been cancelled
e56af48592
take main brancha code
Revert "Merge remote-tracking branch 'origin' into notificationpage-sync"
All checks were successful
Test CI / flake-check (push) Successful in 12s
Test CI / build (push) Successful in 3m3s
Test CI / flake-check (pull_request) Successful in 9s
Test CI / build (pull_request) Successful in 5s
d9608dc958
This reverts commit 896bf03820, reversing
changes made to e56af48592.
Owner

@bemeritus app On/Off boʻlgan yozuv yangilanmay qoldi

@bemeritus app On/Off boʻlgan yozuv yangilanmay qoldi
All checks were successful
Test CI / flake-check (pull_request) Successful in 9s
Test CI / build (pull_request) Successful in 2m29s
Test CI / flake-check (push) Successful in 9s
Test CI / build (push) Successful in 5s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin notificationpage-sync:notificationpage-sync
git switch notificationpage-sync
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xinux/settings!19
No description provided.