GNOME Bugzilla – Bug 107544
When double-clicking on a document, use startup notification if available
Last modified: 2004-12-22 21:47:04 UTC
When I double-click on a document, if the application supports startup notification it should be used. Not sure how easy this is to do though... :)
I'm going to move to high priority, since nautilus is the most obvious GNOME desktop app still not using startup notification.
ok, so i made a pass at this. there might still be issues to sort out, but this should be the jist of it. Patches to follow for these changes: gnome-vfs: Add a macro for a "startup_notify" key in the application registry. gnome-mime-data: Set startup_notify=true for applications that have stable releases that support startup notification. This could get messy. lots of stuff in gnome-vfs.applications _might_ support notification, but then again might not (i.e. abiwork, gnumeric, dia, etc, and even 2.0.x versions of core gnome applications like eog and file-roller) nautilus: actually perform notification when launching applications that claim support. most of the code here is cut-n-pasted directly out of gnome-desktop. The tasklist item that appears during startup says "opening $filename" and displays the factory icon for the file. Very nice and object oriented. Of course, full support for this is will also require patches against modules that install their own application registry entries. I plan to take care of that if/when these patches go in. Please let me know of any bugs or modifications that need to be made. ccing gnome-vfs-maint as well because of the multi-module patches.
Created attachment 16659 [details] [review] gnome-mime-data-support-sn.patch: changes needed in gnome-mime-data
Created attachment 16660 [details] [review] gnome-vfs-support-sn.patch: changes required in gnome-vfs
Created attachment 16661 [details] [review] nautilus-support-sn.patch: changes required in nautilus
We're pondering a remake of the mime system where the mime data would have a link to the desktop file. The way you handle this means the startup_notification data needs to be duplicated in both desktop file and mime data. I've cc:d jrb on this, as he is working on the mime system.
i agree that a more complete solution is necessary, but would still argue that the changes should go in: * the changes are completely trivial except in nautilus and have very low impact on application developers (probably much less than a future revision of the mime system) * one could argue that this does no real damage to future development, since it only increases the level of overlap between the two systems. when a rewritten system lands, it could actually be _good_ that the overlap is as large as possible. changes similar to these would probably have to go in anyway (except that it would perhaps be possible to use gnome-desktop directly instead of cut'n'pasting, depending on the implementation) * this is an _important_ feature. due to the way the desktop is designed, i suspect that many users are not getting any benefit from startup notification at all right now since it does not happen when clicking on files. it would be nice to have this fixed in 2.4, which i would guess is too optimistic for a reworked mime system given the june 9th feature freeze? (if this is not the case, i would love to help working on a better solution)
I agree that it is important to get this in gnome 2.4, but I think we should wait a week or two to see what the status is on the mime rework. If the mime stuff isn't going in, we should get this in. jon: Does this sound ok to you?
of course, i am your humble servant etc ;)
ping, since the freeze is in two days. also an update to the patch against nautilus. fixes some issues, i.e. does not crash when get_default_action returns null, and does not leak the action object.
Created attachment 17273 [details] [review] update to nautilus-support-sn.patch
woops. I shouldn't try to free the mimeaction if it is NULL.
Created attachment 17274 [details] [review] nautilus-support-sn.patch in a brown paper bag
The mime-data and vfs patches look fine. The nautilus patch needs some work: It doesn't follow the nautilus style-guide. See docs/style-guide.html in the nautilus tree. + name = nautilus_file_get_display_name (file); + icon = nautilus_icon_factory_get_icon_for_file (file, FALSE); I don't know the sn API, but doesn't that leak name and icon? Also, i don't want this in nautilus before we've released the current snapshot, since it has to build with the gnome-vfs snapshot i made today.
I checked this in, with code style and memleak fixes to the nautilus parts.
excellent, thanks. This means that someone should start telling maintainers to put startup_notify=true in their stuff, right?
yeah
So I guess this is fixed. Closing.
*** Bug 61541 has been marked as a duplicate of this bug. ***
Let's see if I did understand: Nautilus startup notification will only work with applications that support the startup-notification API. This means that, for applications that don't support notification, Nautilus won't even give a feedback that you double-clicked correctly. The problem could be solved if Nautilus provided some tiny feedback that could mean "ok, processing". This could be done in many ways: - The cursor could change to the hourglass for 100~200 miliseconds - The throbber could move for some miliseconds - The square fullscreen animation used in startup-notification could be used here I vote for the hourglass.