-
Notifications
You must be signed in to change notification settings - Fork 250
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
'org.gnome.Hamster.GUI' - strange semantics of window pop-up and persistence #563
Comments
TL;DR thoroughly. Please wait before looking into that again. I'll give pointers later. |
@ederag, you shouldn't dismiss this without even looking at it. It's not only disrespectful against myself, I'm pretty sure it's against your own interests. And no, this is not only about Show me one single other DBus interface designed like this. And explain to me how this API would ever be used, for any purpose, by any application (or, in case you agree it's unusable, explain to me why this API exists at all). I understand that you're busy, you don't have to look at this now, but I wish you'd fix the design before 3.0. It will be harder to fix it afterwards. |
@mwilck #549 (comment) gave some background for the decision to get this out of sight quickly, But despite the pressure and the fact that #549 (comment) had been posted 30 minutes earlier (messages probably crossed), I did take time to answer accurately And that in particular was accurate:
Hence my post was all about
The shell extension is not mentioned in my message either. So there was absolutely no "disrespect" from me at all, on the contrary, given the circumstances.
There are none, because the new gnome way is not a DBus interface we are used to. I'll provide links and details tomorrow in a separate issue, Finally, can't let that pass:
It's all about the project here. We both care about it, maybe too much ? |
Well, it's been there all along: I recently changed the phrasing (d7badae) Note: that's an interface I want to experiment with at my pace, |
Yes I'd seen that, and actually it was the very reason why I opened this issue. Unless I hopelessly misunderstand, the comment you linked to above recommends to use the Summing up again:
I've been looking around on my desktop with D-feet. There are actually a few applications providing OTOH, various core GNOME components appear not to have switched to this API yet. I see no urge for hamster to do so. Side note: Actually I have some trouble understanding the value-add of this API design. It mainly seems to introduce a new level of API introspection, which was already available on DBus anyway via |
Thanks for the examples.
There's no hurry at all. Actually we are taking the most open route: b0eac53 makes that even clearer, |
The
org.gnome.Hamster.GUI
service is supposed to replace the functionality oforg.gnome.Hamster.WindowsServer
. I find its usefulness limited. Here's why.The following 3 python statements cause a hamster window to appear:
IOW, Just creating a proxy object for
org.gnome.Hamster.GUI
opens a window.This is unexpected. I would expect that the application window would only open after I run
the
Activate
method of theorg.gtk.Application
interface, or activate a specific action viaorg.gtk.Actions
. The same happens when using d-feet: Simply clicking on theorg.gnome.Hamster.GUI
address will cause the hamster window to appear. I've never seen this with any other DBus interface, and strongly believe that it's wrong. I just tried with a couple of other services that offer theorg.gtk.Application
API; I've found no other application that behaves like this.In particular, this is unwanted if the
org.gnome.hamster.GUI
API is supposed to be used by other applications, for example the GNOME shell plugin. The plugin can't invoke the "add" action (showing the "edit activity" window) without showing the "overview" window first. If I continue the example above like this:I get both windows, the overview and the "edit activity" window. For users of the GNOME shell extension and similar applications, this is highly confusing and distracting.
But what's worse, closing the hamster window also exits hamster and thus the DBus service, and attempting to access it will cause an error:
This is horrible for any application trying to use the DBus interface. The proxy object (
po
in my example) continue to exist, but trying to call a method on it fails with a DBus error. Thus applications can't "cache" proxy objects in python variables, because these objects might be invalidated any time.Compare this to the legacy hamster windows service, which runs in the background and provides dedicated methods to open certain windows to manipulate the hamster database. A proxy object opened to its address will persist until the session ends or someone forcibly kills the service, which is what I'd expect from an application that offers DBus services.
IMO this is how the new "GUI" service should also be designed. It should run in the background, should not quit when the associated window is closed, and should open dedicated windows when asked for it by a DBus method call.
The way this is currently designed may have its merits that I currently don't see. But I am quite certain that this design is not suitable to replace
hamster-windows-service
.The text was updated successfully, but these errors were encountered: