Commit Graph

353 Commits

Author SHA1 Message Date
Giovanni Campagna
47d46e367e ScreenShield/MessageTray: fix crash after the introduction of close buttons
Commit 5c6b1fd0c modified the hierarchy of SummaryItem contents, by
introducing a notificationStackWidget in place of the StackView, but
forgot to update the bits in ScreenShield.NotificationsBox that accessed
and reparented that directly, causing a crash by invalid theme node access.

https://bugzilla.gnome.org/show_bug.cgi?id=682683
2012-09-03 23:08:36 +02:00
Debarshi Ray
ca4b86e7ca messageTray: Don't hide the banner after NOTIFICATION_TIMEOUT
... if the notification originally popped up under the pointer, and
the pointer is moving inside it.

https://bugzilla.gnome.org/show_bug.cgi?id=682238
2012-09-03 18:48:10 +02:00
Debarshi Ray
11086e8ef8 messageTray: s/_useLongerHideTimeout/_useLongerTrayLeftTimeout/
Typo introduced in 6d2d4fcc77
2012-09-03 16:21:53 +02:00
Giovanni Campagna
eb351b1882 MessageTray: escape the tray when a legacy icon is clicked
Legacy tray icons may want to take a pointer grab to show a popup menu,
and this is incompatible with message tray modality. To solve this,
escape the tray when forwarding clicks to the tray icons, and wait
for the input mode change to actually synthetize the X event.

https://bugzilla.gnome.org/show_bug.cgi?id=682244
2012-09-01 16:38:51 +02:00
Debarshi Ray
69735940ec messageTray: Summary items should be square and have spacing
Each summary icon is 48x48 with a padding of 6px on each side. Thus,
each summary item is 60px wide. Therefore the summary mode should be
60px high instead of 72px.

Changed the tray actor to use a ClutterBinLayout so that it honors the
y-expand property of its children.

https://bugzilla.gnome.org/show_bug.cgi?id=682248
2012-09-01 12:36:00 +02:00
Florian Müllner
dc13e72b89 messageTray: Use monitor geometry for dwelling
In multi-monitor setups, the screen might extend below the edge of
the monitor that holds the tray. In that case the tray is currently
triggered from a secondary monitor, which is rather surprising;
change the check to use the correct monitor geometry instead.

https://bugzilla.gnome.org/show_bug.cgi?id=683044
2012-08-30 18:52:17 +02:00
Florian Müllner
2beff9896a Fix a couple of symbolic icons
Some fallout from commit c21b1e5fe0 ...
2012-08-30 14:55:33 +02:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Giovanni Campagna
f96dcaccbe MessageTray: clamp unexpanded notification height
The height of an unexpanded notification could include expanded
content if the notification has extra widgets (like actions and images),
so tweening to that cause it to expand visually.
Instead, use the height of the message tray before the restyle
as an upper bound.

https://bugzilla.gnome.org/show_bug.cgi?id=682738
2012-08-29 01:04:28 +02:00
Alejandro Piñeiro
6ea80eadd6 a11y: set a label_actor for the summary items on the message tray
https://bugzilla.gnome.org/show_bug.cgi?id=677229
2012-08-27 10:43:35 +02:00
Giovanni Campagna
bec48492ab ScreenShield: hide Removable devices in the lock screen
Showing the removable devices is potentially a security risk (as
they include network shares). Also, a nautilus launched from there
can't be used, so it's just a way to overload the system.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-26 14:30:45 +02:00
Owen W. Taylor
3902e8bff0 messageTray: fix dwelling during mouse-down
If the user has the mouse down - for example when they are selecting
text and dragging - then the attempt to get a modal grab will fail.

grabHelper: allow the .grab() function to fail and do nothing in this
modal case if the grab fails.

messageTray: handle grab failure and don't pop up the tray. Change the
logic for tray dwelling so that we only try to pop up the tray once
while the pointer is in the dwell area - this avoids the possiility
that the tray will pop up once the user releases the mouse.

https://bugzilla.gnome.org/show_bug.cgi?id=682385
2012-08-23 01:49:21 -04:00
Florian Müllner
ecbf2f1429 messageTray: Handle 'popup-menu' signal on summary items
Now that the message-tray is key navigable, we should enable
triggering the right-click menu by keyboard shortcut as well.

https://bugzilla.gnome.org/show_bug.cgi?id=682486
2012-08-22 21:00:52 +02:00
Owen W. Taylor
46b7a95ec8 messageTray: Remove the message tray hot corner
Since dwell at the bottom of the screen is now the primary way of
summoning the tray, removing the hot corner to avoid having two
separate things that can be accidentally triggered.

https://bugzilla.gnome.org/show_bug.cgi?id=682310
2012-08-21 18:27:33 -04:00
Owen W. Taylor
54f3036f86 messageTray: add dwelling at the bottom of the screen to open the tray
If the user leaves the mouse pointer at the bottom of the screen for a second,
open the tray. This simulates the eventual plan of measuring "pressure" by how
far the pointer is moved past the edge of the screen. Measuring pressure will
take X server changes.

https://bugzilla.gnome.org/show_bug.cgi?id=682310
2012-08-21 02:36:56 -04:00
Jasper St. Pierre
a2e0e0ad06 messageTray: Adjust the position of the close button
Make this closer to the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=682253
2012-08-20 18:06:52 -04:00
Jasper St. Pierre
d721fc2c17 messageTray: Put the notification widget in the center
Rather than stretching the entire screen length

https://bugzilla.gnome.org/show_bug.cgi?id=682253
2012-08-20 18:06:52 -04:00
Jasper St. Pierre
becaeafeac messageTray: Port the close buttons over to Clutter properties
Rather than computing everything manually, let Clutter calculate
things for us.

https://bugzilla.gnome.org/show_bug.cgi?id=682253
2012-08-20 18:06:52 -04:00
Jasper St. Pierre
d1e35d11d0 messageTray: Put the lightbox opacity down
https://bugzilla.gnome.org/show_bug.cgi?id=682271
2012-08-20 16:51:12 -04:00
Jasper St. Pierre
7e2bab48c9 messageTray: Force the tray closed when exiting the overview 2012-08-19 21:15:52 -04:00
Jasper St. Pierre
05d613f3a3 messageTray: Fix going to left-click/right-click on the same summary item
This code was originally here to close the summary box pointer if it was
already open, but it seems that it isn't necessary, and is causing all
sorts of problems.
2012-08-19 21:15:52 -04:00
Ana Risteska
5c6b1fd0cc messageTray: add close button to notifications
Displaying a close button provides a discoverable way to close notifications.
Clicking the close button on new notifications, dismisses them, but doesn't
remove the notification source from the message tray if it is resident.

Clicking the close button on summary notifications acts the same way as clicking
"Remove" option in the right click menu, which is to remove the notification
stack and its source, even if it is resident or a tray icon.
2012-08-19 21:15:51 -04:00
Marina Zhurakhinskaya
f8eab659d9 messageTray: hide removed notification without tweening
This reflects more accurately what happens when a notification is removed.

this._pointerInTray value needs to be set to false in this case.
2012-08-19 21:15:51 -04:00
Marina Zhurakhinskaya
4a214d8238 messageTray: be sure to remove destroyed notifications from the notification stack
This allows us to correctly identify when the notification stack is empty.
2012-08-19 21:15:51 -04:00
Jasper St. Pierre
44b4741e35 messageTray: Close the current box pointer when clicking on the same item 2012-08-19 21:15:51 -04:00
Jasper St. Pierre
95b9863a70 messageTray: Close the current box pointer when clicking on the tray 2012-08-19 21:15:50 -04:00
Jasper St. Pierre
4dfe3d21e1 messageTray: Always close the tray when clicking outside of it
Even when a summary box pointer item is up.
2012-08-19 21:15:50 -04:00
Jasper St. Pierre
1fd17b5027 messageTray: Be able to "switch" notifications
If you click on a summary item while another is up, we should
swap without an extra click.
2012-08-19 21:15:49 -04:00
Owen W. Taylor
fe8e62c6a8 messageTray: keep the desktop clone at integral positions tweening it
Drawing the desktop at non-integral positions is slower because it
turns off the obscured-area clipping logic, so avoid that.
2012-08-19 21:15:48 -04:00
Jasper St. Pierre
c668d16a00 messageTray: Grab the key focus when entering from the keybinding 2012-08-19 21:15:48 -04:00
Jasper St. Pierre
c33e2d1971 messageTray: Add the summary view to the focus manager
This makes keynav work between summary items
2012-08-19 21:15:48 -04:00
Jasper St. Pierre
0711a70398 js: Use global.focus_manager, rather than grabbing it ourselves 2012-08-19 21:15:48 -04:00
Debarshi Ray
cb5095370e messageTray: Use a Lightbox to shade the window_group
This is a visual indication of the fact that a grab is in place.

https://bugzilla.gnome.org/show_bug.cgi?id=681392
2012-08-19 21:15:47 -04:00
Jasper St. Pierre
8f71920622 messageTray: Correct idleness
If the user is already active when the notification pops up, we
won't get an idle watcher because there's no transition from
active to idle or vice versa. Correct this by initializing the
state correctly from XSync.
2012-08-19 21:15:47 -04:00
Debarshi Ray
3da0e9e86a messageTray: Make it keyboard navigable in the overview
https://bugzilla.gnome.org/show_bug.cgi?id=681519
2012-08-19 18:41:52 -04:00
Jasper St. Pierre
e8c8fecb35 messageTray: Make the hot corner summon the tray 2012-08-19 18:41:52 -04:00
Jasper St. Pierre
8bb2c425c6 messageTray: Properly track notificationExpanded
This makes a lot more sense.
2012-08-19 18:41:52 -04:00
Jasper St. Pierre
1f6d807882 messageTray: Make modal 2012-08-19 18:41:52 -04:00
Jasper St. Pierre
8d1ed9f88a messageTray: Port to GrabHelper
https://bugzilla.gnome.org/show_bug.cgi?id=671001
2012-08-19 18:41:51 -04:00
Florian Müllner
a8e6bfcb3d message-tray: Add :overview pseudo class when in overview
The designers would like the message-tray to use different styles
depending on whether it is shown in the overview or not, so use
an :overview pseudo class as the top bar.
2012-08-19 18:41:50 -04:00
Marina Zhurakhinskaya
9c7222daea messageTray: don't show the tray after new items are added
Because showing the tray now moves the desktop around, we should no
longer show it when it's not triggered by the user.
2012-08-19 18:41:50 -04:00
Marina Zhurakhinskaya
ab5c0bcfcf messageTray: don't time out banners when the user is inactive
This will ensure that the user doesn't miss notifications.
2012-08-19 18:41:50 -04:00
Ana Risteska
6f8e7f07f3 messageTray: restyle the message tray
The patch implements the new visual style for the message tray,
that is now larger and has textured background. The icons are
also larger.

https://bugzilla.gnome.org/show_bug.cgi?id=677213
2012-08-19 18:41:49 -04:00
Ana Risteska
0ac4787f1a messageTray: remove the labels of the items in the message tray
According to the new visual style for the message tray we no longer
show the title of the source in the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=677213
2012-08-19 18:41:49 -04:00
Debarshi Ray
16bbe9782b messageTray: Clone, clip & move the window_group when tray is toggled
1) straddling windows get clipped at the monitor boundary
2) we move the bottom monitor and not the primary because that is
   where the tray is
3) to stop the wallpaper from the bottom monitor leaking into the
   primary, we adjust the clip as the clone animates up/down

https://bugzilla.gnome.org/show_bug.cgi?id=681392
2012-08-19 18:41:48 -04:00
Jasper St. Pierre
5991c8dca3 messageTray: Hook SourceActor up to source icon changes automatically
Instead of manually tracking source icon changes, or requiring a manual
call to _setSummaryIcon, add a way to emit a signal when we're guaranteed
the icon has been changed, and then the source actor will automatically
update the icon.
_setSummaryIcon is still available for sources such as the notification
daemon, that require special treatment for the summary icon (to be used
with tray icons)

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-08-18 00:36:13 +02:00
Jasper St. Pierre
8f129e1c9d messageTray: Defer creation of mainIcon
We need to make sure the Source is fully constructed before creating
mainIcon, as SourceActor will query the count of the source.

This fixes Telepathy Chats.

https://bugzilla.gnome.org/show_bug.cgi?id=682045
2012-08-16 20:10:24 -04:00
Giovanni Campagna
6a9b1996e4 ShellIdleMonitor: turn it into a singleton
It doesn't make sense to have multiple ShellIdleMonitors, since
each has its own GDK filter function, but they all get the same
events. In preparation for having it accessed from other places
than the message tray, make it a singleton.

https://bugzilla.gnome.org/show_bug.cgi?id=682041
2012-08-17 01:32:02 +02:00
Debarshi Ray
f63371dadb messageTray: Set can_focus to true for SummaryItem
https://bugzilla.gnome.org/show_bug.cgi?id=681519
2012-08-15 03:10:30 +02:00
Debarshi Ray
7950c4afdd messageTray: Add a toggle-message-tray keybinding to toggle the tray
The default value is <Super>m.

https://bugzilla.gnome.org/show_bug.cgi?id=681392
2012-08-09 01:36:24 +02:00
Giovanni Campagna
aa733b5e53 Only show new notifications in the screen shield
Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-07 18:10:49 +02:00
Giovanni Campagna
8d7fa54af4 ScreenShield: fix spacing of notifications and sources
Reduce padding around persistent sources, and ensure that spacing
around resident notifications is only applied once.
Also, add some padding to the clock.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-06 23:02:34 +02:00
Jasper St. Pierre
414fe75d02 st-widget: Move reactivity tracking to StWidget, use "insensitive"
This lets use remove another few pieces of code that do the tracking
manually.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-07-24 06:11:21 -03:00
Giovanni Campagna
22eea750f3 ScreenShield: show notifications in the locked screen
Track screen lock status in the message tray, and filter banner
notifications. The message tray is completely hidden when the screen is
locked, but exceptions can be made for individual transient notifications,
such as shell messages and the on screen keyboard.
Non transient sources are shown in the middle of the lock screen. Resident
notifications (such as those from Rhythmbox) are shown in full, while
persistent ones are displayed as icon and message count.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
ac6c808124 MessageTray: rework icon handling to split model and view
To allow more than one summary icon actor for a source we split
the model of the source icon (which is iconName, if the default
implementation is used, or a GIcon otherwise) and replace
createNotificationIcon() with a generic createIcon(size). Also,
the actual source actor is split into a separate class, that handles
the notification counter automatically.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
5e865f5bc4 LayoutManager: reverse the visibleInFullscreen flag
Change visibleInFullscreen to be trackFullscreen. If true, visibility
is fully bound to fullscreen status, if false, no change is made.
This allows to avoid set_skip_paint(), while not messing with
visibility of actors that are sometimes hidden for other reasons.
The flag was reversed because only the panel uses it, so false is
a more useful default.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:27 +02:00
Ana Risteska
2d913578e1 messageTray: don't show the message tray when a new notification is shown
The message tray with its gradient background should only be displayed
when the summary is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=677210
2012-07-08 12:56:09 -04:00
Rui Matos
cf6f149888 boxpointer: Change 'animate' parameter on show/hide to a bitmask
This allows us to have more control of the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=678337
2012-07-06 16:04:42 +02:00
Rui Matos
02428019fa messageTray: Remove unused method parameter
The alignment of the arrow tip regarding the source actor is set with
setSourceAlignment() and its default is already 0.5 .

https://bugzilla.gnome.org/show_bug.cgi?id=678164
2012-07-06 16:03:49 +02:00
Ana Risteska
4448b65a18 telepathyClient: don't add log messages on presence changes
The log messages about presence changes unnecessarily cluttered the
notification.
Instead, we now present the presence states (online, offline, away, busy)
with an icon placed right next to the avatar. We also no longer show
notifications on presence changes.

https://bugzilla.gnome.org/show_bug.cgi?id=669508
2012-07-05 14:09:09 -04:00
Jasper St. Pierre
c9296191a8 js: Remove unnecessary versions of clutter_actor_get_children
clutter_actor_get_children requires making a temporary GSList from
a linked list structure, and then creating a JS Array from that GSList.
For simple cases like the number of children, use clutter_actor_get_n_children.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
2012-06-11 13:10:25 -04:00
Adel Gadllah
f5933c8cb8 messageTray: Don't show non urgent notifications while in fullscreen
Don't show non urgent notifications when the primary monitor
is in fullscreen (user watching a movie, having a presentation,
playing a game ...).

Once the user leaves fullscreen show the messagetray so that the user don't
miss any notification (same as in "back from idle").

https://bugzilla.gnome.org/show_bug.cgi?id=677590
2012-06-07 20:36:58 +02:00
Florian Müllner
6190d6c962 messageTray: Allow to make notification buttons insensitive
The availability of a notification action may depend on conditions,
so add a method to control the sensitivity of buttons which have
been added with addButton().

https://bugzilla.gnome.org/show_bug.cgi?id=651251
2012-05-18 17:39:50 +02:00
Jasper St. Pierre
9e1a2cfeac Start using MessageTray.Source directly instead of having to subclass it
For most subclasses, this is a direct swap -- a lot of the time, the
constructor was a blank class that override createNotificationIcon,
and called _setSummaryIcon in _init.

https://bugzilla.gnome.org/show_bug.cgi?id=661236
2012-05-17 08:32:22 -04:00
Jasper St. Pierre
c6fabe504a messageTray: Make Source usable without subclassing
Rather than ask most users of Source to subclass it to simply set their icon,
just allow them to create a new instance and add it without any complex magic.

https://bugzilla.gnome.org/show_bug.cgi?id=661236
2012-05-17 08:32:22 -04:00
Jasper St. Pierre
01f9d551f1 messageTray: Fix scroll bugginess in summary items
Two nested scroll views were fighing with each other. The reason isn't
particularly important and has to do with some silliness involving
StAdjustment. The visible effect was that scrolling up and down when
in a summary item view would appear to be glitchy, and sometimes not
work at all.

To fix, make sure that the scroll view we don't care about is disabled
when in a summary mode.

https://bugzilla.gnome.org/show_bug.cgi?id=661615
2012-05-02 16:04:46 -04:00
Jasper St. Pierre
399df66b18 messageTray: notification should be a style class name, not a global name
There have been multiple notifications ever since we had a notification stack
per source, so the idea of one notification being on screen at a time has long
been dead.

https://bugzilla.gnome.org/show_bug.cgi?id=661615
2012-05-02 16:04:05 -04:00
Joost Verdoorn
d79e8b84c9 telepathyClient: call this.updated() when a new message is added to a notification
When receiving another message or responding in a new expanded chat
notification that has no prior chat history, the notification moved down
below the edge of the screen instead of expanding up, making part of it
invisible. Avoid this by making sure the notification's position is updated.

https://bugzilla.gnome.org/show_bug.cgi?id=661944
2012-04-16 23:29:07 -04:00
Marina Zhurakhinskaya
30ca25e978 messageTray: show the summary with new notifications when the user becomes active
If the user was inactive while a notification was shown, we show the summary
when the user becomes active again. This ensures that we inform the user of
the existance of new notifications that the user might have missed.

When the user comes back from away, the summary is now only shown if it has
new notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=643014
2012-03-16 01:01:57 -04:00
Alejandro Piñeiro
fa9f923697 a11y: Proper role for notifications 2012-03-10 02:12:20 +01:00
Jasper St. Pierre
7d29e691a4 messageTray: Make sure to always grab focus
If a widget isn't focusable or none of its children are focusable, then
navigate_focus will return false and the key focus won't be set. We
need to explicitly grab the key focus in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=671001
2012-03-01 02:57:07 -05:00
Jasper St. Pierre
15f881f967 st: Remove custom text direction stuff
Clutter has its own built-in system for managing text directions, like GTK+.
Convert over to use this.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
bb862e20c0 st: Remove st-group
Now that ClutterActor/StWidget is concrete, we don't need it.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
a8b081661c st-box-layout: Remove insert_actor/insert_before
Now that 'insert_child_at_index' and 'insert_child_below' exist
on ClutterActor, these aren't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Jasper St. Pierre
fd99d13f04 messageTray: Correctly show the icon on a notification stack
An actor is removed from its parent after it emits the destroy signal,
so we can't just check if the notification stack has more than one
notification -- we need to check if there's a notification there
that is not the current one.

This was causing spew in the form of:

    "this.notificationStack.get_children()[0]._delegate.setIconVisible
     is not a function"
2012-02-17 13:52:48 -05:00
Florian Müllner
e9d2a429eb message-tray: Allow to switch between left/right click directly
Currently it is not possible to trigger the context menu while the
summary notification is opened (and vice versa). To actually trigger
the desired item, the user has to click again, which is annoying
without a good justification, so allow switching directly between
left/right click items.

https://bugzilla.gnome.org/show_bug.cgi?id=666197
2012-01-27 14:27:41 +01:00
Rui Matos
0cbaeaefed messageTray: use a "hot corner" to summon the tray
Instead of leaving the tray covering the whole last pixel row when it's
hidden, hide it completely. This avoids mouse events not being delivered to
application windows on the last pixel row.

To summon the tray we use a single reactive pixel on the corner.

https://bugzilla.gnome.org/show_bug.cgi?id=663366
2011-12-05 04:51:16 +00:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
b356aa8e3b Port message tray sources and notifications to class framework
Third step in the class framework port, now it's the turn of
MessageTray.Source and MessageTray.Notification, as well as
the various implementations around the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
adc187c32e screensaver, gnomesession: port to GDBus based bindings
Port org.gnome.ScreenSaver and org.gnome.SessionManager glue code
to use GDBus, and move /org/gnome/Shell/EndSessionDialog to the
GDBus connection, so it is backed by the org.gnome.Shell name.

https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-11-11 11:15:38 -05:00
Rui Matos
779b18bf48 messageTray: don't steal focus when popping under the pointer
We must look for the actor under the pointer in the whole message tray and not
just in the notification. This will avoid us to capture focus when a
notification comes up with the pointer on the whole tray area.

https://bugzilla.gnome.org/show_bug.cgi?id=661358
2011-11-04 01:40:30 +00:00
Ana Risteska
3652e42699 messageTray: Add option to (un)mute conversations
Add "Mute"/"Unmute" option to the right click menu for chats to allow muting conversations
without blocking the sender or disabling all non-urgent notifications. Muting a conversation
prevents the pop up of notifications on new messages from the muted source, while these
messages are still available from the summary notification in the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=659962
2011-11-03 12:18:34 -04:00
Jasper St. Pierre
18541c447e messageTray: Reduce the scroll view fade
https://bugzilla.gnome.org/show_bug.cgi?id=662226
2011-10-31 13:45:57 -04:00
Jasper St. Pierre
b05f71eb9b messageTray: Add banner body when setting the image for a notification
We always place the banner in the body if the notification has additional
content.

https://bugzilla.gnome.org/show_bug.cgi?id=659158
2011-10-18 00:16:25 -04:00
Ray Strode
12e3921f81 messageTray: only set stage input mode when necessary
The message tray focus grabbing code sets the stage input
mode to Shell.StageInputMode.FOCUSED when the overview is
not visible. This ensures the stage window's input
region gets reshaped to include the notification chrome,
and so that input events get delivered appropriately to
the notification that grabbed focus.

The message tray code never tries to restore the stage input
mode later. Instead, the code relies on the stage input
mode (and input region) getting reset to
shell.StageInputMode.NORMAL automatically when focus moves
back from the shell chrome to a window in the user's session.

It's not really correct to set the stage input mode based
on the overview's visibility, though. At the login screen,
even though no overview is visible, the stage input mode is
Shell.StageInputMode.FULLSCREEN which is sufficient
for the notification's needs,  Furthermore,
Shell.StageInputMode.FOCUSED is insufficient for the login
dialog's needs since the login dialog isn't considered
part of the shell's chrome and won't get included in the
stage input region.

This commit changes the message tray code to only set the
stage input mode if the current stage input mode isn't good enough,
rather than assuming the input mode isn't good enough just because
the overview is hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=660919
2011-10-17 13:24:12 -04:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Jasper St. Pierre
c99afed012 messageTray: Fix accidental typo 2011-10-07 16:34:04 -04:00
Marina Zhurakhinskaya
40c5db397d messageTray: unset this._clickedSummaryItem if we are hiding the summary box pointer and don't have a new clicked summary item
This ensures that this._clickedSummaryItem is always unset correctly.

Because we disconnect the signals that have _adjustSummaryBoxPointerPosition()
as a callback when unsetting this._clickedSummaryItem, we no longer call
setPosition() on this._summaryBoxPointer after it is hidden. Calling
setPosition() shows the box pointer again, which previously resulted in
an empty box pointer staying behind when a notification associated with
a tray icon was clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=659862
2011-09-26 13:30:46 -04:00
Dan Winship
33094b4988 messageTray: fix notification/keyboard interaction
If the pointer moves from the notification into the keyboard, don't
treat that as moving out of the tray.

https://bugzilla.gnome.org/show_bug.cgi?id=658603
2011-09-23 07:56:45 -04:00
Dan Winship
a8fdcffd44 messageTray: move the summary box pointer up when the keyboard shows
If the keyboard is shown when a summary boxpointer is visible (eg,
when opening a chat source), animate the boxpointer up with the tray.

https://bugzilla.gnome.org/show_bug.cgi?id=658603
2011-09-23 07:55:47 -04:00
Marina Zhurakhinskaya
a0ba664c64 messageTray: only update an icon when necessary on notification update
This avoids unnecessarily removing and resetting the icon in the notifications.

This fixes the new chat notification sliding down and up slightly when new
messages are received.

https://bugzilla.gnome.org/show_bug.cgi?id=659768
2011-09-22 13:25:35 -04:00
Marina Zhurakhinskaya
131da5f523 telepathyClient: update the avatar correctly when it changes
Previously, when the avatar changed, we would not update the summary icon
for the source at all and would only update the notification icon when the
next message was received. Instead, we should update both immediately upon
recieving the signal that the avatar has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=659768
2011-09-22 13:25:35 -04:00
Jasper St. Pierre
7e70dfdf4c messageTray: Fix line wrapping
Clutter 1.4 had a bug where it would wrap when it wasn't supposed to, and we
were unknowingly relying on it. Explicitly pass the available width/height
to get a perfect allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=659633
2011-09-20 16:06:06 -04:00
Xavier Claessens
c23919df15 Silently add chat source in the MessageTray
We don't want the tray bar to open/close quickly when adding a chat because
it happens when user opens the chat from Empathy. The notification will
popup on incoming message anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=657249
2011-09-19 16:19:26 +02:00
Dan Winship
fd25cf30ff messageTray: fix a warning
Check for click in keyboardBox rather than Main.keyboard.actor, since
the latter won't exist when the keyboard is hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=658598
2011-09-15 08:34:29 -04:00
Marina Zhurakhinskaya
9496b64c86 messageTray: hide the summary box pointer if all its notifications are destroyed
This ensures that we don't show an animation of an empty blob being hidden when
clicking an action button causes the notification to be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=658525
2011-09-08 14:27:39 -04:00
Marina Zhurakhinskaya
f7fb6b2160 messageTray: store notifications and signal ids in an array of objects in SummaryItem
The code is cleaner that way. It also allows us to find the notification object
after the notification actor is destroyed and disconnect the signals.
2011-09-08 14:27:39 -04:00
Jasper St. Pierre
b8d9273a7c messageTray: Don't try to URL highlight an invisible actor
https://bugzilla.gnome.org/show_bug.cgi?id=656142
2011-09-02 17:23:14 -04:00
Marina Zhurakhinskaya
2054f77e2b Add 'multi-line-notification' class name if the notification image is set
Notifications with images are multi line notification.
2011-08-29 15:21:22 -04:00
Neha Doijode
aabe56ba79 messageTray: implement showing images in notifications
Images are part of the notification spec, so we should support them.

Marina Zhurakhinskaya provided some code for getting the layout right
for this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=621009
2011-08-29 13:46:47 -04:00
Nohemi Fernandez
d227ddfc88 keyboard: add an on-screen keyboard
https://bugzilla.gnome.org/show_bug.cgi?id=612662
2011-08-29 12:59:25 -04:00
Dan Winship
021d3dadbb layout: add panelBox and trayBox
Have LayoutManager automatically deal with sizing and positioning
boxes for the panel and messageTray relative to the monitors.

Also, now that LayoutManager knows exactly where and how tall the
panel and tray are, have it manage the pointer barriers as well.

https://bugzilla.gnome.org/show_bug.cgi?id=612662
2011-08-29 12:59:25 -04:00
Dan Winship
c1acf992fa layout: make Chrome an implementation detail of LayoutManager
Make the Chrome object be a private member of LayoutManager, and add
new LayoutManager methods to proxy to the old Chrome methods.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:18:30 -04:00
Dan Winship
446910cb10 messageTray: move the summary notification out of MessageTray.actor
With the old pre-boxpointer summary notifications, it sort of made
sense that the summary notification actor was a child of the message
tray. But there's no reason for that now, and in fact, it ends up
requiring special cases in some places since hovering over the summary
notification counts as hovering over the tray. So, fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:18:18 -04:00
Dan Winship
a376cd1610 chrome: Make affectsStruts default to false
Since we only want it to be true for the panel, and nothing else.

https://bugzilla.gnome.org/show_bug.cgi?id=655813
2011-08-03 09:17:52 -04:00
Dan Winship
aed50e2a39 shell-global: add a "display" property
and update callers to fetch that rather than doing
"global.screen.get_display()"

https://bugzilla.gnome.org/show_bug.cgi?id=654639
2011-08-03 09:09:55 -04:00
Dan Winship
7542e68b6f messageTray: improve bad-markup handling
_fixMarkup() was supposed to be ensuring that the markup we passed to
clutter was correct, but it was validating the syntax incorrectly, and
wasn't checking that the markup was valid (or even well-formed). This
is bad because if you pass bad pango markup to
clutter_text_set_markup(), it will g_warn and drop the string on the
floor.

Fix by fixing up the regexps, and then calling Pango.parse_markup() on
the result, and just xml-escaping everything if parse_markup() fails.

https://bugzilla.gnome.org/show_bug.cgi?id=650298
2011-07-27 09:29:03 -04:00
Florian Müllner
a92b7342ba message-tray: Move check for _actorDestroyed into _setCount()
As _updateCount has been designed to be overwritable by subclasses,
move the check for _actorDestroyed into _setCount(), to fix the
problem described in commit 5f6ac33d5 in derived types as well.
2011-07-13 22:27:15 +02:00
Florian Müllner
5f6ac33d59 message-tray: Don't update message count after destruction
When trying to update the message count after a summary icon has
been destroyed, the label to display the count is no longer valid
and trying to set its text results in some Clutter warnings.
2011-07-13 20:48:44 +02:00
Guillaume Desmottes
6cb707cc4f messageTray.js: raise an exception only if parseInt(count) returns NaN
0 is a valid value for count so we should accept it.

https://bugzilla.gnome.org/show_bug.cgi?id=654139
2011-07-07 15:47:12 +02:00
Jasper St. Pierre
40f4e92461 messageTray: Use the count to display the number of unread notifications
https://bugzilla.gnome.org/show_bug.cgi?id=649356
2011-07-06 18:43:39 -04:00
Jasper St. Pierre
c727da823b messageTray: Add an enumerable count for sources to use
https://bugzilla.gnome.org/show_bug.cgi?id=649356
2011-07-06 18:43:31 -04:00
Dan Winship
1dfffdbc4e layout: deal better with vertically-stacked monitors
If there is a monitor below the primary monitor, then put the message
tray there, rather than necessarily on the primary.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Dan Winship
64b2b4a7d4 layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Guillaume Desmottes
cc5c5e7e8a messageTray.js: add collapsed signal on Notification 2011-06-29 09:44:47 +02:00
Guillaume Desmottes
9c849b0290 messageTray.js: fire a signal when the summary item is clicked 2011-06-29 09:44:46 +02:00
Dan Winship
82a8ac1976 chrome: drop visibleInOverview
Every place that called chrome.addActor was specifying
visibleInOverview:true, and no existing designs call for chrome that
disappears when you enter the overview, so just drop that as an
option.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2011-06-28 11:07:11 -04:00
Dan Winship
b846354787 messageTray: make this visible in fullscreen mode
https://bugzilla.gnome.org/show_bug.cgi?id=608667
2011-06-17 08:58:00 -04:00
Jasper St. Pierre
890efa787a messageTray: update the SummaryItem's label based on Source title changes
https://bugzilla.gnome.org/show_bug.cgi?id=643513
2011-06-09 17:07:06 -04:00
Jasper St. Pierre
e7289378b7 st-scroll-view: Make the fade effect and offset themable
Theme authors now have the power (and responsibility) of creating fade
effects with the new CSS length property '-st-fade-offset'. A value of
0 disables the effect.

This new CSS approach replaces the current programmatic toggle of
the 'vfade' property. A new CSS style class name 'vfade' is used as
a replacement for the old property.

https://bugzilla.gnome.org/show_bug.cgi?id=651813
2011-06-04 15:43:49 -04:00
Jasper St. Pierre
0ae1556b94 messageTray: Don't animate notifications if they've shrunk.
The effect of the large gap breaks the illusion of the message attached to
the bottom of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=641570
2011-06-03 13:37:53 -04:00
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Florian Müllner
1d2eadb9c0 notifications: Fix order of title/banner for RTL text
Currently, the banner text is always located at the right of the
title - we need to swap those around for RTL locales. Rather than
using the locale directly to figure out the ordering, try to
determine the direction of the title label and let it control the
overall direction of the notification - this way, notifications
generally come out right when mixing scripts.

https://bugzilla.gnome.org/show_bug.cgi?id=646921
2011-04-15 20:14:51 +02:00
Marina Zhurakhinskaya
659130856c Hide summary box pointer without animating if it is empty
This ensures that we don't show a small black blob fading away
when the user clicks on the notification and it is removed.

Set HIDING state right away in _hideSummaryBoxPointer() so that
it is only called once. Update this._pointerInTray when the tray
is unlocked, so that we are not dependent on escapeTray() being
triggered by 'done-displaying-content' signal.

https://bugzilla.gnome.org/show_bug.cgi?id=645697
2011-03-28 22:40:38 -04:00
Marina Zhurakhinskaya
9a21008177 Make sure notification has all the content when it is expanded
Use Meta.later_add() with BEFORE_REDRAW rather than Mainloop.idle_add()
to add the banner body so that the notification body is reliably added
after the first frame is drawn. This is important for notifications that
are expanded right away, such as the summary notifications that
were not shown as banners because the user was in the Busy mode or was
interacting with the summary. Otherwise, these notifications were sometimes
shown with an ellipsized banner and were only getting full content when
they were done animating.

Only add expanded content and signal the change once. Previously, we
used to signal the change numerous times and processing this signal was
holding up processing other things, such as the user moving the mouse
away from the notification so that the notification collapses.

https://bugzilla.gnome.org/show_bug.cgi?id=645719
2011-03-28 22:40:17 -04:00
Florian Müllner
25b743b03c message-tray: Fix dismissing notifications
Commit 31b12635d1 fixed links in notifications again, but blocked
clicks on normal labels getting through to the notification. Fix
this, so that both links and dismissing notifications work again.

https://bugzilla.gnome.org/show_bug.cgi?id=645839
2011-03-28 19:46:11 +02:00
Dan Winship
31b12635d1 messageTray: fix clicking on links again
The change to make Notification an StButton (06d2c0af, bug 642978)
broke links, because the link actor would ignore the
button-press-event, allowing the notification actor to receive it and
get a pointer grab, and so the link actor would never see the
button-release-event. Fix that by accepting and discarding the
button-press-event.

https://bugzilla.gnome.org/show_bug.cgi?id=645613
2011-03-25 18:49:27 -04:00
Dan Winship
8fdbbe78f4 MessageTray: keep notification focused through update()
If a notification was updated while one of its widgets was focused,
it would lose the grab when that widget was destroyed. Fix that by
moving the focus to a safe place before destroying the old widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=643687
2011-03-22 18:20:33 -04:00
Hellyna Ng
5a86b0f9e3 MessageTray: never show summary and a new notification at the same time
We want to minimize focus stealing from the user. If a non-urgent notification
comes in while the user is interacting with the tray, we add it to the tray
and only show it after the user is done interacting with the tray. If an
urgent notification comes in while the user is interacting with the tray,
we hide the tray and show the urgent notification.

https://bugzilla.gnome.org/show_bug.cgi?id=636838
2011-03-22 18:18:11 -04:00
Marina Zhurakhinskaya
604722b775 MessageTray: use single scrollbar for summary notification stacks
We want to allow the user to scroll through all notifications from
source by using a single scrollbar. We suppress the individual
scrollbars inside the notifications.

As one exception, we keep the original scrollbar for chat notifications
because it has a distinct look, ending above the text entry box.

https://bugzilla.gnome.org/show_bug.cgi?id=611611
2011-03-22 18:18:11 -04:00
Marina Zhurakhinskaya
812812d817 MessageTray: show multiple notifications per source
Add an ability to show multple notifications per source, so that
the user doesn't miss seeing any notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=611611
2011-03-22 18:18:11 -04:00
Marina Zhurakhinskaya
d1ffd3cf35 MessageTray: style summary sources
Make summary sources look more clickable and highlight them when selected.
Highlighting the fully expanded summary source when selected matches the
highlighting in the top bar items and teaches the user that any part of the
expanded summary source can be clicked.

Based on the initial patches by Florian Müllner and Jonathan Strander.

https://bugzilla.gnome.org/show_bug.cgi?id=644788
2011-03-21 21:50:27 -04:00
Alexander Larsson
1518dc9b60 Add pointer barriers to panel and message tray
If you have XFixes 5 (and corresponding xserver support) then we
add barriers on the panel and in the message tray corner so that
its easy to reach the corners even when there are monitors to the
sides of the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=622655
2011-03-21 21:03:19 +01:00
Dan Winship
7f17fcfafc messageTray: forward clicks on trayicon SummaryItems to the icon
If the user clicks on the title of a trayicon's SummaryItem, forward
that click to the trayicon. Also adjust
gnome_shell_plugin_xevent_filter() so that if the trayicon takes a
grab as a result of this, we don't hide the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=630842
2011-03-21 14:56:53 -04:00
Owen W. Taylor
96f89ce4ae message-tray: allocate the entire size to the icon
Specify x-fill and y-fill true for the bin that contains the status
icon so the status icon will always be sized to our specified icon
size (24x24). This prevents pathological behavior for legacy status
icons embedded in the tray where an initial allocation at 1x1 before
they had content would "stick", and the icon would permanently
end up 1x1.

https://bugzilla.gnome.org/show_bug.cgi?id=634820
2011-03-21 11:17:29 -04:00
Dan Winship
06d2c0af35 messageTray: dismiss notifications on click, not button-release-event
Notification was connecting to button-release-event to decide when to
be dismissed, which caused problems with widgets inside the
notification that reacted to button-press-event but not
button-release-event. Fix this by wrapping the Notification's table in
an StButton and connecting to 'click'.

https://bugzilla.gnome.org/show_bug.cgi?id=642978
2011-03-16 15:55:37 -04:00
Alexander Larsson
079953c3ee Switch to using the mutter primary monitor APIs
https://bugzilla.gnome.org/show_bug.cgi?id=609258
2011-03-16 20:30:58 +01:00
Dan Winship
e27293edbc messageTray: fix summary area wobbling
Due to accumulation of rounding errors, the left edge of the summary area
could wobble by a few pixels during animations. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=636930
2011-03-16 09:47:07 -04:00
Jasper St. Pierre
4029202635 messageTray: Add Source.pushNotification method
This allows clients to make minor adjustments to their notification
content without triggering a new popup.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:42:55 -04:00
Adel Gadllah
a0a83428cf telepathyClient: Pin the scrollbar to the bottom
When new messages come in we want to scroll down so that the user
sees the incoming messages. The current implementation does not work
because it relies on a synchronous allocation hack which does not work
for unmapped notifications.

Fix that by connecting to adjustment::changed and scroll whenever the
adjustment changes which equals "new messages", "new timestamp" or
"presense change", but don't interference with the user's scroll actions
i.e when the user scrolls back to read something don't scroll to the bottom.

https://bugzilla.gnome.org/show_bug.cgi?id=614977
2011-03-09 19:38:17 +01:00
Adel Gadllah
dc2cae07b2 notification: Remove scrollTo hack
Remove the hack from Notification.scrollTo because it is unreliable,
the caller should make sure to call scrollTo when it will actually
have the desired effect.

https://bugzilla.gnome.org/show_bug.cgi?id=614977
2011-03-09 19:38:16 +01:00
Marina Zhurakhinskaya
bb7388a7fe Don't show right click menu if a new notification for the source is showing
Showing the right click menu causes errors when ungrabbing focus in this case.
It will soon be impossible to get to the right click menu anyway when a new
notification is showing, because we are never going to show the summary
and the new notification at the same time.
2011-03-07 14:24:08 -05:00
Hellyna Ng
868bf5838d MessageTray: add right click menu for summary items
This provides straight forward controls for opening the corresponding
application or removing the summary item.

https://bugzilla.gnome.org/show_bug.cgi?id=617224
2011-03-07 11:14:11 -05:00
Marina Zhurakhinskaya
4282748483 Fix removing summary items
Unset this._expandedSummaryItem if it is the summary item that is being removed.
This avoids "this._sourceTitle.clutter_text is null" error.

Destroy the summary item actor only after calling _unsetClickedSummaryItem()
that disconnects from one of its signals.

https://bugzilla.gnome.org/show_bug.cgi?id=644043
2011-03-07 11:14:10 -05:00
Maxim Ermilov
29e5768f9b messageTray: don't leak Notifications
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-03-03 03:53:08 +03:00
Giovanni Campagna
1496c85bb6 MessageTray: Use status from gnome-session
This patch modifies MessageTray behaviour so that normal (not urgent)
notifications are not shown when the user is Busy (they're sent
immediately to the Summary area). When status is then changed,
notifications still pending are shown again.
Additionally, when status is modified from Idle to anything other than
Busy, the message tray is forced open for 4 seconds, so that summary
icons are visible.

https://bugzilla.gnome.org/show_bug.cgi?id=617225
2011-02-22 23:14:55 +01:00
Sardem FF7
8f3376ce62 Add "precision" to boxpointer alignment
Allows the boxpointer arrow to be at a fixed percentage of the bubble

https://bugzilla.gnome.org/show_bug.cgi?id=642031
2011-02-16 10:19:39 -05:00
Marina Zhurakhinskaya
1aba99336a MessageTray: fix showing and hiding summary notifications when summary items are clicked
This patch fixes the summary notification reappearing if you click on the
summary item to hide it and hover away. It also ensures that when you click
on any summary item which doesn't correspond to the summary notification
being shown, a new summary notification will replace it right away.

What used to happen is that we'd unset the clicked item in _unlock() that
was called when the focus was ungrabbed because the user clicked outside
of the summary notification, but then would have this._clickedSummaryItem
be null in _onSummaryItemClicked() , and set it to the clicked item all
over again. This patch ensures that we unset the clicked item only when
it is necessary.

We also needed to add the code to call _updateState() again to show a new
summary notification when a previous one was hidden, but
this._clickedSummaryItem was set.

https://bugzilla.gnome.org/show_bug.cgi?id=642005
2011-02-15 18:37:33 -05:00
Dan Winship
1224e959b6 StThemeNode: use (out caller-allocates) on ClutterColor-returning methods
Properly annotate the themenode methods that return ClutterColors, and
update their JS callers to take advantage of that.

https://bugzilla.gnome.org/show_bug.cgi?id=642295
2011-02-14 10:49:26 -05:00
Marina Zhurakhinskaya
de3ae87199 MessageTray: factor out focus grabbing from Notification into a separate class
That way it can be used when other components of the message tray need to
grab focus, such as the summary bubble with multiple notifications or the
summary item's right click menu.

https://bugzilla.gnome.org/show_bug.cgi?id=641810
2011-02-10 11:50:29 -05:00