Commit Graph

468 Commits

Author SHA1 Message Date
Florian Müllner
ea9e5bc52c messageTray: Remove support for Music notifications
Music is no longer a special type of notification according
to the design. If we want to resurrect the functionality, we
can reimplement it with a dedicated API like MPRIS rather
than piggy-bagging on the notification system.

https://bugzilla.gnome.org/show_bug.cgi?id=744815
2015-02-20 01:52:13 +01:00
Florian Müllner
f08e2b72d2 messageTray: Remove support for images in notifications
The design says they are no longer a thing.

https://bugzilla.gnome.org/show_bug.cgi?id=744815
2015-02-20 01:50:01 +01:00
Florian Müllner
5a8923ef95 notificationDaemon: Remove support for legacy status icons
Tray icons make for a terrible UI on their own, but trying to
shoehorn them into the notification system has only made them
worse. At least for the time being this removal is temporary
and support for tray icons will be back, but no longer as part
of the notification system.

https://bugzilla.gnome.org/show_bug.cgi?id=744815
2015-02-20 01:47:20 +01:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Florian Müllner
ddeac2386f gestures: Restrict actions based on keybindingMode
Just like keybindings and the message tray pointer barrier, gestures
don't always make sense - for instance, swiping up the screen shield
should not trigger the message tray just as the SelectArea action around
the left edge should not open the overview.
To avoid this, restrict gestures based on the current keybinding mode.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Devyani Kota
34606c0a8c messageTray: Summarize notifications when messages queue up
It is really annoying for the user to acknowledge multiple notifications
when they queue up. So, to prevent a notification flood that has to be
handled by the user one-by-one, a summarized-notification feature is
added which leaves a single summarized-notification for the user,
replacing multiple notifications if the number exceeds 1, which they may
or may not acknowledge. When this summarized-notification is acknowledged,
the message-tray is opened where they can view the notifications that were
summarized. This helps the user concentrate on his primary task
simultaneously informing them about the new notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=702460
2014-10-27 18:20:51 +01:00
Owen W. Taylor
ffdb85e003 messageTray: add some missing signal disconnections
Disconnect some signal connections that weren't disconnected on actor destroy
(not the result of comprehensive review.)

https://bugzilla.gnome.org/show_bug.cgi?id=738256
2014-10-13 11:50:12 -04:00
Florian Müllner
5623f3b4b5 messageTray: Add focusTrap
The summary container will trap the focus if any sources are present,
making the message tray menu unreachable by keynav. Apply the same
hack as in searchDisplay and add a focusTrap to move the focus manually
as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=707799
2014-09-17 06:19:08 +02:00
Carlos Garnacho
285a7467d0 messageTray: Add bottom drag gesture to popup the message tray
https://bugzilla.gnome.org/show_bug.cgi?id=735625
2014-08-30 14:01:44 +02:00
Florian Müllner
efb9f167bd messageTray: Fix RTL handling in notifications
Commit 234b90ac86 replaced a member variable with a "local"
one, except that it wasn't that local after all ...
2014-08-06 16:10:27 +02:00
Jasper St. Pierre
83cb26d70e js: Adapt to GSettings API change
The 'schema' property has been deprecated for a long time. Even though
this will likely be reverted in glib, let's stop using it.
2014-06-24 15:17:09 -04:00
Jasper St. Pierre
8c74a4fee0 messageTray: Remove an unused variable 2014-06-12 13:58:13 -04:00
Jasper St. Pierre
234b90ac86 messageTray: Don't use a member variable when we can use a local
Tiny cleanup.
2014-06-12 13:31:39 -04:00
Jasper St. Pierre
094669baee messageTray: Clear the pointer left timeout when showing a notification
When the pointer leaves the notification area, we queue a timeout to
hide the notification after a little while. If the user is hovering over
a notification and clicks the X button to close the notification, we will
destroy the notification, which causes a "pointer left" event on the
notification area. This queues a timeout which erroneously fires after
the next notification in the queue shows up.

The code and state machine are too complex to properly make sure this
timeout doesn't fire when there is no notification up next, so instead
just clear it when showing a notification to make sure that any
previously queued timeout doesn't apply to us.

https://bugzilla.gnome.org/show_bug.cgi?id=731118
2014-06-02 17:39:52 -04:00
Jasper St. Pierre
f6b5385495 messageTray: Squash together some duplicated code
https://bugzilla.gnome.org/show_bug.cgi?id=731118
2014-06-02 17:39:51 -04:00
Jasper St. Pierre
524e2df708 messageTray: Don't exit out early if we have a left timeout
Otherwise, we won't mark the pointer as hovering on the notification.

https://bugzilla.gnome.org/show_bug.cgi?id=731118
2014-06-02 17:39:51 -04:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Jasper St. Pierre
c675c93733 messageTray: Set the state to SHOWN when the notification is updated
If the notification is updated while SHOWING, we'll overwrite the
tween updating it to the new 'y' position, but forget to update the
state to SHOWN at the end of our transition. Make sure to always set
the state to SHOWN at the end.

https://bugzilla.gnome.org/show_bug.cgi?id=704844
2014-03-14 11:13:17 -04:00
Giovanni Campagna
057a026ea4 MessageTray: don't destroy notifications when the user presses ESC
Doing so is inconsistent with the behavior in the summary, and
is quite annoying when dealing with chats (because there is no way
to unfocus a chat notification with the keyboard only)

https://bugzilla.gnome.org/show_bug.cgi?id=724178
2014-03-12 19:33:35 +01:00
Adel Gadllah
b4ee86955d messageTray: Make sure that the source actor is square
Commit b7e1539699 removed the size to support hidpi but that caused the
actor to no longer be square. Fix that by going back to setting a size
but apply the scale factor before doing so.
2014-02-26 18:15:38 +01:00
Cosimo Cecchi
b7e1539699 messageTray: don't force a size on SourceActor's iconBin
Supports hidpi icons this way.

https://bugzilla.gnome.org/show_bug.cgi?id=724607
2014-02-18 07:46:54 -08:00
Carlos Soriano
598f750859 messageTray: Add source actor without count label
Split the current implementation of SourceActor into
SourceActor and SourceActorWithLabel.
In this manner we can use source actors withouth count labels,
required in the screenShield to not clash with the count
text label.

https://bugzilla.gnome.org/show_bug.cgi?id=709275
2014-02-17 13:22:39 +01:00
Giovanni Campagna
3227d4f3ed ShellApp+ShellGlobal: unify app launch context code
Extend shell_global_create_app_launch_context() with the required
parameters and use that for shell_app_launch() too.

https://bugzilla.gnome.org/show_bug.cgi?id=669603
2014-01-19 18:51:48 +01:00
Giovanni Campagna
5413010c60 Notification: don't expand the content on a destroyed notification
If the notification is destroyed between an allocate and the redraw,
the meta_later is invoked on a destroyed object, and fails because
the clutter calls are invalid at that point.

https://bugzilla.gnome.org/show_bug.cgi?id=722547
2014-01-19 15:59:18 +01:00
Giovanni Campagna
bfb0235fc6 Remove our custom hashmap implementation
gjs uses Spidermonkey 24, which implements Map from the ES6
specification, so we can use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=722210
2014-01-15 00:55:00 +01:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
751a3f0e94 js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Jasper St. Pierre
e34e681157 messageTray: Fix style 2013-12-05 01:32:28 -05:00
Jasper St. Pierre
acd543fe4b messageTray: Fix style
We're missing a semi here
2013-12-04 20:51:10 -05:00
Jasper St. Pierre
b52e74b615 messageTray: Remove transient sources
As far as I can tell, the only behavior change of a transient source
is that they auto-destroy after viewing their summary box pointer.
Since all transient sources are only associated with transient
notifications, it seems that we can never get to their summary box
pointer in the first place! Remove support for this.

https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-12-04 20:25:28 -05:00
Jasper St. Pierre
c89af0cea4 messageTray: Only attempt to grab the summary box pointer after showing it
For mysterious reasons I'm not sure of myself, navigate_focus will only focus
mapped actors. So, make sure the widget is showing before navigating to it.

https://bugzilla.gnome.org/show_bug.cgi?id=709853
2013-12-04 11:22:55 -05:00
Jasper St. Pierre
9d3a109946 messageTray: Reword a boolean condition
Just so it's a bit easier to understand...
2013-12-04 11:22:55 -05:00
Jasper St. Pierre
079f1e6fff messageTray: Fix style 2013-12-04 11:22:55 -05:00
Jasper St. Pierre
87f0e79749 messageTray: Prevent reentrancy issues in _updateState
The methods we call in _updateState may not be reentrant, so make
sure that we never get into a situation where _updateState, through
some crazy chain of events, calls itself.

https://bugzilla.gnome.org/show_bug.cgi?id=711694
2013-11-17 12:06:38 -05:00
Jasper St. Pierre
fe05d35bbb messageTray: Fix style 2013-11-15 10:39:30 -05:00
Jasper St. Pierre
4ba8518462 messageTray: Use a regular tween when expanding the notification
When a notification becomes expanded, it's either already shown,
or in the process of being shown. Don't set the state to SHOWING
again, which confuses our state machine.
2013-11-04 14:25:29 -05:00
Jasper St. Pierre
143dfb6246 messageTray: Simplify code
If notificationRemoved, then mustClose is true, so we don't need to
double-check for this.
2013-11-04 14:16:28 -05:00
Florian Müllner
4b09d57ec2 Fix fallout from notification changes
Commit 5f081b8f8d moved code without moving a helper function
used.

https://bugzilla.gnome.org/show_bug.cgi?id=710596
2013-10-25 14:15:10 +01:00
Jasper St. Pierre
8ee0ef2cde messageTray: Don't always open the source when clicking on the notification
Some consumers may not always want to open the app, so make clients that
want to do this explicitly connect to the 'clicked' signal.

https://bugzilla.gnome.org/show_bug.cgi?id=710137
2013-10-21 12:30:25 -04:00
Jasper St. Pierre
43f4682ec4 messageTray: Make addButton/addAction take a callback
This is a much simpler API for consumers to manage.

https://bugzilla.gnome.org/show_bug.cgi?id=710137
2013-10-21 12:30:25 -04:00
Jasper St. Pierre
5f081b8f8d messageTray: Remove useActionIcons feature
This can be put in the legacy notification daemon with the new
addButtonFull API, to create icon names for actions.

https://bugzilla.gnome.org/show_bug.cgi?id=710137
2013-10-21 12:30:25 -04:00
Jasper St. Pierre
5023542882 messageTray: Split out addButton to allow consumers to pass a pre-made button
Some consumers may want to construct their buttons specially, so allow them
to do that by adding a new API that takes a button instead of a label.

https://bugzilla.gnome.org/show_bug.cgi?id=710137
2013-10-21 12:30:25 -04:00
Jasper St. Pierre
88d0731d80 messageTray: Replace setButtonSensitive by simply returning the button
We want to remove 'id's from buttons, and simply returning the button actor
is more powerful anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=710137
2013-10-21 12:30:25 -04:00
Jasper St. Pierre
f72f39bc26 messageTray: Only try to focus the summary when summoning the tray by <Super>M
Otherwise, when closing the tray, we'll try to focus an actor, which will
focus the stage window, which will drop the focus from whatever window we
already had focused.

https://bugzilla.gnome.org/show_bug.cgi?id=710347
2013-10-17 13:07:42 -04:00
Jasper St. Pierre
96aa33f4ef messageTray: Don't remove and re-add the focus group on button changes
https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-10-14 15:24:53 -04:00
Jasper St. Pierre
25fd23e703 messageTray: Split out the notification's destroy handler
This is complex enough to split out.

https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-10-14 15:24:53 -04:00
Jasper St. Pierre
99cf4e5787 messageTray: Only connect to a notification's open/destroy once
If we pushNotification the same notification multiple times, we
won't append it to the array again, but we will attach multiple
handlers needlessly.

https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-10-14 15:24:53 -04:00
Jasper St. Pierre
66a4cb5875 messageTray: Move the notification policy classes here
The NotificationDaemon really should be for the hookup of remote
notifications, rather than policies.

https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-10-14 15:24:53 -04:00
Jasper St. Pierre
da14e2c349 messageTray: Clean up code that determines if something is clearable
https://bugzilla.gnome.org/show_bug.cgi?id=710115
2013-10-14 15:24:53 -04:00
Giovanni Campagna
619389ed20 NotificationDaemon: fix icons for notifications without an app
NotificationDaemon doesn't pass a gicon to the Notification constructor,
because it calls .update() immediately after, so messageTray.js
calls into Source.createIcon(), which returns null and crashes.
Instead, shortcut the Notification constructor by skipping
.update() completely.

https://bugzilla.gnome.org/show_bug.cgi?id=709998
2013-10-13 01:23:18 +02:00