Commit Graph

64 Commits

Author SHA1 Message Date
Dan Winship
062e1aa78b Reorganize overlay hiding/showing code
Rather than having main.js manage this, put it into overlay.js, and
have the overlay object emit signals that other code can watch to do
things when the overlay is showing/shown/hiding/hidden.
2009-05-07 16:41:07 -04:00
Owen W. Taylor
20e755023b Clean up underscores in function and variable names
Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
2009-05-04 13:50:49 -04:00
Marina Zhurakhinskaya
82cf98740a Bug 578178 – Show large previews for image files
Use the actual image from the file for expanded mode previews for image files. Use the pixbuf loader to set the appropriate image size as soon as the image is prepared, but before it is loaded, to avoid loading large images. Apply the pixbuf orientation setting so that the image is properly rotated. Preserve the original size of the image if its dimensions are smaller than the space available.

Make sure we provide the accurate available width for the details actor. This
width has to exclude the padding and border width. Also provide the available height for the details actor.
2009-04-28 15:35:36 -04:00
Sander Dijkhuis
7c8cb8450c Bug 578584 - Use the wallpaper for the overlay background
The overlay looks nicer with the root window pixmap drawn on the
background. It is scaled up to twice the size, with positioning
based on the rule of thirds.

The sideshow animations shown when entering or leaving the
overlay and toggling the extended view were implemented by
Marina Zhurakhinskaya. They replace the old method of having a
black rectangle behind the workspaces that partly covers the
sideshow during transitions.

configure.ac: Add gdk-x11, clutter-x11 and clutter-glx modules.
overlay.js: Add a root window pixmap actor, make sideshow width
    definitions more logical, replace the way the sideshow
    animates when entering or leaving the overlay.
workspaces.js: Remove the backdrop, add helper functions for the
    overlay transitions.
shell-global.[ch]: Add a method that creates an actor displaying
    the root window pixmap and returning clones of it.
2009-04-22 02:46:36 +02:00
Colin Walters
a5a2112b31 Cleanup of search entry layout
This will be useful for later fine tuning.  We avoid some hard coded
offsetting in favor of using box layout.
2009-04-13 14:45:58 -04:00
Colin Walters
f5aed5127b Bug 578430 - Followup fix for docs
This commit follows up on 6760de9965c32f9f75901d3699aa7f2cb086f856
and adds the corresponding fix for "Less...".
2009-04-09 11:01:41 -04:00
Colin Walters
7ae278f206 Bug 578430 - Docs section regression
This fixes a bad merge which broke the docs section.
2009-04-09 10:58:58 -04:00
Colin Walters
b199ca2518 Add missing "return true" from event handler 2009-04-08 16:06:11 -04:00
Colin Walters
0a9226f7f2 Add a menu display to applications
ShellAppMonitor now depends on gmenu to load menus.

Use the menu data from ShellAppMonitor to show a menu list.

GenericDisplay implementations can now have a sidebar area.  We
handle keystrokes such as left/right explicitly.

Some internal API changes to account for the fact that a display
can have another filter in addition to the search.
2009-04-07 17:07:35 -04:00
Marina Zhurakhinskaya
5fbc0d4a56 Bug 577338 – Show item details on click in the expanded view
Change the overlay behavior to display more details about an item on single
click and launch it on double click.

When the item is clicked on in the expanded view, the details are shown in the
area on the right that is allocated for showing details. The details pop-up is
not shown for the item that was clicked on, but it is shown for other items on
hover and for the item that was clicked if the mouse pointer is moved back to
it.

Both hovering and single clicking results in the details pop-up being shown in
the regular view. (Single clicking actually doesn't do anything in the regular
view, but the details pop-up is shown due to hovering within the time it takes
to perform a single click.)

The overlay now uses 3 columns on the wide screen for displaying items in the
expanded view. This allows keeping the size of the details area the same for
expanded and regular views.

Add shell_get_button_event_click_count() to shell-global.[hc] to retrieve
the click count for button press and release events.

Add selectedItemDetails public variable actor to the generic display to
contain the details of the selected item and be shown in the overlay when
it is in the expanded view mode.

Fix the bug when the sideshow section would loose selection in the expanded
view if it did not have any items, and would not regain it if it was repopulated
with some items (e.g. when the search string changes).

The sideshow no longer takes overlay parent and width as constructor arguments.
It is added to the overlay inside the overlay code and manages its own width
instead (which is ok, since it is pretty much a private class within overlay).

Clean up the way selection is moved when an item is launched in order to have
selection on click and activation on double click be implemented in a similar
fashion. An unneeded _activatedItem variable in generic display was removed,
and the selected item is activated instead when necessary. The flow of processing
signals changed so that generic display no longer waits for the selection from
a different sideshow section to be removed before selecting an item that was
clicked on. This removed the need for doActivate() function.
2009-03-31 14:12:33 -04:00
Sander Dijkhuis
2b9b600710 Bug 574702 - Give the panel a gradient background and shadow
The panel looks nicer when it is drawn as a semi-transparent gradient
above the background color.

shell-global.[ch]: Add a function that creates vertical gradient actors.
panel.js: Change the look of the panel and put the tray in a framed box.
overlay.js: Extend the overlay background to behind the panel.
2009-03-24 15:20:16 -04:00
Marina Zhurakhinskaya
dcc0f368bd Add tooltip delay to the preview pop-ups.
Showing previews after a delay allows the user to move the mouse around
the screen without triggering constant pop-ups.

Make sure we remove the pop-up when the user hits Escape and redisplay
the pop-up if we are updating the section results due to a change in space
allocated for it.

Rename protected variable _hasPreview to _showPreview in order to not have
the naming conflict with a new private variable _havePointer, which we
name in first person.
2009-03-21 10:37:15 -04:00
Marina Zhurakhinskaya
288fb7a837 Bug 571426 - Show pop-up previews of sideshow items
The pop-up previews have larger images than the item displays, which is
particularly nice when we are displaying thumbnails for documents. The
previews are also at least as wide as is required to fit the item title
on one line and the item description inside them is wrapped. Therefore
they act as tooltips showing the full title and description text.

The preview updates when the item under the mouse pointer changes. Changes
in overlay.js ensure that we keep the sideshow on top when the
workspaces are not being animated so that we can find the item over which the
pointer is located.

The preview is removed when the item it is shown for starts being dragged.

_hideInProgress variable was added to represent the state of the overlay
when the code for hiding it was already triggered. This fixes the error
which was happening when the code for hiding the overlay was triggered
multiple times (for example by the user clicking the Activities button
twice when exiting the overlay).
2009-03-20 12:06:34 -04:00
Marina Zhurakhinskaya
39eb563687 Bug 574697 - Slide the workspaces back in if the user starts dragging a document or an application item in the expanded display mode
Sliding the workspaces back in when the user starts dragging an item in the
expanded display mode allows the user to select a workspace in which the item
should be launched and stay in the overlay mode.

This patch adds code to dnd.js that handles notifying actors when a drag item is being dragged over them. Overlay code uses such notification to unset expanded display modes and trigger sliding in of the workspaces.

If the drag is cancelled the drag item snaps back to its source or disappears at the original position of its source if the source is no longer displayed.
2009-03-11 15:41:33 -04:00
Marina Zhurakhinskaya
5af37f140e Bug 574117 - Allow paging through the application and document results in the overlay
Add a display control that contains page numbers for the result
pages and is shown in the expanded results view. All of the page selection and
switching is handled by the GenericDisplay which exposes a displayControl
actor, which is then displayed by the Sideshow.
2009-03-09 16:52:11 -04:00
Colin Walters
8b1f732228 Make Escape key close More... modes before closing overlay entirely
This matches what I'd expect at least.
2009-03-06 13:06:39 -05:00
Owen W. Taylor
cb4ad9a963 Fix behavior of More... links by adding a Link class
We had problems because the More links were reacting on press but
other elements were reacting on release. (Often the link would trigger
*and* an item.) Just connecting to ::button-release-event on
ClutterText gives a stuck grab (since ClutterText gets the press
but not the release), so we need more complicated code that we
encapsulate into a new class.

link.js: new "pseudo-widget" that implements a clickable link.
overlay.js: Use Link.Link for the More.. links

http://bugzilla.gnome.org/show_bug.cgi?id=573323
2009-02-26 18:07:25 -05:00
Marina Zhurakhinskaya
b39bc62171 Destroy workspaces background when exiting overlay mode
Otherwise, we kept adding new backgrounds which was breaking the overlay mode when it was re-entered.
2009-02-25 14:01:39 -05:00
Marina Zhurakhinskaya
009a8b3a04 Connect to 'text-changed' signal in the overlay search box
Replace connecting to 'notify::text' in the overlay search box
by connecting to 'text-changed' signal made available by ClutterText in Clutter 0.9.
2009-02-25 13:31:41 -05:00
Marina Zhurakhinskaya
95c87f87fa Bug 573078 – Add better transitions when expanding the item displays
Add black backgrounds to each item display, as well as a black
background with a full-screen height to the workspaces display.

Update the expanded item display up front when 'More...' is clicked, and
reveal the additional items gradually when the other components of the overlay
slide away.

Raise the documents display up gradually as the applications display above it slides away.

Reverse the process when 'Less...' is clicked. First, gradually cover up additional items by other components, and then update the displays to contain fewer items.
2009-02-25 13:23:12 -05:00
Owen W. Taylor
0f7abf96a7 Port to Clutter-0.9
tools/build/gnome-shell.modules: Point  at master branch of Clutter (0.9)
  and make gobject-introspection a dep of Clutter.
configure.ac src/Makefile.am: Use Clutter-0.9
js/ui/button.js js/ui/genericDisplay.js js/ui/overlay.js js/ui/panel.js
js/ui/runDialog.js js/ui/workspaces.js src/shell-status-menu.c:
  Use ClutterText instead of ClutterLabel and ClutterEntry
js/ui/workspaces.js js/ui/genericDisplay.js: Use ClutterClone instead
  of ClutterCloneTexture
src/shell-global.[ch]: Add Shell.get_event_key_symbol() to workaround
  unaccessibility of clutter_key_event_symbol() to use.
js/runDialog.js js/overlay.js: Use Shell.get_event_key_symbol() as
  appropriate.
2009-02-23 14:53:06 -05:00
Marina Zhurakhinskaya
333fa611da Bug 572094 - Put sideshow sections into boxes, enable expanded item display for documents
Put sideshow sections into boxes so that we can slide them out with a single 'easeOutQuad' transition.

Handle expanding the documents section in the same fashion as we handle expanding the applications section.

Place "More..." labels inside Big Boxes with x_align set to Big.BoxAlignment.END so that we don't have to position them manually.
2009-02-20 11:57:30 -05:00
Marina Zhurakhinskaya
87f50c3f42 Fix up triggering search in the overlay.
Make sure to set this._searchQueued to true, so that we don't queue the search twice.

Remove an unused variable.
2009-02-20 11:53:25 -05:00
Colin Walters
aaa846da17 Bug 571313 - Refocus search field every time overlay is shown
Before the run dialog was changing the focus, but because we were
only setting it once, we ended up with nothing focused after the run
dialog was destroyed.
2009-02-17 12:59:00 -05:00
Colin Walters
85dae56a31 Bug 571203 - Handle spaces in overlay search
Previously we were stripping all whitespace.  Instead, just strip leading+trailing
whitespace, split the remaining search into individual terms which we search
for independently.

Items are grouped by the number of terms they match, then sorted
alphabetically.
2009-02-11 16:50:42 -05:00
Marina
2d3988c5fc Bug 570579: Redo the layout of overlay components
Divide the screen into a grid and use it to determine the layout of the overlay components in a more consistent manner.

Remove the 'Add workspace' control and slide the workspaces
display to the side without scaling it when switching to the 'More' mode.
2009-02-10 17:38:06 -05:00
Dan Winship
e79c776c2e Add a wrapper around tweener to do some extra integration
Automatically removes tweens on destroyed actors, and provides
additional "animation started/stopped" callbacks (eg, for tracking
whether or not to show window clone titles)
2009-02-10 11:20:39 -05:00
Marina Zhurakhinskaya
e9826ecb45 Add a 'More' control to the applications display in the overlay
mode. When this control is clicked, documents display section slides down,
workspaces display slides to the side, and a multi-column applications view is
presented to the user. "More' control is replaced with a 'Less' control. When
the 'Less' control is clicked a default overlay view is restored.

Clean up positioning of the components of the overlay sideshow
and the items within generic item displays.


svn path=/trunk/; revision=179
2009-02-03 22:58:33 +00:00
Dan Winship
87a3088719 sort imports consistently; everything-but-our-javascript, alphabetically,
then a blank line, then all of our javascript, alphabetically

svn path=/trunk/; revision=176
2009-02-02 23:02:16 +00:00
Colin Walters
5280decb59 Bug 568625: Ignore extra whitespace in search
svn path=/trunk/; revision=162
2009-01-21 22:37:02 +00:00
Colin Walters
ce36eafc2f Bug 568624: Make overlay search case insensitive
svn path=/trunk/; revision=161
2009-01-21 22:36:53 +00:00
Marina Zhurakhinskaya
849ddbd3f6 Display thumbnails of recent files in the overlay mode by using GnomeThumbnailFactory to get them. Fall back to the system icon for the file type provided by GtkRecentInfo when a thumbnail is not available.
svn path=/trunk/; revision=143
2009-01-09 01:09:35 +00:00
Dan Winship
45ba65bebb Move Workspaces-size computation into Workspaces
svn path=/trunk/; revision=134
2008-12-22 21:50:23 +00:00
Marina Zhurakhinskaya
48cda5b179 Create two base classes: GenericDisplayItem and GenericDisplay, as
well as corresponding classes for applications and documents that inherit from
them. 

Use half the height of the sideshow in the overlay mode for the
AppDisplay, and the other half for the DocDisplay. 

Enable moving the selection between the two displays by using up and down arrow keys. 

Enable activating any item by clicking on it, in addition to activating the currently selected item by pressing Enter.

Apply search entry content to both sets of items.


svn path=/trunk/; revision=132
2008-12-20 04:27:57 +00:00
Dan Winship
249e65ee30 Make the workspaces view a temporary "widget", rather than having it always
around

svn path=/trunk/; revision=124
2008-12-15 20:48:59 +00:00
Marina Zhurakhinskaya
98860733bb Convert some variable and file names to lowerCamelCase.
Remove unused variables in AppDisplay::_filterAdd().

svn path=/trunk/; revision=123
2008-12-09 22:10:43 +00:00
Dan Winship
03e8db6a00 fix "desktop"/"workspace" naming confusion
svn path=/trunk/; revision=116
2008-12-04 15:20:37 +00:00
Dan Winship
79d956b719 show multiple workspaces in the overlay view. #563035
svn path=/trunk/; revision=115
2008-12-04 15:16:16 +00:00
Colin Walters
d4be819d91 Clear search text after activation
svn path=/trunk/; revision=113
2008-12-03 20:18:10 +00:00
Colin Walters
6bd31dd211 Bind Escape to clear search entry
svn path=/trunk/; revision=112
2008-12-03 19:24:50 +00:00
Dan Winship
2a40560828 split the desktop area out of overlay.js
svn path=/trunk/; revision=110
2008-12-02 16:15:00 +00:00
Colin Walters
a4763b38bf Use Big.Box for search entry to get rounded corners
http://bugzilla.gnome.org/show_bug.cgi?id=562923

svn path=/trunk/; revision=104
2008-12-01 23:01:55 +00:00
Owen Taylor
a8cfd47a50 Slide in the sidebar as the overlay appears
appdisplay.js: Add AppDisplay.actor property, remove the x/y parameters
  to the constructor, and don't automatically add the appdisplay
  to the stage.

overlay.js: Make the AppDisplay a child of the SideShow, rename
  SideShow._grid to SideShow.actor and slide the SideShow in when
  showing the stage.

http://bugzilla.gnome.org/show_bug.cgi?id=562920

svn path=/trunk/; revision=102
2008-12-01 22:43:06 +00:00
Colin Walters
b535a8949b Remove debug logging, make activation work for non-search mode too
svn path=/trunk/; revision=99
2008-12-01 20:03:55 +00:00
Owen Taylor
7b471645f4 Redo tabs => spaces indentation change to not lose manual indentation
Revert most JS changes in commit:

    Fri Nov 28 20:12:20 2008 +0000
    Convert all JS style to be uniform, add Eclipse settings bits

Instead, just add 'indent-tabs-mode: nil' to the mode lines and convert
tabs to spaces. The indentation no longer exactly matches the Eclipse
settings, since they differ in some ways from the style we are trying
to achieve.

svn path=/trunk/; revision=97
2008-12-01 19:51:43 +00:00
Colin Walters
eaf2bbfaf8 Add up/down keyboard arrow navigation to app display
svn path=/trunk/; revision=91
2008-11-28 23:06:07 +00:00
Colin Walters
10d5aaca83 Hook up activate on search entry to launch if only one app displayed
svn path=/trunk/; revision=90
2008-11-28 22:05:09 +00:00
Colin Walters
3b9aa49f22 Convert all JS style to be uniform, add Eclipse settings bits
Previous style was all over the place; this commit attempts to bring
uniformity.  Overall, the style is:

* 4 spaces only, no tabs
* Prototypes do not create a new block
* Constructor property continuations only indent one block

svn path=/trunk/; revision=87
2008-11-28 20:12:20 +00:00
Colin Walters
3d41f586fc Convert users of static functions to new gjs syntax
svn path=/trunk/; revision=86
2008-11-26 19:14:18 +00:00
Owen Taylor
c12de59864 Add a concept of "going modal" by grabbing the keyboard
shell-global.[ch]: Replace shell_global_focus_stage()
  with shell_global_grab_keyboard()/shell_global_ungrab_keyboard()
main.js: Add startModal()/endModal() functions to go modal and
  undo that.
run_dialog.js overlay.js main.js: Use startModal() for the overlay
  and for the run dialog.

http://bugzilla.gnome.org/show_bug.cgi?id=561880

svn path=/trunk/; revision=83
2008-11-24 19:07:18 +00:00