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 769656 - Decouple notifications from widgets
Decouple notifications from widgets
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks: 709982
 
 
Reported: 2016-08-09 01:17 UTC by Florian Müllner
Modified: 2016-08-29 23:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
chatView: Delegate state tracking to the app (5.27 KB, patch)
2016-08-09 01:17 UTC, Florian Müllner
committed Details | Review
telepathyClient: Take over highlight notifications from ChatView (5.63 KB, patch)
2016-08-09 01:17 UTC, Florian Müllner
none Details | Review
telepathyClient: Take over highlight notifications from ChatView (5.65 KB, patch)
2016-08-10 09:49 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-08-09 01:17:41 UTC
See patches.
Comment 1 Florian Müllner 2016-08-09 01:17:45 UTC
Created attachment 332968 [details] [review]
chatView: Delegate state tracking to the app

In order to only mark messages as read when we can assume that the
user has seen it, we track both whether the view's toplevel window
has focus and whether the view's room is currently active. While
the existing code to do this isn't particularly bad, it is actually
simpler to delegate the state tracking to the application, with the
added benefit that it will be available to other modules that want
to apply the same check.
Comment 2 Florian Müllner 2016-08-09 01:17:52 UTC
Created attachment 332969 [details] [review]
telepathyClient: Take over highlight notifications from ChatView

There is no need to tie notifications to a particular UI element, and
should we in fact ever support multiple windows or none, we'd run into
issues that are easily avoided by separating notifications from widgets.

The telepathy client looks like a reasonable place for monitoring
channels for highlights.
Comment 3 Florian Müllner 2016-08-10 09:49:28 UTC
Created attachment 333058 [details] [review]
telepathyClient: Take over highlight notifications from ChatView

Updated help method to use a more unique name.
Comment 4 Rares Visalom 2016-08-16 13:00:46 UTC
Review of attachment 332968 [details] [review]:

looks good to me.
Comment 5 Rares Visalom 2016-08-16 13:05:54 UTC
Review of attachment 333058 [details] [review]:

looks good to me.
Comment 6 Florian Müllner 2016-08-29 23:31:30 UTC
Attachment 332968 [details] pushed as 6453c59 - chatView: Delegate state tracking to the app
Attachment 333058 [details] pushed as 84c7a88 - telepathyClient: Take over highlight notifications from ChatView