~ubuntu-shorts-dev/ubuntu-rssreader-app/ubuntu-rssreader-app-to-tabs

« back to all changes in this revision

Viewing changes to shorts/qml/shorts-app.qml

  • Committer: Tarmac
  • Author(s): Joey Chan
  • Date: 2015-12-21 08:21:59 UTC
  • mfrom: (412.1.5 ubuntu-rssreader-app)
  • Revision ID: tarmac-20151221082159-p62lbptbbu7p840g
remove useless commented code.

Approved by Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import "./components"
9
9
import "./utils/databasemodule_v2.js" as DB
10
10
 
 
11
import "./nongoogle"
 
12
 
11
13
MainView {
12
14
    id: mainView
13
15
 
119
121
        objectName: "pageStack"
120
122
 
121
123
        property bool isListView: optionsKeeper.useListMode
122
 
        property var commonHeadActions: [refreshAction, changeModeAction, editTopicsAction, nightModeAction]
 
124
        property var commonHeadActions: [refreshAction, changeModeAction, editTopicsAction, nightModeAction, actionSetting]
123
125
 
124
126
        anchors.fill: parent
125
127
        focus: true
231
233
            }
232
234
        }
233
235
 
 
236
        Action {
 
237
            id: actionSetting
 
238
            objectName:"actionSetting"
 
239
            text:  i18n.tr("Settings")
 
240
            iconName: "settings"
 
241
            onTriggered: {
 
242
                pageStack.push(Qt.resolvedUrl("./pages/PageSettings.qml"))
 
243
            }
 
244
        }
 
245
 
234
246
        /* -------------------------- Pages & Tabs ---------------------------- */
235
247
 
236
248
        BottomEdgeTabs {
239
251
            objectName: "tabstabs"
240
252
            visible: false
241
253
 
242
 
            bottomEdgePage: appendFeedPage
 
254
            bottomEdgePage: optionsKeeper.useGoogleSearch() ? appendFeedPage : appendNGFeedPage
243
255
            bottomEdgeTitle: i18n.tr("Add feeds")
244
256
            bottomEdgeBackgroundColor: "#F5F5F5" // "#875864"
245
257
            bottomEdgeTipColor: "#5533b5e5"// "#E0E0E0" //"#9b616c"
379
391
            flickable: null
380
392
            visible: false
381
393
        }
 
394
 
 
395
        AppendNGFeedPage {
 
396
            id: appendNGFeedPage
 
397
 
 
398
            title: i18n.tr("Add feeds")
 
399
            flickable: null
 
400
            visible: false
 
401
        }
382
402
        // ******************************** Choose Topic Page ***********************///////////////
383
403
 
384
404
        ChooseTopicPage {
436
456
        id: optionsKeeper
437
457
    }
438
458
 
 
459
    // Positioner to detect current position
 
460
    Positioner {
 
461
        id: positionDetector
 
462
    }
 
463
 
439
464
    /* -------------------------- Components ---------------------------- */
440
465
 
441
466
    Component {
534
559
        }
535
560
    } // Component
536
561
 
 
562
    ////////////////////////////////////////////////////////  a dialog to ask user if she/he wants to turn off the google search
 
563
    Component {
 
564
        id: componentDialogNG
 
565
 
 
566
        Dialog {
 
567
            id: dialogNG
 
568
            title: i18n.tr("Warning")
 
569
            text: i18n.tr("Shorts detects that you're located in an area which blocks Google's IP.<br><br>"
 
570
                          + "We strongly reconmend you to turn off the Google search funtion."
 
571
                          + "Or you can do it in the settings page manually.")
 
572
 
 
573
            Button {
 
574
                text: i18n.tr("Yes, please.")
 
575
                color: UbuntuColors.orange
 
576
                objectName: "dialogNGButtonYes"
 
577
                onClicked: {
 
578
                    optionsKeeper.setUseGoogleSearch(false)
 
579
                    PopupUtils.close(dialogNG)
 
580
                }
 
581
            }
 
582
 
 
583
            Button {
 
584
                text: i18n.tr("No, thanks.")
 
585
                objectName: "dialogNGButtonNo"
 
586
                onClicked: PopupUtils.close(dialogNG)
 
587
            }
 
588
        }
 
589
    } // Component
 
590
 
537
591
    /* -------------------------- Connections ---------------------------- */
538
592
 
539
593
    Connections {