Commit Graph

509 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
d1c54f55e6 messageTray: Don't hide the tray for urgent notifications
The tray should never close on its own, without the user's input.

https://bugzilla.gnome.org/show_bug.cgi?id=700639
2013-05-20 14:25:55 -04:00
Jasper St. Pierre
176a73f4e9 messageTray: Clean up variable names
Variable names like "sourceNotificationStackDoneShowing" are too
long, and too undescriptive: this one points to a source, not a
notification stack that has been done showing.
2013-05-20 13:38:23 -04:00
Giovanni Campagna
ed76b54511 MessageTray: fix typo 2013-05-13 23:41:16 +02:00
Giovanni Campagna
fa44dc7d16 MessageTray: don't list the sources all the time
The point of a hash table is that you don't need to list all the
elements. To avoid that, keep a "clearableCount" in MessageTray,
which can be used by the message tray menu to show and hide the
clear item, and that is updated in constant time when sources
are added or removed.

https://bugzilla.gnome.org/show_bug.cgi?id=700194
2013-05-12 21:06:34 +02:00
Giovanni Campagna
ae6d7bbfa3 MessageTray: actually respect other components acking notifications
If a notification is marked acknowledged from outside, filter it
out from the queue.

https://bugzilla.gnome.org/show_bug.cgi?id=698812
2013-05-12 20:19:06 +02:00
Owen W. Taylor
9ae2440ec1 Remove LayoutManager::fullscreen-changed
Since we now have global.screen::in-fullscreen-changed, remove the
duplicate signal. To prevent ordering problems in connecting to
this signal, make inFullscreen a property-function of a new Monitor
object rather than a data property we tack on to a Rectangle object.

https://bugzilla.gnome.org/show_bug.cgi?id=649748
2013-04-29 11:17:29 -04:00
Jasper St. Pierre
fdae613b14 messageTray: Take modal grabs for the context menu and notification boxpointer
As the context menu and notification boxpointer can only appear if we already
take a modal grab, grabFocus will have problematic results if the focus does
somehow change.

https://bugzilla.gnome.org/show_bug.cgi?id=698483
2013-04-23 16:33:13 -04:00
Jasper St. Pierre
b5c85eaeca messageTray: Fix a regression from 1b13509
It seems this rename somehow got lost in a rebase.
2013-04-22 19:22:33 -04:00
Jasper St. Pierre
811ee1d989 Revert "messageTray: Don't show the context-menu when the tray isn't open"
This reverts commit 1bce210c51.
2013-04-19 13:38:41 -04:00
Jasper St. Pierre
8c32102e99 messageTray: Move the notification actor out of the tray
Putting the notification actor in the tray actor has caused a lot
of various bugs and glitches over the years related to syncing the
two, fizzling out events, and so on. It's a much simpler model if
we consider the notification actor and tray to be separate widgets.

As a side effect, this makes the context menu not pop up when we
right-click on notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=695800
2013-04-19 13:38:41 -04:00
Jasper St. Pierre
1b135095c7 messageTray: Move hover tracking to the notification widget
This does nothing while the tray is active, so it doesn't make sense
to track it on the tray. This also makes the code a lot easier to read,
with notification behavior being labeled "notification" rather than
"tray".

https://bugzilla.gnome.org/show_bug.cgi?id=695800
2013-04-19 13:38:41 -04:00
Jasper St. Pierre
1bce210c51 messageTray: Don't show the context-menu when the tray isn't open
https://bugzilla.gnome.org/show_bug.cgi?id=697709
2013-04-15 12:49:30 -04:00
Jasper St. Pierre
dc54472ca5 messageTray: Remove some dead positioning code
We don't modify the tray box's anchor position, so this shouldn't
ever get called.

https://bugzilla.gnome.org/show_bug.cgi?id=695800
2013-03-14 17:18:20 -04:00
Jasper St. Pierre
4771f80d6f messageTray: Remove the tray left timeout when showing a new notification
https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:53 -04:00
Jasper St. Pierre
91405583fd messageTray: Fizzle out hover notifications where the values are the same
notify::* doesn't guarantee that the value has changed, only that it
may have been. We need to ensure that we track the old value to make sure
we don't do things like overwrite timeouts if they already exist.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:52 -04:00
Jasper St. Pierre
f864303aac messageTray: Remove summary state management
Now that the tray is modal, the summary is tied to the tray,
and we don't need to have separate states for the tray and
summary. This also removes the nearly invisible opacity tween
on the summary items when opening the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:52 -04:00
Jasper St. Pierre
e5ebf4a2b2 messageTray: Remove locking
The only way that locking happens is with when the summary box
pointer is active. As it can only happen if the summary state
is active, it's impossible for a notification to be expired,
or the summary to be hidden while it's showing.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:52 -04:00
Jasper St. Pierre
725a36e37a messageTray: Use the bottom monitor's fullscreen state for rate limiting
It makes more sense to use the monitor the tray is on, rather than the
primary monitor. This also matches us with whether we can open the tray
from a barrier/dwell or not.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:51 -04:00
Jasper St. Pierre
78dacfa865 messageTray: Fix idle tracking condition
The user is active if they have less than IDLETIME, not if
they have more than it.

This fixes an issue where notifications may never go away.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:51 -04:00
Jasper St. Pierre
16547fb3c2 messageTray: Clean up code a tiny bit
Remove some duplication by reusing a method.

https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:51 -04:00
Jasper St. Pierre
9eeabf79f9 messageTray: Fix style
https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:51 -04:00
Jasper St. Pierre
81b71cc143 messageTray: Remove a few leftover variables
https://bugzilla.gnome.org/show_bug.cgi?id=695659
2013-03-12 11:58:50 -04:00
Jasper St. Pierre
73fa4b1cbd messageTray: Don't open by pressure when we have a full-screen window open
When we have a full-screen window open, we expect the app to get all of
the chrome, so we should disable the bottom barrier as well.

https://bugzilla.gnome.org/show_bug.cgi?id=694997
2013-03-10 12:00:09 -04:00
Jasper St. Pierre
5679e6b3a9 layout: Construct the primary monitors's hot corner, too
This cleans up the code considerably, and makes it so that
one path creates all hot corners for all monitors. Why this
wasn't done originally, I have no clue...

The one complication is debouncing if the button and hot corner
are triggered in rapid succession, so we just move this tracking
to the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=663661
2013-03-04 15:50:45 -05:00
Cosimo Cecchi
bdbea2463b messageTray: add an indicatorCount property
This filters out resident and transient notifications in the normal
case, but just returns the number of unread messages for the Telepathy
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=687787
2013-03-01 13:17:51 -05:00
Cosimo Cecchi
8fb2263471 messageTray: emit a signal when we're showing or hiding
This will be useful in a future commit.

https://bugzilla.gnome.org/show_bug.cgi?id=687787
2013-03-01 13:17:51 -05:00
Jasper St. Pierre
9525216d78 messageTray: Fix warning when opening the tray
As the tray hover handler will call _cancelTrayDwell, we need to
ensure this variable is initialized even if tray dwelling isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=694336
2013-02-21 11:56:33 -05:00
Jasper St. Pierre
28a71a29e6 Revert "messageTray: Fix warning when opening the tray"
This reverts commit 7b06d34ba4.

https://bugzilla.gnome.org/show_bug.cgi?id=694336
2013-02-21 11:52:20 -05:00
Jasper St. Pierre
7b06d34ba4 messageTray: Fix warning when opening the tray
As the tray hover handler will call _cancelTrayDwell, we need to
ensure this variable is initialized even if tray dwelling isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=694336
2013-02-21 11:40:49 -05:00
Florian Müllner
f21b8206af messageTray: Move makeCloseButton() into Util
The function is useful for other modules as well, so move it to a
more generic place.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Adel Gadllah
b292384380 messageTray: Animate the context menu
Use animation for opening and closing the menu.
2013-02-18 22:00:39 +01:00
Adel Gadllah
01ac5aeb0d messageTray: Use 'Clear Message' instead of 'Clear for the context menu 2013-02-18 21:59:48 +01:00
Jasper St. Pierre
ee62863759 messageTray: Don't allow opening while entering/leaving the overview
The complex overview transition code means that there's no easy
way to handle with this right now. Blocking the message tray
while the overview is animating seems like the correct thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=694038
2013-02-18 14:42:44 -05:00
Jasper St. Pierre
4a3a61bea1 messageTray: Jiggle some code around
This is to put state management with state management

https://bugzilla.gnome.org/show_bug.cgi?id=694038
2013-02-18 14:42:44 -05:00
Jasper St. Pierre
f3901eb668 messageTray: Drop more special overview handling
https://bugzilla.gnome.org/show_bug.cgi?id=694038
2013-02-18 14:42:44 -05:00
Jasper St. Pierre
b53d1df4df messageTray: Re-add the hotcorner when the panel is updated
The activities button may come and go at any moment now that we
have a dynamic panel. We need to re-check the activities button
whenever the panel is updated.

https://bugzilla.gnome.org/show_bug.cgi?id=694038
2013-02-18 14:42:44 -05:00
Jasper St. Pierre
4cf09f46e7 messageTray: Fix indentation 2013-02-18 04:37:21 -05:00
Adel Gadllah
9a30c3d722 messageTray: Allow dwell to work in the overview
Special case the overview in _trayDwellTimeout because the
tray is hidden by default in the overview now.
2013-02-17 20:16:52 +01:00
Cosimo Cecchi
060c049056 messageTray: remove overview special handling
Don't show the message tray in the overview by default. From now on the
message tray in overview behaves as regularly, i.e. it will slide up the
overview on Super+M keypress.

https://bugzilla.gnome.org/show_bug.cgi?id=693987
2013-02-17 13:12:54 -05:00
Giovanni Campagna
07676d483d MessageTray: don't clear the banner text when adding to the body
ScreenShield uses Notification.bannerBodyText to fill the body of detailed
notifications, so use a separate boolean property to indicate it was already
added to the body.

https://bugzilla.gnome.org/show_bug.cgi?id=693822
2013-02-17 14:53:41 +01:00
Adel Gadllah
b611ddda5e messageTray: Close menu when clicking outside of the menu 2013-02-16 19:55:59 +01:00
Adel Gadllah
186bd156dd messageTray: Allow opening the context menu on long press
Right click does not work for touch devices, so support opening the menu
using long press as well.

https://bugzilla.gnome.org/show_bug.cgi?id=693887
2013-02-16 19:37:26 +01:00
Jasper St. Pierre
261fbef516 Update to new GnomeIdleMonitor API
https://bugzilla.gnome.org/show_bug.cgi?id=688227
2013-02-15 09:13:02 +01:00
Giovanni Campagna
c30661c44c NotificationDaemon: support sound in notifications
The notifications spec has two hints for playing a sound, sound-file
and sound-name. We can support them using the existing code that
wraps libcanberra.

https://bugzilla.gnome.org/show_bug.cgi?id=642831
2013-02-14 18:54:08 +01:00
Florian Müllner
a534a6bf09 messageTray: Always hide while the OSK is up
The message tray currently operates in three modes: in the overview,
normal, and while the on-screen keyboard is up. The last case is
particularly odd, and exclusively used for chat-notifications. As
users can still use the Chat application directly on touch-only
devices, the additional mode isn't really justified, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=662687
2013-02-14 17:31:32 +01:00
Adel Gadllah
2138fc2349 messageTray: Make clear item insensetive when there is nothing to clear
There is no point in having a menu entry that does nothing so set the item
to insensitive when there are no items to clear.
2013-02-13 13:12:03 +01:00
Adel Gadllah
9133f6d352 messageTray: Add context menu
Add a context menu to the tray that allows cleaning up sources
and open the notification settings panel.

https://bugzilla.gnome.org/show_bug.cgi?id=691035
2013-02-12 08:39:21 +01:00
Jasper St. Pierre
fb63f48d0a layout: Trigger the message tray by downward pressure
A pressure barrier is a barrier that activates after the user pushes
against the bottom of the screen in a short time. Implement this using
the new XInput 2.3 features that provide extended information about
pointer barriers, and use it so that pushing against the bottom of
the screen edge brings up the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:28:11 -05:00
Jasper St. Pierre
e614b993f2 messageTray: Remove tray dwelling if we have new barrier features
If we have the new barrier features, then we should not activate the
old tray dwelling mechanism.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:27:42 -05:00
Florian Müllner
7f587fd4da messageTray: Add 'source-removed' signal
While it is possible to keep track of removed sources by tracking
their summary items' actor:.destroy signal, a dedicated signal
mirroring the existing 'source-added' one is more convenient.

https://bugzilla.gnome.org/show_bug.cgi?id=693220
2013-02-05 19:54:17 +01:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Giovanni Campagna
8cb3884fae ScreenShield: decouple detailed notifications from resident notifications
The designs says that only music notifications should be shown in full
in the screenshield, the others should be either shown as a summary or
with very light details.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Giovanni Campagna
098bd4509b MessageTray: introduce configurable per-source notification policy
Allow message tray sources to provide a NotificationPolicy object,
that will configure how and if the source is displayed. For notification
daemon sources, this object is hooked to GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Giovanni Campagna
b150869b51 MessageTray: clean up source tracking
Use the new Hash.Map class, and store signal connections along with
the source and summaryItem. This allows to remove sources without destroying
them.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Giovanni Campagna
4545719e18 MessageTray: disconnect signal to notification early
Similar to the previous patch, this adds robustness and prevents more
stacktraces and confusion in the state machine.

https://bugzilla.gnome.org/show_bug.cgi?id=692693
2013-01-28 21:02:46 +01:00
Giovanni Campagna
cc60afa31a Disconnect content-updated signal early
During the box pointer animation, other events can trigger an updateState,
losing the information that the summary is hiding and thus never disconnecting
the signals. Then, this stale connections can cause stacktraces, as they
fire when summaryBoxPointerItem is null.

https://bugzilla.gnome.org/show_bug.cgi?id=692693
2013-01-28 21:02:45 +01:00
Giovanni Campagna
85743ede7e MessageTray: fix reentrancy problem in hideNotificationCompleted
Hiding notificationWidget with a telepathy notification causes
unfocused to be emitted, which causes a reentrant updateState.
If another notification is queued, it is shown before the old
one is cleared.

https://bugzilla.gnome.org/show_bug.cgi?id=683986
2013-01-28 21:02:45 +01:00
Giovanni Campagna
9aa84ec54a MessageTray: restore symbolic icons to notification buttons
These were lost when we moved away with StIconType. The idea was that
apps needed to include -symbolic in their action IDs, but apps were
not updated, and it never makes sense to have non symbolic icons there,
so let's restore the previous behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=692091
2013-01-19 19:41:24 +01:00
Giovanni Campagna
91a6520c3b MessageTray: don't show expanded content when the notification is collapsed
This fixes the image and scrollbars peeking through in banner mode,
because StTable wasn't able to allocate them at the restricted height
imposed by CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=692091
2013-01-19 19:41:23 +01:00
Giovanni Campagna
484ef5f2f6 MessageTray: simplify image handling
Remove duplicate checks before calling unsetImage, and set properties
directly in the constructor.

https://bugzilla.gnome.org/show_bug.cgi?id=692091
2013-01-19 19:41:23 +01:00
Giovanni Campagna
df2cab877f MessageTray: wait until the tray is hidden to switch styles
Switching style on Overview::hiding creates a weird effect, as the noise
texture is shown while the overview is still visibile. Instead, wait for
the tray to be fully hidden, then apply the new style.
As now the switch is invisible, there is no need for the transition
(which introduced the same problem on overview showing)

https://bugzilla.gnome.org/show_bug.cgi?id=689091
2013-01-18 21:07:12 +01:00
Giovanni Campagna
59ecd610b1 MessageTray: pass keyboard events to tray icons
Synthetize XKeyEvents for clicks emulated by StButton using Return or
Space.

https://bugzilla.gnome.org/show_bug.cgi?id=687425
2013-01-18 20:53:20 +01:00
Jasper St. Pierre
42c1285ead messageTray: Remove code for ignoring num lock / scroll lock
Clutter now ignores these masks, so we can remove code that depends
on this.

https://bugzilla.gnome.org/show_bug.cgi?id=691731
2013-01-18 14:25:32 -05:00
Jasper St. Pierre
155f9dc1b1 messageTray: Support setImage(null) to mean unsetImage()
This is a quick API change that should clean up some conditionals.

https://bugzilla.gnome.org/show_bug.cgi?id=680414
2012-12-30 14:09:39 -05:00
Cosimo Cecchi
bdf0a6fd0b message-tray: use a style class for summary-mode actor
We want to use the same style class for the message tray ghost.

https://bugzilla.gnome.org/show_bug.cgi?id=690174
2012-12-13 17:56:22 -05:00
Rui Matos
c11f89e72a messageTray: Don't add ourselves more than once to CtrlAltTabManager
This way _sessionUpdated() can be called multiple times without side
effects.

https://bugzilla.gnome.org/show_bug.cgi?id=689959
2012-12-10 11:50:05 +01:00
Jasper St. Pierre
b39f56e813 messageTray: Remove an unused instance variable 2012-12-03 16:06:34 -05:00
Giovanni Campagna
961dba7faa MessageTray: don't close the tray when interacting with the right click menu
If the chosen action is not open, the tray should not be closed, to
let the user further interact with it (for example to mute or remove
more sources)

https://bugzilla.gnome.org/show_bug.cgi?id=689296
2012-11-30 18:43:57 +01:00
Giovanni Campagna
41f933b89e MessageTray: fix notification height expansion
MessageTray._tween removes all tweens now, so it removes also
those setting the height to expanded for critical notifications.

This is a regression from 1a27d7dfc0

https://bugzilla.gnome.org/show_bug.cgi?id=689295
2012-11-30 18:42:18 +01:00
Giovanni Campagna
1a27d7dfc0 MessageTray: remove all tweens when tweening for state parameters
MessageTray._tween sets the state variable to the in-progress value,
so it must be sure that at the end of the animation the value will
be the corresponding final and nothing else will happen in between.

https://bugzilla.gnome.org/show_bug.cgi?id=683986
2012-11-26 18:16:50 +01:00
Giovanni Campagna
81cd1e6c40 MessageTray: be explicit about removing tweens
Turns out that tweener has a very complex logic to decide when a new
tween on the same properties overrides completely the old, and unfortunately
what we were doing was not enough in all cases.
Just be explicit, and don't let anything else mess with the state.

https://bugzilla.gnome.org/show_bug.cgi?id=688895
2012-11-22 21:36:17 +01:00
Giovanni Campagna
b59529e579 MessageTray: fix closing the right click menu
We were trying to disconnect a signal we never added.

https://bugzilla.gnome.org/show_bug.cgi?id=688771
2012-11-21 12:29:43 +01:00
Giovanni Campagna
3b70094151 MessageTray: fix popping up after there were modals
Open a modal dialog, try to open the message tray -> no effect, the message
tray is blocked by the dialog.
Close the dialog, try to open the message tray by pointer -> still
no effect, because the old timeout id was not cleared the first time,
so the dwell callback thinks the tray is about to open.

https://bugzilla.gnome.org/show_bug.cgi?id=688750
2012-11-20 20:04:30 +01:00
Giovanni Campagna
8a7c0313f6 Layout: show the OSK on the monitor where the focused window lives
In multimonitor scenarios, it makes sense to show the OSK close to
the window that will actually receive keystrokes.

https://bugzilla.gnome.org/show_bug.cgi?id=685856
2012-11-20 17:57:24 +01:00
Stéphane Démurget
5e3111bad8 ctrl-alt-tab: use better icons
The top panel and message tray icons were by default a gnome foot and
are replaced by better ones. The applications icon is now using the
symbolic apps icon of the dash, and the windows icon is also improved.

https://bugzilla.gnome.org/show_bug.cgi?id=641303
2012-11-20 11:42:04 +00:00
Victoria Martínez de la Cruz
a327c10c60 Add 'No Messages' label when message tray is empty
To avoid confusion in new users, a 'No Messages' label is shown when messages
tray is empty.

https://bugzilla.gnome.org/show_bug.cgi?id=686738
2012-11-20 09:36:47 +00:00
Sebastian Keller
d053d45a6d messageTray: don't accidentally shift the tray around in the overview
https://bugzilla.gnome.org/show_bug.cgi?id=688422
2012-11-20 01:06:47 +01:00
Alban Browaeys
1a1215527f messageTray: restore toggle tray in normal mode (non overview)
https://bugzilla.gnome.org/show_bug.cgi?id=688507
2012-11-20 00:01:39 +01:00
Giovanni Campagna
b121c25184 MessageTray: restore opacity when expanding a notification
MessageTray tweens both opacity and y to hide or show _notificationWidget,
but only y when expanding it. This means that an existing tween to hide
the notification will continue running, clearing the notification state.
If the hiding one completes before the showing one, the onComplete handler
will throw an exception (because the notification was nullified) and
therefore break the state tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=683986
2012-11-19 19:20:31 +01:00
Florian Müllner
2434af7e8a messageTray: Make toggle-message-tray available when up
It makes so much sense that the setting even has 'toggle' in its name.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:51 +01:00
Florian Müllner
b58f502dd6 main: Add optional keybindingMode parameter to pushModal()
For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Giovanni Campagna
809544800b MessageTray: fix reentrancy when calling out to the grab helper
Similar to 683546. I'm not sure where this bug lives, but let's make
the code robust.

https://bugzilla.gnome.org/show_bug.cgi?id=683986
2012-11-10 17:36:00 +01:00
Stéphane Démurget
f30dcad8a7 messageTray: Close the notification on Escape
Now that the notifications can be focused with the keyboard, it's
important we can close the active one also this way.

https://bugzilla.gnome.org/show_bug.cgi?id=652082
2012-11-08 21:19:52 +01:00
Stéphane Démurget
7dc235511e messageTray: Add a notification focus keybinding
At the moment, only the mouse can be used to focus and answer a chat
notification.

This adds a new keybinding (defaults to <Super>+n) to focus and expand
the active notification.

https://bugzilla.gnome.org/show_bug.cgi?id=652082
2012-11-08 15:46:16 +01:00
Stéphane Démurget
39d9838cc1 Show feedback notifications when the user is busy
Notifications that are created in response to direct user actions like
"is ready" or "'foo' has been removed from favorites" should always be
displayed even though the user has marked him/herself busy.

https://bugzilla.gnome.org/show_bug.cgi?id=662900
2012-11-02 19:25:26 +01:00
Florian Müllner
81eeef7d3c messageTray: Hide summary notification immediately when closing the tray
When the summary notification is open when the tray is closed, we end
up with two concurrent animations: the notification fading out, and the
tray moving away from underneath it. Sliding out the tray should be the
primary transition here, so hide the notification immediately to not
draw the user's attention away from it.

https://bugzilla.gnome.org/show_bug.cgi?id=686888
2012-10-25 22:45:36 +02:00
Florian Müllner
a7b5134820 messageTray: Hide notification close button immediately on click
Having the close button move away from under the pointer after
clicking it is confusing and distracts from the main transition,
which is hiding the notification. Just hide it immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=682237
2012-10-25 22:41:32 +02:00
Jasper St. Pierre
92a01c67ba messageTray: Don't destroy the notification when clicking on the close button
Clicking on the close button should simply hide the notification.

https://bugzilla.gnome.org/show_bug.cgi?id=682237
2012-10-25 22:41:32 +02:00
Jasper St. Pierre
71c23613b5 messageTray: Only hide the notification stack on clicking close
Rather than destroying the entire source, which is unintuitive, simply
close the notification. Removing the entire source is still possible
by right-clicking on the summary item and choosing "Remove".

https://bugzilla.gnome.org/show_bug.cgi?id=682237
2012-10-25 22:41:05 +02:00
Jasper St. Pierre
4f876995de messageTray: make SummaryItem._closeButton public
Use this to show/hide the close button instead of closeButtonVisible.

https://bugzilla.gnome.org/show_bug.cgi?id=682237
2012-10-25 21:45:18 +02:00
Florian Müllner
3a453c5f73 messageTray: Fix lightbox
Commit 448517032e accidentally reverted the condition for showing
the lightbox. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=686728
2012-10-24 09:03:12 +02:00
Jasper St. Pierre
d106191e6a Port to GnomeIdleMonitor
https://bugzilla.gnome.org/show_bug.cgi?id=682224
2012-10-22 12:06:45 -04:00
Jasper St. Pierre
31ea3f737c messageTray: Remove hack for the lack of negative units in libcroco
libcroco now has native support for negative units.

https://bugzilla.gnome.org/show_bug.cgi?id=686240
2012-10-18 12:50:49 -04:00
Jasper St. Pierre
1496ba0bbd messageTray: Clean up "TODO" code
The code here says to remove it after the GNOME3 release. Better late
than never.
2012-10-16 12:20:46 -04:00
Jasper St. Pierre
f5974f6793 messageTray: Primarily use a GIcon to drive the source's icon
This is a bit of a cleanup since we ported notification icons/secondary
icons to be in the same situation.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-10-16 12:14:16 -04:00
Jasper St. Pierre
928ea3bb01 messageTray: Use a GIcon for a notification's icon/secondary icon
Using a GIcon instead of an actor means that we can always create
a new icon with the right size from an old icon.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-10-16 12:14:16 -04:00
Florian Müllner
5bfcc5392d messageTray: Reset summary after losing focus to outside actor
Currently when the summary boxpointer is ungrabbed automatically
because the keyboard focus was moved outside the message tray
(for instance by selecting the overview search entry or opening
the right-click menu of a dash item), after the popup is hidden
_updateState() will grab focus and show the popup again.
Work around this by unsetting the clicked summary item when losing
focus to an actor outside the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=685156
2012-10-11 14:28:42 +02:00
Florian Müllner
d2e830cce3 messageTray: Do not add the tray unconditionally to ctrl-alt-tab
Commit 448517032e added the message tray unconditionally to
the Ctrl-Alt-Tab popup, but while this makes sense for a normal
session, we do not want it in the login screen.
Be a bit more careful where we make the tray available.

https://bugzilla.gnome.org/show_bug.cgi?id=685914
2012-10-11 08:00:55 +02:00
Jasper St. Pierre
be24ee435c messageTray: Clean up and consolidate code for tween completion
https://bugzilla.gnome.org/show_bug.cgi?id=685341
2012-10-06 16:07:52 -03:00
Jasper St. Pierre
9fac285b69 messageTray: Fix some artifacts when tweening back from the tray
The math to calculate the clip isn't quite right here -- it overcompensates
in the Y value.

https://bugzilla.gnome.org/show_bug.cgi?id=685341
2012-10-06 16:07:42 -03:00
Jasper St. Pierre
7d6c85be42 messageTray: Don't animate the desktop clone for a failed tray grab
If we fail to grab for the message tray, we shouldn't be animating
the desktop clone. This is a regression from commit fe124e6.

https://bugzilla.gnome.org/show_bug.cgi?id=685342
2012-10-04 04:02:16 -03:00
Jasper St. Pierre
448517032e messageTray: Show the message tray in Ctrl+Alt+Tab outside of the overview
Since the message tray is accessible outside of the overview, it doesn't
make sense to show it only there.

https://bugzilla.gnome.org/show_bug.cgi?id=684633
2012-10-03 13:04:47 -03:00
Florian Müllner
2ed7ee8f71 keyboard: Keep tray after clicking summary item
Currently if a summary item signals that it has handled a click
itself, the tray hides itself. This behavior is wrong for the
On-Screen-Keyboard, which appears as a unit with the tray, so add
a property to opt-out of the default behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=683546
2012-09-25 08:25:25 +02:00
Florian Müllner
6611d639a8 messageTray: Only update keyboardVisible as necessary
This fixes a case of _updateState() being called recursively,
resulting in stray grab()/ungrab() calls the leave the entire
desktop in a stuck focus state.

https://bugzilla.gnome.org/show_bug.cgi?id=683546
2012-09-25 08:25:24 +02:00
Giovanni Campagna
fe124e6ab3 Keyboard: update for the message tray changes
The message tray is now modal and pushes the view up, but the keyboard
is shown below it. Solve this by applying a special styling to the
keyboard and message tray combination, and by not pushing the windows
up when the keyboard is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=683546
2012-09-25 08:25:24 +02:00
Jasper St. Pierre
a87ba467ae messageTray: Don't open the tray from a dwell if we're in a modal grab
If we're in an alt-tab popup or modal dialog, we shouldn't pop up the tray
at all.

https://bugzilla.gnome.org/show_bug.cgi?id=684458
2012-09-22 15:39:22 -03:00
Jasper St. Pierre
7df7cd01eb messageTray: Clean up commented code a bit
Since we changed the grabHelper.grab call to be in a conditional,
it's been a little clear what the comment has been referring to.

https://bugzilla.gnome.org/show_bug.cgi?id=684458
2012-09-22 15:39:22 -03:00
Florian Müllner
c1590d9ed7 Revert "messageTray: Fix summary position in RTL locales"
This reverts commit e6ba7c6e40.
The original issue is fixed by Clutter commit 64c7973c7429c.
2012-09-19 13:12:02 +02:00
Florian Müllner
e6ba7c6e40 messageTray: Fix summary position in RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=684214
2012-09-19 03:44:49 +02:00
Florian Müllner
6ef3c628e6 messageTray: Move focus ourselves when entering by keybinding
When the tray is triggered by keybinding rather than dwelling, the
first summary item should be given key focus. Currently this is
achieved by grabbing the focus before toggling the tray, so that
the grabHelper will move the focus for us. However this interferes
with the grabHelper's focus save/restore mechanism - for instance,
after using the keybinding once, the tray will always come up with
the first item focused.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-18 18:45:42 +02:00
Florian Müllner
f2af0be9ac messageTray: Allow to start keynav with Tab
Currently it is only possible to use keynav inside the tray if it
has been triggered with the keyboard shortcut. Make it possible to
initiate keynav by hitting Tab in other cases as well.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-18 18:45:41 +02:00
Florian Müllner
906368d916 messageTray: Add shortcuts to summary boxpointer
Currently opening the summary boxpointer acts as a stop gap for
keynav - the only shortcut still working is "Escape" to hide the
tray altogether.
Change the handling of Escape to only close the summary boxpointer
and allow to use the down arrow as alternative (unless the boxpointer
already processes the key press itself of course, like the chat
entry does). Also add a Delete shortcut to dismiss the open summary
item.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-18 18:45:41 +02:00
Florian Müllner
a5d60050a2 messageTray: Allow to open summary item with up arrow
When using keynav in the top bar, menus may be opened using the
down arrow; in a similar fashion, allow to open the summary
boxpointer with the up arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-18 18:45:40 +02:00
Giovanni Campagna
633bbd8a9e Fix regression from 38f943ef81
In gdm mode there is no activities button, and accessing it causes an
exception.

https://bugzilla.gnome.org/show_bug.cgi?id=684162
2012-09-17 15:31:04 +02:00
Florian Müllner
38f943ef81 messageTray: Do not block hot corner when open
https://bugzilla.gnome.org/show_bug.cgi?id=682255
2012-09-16 19:53:49 +02:00
Florian Müllner
afcd90ae27 messageTray: Fix _hideTray() being called recursively
_hideTray() is called by _updateState() when the tray is visible
but should be hidden; however, _updateState() may be called again
from within _hideTray() when releasing the GrabHelper grab, so
unless we update the _trayState variable before that, _hideTray()
will be called a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-15 00:17:44 +02:00
Giovanni Campagna
7654f1ca3e MessageTray: remove bad fast path in hideSummaryBoxPointer
The onUngrab callback already checks if all notifications are destroyed and
hides immediately if so. Previous code instead would leave state handling
in an inconsistent state, by not removing the grab, not setting
summaryBoxPointerState to HIDDEN and not disconnecting various signals.

https://bugzilla.gnome.org/show_bug.cgi?id=684036
2012-09-14 18:29:47 +02:00
Owen W. Taylor
b1451523ca messageTray: Disable the tray dwell when the user is interacting
Look at the focus window's interaction timestamp to catch the case
where the user is typing and knocks the pointer into the tray or
mouses down to the bottom of the screen and clicks on something.
If the focus window's interaction time differs at the start and
end of the tray dwell then we don't activate the tray.

https://bugzilla.gnome.org/show_bug.cgi?id=683811
2012-09-14 10:42:40 -04:00
Giovanni Campagna
b7ae74edb9 Revert showing notifications in the locked screen
As PAM messages are now shown below the password entry, there is no
need for this complexity, and we can just hide all notifications.
Also, this avoids the ambiguity between notification.showWhenLocked and
source.showInLockScreen, which have very different effects.

https://bugzilla.gnome.org/show_bug.cgi?id=683369
2012-09-14 00:06:30 +02:00
Jasper St. Pierre
e71129aa68 autorunManager: Don't show a right-click menu
Activating the source shouldn't be possible, and neither should
removing it.

https://bugzilla.gnome.org/show_bug.cgi?id=683438
2012-09-13 15:45:07 -03:00
Jasper St. Pierre
6f5b700833 messageTray: Split out the building of the right menu to a separate method
Besides code cleanliness, this allows us to stub out a right-click menu
for resident sources.

https://bugzilla.gnome.org/show_bug.cgi?id=683438
2012-09-13 15:45:07 -03:00
Giovanni Campagna
8cf9baa132 ScreenShield: move lock status handling to use session mode
Have distinct session modes for the lock screen and the unlock dialog,
and rework the logic in ScreenShield to have the lock-screen mode stack
onto the unlock-dialog mode (where applicable)

https://bugzilla.gnome.org/show_bug.cgi?id=682542
2012-09-10 21:23:25 +02:00