GNOME Bugzilla – Bug 648575
Show a red line demarcating read and unread messages in WebKit based (HTML) chats
Last modified: 2011-04-25 08:26:34 UTC
This bug branches from bug #443884#c9
Created attachment 186573 [details] [review] redline in ongoing messages This is a way I could think of creating a demarcation. If it looks good, I can proceed with it. It does not yet implement lines on appended events and logs presently.
As said on bug #443884, no need to create a new bug. *** This bug has been marked as a duplicate of bug 443884 ***
Review of attachment 186573 [details] [review]: I'm reviewing here because of the reviewing tool but please use bug #443884 from now. Your patch introduced trailing spaces; "git diff" should show them in red and "make check" should catch them as well. Did you check if Adium has a built-in system to display unread messages? ::: libempathy-gtk/empathy-chat.c @@ +122,3 @@ guint unread_messages; + + time_t last_viewed_at; Since last week, we stopped using time_t and always use gint64 for timestamps. See bug #648188 @@ +1252,3 @@ empathy_contact_get_handle (sender)); + if (priv->is_seen && This logic doesn't seem to work here, the line is never displayed. I'm wondering if we could do something simpler. What about: - Add empathy_chat_view_messages_read() and call it in empathy_chat_messages_read() - In the theme, add the line if that's the first unread message. Would that work? ::: libempathy-gtk/empathy-chat.h @@ +97,3 @@ +void empathy_chat_set_last_viewed_at (EmpathyChat *chat, + time_t view_time); +time_t empathy_chat_get_last_viewed_at (EmpathyChat *chat); Why is this function public? Actually this function doesn't really buy us anything as it's only called in empathy-chat, which could use priv->last_viewed_at directly. ::: libempathy-gtk/empathy-theme-adium.c @@ +549,3 @@ + g_string_append (html_string, + "<div id=\"demarcator\"> <HR WIDTH=\"85%\" COLOR=\"#FF0000\"" + " SIZE=\"3\"> </div>"); The line is pretty massive here. I think it would look better having it more thin. ::: src/empathy-chat-window.c @@ +1540,3 @@ + if (priv->current_chat != NULL) + empathy_chat_set_last_viewed_at (priv->current_chat, + empathy_time_get_current ()); This look wrong. Why not do this directly in empathy_chat_messages_read()?