summaryrefslogtreecommitdiffstats
path: root/qml/Sources.qml
blob: a43b6a4e96b82172c207a153a489b2041d7ef74c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
import QtQuick 2
import QtQuick.Controls 1
import QtQuick.Layouts 1
import QtQuick.Controls.Styles 1
import QtGraphicalEffects 1

// Configure source page
Rectangle {
    property var title: qsTr("Media sources")
    width: view.width; height: view.height
    Loader { sourceComponent: slidebackground ;
        anchors.fill: parent}
    Flickable {
        width: view.width; height: view.height
        contentWidth: gridRepo.width; contentHeight: gridRepo.height
        clip: true
        flickableDirection: Flickable.VerticalFlick
    GridLayout {
        id: gridRepo
        columns: 2
            Label {
                Layout.columnSpan: 2
                Layout.topMargin: 10
                Layout.leftMargin: 10
                text: qsTr("Configure software repositories"); font.bold: true;
                color: "white" }
            Label {
                Layout.columnSpan: 2
                Layout.topMargin: 10
                Layout.leftMargin: 10
                text: qsTr("Mageia official repositories contain:");
                color: "white"  }
            Button {id: coreBg
                Layout.margins: 5
                Layout.alignment: Qt.AlignTop
                Layout.fillWidth: true
                //height: Qt.application.font.pixelSize * 1.3
                style: ButtonStyle {
                    label: Label {
                        horizontalAlignment: TextInput.AlignHCenter
                        //: Should be as displayed in software manager, thus in general not translated
                        text: qsTr("core");
                        font.bold: true; color: "black";
                    }
                    background: Rectangle {
                        LinearGradient {
                            anchors.fill: parent
                            start: Qt.point(0, 0)
                            end: Qt.point(0, 20)
                            gradient: Gradient {
                                GradientStop { position: 0.0; color: "lightgreen" }
                                GradientStop { position: 1.0; color: "green" }
                            }
                        }
                    }

                }
            }
            Label {
                text: qsTr("- the free-open-source packages");
                wrapMode: Text.WordWrap
                Layout.maximumWidth: slideshow.width -20 - coreBg.width
                color: "white"
            }
            Button {
                Layout.margins: 5
                Layout.alignment: Qt.AlignTop
                Layout.fillWidth: true
                style: ButtonStyle {
                    label: Label {
                        horizontalAlignment: TextInput.AlignHCenter
                        //: Should be as displayed in software manager, thus in general not translated
                        text: qsTr("nonfree");
                        font.bold: true; color: "white";
                    }
                    background: Rectangle {
                        LinearGradient {
                            anchors.fill: parent
                            start: Qt.point(0, 0)
                            end: Qt.point(0, 20)
                            gradient: Gradient {
                                GradientStop { position: 0.0; color: "red" }
                                GradientStop { position: 1.0; color: "darkred" }
                            }
                        }
                    }

                }
            }
            Label {
                width: parent.width
                text: qsTr("- closed-source programs, e.g. Nvidia proprietary drivers, non-free drivers for some Wi-Fi cards, etc");
                Layout.maximumWidth: slideshow.width - 110
                wrapMode: Text.WordWrap
                color: "white"
            }
            Button {
                Layout.margins: 5
                Layout.alignment: Qt.AlignTop
                Layout.fillWidth: true
                style: ButtonStyle {
                    label: Label {
                        horizontalAlignment: TextInput.AlignHCenter
                        //: Should be as displayed in software manager, thus in general not translated
                        text: qsTr("tainted");
                        font.bold: true; color: "white";
                    }
                    background: Rectangle {
                        LinearGradient {
                            anchors.fill: parent
                            start: Qt.point(0, 0)
                            end: Qt.point(0, 20)
                            gradient: Gradient {
                                GradientStop { position: 0.0; color: "red" }
                                GradientStop { position: 1.0; color: "darkred" }
                            }
                        }
                    }

                }
            }
            Label {
                text: qsTr("- these packages (eg audio and video codecs needed for certain multimedia files or commercial DVDs) may infringe on patents or copyright laws in certain countries. ");
                wrapMode: Text.WordWrap
                Layout.maximumWidth: slideshow.width -110
                color: "white"
            }
            Button {
                Layout.margins: 5
                Layout.alignment: Qt.AlignTop
                Layout.fillWidth: true
                style: ButtonStyle {
                    label: Label {
                        horizontalAlignment: TextInput.AlignHCenter
                        //: Should be as displayed in software manager, thus in general not translated
                        text: qsTr("backports");
                        font.bold: true; color: "black";
                    }
                    background: Rectangle {
                        LinearGradient {
                            anchors.fill: parent
                            start: Qt.point(0, 0)
                            end: Qt.point(0, 20)
                            gradient: Gradient {
                                GradientStop { position: 0.0; color: "lightgray" }
                                GradientStop { position: 1.0; color: "darkgray" }
                            }
                        }
                    }

                }
            }
            Label {
                text: qsTr("- include new versions of packages, and new packages, that do not meet the updates policy.");
                wrapMode: Text.WordWrap
                Layout.maximumWidth: slideshow.width -110
                color: "white"
            }
            Button {
                Layout.margins: 5
                Layout.alignment: Qt.AlignTop
                Layout.fillWidth: true
                style: ButtonStyle {
                    label: Label {
                        horizontalAlignment: TextInput.AlignHCenter
                        text: qsTr("Note! ");
                        font.bold: true; color: "black";
                    }
                    background: Rectangle {
                        color: "#e6c200";
                    }

                }
            }
            Label { text: qsTr("If you enabled the online repositories during installation, some media sources should be installed already. Otherwise, we will now configure these online repositories.
If this computer will have access to the Internet, you can delete the <i>Local</i> entry from the list of repositories.");
                    wrapMode: Text.WordWrap
                    textFormat: Text.RichText
                    color: "white"
                    Layout.fillWidth: true
                    Layout.maximumWidth: slideshow.width - 110
                }
            Label { text: qsTr("Now, please enable or disable the online repositories of your choice: click on the <i>Edit software repositories</i> button. Select at least the <i>release</i> and <i>updates</i> pair. <i>Debug</i> and <i>Testing</i> are for special cases.")+"<BR />"+
                            qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.")
                    wrapMode: Text.WordWrap
                    textFormat: Text.RichText
                    color: "white"
                    Layout.fillWidth: true
                    Layout.maximumWidth: slideshow.width - 10
                    Layout.columnSpan: 2
                    Layout.margins: 10
                }
            MButton {
                visible: networkstate.isOffLine()
                Layout.columnSpan: 2
                Layout.alignment: Qt.AlignHCenter
                objectName: "launch"
                onMbuttonClicked: { launch.command(["/usr/bin/draknetcenter",])}
                buttonText: qsTr("Configure network")
            }
            MButton {
                Layout.columnSpan: 2
                Layout.alignment: Qt.AlignHCenter
                objectName: "launch"
                onMbuttonClicked: { launch.command(["/usr/bin/drakrpm-edit-media",])}
                buttonText: qsTr("Edit software sources")+" *"
            }
        }
        }

        Label {
            anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
            text: qsTr("(*) Administrator password is needed.")
            Layout.maximumWidth: slideshow.width * .4
            font.italic: true
            color: "white"
        }

}