@@ -92,45 +92,28 @@ fn create_fixes_section(builder: &Builder) -> gtk::Box {
9292 rankmirrors_btn. connect_clicked ( move |_| {
9393 // Spawn child process in separate thread.
9494 std:: thread:: spawn ( move || {
95- let _ = utils :: run_cmd_terminal ( String :: from ( "cachyos-rate-mirrors" ) , true ) ;
95+ actions :: rankmirrors ( ) ;
9696 } ) ;
9797 } ) ;
9898 install_gaming_btn. connect_clicked ( move |_| {
9999 // Spawn child process in separate thread.
100100 let dialog_tx_gaming = dialog_tx_gaming. clone ( ) ;
101101 std:: thread:: spawn ( move || {
102- const ALPM_PACKAGE_NAMES : [ & str ; 2 ] =
103- [ "cachyos-gaming-meta" , "cachyos-gaming-applications" ] ;
104- actions:: install_needed_packages (
105- & ALPM_PACKAGE_NAMES ,
106- fl ! ( "gaming-package-installed" ) ,
107- Action :: InstallGaming ,
108- dialog_tx_gaming,
109- ) ;
102+ actions:: install_gaming ( dialog_tx_gaming) ;
110103 } ) ;
111104 } ) ;
112105 install_snapper_btn. connect_clicked ( move |_| {
113106 // Spawn child process in separate thread.
114107 let dialog_tx_snapper = dialog_tx_snapper. clone ( ) ;
115108 std:: thread:: spawn ( move || {
116- actions:: install_needed_packages (
117- & [ "cachyos-snapper-support" ] ,
118- fl ! ( "snapper-package-installed" ) ,
119- Action :: InstallSnapper ,
120- dialog_tx_snapper,
121- ) ;
109+ actions:: install_snapper ( dialog_tx_snapper) ;
122110 } ) ;
123111 } ) ;
124112 install_spoof_dpi_btn. connect_clicked ( move |_| {
125113 // Spawn child process in separate thread.
126114 let dialog_tx_spoof = dialog_tx_spoof. clone ( ) ;
127115 std:: thread:: spawn ( move || {
128- actions:: install_needed_packages (
129- & [ "spoofdpi" ] ,
130- fl ! ( "spoof-dpi-package-installed" ) ,
131- Action :: InstallSnapper ,
132- dialog_tx_spoof,
133- ) ;
116+ actions:: install_spoofdpi ( dialog_tx_spoof) ;
134117 } ) ;
135118 } ) ;
136119
0 commit comments