Commit Graph

702 Commits

Author SHA1 Message Date
Adel Gadllah
e6b80927ad Fix demands attention to work with new messagetray api 2010-02-22 23:43:02 +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
Florian Müllner
a21ba292eb Cancel zoom of non-focused windows when leaving overview
When leaving the overview by hitting escape or super, all windows animate
to their original positions. Zoomed windows are kept above others until
the animation ends, then the focused window is brought to the front; as
this looks odd if the zoomed window does not have focus, cancel the zoom
in that case before leaving the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=609243
2010-02-22 23:41:09 +01:00
Florian Müllner
5429104f04 Fix problems when leaving the overview with a zoomed window
While zooming, a window clone is reparented to the stage and thus cannot
be destroyed automatically by the "parent" container. To prevent the clone
and the corresponding overlay from leaking, we enforce destroying the clone
with the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=609243
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
Maxim Ermilov
fc39919856 Add top and bottom shadows to app browser
Add a 'vshadow' property to StScrollView, which, when turned on,
overlays gradient shadows on the top and bottom of the StScrollView.

Turn this on for the StScrollView used for the app browser.
https://bugzilla.gnome.org/show_bug.cgi?id=609604
2010-02-23 01:12:13 +03:00
Dan Winship
d8800c095a NotificationDaemon: add rewriteRules infrastructure, use it for xchat
Changes notifications like:

    XChat: Private message from: danw (GimpNet) blah...

to

    danw: blah blah blah blah

(the "XChat" being unnecessary since there's already an xchat icon
there anyway.)

https://bugzilla.gnome.org/show_bug.cgi?id=608915
2010-02-22 17:09:13 -05:00
Dan Winship
e5ba414f2d Add the workspaces view key to the gconf schema
Also rename the key to make it less ambiguous, and change its value
from an int to a string.

https://bugzilla.gnome.org/show_bug.cgi?id=609871
2010-02-22 17:01:47 -05:00
Mads Villadsen
b8a9eec14f Make width of workspace switcher popup dynamic
Make the width of the workspace switcher dynamic in order to make it have the same proportions as the actual screen.

Call redraw after adding indicator to stage to avoid warning.

https://bugzilla.gnome.org/show_bug.cgi?id=610049

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
2010-02-22 20:29:49 +01:00
Adel Gadllah
059504ca70 Add demands attention support to the messagetray
Inform the user about demands attention events using the messagetray.

Clicking on the notification icon moves the user to the window.

It differentiates between newly started apps and windows of already running apps, by showing different banners for this cases.

It is based on Jon Nettleton's "window attention" extension.

https://bugzilla.gnome.org/show_bug.cgi?id=610594
2010-02-22 20:09:43 +01: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
b6bb26e9ae Add additional padding to the view specific workspace controls
In the latest mockup, there is more spacing around the scroll bar than
between the other controls.

https://bugzilla.gnome.org/show_bug.cgi?id=610189
2010-02-22 18:47:04 +01:00
Florian Müllner
126d02ae90 Fix invalid call to st_widget_get_theme_node() in WindowOverlay
WindowOverlay has two actors, both with custom style properties, which
share a common _onStyleChanged() handler. This is not a problem when
entering the overview, because the actors' parent (the workspaces group)
is hidden while the actors are added. However, when windows are added to
the workspace while in the overview (e.g. when opening a new window or
dragging a window from one workspace to another), adding the first actor
to the workspaces group triggers a style-changed signal - the handler
then calls st_widget_get_theme_node() on both actors, which triggers a
warning as the second actor has not been parented yet.

https://bugzilla.gnome.org/show_bug.cgi?id=610279
2010-02-22 18:33:58 +01:00
Maxim Ermilov
8d76e362a0 _computeWindowMotion calculate difference between relative positions
https://bugzilla.gnome.org/show_bug.cgi?id=607826
2010-02-22 20:14:13 +03:00
Colin Walters
004cf3da5c [appDisplay] Use AUTOMATIC for apps-more, not ALWAYS
No need to display a scrollbar if we don't need to, and ALWAYS
isn't yet implemented anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=609015
2010-02-22 12:07:23 -05: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
Maxim Ermilov
690be611ee Implement newer design for "more apps" view
Replace the old GenericDisplay-based system with one which reuses
the WellGrid class and uses a new scrolling container.

https://bugzilla.gnome.org/show_bug.cgi?id=609015
2010-02-19 15:39:26 -05:00
Maxim Ermilov
cfd63c7d4c fix selection of all-workspace windows
all-workspace windows can be active on every workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
2010-02-19 21:29:46 +03:00
Maxim Ermilov
49a9335f68 fix sizing of all-workspace windows in the overview
Window can have more then one clones on different workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
2010-02-19 21:29:35 +03:00
Florian Müllner
9f43ed3f95 Use _onDestroy() handlers for cleanup in delegates
Unify the style of <delegate>.destroy() methods to only contain a
call to <delegate>.actor.destroy() and handle additional cleanup
in a _onDestroy() signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=609454
2010-02-18 22:50:34 +01:00
Florian Müllner
0770fd5be5 Use St.Button for preview close buttons
Originally, we used St.Bin for the preview close buttons - using
St.Button instead adds support for pseudo classes to style different
button states.
2010-02-18 19:25:28 +01:00
Florian Müllner
3c8ba348c2 Slide out removed workspaces in linear view
Instead of deleting workspaces immediately, animate the removal - it may
be useless eye-candy, but it's pretty sexy nonetheless ...
More seriously, the animation improves consistency with both workspace
additions and the mosaic view.

https://bugzilla.gnome.org/show_bug.cgi?id=609673
2010-02-17 23:37:05 +01:00
Florian Müllner
b84a7042f1 Make spacing between workspaces stylable
Currently the width of the gaps between workspaces in both linear
and mosaic view are defined as constants. Move these to the theme's
CSS instead.

https://bugzilla.gnome.org/show_bug.cgi?id=609673
2010-02-17 23:37:05 +01:00
Florian Müllner
8ef75524ea [Workspaces] Clean up scrolling in linear view
Reorganize the code to break up positioning into:

1) updating workspace object's scale and position
2) applying the updated parameters to the workspace actor
3) scrolling the view to a particular workspace
4) handling dragging of the scroll bar

With these cleanups, it becomes much easier to fix
the following issues:

- use animations consistantly instead of doing hard breaks
  for some actions and smooth transitions for others
- snap to the closest workspace when scrolling stops
  (https://bugzilla.gnome.org/show_bug.cgi?id=607823)
- fix the regression of the zoomFromOverlay animation when
  the selected app is on another workspace
  (https://bugzilla.gnome.org/show_bug.cgi?id=609081)

https://bugzilla.gnome.org/show_bug.cgi?id=609673
2010-02-17 23:36:58 +01:00
Dan Winship
cec62a7ca5 Main.activateWindow: always exit the overview if it's currently open
This way, clicking a message tray icon while the overview is open will
close the overview when activating its window.

Remove some other overview-related activation code which is now
redundant.

Also, remove calls to "global.get_current_time()" when calling
Main.activateWindow, since it's unnecessary (activateWindow will call
it itself if you don't pass in that arg).

https://bugzilla.gnome.org/show_bug.cgi?id=609765
2010-02-17 17:08:28 -05: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
Maxim Ermilov
fd310bc7b9 Correct position of window previews.
align the bottoms of the window previews.
window previews always fit in the slot.
https://bugzilla.gnome.org/show_bug.cgi?id=610070
2010-02-17 19:56:45 +03:00
Adel Gadllah
6aa02c5edc [AppSwitcher] Make sure that fallback icons have correct box sizes
Fallback icons (i.e icons < requested size) cause the box in the switcher
to be a smaller rectangular item instead of the normal sized square one.

Fix that by putting the icons in a St.Bin with the correct size.

https://bugzilla.gnome.org/show_bug.cgi?id=609777
2010-02-17 10:52:11 +01:00
Florian Müllner
97e19d7d4a Adjust behavior of search results to match app well
Currently, activating a search result always opens a new window. Change
this behavior, so that if an application has open windows, the most
recently used one is activated instead.

Also change the implementation of dnd of search results to allow providers
to treat results activated via dnd differently.

https://bugzilla.gnome.org/show_bug.cgi?id=610027
2010-02-16 23:50:35 +01: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
Adel Gadllah
4749393ab5 Remove panel-run-dialog/main-menu handling from shell-global
This is handled by the shellwm (takeover_keybinding) nowdays.

https://bugzilla.gnome.org/show_bug.cgi?id=610039
2010-02-16 16:50:40 +01: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
Florian Müllner
2a2b597e09 [Overview] Make background color stylable
https://bugzilla.gnome.org/show_bug.cgi?id=609401
2010-02-15 22:14:28 +01:00
Florian Müllner
03a750176b Fade out desktop icons when showing overview
As desktop icons don't have any purpose in the overview (except for
distracting the user), fade them out when entering the overview.

Unfortunately, the fading effect affects performance, therefore hide
icons directly when there are maximized windows on the desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=600999
2010-02-15 21:49:11 +01: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
Adel Gadllah
a6df234528 Make workspace indicators drop targets
Allow dropping on the workspace indicators to open apps on specific workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=609913
2010-02-15 17:24:44 +01:00
Dan Winship
229cfd9f80 xgettext only recognizes _("foo"), not _('foo') in .js files. Fix
Noted in https://bugzilla.gnome.org/show_bug.cgi?id=609838
2010-02-15 08:33:35 -05:00
Maxim Ermilov
901eabb82d Fix problem with make system.
https://bugzilla.gnome.org/show_bug.cgi?id=609811
2010-02-13 18:41:13 +03:00
Adel Gadllah
dd0fba4270 Revert "Add workspaceSwitcherPopup.js to Makefile.am"
This reverts commit 3f6759061d.

Proper fix is in https://bugzilla.gnome.org/show_bug.cgi?id=609811
2010-02-13 15:16:53 +01:00
Adel Gadllah
3f6759061d Add workspaceSwitcherPopup.js to Makefile.am
Re add accidentally omitted change.

https://bugzilla.gnome.org/show_bug.cgi?id=609187
2010-02-13 15:12:39 +01:00
Adel Gadllah
abc7b1ff02 New workspace switcher popup
Replace the current workspace switcher popup (which is still the old metacity popup), with a clutter based one, which fits better into the overall shell design.

https://bugzilla.gnome.org/show_bug.cgi?id=609187
2010-02-12 23:52:15 +01:00
Owen W. Taylor
38b7904f92 Distinguish translator comments for date formats
Don't say 'This is a time format' for both time formats, but
label them as 24-hour and AM/PM.
2010-02-11 14:53:14 -05:00
Colin Walters
c89ee2f8f2 [panel] Fix typo in previous clock patch
We shouldn't be displaying hours as 24 in am/pm case
2010-02-11 14:42:12 -05:00
res
c21e692652 [panel] Detect clock AM/PM from locale
Look at whether a localized time string from JS includes am/pm to
determine whether we should show it in the UI.
2010-02-11 14:01:19 -05:00