-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.pas
executable file
·4964 lines (4458 loc) · 164 KB
/
main.pas
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit main;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
interface
uses
mseglob,mseguiglob,mseguiintf,mseapplication,msemenus,msegui,msegraphics,
msegraphutils,mseevent,mseclasses,mseforms,msesimplewidgets,msewidgets,
msesplitter,msestatfile,msestream,msestrings,msetabs,sysutils,msedataedits,
mseedit,msegrids,msetypes,msewidgetgrid,mseeditglob,msetextedit,msegraphedits,
msefileutils,mseterminal,mseimage,msetimer, msekeyboard,msebitmap,
msefiledialog,msedock, {libc,}mseifiglob, unix,msescrollbar,msestat,
msedatanodes,mseificomp,mseificompglob,mselistbrowser,msesys,msecolordialog;
CONST Version = '4.14.19 beta';
type
tmainfo = class(tmainform)
s_menu: tspacer;
b_home: trichbutton;
b_packages: trichbutton;
trichbutton6: trichbutton;
trichbutton20: trichbutton;
tw_main: ttabwidget;
tp_main: ttabpage;
s_main: tspacer;
b_news: trichbutton;
trichbutton37: trichbutton;
trichbutton39: trichbutton;
l_appname: tlabel;
b_errors: trichbutton;
l_newver: tlabel;
tp_packages: ttabpage;
ttabpage2: ttabpage;
ttabpage3: ttabpage;
tw_logs: ttabwidget;
tp_pacmanlog: ttabpage;
wg_log_dates: twidgetgrid;
ttabpage24: ttabpage;
wg_seslog: twidgetgrid;
te_seslog: ttextedit;
ttabpage32: ttabpage;
s_pacmanlog: tspacer;
l_logload: tlabel;
b_clearlog: trichbutton;
tspacer1: tspacer;
s_findlog: tspacer;
se_filterlog: tedit;
b_clearsearchboxlog: trichbutton;
wg_log: twidgetgrid;
te_log: ttextedit;
ttabpage1: ttabpage;
tp_news: ttabpage;
ttabpage6: ttabpage;
s_bottom_about: tspacer;
tlabel7: tlabel;
tw_about: ttabwidget;
tp_about: ttabpage;
ttabpage22: ttabpage;
tmemoedit3: tmemoedit;
ttabpage30: ttabpage;
l_tip: tlabel;
l_tip3: tlabel;
tlabel12: tlabel;
tlabel6: tlabel;
tlabel17: tlabel;
tlabel8: tlabel;
tp_thanks: ttabpage;
sb_thanks: tscrollbox;
l_thanks: tlabel;
tspacer9: tspacer;
l_translators: tlabel;
ttabpage19: ttabpage;
s_help_project: tspacer;
tlabel1: tlabel;
tstringedit5: tstringedit;
tstringedit7: tstringedit;
tlabel13: tlabel;
tstringedit3: tstringedit;
tstringedit2: tstringedit;
tstringedit1: tstringedit;
tlabel4: tlabel;
tlabel2: tlabel;
s_top_about: tspacer;
trichbutton21: trichbutton;
tspacer7: tspacer;
trichbutton9: trichbutton;
tspacer6: tspacer;
trichbutton8: trichbutton;
tspacer5: tspacer;
trichbutton3: trichbutton;
s_right: tspacer;
s_left: tspacer;
spl2: tsplitter;
tlabel5: tlabel;
s_top: tspacer;
b_execute: trichbutton;
b_del: trichbutton;
b_collapce: trichbutton;
b_update: trichbutton;
b_cancel: trichbutton;
trichbutton31: trichbutton;
se_filter2: tdropdownlistedit;
b_clearsearchbox: trichbutton;
se_filter: tedit;
s_packages: tspacer;
tw1: ttabwidget;
ttabpage21: ttabpage;
lgf: tlabel;
ttabpage7: ttabpage;
sg_query: tstringgrid;
tw_info: ttabwidget;
ttabpage16: ttabpage;
l_pkgname: tlabel;
l_pkgname_capt: tlabel;
l_pkginfo_capt: tlabel;
tspacer21: tspacer;
tspacer22: tspacer;
l_repo: tlabel;
tspacer20: tspacer;
tlabel9: tlabel;
ttabpage17: ttabpage;
sg_info: tstringgrid;
ttabpage8: ttabpage;
wg: twidgetgrid;
term_files: tterminal;
ttabpage14: ttabpage;
wg_check: twidgetgrid;
term_check: tterminal;
l_request: tlabel;
trichbutton15: trichbutton;
spl1: tsplitter;
tlabel10: tlabel;
sb_utils: tscrollbox;
b_updatesystem: trichbutton;
trichbutton19: trichbutton;
b_sinh: trichbutton;
trichbutton22: trichbutton;
b_save_packagelist: trichbutton;
b_cleancache: trichbutton;
b_restore_from_file: trichbutton;
b_findfastmirrors: trichbutton;
trichbutton28: trichbutton;
b_cleancachef: trichbutton;
b_remove_orfans: trichbutton;
b_dizz: trichbutton;
b_install_file: trichbutton;
b_expl: trichbutton;
b_dep: trichbutton;
s_utils: tspacer;
d_texteditor: trichbutton;
d_finav: trichbutton;
d_term: trichbutton;
b_update_editor: trichbutton;
dd_texteditor: tdropdownlistedit;
b_update_finav: trichbutton;
dd_finav: tdropdownlistedit;
b_update_term: trichbutton;
dd_term: tdropdownlistedit;
b_cache_management: trichbutton;
s_findfile: tspacer;
l_find_package_for_file: tlabel;
b_findpackage_with_pacman: trichbutton;
b_update_pkfile: trichbutton;
tw_sets: ttabwidget;
tp_sets_interface: ttabpage;
tscrollbox6: tscrollbox;
tspacer23: tspacer;
b_set_font: trichstockglyphbutton;
dd_fonts: tdropdownlistedit;
ie_heightfont: tintegeredit;
dd_langs: tdropdownlistedit;
tspacer19: tspacer;
tspacer30: tspacer;
b_sinhmirrors: tbooleanedit;
tspacer39: tspacer;
ber_notify: tbooleanedit;
ber_kdialog: tbooleanedit;
be_notifyme: tbooleanedit;
tp_utils: ttabpage;
ttabpage26: ttabpage;
tw_pacman_conf: twidgetgrid;
te_pacman_conf: ttextedit;
ttabpage27: ttabpage;
tw_mirrorlist: twidgetgrid;
te_mirrorlist: ttextedit;
ttabpage28: ttabpage;
tw_yaourtrc: twidgetgrid;
te_yaourtrc: ttextedit;
s_save1: tspacer;
trichbutton13: trichbutton;
tspacer16: tspacer;
trichbutton16: trichbutton;
s_save2: tspacer;
trichbutton18: trichbutton;
tspacer17: tspacer;
trichbutton17: trichbutton;
s_save3: tspacer;
trichbutton25: trichbutton;
tspacer18: tspacer;
trichbutton24: trichbutton;
tp_cache: ttabpage;
wg_cache: twidgetgrid;
ber_cache: tbooleanedit;
se_file: tstringedit;
se_status: tstringedit;
s_topmenu: tspacer;
tspacer10: tspacer;
b_install_from_cache: trichbutton;
trichbutton41: trichbutton;
trichbutton42: trichbutton;
trichbutton45: trichbutton;
e_cache: tedit;
timer: ttimer;
pm: tpopupmenu;
tab_downgrade: ttabpage;
bmenu1: trichbutton;
bmenu2: trichbutton;
bmenu3: trichbutton;
tspacer28: tspacer;
tspacer29: tspacer;
s_top_logs: tspacer;
trichbutton4: trichbutton;
tspacer32: tspacer;
trichbutton10: trichbutton;
trichbutton5: trichbutton;
trichbutton2: trichbutton;
trichbutton7: trichbutton;
trichbutton14: trichbutton;
b_mylist: trichbutton;
s_top_sets: tspacer;
trichbutton30: trichbutton;
tspacer31: tspacer;
trichbutton35: trichbutton;
tspacer34: tspacer;
trichbutton43: trichbutton;
tspacer35: tspacer;
trichbutton44: trichbutton;
ttabpage29: ttabpage;
trichbutton47: trichbutton;
tspacer37: tspacer;
trichbutton48: trichbutton;
l_thumb: tlabel;
im_thumb: timage;
b_filterpanelpos: tbooleaneditradio;
b_filterpanelpos1: tbooleaneditradio;
sb_hotkeys: tscrollbox;
l_hotkey_desc: tlabel;
tspacer24: tspacer;
tlabel3: tlabel;
be_noscreenshot: tbooleanedit;
f_topbuttons: tfacecomp;
fr_topbuttons: tframecomp;
f_topbuttons_click: tfacecomp;
f_buttons: tfacecomp;
fr_text_with_border: tframecomp;
f_buttons_click: tfacecomp;
fr_panels: tframecomp;
b_find: trichbutton;
b_find2: trichbutton;
s_1: tspacer;
trichbutton46: trichbutton;
tspacer27: tspacer;
b_find_in_cache: trichbutton;
b_findpackage_with_pkgfile: trichbutton;
tw_right: ttabwidget;
ttabpage11: ttabpage;
ber_aur: tbooleaneditradio;
tspacer14: tspacer;
l_expl: tlabel;
ber_expls: tbooleaneditradio;
l_deps: tlabel;
tspacer25: tspacer;
ber_deps: tbooleaneditradio;
tspacer26: tspacer;
l_orfans: tlabel;
ber_orfans: tbooleaneditradio;
tspacer13: tspacer;
l_haveupdate: tlabel;
ber_haveupdate: tbooleaneditradio;
dd_cat_ins1: tbooleaneditradio;
dd_ir1: tbooleaneditradio;
dd_ig1: tbooleaneditradio;
l_ins: tlabel;
tspacer4: tspacer;
ber_ins: tbooleaneditradio;
dd_cat_all1: tbooleaneditradio;
dd_ar1: tbooleaneditradio;
dd_ag1: tbooleaneditradio;
l_all: tlabel;
tspacer8: tspacer;
ber_all: tbooleaneditradio;
l_query_del: tlabel;
tspacer43: tspacer;
be_query_del: tbooleaneditradio;
be_query_ins: tbooleaneditradio;
tspacer38: tspacer;
l_query_ins: tlabel;
l_query_all: tlabel;
tspacer15: tspacer;
be_query_all: tbooleaneditradio;
ber_exact: tbooleanedit;
dd_cat_ins: tdropdownlistedit;
dd_ir: tdropdownlistedit;
dd_ig: tdropdownlistedit;
dd_cat_all: tdropdownlistedit;
dd_ar: tdropdownlistedit;
dd_ag: tdropdownlistedit;
tspacer2: tspacer;
ttabpage12: ttabpage;
wg_mylist: twidgetgrid;
ber_: tbooleanedit;
se_package: tstringedit;
tspacer11: tspacer;
se_mylist_fname: tstringedit;
s_oper: tspacer;
s_oper_form: tspacer;
s_exec_top: tspacer;
l_oper_title: tlabel;
tbooleanedit1: tbooleanedit;
tspacer12: tspacer;
b_install_from_list: trichbutton;
trichbutton26: trichbutton;
trichbutton12: trichbutton;
b_save: trichbutton;
b_open_list: trichbutton;
tspacer36: tspacer;
tbooleanedit2: tbooleanedit;
tscrollbox1: tscrollbox;
l_pkginfo: tlabel;
b_about1: trichbutton;
trichbutton32: trichbutton;
trichbutton38: trichbutton;
b_repacman: trichbutton;
s_repacman: tstringedit;
spacer_cache: tspacer;
l_cache_info: tlabel;
trichbutton34: trichbutton;
trichbutton36: trichbutton;
e_dgrd_searchbox: tedit;
b_dowgrade_pkg: trichbutton;
tw_drgd: twidgetgrid;
se_dgd_pkg: tstringedit;
se_dgd_pkg2: tstringedit;
l_dgrd_info: tlabel;
b_downgrade: trichbutton;
b_remove_orfans2: trichbutton;
tspacer40: tspacer;
trichbutton49: trichbutton;
tspacer41: tspacer;
wg_newssite: twidgetgrid;
timagelist1: timagelist;
tw_oper: ttabwidget;
tab_empty: ttabpage;
tp_ins_ask: ttabpage;
trichbutton53: trichbutton;
tscrollbox2: tscrollbox;
l_pins: tlabel;
sb_ins_ask: tscrollbox;
s_ins_opt: tspacer;
be_downloadonly: tbooleanedit;
be_asexpl: tbooleanedit;
be_asdeps: tbooleanedit;
be_force: tbooleanedit;
s_trans_ask: tspacer;
be_scriptlet: tbooleanedit;
be_nodeps: tbooleanedit;
be_nodeps2: tbooleanedit;
tp_del_ask: ttabpage;
tscrollbox4: tscrollbox;
l_pdel: tlabel;
trichbutton52: trichbutton;
sb_del_ask: tscrollbox;
s_del_opt: tspacer;
be_nosave: tbooleanedit;
be_cascade: tbooleanedit;
be_recursive: tbooleanedit;
be_checkhome: tbooleanedit;
tp_task: ttabpage;
pb: tprogressbar;
tw_task: twidgetgrid;
term_task: tterminal;
l_operation: tlabel;
s_task: tspacer;
trichbutton51: trichbutton;
trichbutton58: trichbutton;
b_continue_del: trichbutton;
b_continue_ins: trichbutton;
trichbutton61: trichbutton;
b_delete_dblock: trichbutton;
trichbutton54: trichbutton;
trichbutton55: trichbutton;
trichbutton63: trichbutton;
l_lastcommand: tlabel;
l_aur: tlabel;
trichbutton59: trichbutton;
ber_left_menu: tbooleanedit;
tspacer45: tspacer;
l_cache_files_info: tlabel;
se_filesize: tstringedit;
tspacer46: tspacer;
tspacer47: tspacer;
b_install_file2: trichbutton;
tab_dizz: ttabpage;
wg_dizz: twidgetgrid;
be_dizz: tbooleanedit;
se_file_dizz: tstringedit;
se_path_dizz: tstringedit;
se_result_dizz: tstringedit;
tspacer48: tspacer;
trichbutton27: trichbutton;
trichbutton40: trichbutton;
tlabel14: tlabel;
tspacer50: tspacer;
tbooleanedit4: tbooleanedit;
tspacer51: tspacer;
l_count_dizz: tlabel;
term_dizz: tterminal;
tspacer52: tspacer;
tspacer53: tspacer;
ttabpage4: ttabpage;
wg_tree: twidgetgrid;
term_tree: tterminal;
im_status: timagelist;
twf: twidgetgrid;
di_oper: tdataicon;
se_oper: tstringedit;
se_name: tstringedit;
se_ins: tstringedit;
se_aval: tstringedit;
se_group: tstringedit;
se_repo: tstringedit;
se_desc: tstringedit;
se_num: tstringedit;
se_cat: tstringedit;
di_status: tdataicon;
im_oper: timagelist;
se_collapce: tstringedit;
se_name2: tstringedit;
b_ins: trichbutton;
dd_themes: tdropdownlistedit;
fr_mainbuttons: tframecomp;
fr_buttons: tframecomp;
tspacer49: tspacer;
tspacer54: tspacer;
tspacer55: tspacer;
tspacer56: tspacer;
tspacer57: tspacer;
pm_filelist: tpopupmenu;
be_dbonly: tbooleanedit;
tspacer33: tspacer;
wg_news_all: twidgetgrid;
te_news_all: ttextedit;
wg_news_titles: twidgetgrid;
te_news_titles: ttextedit;
tspacer44: tspacer;
l_news_title: tlabel;
tsplitter2: tsplitter;
tlabel11: tlabel;
tsplitter3: tsplitter;
tlabel15: tlabel;
b_menu: trichbutton;
s_taskA: tspacer;
trichbutton11: trichbutton;
trichbutton23: trichbutton;
b_abort: trichbutton;
b_clear_session: trichbutton;
be_repeat: tbooleanedit;
be_unneeded: tbooleanedit;
tspacer58: tspacer;
tspacer59: tspacer;
b_show_pkg: trichbutton;
b_check_errors: trichbutton;
tsplitter4: tsplitter;
tlabel16: tlabel;
te_newssite: ttextedit;
term_thumb: tterminal;
term_thumb2: tterminal;
te_log_dates: ttextedit;
be_oldtablestyle: tbooleanedit;
tscrollbox3: tscrollbox;
l_inf: tlabel;
term_edit: tterminal;
tw_history: twidgetgrid;
te_history: ttextedit;
b_repeat: tdatabutton;
tlabel18: tlabel;
tspacer3: tspacer;
wg_error: twidgetgrid;
se_check: tstringedit;
di_error: tdataicon;
se_answer: tstringedit;
tspacer42: tspacer;
trichbutton29: trichbutton;
trichbutton33: trichbutton;
b_run: trichbutton;
tspacer60: tspacer;
timer_run: ttimer;
timagelist2: timagelist;
f_scrolls: tfacecomp;
b_execparam: trichbutton;
ber_pos: tbooleanedit;
ber_reset_options: tbooleanedit;
ttimer1: ttimer;
tspacer61: tspacer;
be_noconfirm: tbooleanedit;
be_usecachedir: tbooleanedit;
be_debug: tbooleanedit;
pb2: tprogressbar;
be_needed: tbooleanedit;
ber_recursive22: tbooleanedit;
l_mess: tlabel;
dd_cachedir: tdirdropdownedit;
tdockhandle1: tdockhandle;
timer_resize: ttimer;
s_external: tspacer;
tspacer63: tspacer;
ber_external: tbooleanedit;
ber_external2: tbooleanedit;
ttabpage5: ttabpage;
trichbutton50: trichbutton;
trichbutton56: trichbutton;
fd: tfiledialog;
tlabel20: tlabel;
tlabel21: tlabel;
tlabel22: tlabel;
tlabel23: tlabel;
l_file: tlabel;
b_export_from_cache: trichbutton;
tspacer62: tspacer;
pb_copying: tprogressbar;
tspacer64: tspacer;
tp_copy_from_cache: ttabpage;
dd_copyto: tdirdropdownedit;
trichbutton57: trichbutton;
tspacer65: tspacer;
trichbutton60: trichbutton;
be_overwrite: tbooleanedit;
tlabel19: tlabel;
tlabel24: tlabel;
ttabpage9: ttabpage;
tw_df: twidgetgrid;
term_df: tterminal;
be_colorize: tbooleanedit;
ce_colorize: tcoloredit;
tspacer66: tspacer;
procedure on_formcreate(const sender: TObject);
procedure on_resizeform(const sender: TObject);
procedure on_loadedform(const sender: TObject);
procedure on_showmenu(const sender: TObject);
procedure on_navigate_menu(const sender: TObject);
procedure on_updateutils(const sender: TObject);
procedure on_close(const sender: TObject);
procedure loadlog(const sender: TObject);
procedure on_cell_event_log(const sender: TObject; var info: celleventinfoty);
procedure on_find_in_log(const sender: TObject);
procedure on_clear_findbox_log(const sender: TObject);
procedure on_clear_log(const sender: TObject);
procedure on_checkerrors(const sender: TObject);
procedure on_navigate_about(const sender: TObject);
procedure on_movedown_info(const sender: TObject);
procedure on_show_findfile(const sender: TObject);
procedure on_exectask(const sender: TObject);
procedure onupdatelayout_spl(const sender: TObject);
procedure on_show_screenshot(const sender: twidget;
var ainfo: mouseeventinfoty);
procedure on_update_cachelist(const sender: TObject);
procedure on_update_pkglist(const sender: TObject);
procedure on_change_filter(const sender: TObject);
procedure filter_query(const oper : string);
procedure on_change_repo_group(const sender: TObject);
procedure on_clear_searchbox(const sender: TObject);
procedure on_set_search_text(const sender: TObject; var avalue: msestring;
var accept: Boolean);
procedure on_search_keyup(const sender: twidget; var ainfo: keyeventinfoty);
procedure on_navigate_log(const sender: TObject);
procedure on_navigate_sets(const sender: TObject);
procedure clearinfo;
procedure on_cell_event_get_package_info(const sender: TObject;var info: celleventinfoty);
procedure autoselect(r : integer);
procedure on_info_changepage(const sender: TObject);
procedure on_add_remove_clear(const sender: TObject);
procedure on_clearquery(const sender: TObject);
procedure countquery;
procedure on_set_font(const sender: TObject);
procedure on_changefilterpanelposition(const sender: TObject);
procedure on_show_left_menu(const sender: TObject; var avalue: Boolean; var accept: Boolean);
procedure loadfile(fname : string ; const tw : twidgetgrid; const te : ttextedit);
procedure on_load_pacmanconf(const sender: TObject);
procedure on_load_mirrorlist(const sender: TObject);
procedure on_load_yaourtrc(const sender: TObject);
procedure savefile(fname : string ; const tw : twidgetgrid; const te : ttextedit);
procedure on_save_pacmanconf(const sender: TObject);
procedure on_save_mirrorlist(const sender: TObject);
procedure on_save_yaourtrc(const sender: TObject);
procedure on_run_util(const sender: TObject);
procedure on_close_stop_oper(const sender: TObject);
procedure on_add_to_mylist(const sender: TObject);
procedure on_select_mylist(const sender: TObject; var avalue: Boolean;var accept: Boolean);
procedure on_delete_in_my_list(const sender: TObject);
procedure on_open_my_list(const sender: TObject);
procedure open;
procedure on_save_my_list(const sender: TObject);
procedure save;
procedure on_select_cache(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_delete_files_from_cache(const sender: TObject);
procedure on_logs_keyup(const sender: twidget; var ainfo: keyeventinfoty);
procedure on_cache_keyup(const sender: twidget; var ainfo: keyeventinfoty);
procedure on_clear_dgrd_searchbox(const sender: TObject);
procedure on_drgd_search(const sender: TObject);
procedure on_cell_event_news(const sender: TObject; var info: celleventinfoty);
procedure load_news_titles;
procedure on_get_manjaronews(const sender: TObject);
procedure on_get_news_archlinux(const sender: TObject);
procedure on_get_news_archlinux_ru(const sender: TObject);
procedure on_get_news_cinnarch(const sender : tobject);
procedure on_get_news_pacmanxg(const sender: TObject);
procedure on_get_news_chakra(const sender: TObject);
procedure on_get_news_parabola(const sender: TObject);
procedure on_get_news_ConnochaetOS(const sender: TObject);
procedure on_cell_event_news_title_click(const sender: TObject;
var info: celleventinfoty);
procedure on_oper_tw_activepage_change(const sender: TObject);
procedure on_collase_oper(const sender: TObject);
procedure on_start_operation(const sender: TObject);
procedure on_task_receive_text(const sender: TObject; var atext: AnsiString;
const errorinput: Boolean);
procedure on_setd(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_setdd(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_set_asdeps(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_set_asexpl(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_send_yes(const sender: TObject);
procedure on_send_no(const sender: TObject);
procedure on_task_finish(const sender: TObject);
procedure on_timer(const sender: TObject);
procedure on_add_to_query_pm(const sender: TObject);
procedure on_remove_from_query_pm(const sender: TObject);
procedure on_cancel_pm(const sender: TObject);
procedure on_execute_pm(const sender: TObject);
procedure on_upgrade_pm(const sender: TObject);
procedure on_synhmirrors_pm(const sender: TObject);
procedure on_mark_expl(const sender: TObject);
procedure on_mark_deps_pm(const sender: TObject);
procedure on_add_package_to_ignore_list(const sender: TObject);
procedure on_repacman_pm(const sender: TObject);
procedure on_downgrade_pm(const sender: TObject);
procedure on_dngrd_keyup(const sender: twidget; var ainfo: keyeventinfoty);
procedure on_restore_from_file(const sender: TObject);
procedure on_save_packagelist(const sender: TObject);
procedure on_install_file(const sender: TObject);
procedure on_select_dizz(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_search_dizz(const sender: TObject);
procedure on_dizz_finish(const sender: TObject);
procedure on_errase_dizz_files(const sender: TObject);
procedure on_go_to_select_xterminal(const sender: TObject);
procedure on_terminate_form(var terminate: Boolean);
procedure savesettings;
procedure loadsettings;
procedure on_set_old_table_style(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_collapce_all(const sender: TObject);
procedure on_set_lang(const sender: TObject);
procedure on_open_in_texteditor(const sender: TObject);
procedure on_open_in_filemanager(const sender: TObject);
procedure on_progfinish(const sender: TObject);
procedure on_send_abourt(const sender: TObject);
procedure on_deletedblock(const sender: TObject);
procedure on_delete_historyrow(const sender: TObject);
procedure on_execute_form_history(const sender: TObject);
procedure on_createdform(const sender: TObject);
procedure on_finish_download_thumb(const sender: TObject);
procedure on_finish_download_screenshot(const sender: TObject);
procedure on_clear_session_log(const sender: TObject);
procedure on_search_package_from_tree(const sender: TObject);
procedure on_cell_event_show_package_from_tree(const sender: TObject;
var info: celleventinfoty);
procedure on_hotkey(const sender: twidget; var ainfo: keyeventinfoty);
procedure on_timer_run(const sender: TObject);
procedure on_add_to_searchlist(const sender: TObject);
procedure getpacmanversion;
function check_util_cmdline(cmd : string) : string;
procedure on_cell_key_down_log(const sender: twidget;
var ainfo: keyeventinfoty);
procedure show_empty(const capt, mess : string);
procedure on_resizeform_via_dockhandle(const sender: TObject);
procedure on_childmouseevents(const sender: twidget; var ainfo: mouseeventinfoty);
procedure on_setvalue_extterm2(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure on_set_extterm1(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
function whoami : string;
procedure on_copy_from_cache(const sender: TObject);
procedure on_start_copy(const sender: TObject);
procedure on_set_color_of_outofdate_packages(const sender: TObject;
var avalue: colorty; var accept: Boolean);
procedure on_change_color_of_outofdate_packages(const sender: TObject);
end;
var
mainfo : tmainfo;
__needloadlog : boolean = true;
__firstshowpkglist : boolean = true;
__programpath : string;
__langspath : string;
__themepath : string;
__pacmanlogfile : string;
__cachedir : string;
__pacmanconf : string;
__mirrorlist : string;
__yaourtrc : string;
__imagesdir : string;
__settingsdir : string;
__pacmanxgnewsurl : string;
__runnum : shortint = 0;
__downgradepath : string;
__del : boolean;
__colorpacmanoutput : boolean;
pkgname : string;
m_add : string = 'add';
m_del : string = 'del';
__runinstall : boolean = false;
__YES : boolean;
__ERROR : boolean;
__updatepkglist : boolean;
__infotabsize : integer;
__exitafterexec : boolean;
__total : integer;
__current:integer;
__YES__, __NO__, __A__ : MSESTRING;
implementation
uses main_mfm, messages, pacmanlog, screenshotform, engine, classes, msesysintf,
mseformatpngread, msepointer, mseprocutils, inifiles,msedrawtext,
typinfo, mseact, paramsform, process, easyrss;
var arr_log, arr_log_dates : tlogarray;
arr, arr_yaourt : tarraytype;
//[0 - action 1 - name, 2- ins ver, 3 - aval ver, 4 - group, 5 - repo,
//6 - desc, 7 -size, 8 - expls or deps, 9 - orfans, 10 - have update,
//11 - number, 12 - category]
SL_orfans : Tstringlist;
SL_expls : Tstringlist;
slg : tstringlist;
slr : tstringlist;
slr_ins : tstringlist;
slg_ins : tstringlist;
slcat : tstringlist;
slcat_ins : tstringlist;
rss : trss;
rowheight : integer;
rowheightEx : integer;
RSSR : TRSSReader;
moveXX, moveYY : integer;
rowcountforcopy : integer;
noconfirm : boolean;
///////////////////////////////////////////////////////////////
// FORM
///////////////////////////////////////////////////////////////
procedure tmainfo.on_formcreate(const sender: TObject);
var i : integer;
fs : tsearchrec;
fi : tinifile;
sl : tstringlist;
s : string;
begin
__yes__ := 'y';
__no__ := 'n';
__a__ := 'a';
application.createform(tscreenshotfo,screenshotfo);
application.createform(tparamsfo,paramsfo);
l_appname.frame.caption := Version;
caption := 'PacmanXG ' + Version;
screenshotfo.caption := 'PacmanXG ' + Version + '(screenshot)';
paramsfo.caption := 'PacmanXG ' + Version + '(check home directory)';
__programpath := '/opt/pacmanxg/';
__langspath := __programpath + 'langs/';
__themepath := __programpath;
__pacmanlogfile := '/var/log/pacman.log';
__cachedir := '/var/cache/pacman/pkg/';
__pacmanconf := '/etc/pacman.conf';
__mirrorlist := '/etc/pacman.d/mirrorlist';
__yaourtrc := '/etc/yaourtrc';
__imagesdir := sys_getuserhomedir + '/.Almin-Soft/PacmanXG/images/';
__settingsdir:= sys_getuserhomedir + '/.Almin-Soft/PacmanXG/';
__pacmanxgnewsurl := 'wget --output-file=wget.log http://almin-soft.fsay.net/data/files/pacmanxg/history.txt';
__downgradepath := sys_getuserhomedir + '/.Almin-Soft/PacmanXG/tmp/';
tw_main.width := tw_main.width + 54;
tw_about.width := tw_about.width + 54;
tw_logs.width := tw_logs.width + 54;
tw_sets.width := tw_sets.width + 54;
tw1.height := tw1.height + tw1.tab_size + 10;
tw1.activepageindex := 0;
s_main.left := s_main.left + 32;
tscrollbox3.left := tscrollbox3.left + 32;
sb_utils.left := sb_utils.left + 32;
s_help_project.width := s_help_project.width + 32;
s_1.height := tw_right.height - tw_right.tab_size;
tw_oper.height := tw_oper.height + tw_oper.tab_size + 1;
twf.datacols[12].width := 0;
twf.datacols[12].linewidth := 0;
b_run.width := 0;
s_external.bringtofront;
s_external.left := 0;
screenshotfo.top := 50;
screenshotfo.left := 0;
rowheight := twf.datarowheight;
rowheightEx := 160;
__runnum := 0;
__exitafterexec := false;
on_showmenu(sender); b_menu.width := 0;
on_navigate_menu(b_home);
loadsettings;
//langs
if findfirst(__langspath + '*.lang',faanyfile,fs) = 0 then
repeat
dd_langs.dropdown.cols.addrow(msestring(fs.name));
until findnext(fs) <> 0;
findclose(fs);
//themes
if findfirst(__themepath + 'themes',faanyfile,fs) = 0 then
begin
fi := tinifile.create(__themepath + 'themes');
sl := tstringlist.create;
fi.readsections(sl);
if sl.count > 0 then
for i := 0 to sl.count - 1 do
dd_themes.dropdown.cols.addrow(msestring(sl[i]));
sl.free;
fi.free;
end;
findclose(fs);
end;
//try get version
procedure tmainfo.getpacmanversion;
var s : string;
i : integer;
begin
__colorpacmanoutput := false;
s := trim(exec('pacman -V | grep ''Pacman v'' | cut -d'' '' -f21', true));
if system.pos('v',s) <> 1
then begin
writeln('Can`t get pacman version');
showmessage('Can`t get pacman version! :-(' +
'REMEMBER: As of version 4.1.0, pacman now has a color option' +
'If you have problems with getting package list' +
'Switch off "Color" option in /etc/pacman.conf');
end
else begin
writeln('pacman version=',s);
delete(s,1,1);
while system.pos('.',s) > 0 do delete(s,system.pos('.',s),1);
i := strtoint(trim(s));
if i >= 410 then __colorpacmanoutput := true;
end;
end;
procedure tmainfo.on_createdform(const sender: TObject);
var r : rectty;
begin
on_set_font(b_set_font); //its correct!!!
on_resizeform(sender);
on_load_pacmanconf(sender);
on_load_mirrorlist(sender);
on_load_yaourtrc(sender);
s_topmenu.width := s_topmenu.width + 1; //bug fix , do not errase
end;
procedure tmainfo.on_loadedform(const sender: TObject);
var b : boolean;
i : integer;
//fs : tsearchrec;
//fi : tinifile;
//sl : tstringlist;
__param : string;
begin
s_main.top := tp_main.height div 2 - s_main.height div 2;
s_main.left := tp_main.width div 2 - s_main.width div 2;
//on_set_lang(sender);
//application.processmessages;
if se_mylist_fname.VAlue > '' then
if fileexists(se_mylist_fname.value) then open;
on_updateutils(b_update_term);
on_updateutils(b_update_finav);
on_updateutils(b_update_editor);
//interface
if ber_left_menu.value
then begin
b := true;
on_show_left_menu(ber_left_menu, b, b);
end;
b_filterpanelpos.onchange := @on_changefilterpanelposition; //it`s works!
if b_filterpanelpos.value then on_changefilterpanelposition(sender);
b := be_oldtablestyle.value;
on_set_old_table_style(be_oldtablestyle,b,b);
SL_orfans := Tstringlist.create;
SL_expls:= Tstringlist.create;
se_filter2.dropdown.cols.clear;
se_filter2.dropdown.cols.addrow(msestring('driver'));
se_filter2.dropdown.cols.addrow(msestring('font'));
se_filter2.dropdown.cols.addrow(msestring('game'));
se_filter2.dropdown.cols.addrow(msestring('game (AUR)'));
se_filter2.dropdown.cols.addrow(msestring('pacmanxg (AUR)'));
se_filter2.dropdown.cols.addrow(msestring('pacmanexpress (AUR)'));
se_filter2.dropdown.cols.addrow(msestring('systemdx (AUR)'));
//fonts ...
dd_fonts.dropdown.cols.addrow(msestring('default'));
dd_fonts.dropdown.cols.addrow(msestring('courier'));
dd_fonts.dropdown.cols.addrow(msestring('helvetica'));
dd_fonts.dropdown.cols.addrow(msestring('roman'));
dd_fonts.dropdown.cols.addrow(msestring('sans'));
dd_fonts.dropdown.cols.addrow(msestring('arial'));
dd_fonts.dropdown.cols.addrow(msestring('empty'));
dd_fonts.dropdown.cols.addrow(msestring('fixed'));
dd_fonts.dropdown.cols.addrow(msestring('menu'));
dd_fonts.dropdown.cols.addrow(msestring('proportional'));
dd_fonts.dropdown.cols.addrow(msestring('report'));
dd_fonts.dropdown.cols.addrow(msestring('unicode'));
if (dd_fonts.dropdown.cols.rowcount > 0)and(dd_fonts.value = '') then dd_fonts.dropdown.itemindex := 0;
//news
wg_newssite.rowcount := 7;
te_newssite[0] := 'Arch Linux news';
te_newssite[1] := 'Arch Linux news(ru)';
te_newssite[2] := 'PacmanXG news';
te_newssite[3] := 'Antergos news';
te_newssite[4] := 'Manjaro news';
te_newssite[5] := 'Chakra news';
te_newssite[6] := 'Parabola GNU/Linux-libre';
//te_newssite[7] := 'ConnochaetOS';
//rss := trss.create;
RSSR := TRSSReader.create;
if paramcount > 0 then
begin
__param :='';
if paramstr(1) = '--exec' then
for i := 2 to paramcount do
__param := __param + ' ' + paramstr(i);
b_execparam.hint := __param;
b_execparam.caption := __param;
__exitafterexec := true;
width := s_oper_form.width;
height := 510;
on_exectask(b_execparam);
end;
//on_collase_oper(sender);
//application.processmessages;
//on_collase_oper(sender);
end;
procedure tmainfo.on_resizeform(const sender: TObject);
begin
s_main.top := tp_main.height div 2 - s_main.height div 2;
s_main.left := tp_main.width div 2 - s_main.width div 2;
s_oper_form.top := tp_main.height div 2 - s_oper_form.height div 2;