~mterry/ubuntu-calculator-app/confined

« back to all changes in this revision

Viewing changes to app/ubuntu-calculator-app.qml

  • Committer: Tarmac
  • Author(s): Renato Araujo Oliveira Filho
  • Date: 2016-11-11 16:03:43 UTC
  • mfrom: (311.1.5 snappy)
  • Revision ID: tarmac-20161111160343-p25ctj87k5lp0wre
Using content share to reduce app size when snapped.
Make sure that desktop file has the same name as the snap binary name. Fixes: https://bugs.launchpad.net/bugs/1620333, https://bugs.launchpad.net/bugs/1638292.

Approved by Alan Pope 🍺🐧🐱, Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        source: "engine/MathJs.qml"
46
46
        asynchronous: true
47
47
        active: keyboardLoader.active
 
48
        onLoaded: {
 
49
            mathJs.config({
 
50
                    number: 'BigNumber'
 
51
            });
 
52
        }
48
53
    }
49
54
 
50
55
    // Long form of formula, which are saved in the storage/history
135
140
    }
136
141
 
137
142
    function formulaPush(visual) {
138
 
        mathJs.config({
139
 
                number: 'bignumber'
140
 
        });
141
143
        // If the user press a number after the press of "=" we start a new
142
144
        // formula, otherwise we continue with the old one
143
145
        if ((!isNaN(visual) || (visual === ".")) && isLastCalculate) {
204
206
    }
205
207
 
206
208
    function calculate() {
207
 
        mathJs.config({
208
 
                number: 'bignumber'
209
 
        });
210
209
        if ((longFormula === '') || (isLastCalculate === true)) {
211
210
            errorAnimation.restart();
212
211
            return;