After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 107544 - When double-clicking on a document, use startup notification if available
When double-clicking on a document, use startup notification if available
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.2.x
Other other
: High normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
AES[BADBUG]
: 61541 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-03-04 12:14 UTC by Ross Burton
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
gnome-mime-data-support-sn.patch: changes needed in gnome-mime-data (2.23 KB, patch)
2003-05-20 11:40 UTC, Jon Svendsen
none Details | Review
gnome-vfs-support-sn.patch: changes required in gnome-vfs (1.49 KB, patch)
2003-05-20 11:41 UTC, Jon Svendsen
none Details | Review
nautilus-support-sn.patch: changes required in nautilus (14.11 KB, patch)
2003-05-20 11:42 UTC, Jon Svendsen
none Details | Review
update to nautilus-support-sn.patch (14.33 KB, patch)
2003-06-07 14:29 UTC, Jon Svendsen
none Details | Review
nautilus-support-sn.patch in a brown paper bag (14.35 KB, patch)
2003-06-07 15:05 UTC, Jon Svendsen
none Details | Review

Description Ross Burton 2003-03-04 12:14:21 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... :)
Comment 1 Andrew Sobala 2003-03-15 17:15:15 UTC
I'm going to move to high priority, since nautilus is the most obvious
GNOME desktop app still not using startup notification.
Comment 2 Jon Svendsen 2003-05-20 11:39:06 UTC
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.
Comment 3 Jon Svendsen 2003-05-20 11:40:22 UTC
Created attachment 16659 [details] [review]
gnome-mime-data-support-sn.patch: changes needed in gnome-mime-data
Comment 4 Jon Svendsen 2003-05-20 11:41:32 UTC
Created attachment 16660 [details] [review]
gnome-vfs-support-sn.patch: changes required  in gnome-vfs
Comment 5 Jon Svendsen 2003-05-20 11:42:24 UTC
Created attachment 16661 [details] [review]
nautilus-support-sn.patch: changes required in nautilus
Comment 6 Alexander Larsson 2003-05-21 07:23:52 UTC
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.
Comment 7 Jon Svendsen 2003-05-21 15:16:03 UTC
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)


Comment 8 Alexander Larsson 2003-05-22 06:50:47 UTC
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?
Comment 9 Jon Svendsen 2003-05-22 08:02:26 UTC
of course, i am your humble servant etc ;)
Comment 10 Jon Svendsen 2003-06-07 14:28:54 UTC
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.
Comment 11 Jon Svendsen 2003-06-07 14:29:51 UTC
Created attachment 17273 [details] [review]
update to nautilus-support-sn.patch
Comment 12 Jon Svendsen 2003-06-07 15:03:54 UTC
woops. I shouldn't try to free the mimeaction if it is NULL.
Comment 13 Jon Svendsen 2003-06-07 15:05:41 UTC
Created attachment 17274 [details] [review]
nautilus-support-sn.patch in a brown paper bag
Comment 14 Alexander Larsson 2003-06-10 09:13:24 UTC
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.
Comment 15 Alexander Larsson 2003-06-11 11:32:16 UTC
I checked this in, with code style and memleak fixes to the nautilus
parts.
Comment 16 Jon Svendsen 2003-06-11 11:45:33 UTC
excellent, thanks. This means that someone should start telling
maintainers to put startup_notify=true in their stuff, right?
Comment 17 Alexander Larsson 2003-06-11 15:10:45 UTC
yeah
Comment 18 Murray Cumming 2003-07-28 15:24:12 UTC
So I guess this is fixed. Closing.
Comment 19 Murray Cumming 2003-07-28 15:25:30 UTC
*** Bug 61541 has been marked as a duplicate of this bug. ***
Comment 20 Fabio Gomes 2003-10-26 22:14:56 UTC
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.