~unity-api-team/unity8/scopes-active-depends-on-screen-rtm

« back to all changes in this revision

Viewing changes to qml/Panel/Indicators/MenuItemFactory.qml

  • Committer: CI bot
  • Author(s): Michael Terry, Michael Zanetti, Michał Sawicz, Daniel d'Andrada, Albert Astals, Nick Dedekind, Mirco Müller, Alberto Aguirre
  • Date: 2014-11-05 14:39:26 UTC
  • mfrom: (1396.3.14 rtm-1104-sync)
  • Revision ID: ps-jenkins@lists.canonical.com-20141105143926-gnigtgarofubbip2
[ Albert Astals ]
* Fix i18n (LP: #1389165)

[ Michael Zanetti ]
* Fix DBusVariant conversion for launcher emblems (LP: #1387261)
* Fix desktop file encoding in launcher (LP: #1387083)

[ Alberto Aguirre ]
* Add audioRole to QtMultimedia mock
* Add a plugin to take screenshots on vol up + vol down

[ Nick Dedekind ]
* Reset current item selection on deleted. (LP: #1378462)
* Added timer to re-assert server value after indicator menu item
  activation. (LP: #1336715)

[ Mirco Müller ]
* Added dedicated swipe-to-act button for snap-decisions, which avoids
  accidental taps/button-presses. (LP: #1358343)

[ Michael Terry ]
* Don't lock phone if user tries to switch back to an active call.
  (LP: #1388156)

[ Daniel d'Andrada ]
* TouchDispatcher: synthesize MouseButtonDblClick events (LP: #1388359) Fixes: 1336715, 1358343, 1378462, 1387083, 1387261, 1388156, 1388359, 1389165

Show diffs side-by-side

added added

removed removed

Lines of Context:
290
290
            checked: serverChecked
291
291
            highlightWhenPressed: false
292
292
 
293
 
            onServerCheckedChanged: {
294
 
                // value can be changed by menu, so a binding won't work.
295
 
                checked = serverChecked;
296
 
            }
 
293
            onServerCheckedChanged: updateFromServer()
297
294
            onTriggered: {
298
295
                menuModel.activate(menuIndex);
 
296
                resyncTimer.restart();
 
297
            }
 
298
 
 
299
            // value can be changed by menu, so a binding won't work.
 
300
            function updateFromServer() {
 
301
                resyncTimer.stop();
 
302
                if (checked != serverChecked) {
 
303
                    checked = serverChecked;
 
304
                }
 
305
            }
 
306
 
 
307
            // Server value is not guaranteed to change to what we expect from an activation.
 
308
            // In this case, we need to re-assert that we are presenting the UI with the set backend value.
 
309
            Timer {
 
310
                id: resyncTimer
 
311
                interval: 1500
 
312
                onTriggered: updateFromServer()
299
313
            }
300
314
        }
301
315
    }
315
329
            checked: serverChecked
316
330
            highlightWhenPressed: false
317
331
 
318
 
            onServerCheckedChanged: {
319
 
                // value can be changed by menu, so a binding won't work.
320
 
                checked = serverChecked;
321
 
            }
 
332
            onServerCheckedChanged: updateFromServer()
322
333
            onTriggered: {
323
334
                menuModel.activate(menuIndex);
 
335
                resyncTimer.restart();
 
336
            }
 
337
 
 
338
            // value can be changed by menu, so a binding won't work.
 
339
            function updateFromServer() {
 
340
                resyncTimer.stop();
 
341
                if (checked != serverChecked) {
 
342
                    checked = serverChecked;
 
343
                }
 
344
            }
 
345
 
 
346
            // Server value is not guaranteed to change to what we expect from an activation.
 
347
            // In this case, we need to re-assert that we are presenting the UI with the set backend value.
 
348
            Timer {
 
349
                id: resyncTimer
 
350
                interval: 1500
 
351
                onTriggered: updateFromServer()
324
352
            }
325
353
        }
326
354
    }