-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add location test to demo #72
base: main
Are you sure you want to change the base?
Conversation
portal-test/gtk4/window.ui
Outdated
</object> | ||
</child> | ||
<child> | ||
<object class="GtkLabel" id="lat"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latitudeLabel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this
portal-test/gtk4/window.ui
Outdated
</object> | ||
</child> | ||
<child> | ||
<object class="GtkLabel" id="lon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
longitudeLabel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this
libportal/location.c
Outdated
@@ -185,6 +185,8 @@ call_returned (GObject *object, | |||
g_task_return_error (call->task, error); | |||
create_call_free (call); | |||
} | |||
else | |||
ensure_location_updated_connected (call->portal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure_location_updated_connected (call->portal); | |
{ | |
ensure_location_updated_connected (call->portal); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This apparently has not been resolved
libportal/updates.c
Outdated
{ | ||
ensure_update_monitor_connection (call->portal); | ||
g_task_return_boolean (call->task, TRUE); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (error)
{
g_task_return_error (call->task, error);
}
else
{
ensure_update_monitor_connection (call->portal);
g_task_return_boolean (call->task, TRUE);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this one
In what way does it not work? I'm cautious about this because delaying a D-Bus signal connection until after a successful method call often leads to this anti-pattern:
|
It does not work in the sense that LocationUpdated will never be emitted on the other side of the DBus. |
I am not convinced this is the solution, but before this changes the location portal would fail about 19/20 times, now it only fails about 1/8 of times. |
I am marking a draft for if someone has a better solution. |
I think ill close it, it does not work on my other machine. This issue is the weirdest condition race I have ever seen. All I know this issue is in libportal side since, ASHPD works in a reliable way.way. |
I believe this can be closed as #67 is closed now. |
I updated the MR so just to include the location portal test to the demo. |
libportal/location.c
Outdated
@@ -185,6 +185,8 @@ call_returned (GObject *object, | |||
g_task_return_error (call->task, error); | |||
create_call_free (call); | |||
} | |||
else | |||
ensure_location_updated_connected (call->portal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This apparently has not been resolved
libportal/updates.c
Outdated
{ | ||
ensure_update_monitor_connection (call->portal); | ||
g_task_return_boolean (call->task, TRUE); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this one
portal-test/gtk4/window.ui
Outdated
</object> | ||
</child> | ||
<child> | ||
<object class="GtkLabel" id="lon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this
portal-test/gtk4/window.ui
Outdated
</object> | ||
</child> | ||
<child> | ||
<object class="GtkLabel" id="lat"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this
See https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/201. Generated by https://gitlab.gnome.org/World/design/emblem/-/merge_requests/40. The icon used was portal-symbolic from the devkit, using colors #26A269 to #33D17A were taken from the source of the SVG.
There is a caveat to test this in the demo, it has to be installed for it to work.