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 635952 - [PATCH] Should use append hint for notifications
[PATCH] Should use append hint for notifications
Status: RESOLVED FIXED
Product: xchat-gnome
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: xchat-gnome maintainers
xchat-gnome maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-27 21:35 UTC by Jeremy Nickurak
Modified: 2011-02-14 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
"append" hint for notifications (713 bytes, patch)
2010-11-27 21:36 UTC, Jeremy Nickurak
none Details | Review
proposed patch (1.17 KB, patch)
2011-01-11 14:57 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
proposed patch (1.66 KB, patch)
2011-01-17 12:48 UTC, Ritesh Khadgaray ( irc:ritz)
committed Details | Review

Description Jeremy Nickurak 2010-11-27 21:35:52 UTC
Per https://bugs.launchpad.net/notify-osd/+bug/334809, the notify-osd plugin should provide the "append" hint on notification bubbles. Otherwise, multiple messages end up getting queued, and (for a sufficiently large number of notifications) can take a LONG time to fade.

Patch attached.
Comment 1 Jeremy Nickurak 2010-11-27 21:36:34 UTC
Created attachment 175384 [details] [review]
"append" hint for notifications
Comment 2 Ritesh Khadgaray ( irc:ritz) 2011-01-11 14:57:59 UTC
Created attachment 178039 [details] [review]
proposed patch

let me know, if the attached patch helps.
Comment 3 Jeremy Nickurak 2011-01-16 22:23:04 UTC
My patch worked, yours doesn't. notify_manager_has_capability ("x-canonical-append") keeps returning false.

Commenting out the "if" around your "notify_notification_set_hint_string" call makes append work as my original did.
Comment 4 Jeremy Nickurak 2011-01-16 22:34:56 UTC
A little debugging with g_list_foreach says notify_get_server_caps is returning  "x-canonical-append":


void print_cap(gpointer data, gpointer user_data) {
        fprintf(stderr, "cap: \"%s\"\n", data);
}

static gboolean
notify_manager_has_capability (const gchar *cap)
{
        gboolean ret;
        GList *list = NULL;

        fprintf(stderr, "Asked for cap: %s\n", cap);

        list  =  notify_get_server_caps ();
        ret = ( g_list_find ( list, cap) != NULL );

        g_list_foreach(list, print_cap, NULL);

        g_list_free_full ( list, g_free);

        fprintf(stderr, "Got: %s\n", ret ? "true" : "false");


        return ret;
}


yields:


Asked for cap: x-canonical-append
cap: "body"
cap: "body-markup"
cap: "icon-static"
cap: "image/svg+xml"
cap: "x-canonical-private-synchronous"
cap: "x-canonical-append"
cap: "x-canonical-private-icon-only"
cap: "x-canonical-truncation"
cap: "private-synchronous"
cap: "append"
cap: "private-icon-only"
cap: "truncation"
Got: false
Comment 5 Ritesh Khadgaray ( irc:ritz) 2011-01-17 12:48:19 UTC
Created attachment 178501 [details] [review]
proposed patch

use g_list_find_custom .
Comment 6 Jeremy Nickurak 2011-01-29 07:25:52 UTC
Review of attachment 178501 [details] [review]:

Works for me
Comment 7 Ritesh Khadgaray ( irc:ritz) 2011-02-14 13:25:16 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 8 Ritesh Khadgaray ( irc:ritz) 2011-02-14 13:56:55 UTC
Review of attachment 178501 [details] [review]:

tested, and works.