Commit Graph

737 Commits

Author SHA1 Message Date
Colin Walters
087ac8470e [panel.js] Remove duplicated 'let'
Original fix from Maxim Ermilov <zaspire@rambler.ru>
2010-03-16 10:51:05 -04:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Adel Gadllah
cb80dc6834 Use CSS for spacing
Use CSS instead of St.Bin actors for spacing.

https://bugzilla.gnome.org/show_bug.cgi?id=612852
2010-03-14 11:11:52 +01:00
Colin Walters
3aea09b614 Fix app icon fading
The way we were loading data into a CoglTexture, then pulling it out
and manipulating it on the CPU, then loading it back into a texture
was a bit lame.

Clean things up a bit here by loading directly into the CPU, doing
the fading, then creating a texture.

Also cache the faded data in StTextureCache.

https://bugzilla.gnome.org/show_bug.cgi?id=612759
2010-03-13 12:50:38 -05:00
Abderrahim Kitouni
2da6507a87 fix workspace controls for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2010-03-11 16:51:47 -05:00
Abderrahim Kitouni
5ca665bdde fix minimize animation for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2010-03-11 16:51:26 -05:00
Florian Müllner
858a6bf827 [Overview] Update look and feel of the search field
Port the search entry to CSS and update look and feel according to
the latest design.

https://bugzilla.gnome.org/show_bug.cgi?id=611095
2010-03-11 21:22:31 +01:00
Owen W. Taylor
33dca51650 Rework StDrawingArea not to use ClutterCairoTexture
Having StDrawingArea use ClutterCairoTexture causes circularity
problems with sizing - StDrawingArea wants to use its allocation for
the size of the texture, but ClutterTexture wants to use the size of
the texture to determine the requited size.

Avoid this by making StDrawingArea directly use Cairo and CoglTexture;
while doing this, the API is changed a bit for simplicity and to
match our use case:

 - Instead of clutter_cairo_texture_create(), we have
   st_drawing_area_get_context() to retrieve an already created
   context. This can only be called in the ::repaint signal.

 - The ::redraw signal is changed to ::repaint so we can have
   st_drawing_area_queue_repaint() that doesn't collide with
   clutter_actor_queue_redraw()

 - ::repaint is now emitted lazily when painting the actor rather
   than synchronously at various different points.

https://bugzilla.gnome.org/show_bug.cgi?id=611750
2010-03-11 15:08:48 -05:00
Adel Gadllah
2016e08f7b Don't activate workspace when more than one window is open
Currently clicking on an empty spot on the workspace actors switches to the workspace, this has a side effect that when for some reason (like using a touchpad),
the user misses the window he intends to open he will end up with the currently focused window instead.

Disable this behaviour if more than one window is open (in that case the user has to explicitly target a specific window).

https://bugzilla.gnome.org/show_bug.cgi?id=610868
2010-03-09 22:35:51 +01:00
Florian Müllner
62ca7fb268 [runDialog] Support opening files and folders
Support completion on files and folders in the run dialog and launch
the default application when activated. Assume a path relative to the
home directory if execution as command fails and the input doesn't start
with a slash.
Removed workaround for relayout of error messages.

https://bugzilla.gnome.org/show_bug.cgi?id=611209
2010-03-09 00:12:58 +01:00
Maxim Ermilov
765779272f Look at current mouse position for dropping
Previously we used the top-left corner which was not intuitive,
particularly when dragging partially opaque actors.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-03-09 01:53:27 +03: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 Scandella
d2bf7ec66c add missing import
https://bugzilla.gnome.org/show_bug.cgi?id=612018
2010-03-08 14:41:54 +01:00
Florian Müllner
fe0f4060c4 [Overview] Fix click handling of open panes
The top part of the application pane closes the pane, while outside
the menu only the workspace area accepts clicks for closing the pane.
Let the user close the pane by clicking anywhere outside the menu, but
not inside.

https://bugzilla.gnome.org/show_bug.cgi?id=611641
2010-03-07 23:53:06 +01:00
Florian Müllner
40b0459174 [Overview] Delay repositioning after closing windows
When closing windows in the window picker, the remaining windows
move to their new positions, which prevents the user from performing
additional actions in the picker until the animation stops and the
user adjusts to the new layout.

Instead we try to be smart and delay the repositioning, either until
the pointer stops moving or until it leaves the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=611167
2010-03-07 23:45:46 +01:00
Colin Walters
8b3258cb09 Revert "Clean up definition of dragOffsetX, dragOffsetY"
This reverts commit aa7de264e6.
2010-03-05 16:57:09 -05:00
Colin Walters
22948b3d39 Merge St.TextureCache and Shell.TextureCache
Brute force merge these two by essentially replacing St.TextureCache
with a (renamed) Shell.TextureCache.

One function was added for convenience, namely "st_texture_cache_load_file_simple".
St.TextureCache had a function to load a texture from a filename, and it
returned NULL on error but only half the callers actually checked this.  This
function is better.

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-03-05 16:19:40 -05:00
Colin Walters
aa7de264e6 Clean up definition of dragOffsetX, dragOffsetY
These variables were computed strangely; through cancellation
they'd end up being negative 1/2 the width/height of the actor,
so just use that directly.

https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-03-05 15:29:29 -05:00
Dirk-Jan C. Binnema
046e0609ab Improve 12/24 clock detection
The current check looks at whether there was some am/pm suffix in the
localized time; however in some cases (locales) that does not seem to
work. this version instead checks whether the localized versions of 05:00 and
17:00 start with the same two digits; if not, it's probably a 24h clock.

https://bugzilla.gnome.org/show_bug.cgi?id=603488
2010-03-05 12:02:18 -05:00
Colin Walters
fbb88da134 [search] Fix activation of results from custom renderers
The previous commit broke activation when selecting an actor
from a custom renderer.  Fix this by explicitly defining a method
activateSelected on the search renderer.
2010-03-04 15:12:06 -05:00
Colin Walters
83f11870da Use AppWellIcon for search results
Switch to using an application icon as per design.

We need to drop the 4 pixels padding to ensure we fit 3 icons.

There was a typo where getVisibleCount should have been getVisibleResultsCount.

https://bugzilla.gnome.org/show_bug.cgi?id=610740
2010-03-04 14:08:13 -05:00
Colin Walters
347196d35c [panel] Fix RTL for appMenu, allocation, other misc.
Other misc includes:
* Remove some unused CSS
* Readd comments

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-03-01 13:34:20 -05:00
Florian Müllner
21641d8925 Clip workspace area in grid view
When workspaces slide in/out in mosaic view, they may cross with the
workspace controls, which looks pretty weird.

Also adjust the vertical spacing in the grid view so that the grid height
matches the workspace height in the linear view.

https://bugzilla.gnome.org/show_bug.cgi?id=610350
2010-03-01 19:42:55 +01:00
Florian Müllner
499c5737da [Overview] Base minimum motion on actors
When figuring out where to position window previews, use the clone's
position instead of the the original meta window. There shouldn't be
a difference when entering the overview, but it makes the motion when
opening/closing new windows in the overview tinier and more predictable.

https://bugzilla.gnome.org/show_bug.cgi?id=611167
2010-03-01 19:42:55 +01:00
Colin Walters
ae3d1423e5 [panel] Handle async load of icons correctly
Fading the application icon required the texture to have already been
loaded, which was normally the case since we create icons for apps
in the well and browser; but when finding an app not from there,
the cogl-texture for the icon might not be available.

Fix this by watching for the texture and fading when it appears.

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-02-28 15:53:22 -05:00
Colin Walters
d56fbf6d6a [panel] Fix AppPanelMenu's allocation
Because we were setting the "fixed-position-set" property
on the internal label, its width/height requests weren't
being accounted for in the size request of the overall box.

The way we were hooking up to notify::allocation was hacky; do
this correctly by simply implementing a container.

https://bugzilla.gnome.org/show_bug.cgi?id=611288
2010-02-28 15:53:22 -05:00
Florian Müllner
d7075d9913 [lookingGlass] Add style information to the picker
Currently the picker displays information on the hovered actor's
position and the object itself. Adding style id and class of
StWidgets to the displayed information can be very helpful for
identifying a particular actor or code segment.

https://bugzilla.gnome.org/show_bug.cgi?id=611211
2010-02-26 23:33:30 +01:00
Maxim Ermilov
72cb4bf346 Port Lightbox to CSS and use it in runDialog
Make Lightbox stylable and add a common style. Use it in runDialog.
https://bugzilla.gnome.org/show_bug.cgi?id=604978
2010-02-26 23:16:55 +03:00
Maxim Ermilov
bffadf1b6e Improve run dialog
Bind <Ctrl>+<Return> for run in terminal.
Port runDialog to css.
https://bugzilla.gnome.org/show_bug.cgi?id=604978
2010-02-26 20:22:39 +03:00
Abderrahim Kitouni
ec36a0070e fix manual placement for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2010-02-25 14:45:07 -05:00
Abderrahim Kitouni
216dafd5b1 fix menu position for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2010-02-25 14:45:05 -05:00
Dan Winship
a4feb91644 Fix single-actor widgets
clutter_actor_unparent() is for use by container implementations only,
unlike gtk_widget_unparent()

https://bugzilla.gnome.org/show_bug.cgi?id=588090
2010-02-25 14:42:58 -05:00
Florian Müllner
ff01bf68fd Simulate a focus-app change when leaving the overview
When the currently focused app sends a notification while in the overview,
the corresponding source icon is not removed when the overview is left.
It does make some sense to treat the overview transition the same as a
normal focus change, so we should update the summary view accordingly.
2010-02-24 22:13:36 +01:00
Florian Müllner
edbfafc5bd Fix clicking on notification icons after updates
When a notification is updated by the application, the corresponding
app in its source is lost, so it is no longer possible to switch to
the application by clicking either the notification or the summary icon.
As the associated application of a source never changes, it appears safe
to leave it alone on notification updates.

https://bugzilla.gnome.org/show_bug.cgi?id=610820
2010-02-24 19:57:35 +01: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
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