~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to libcore/FileUtils.vala

Various changes aimed at improving the connection and loading of network sites and fixes some possible bugs.

A new warning screen is shown if the connection or loading operation times out. Pressing reload under these conditions unmounts any connection and starts again.

GOF.File mount is set to the enclosing_mount when the location is not the root location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
                return true;
479
479
        }
480
480
    }
 
481
 
 
482
    public uint16 get_default_port_for_protocol (string protocol) {
 
483
        var ptcl = protocol.down ();
 
484
        switch (ptcl) {
 
485
            case "sftp":
 
486
                return 22;
 
487
            case "ftp":
 
488
                return 21;
 
489
            case "afp" :
 
490
                return 548;
 
491
            case "dav" :
 
492
                return 80;
 
493
            case "davs" :
 
494
                return 443;
 
495
            default :
 
496
                return 0;
 
497
        }
 
498
    }
 
499
 
 
500
    public bool get_is_tls_for_protocol (string protocol) {
 
501
        var ptcl = protocol.down ();
 
502
        switch (ptcl) {
 
503
            case "sftp":
 
504
                return false;
 
505
            case "ssh":
 
506
                return true;
 
507
            case "ftp":
 
508
                return false;
 
509
            case "afp" :
 
510
                return false;
 
511
            case "dav" :
 
512
                return false;
 
513
            case "davs" :
 
514
                return true;
 
515
            default :
 
516
                return false;
 
517
        }
 
518
    }
481
519
}
482
520
 
483
521
namespace Marlin {