AyatanaIndicators / ayatana-indicator-notifications

Ayatana Indicator Notifications Service
GNU General Public License v3.0
4 stars 5 forks source link

Port recent patches from indicator-notifications #10

Closed sunweaver closed 4 years ago

sunweaver commented 4 years ago

This PRs brings ayatana-indicator-notifications up-to-speed regarding recent improvements in indicator-notifications by @trism.

This adds do-not-disturb support, does the blacklist to filter-list renaming and adds the Settings/Clear swap switch.

sunweaver commented 4 years ago

@trism: thanks for your feedback. I just tried to verify / comprehend what you wrote with the a-i-notifications code tree and grep, but couldn't find the function etc. you referenced. What schema is not found? In what file is g_settings_schema_source_lookup? I could not find a method/function called settings_try_set_boolean. Etc.

Slightly confused here...

I'd like to get your feedback staight before merging.

@flexiondotorg you said you tested the indicator. Das do-not-disturb work for you on your groovy test rig?

Mike

trism commented 4 years ago

Check out this commit for the change https://github.com/trism/indicator-notifications/commit/8ed0f7210a74652b4ba9f6e52edae1705e555b4f

It wasn't finding the mate notification daemon schema. We have to check if it exists before we write to it, otherwise the app will just abort. The Gio documentation suggests we should probably always do a recursive lookup anyway, I'm just not sure why it worked before but doesn't work now without it.

sunweaver commented 4 years ago

References: AyatanaIndicators/ayatana-indicator-notifications/pull/10@github.com AyatanaIndicators/ayatana-indicator-notifications/pull/10/c677827232@github.com

Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 Date: Thu, 20 Aug 2020 18:57:28 +0000 Message-ID: f8kass.qfdlzv.1hge142-qmf@grimnir.das-netzwerkteam.de MIME-Version: 1.0

SGkgSmFzb24sDQoNCkFtIERvbm5lcnN0YWcsIDIwLiBBdWd1c3QgMjAyMCBzY2hyaWViIHRyaXNt Og0KPiBDaGVjayBvdXQgdGhpcyBjb21taXQgZm9yIHRoZSBjaGFuZ2UgaHR0cHM6Ly9naXRodWIu Y29tL3RyaXNtL2luZGljYXRvci1ub3RpZmljYXRpb25zL2NvbW1pdC84ZWQwZjcyMTBhNzQ2NTJi NGJhOWY2ZTUyZWRhZTE3MDVlNTU1YjRmDQo+IA0KPiBJdCB3YXNuJ3QgZmluZGluZyB0aGUgbWF0 ZSBub3RpZmljYXRpb24gZGFlbW9uIHNjaGVtYS4gV2UgaGF2ZSB0byBjaGVjayBpZiBpdCBleGlz dHMgYmVmb3JlIHdlIHdyaXRlIHRvIGl0LCBvdGhlcndpc2UgdGhlIGFwcCB3aWxsIGp1c3QgYWJv cnQuIFRoZSBHaW8gZG9jdW1lbnRhdGlvbiBzdWdnZXN0cyB3ZSBzaG91bGQgcHJvYmFibHkgYWx3 YXlzIGRvIGEgcmVjdXJzaXZlIGxvb2t1cCBhbnl3YXksIEknbSBqdXN0IG5vdCBzdXJlIHdoeSBp dCB3b3JrZWQgYmVmb3JlIGJ1dCBkb2Vzbid0IHdvcmsgbm93IHdpdGhvdXQgaXQuDQo+IA0KDQpJ cyB0aGF0IHRoZSBvZmZpY2lhbCBzb2x1dGlvbj8gKEFzIHlvdSBoYXZlIGl0IG9uIHlvdXIgbWFz dGVyIGJyYW5jaCwgaXQgb2J2aW91c2x5IGlzKS4gSSB3aWxsIGNoZXJyeS1waWNrIGl0IHRvbW9y cm93IGFuZCB0ZXN0Lg0KDQpNaWtlDQoNCi0tIA0KR2VzZW5kZXQgdm9uIG1laW5lbSBGYWlycGhv bmUgKHBvd2VyZWQgYnkgU2FpbGZpc2hPUyk=

flexiondotorg commented 4 years ago

Curious, my testing on Groovy the dnd toggle in the indicator passes through the mate-notification-daemon correctly.

tari01 commented 4 years ago

OK, since I was the first to approve this, I thought I'd join in: No schema issues on Manjaro, all seems to work as it should.

trism commented 4 years ago

I figured out why at least. In my testing I installed the indicator schema into /usr/local/, and that broke both ayatana-indicator-notifications and indicator-notifications, I guess because of how the schemas are merged internally. If I remove any schemas from /usr/local it works again. I still think it is a better idea to use the recursive search, because a user could easily install any schemas into /usr/local and break do-not-disturb for their system.