gnome-user-share notification changes

Bug #337352 reported by Cody Russell on 2009-03-03
Affects Status Importance Assigned to Milestone
gnome-user-share (Ubuntu)
Ken VanDine

Bug Description

Right now, gnome-user-share opens a notification bubble with actions for opening the file or opening its location.

Instead, an alert box should appear, using the icon of the actual file, and with “Open” and “Reveal” buttons next to the default “OK” button. Mockup at <>.

Cody Russell (bratsche) wrote :
Michael Rooney (mrooney) wrote :

I'll change the package to gnome-user-share, I believe that is where this belongs. If your patch is ready do you want to subscribe ubuntu-universe-sponsors?

Sebastien Bacher (seb128) wrote :

do you plan to open an upstream bug to suggest them to use a similar way?

Matthew Paul Thomas (mpt) wrote :

I have not yet designed what gnome-user-share should do instead of showing a notification bubble, partly because it is in Universe, and partly because I have not seen it in action myself. That's why the NotifyOSD spec just describes the current behavior (imprecisely and inaccurately, to boot!), and doesn't yet specify new behavior. I'm sorry that it was confusing.

The patch appears to open files automatically after the notification bubble disappears. I doubt that's desirable.

The way to make it quickest for me to design new behavior would be to (a) give me idiot-proof instructions on how to see gnome-user-share in action with notification-daemon, or (b) attach to this bug report a screencast of it working with notification-daemon. Thanks!

description: updated
Cody Russell (bratsche) wrote :

Yes, you're right. I think I misunderstood the "closed" signal. Should I write a new patch to remove the actions from the notifications, or just leave this alone until you've determined what the ideal behavior should be?

Matthew Paul Thomas (mpt) wrote :

I think the safest approach would be to leave it alone until we can see how it behaves. It might be that the notification actions are the only way of performing those functions.

Nicolò Chieffo (yelo3) wrote :

In my opinion it should simply show a notification telling that the transfer is finished

Matthew Paul Thomas (mpt) wrote :

Nicolò, does sharing files with gnome-user-share actually work for you? If so, could you use gtkrecordmydesktop or similar to make a screencast of what happens with an incoming file, and attach it here? Thanks.

I can just tell you using words. This is what happens:
the file transfer starts SILENTLY, and when it's finished, the
notification appears with those actions: open file, reveal file,
cancel, ok.
Is this enough?

Nicolò Chieffo (yelo3) wrote :

Matthew do you still need a screencast?

Matthew Paul Thomas (mpt) wrote :

No thanks Nicolò -- if the file transfer starts silently (what strange behavior!), that's all I need to know. Redesign coming shortly.

Changed in gnome-user-share (Ubuntu):
status: New → Confirmed
description: updated
Matthew Paul Thomas (mpt) wrote :

Spec updated.

Nicolò Chieffo (yelo3) wrote :

The wiki you linked tells that instead of a notification it should be
opened an alert box.
I'm against this behaviour, but this is only my opinion

Nicolò Chieffo (yelo3) wrote :

The update is much better, thanks.
Will simple notification be used, besides the ala-firefox download window?

Changed in gnome-user-share (Ubuntu):
importance: Undecided → Medium
Iain Lane (laney) wrote :

Unsubscribing sponsors per recent discussions. Please resubscribe when the updated patch is ready (preferably sooner rather than later due to the looming release). Thanks.

Cody Russell (bratsche) wrote :

I can't seem to test this yet. Does anyone here have some Bluetooth hardware who can try to test this out?

If it works, please post a screenshot of the dialog in case it needs some tweaking.

Cody Russell (bratsche) wrote :

Fix a memory leak.

Cody Russell (bratsche) wrote :
Nicolò Chieffo (yelo3) wrote :

Should I apply only the last patch?

Nicolò Chieffo (yelo3) wrote :

I've tried the last patch, but it always shows a notification with actions.

Cody Russell (bratsche) wrote :

The last patch does not show a notification with actions. It does the following:

if (supports_actions) {
} else {
    use MPT's new dialog box design

So you -should- see a dialog box appear with buttons "Open", "Reveal", and "OK". If that's not happening then I messed up. :)

Nicolò Chieffo (yelo3) wrote :

Ok it does, but it's exactly the same as before... a box with the same options

Cody Russell (bratsche) wrote :

Can you post a screenshot of it? I'm afraid I have no way to test this. :(

Nicolò Chieffo (yelo3) wrote :

They are exactly equal

Chris Coulson (chrisccoulson) wrote :

With the slightly modified patch (as discussed on IRC), I see the dialog correctly now

(15:09:00) bratsche: chrisccoulson: Line 195 of obexpush.c
(15:09:09) bratsche: Change from if (supports_actions)
(15:09:14) bratsche: to if (supports_actions ())

Cody Russell (bratsche) wrote :

This patch includes the change that Chris described above. Thanks so much!

Cody Russell (bratsche) wrote :

Fix the reveal/open (their actions were reversed before)
Set focus_on_map = FALSE

Chris Coulson (chrisccoulson) wrote :

Here's a slightly modified patch that gives the new dialog an icon (the patch is formatted slightly differently as it was created with simple-patchsys)

Chris Coulson (chrisccoulson) wrote :

And a screenshot with the icon

Nicolò Chieffo (yelo3) wrote :

I don't see the point of this patch...
There's no useful change as I see from your screenshots
Can you explain me better?

thank you very much

Chris Coulson (chrisccoulson) wrote :

Without the patch, gnome-user-share uses notifications to tell you a file has arrived and assumes that the notifcation system supports actions. notify-osd in Jaunty does not support actions, and so displays the gnome-user-share notifications as fallback notifications (ugly dialogs with a cancel/ok button that do the same thing, plus the other actions).

This is a sub-optimal situation, and applications are gradually being patched so that they don't assume that the notification system supports actions. Where an application needs to interact with a user (as is the case with gnome-user-share), a dialog that appears behind the other windows and doesn't grab focus is preferred as opposed to the fallback notification.

The patch here displays a dialog rather than sending a message to notify-osd, which would display it's (ugly) fallback notification. The advantage of the dialog is that you can control the layout of it, the icons that appear in it, and give it a window icon too (I don't think you can do any of this with the notify-osd fallback notifications).

Chris Coulson (chrisccoulson) wrote :

Cody - I just compared the screenshots of the fallback notification and the new dialog, and I think that the new dialog would look neater with just the filename (as opposed to the full URI). Displaying the full URI should be unnecessary, as the dialog gives you the option of opening the file (or the containing folder), and the files always go to the same location anyway (XDG_DOWNLOAD_DIR)

Nicolò Chieffo (yelo3) wrote :

Ok, thank you. Is it possible to also display a plain notification?

Maybe this is better instead of a dialog:

Matthew Paul Thomas (mpt) wrote :

Nicolò, as I describe on that page, a morphing window should be used when it is important for someone to respond to the event quickly, regardless of what else they’re doing. That's not true for the case of a file transfer being completed. As I wrote in the spec, a more sophisticated design would be a "Received Files" window, but the custom alert box is good enough for now.

Cody and Chris, thanks for your work on this. As Chris says, just the filename should be shown, not the URI. Comparing the screenshot with the mockup I see three other glitches:
(1) the quotes around the filename are '' (U+0027 U+0027), when they should be “” (U+201C U+201D)
(2) the sentence should end in a period, but does not
(3) the default button is "Open", but should be "OK".

Nicolò Chieffo (yelo3) wrote :


I have other proposals for the patch, I will tell you thought I don't
know if they are achievable (if not, sorry):
- include the preview instead of the file type icon when available
(video and images)
- include the name of the device which sent the file
- include some basic information about the file (size, type)
- include a window list entry for the popup (I don't know the exact
name, but I mean an entry in the list of open windows, the applet in
the bottom panel, so that if the window looses focus for accident, the
user will at least know that it is present because he sees it in the

the 01-notifications.patch has a problem: the small icon which appears
in the tray during the file transfer does not go away when dismissing
the popup.

Cody Russell (bratsche) wrote :

This updated patch should correct the things pointed out by Chris and MPT:

1/ The basename is used rather than the full path
2/ Quotes are changed from "'" to "\""
3/ Added a period to the end of the sentence
4/ Set the default response to GTK_RESPONSE_OK
5/ Hides the status icon when the dialog responds (thanks to Nicolò for spotting this!)

Cody Russell (bratsche) wrote :

Unless Chris or MPT see any more problems, I'd like to see if this can be sponsored.

Nicolò Chieffo (yelo3) wrote :

When you have time, can you comment my other proposals too, please?

Cody Russell (bratsche) wrote :

My personal feeling is that we should try to limit changes to what's relevant to making gnome-user-share work more friendly with notify-osd. We should try to get this new dialog functioning correctly, and try to get it adopted into upstream. At that point, feature enhancements like file preview would be more appropriately handled by the upstream maintainers.

If we add too much stuff to what is otherwise a "make it work with notify-osd" bug, it makes it much harder for upstream to review it and integrate it.

Nicolò Chieffo (yelo3) wrote :

ok thanks

Matthew Paul Thomas (mpt) wrote :

Cody, that looks like it fixes (2) and (3), thanks. For (1), though, it uses "" (U+0022 U+0022) when we want “” (U+201C U+201D). It's up to you whether you want to fix that before getting it sponsored. :-)

Cody Russell (bratsche) wrote :

That's an easy enough thing to fix. Okay, done.

Cody Russell (bratsche) wrote :


David Barth (dbarth) on 2009-04-03
Changed in gnome-user-share (Ubuntu):
assignee: nobody → bratsche
Cody Russell (bratsche) on 2009-04-03
Changed in gnome-user-share (Ubuntu):
assignee: bratsche → ken-vandine
Ken VanDine (ken-vandine) wrote :

Attached debdiff

Changed in gnome-user-share (Ubuntu):
status: Confirmed → In Progress
Sebastien Bacher (seb128) wrote :

thank you for the work there

Changed in gnome-user-share (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-user-share - 2.25.92-0ubuntu2

gnome-user-share (2.25.92-0ubuntu2) jaunty; urgency=low

  * debian/patches/01_notification.patch
    - Display an alert box instead of a notification for files
      recieved, thanks Cody Russell! (LP: #337352)

 -- Ken VanDine <email address hidden> Tue, 07 Apr 2009 08:26:04 -0400

Changed in gnome-user-share (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.