summaryrefslogtreecommitdiffstats
path: root/x11/gnome-shell/files/patch-js_ui_extensionSystem.js
blob: 6377d562ee22d2f565998158e5956294dc13ffaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--- js/ui/extensionSystem.js.orig   2012-04-10 20:14:57.000000000 +0200
+++ js/ui/extensionSystem.js    2012-05-25 22:43:38.000000000 +0200
@@ -8,7 +8,6 @@
 const Gio = imports.gi.Gio;
 const St = imports.gi.St;
 const Shell = imports.gi.Shell;
-const Soup = imports.gi.Soup;
 
 const Config = imports.misc.config;
 const ExtensionUtils = imports.misc.extensionUtils;
@@ -34,15 +33,10 @@
 const REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
 const REPOSITORY_URL_INFO =     REPOSITORY_URL_BASE + '/extension-info/';
 
-const _httpSession = new Soup.SessionAsync();
-
 // The unfortunate state of gjs, gobject-introspection and libsoup
 // means that I have to do a hack to add a feature.
 // See: https://bugzilla.gnome.org/show_bug.cgi?id=655189 for context.
 
-if (Soup.Session.prototype.add_feature != null)
-    Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
-
 function _getCertFile() {
     let localCert = GLib.build_filenamev([global.userdatadir, 'extensions.gnome.org.crt']);
     if (GLib.file_test(localCert, GLib.FileTest.EXISTS))
@@ -75,14 +69,6 @@
                    shell_version: Config.PACKAGE_VERSION,
                    api_version: API_VERSION.toString() };
 
-    let message = Soup.form_request_new_from_hash('GET', REPOSITORY_URL_INFO, params);
-
-    _httpSession.queue_message(message,
-                               function(session, message) {
-                                   let info = JSON.parse(message.response_body.data);
-                                   let dialog = new InstallExtensionDialog(uuid, version_tag, info.name);
-                                   dialog.open(global.get_current_time());
-                               });
 }
 
 function uninstallExtensionFromUUID(uuid) {
@@ -110,10 +96,6 @@
 }
 
 function gotExtensionZipFile(session, message, uuid) {
-    if (message.status_code != Soup.KnownStatusCode.OK) {
-        logExtensionError(uuid, 'downloading extension: ' + message.status_code);
-        return;
-    }
 
     // FIXME: use a GFile mkstemp-type method once one exists
     let fd, tmpzip;
@@ -126,7 +108,6 @@
 
     let stream = new Gio.UnixOutputStream({ fd: fd });
     let dir = ExtensionUtils.userExtensionsDir.get_child(uuid);
-    Shell.write_soup_message_to_stream(stream, message);
     stream.close(null);
     let [success, pid] = GLib.spawn_async(null,
                                           ['unzip', '-uod', dir.get_path(), '--', tmpzip],
@@ -440,12 +421,6 @@
                        api_version: API_VERSION.toString() };
 
         let url = REPOSITORY_URL_DOWNLOAD.format(this._uuid);
-        let message = Soup.form_request_new_from_hash('GET', url, params);
-
-        _httpSession.queue_message(message,
-                                   Lang.bind(this, function(session, message) {
-                                       gotExtensionZipFile(session, message, this._uuid);
-                                   }));
 
         this.close(global.get_current_time());
     }