Commit Graph

89 Commits

Author SHA1 Message Date
Owen W. Taylor
ae5131f902 Make a separate class for workspace thumbnails box
Add WorkspaceThumbnail.ThumbnailsBox to handle managing the array
of workspace thumbnails; the logic will get more complex as we add
scaling and animation.

https://bugzilla.gnome.org/show_bug.cgi?id=641879
2011-02-17 11:34:30 -05:00
Adel Gadllah
c2ae95f912 AppWellMenu: Remove window filtering
Don't filter and highlight windows when opening the menu
as this turned out to be distracting and confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=642189
2011-02-14 23:07:27 +01:00
Maxim Ermilov
aba6a85c56 workspace: don't show WindowOverlay during zoomFromOverview
https://bugzilla.gnome.org/show_bug.cgi?id=641533
2011-02-11 00:43:22 +03:00
Owen W. Taylor
fb71250dce Improve workspace controls slide-in positioning
Intead of using a St.Group and tweening the position of the controls
actor, use a St.GenericLayout and tween a Javascript property. This
allows us to more reliably track the height of the overall workspace
display and propagate it to the controls actor.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:21 -05:00
Owen W. Taylor
1b8bfda3b4 Avoid popping the workspace controls in and out at the end of DND
At the end of a drag operation, we would invoke the code to slide the
controls in (because we were no longer DND'ing and not hovering) and
then immediately afterwards invoke the code to slide it back out when
we got the ENTER event from the end of DND. While the immediately
overridden tween probably won't have any visible effect it's better
to avoid this, so wait to update the zoom state until BEFORE_REDRAW.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:21 -05:00
Owen W. Taylor
f038ce1c69 Remove now unnecessary workspace controls
With automatic workspace management, explicit controls to add and
remove workspaces are no longer necessary. We also can remove the
use of addWorkspace for middle-button-click on a launcher since
launching on the last empty workspace will do the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
e6938ed06c Add automatic workspace management
Automatically add and remove workspaces so that the last workspace is
always empty and no workspaces are empty other than that workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
2d5133ad51 Don't activate newly added workspaces
With workspace thumbnails, we want to make workspace switching
something that happens largely under the users control, so don't
switch to newly added workspaces in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
6514bc845f Add workspace thumbnails to the overview
Add workspace thumbnails to the workspace controls area. The user can
click on the thumbnail to switch workspaces and can also drag windows
out of the thumbnail to other workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
eda12542c0 Move restacking handling from WorkspacesView to WorkspacesDisplay
Moving the base tracking of restacking to WorkspacesDisplay will allow
us to use it to update stacking in the workspace thumbnails as well as
in the main workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
7c2aee3ac0 Use a single "zoomed out" view for both workspace controls hover and DND
Instead of having a separation between popping the controls out on hover
and zooming out for DND, always do both at once. This is necessary because
when we added workspace thumbnails the controls will get bigger, so we need
to make sure we zoom out far enough so that the windows don't overlap the
controls.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
3c593fc056 Don't check for Workspaces.WindowClone for window drops
When checking the type of a DND source, instead of checking
'instanceof Workspaces.WindowClone' accept any actor with realWindow
and metaWindow properties. This will be useful to support a separate
type of actor dragged from workspace thumbnails.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
9748cc264a Remove workspace indicators
Once we have workspace thumbnails in the overview, workspace indicators
will no longer be needed.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Owen W. Taylor
295d286161 Switch to a vertical layout for workspaces
The new plans for a row of workspace thumbnails on the right side of the
overview means that the mental model we present to the user will be
vertical, so switch the Metacity workspace layout to be vertical and
adjust the keybinding handling, animations, and workspace layout in
the overview to match.

(This commit does not change the workspace switching indicator pending
finalization of what we want to do with that - it still shows workspaces
arranged vertically.)

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Maxim Ermilov
e3acaa05be Remove st_container_remove_all & rewrite st_container_destroy_children
1. Both functions leaked the nodes in priv->children
2. st_container_remove_all wasn't properly updating first_child and last_child
3. remove_all() is almost never right since it won't cause signal handlers
   on the children to be removed. In the rare cases where it might be needed
   the caller can simply use clutter_container_remove().
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-02-01 23:41:21 +03:00
Maxim Ermilov
457c7adf59 workspacesView: dispose _scrollAdjustment in _onDestroy
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-02-01 23:41:11 +03:00
Maxim Ermilov
8ebdb7f493 workspacesView: remove duplicate connection to same signal 2011-02-01 23:41:05 +03:00
Florian Müllner
d64d491f63 workspaces-view: Use overview swipe-scrolling
Remove the swipe-scrolling implementation in WorkspacesView and
use the new overview facility.

https://bugzilla.gnome.org/show_bug.cgi?id=635034
2011-01-24 02:59:39 +01:00
Adel Gadllah
ceedc7e32c Implement cross overview drag & drop
The gnome-panel allows the user to hover over a tasklist entry
while draging to activate a minimized or obscured window and drop onto it.

Implement a similar behaviour by allowing draging to the activities button or
the hotcorner (and thus opening the overview), which allows the user to
activate any window (even on different workspaces) as a drop target.

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2011-01-05 23:19:56 +01:00
Florian Müllner
6f9ede569e workspace-indicators: Add hover indication
Scale up indicators on hover to hint at their clickability.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
5fef9188c9 workspaces: Change handling of window-drag signals
Delegate the emission of the window-drag-begin/window-drag-end
signals to overview functions, as done already for other items.
This will enable objects to react to those signals without having
access to the workspace objects / the workspaces view.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
d5d7d8a391 overview: Add ViewSelector to the overview
Add the view selector and adjust the positioning of elements in the
overview. Unlike the old dash, the view selector is made public to
indicate that extensions may add additional views or search providers.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
7811632e6f workspaces: Rework workspace controls for the view selector
As workspaces will appear as a particular view in the view selector,
merge WorkspacesControls and WorkspacesManager to control workspaces
and related controls, so that a single actor can be added to the
selector instead of positioning the elements from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
6c5c3bedbe workspaces-view: Swap workspace ordering for RTL locales
Make the first workspace the right-most one in RTL locales, as one
would expect. Update all dragging/scrolling functions to behave
correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
0942f50781 workspaces-view: Remove MosaicView
The new layout does no longer support view switching, so merge
GenericWorkspacesView and SingleView, and remove MosaicView.
Also rename or remove workspace properties and functions which
are now unused.
The grid will have a comeback with the new DND behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
2d2ac5b3f6 linear-view: Remove NewWorkspaceArea
As the button to add workspaces will move to the same position as
the new workspace drop area in drag mode, the latter is redundant
and can be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
e06b608b10 linear-view: Remove shadows when zoomed out
Overlaying inactive workspaces with a gradient to fade out the actors
does no longer work when re-using the normal desktop background. If
we keep the current DND behavior, we probably want to implement a real
fade effect - for now, just remove the visually disruptive shadows.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
f24e567dc4 overview: Do not zoom the desktop background
While scaling the desktop background with the window previews represents
workspaces quite intuitively, the approach is not without problems.
As window previews in the overview behave quite differently to "real"
windows, the representation of workspaces as miniature versions of
"real" workspaces is flawed. The scaling also makes the transitions
to and from the overview much more visually expensive, without adding
much benefit.
Leaving the background in place provides more visual stability to the
transitions and emphasizes the distinctive behavior of elements in the
overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
1ea488bb3d overview: Replace InfoBar with message tray notifications
The layout of recent mockups occupies the space previously reserved
for the info bar with the view selector. As the bar's purpose is
mainly to provide the user with feedback, it makes sense to use the
existing message tray facility instead of moving the bar elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
8d47a150df linear-view: Remove the scrollbar
The scrollbar is the main culprit for cluttered controls in the
linear view - all its functionality is already provided by the
workspace indicators, so it is save to remove the scrollbar in
order to clean up the interface.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Owen W. Taylor
2fa6f7ba7e Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=632500
2010-10-23 14:02:45 -04:00
Dan Winship
8886b7433c StThemeNode: simplify use of get_color/get_double/get_length
Although within St itself there are situations where the semantics of
these functions (return TRUE or FALSE and return the actual value in
an out parameter) is useful, it's mostly just annoying at the
application level, where you generally know that the CSS property is
going to specified, and there is no especially sane fallback if it's
not.

So rename the current methods to lookup_color, lookup_double, and
lookup_length, and add new get_color, get_double, and get_length
methods that don't take an "inherit" parameter, and return their
values directly. (Well, except for get_color, due to the lack of (out
caller-allocates) in gjs.)

And update the code to use either the old or new methods as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=632590
2010-10-21 15:02:33 -04:00
Maxim Ermilov
38c3422331 [DND] change cursor when dragging
Return a DND.DragMotionResult constant from delegate _handleDragMotion
methods as well as the existing return value from the drag monitor method dragMotion.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-09-10 06:00:28 +04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Florian Müllner
d8f7629a4f [linearView] Update workspace opacity
While zoomed out in drag mode, the workspaces at the left and right
of the active workspace are slightly transparent - when switching
workspaces, one of the transparent workspaces becomes the new active
workspace, but its opacity is not updated.

https://bugzilla.gnome.org/show_bug.cgi?id=620940
2010-06-16 20:56:10 +02:00
Florian Müllner
7514dfaef9 [linearView] Drop _dropGroup
When in drag mode, the linear view raises a transparent actor
covering the entire stage. That way the view can handle events
like dragging items to the screen edges, but in order to not
disable any drop target not handled by itself, it duplicates
huge amounts of code from dnd.js.

Cleanup that mess by using the new drag monitoring support.

https://bugzilla.gnome.org/show_bug.cgi?id=620504
2010-06-16 20:56:10 +02:00
Adel Gadllah
fe91f7fe9e [overview] Fix dnd on mulit screen setups
Currently we don't get any drop events for dual screen modes with a screen
at the right, and behave weird by hardcoding the screen size and 0 as drag
edges.

Fix that by spawning the drop group over the whole stage and take the primary monitors position and size into account in _handleDragOver.

https://bugzilla.gnome.org/show_bug.cgi?id=620378
2010-06-03 11:35:51 +02:00
Florian Müllner
a57a34c540 [linearView] Zoom out when dragging an item from the dash
When dragging windows in linear view, the workspace zooms out to
allow moving the window to other workspaces. Enable the same
behaviour for items dragged from the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=618055
2010-05-27 12:12:10 +02:00
Florian Müllner
b3794f1c17 [linearView] Fix dnd to dash when zoomed out
While zoomed out, the workspaces view's drop target spans the entire
monitor to implement reactive screen edges. When a drop event is not
handled by the view, an attempt is made to pass it on down the stack,
but it doesn't work properly. Fix it by iterating the target's parents
as well.
Also improve the code which translates dnd coordinates to target
positions.

https://bugzilla.gnome.org/show_bug.cgi?id=619203
2010-05-27 12:12:10 +02:00
Florian Müllner
3e2a9a57a1 [dnd] Optionally restore the drag actor
Currently, the drag and drop code assumes that on a successful drop
the target will either consume the drag actor or that it is otherwise
OK to destroy the actor.
As the drag behavior for window preview was changed, dropping a preview
on the dash now results in the preview being swallowed - to fix, add an
option to restore the actor in case of a successful drop as well.

https://bugzilla.gnome.org/show_bug.cgi?id=619203
2010-05-26 14:06:53 +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
Dan Winship
8b242dd4bd minor js cleanups
add missing semicolons pointed out by js2-mode, add missing emacs
modelines, fix a few tabs that crept in via cut+paste
2010-05-19 13:26:41 -04: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
Marina Zhurakhinskaya
4ce2620b68 Don't add a new workspace when the maximum workspaces limit is reached
It was previously possible to add a workspace above the maximum workspaces
limit by dragging an item to the "add workspace" button or using the middle
mouse button click.

Provide the user with feedback in the info bar when it is not possible to create
a new workspace or remove the current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=591645
2010-05-13 14:30:52 -04:00
Marina Zhurakhinskaya
ec6bc8f216 Make the workspace added on the middle mouse button click active
This ensures that we launch the new instance of an application on the newly
added workspace in the grid view, in which we don't make the newly added
workspace active by default.

https://bugzilla.gnome.org/show_bug.cgi?id=591645
2010-05-13 14:30:52 -04:00
Adel Gadllah
44c2027b40 linearView: Cancel workspace scrolling when the user stops dragging
Currently there is no way for the user to cancel a workspace drag action,
which means the user has to complete the drag action before and move back
to the other workspace manually afterwards.
So cancel the drag action when the user stops.

https://bugzilla.gnome.org/show_bug.cgi?id=618062
2010-05-10 21:28:26 +02:00
Florian Müllner
2ca1fe3254 [workspacesView] Animate showing/hiding of controls
Some of the workspace view controls are hidden when the number of
workspaces is one (view toggle button, scroll bar in single view).
Use a fade effect instead of showing/hiding the control abruptly.

https://bugzilla.gnome.org/show_bug.cgi?id=613456
2010-05-09 10:46:32 +02:00
Florian Müllner
88211ed4bb [linearView] Animate scroll bar size changes
When adding/removing workspaces in linear view, both workspaces and
scrollbar movement are animated, but the size of the scrollbar handle
changes abruptly. It is more consistent to animate the size change
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=613456
2010-05-09 01:48:23 +02:00
Maxim Ermilov
daf133dca8 [workspaces] Split out workspace indicator into separate class
Also fix Clutter warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=614905
2010-05-06 12:16:05 +04:00