Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#6 [reopened] Stop animation via 'seen mail' context menu entry

closed
nobody
None
5
2004-04-29
2004-02-29
No

Like many people, I get a lot of mailing list mail, and I use the
animated Tux to notify me of new mail.

However, I do not want to open my e-mail program and retrieve
mail right away if there is nothing interesting at the moment.

At the same time, I'd wish Tux stopped dancing.

So it would be nice if there was a way to tell gnubiff "Hey, I've
seen this mail - it's not interesting, notify me when more
arrives.".

I'm using the --gtk switch version.

Cheers
-Tim

Discussion

    • summary: Stop animation via "seen mail" context menu entry --> Stop animation via "seen mail" context menu entry
    • status: open --> closed
     
  • Logged In: YES
    user_id=148212

    It's hard to do just that because it is very
    protocol-dependent. When some mail protocols will tell how
    much real new mails we got, some others (like file) won't
    tell it. In this case, i should somehow stored your entire
    mailbox in memory and check what is really new.

     
  • Logged In: YES
    user_id=583691

    This seems rather easy to do in my eyes. After all, you display the
    mails' subject + sender etc. at some point.

    So for every mail just calculate an ID, for example via:

    guint mailid = g_str_hash(header) ^ g_str_hash(subject) ^
    g_strhash(datestr);

    Then keep around a

    GList seenmails = NULL;
    GList hiddenmails = NULL;

    Whenever you get mails, do

    if (!g_list_find(hiddenmails, GUINT_TO_POINTER(mailid)))
    seenmails = g_list_prepend(seenmails,
    GUINT_TO_POINTER(mailid));

    and once I click 'mark all mails as seen', you just do:

    GList *hiddenmails = g_list_concat(hiddenmails, seenmails);
    seenmails = NULL;

    and don't show that mail. This is really trivial to do in my eyes, and
    costs you only a couple of bytes per mail.

    Cheers
    -Tim

    (PS: sorry for re-opening, I wasn't sure if you would get the follow-up
    comment without reopening)

     
    • summary: Stop animation via "seen mail" context menu entry --> [reopened] Stop animation via 'seen mail' context menu entry
    • status: closed --> open
     
  • Logged In: YES
    user_id=148212

    Ok, you're right, it shoudl be quite easy... I will try to
    do it for next version.

    The question is then how do I tell gnubiff that "Ok, I've
    seen those, don't display them again". Maybe a middle click
    either in applet (GTK or GNOME) or in popup ? (A popup menu
    is not that good because of GTK version). Any suggestions ?

    No prob for re-opening !

    Nico

     
  • Logged In: YES
    user_id=583691

    I think a pop-up menu on right-clicking the applet/tux window
    is the best solution (that's how most other applets do it, so
    'discoverability' of those extra features is quite good IMHO).

    Why is this a problem for the GTK-version?
    gtk_menu_popup() should work fine for a gnome applet just
    as for any gtk window, shouldn't it?

    Cheers
    -Tim

     
  • Logged In: YES
    user_id=148212

    it shoudl be working in incoming 1.0.11 version.

     
    • status: open --> closed