Skip to content

Commit

Permalink
Gnome 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sciancio committed Sep 1, 2014
1 parent 414a4dc commit f9ae8dd
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions search.js
Expand Up @@ -16,6 +16,9 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

const St = imports.gi.St;
const Gio = imports.gi.Gio;

const Shell = imports.gi.Shell;
const Util = imports.misc.util;
const Lang = imports.lang;
Expand Down Expand Up @@ -67,14 +70,16 @@ const SshSearchProvider = new Lang.Class({

getResultMetas: function(resultIds, callback) {
let metas = [];
let app = null;

for (let i=0; i<resultIds.length; i++) {
let result = this.sshNames[resultIds[i]]
let appSys = Shell.AppSystem.get_default();
let app = null;

switch (result.type) {
case '__app__':
app = appSys.lookup_app('gnome-session-properties.desktop');
app = null;
break;
case '__item__':
app = appSys.lookup_app(result.terminal + '.desktop');
Expand All @@ -84,9 +89,16 @@ const SshSearchProvider = new Lang.Class({
metas.push({
'id': resultIds[i],
'name': result.name,
'createIcon': function(size) {
'createIcon': function(size) {
let icon = null;
if (app) icon = app.create_icon_texture(size);
let appt = app;

if (app)
icon = app.create_icon_texture(size);
else
icon = new St.Icon({ gicon: Gio.icon_new_for_string('emblem-cm-symbolic'),
icon_size: size });

return icon;
}
})
Expand Down

0 comments on commit f9ae8dd

Please sign in to comment.