Commit Graph

325 Commits

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