Skip to content

Conversation

Scroker
Copy link

@Scroker Scroker commented Apr 28, 2025

This pull request collects the changes I made in order to move the UI of the application from gtk3 to gtk4 and libadwaita 1.7. The version of gnome that is compatible to date is 48.
In general I tried to reuse as much code as possible but obviously the js and xml files related to the UI component are deeply changed. On the daemon instead I intervened almost exclusively to make it compatible with Gtk4.
Finally I reorganized the icon part of the gresource to natively get an Icon Theme.

ferdnyc and others added 30 commits July 31, 2023 20:07
<file compressed="true" preprocess="xml-stripblanks" alias="phone-symbolic.svg">icons/phone-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="phone-vibrate-symbolic.svg">icons/phone-vibrate-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks" alias="chat-bubbles-text-symbolic.svg">icons/chat-bubbles-text-symbolic.svg</file>
</gresource>
</gresources>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change the application automatically recognize the icon theme inside the gresouce

@Scroker
Copy link
Author

Scroker commented May 7, 2025

I don't know if I messed things up, but I tried as much as possible to eliminate unnecessary changes and reduced the changes by about ten files. I understand that the commits are very messed up, if it's okay with you I'll move the changes back to another branch with one of the more structured commits and resend the pull request using that.

I also apologize for all the mess about destroy dispose and finalize. I did not really understand the resource deallocation mechanism of this application. Now I have understood it and tried to restore it and implemented it for new windows as well. Now I simply have a recurring error if I turn off the daemon after opening the message window:

../gobject/gsignal.c:2699: instance '0x556b5097d630' has no handler with id '3651'

Anyway I saw the errors related to the tests, I think I reproduced them locally. On the clipboard I had to make some adjustments for Gtk4 even though I have been using it for days and it was working. Anyway, the test result is now this:

1..2
not ok 1 The Clipboard component pulls changes from the session clipboard
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

(gjs:551912): Gjs-WARNING **: 13:26:00.411: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
id<@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:49:58
set text@file:///usr/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/clipboard.js:66:29
@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:57:9
attempt@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7054:24
QueueRunner.prototype.run@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7087:25
runNext@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7006:18
next@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7013:11
once/<@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:6907:11
QueueRunner.prototype.run/<@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7103:12
setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

not ok 2 The Clipboard component pushes changes to the session clipboard
# Message: Expected '83e51d23-bc25-4b04-8dd5-cfd32be078cf' to be '88ca6802-5cf2-4780-9be3-7f2923d30d77'.
# Stack:
#   error properties: Object({ matches: Function })
#   id<@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:38:36
#   @file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:57:9
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
nome/gjs/modules/core/overrides/GLib.js:263:34
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

On the SMS part the real problem is that I imported your WIP: No-cache SMS support which solves a number of issues that also plague the current stable version on reading the message history.As a result of the changes made, however, the whole chain of sending the message and reading the history has changed and the test fails:

1..8
ok 1 The sms plugin can be loaded
ok 2 The sms plugin enables its GActions when connected
ok 3 The sms plugin requests messages when connected
not ok 4 The sms plugin can request a list of conversations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:226:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
not ok 5 The sms plugin can request full conversations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:235:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
not ok 6 The sms plugin only requests new or updated converations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:252:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
ok 7 The sms plugin can send SMS messages
ok 8 The sms plugin disables its GActions when disconnected

@Scroker
Copy link
Author

Scroker commented May 7, 2025

I don't know if I messed things up, but I tried as much as possible to eliminate unnecessary changes and reduced the changes by about ten files. I understand that the commits are very messed up, if it's okay with you I'll move the changes back to another branch with one of the more structured commits and resend the pull request using that.

I also apologize for all the mess about destroy dispose and finalize. I did not really understand the resource deallocation mechanism of this application. Now I have understood it and tried to restore it and implemented it for new windows as well. Now I simply have a recurring error if I shut down the daemon after opening the message window:

../gobject/gsignal.c:2699: instance '0x55ed27a5f620' has no handler with id '1932'

Anyway I saw the errors related to the tests, I think I reproduced them locally. On the clipboard I had to make some adjustments for Gtk4 even though I have been using it for days and it was working. Anyway, the test result is now this:

1..2
not ok 1 The Clipboard component pulls changes from the session clipboard
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

(gjs:551912): Gjs-WARNING **: 13:26:00.411: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
id<@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:49:58
set text@file:///usr/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/clipboard.js:66:29
@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:57:9
attempt@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7054:24
QueueRunner.prototype.run@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7087:25
runNext@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7006:18
next@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7013:11
once/<@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:6907:11
QueueRunner.prototype.run/<@file:///usr/libexec/installed-tests/gsconnect/jasmine.js:7103:12
setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

not ok 2 The Clipboard component pushes changes to the session clipboard
# Message: Expected '83e51d23-bc25-4b04-8dd5-cfd32be078cf' to be '88ca6802-5cf2-4780-9be3-7f2923d30d77'.
# Stack:
#   error properties: Object({ matches: Function })
#   id<@file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:38:36
#   @file:///usr/libexec/installed-tests/gsconnect/components/testClipboardComponent.js:57:9
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
nome/gjs/modules/core/overrides/GLib.js:263:34
# Message: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7031)
# Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
Stack:
#   error properties: Object({ matches: Function })
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34

On the SMS part the real problem is that I imported your WIP: No-cache SMS support which solves a number of issues that also plague the current stable version on reading the message history. As a result of the changes made, however, the whole chain of sending the message and reading the history has changed and the test fails:

1..8
ok 1 The sms plugin can be loaded
ok 2 The sms plugin enables its GActions when connected
ok 3 The sms plugin requests messages when connected
not ok 4 The sms plugin can request a list of conversations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:226:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
not ok 5 The sms plugin can request full conversations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:235:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
not ok 6 The sms plugin only requests new or updated converations
# Message: Error: <spyOn> : _handleDigest() method does not exist\nUsage: spyOn(<object>, <methodName>) in file:///usr/libexec/installed-tests/gsconnect/jasmine.js (line 7947)
# Stack:
#   error properties: Object({ matches: Function })
#   @file:///usr/libexec/installed-tests/gsconnect/plugins/testSmsPlugin.js:252:14
#   setTimeout/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:72:9
#   _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
ok 7 The sms plugin can send SMS messages
ok 8 The sms plugin disables its GActions when disconnected

Let me know how to proceed, whether to change branches and bring back the changes or continue on this one. And if you have any advice on how to deal with these issues on testing.

PS: I know that in general I shouldn't have touched the tests, but clipboard had direct dependencies with Gtk3 so I was forced, also on this let me know if it's ok.

@github-actions github-actions bot added the conflicts Pull requests with merge conflicts that need to be resolved label May 16, 2025
Copy link

This pull request has conflicts, please resolve those so that the changes can be evaluated.

@github-actions github-actions bot removed the conflicts Pull requests with merge conflicts that need to be resolved label May 20, 2025
Copy link

All conflicts have been resolved, thanks!

@github-actions github-actions bot added the conflicts Pull requests with merge conflicts that need to be resolved label Jul 11, 2025
Copy link

This pull request has conflicts, please resolve those so that the changes can be evaluated.

@LorierMatthieu
Copy link

What's happening here?

@github-actions github-actions bot removed the conflicts Pull requests with merge conflicts that need to be resolved label Jul 25, 2025
Copy link

All conflicts have been resolved, thanks!

@LorierMatthieu
Copy link

Is this a response? If yes, so the work is still progressing.

@github-actions github-actions bot added the conflicts Pull requests with merge conflicts that need to be resolved label Sep 7, 2025
Copy link

github-actions bot commented Sep 7, 2025

This pull request has conflicts, please resolve those so that the changes can be evaluated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Pull requests with merge conflicts that need to be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants