~jonas-drange/ubuntu-system-settings/update-cannot-be-ota

« back to all changes in this revision

Viewing changes to plugins/cellular/Components/Sim.qml

  • Committer: Bileto Bot
  • Author(s): Ken VanDine
  • Date: 2016-07-22 14:38:13 UTC
  • mfrom: (1556.3.32 slotsLayout)
  • Revision ID: ci-train-bot@canonical.com-20160722143813-ht9e4766lm0ie5fa
Ported to use Slots layout and updated visuals (LP: #1596529)

Approved by: Jonas G. Drange

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2014 Canonical Ltd
 
2
 * Copyright (C) 2014-2016 Canonical Ltd
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License version 3 as
37
37
        return name + (number ? " (" + number + ")" : "");
38
38
    }
39
39
 
 
40
    function getTechString () {
 
41
        return techToString(radioSettings.technologyPreference);
 
42
    }
 
43
 
40
44
    function techToString (tech) {
41
45
        var strings = {
42
46
            'gsm': i18n.tr("2G only (saves battery)"),
44
48
            'lte': i18n.tr("2G/3G/4G (faster)")
45
49
        };
46
50
        strings['umts_enable'] = strings['umts'];
47
 
        return strings[tech];
 
51
        return strings[tech] || "";
48
52
    }
49
53
 
50
54
    // adds umts_enable to an copy of model