@@ -1113,26 +1113,20 @@ def __init__(self, parent=None):
1113
1113
})
1114
1114
self .logger .debug ("Startup: [5/5] OK" )
1115
1115
self .initialize_pornfetch ()
1116
- if conf ["Setup" ]["activate_logging" ] == "not_set" :
1117
- self .switch_to_logging ()
1118
- self .ui .button_server_enable_logging .setStyleSheet (self .stylesheets ["button_green" ])
1119
- self .ui .button_server_disable_logging .setStyleSheet (self .stylesheets ["button_reset" ])
1120
- self .ui .button_server_enable_logging .clicked .connect (self .enable_logging )
1121
- self .ui .button_server_disable_logging .clicked .connect (self .disable_logging )
1122
1116
1123
1117
def disable_logging (self ):
1124
1118
conf ["Setup" ]["activate_logging" ] = "false"
1125
1119
with open ("config.ini" , "w" ) as configuration :
1126
1120
conf .write (configuration )
1127
1121
1128
- self .switch_to_download ()
1122
+ self .initialize_pornfetch ()
1129
1123
1130
1124
def enable_logging (self ):
1131
1125
conf ["Setup" ]["activate_logging" ] = "true"
1132
1126
with open ("config.ini" , "w" ) as configuration :
1133
1127
conf .write (configuration )
1134
1128
1135
- self .switch_to_download ()
1129
+ self .initialize_pornfetch ()
1136
1130
1137
1131
"""
1138
1132
The following functions just switch the Stacked Widget to the different widgets
@@ -1202,7 +1196,7 @@ def switch_to_disclaimer(self):
1202
1196
self .ui .CentralStackedWidget .setCurrentIndex (10 )
1203
1197
1204
1198
def switch_to_logging (self ):
1205
- self .ui .CentralStackedWidget .setCurrentIndex (7 )
1199
+ self .ui .CentralStackedWidget .setCurrentIndex (11 )
1206
1200
1207
1201
def load_style (self ):
1208
1202
icons = {
@@ -1471,7 +1465,7 @@ def button_connections(self):
1471
1465
# Settings
1472
1466
self .ui .settings_button_apply .clicked .connect (self .save_user_settings )
1473
1467
self .ui .settings_button_reset .clicked .connect (reset_pornfetch )
1474
- self .ui .settings_button_system_install_pornfetch .clicked .connect (self .install_pornfetch )
1468
+ self .ui .settings_button_system_install_pornfetch .clicked .connect (self .switch_to_install_dialog )
1475
1469
self .ui .settings_checkbox_system_activate_proxy .clicked .connect (self .set_proxies )
1476
1470
self .ui .button_install .clicked .connect (self .install_pornfetch )
1477
1471
self .ui .button_portable .clicked .connect (self .install_porn_fetch_portable )
@@ -1807,6 +1801,7 @@ def initialize_pornfetch(self):
1807
1801
if the License was shown and accepted, if the disclaimer text was shown, if the user downloaded the amount
1808
1802
of videos to show the sponsoring dialog and after all that switch to the main widget.
1809
1803
"""
1804
+ global FORCE_PORTABLE_RUN
1810
1805
if not self .license .check_license ():
1811
1806
self .switch_to_license ()
1812
1807
return
@@ -1819,15 +1814,26 @@ def initialize_pornfetch(self):
1819
1814
self .switch_to_donation_nag ()
1820
1815
return
1821
1816
1822
- self .ui .CentralStackedWidget .setCurrentIndex (0 )
1823
- global FORCE_PORTABLE_RUN
1817
+ if conf ["Setup" ]["activate_logging" ] == "not_set" :
1818
+ self .handle_network_logging ()
1819
+ return
1820
+
1824
1821
if not FORCE_PORTABLE_RUN :
1825
1822
if sys .platform == "darwin" :
1826
1823
return
1827
1824
1828
1825
if conf ["Setup" ]["install" ] == "unknown" :
1829
1826
self .switch_to_install_dialog ()
1827
+ return
1828
+
1829
+ self .ui .CentralStackedWidget .setCurrentIndex (0 )
1830
1830
1831
+ def handle_network_logging (self ):
1832
+ self .switch_to_logging ()
1833
+ self .ui .button_server_enable_logging .setStyleSheet (self .stylesheets ["button_green" ])
1834
+ self .ui .button_server_disable_logging .setStyleSheet (self .stylesheets ["button_reset" ])
1835
+ self .ui .button_server_enable_logging .clicked .connect (self .enable_logging )
1836
+ self .ui .button_server_disable_logging .clicked .connect (self .disable_logging )
1831
1837
1832
1838
def start_single_video (self ):
1833
1839
"""
0 commit comments