Commit Graph

68 Commits

Author SHA1 Message Date
Colin Walters
c0ff0066e6 Make link.js into a St.Button, delete unused link imports
It's actually totally unused at the moment, but a future patch will use it.

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-18 11:20:05 -05:00
Colin Walters
73cd9513bd Remove information icon
It wasn't really useful, not obviously in the current mockups, and
depended on button.js.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:49 -05:00
Colin Walters
21f15246a6 [genericDisplay] Fix selection not being set correctly
We need to check if the display actor is an instance of Shell.OverflowList
or St.BoxLayout to use the appropriate function for getting its child
with a given index.
2009-11-13 14:49:45 -05:00
Colin Walters
66cab3b8ed [genericDisplay+other] Port to CSS, style cleanups
Mostly a straightforward porting of style code to CSS, except
that various bits of other code referenced a few GenericDisplay
constants, so those needed to be ported as well.

Add some padding at the top between the close button and the items.

Center the text and description.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:01 -05:00
Colin Walters
d51384fb86 switch to scrolling GenericDisplay, remove menus from apps
Temporarily removed search-by-menu from apps as well, will readd
later as a ShellApp feature.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:00 -05:00
Colin Walters
07a8d5ed2d When setting a search, do a redisplay immediately
Commit 94bd6f1718 introduced a trick
where we only do the heavy lifting for "redisplay" when we're mapped.

However, the search system wants to get the count of matched items,
and control the visibility of the display based on that.  This introduces
a circularity; avoid it by forcing the search to do a redisplay.

In the future we should avoid this by separating out the "get matched
things for search" from "display list of things".

https://bugzilla.gnome.org/show_bug.cgi?id=600890
2009-11-10 10:19:00 -05:00
Colin Walters
94bd6f1718 Only do redisplay when mapped
If we're not mapped, only queue up a redisplay.  This avoids
e.g. changes in recent documents such as saving a file in GEdit
causing a lot of blocking I/O in the shell (we need to make
recent loading async as well).

https://bugzilla.gnome.org/show_bug.cgi?id=599560
2009-10-28 12:20:02 -04:00
Colin Walters
4f4e54cbf7 Reset page when doing a FULL redisplay
This fixes an issue where the app display would remember the page
between switching menus.

https://bugzilla.gnome.org/show_bug.cgi?id=597577
2009-10-21 17:50:35 -04:00
Marina Zhurakhinskaya
aed1e67add Check that no new term was introduced before doing a subsearch
We combine search terms with OR, so if a new search term is introduced,
the search results are no longer a subset of the previous search results.
2009-10-05 13:50:58 -04:00
Marina Zhurakhinskaya
eb8176deeb Fix regressions in the item displays
Fix displaying documents in the document browse and refreshing the selection
when the results have changed.

Make sure we are passing the appropriate flag to _redisplay() in GenericDisplay.

Make sure we set this._appsStale to true if there was a change in the
applications set.

Don't call _refreshCache() from the AppDisplay constructor.

Don't short-circuit the call to _refreshCache() from _redisplay() on initial load.

Rename _redisplayFull() to recreateDisplayItems() and remove adding an
actor to the actual result list in _addDisplayItem() because we redo adding the
actors to the list in _redisplayReordering() anyway to ensure that we add
them in the right order.

Based on a patch from Colin Walters.
2009-10-01 17:41:17 -04:00
Siegfried-Angel Gevatter Pujals
c14a4deddf Rename iconButton to IconButton, as it is a class. 2009-09-26 00:50:07 +02:00
Colin Walters
159081dcfc Optimize searching further
There are now 3 code paths in decreasing speed:

First, optimize subsearching more by just hiding the actors
that didn't match, since we know the ordering has to be right.

For initiating a search (or backspacing an existing one), again
instead of destroying and recreating actors, just temporarily
remove them and re-add them in the desired order.

Finally for when data has changed, use the old code path of
destroying all actors.  (This itself could obviously be optimized
if we had a way to know that just one application changed, but
at the moment we don't).

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:09:46 -04:00
Colin Walters
32ef951fe0 Optimize subsearches
This is probably not the biggest optimization that needs to be
made at least for application searching, but we can optimize the
case where we're going from a search of "fi" to "fire" by just
re-searching the list of things we already had that matched "fi"
instead of looping over everything.

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:08:15 -04:00
Marina Zhurakhinskaya
02c65fab8d Don't show section headers for sections with no results and don't show page
controls if there is only one page of results

This makes the search results display more streamlined.

Make sure that we move the selection to a different section if we are going
from displaying a single section to displaying all and the section that
used to be displayed alone doesn't have any results.
2009-09-11 19:30:11 -04:00
Dan Winship
d0d79c5b3e Make "global" global.
Rather than doing "let global = Shell.Global.get()" everywhere we
need it, just create a global variable called "global".

http://bugzilla.gnome.org/show_bug.cgi?id=594546
2009-09-08 16:21:15 -04:00
Owen W. Taylor
b7b4c54ab5 Make checking if an item is under the pointer asynchonous again
Checking if an item is under the pointer by calling stage.get_actor_at_pos()
synchronously will trigger a too-early allocation of the stage. Use an idle
at Meta.PRIORITY_BEFORE_REDRAW. (Before 553503d it was using a 5 msec timeout,
553503d made it synchronous.)

http://bugzilla.gnome.org/show_bug.cgi?id=592608
2009-09-04 19:12:07 -04:00
Marina Zhurakhinskaya
553503dace Remove the timeout for checking if an item is drawn under the pointer
We no longer need the timeout for checking if an item is drawn under
the pointer because we display search results in the main pane and there is
no lowering/raising of other overview actors going on as the results are
being displayed.
2009-09-01 16:29:14 -04:00
Marina Zhurakhinskaya
90381ceea2 Improve key navigation for search results
Select an item by default when the search results are displayed.

Enable moving from one section of search results to another with key navigation.

Reset the selection when the search is updated or a new page is displayed
or the transition between viewing multiple sections and viewing just one is made.
2009-09-01 16:24:47 -04:00
Colin Walters
003807334b Delete Tidy
It wasn't used any more.
2009-08-27 02:00:23 -04:00
Marina Zhurakhinskaya
cdbb7f8f5f Display only first page of search results by default and display a total results count
Display only first page of search results by default for each section and
allow clicking on the section header to view all the results for a given
section. This design will allow us to easily move from paging to scrolling
without having to stack multiple scrollbars in a single pane.

Display a total results count next to the section name. This serves as an
indicator that there are more results. The section header pre-lights to
indicate that it can be clicked on.

Make sure we go back to the first page of results when we exit a single
section mode. Make sure we re-instate all result sections if the search
mode is left.

Close the only section search mode on Esc, and only close the search
when Esc is hit again.
2009-08-26 18:46:58 -04:00
Colin Walters
dd1a309cb6 dnd: Centralize drag actor positioning code, use shellWorkspaceLaunch for workspaces
We had multiple copies of the code to position a drag actor given a particular
source.  Instead, just put it inside dnd.js.

Second, rather than test for GenericDisplay/WellDisplayItem etc.,
in various places, add a new method on each source "shellWorkspaceLaunch"
which both marks the item as being droppable on a workspace, and is
called by the workspaces code to launch the item.
2009-08-20 19:37:50 -04:00
Colin Walters
f00500d3d5 Bug 591246 - Move towards shell-black02 mockup
Remove the last use of passing width into Dash by having the
Pane with the previews scaling dynamically and relying on
Clutter scaling.

If we only have one workspace, don't display a selection frame
for it.

Rework Dash into a searchArea and sectionArea, which get
explicitly sized by overlay.js.  We use the workspaces size
to choose the size of those dash areas.

Switch dash colors/boxes etc. to ones from shell-black02.

Add a gradient to the panel.

Add a magnifier.svg for use in search.
2009-08-12 16:07:05 -04:00
Sander Dijkhuis
47af454115 Bug 591437 - Rename overlay.js to overview.js
Replace 'overlay' with the more descriptive name 'overview'
where the Activities Overview is meant. Call it Overview
(capitalized) in code comments.

The overlay-group and overlay-key provided by Mutter are not
affected, since they may be used for other components than
the Activities Overview.
2009-08-11 15:15:25 +02:00
Colin Walters
9fa88caded Bug 591316 - Fix bad notify:: parameters
We weren't using them, and they were wrong.
2009-08-10 11:18:19 -04:00
Colin Walters
4e23f4cfc9 Bug 591077 - Hide overlay when activating an application
It's easier to explicitly call Main.overlay.hide() instead
of chaining activation signals, this got lost in a mix between
the big dash rewrite and ongoing changes to the Application well.
2009-08-07 15:45:52 -04:00
Siegfried-Angel Gevatter Pujals
03e0fe1e95 Replace _getIndexOfDisplayedActor with a function in OverflowList
Said function in genericDisplay.js was returning the index of the
actor based upon its position in the entire list, while everywhere
else indexes relative to the currently displayed page were used.

This made actions in the details pane break (bug #590949), so I
replace it with a new function in shell-overflow-list.c,
shell_overflow_list_get_actor_index, which is page based.
2009-08-06 19:51:11 +02:00
Siegfried-Angel Gevatter Pujals
be95ca553a Fix indentation issues in altTab.js, plus minor cleanup in some other files. 2009-08-06 01:54:22 +02:00
Colin Walters
85b4b97b7b Rewrite Dash, remove hardcoded width/height from GenericDisplay
This patch is a near-total rewrite of the Dash.  First, the dash
code moves into a separate file, dash.js.

Inside dash.js, the components are more broken up into separate
classes; in particular there's now a Pane class and a MoreLink
class.  Instead of each section of the dash, when activated,
attempting to close all N-1 other sections, instead there
is the concept of a single "active pane", and when e.g. activating
the More link for documents, if we know there's an active pane
which happens to be the apps, close it.

Many redundant containers were removed from the dash, and all
manual width, height and x/y offsets are entirely gone.  We move
the visual apperance closer to the design by using the view-more.svg,
etc.

To complete the removal of height/width calculations from the dash,
we also had to do the same for GenericDisplay.  Also clean up
the positioning inside overlay.js so calculation of children's
positioning is inside a single function that flows from screen.width
and screen.height, so in the future we can stop passing the width
into the Dash constructor and call this once and work on screen
resizing.
2009-08-05 04:04:27 -04:00
Marina Zhurakhinskaya
f7fff83647 Fix showing small item previews
Don't use a clone of an actor that's not part of the scene graph for the
item previews. This patch fixes previews in the details pane for documents
for which we don't have full previews and for applications.

Use create_icon_texture() from AppInfo instead of looking up the file
for gicon when creating an application icon for the details pane.
2009-07-29 17:56:13 -04:00
Siegfried-Angel Gevatter Pujals
77c92d75d5 Toggle the info pane when clicking the info icon (#587550)
Now clicking on the information icon of the same item a second
time will hide the details pane. Clicking it another time will
show it again, etc.

This is achieved by adding a 'toggle-details' signal which
switches the visibility of the details pane.

Other than the necessary changes, function _selectIndex (in
genericDisplay.js) has been restructured a bit to avoid
duplicating checks.
2009-07-29 19:35:11 +02:00
Marina Zhurakhinskaya
f24169735a Fix updating last visited time for the doc display items.
Make sure that we calculate the next update time correctly.

Store timeout time instead of the timeout delta, so that it doesn't get outdated.

Create a new callback when the time update happens for the original callback.

Make sure last visited time is updated in the details pane by keeping track
of the description actors created for the detail actors.

Add comments to the new functions.
2009-07-22 18:57:05 -04:00
Colin Walters
b4cf178cc5 Display last visited time as docInfo description
It's useful information, and takes up some of the blank space.
2009-07-21 23:05:08 -04:00
Colin Walters
8d9fc28872 Bug 588050 - Cache information icon forever, only look up recent once
Extend ShellTextureCache by adding the concept of a policy, which
we expose to the public API for loading URIs.

This lets us have the shell tell the cache to keep the information
icon texture around forever.

Secondly, fix the caching of recent info; we shouldn't always be
loading the backup pixbuf.  Move recent info loading entirely
into ShellTextureCache.
2009-07-17 17:35:53 -04:00
Colin Walters
2161e90cda Fixes for GenericDisplay
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model.  Since the list now holds all actors, the indexing/wrapping
was incorrect.

Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.

Avoid setting selectedIndex to -2 when going up with no items.

If we're not displaying any results at all, don't attempt keynav (for now).
2009-07-13 11:01:49 -04:00
Colin Walters
db630b2945 More for applications now displays a category list
Rework the previously extant Application category code to display
in the expanded list.  Add a "Frequent" category which corresponds
to the most_used_apps, and selected by default.

Instead of adding the background and shadow as expanded items to
the results/details panes as fixed, we slave the background/shadow
sizes to the results using notify::allocation.

Also clean up the code for sizing the details pane, using a common
function which adjusts its x position in one place.
2009-07-06 16:15:12 -04:00
Milan Bouchet-Valat
3852176e80 Use a fading icon button in genericDisplay
Add a new icon button in button.js that fades in/out with a short delay when the mouse enters/leaves its parent. Use it for the information button of genericDisplay.
2009-07-05 10:40:50 +02:00
Colin Walters
15e862f974 Switch GenericDisplay to ShellOverflowList for dynamic height
This converts GenericDisplay to totally dynamic layout, where
we display as many items as we can, and the rest cleanly overflow
into pages.

For now, remove multi-column; to readd this, we can pack multiple
display items into a single ShellOverflowList item.
2009-07-04 15:30:12 -04:00
Colin Walters
66ea19fbfb Switch to dynamic layout for Dash
Instead of laying out the dash contents "manually" and having
the content items explicitly passed their height, just give them
a set width.
2009-07-04 13:45:27 +01:00
Marina Zhurakhinskaya
db52e024e8 Use a separate icon image as a drag actor instead of using the clone of the icon
Clutter no longer allows using a clone of an actor that is not a part of
the scene graph. This is what used to happen when we created a clone for
the icon of the item that was being dragged, and then closed the More panes
with the original item, removing the icon from the scene graph. This was
also when happened when the user hit Esc while dragging, which prompted the
overlay to close, removing the original icon from the scene graph.

Rename getIcon() methods to createIcon() to better reflect on the fact that
a new icon is created each time the method is called (we do use cache in
some cases).

Remove a stray log message in overlay.js

Fixes http://bugzilla.gnome.org/show_bug.cgi?id=585490
and http://bugzilla.gnome.org/show_bug.cgi?id=585489
2009-06-30 16:42:00 -04:00
Marina Zhurakhinskaya
45c97862e5 Move the activate and select functionality inside the callbacks
Move the activate and select functionality inside the callbacks for
'button-release-event' signals of the display item and the information
button correspondingly. This way it is more obvious that this is an
event handling code that needs to return a boolean value for whether
the signal has been fully handled by the actor.
2009-06-30 15:38:18 -04:00
Marina Zhurakhinskaya
3a7447dacc Use TextureCache to load the information icon
Use TextureCache to load the information icon, so that we don't create a
new ClutterTexture for information icons corresponding to each display
item.
2009-06-30 15:38:18 -04:00
Marina Zhurakhinskaya
dc7b2b03e1 Make sure we show the information button when a new item appears under the pointer
Update the code for checking a display item under the pointer to expect
the item itself rather than its child to be returned by stage_get_actor_at_pos().

This code is now used to display an information button when an item is
drawn under the pointer, so update the comment accordingly.
2009-06-30 15:38:18 -04:00
Marina Zhurakhinskaya
98c5f35324 Select an item when information button is clicked, launch on single click
Clicking the information button for an item selects it (i.e. highlights it)
and shows details about the item.
Clicking the rest of the item area launches it.
Item does not become draggable if the dragging is started over the information
icon (i.e. if the user presses the information icon, but releases elsewhere).

Make sure we emit "activated" signal and close the overlay when an item from
one of the results displays is launched.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
3841e8da74 Add an icon for the information link
Use an (i) icon supplied by Jeremy for the information link and display
it on hover. Make sure it is positioned nicely and the text doesn't
overlap with it.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
e3291aa5ba Remove pop-up previews
Pop-up previews are not part of the new design and interfere with the information link.

Make sure details display for applications has the appropriate width set.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
90b7d9a7fa Change selected item color and make sure only one item is selected at a time
A blue selected item color fits better with the new color scheme than a green one.

Only one item should be selected across all the displays we are showing.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
662c995515 Display a pane with item details
Display a pane with item details, such as a full image previews, when an item is single clicked.

Add a placeholder information link that shows up when an item is moused over.
2009-06-30 15:38:16 -04:00
Marina Zhurakhinskaya
580794f3fb Display all recent documents in the results pane
Display all recent documents in the results pane, in addition to the first
few displayed in the main dash. All documents can be viewed with the help
of a paging control.
2009-06-30 15:38:16 -04:00
Owen W. Taylor
2c7d33bad2 Port gnome-shell to the Clutter-1.0 API
- clutter_actor_get_transformed_position()/size() return floats
- clutter_stage_get_actor_at_pos() takes a pick mode
- ClutterTimeline no longer has a concept of frames
- ClutterUnit is now replaced by float
- cogl_texture_new_from_data() signature changed

http://bugzilla.gnome.org/show_bug.cgi?id=585013
2009-06-08 13:49:53 -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