Commit Graph

368 Commits

Author SHA1 Message Date
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