-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopups.js
More file actions
154 lines (126 loc) · 3.39 KB
/
Copy pathpopups.js
File metadata and controls
154 lines (126 loc) · 3.39 KB
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
var confirmcomp
var confirmitem
function showErrorBox(msg) {
page.loadingRect.opacity=0.7;
page.popuptitle = "ERROR";
page.popuptitleimg = "images/err.png";
page.errmsg.text = msg;
page.errbox.opacity = 1;
page.disableMouseBack = true
}
function showSuccessBox(msg){
page.loadingRect.opacity=0.7;
page.popuptitle = "SUCCESS";
page.popuptitleimg = "images/success.png";
page.errmsg.text = msg;
page.errbox.opacity = 1;
disableMouseBackground.enabled = true
}
function showWarningBox(msg){
page.loadingRect.opacity=0.7;
page.popuptitle = "WARNING";
page.popuptitleimg = "images/warning.png";
page.errmsg.text = msg;
page.errbox.opacity = 1;
disableMouseBackground.enabled = true
}
function showLoaderDestroyConfirm()
{
confirmitem.opacity = 0;
page.loader.opacity = 1
page.loadingRect.opacity=0.7
page.disableMouseBack = true
confirmitem.destroy();
}
function deleteGalleryCache(){
showLoaderDestroyConfirm()
page.loadingTimerCache.start()
}
function deleteTempFiles(){
showLoaderDestroyConfirm()
page.loadingTimerTemp.start()
}
function deleteCameraFolders(){
showLoaderDestroyConfirm()
page.loadingTimerFolders.start()
}
function donate(){
confirmitem.opacity = 0;
confirmitem.destroy();
page.disableMouseBack = true;
page.loadingRect.opacity = 0;
Qt.openUrlExternally("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H5QJFW6SEFHX4&lc=GB")
}
function deleteCameraFoldersFun()
{
i8910tuning.deleteEmptyCamera_slot();
page.loader.opacity = 0
showSuccessBox("Empty folders deleted!");
}
function deleteGalleryCacheFun()
{
if (!i8910tuning.deleteGalleryCache_slot()) {
page.loader.opacity = 0
showSuccessBox("Gallery cache successully deleted!");
}
else{
page.loader.opacity = 0
showErrorBox("Could not delete gallery cache");
}
}
function deleteTempFilesFun()
{
if (!i8910tuning.deleteTempFiles_slot()) {
page.loader.opacity = 0
showSuccessBox("Temp files in C:/Private/1020735b successully deleted!");
}
else{
page.loader.opacity = 0
showErrorBox("Could not delete temp files in C:/Private/1020735b");
}
}
function confirmExit(){
confirmitem.destroy()
Qt.quit()
}
function set_dynamic_mode(){
if (i8910tuning.changeClockMode_slot(1))
{
page.loader.opacity = 0
showErrorBox("Could not change to DYNAMIC mode");
}
else
{
page.loader.opacity = 0
showSuccessBox("Clock mode changed to DYNAMIC mode");
}
}
function set_locked_mode(){
if (i8910tuning.changeClockMode_slot(0))
{
page.loader.opacity = 0
showErrorBox("Could not change to LOCKED mode");
}
else
{
page.loader.opacity = 0
showSuccessBox("Clock mode changed to LOCKED mode");
}
}
function switch_mode(){
i8910tuning.changeClockMode_slot(2);
page.loader.opacity = 0
showWarningBox("Clock Patch created. Now open RomPatcher+ and activate it");
}
function defaultks(){
confirmitem.opacity = 0;
confirmitem.destroy();
if (!i8910tuning.defaultks_slot()){
page.loadingRect.opacity=0.7;
page.forceexit.opacity = 1;
page.forceexitmsg = "KS default settings restored. i8910tuning will now close to apply the changes."
}
else {
showErrorBox("Could not restore default ks settings");
}
}