20
20
21
21
22
22
class Settings (Adw .PreferencesWindow ):
23
- def __init__ (self ,app , controller : NewelleController ,headless = False , startup_page = None , * args , ** kwargs ):
23
+ def __init__ (self ,app , controller : NewelleController ,headless = False , startup_page = None , popup = False , * args , ** kwargs ):
24
24
super ().__init__ (* args , ** kwargs )
25
25
self .app = app
26
26
self .controller = controller
27
27
self .settings = controller .settings
28
28
self .headless = headless
29
+ self .popup = popup
29
30
if not headless :
30
31
self .set_transient_for (app .win )
31
32
self .set_modal (True )
@@ -583,7 +584,7 @@ def choose_row(self, button, constants : dict, secondary=False):
583
584
else :
584
585
return
585
586
self .settings .set_string (setting_name , button .get_name ())
586
- if constants == AVAILABLE_LLMS and self .headless :
587
+ if constants == AVAILABLE_LLMS and self .popup :
587
588
self .app .win .update_available_models ()
588
589
if constants == AVAILABLE_RAGS or constants == AVAILABLE_EMBEDDINGS :
589
590
self .app .win .update_settings ()
@@ -1064,4 +1065,4 @@ def delete_pip_path(self):
1064
1065
dialog .set_close_response ("close" )
1065
1066
dialog .set_response_appearance ("close" , Adw .ResponseAppearance .DESTRUCTIVE )
1066
1067
dialog .connect ('response' , lambda dialog , response_id : dialog .destroy ())
1067
- dialog .present ()
1068
+ dialog .present ()
0 commit comments