Commit Graph

46 Commits

Author SHA1 Message Date
Marina Zhurakhinskaya
83689e494c Show source title on hover, notification on click in the message tray
This is part of the design update for the message tray.

Source now takes an extra argument called 'title'.

All expanded message tray items are same width, which is determined by
the width of the item with the longest title, up to MAX_SOURCE_TITLE_WIDTH.
This is done so that items don't move around too much when one is expanded
and another one is collapsed.

https://bugzilla.gnome.org/show_bug.cgi?id=617224
2010-06-23 15:23:01 -04:00
Adel Gadllah
ccbf247970 Relayout on monitor layout changes
Currently we only relayout when the screen size changes, this gets
 the cases where a monitor gets added/removed but not when the primary
 monitor changes.

 We need to relayout on all monitor layout changes.

 Remove ShellGlobal::screen-size-changed signal as it is no longer used, Gdk is
 used to track changes now.

 A ShellGlobal::gdk-screen property is added for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=620377
2010-06-04 15:20:04 +02:00
Florian Müllner
03a0809e39 Use St.Group where appropriate
There are some places in the code where we use both fixed positioning
and CSS. Currently we use either a combination of ClutterGroup and StBin,
or we uses StBoxLayout with fixed positioning. Replace those with the new
StGroup container.

https://bugzilla.gnome.org/show_bug.cgi?id=613907
2010-05-25 23:03:14 +02:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Dan Winship
31914ab23b [Chrome] redo using ShellGenericContainer
Previously we used a ClutterGroup containing a second ClutterGroup for
the non-visibleInOverview actors. Redo it using a single
ShellGenericContainer, and use set_skip_paint() to hide the
non-overview chrome when the overview is visible.

Also fix up the default values for trackActor().

https://bugzilla.gnome.org/show_bug.cgi?id=608667
2010-05-03 12:51:22 -04:00
Dan Winship
024ab39c6d [MessageTray] don't time out the tray if the user is mousing towards it
If a notification is about to hide, but the user has moved the mouse
towards it, let it stick around for another second (and so on, until
the mouse either reaches the tray and causes it to be pinned, or stops
moving the mouse toward it).

https://bugzilla.gnome.org/show_bug.cgi?id=610071
2010-05-03 12:09:53 -04:00
Dan Winship
263261cc86 [MessageTray] handle "urgent" notifications specially
Urgent notifications jump to the front of the tray's notification
queue, and come up pre-expanded.

https://bugzilla.gnome.org/show_bug.cgi?id=611612
2010-04-30 11:54:06 -04:00
Dan Winship
077f0c56f1 [MessageTray] fix clutter warnings
Figure out if the banner is too long to fit as soon as the
notification's style is set, rather than waiting until allocation
time, since it's bad to add new table rows during allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=611612
2010-04-30 11:54:03 -04:00
Dan Winship
5012d64580 telepathyClient: fix summaryNotification to grow properly on updates
When adding more lines to the notification, we need to move it up as
well, or else the new lines will end up underneath the summary or
offscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=615004
2010-04-15 10:12:21 -04:00
Dan Winship
10ac42d6ad messageTray: don't show the same notification in both locations
If a notification is already being viewed from the summary area, and
it re-emits 'notify', don't show it a second time in the notification
area.

https://bugzilla.gnome.org/show_bug.cgi?id=614975
2010-04-15 10:04:33 -04:00
Adel Gadllah
752c25bb7d messageTray: Don't use gravity for notificationBin
When the notificaionBin has an odd width this could result into
loosing pixel aligment (and ugly looking font).

As the notification is already reactive make it non reactive and
remove the use of garvity.

https://bugzilla.gnome.org/show_bug.cgi?id=614702
2010-04-08 20:41:41 +02:00
Dan Winship
e94d54bffb Add support for chatting directly from IM notifications
Also reorganizes the notification layout to use an StScrollView; very
tall notifications are now scrolled instead of just taking up more and
more of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=608999
2010-04-06 09:20:50 -04:00
Dan Winship
5ab852bfa3 Revert "Special-handle Empathy to have multiple sources and to queue notifications"
This reverts commit bb0a977edc.

https://bugzilla.gnome.org/show_bug.cgi?id=608999
2010-04-06 09:16:00 -04:00
Dan Winship
611ca3c161 MessageTray: tweak how allocation works to fix the reactive area
Rather than having the notificationBin, summaryBin, and
summaryNotificationBin span the whole width of the screen and just
align their children to the right spot, set their anchor_gravity
appropriately, set their anchor point correctly, and let their width
vary with the width of their child.

Fixes the fact that the area to the left and right of an expanded
notification was reactive, because the notificationBin was invisibly
covering it.

https://bugzilla.gnome.org/show_bug.cgi?id=612072
2010-03-29 14:36:36 -04:00
Dan Winship
ac54fed8d4 [MessageTray] pop out the last notification when mousing over the summary
https://bugzilla.gnome.org/show_bug.cgi?id=610726
2010-03-25 09:24:52 -04:00
Dan Winship
994b4c0007 [MessageTray] Use #StWidget:track-hover
St.Widget's new "hover" property takes reactive children into account
when deciding whether or not the pointer has actually left the actor,
so it works better than the code that used to be here.

https://bugzilla.gnome.org/show_bug.cgi?id=610726
2010-03-24 10:13:36 -04:00
Marina Zhurakhinskaya
732ba8576d Set this._notificationRemoved to false in _hideNotificationComplete()
We used to set this._notificationRemoved to false in _hideNotification().
However, the user focusing on the associated application can result in the
source being removed while the notification is hiding, in which case
this._notificationRemoved was set to true and never unset. This resulted in
the next notification only showing up briefly and hiding. Moving setting
this._notificationRemoved to false to _hideNotificationComplete() fixes this
behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=611122
2010-03-08 16:39:52 -05:00
Florian Müllner
4d43424efd Remove source icon when a corresponding window is activated
Source icons are no longer needed to inform the user about events
having occured in a particular application when (s)he activates the
window - treat that case just as if the user had clicked the source
icon.

https://bugzilla.gnome.org/show_bug.cgi?id=610494
2010-02-23 19:03:20 +01:00
Florian Müllner
f9c5202dd1 Always make notifications with '\n' in bannerText expandable
Right now notifications are expandable if the length of bannerText
exceeds the notification's width - however, if bannerText contains
newlines, it should be expandable regardless of the length.

https://bugzilla.gnome.org/show_bug.cgi?id=610549
2010-02-22 23:41:09 +01:00
Marina Zhurakhinskaya
bb0a977edc Special-handle Empathy to have multiple sources and to queue notifications
We are planning to add Empathy-specific features in the message tray, but in the
meantime we handle Empathy notifications received through the notification daemon
so that their behavior is closer to the eventual design, which is how it was before
we started associating applications with a single source and enabled notification
replacement.
2010-02-22 17:27:23 -05:00
Marina Zhurakhinskaya
77ed621c74 Associate sources with applications
Use the "appName" parameter in notifications to identify the source
rather than the id - use the latter to enable update and removal of
individual notifications as laid out in the desktop notification spec.

This is a rebase of the patch by Florian Müllner.
2010-02-22 17:21:00 -05:00
Florian Müllner
b2db95380b [MessageTray] Clear bannerText before re-adding on updates
Currently only the old title/summary line is removed from
notifications before setting the updated values - do the
same for bannerText if applicable.
2010-02-22 20:14:44 +01:00
Florian Müllner
ec725cc6d4 [Notification] Replace all newlines in body with spaces
Accidentally we only replaced the first newline of the body text with
spaces - replace all occurrences instead.

https://bugzilla.gnome.org/show_bug.cgi?id=610549
2010-02-21 03:54:13 +01:00
Florian Müllner
79fe60e6fb [messageTray] Fix text with ampersands not being displayed
If the notification body contains '&' it ends up empty and a warning
about an invalid entity is printed on stderr, so our escape code must
handle ampersands as well.

https://bugzilla.gnome.org/show_bug.cgi?id=607375
2010-02-21 03:54:06 +01:00
Florian Müllner
1b7c3580e6 Show/hide the summary during the overview transition
Right now, the summary starts popping up when the overview has been
shown and starts to disappear when the overview is hidden. Instead,
animate the summary during the overview transition.

https://bugzilla.gnome.org/show_bug.cgi?id=610520
2010-02-20 20:05:50 +01:00
Dan Winship
77fe0db623 [MessageTray] Show the message tray in the overview
Also, make the summary area always visible when in the overview

https://bugzilla.gnome.org/show_bug.cgi?id=609765
2010-02-17 17:08:24 -05:00
Dan Winship
e86c821878 [MessageTray] reimplement the state machine
Previously, every time _updateState was called, it would make some
change, and so it was necessary to very carefully set up all the calls
to it, to ensure it was always called at exactly the right time. Now,
instead, we keep a bunch of state variables like "_notificationState"
and "_pointerInSummary", and potentially multiple timeouts, and
_updateState looks at all of them and figure out what, if anything,
needs to be changed.

By making the rules about what causes changes more explicit, it will
be easier to change those rules in the future as we add new
functionality.

Also, update the rules a bit, so that notifications can appear while
the summary is visible, and the summary only shows after a
notification if the summary has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=609765
2010-02-17 17:06:17 -05:00
Dan Winship
02f67af464 [MessageTray] Fix summary to be initially-hidden
Some recent change broke it so that the first time a notification pops
up, the summary will be visible alongside it.

https://bugzilla.gnome.org/show_bug.cgi?id=609765
2010-02-17 14:45:59 -05:00
Dan Winship
94f32030e6 [MessageTray] notification size/wrapping fixes
Make the font match the panel.
Make the max width be em-based rather than screen-size-based.
Fix it to break lines mid-word if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=606755
2010-02-16 14:08:17 -05:00
Dan Winship
f52744cfbc [StTable] fix x-align/y-align properties to be StAlign, not double
This puts it in sync with StBin and StBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=609848
2010-02-16 14:06:39 -05:00
Dan Winship
090335ad8b [MessageTray] fix notifications with short banners and action buttons
Previously the banner was only promoted to the body if it got
truncated, but the banner was *always* hidden when expanding the
notification. This meant a message with a short banner, plus
notification buttons, would have no banner text visible when it was
expanded. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=606755
2010-02-15 17:28:23 -05:00
Marina Zhurakhinskaya
60046aaa4f Switch to the corresponding app when the notification icon is clicked
This adds some meaningful functionality to the notification icons in the tray
and in the notification pop-up and allows to switch to the application that
sent the notification.

We get the application from the notification context and set it on the source
for the notification.
2010-02-15 12:27:28 -05:00
Dan Winship
d27f19a561 [MessageTray] Provide more control over Notification layout
This will be used by, eg, the chat notifications

https://bugzilla.gnome.org/show_bug.cgi?id=609453
2010-02-10 16:04:41 -05:00
Dan Winship
7642040fc0 [MessageTray] rename some fields
"fooText" suggests it might be a string, but it's actually an St.Label

https://bugzilla.gnome.org/show_bug.cgi?id=609453
2010-02-10 16:02:25 -05:00
Adel Gadllah
8ded91e975 Limit activation to summary area and notifications
Currently the messagetray opens up everytime the user hits the bottom of the screen.

To avoid this "opening by accident" this patch changes the behaviour so that:
1) It only opens when there is a notification showing or
2) When the user hits the summary area (assuming he wants to interact with it)

Includes fixes from https://bugzilla.gnome.org/show_bug.cgi?id=607244#c17

https://bugzilla.gnome.org/show_bug.cgi?id=607244
2010-02-09 19:31:39 +01:00
Dan Winship
f1fb0d32c6 [MessageTray] fix ellipsization when the title is too long
The code previously assumed that an StLabel with a 0-width allocation
would not be visible; this is apparently not true.

Part of https://bugzilla.gnome.org/show_bug.cgi?id=608915
2010-02-03 19:21:48 -05:00
Dan Winship
e40063fc34 [MessageTray] add support for notification actions
https://bugzilla.gnome.org/show_bug.cgi?id=606979
2010-02-03 13:43:17 -05:00
Dan Winship
d20d815b45 [MessageTray] Merge Notification and NotificationBox
This will (eventually) give sources more control over the form of
notifications

https://bugzilla.gnome.org/show_bug.cgi?id=606979
2010-02-03 13:43:17 -05:00
Dan Winship
fa60165764 [MessageTray] do pop-out on hover for long notifications
https://bugzilla.gnome.org/show_bug.cgi?id=606755
2010-02-02 14:00:17 -05:00
Dan Winship
3c9d0fbca6 [MessageTray] fix up allocation, ellipsize long notifications
https://bugzilla.gnome.org/show_bug.cgi?id=606755
2010-02-02 14:00:07 -05:00
Dan Winship
8d31c2f4dc change a few stray tabs to spaces 2010-02-02 10:31:38 -05:00
Siegfried-Angel Gevatter Pujals
eaa1f9a0f4 [MessageTray] Fix positioning for multi-monitor environments
We can't assume that the primary monitor is at position (0, 0);
there may be another monitor configured at the left or at the top.
2010-02-02 14:02:32 +01:00
Marina Zhurakhinskaya
2494cc1637 Show summary mode briefly after notification
This helps illustrate that expired notifications move to the summary view.

Animate the separate components of the message tray individually
as in http://www.gnome.org/~mccann/shell/mockups/20090630-demo

Based on the patch from Florian Müllner.
2010-01-28 13:39:00 -05:00
Marina Zhurakhinskaya
ee75355e71 Replace direct call to MessageTray::showNotification() with 'notify' signal in Source::notify()
This decouples Source and MessageTray, so Source doesn't need to know how
MessageTray works.
2010-01-28 13:20:17 -05:00
Florian Müllner
4006d7d57f Adjust message-tray on resolution changes
https://bugzilla.gnome.org/show_bug.cgi?id=608058
2010-01-25 21:26:47 +01:00
Dan Winship
11276a3505 Initial implementation of the message tray and notification daemon
From the message-tray branch. Most of the UI parts were written by
Marina, and most of the D-Bus parts by me.
2010-01-13 15:13:20 -05:00