Commit Graph

431 Commits

Author SHA1 Message Date
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
Florian Müllner
6e9a2fea89 messageTray: Add 'Notifications' switch to tray menu
According to the designs, the notifications switch was supposed
to move from the user menu to the new message tray menu. However
so far the new system status implementation only removed the old
switch, so add it back in its new place now.

https://bugzilla.gnome.org/show_bug.cgi?id=707073
2013-10-10 23:13:47 +02:00
Florian Müllner
c8a07dd612 messageTray: Fix condition for adding the tray to CtrlAltTab
With the current condition, we wrongly add the message tray to
CtrlAltTab if we start up locked or as greeter.

https://bugzilla.gnome.org/show_bug.cgi?id=708380
2013-09-23 13:32:17 +02:00
Giovanni Campagna
11c2933e23 ShellGlobal: remove cursor manipulation functions
Use the new API in MetaScreen instead, which is automatically
routed to MetaCursorTracker as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=707467
2013-09-12 10:34:22 +02:00
Florian Müllner
aa6471b3cc messageTray: Reset clickedSummaryItem on ungrab
If we don't, we will pop up the summary again the next time
_updateState() is called.

https://bugzilla.gnome.org/show_bug.cgi?id=707600
2013-09-06 10:16:37 +02:00
Giovanni Campagna
e0574d2861 Replace GnomeIdleMonitor with MetaIdleMonitor
Now that GnomeIdleMonitor is a DBus API for mutter, we need to
use own in-process thing, to avoid dead locks.

https://bugzilla.gnome.org/show_bug.cgi?id=706005
2013-08-23 16:22:44 +02:00
Giovanni Campagna
6b8339e9b4 Lightbox: have animation times passed as parameters to show() and hide()
This way it is possible to use the same lightbox with different
times.

https://bugzilla.gnome.org/show_bug.cgi?id=699112
2013-08-20 21:52:04 +02:00
Jasper St. Pierre
d1a8177778 messageTray: Move the tray menu to a button
https://bugzilla.gnome.org/show_bug.cgi?id=699272
2013-08-19 09:35:09 -04:00
Jasper St. Pierre
1ec349f7c9 messageTray: Use the BoxPointer APIs for hiding without animating 2013-08-15 21:53:00 -04:00
Jasper St. Pierre
c4bc9616af messageTray: Remove code that happens on notification destruction 2013-08-15 21:52:59 -04:00
Jasper St. Pierre
de050991d4 messageTray: Remove the stackedNotification tracking complexity
We only have one signal left to track, but since it's destroy it
doesn't matter if it's disconnected or not since it will eventually
be GC'd.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
6521951e82 messageTray: Don't close the tray when responding to a notification stack
This is against the designed behavior.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
e818ddf152 messageTray: Clean up _updateState for the summary box pointer
This code still isn't great, but it's an improvement over what we
had before.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
b6499e5248 messageTray: Clean up _updateState for notifications
_updateState has a lot of variables that sort of gunk up the
code and make it more unreadable than need be. Clean up the logic
a lot by moving those variables into the places that they actually
matter, renaming them to remove prefixes, and remove some conditions
that are always met.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
3cb809b444 messageTray: Clean up the code that animates the notification
Right now the code chooses to animate based on whether or not the
notification was "removed", which is quite a sketchy subject. For
now, add an additional case so that we don't animate when we transition
to the lock screen.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
12b7e56261 messageTray: Remove an extraneous show
This means that the close button also does not have to be public.
2013-08-15 21:52:59 -04:00
Jasper St. Pierre
0007343175 messageTray: Remove dead code for updating the notification stack 2013-08-15 21:52:59 -04:00
Jasper St. Pierre
548111e2ff messageTray: Rename the context menu to the tray menu
https://bugzilla.gnome.org/show_bug.cgi?id=699272
2013-08-13 11:24:19 -04:00
Jasper St. Pierre
f5c0706c2e messageTray: Use a PopupMenuManager for the message tray context menu
https://bugzilla.gnome.org/show_bug.cgi?id=699272
2013-08-13 11:24:19 -04:00
Jasper St. Pierre
e6ef11575b messageTray: Move adding the menu actor to MessageTrayContextMenu
This matches BackgroundMenu and EntryMenu.

https://bugzilla.gnome.org/show_bug.cgi?id=699272
2013-08-13 11:24:19 -04:00
Jasper St. Pierre
30ff15ec0b messageTray: Remove support for titleMarkup, body, and bodyMarkup when updating
These features are unused.
2013-08-06 10:36:36 -04:00
Jasper St. Pierre
13ce39058d messageTray: Remove unused API 2013-08-06 10:36:36 -04:00
Jasper St. Pierre
4ed7f5eb67 messageTray: Remove a lot of dead signals 2013-08-06 10:36:36 -04:00
Jasper St. Pierre
2df0c02dfd messageTray: Remove some more dead code
It's impossible to have a clicked summary item if we have a main
notification or the tray is hidden, and has been ever since 3.6.
2013-08-06 10:36:36 -04:00
Jasper St. Pierre
158ca9746c messageTray: Remove some dead code
notificationClosed is never set.
2013-08-06 10:36:36 -04:00
Giovanni Campagna
ed0e880913 MessageTray: destroy notifications manually when the source is destroyed
Using a signal handlers causes us to depend on connection order, but
we need the message tray code to run last, so it can notice that
notifications are destroyed when hiding the boxpointer and skip
the broken animation.

https://bugzilla.gnome.org/show_bug.cgi?id=686855
2013-08-06 14:45:41 +02:00
Adel Gadllah
f4100ac507 message-tray: Really close notifications when the close button is clicked
When the user eclipictly closes a notification, we should really destroy
it not just move it to the tray.

https://bugzilla.gnome.org/show_bug.cgi?id=687016
2013-07-23 19:32:51 +02:00
Jasper St. Pierre
393577ee78 grabHelper: Remove explicitly having to select modal
https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 16:51:51 -04:00
Jasper St. Pierre
eef593a34e messageTray: Don't use focus grabs
We can easily implement much of the same behavior ourselves by
keeping track of Clutter's focus events. Reintroduce heavily
modified FocusGrabber to do the work for us.

This will temporarily break when the user selects a window until
we can make gnome-shell automatically set the stage focus.

This also removes our only use of focus grabs, so remove those
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 16:51:50 -04:00
Jasper St. Pierre
aa7ed319e9 messageTray: Ensure notifications are focused after they are expanded
If we focus notifications before they're expanded, the body and action
area won't be visible, and the can_focus members like the text entry
will not be able to be focused.

Ensure that all of the all actors that would be in an expanded notification
are visible before we attempt to focus them.

https://bugzilla.gnome.org/show_bug.cgi?id=698778
2013-06-21 15:32:14 -04:00
Florian Müllner
365cda386c messageTray: Fix lightbox outside the overview
Commit d0310bd745 blindly replaced global.overlay_group with
Main.layout.overviewGroup, but unlike the former, the latter is
hidden while the overview is not active, which makes it unsuitable
for the message tray's light box. In fact, with the removal of
global.overlay_group, there is no longer a container which may
be used both inside and outside the overview, so we can either
recreate the lightbox each time we show/hide the overview, or
use different lightboxes altogether; this opts for the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=701097
2013-05-28 16:33:47 +02:00
Rui Matos
51bca08386 messageTray: Check if the clicked summary item has a right click menu
Commit e71129aa68 introduced the
possibility of having summary items without a right click menu so we
should check for one before trying to show it.

https://bugzilla.gnome.org/show_bug.cgi?id=700190
2013-05-27 14:05:54 +02:00
Jasper St. Pierre
991ed2da72 messageTray: Fix a stuck grab related to bubble notifications
If the user middle clicks on a summary item in the tray, we'll
try to grab null instead of an actor, which is wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=700854
2013-05-24 13:29:07 -04:00
Jasper St. Pierre
f73a01295c messageTray: Don't destroy a notification from within its destroy handler
Nothing but bad can come from this.

https://bugzilla.gnome.org/show_bug.cgi?id=700923
2013-05-23 18:25:39 -04:00
Giovanni Campagna
d0310bd745 Overview: don't use the overlay_group
It's a deprecated concept, and we want to have our own actor
that we can add to the chrome to handle the input region.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-21 22:24:53 +02:00
Giovanni Campagna
35c665156b Fix bad rebase
A variable rename was missed.
2013-05-21 22:23:18 +02:00
Jasper St. Pierre
d5f95db68d messageTray: Hide notifications when the tray is summoned
If the user summons the tray, it should take priority over a
notification showing.

https://bugzilla.gnome.org/show_bug.cgi?id=700639
2013-05-20 14:25:55 -04:00
Jasper St. Pierre
d96726c392 messageTray: Add a synonym for hasNotifications
This prevents lines from getting too long.

https://bugzilla.gnome.org/show_bug.cgi?id=700639
2013-05-20 14:25:55 -04:00