[gnome-shell/overlay-design02: 4/4] Merge branch 'master' into overlay-design02
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-shell/overlay-design02: 4/4] Merge branch 'master' into overlay-design02
- Date: Wed, 17 Jun 2009 12:42:27 -0400 (EDT)
commit 2fd2293e4a120a438a4f78f3ce15309deaecdb37
Merge: 3528eef... a3d35af...
Author: Colin Walters <walters verbum org>
Date: Wed Jun 17 10:12:31 2009 -0400
Merge branch 'master' into overlay-design02
configure.ac | 17 ++--
js/Makefile.am | 2 +-
js/misc/Makefile.am | 5 +
js/misc/appInfo.js | 133 ++++++++++++++++++++++++++++
js/misc/docInfo.js | 112 +++++++++++++++++++++++
js/ui/appDisplay.js | 72 ++-------------
js/ui/docDisplay.js | 114 ++++--------------------
js/ui/widget.js | 216 ++++++++++++++++++++++++++-------------------
src/Makefile.am | 20 ++--
src/gnome-shell.in | 4 +-
src/shell-app-monitor.c | 4 +-
src/shell-app-system.c | 11 ++-
src/shell-global.c | 3 +-
src/shell-texture-cache.c | 46 ++++++----
14 files changed, 461 insertions(+), 298 deletions(-)
---
diff --cc js/ui/appDisplay.js
index 5901ded,ab53772..0ecd3e1
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@@ -59,32 -59,11 +59,11 @@@ AppDisplayItem.prototype =
__proto__: GenericDisplay.GenericDisplayItem.prototype,
_init : function(appInfo, availableWidth) {
- GenericDisplay.GenericDisplayItem.prototype._init.call(this, availableWidth);
+ GenericDisplay.GenericDisplayItem.prototype._init.call(this, availableWidth);
this._appInfo = appInfo;
- let name = appInfo.get_name();
-
- let description = appInfo.get_description();
-
- let iconTheme = Gtk.IconTheme.get_default();
-
- let gicon = appInfo.get_icon();
- let texCache = Shell.TextureCache.get_default();
- let icon;
- if (gicon == null)
- icon = new Clutter.Texture({ width: GenericDisplay.ITEM_DISPLAY_ICON_SIZE,
- height: GenericDisplay.ITEM_DISPLAY_ICON_SIZE
- });
- else
- icon = texCache.load_gicon(gicon, GenericDisplay.ITEM_DISPLAY_ICON_SIZE);
- this._setItemInfo(name, description, icon);
- },
-
- //// Public methods ////
-
- // Returns the application info associated with this display item.
- getAppInfo : function () {
- return this._appInfo;
+ this._setItemInfo(appInfo.name, appInfo.description,
+ appInfo.getIcon(GenericDisplay.ITEM_DISPLAY_ICON_SIZE));
},
//// Public method overrides ////
@@@ -99,20 -78,12 +78,12 @@@
// Ensures the preview icon is created.
_ensurePreviewIconCreated : function() {
if (!this._showPreview || this._previewIcon)
- return;
+ return;
- let previewIconPath = null;
-
- if (this._gicon != null) {
- let iconTheme = Gtk.IconTheme.get_default();
- let previewIconInfo = iconTheme.lookup_by_gicon(this._gicon, GenericDisplay.PREVIEW_ICON_SIZE, Gtk.IconLookupFlags.NO_SVG);
- if (previewIconInfo)
- previewIconPath = previewIconInfo.get_filename();
- }
-
+ let previewIconPath = this._appInfo.getIconPath(GenericDisplay.PREVIEW_ICON_SIZE);
if (previewIconPath) {
try {
- this._previewIcon = new Clutter.Texture({ width: GenericDisplay.PREVIEW_ICON_SIZE, height: GenericDisplay.PREVIEW_ICON_SIZE});
+ this._previewIcon = new Clutter.Texture({ width: GenericDisplay.PREVIEW_ICON_SIZE, height: GenericDisplay.PREVIEW_ICON_SIZE});
this._previewIcon.set_from_file(previewIconPath);
} catch (e) {
// we can get an error here if the file path doesn't exist on the system
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]