Commit Graph

18 Commits

Author SHA1 Message Date
Colin Walters
926643b025 Add shell_texture_cache_pixbufs_equal
Mutter is currently creating separate pixbufs for window icons;
use this to analyze them.
2009-09-02 14:54:49 -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
Colin Walters
74ea9f9305 Add shell_texture_cache_bind_pixbuf_property
This utility function is targeted for MetaWindow; we can create
a ClutterTexture which tracks the value of an "icon" property.
2009-08-18 22:58:27 -04:00
Colin Walters
25a5da074c ShellTextureCache: Don't try to scale pixbuf to 0 size
If we pass in -1 for both width and height, we'd attempt
to scale the image to 0x0.  Don't do that; just avoid
scaling the pixbuf and let ClutterTexture do it for us.
2009-08-12 15:56:43 -04:00
Dan Winship
e6644b7feb Use GnomeDesktopThumbnailFactory instead of GnomeThumbnailFactory
http://bugzilla.gnome.org/show_bug.cgi?id=591008
2009-08-11 11:27:52 -04:00
Siegfried-Angel Gevatter Pujals
f96193dc8c Thumbnail generation without GtkRecentlyUsed in TextureCache
This fixes Shell.TextureCache.get_default().load_thumbnail so
that it can be used to get thumbnails (with an icon matching
the mimetype or, in the worst case, gtk-file, as fallback) for
items which don't have a GtkRecentlyUsed object. This is needed
for the Zeitgeist integration.
2009-08-09 17:46:21 +02:00
Colin Walters
5c97d21889 Fix comment header for shell_texture_cache_load_uri 2009-08-09 09:53:06 -04:00
Colin Walters
5064d873bb Add shell_texture_cache_load_from_name
Utility function to load a texture for a themed icon from a
string name.
2009-08-09 09:53:05 -04:00
Owen W. Taylor
d243634602 Fix compiler warnings
src/shell-global.c src/shell-process.c: Remove dead code
src/shell-texture-cache.c src/shell-status-menu.c: Remove
  <foo>_new() functions that weren't in the header file and
  not used anyways:
src/shell-texture-cache.[ch]: Fix a prototype that used ()
  when (void) was intended.

http://bugzilla.gnome.org/show_bug.cgi?id=590998
2009-08-06 16:46:55 -04:00
Colin Walters
b1150eb147 Bug 589276 - Use 0 opacity while loading textures, preserve aspect ratio by default
When we fail to load a texture, make sure we keep it 0 opacity to avoid
a white square.  Also this is useful to avoid the square while loading
a texture asynchronously.
2009-08-04 16:48:12 -04:00
Colin Walters
e12587619b Fix reference counting of textures loaded via _load_uri_sync
Avoid double unref, fixes image previews.
2009-07-20 18:23:03 -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
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
Colin Walters
b8af0c1b8b Fix refcounting issue in ShellTextureCache
Also clean up compilation warnings.
2009-06-18 16:45:17 -04:00
Colin Walters
4314c6e57f Close memory leaks in ShellAppMonitor, ShellAppSystem, ShellTextureCache
Unref'ing the GdkPixbuf is particularly critical.  Some smaller fixes
also included.
2009-06-16 17:31:47 -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
Owen W. Taylor
7af940f7ea Fix icon caching - set size in cache key
We need to include the icon size in the data we pass to on_pixbuf_loaded()
so that we can include it in the key we use when caching the icon
Currently we save icons in the cache at size 0 but look them up at size 48
so no caching occurs.

http://bugzilla.gnome.org/show_bug.cgi?id=583503
2009-05-21 18:51:43 -04:00
Colin Walters
d024dbd779 Bug 582248 - Async loading of pixbufs and icon caching
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.
2009-05-20 11:22:56 -04:00