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 631726 - Don't use a status icon if the notification server supports persistence
Don't use a status icon if the notification server supports persistence
Status: RESOLVED FIXED
Product: gnome-packagekit
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-packagekit-maint
gnome-packagekit-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-09 05:56 UTC by William Jon McCann
Modified: 2011-01-28 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove status icon use (12.02 KB, patch)
2010-10-09 06:40 UTC, William Jon McCann
none Details | Review
Require libnotify 0.6.0 (17.06 KB, patch)
2010-10-09 06:41 UTC, William Jon McCann
none Details | Review
Remove status icon use (12.02 KB, patch)
2010-10-09 06:41 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2010-10-09 05:56:24 UTC
The GNOME notification servers (gnome-shell and notification-daemon >= 0.6.0) support notification persistence.  This means that notification bubbles won't be transient and require backing with a status icon.  We can drop use of status icons in these cases.
Comment 1 William Jon McCann 2010-10-09 06:40:27 UTC
Created attachment 171990 [details] [review]
Remove status icon use

Not tested yet
Comment 2 William Jon McCann 2010-10-09 06:41:26 UTC
Created attachment 171991 [details] [review]
Require libnotify 0.6.0
Comment 3 William Jon McCann 2010-10-09 06:41:32 UTC
Created attachment 171992 [details] [review]
Remove status icon use
Comment 4 Richard Hughes 2010-10-09 07:46:06 UTC
I thought the first patch is probably okay, but second patch is too far. I thought the story for GNOME3 was to hide the status icon when running under the shell, but otherwise retain it? That's what Dan suggested a few weeks ago.
Comment 5 William Jon McCann 2010-10-09 07:52:14 UTC
No.  We never even wanted these icons for GNOME 2, frankly.  And now that we have notification persistence there is no need for them.  See http://live.gnome.org/GnomeShell/Design/Guidelines/MessageTray/Compatibility too.
Comment 6 Richard Hughes 2010-10-09 08:24:37 UTC
I read that page:

gnome-packagekit    The package manager "has messages for you"   OMFG die.

If you noticed, we removed that in git months ago.

Note: statements like "OMFG die." aren't exactly nice things to say. In GNOME2 we have libnotify and the status icons. And we still have a 15 year old view on how to manage software installation. I'm really trying here.

"We never even wanted these icons for GNOME 2, frankly."

Well, I did. There was no magic notification message queue thing, so we had to do the best with what we had. Also, I thought the story for GNOME3 was to provide a fallback to the GNOME2 experience where people didn't have compositing or want the new shell? If that's not the case, then I think a few people may be surprised by that, given recent discussions on ddl.

Also, I feel like you're treating me like a stupid person who doesn't know any better. I understand that for GNOME3 we have to change the way in which we do things, but maybe a little more grace might help smooth things along.

Thanks,

Richard.
Comment 7 William Jon McCann 2010-10-09 15:04:41 UTC
Cool.  I'm glad that "has messages" icon is gone.  That large list of status icon issues was compiled over a fairly long period of time (and not just by me, much of it was lead by some Ubuntu folks looking for app indicators issues).  You are right that "OMFG die" may not read like a nice thing to say but it was partly in jest and partly as a pretty valid flame of what was a very poorly conceived design.  I can appreciate that you are trying but perhaps it would be advantageous for everyone if we tried to work on the designs before we started coding them.  I think that would result in fewer hurt feelings and fewer outraged reactions from designers.  If you had asked anyone in #gnome-design if you should ever have a status icon with a menu that says the "Package Manager has messages for you" I'm confident that we could have found a much better solution.

I would be happy to work with you on improving the design.  Though I think we should be working on the designs I helped you with quite a long time ago.  They still apply and would dramatically improve the experience here.  I may be showing a bit of frustration due to that.  I'm sorry if that is coming off harshly.  I'll try to find more constructive ways of communicating my thoughts.

So, let's start with this bug.
Comment 8 Richard Hughes 2010-10-18 15:49:06 UTC
commit 1efccf17638b2b7e658c54351a5e8492729bfad5
Author: William Jon McCann <jmccann@redhat.com>
Date:   Mon Oct 18 16:47:42 2010 +0100

    Port to libnotify 0.7.0
    
    Signed-off-by: Richard Hughes <richard@hughsie.com>
Comment 9 Richard Hughes 2010-10-18 15:50:55 UTC
Rather than duplicate:

static gboolean
server_has_persistence (void)
{
        gboolean has;
        GList   *caps;
        GList   *l;

        caps = notify_get_server_caps ();
        if (caps == NULL) {
                fprintf (stderr, "Failed to receive server caps.\n");
                return FALSE;
        }

        l = g_list_find_custom (caps, "persistence", (GCompareFunc)strcmp);
        has = l != NULL;

        g_list_foreach (caps, (GFunc) g_free, NULL);
        g_list_free (caps);

        return has;
}

In all my projects, could you add a notify_server_has_cap(const gchar *cap) in libnotify, and then I can use that. Thanks.
Comment 10 Richard Hughes 2010-10-18 16:02:57 UTC
commit cca6b0e16ed863cec294e2e7ecdb0904b27dc6d9
Author: William Jon McCann <jmccann@redhat.com>
Date:   Mon Oct 18 17:02:34 2010 +0100

    Remove status icon use in GpkWatch
    
    Signed-off-by: Richard Hughes <richard@hughsie.com>
Comment 11 William Jon McCann 2010-10-27 18:42:43 UTC
OK, I guess we could add a helper function like that for the next release.  But perhaps for now you could just copy it.  I don't expect every project will need it.
Comment 12 Richard Hughes 2011-01-05 11:08:18 UTC
I've created a patch in https://bugzilla.gnome.org/show_bug.cgi?id=638736 for the helper method. If you apply this to libnotify I'll work on the GPK bits.

Of course, with no status area notification at all, we'll need to send a notification for all update types, not just security/critical. I guess. Ideas welcome.
Comment 13 William Jon McCann 2011-01-06 23:17:58 UTC
You have to check multiple caps right?  Almost certainly you need to check actions and persistence.  Doesn't make much sense to me to do two round trips for that.  Just get the caps list and check yourself.  Please don't block on me reviewing or adding new API to libnotify.
Comment 14 William Jon McCann 2011-01-11 23:21:12 UTC
also the source in the message tray should read "Software Update" or similar - whatever is the name of the app that will be used to actually perform the updates.  This is currently set using notify_init.

We should also probably be using the symbolic icon for software updates.
Comment 15 Matthias Clasen 2011-01-27 19:54:33 UTC
Richard, I think we've decided against adding that capability check function in libnotify for now :-(

Can we get this finished anyway, please ? Its really just a 10-line function...
Comment 16 Richard Hughes 2011-01-28 15:34:31 UTC
commit fc2797fa892ffa08449ef3fa5808003f44e5f9a1
Author: Richard Hughes <richard@hughsie.com>
Date:   Fri Jan 28 15:34:56 2011 +0000

    Do not show a notification icon when the notification server has persistence support. Fixes #631726