2
' This file is part of MyUnity
4
' Copyright © 2011 Fabio Colinelli
5
' Copyright © 2011 Davide Pedrelli
6
' Authors: Fabio "Pixel" Colinelli <pixel.ubuntu@gmail.com>
7
' Davide "Pedro" Pedrelli <pobox.davide@gmail.com>
8
' Sergio "Giowile" Gridelli <sergio.gridelli@gmail.com>
9
' Andrea "warp10" Colangelo <warp10@ubuntu.com>
11
' This program IS free software; you can redistribute it AND / OR modify
12
' it under the terms OF the GNU General PUBLIC License AS published by
13
' the Free Software Foundation; version 3 OF the License.
15
' This program IS distributed IN the hope that it will be useful,
16
' but WITHOUT ANY WARRANTY; without even the implied warranty OF
17
' MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.See the
18
' GNU General PUBLIC License FOR more details.
20
' You should have received a COPY OF the GNU General PUBLIC License
22
' along WITH this program; IF NOT, WRITE TO the Free Software
23
' Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110 - 1301, USA.
25
PUBLIC XstartMouse AS Integer
26
PUBLIC XstartSlider AS Integer
27
PUBLIC Xslider AS Integer
28
PUBLIC ifXMovehome AS Integer = 0
29
PUBLIC ifXMovetrash AS Integer = 0
30
PUBLIC ifXMovenet AS Integer = 0
31
PUBLIC ifXMovedev AS Integer = 0
36
PUBLIC SUB language_system()
37
Frame1.Text = ("Dimensione")
38
Frame6.Text = ("Trasparenza")
39
Frame4.Text = ("Comportamento")
40
Frame5.Text = ("Mostra dispositivi")
41
Frame2.Text = ("Visualizzazione")
42
Frame3.Text = ("Retro illuminazione")
43
Frame7.Text = ("Sfocatura")
44
Frame8.Text = ("Trasparenza")
45
Frame11.Text = ("Carattere per i documenti")
46
Frame12.Text = ("Carattere di sistema")
47
Frame13.Text = ("Carattere larghezza fissa")
48
Frame10.Text = ("Font antialiasing")
49
Frame9.Text = ("Font hinting")
50
Frame15.Text = ("MyUnity è stato sviluppato da")
53
RadioButton1.Text = ("piccolo")
54
RadioButton2.Text = ("medio")
55
RadioButton3.Text = ("grande")
56
RadioButton29.Text = ("attiva")
57
RadioButton30.Text = ("disattiva")
58
RadioButton31.Text = ("semi")
59
RadioButton32.Text = ("ottimale")
60
RadioButton14.Text = ("sempre")
61
RadioButton15.Text = ("solo montati")
62
RadioButton16.Text = ("mai")
63
RadioButton12.Text = ("fisso")
64
RadioButton39.Text = ("intelligente")
65
RadioButton13.Text = ("a scomparsa")
66
RadioButton25.Text = ("evita finestra")
67
RadioButton4.Text = ("scorrimento")
68
RadioButton5.Text = ("dissolvenza")
69
RadioButton5.Text = ("scorrimento e dissolvenza")
70
RadioButton7.Text = ("icone accese")
71
RadioButton8.Text = ("icone attive accese")
72
RadioButton9.Text = ("icone spente")
73
RadioButton10.Text = ("solo bordo icone attive")
74
RadioButton11.Text = ("icone attive accese e bordo")
75
RadioButton18.Text = ("accesa")
76
RadioButton19.Text = ("intelligente")
77
RadioButton17.Text = ("spenta")
78
RadioButton26.Text = ("attiva")
79
RadioButton28.Text = ("semi")
80
RadioButton35.Text = ("ottimale")
81
RadioButton27.Text = ("disattiva")
82
label4.Text = ("visualizza Home")
83
label6.Text = ("visualizza rete")
84
label7.Text = ("visualizza dispositivi montati")
85
label5.Text = ("visualizza cestino")
86
RadioButton24.Text = ("nessuno")
87
RadioButton33.Text = ("scala di grigi")
88
RadioButton34.Text = ("rgba (LCD)")
89
RadioButton20.Text = ("nessuno")
90
RadioButton21.Text = ("leggero")
91
RadioButton22.Text = ("medio")
92
RadioButton23.Text = ("pieno")
93
Button1.Text = ("Valori di default")
95
TabStrip1.Text = ("Launcher")
97
TabStrip1.Text = ("Dash")
99
TabStrip1.Text = ("Panel")
101
TabStrip1.Text = ("Scrivania")
103
TabStrip1.Text = ("Caratteri")
105
TabStrip1.Text = ("Info")
108
PUBLIC SUB X_Start(x AS Integer)
109
XstartMouse = Mouse.ScreenX
113
PUBLIC SUB X_move_home(PictX AS Integer, PictWidth AS Integer) AS Integer
114
sliderhome.Picture = Picture["slider_hover.png"]
115
ifXMovehome = Mouse.ScreenX
116
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
117
IF Xslider < PictX THEN
119
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
120
Xslider = (PictX + PictWidth / 2)
125
PUBLIC SUB Xstophome(PictX AS Integer) AS Integer
126
IF ifXMovehome <> 0 THEN
127
IF Xslider < PictX + 18 THEN
133
IF Xslider < PictX + 18 THEN
140
sliderhome.Picture = Picture["slider.png"]
145
PUBLIC SUB X_move_trash(PictX AS Integer, PictWidth AS Integer) AS Integer
146
slidertrash.Picture = Picture["slider_hover.png"]
147
ifXMovetrash = Mouse.ScreenX
148
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
149
IF Xslider < PictX THEN
151
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
152
Xslider = (PictX + PictWidth / 2)
157
PUBLIC SUB Xstoptrash(PictX AS Integer) AS Integer
158
IF ifXMovetrash <> 0 THEN
159
IF Xslider < PictX + 18 THEN
165
IF Xslider < PictX + 18 THEN
172
slidertrash.Picture = Picture["slider.png"]
176
PUBLIC SUB X_move_net(PictX AS Integer, PictWidth AS Integer) AS Integer
177
slidernet.Picture = Picture["slider_hover.png"]
178
ifXMovenet = Mouse.ScreenX
179
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
180
IF Xslider < PictX THEN
182
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
183
Xslider = (PictX + PictWidth / 2)
188
PUBLIC SUB Xstopnet(PictX AS Integer) AS Integer
189
IF ifXMovenet <> 0 THEN
190
IF Xslider < PictX + 18 THEN
196
IF Xslider < PictX + 18 THEN
203
slidernet.Picture = Picture["slider.png"]
207
PUBLIC SUB X_move_dev(PictX AS Integer, PictWidth AS Integer) AS Integer
208
sliderdev.Picture = Picture["slider_hover.png"]
209
ifXMovedev = Mouse.ScreenX
210
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
211
IF Xslider < PictX THEN
213
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
214
Xslider = (PictX + PictWidth / 2)
219
PUBLIC SUB Xstopdev(PictX AS Integer) AS Integer
220
IF ifXMovedev <> 0 THEN
221
IF Xslider < PictX + 18 THEN
227
IF Xslider < PictX + 18 THEN
234
sliderdev.Picture = Picture["slider.png"]
240
PUBLIC SUB Form_Open()
243
IF Main.icon_size = 32 THEN RadioButton1.Value = TRUE
244
IF Main.icon_size = 48 THEN RadioButton2.Value = TRUE
245
IF Main.icon_size = 64 THEN RadioButton3.Value = TRUE
246
IF Main.autohide_animation = 0 OR 1 THEN RadioButton4.Value = TRUE
247
IF Main.autohide_animation = 2 THEN RadioButton5.Value = TRUE
248
IF Main.autohide_animation = 3 THEN RadioButton6.Value = TRUE
249
IF Main.launcher_hide_mode = 0 THEN RadioButton12.value = TRUE
250
IF Main.launcher_hide_mode = 1 THEN RadioButton13.value = TRUE
251
IF Main.launcher_hide_mode = 2 THEN RadioButton25.value = TRUE
252
IF Main.launcher_hide_mode = 3 THEN RadioButton39.value = TRUE
254
IF Main.panel_opacity >= 1 THEN RadioButton27.value = TRUE
255
IF Main.panel_opacity <= 0.5 THEN RadioButton28.value = TRUE
256
IF Main.panel_opacity > 0.5 AND Main.panel_opacity <= 0.7 THEN RadioButton35.Value = TRUE
257
IF Main.panel_opacity = 0 THEN RadioButton26.value = TRUE
259
IF Main.dash_blur_experimental = 0 THEN RadioButton17.value = TRUE
260
IF Main.dash_blur_experimental = 1 THEN RadioButton18.value = TRUE
261
IF Main.dash_blur_experimental = 2 THEN RadioButton19.value = TRUE
262
IF Main.devices_option = 2 THEN RadioButton14.value = TRUE
263
IF Main.devices_option = 0 THEN RadioButton15.value = TRUE
264
IF Main.devices_option = 1 THEN RadioButton16.value = TRUE
265
IF Main.backlight_mode = 0 THEN RadioButton7.value = TRUE
266
IF Main.backlight_mode = 1 THEN RadioButton8.value = TRUE
267
IF Main.backlight_mode = 2 THEN RadioButton9.value = TRUE
268
IF Main.backlight_mode = 3 THEN RadioButton10.value = TRUE
269
IF Main.backlight_mode = 4 THEN RadioButton11.value = TRUE
270
IF Main.launcher_opacity = 0 THEN RadioButton29.value = TRUE
271
IF Main.launcher_opacity > 0 AND Main.launcher_opacity <= 0.5 THEN RadioButton31.value = TRUE
272
IF Main.launcher_opacity > 0.5 AND Main.launcher_opacity < 1 THEN RadioButton32.value = TRUE
273
IF Main.launcher_opacity = 1 THEN RadioButton30.value = TRUE
274
IF Main.hinting = "'none'\n" THEN RadioButton20.value = TRUE
275
IF Main.hinting = "'slight'\n" THEN RadioButton21.value = TRUE
276
IF Main.hinting = "'medium'\n" THEN RadioButton22.value = TRUE
277
IF Main.hinting = "'full'\n" THEN RadioButton23.value = TRUE
278
IF Main.antialiasing = "'none'\n" THEN RadioButton24.value = TRUE
279
IF Main.antialiasing = "'grayscale'\n" THEN RadioButton33.value = TRUE
280
IF Main.antialiasing = "'rgba'\n" THEN RadioButton34.value = TRUE
282
Label1.Text = Main.document_font_name
283
Label2.Text = Main.font_name
284
Label3.Text = Main.monospace_font_name
286
IF Main.trash_icon_visible = "true\n" THEN
287
slidertrash.x = (pictrash.X + slidertrash.X) + 22
290
slidertrash.x = pictrash.X
294
IF Main.home_icon_visible = "true\n" THEN
295
sliderhome.x = (Pichome.X + sliderhome.X) + 22
298
sliderhome.x = Pichome.X
304
IF Main.volumes_visible = "true\n" THEN
305
sliderdev.x = (Picdev.X + sliderdev.X) + 22
308
sliderdev.x = Picdev.X
312
IF Main.network_icon_visible = "true\n" THEN
313
slidernet.x = (Picnet.X + slidernet.X) + 22
316
slidernet.x = Picnet.X
323
PUBLIC SUB RadioButton1_Click()
324
Main.compiz_set("icon_size", "int", "32")
327
PUBLIC SUB RadioButton2_Click()
328
Main.compiz_set("icon_size", "int", "48")
331
PUBLIC SUB RadioButton3_Click()
332
Main.compiz_set("icon_size", "int", "64")
335
PUBLIC SUB RadioButton4_Click()
336
Main.compiz_set("autohide_animation", "int", "1")
339
PUBLIC SUB RadioButton5_Click()
340
Main.compiz_set("autohide_animation", "int", "2")
343
PUBLIC SUB RadioButton6_Click()
344
Main.compiz_set("autohide_animation", "int", "3")
349
PUBLIC SUB RadioButton12_Click()
350
Main.compiz_set("launcher_hide_mode", "int", "0")
353
PUBLIC SUB RadioButton13_Click()
354
Main.compiz_set("launcher_hide_mode", "int", "1")
357
PUBLIC SUB RadioButton25_Click()
358
Main.compiz_set("launcher_hide_mode", "int", "2")
361
PUBLIC SUB RadioButton39_Click()
362
Main.compiz_set("launcher_hide_mode", "int", "3")
366
PUBLIC SUB RadioButton15_Click()
367
Main.compiz_set("devices_option", "int", "0")
370
PUBLIC SUB RadioButton16_Click()
371
Main.compiz_set("devices_option", "int", "1")
374
PUBLIC SUB RadioButton14_Click()
375
Main.compiz_set("devices_option", "int", "2")
380
PUBLIC SUB RadioButton26_Click()
381
Main.compiz_set("panel_opacity", "float", "0.0")
384
PUBLIC SUB RadioButton28_Click()
385
Main.compiz_set("panel_opacity", "float", "0.5")
388
PUBLIC SUB RadioButton35_Click()
389
Main.compiz_set("panel_opacity", "float", "0.7")
392
PUBLIC SUB RadioButton27_Click()
393
Main.compiz_set("panel_opacity", "float", "1.0")
398
PUBLIC SUB RadioButton17_Click()
399
Main.compiz_set("dash_blur_experimental", "int", "0")
402
PUBLIC SUB RadioButton18_Click()
403
Main.compiz_set("dash_blur_experimental", "int", "1")
406
PUBLIC SUB RadioButton19_Click()
407
Main.compiz_set("dash_blur_experimental", "int", "2")
410
PUBLIC SUB RadioButton20_Click()
411
Main.font_set("hinting", "none")
414
PUBLIC SUB RadioButton21_Click()
415
Main.font_set("hinting", "slight")
418
PUBLIC SUB RadioButton22_Click()
419
Main.font_set("hinting", "medium")
422
PUBLIC SUB RadioButton23_Click()
423
Main.font_set("hinting", "full")
426
PUBLIC SUB RadioButton7_Click()
427
Main.compiz_set("backlight_mode", "int", "0")
431
PUBLIC SUB RadioButton8_Click()
432
Main.compiz_set("backlight_mode", "int", "1")
436
PUBLIC SUB RadioButton9_Click()
437
Main.compiz_set("backlight_mode", "int", "2")
440
PUBLIC SUB RadioButton10_Click()
441
Main.compiz_set("backlight_mode", "int", "3")
444
PUBLIC SUB RadioButton11_Click()
445
Main.compiz_set("backlight_mode", "int", "4")
448
PUBLIC SUB RadioButton29_Click()
449
Main.compiz_set("launcher_opacity", "float", "0")
452
PUBLIC SUB RadioButton30_Click()
453
Main.compiz_set("launcher_opacity", "float", "1")
456
PUBLIC SUB RadioButton31_Click()
457
Main.compiz_set("launcher_opacity", "float", "0.5")
460
PUBLIC SUB RadioButton32_Click()
461
Main.compiz_set("launcher_opacity", "float", "0.65")
464
PUBLIC SUB RadioButton24_Click()
465
Main.font_set("antialiasing", "none")
468
PUBLIC SUB RadioButton33_Click()
469
Main.font_set("antialiasing", "grayscale")
472
PUBLIC SUB RadioButton34_Click()
473
Main.font_set("antialiasing", "rgba")
481
PUBLIC SUB TabStrip1_Click()
483
IF TabStrip1.Index = 0 THEN
484
PicLauncher.Visible = TRUE
486
PicLauncher.Visible = FALSE
489
IF TabStrip1.Index = 1 THEN
490
PicDash.Visible = TRUE
492
PicDash.Visible = FALSE
495
IF TabStrip1.Index = 2 THEN
496
PicPanel.Visible = TRUE
498
PicPanel.Visible = FALSE
501
IF TabStrip1.Index = 3 THEN
502
PicDesktop.Visible = TRUE
504
PicDesktop.Visible = FALSE
507
IF TabStrip1.Index = 4 THEN
508
PicFont.Visible = TRUE
510
PicFont.Visible = FALSE
513
IF TabStrip1.Index = 5 THEN
514
PicCredits.Visible = TRUE
515
Button1.Visible = FALSE
517
PicCredits.Visible = FALSE
518
Button1.Visible = TRUE
527
PUBLIC SUB FontChooser1_Change()
532
DIM okfont AS Boolean
534
FOR t = 1 TO Len(FontChooser1.SelectedFont)
535
IF Mid$(FontChooser1.SelectedFont, t, 1) = "," THEN
536
tts1 = FontChooser1.SelectedFont
539
tts1 = FontChooser1.SelectedFont & ",+0"
551
IF CheckBox5.Value = TRUE THEN
552
Label1.Text = tts1 'FontChooser1.SelectedFont
553
FOR t = 1 TO Len(Label1.Text)
554
IF Mid$(Label1.Text, t, 1) = "+" THEN
555
tt = Val(Right$(Label1.Text, Len(Label1.Text) - t)) + 10
557
Label1.Text = Left$(Label1.Text, t - 1) & tts
558
SHELL "gsettings set org.gnome.desktop.interface document-font-name " & "'" & Label1.text & "'"
565
IF okfont = FALSE THEN
566
IF CheckBox5.Value = TRUE THEN
567
Label1.Text = tts1 'FontChooser1.SelectedFont
568
FOR t = 1 TO Len(Label1.Text)
569
IF Mid$(Label1.Text, t, 1) = "-" THEN
570
tt = 10 - Val(Right$(Label1.Text, Len(Label1.Text) - t))
572
Label1.Text = Left$(Label1.Text, t - 1) & tts
573
SHELL "gsettings set org.gnome.desktop.interface document-font-name " & "'" & Label1.text & "'"
583
IF CheckBox6.Value = TRUE THEN
584
Label2.Text = tts1 'FontChooser1.SelectedFont
585
FOR t = 1 TO Len(Label2.Text)
586
IF Mid$(Label2.Text, t, 1) = "+" THEN
587
tt = Val(Right$(Label2.Text, Len(Label2.Text) - t)) + 10
589
Label2.Text = Left$(Label2.Text, t - 1) & tts
590
SHELL "gsettings set org.gnome.desktop.interface font-name " & "'" & Label2.text & "'"
598
IF okfont = FALSE THEN
599
IF CheckBox6.Value = TRUE THEN
600
Label2.Text = tts1 'FontChooser1.SelectedFont
601
FOR t = 1 TO Len(Label2.Text)
602
IF Mid$(Label2.Text, t, 1) = "-" THEN
603
tt = 10 - Val(Right$(Label2.Text, Len(Label2.Text) - t))
605
Label2.Text = Left$(Label2.Text, t - 1) & tts
606
SHELL "gsettings set org.gnome.desktop.interface font-name " & "'" & Label2.text & "'"
616
IF CheckBox7.Value = TRUE THEN
617
Label3.Text = tts1 'FontChooser1.SelectedFont
618
FOR t = 1 TO Len(Label3.Text)
619
IF Mid$(Label3.Text, t, 1) = "+" THEN
620
tt = Val(Right$(Label3.Text, Len(Label3.Text) - t)) + 10
622
Label3.Text = Left$(Label3.Text, t - 1) & tts
623
SHELL "gsettings set org.gnome.desktop.interface monospace-font-name " & "'" & Label3.text & "'"
630
IF okfont = FALSE THEN
631
IF CheckBox7.Value = TRUE THEN
632
Label3.Text = tts1 ' FontChooser1.SelectedFont
633
FOR t = 1 TO Len(Label3.Text)
634
IF Mid$(Label3.Text, t, 1) = "-" THEN
635
tt = 10 - Val(Right$(Label3.Text, Len(Label3.Text) - t))
637
Label3.Text = Left$(Label3.Text, t - 1) & tts
638
SHELL "gsettings set org.gnome.desktop.interface monospace-font-name " & "'" & Label3.text & "'"
649
PUBLIC SUB Button1_Click()
650
DIM bottone AS Integer
657
bottone = Message.Warning("Attenzione, saranno ripristinati i valori di default", "Procedi", "Annulla")
658
IF TabStrip1.Index = 0 'Launcher
660
RadioButton2.Value = TRUE
661
RadioButton16.Value = TRUE
662
RadioButton6.Value = TRUE
663
RadioButton32.Value = TRUE
664
RadioButton25.Value = TRUE
665
RadioButton7.Value = TRUE
669
IF TabStrip1.Index = 1 'Dash
671
RadioButton19.Value = TRUE
675
IF TabStrip1.Index = 2 'Panel
677
RadioButton27.Value = TRUE
682
IF TabStrip1.Index = 3 'Scrivania
684
slidertrash.x = pictrash.X
686
slidernet.x = picnet.X
688
sliderdev.x = picdev.X
690
sliderhome.x = pichome.X
692
Main.desktop_set("volumes-visible", "false")
693
Main.desktop_set("network-icon-visible", "false")
694
Main.desktop_set("trash-icon-visible", "false")
695
Main.desktop_set("home-icon-visible", "false")
699
IF TabStrip1.Index = 4 'Caratteri
701
RadioButton34.Value = TRUE
702
RadioButton21.Value = TRUE
703
Label1.Text = "'Sans,11'"
704
Label2.Text = "'Ubuntu,11'"
705
Label3.Text = "'Ubuntu Mono,13'"
706
SHELL "gsettings set org.gnome.desktop.interface document-font-name " & Label1.text
707
SHELL "gsettings set org.gnome.desktop.interface font-name " & Label2.text
708
SHELL "gsettings set org.gnome.desktop.interface monospace-font-name " & Label3.text
716
PUBLIC SUB Xmovehome(PictX AS Integer, PictWidth AS Integer) AS Integer
717
sliderhome.Picture = Picture["slider_hover.png"]
718
ifXMovehome = Mouse.ScreenX
719
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
720
IF Xslider < PictX THEN
722
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
723
Xslider = (PictX + PictWidth / 2)
728
PUBLIC SUB sliderhome_Enter()
729
sliderhome.Picture = Picture["slider_hover.png"]
732
PUBLIC SUB sliderhome_Leave()
733
sliderhome.Picture = Picture["slider.png"]
736
PUBLIC SUB sliderhome_MouseDown()
737
X_Start(sliderhome.X)
740
PUBLIC SUB sliderhome_MouseMove()
741
sliderhome.X = Xmovehome(pichome.X, pichome.Width)
744
PUBLIC SUB sliderhome_MouseUp()
745
sliderhome.X = Xstophome(pichome.X)
746
IF (pichome.X - sliderhome.X) / (-36) = 1 THEN
747
Main.desktop_set("home-icon-visible", "true")
749
Main.desktop_set("home-icon-visible", "false")
753
PUBLIC SUB Xmovetrash(PictX AS Integer, PictWidth AS Integer) AS Integer
754
slidertrash.Picture = Picture["slider_hover.png"]
755
ifXMovetrash = Mouse.ScreenX
756
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
757
IF Xslider < PictX THEN
759
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
760
Xslider = (PictX + PictWidth / 2)
765
PUBLIC SUB slidertrash_Enter()
766
slidertrash.Picture = Picture["slider_hover.png"]
769
PUBLIC SUB slidertrash_Leave()
770
slidertrash.Picture = Picture["slider.png"]
773
PUBLIC SUB slidertrash_MouseDown()
774
X_Start(slidertrash.X)
777
PUBLIC SUB slidertrash_MouseMove()
778
slidertrash.X = Xmovetrash(pictrash.X, pictrash.Width)
781
PUBLIC SUB slidertrash_MouseUp()
782
slidertrash.X = Xstoptrash(pictrash.X)
783
IF (pictrash.X - slidertrash.X) / (-36) = 1 THEN
784
Main.desktop_set("trash-icon-visible", "true")
786
Main.desktop_set("trash-icon-visible", "false")
791
PUBLIC SUB Xmovenet(PictX AS Integer, PictWidth AS Integer) AS Integer
792
slidernet.Picture = Picture["slider_hover.png"]
793
ifXMovenet = Mouse.ScreenX
794
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
795
IF Xslider < PictX THEN
797
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
798
Xslider = (PictX + PictWidth / 2)
803
PUBLIC SUB slidernet_Enter()
804
slidernet.Picture = Picture["slider_hover.png"]
807
PUBLIC SUB slidernet_Leave()
808
slidernet.Picture = Picture["slider.png"]
811
PUBLIC SUB slidernet_MouseDown()
815
PUBLIC SUB slidernet_MouseMove()
816
slidernet.X = Xmovenet(picnet.X, picnet.Width)
819
PUBLIC SUB slidernet_MouseUp()
820
slidernet.X = Xstopnet(picnet.X)
821
IF (picnet.X - slidernet.X) / (-36) = 1 THEN
822
Main.desktop_set("network-icon-visible", "true")
824
Main.desktop_set("network-icon-visible", "false")
830
PUBLIC SUB Xmovedev(PictX AS Integer, PictWidth AS Integer) AS Integer
831
sliderdev.Picture = Picture["slider_hover.png"]
832
ifXMovedev = Mouse.ScreenX
833
Xslider = XstartSlider + Mouse.ScreenX - XstartMouse
834
IF Xslider < PictX THEN
836
ELSE IF Xslider > (PictX + PictWidth / 2) THEN
837
Xslider = (PictX + PictWidth / 2)
842
PUBLIC SUB sliderdev_Enter()
843
sliderdev.Picture = Picture["slider_hover.png"]
846
PUBLIC SUB sliderdev_Leave()
847
sliderdev.Picture = Picture["slider.png"]
850
PUBLIC SUB sliderdev_MouseDown()
854
PUBLIC SUB sliderdev_MouseMove()
855
sliderdev.X = Xmovedev(picdev.X, picdev.Width)
858
PUBLIC SUB sliderdev_MouseUp()
859
sliderdev.X = Xstopdev(picdev.X)
860
IF (picdev.X - sliderdev.X) / (-36) = 1 THEN
861
Main.desktop_set("volumes-visible", "true")
863
Main.desktop_set("volumes-visible", "false")
867
PUBLIC SUB pichome_MouseDown()
873
PUBLIC SUB Picnet_MouseDown()