Revision 749068ba src/gr/grnet/pithos/web/client/FileUploadGearsDialog.java

b/src/gr/grnet/pithos/web/client/FileUploadGearsDialog.java
38 38
import gr.grnet.pithos.web.client.rest.PostCommand;
39 39
import gr.grnet.pithos.web.client.rest.RestCommand;
40 40
import gr.grnet.pithos.web.client.rest.RestException;
41
import gr.grnet.pithos.web.client.rest.resource.FileResource;
42 41

  
43 42
import java.util.ArrayList;
44 43
import java.util.Arrays;
......
109 108
	/**
110 109
	 * The widget's constructor.
111 110
	 */
112
	public FileUploadGearsDialog(GSS _app, Folder _folder) {
111
	public FileUploadGearsDialog(Pithos _app, Folder _folder) {
113 112
        this.folder = _folder;
114 113
        this.app = _app;
115 114
		// Set the dialog's caption.
......
121 120
		info.addStyleName("pithos-uploadNote");
122 121
		panel.add(info);
123 122
		// Add an informative label with the folder name.
124
		Object selection = GSS.get().getTreeView().getSelection();
123
		Object selection = Pithos.get().getTreeView().getSelection();
125 124

  
126 125
		browse = new Button("Browse...");
127 126

  
......
161 160
			public void onClick(ClickEvent event) {
162 161
				canContinue = false;				
163 162
				cancelUpload();				
164
				GSS.get().showFileList(true);
163
				Pithos.get().showFileList(true);
165 164
			}
166 165
		});
167 166
		buttons.add(cancel);
......
212 211

  
213 212
	@Override
214 213
	public void prepareAndSubmit() {
215
		GSS app = GSS.get();
214
		Pithos app = Pithos.get();
216 215
		if (selectedFiles.size() == 0) {
217 216
			app.displayError("You must select a file!");
218 217
			hide();
......
310 309

  
311 310
				@Override
312 311
				public void onError(Throwable t) {
313
					GSS app = GSS.get();
312
					Pithos app = Pithos.get();
314 313
					GWT.log("", t);
315 314
					if (t instanceof RestException) {
316 315
						int statusCode = ((RestException) t).getHttpStatusCode();
......
348 347
	 * Perform the HTTP request to upload the specified file.
349 348
	 */
350 349
	protected void doSend(final List<File> filesRemaining) {
351
		final GSS app = GSS.get();
350
		final Pithos app = Pithos.get();
352 351
		HttpRequest request = factory.createHttpRequest();
353 352
		requests.add(request);
354 353
		String method = "PUT";
......
365 364
		String date = RestCommand.getDate();
366 365
		String sig = RestCommand.calculateSig(method, date, resource, RestCommand.base64decode(token));
367 366
		request.open(method, path);
368
		request.setRequestHeader("X-GSS-Date", date);
369 367
		request.setRequestHeader("Authorization", app.getCurrentUserResource().getUsername() + " " + sig);
370 368
		request.setRequestHeader("Accept", "application/json; charset=utf-8");
371 369
		request.setCallback(new RequestCallback() {
......
422 420
	 */
423 421
	protected void finish() {
424 422
		hide();
425
		//GSS.get().showFileList(true);
426
		GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());//showFileList(true);
427
		GSS.get().getStatusPanel().updateStats();
423
		//Pithos.get().showFileList(true);
424
		Pithos.get().getTreeView().updateNode(Pithos.get().getTreeView().getSelection());//showFileList(true);
425
		Pithos.get().getStatusPanel().updateStats();
428 426
	}
429 427

  
430 428
	/**

Also available in: Unified diff