Commit Graph

18 Commits

Author SHA1 Message Date
Florian Müllner
56f6c9c5f6 genericDisplay: Remove unused module
GenericDisplay used to provide a common base class for places and
recent items, none of which exists anymore. As of current mockups,
display items in "Finding and Reminding" should be based on
BaseIcon / IconGrid instead.
2011-01-14 22:30:02 +01:00
Florian Müllner
a9c0dcbd6b [search] Use 'AND' instead of 'OR' on search terms
The current search system uses the OR operator to concatenate search
terms. While results which are matched multiple times sort before
other matches, it is almost guaranteed that adding an additional term
to the search increments the number of results, which is rather
surprising.

https://bugzilla.gnome.org/show_bug.cgi?id=610955
2010-08-18 23:59:27 +02:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Florian Müllner
b28c4dcd81 [docInfo] Fix recent items
GJS no longer translates time_t values into Date objects, update
the code where we relied on the previous behavior.
2010-07-10 00:23:23 +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
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
b7646d18ae Add search.js, rebase search system on top
The high level goal is to separate the concern of searching for
things with display of those things; for example in newer mockups,
applications are displayed exactly the same as they look in the
AppWell.

Another goal was optimizing for speed; for example,
application search was pushed mostly down into C, and we avoid
lowercasing and normalizing every item over and over.

https://bugzilla.gnome.org/show_bug.cgi?id=603523
2009-12-18 10:07:22 -05:00
Colin Walters
949f67469c Rebase recent documents on top of ShellDocSystem
Rather of calling .exists() synchronously for all documents, use
ShellDocSystem's async API to only stat docs we're showing.

Use the doc opening functionality in ShellDocSystem.

Also, more intelligently do redisplay(); don't recreate actors
for recent docs if we already have one for that URI.  We may
need more intelligent caching here; if e.g. just the associated
application changes, we should probably reread the info.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 16:08:12 -05:00
Gustavo Noronha Silva
ae744bf206 Don't require applications to accept URIs for recent files
This should not be required, since glib correctly deals with such
applications by giving them the local gvfs path, and those
applications which do support URIs keep being able to use the URIs in
GFiles.

Based on original work by Guido Günther <agx@sigxcpu.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=601287
2009-11-12 14:25:42 -02:00
Colin Walters
16cb878f4e [docInfo] Pass correct object to remove deleted info
We need to pass the actual RecentInfo boxed, not the DocInfo JS Object.
2009-10-21 17:34:52 -04:00
Colin Walters
2dcd0511c4 dash: Make recent docs display two columns
The design has smaller icons in two columns.  Add a new
custom display to docDisplay for it.

Clean up some of the texture cache handling for recent URIs so
it's not size-dependent, since the dash size is now different
from the default GenericDisplay size.
2009-08-20 19:37:50 -04:00
Siegfried-Angel Gevatter Pujals
22c98e6240 Fix incorrect variable name: mimeType -> this.mimeType. 2009-08-06 17:25:58 +02:00
Siegfried-Angel Gevatter Pujals
f3efbf432f Replace lastVisited method in DocInfo with timestamp attribute
This is not only more consistent with the name, uri and
mimeType attributes, but makes adding Zeitgeist support easier.
2009-07-29 10:52:33 +02: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
5d067ec718 Better caching for document textures and information
Move thumbnail creation into ShellTextureCache.  It's now asynchronous,
and we cache the result.

Create a DocManager class which keeps around the DocInfo objects between
invocations.  This is also where we ensure we remove thumbnails for
recent items not known anymore.
2009-07-09 13:58:45 -04: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
Siegfried-Angel Gevatter Pujals
f215935d2d Speed up initialization of DocInfo objects
We achieve this with two changes:

 - Move the Shell.get_thumbnail call in DocInfo from _init
   to getIcon, so that it isn't executed until it's actually
   needed.
   (If caching the output of said call permanently is desired
   we could still do it on the first getIcon invocation, but
   I don't believe this is necessary given that looking up an
   already generated icon is pretty fast and this also gives
   us an updated icon in case the file changes.)

 - More importantly, we ommit the get_thumbnail call in case
   the URI doesn't start with file://. Looking up, for example,
   an http:// URI is very slow, and doesn't give us an icon anyway.

http://bugzilla.gnome.org/show_bug.cgi?id=586539
2009-06-22 09:41:06 -04:00
Dan Winship
a3d35af444 Split appDisplay and docDisplay into "model" and "view" parts
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.
2009-06-16 18:50:42 -04:00