The experiment with avoiding ellipsization was a definite failure;
several translations have very long names, and we'd end up
with a single column.
Also fix extra padding; we only want some space at the top, not
left/right.
Corresponding with the design, if an application is in a running
state (has > 0 windows open), draw a glow behind the name.
To make the display look a bit nicer, set the width of each item
to be equal to the longest word among all the items.
Before, we looked up application data in several ways; the ShellAppSystem
exported just application ids (though it parsed the .desktop files internally),
and we'd create a Gio.DesktopAppInfo object (reparsing the desktop file again),
wrapping that inside a JavaScript AppInfo class, and finally the AppDisplay
would again parse the .desktop file to get the categories.
Also, to look up applications by id previously, we traversed the entire
menu structure each time.
Some qualities such as the NoDisplay flag were not easily exposed in the old
system. And if we wanted to expose them we'd have to change several different
application information wrapper classes.
All in all, it was quite suboptimal.
The theme of this new code is basically "just use libgnome-menus". We do
not call into Gio for app lookups anymore. The new Shell.AppInfo class
is a disguised pointer for the GMenuTreeEntry item.
To fix the caching, we keep a simple hash table of desktop id -> ShellAppInfo.
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.
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.
It looks funny to have the "more running apps area" there as a gap
when empty and dragging to it is an unintuitive way to remove stuff
from the favorites list, in any case, so just hide the area when
empty.
http://bugzilla.gnome.org/show_bug.cgi?id=587720
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
The new class AppWell implements the application favorite well
in the Dash component. The previous AppDisplay remains for use
in the More... mode now.
Delete DEFAULT_APPLICATIONS; this is now in GConf.
Rename getMostUsedApps to getTopApps since we now have the
idea of explicit favorites.
Delete some GenericDisplay-related calls from overlay related
to the seletion - we'll reimplement keyboard nav in a more
coherent way later.
The list of all applications was based on the items that show up in
the menus, and might not have contained all applications returned
by the AppMonitor for the most used applications request. One example of
such an application was Evince. This resulted in a crash when an
application we did not prepare the info for was returned as one of the
matches by the AppMonitor, so we now include all applications returned
by the AppMonitor in the list, in addition to the ones from the menus.
Also mark apps as stale when we catch a "changed" signal from the AppMonitor
to ensure that the cache is refreshed.
With commit a3d35af444 variable
itemInfo in js/ui/appDisplay.js was changed to a new object
(AppInfo from js/misc/appInfo.js) but some of the code in
js/ui/appDisplay.js wasn't updated accordingly. This commit
fixes that and makes the search box in the overlay usable
again.
This lets us share the recent-app-tracking, recent-file-tracking, and
icon-drawing code between the overlay and the sidebar, without the
sidebar having to poke into AppDisplayItem and DocDisplayItem's guts.
The code here is significantly cleaner if we use the data Metacity
already has cached and validated, rather than talking to X directly.
Also some preparatory work for extending the monitor API by
clarifying the name of the (current) main entry point.
To avoid loading applications from two different systems, use
ShellAppSystem solely. This unifies the initial load and the
reload.
Extend ShellAppSystem to also load settings/preferences, and
ensure they appear in the search.
Add a ShellTextureCache class which loads (and can cache)
pixmap->texture conversions. This fixes a problem with the
async code in ClutterTexture that it was lower priority
than animations, and also ensures we're really only
loading these pixbufs once in the icon case.
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
main.js: Add create_app_launch_context() with code from appDisplay;
additionally set the workspace on the launch context to the current
workspace so that the application launches on the right workspace
even if the user switches before the app starts.
appDisplay.js docDisplay.js: Use Main.create_app_launch_context()
http://bugzilla.gnome.org/show_bug.cgi?id=580658 (Reported by Igor Vatavuk)
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.
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.
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).
was browsing exiting results
This is most noticeable when viewing results in xephyr, and then opening
a document in your regular session. But it could also be noticeable if
downloading a new file completes while the user is in the overlay.
This patch also moves the call to _displayMatchedItems() to _redisplay
instead of making it in both _setDefaultList() and _doSearchFilter().
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.
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.
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.
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
main.js: set desktop environment to "GNOME" so that GIO can determine correctly which applications should be shown in the menus.
appDisplay.js: filter out applications that should not be shown in the menus, check if get_executable() for GAppInfo is not null before using it
svn path=/trunk/; revision=163
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