@@ -288,7 +288,7 @@ def __create_plugin_item(self, plugin_config):
288288
289289 def __show_plugins_properties_dialog (self , plugin_config ):
290290 """Show the PluginProperties dialog."""
291- dialog = PluginSettingsDialog (self .application , plugin_config )
291+ dialog = PluginSettingsDialog (self .window , plugin_config )
292292 dialog .show ()
293293
294294 def __disable_errored_plugin (self , button , plugin_config ):
@@ -301,7 +301,7 @@ def __show_break_properties_dialog(
301301 ):
302302 """Show the BreakProperties dialog."""
303303 dialog = BreakSettingsDialog (
304- self .application ,
304+ self .window ,
305305 break_config ,
306306 is_short ,
307307 parent ,
@@ -355,7 +355,7 @@ def on_info_bar_long_break_close(self, infobar, *user_data):
355355 def add_break (self , button ) -> None :
356356 """Event handler for add break button."""
357357 dialog = NewBreakDialog (
358- self .application ,
358+ self .window ,
359359 self .config ,
360360 lambda is_short , break_config : self .__create_break_item (
361361 break_config , is_short
@@ -406,13 +406,13 @@ def on_window_delete(self, *args):
406406class PluginSettingsDialog :
407407 """Builds a settings dialog based on the configuration of a plugin."""
408408
409- def __init__ (self , application , config ):
409+ def __init__ (self , parent , config ):
410410 self .config = config
411411 self .property_controls = []
412412
413413 builder = utility .create_gtk_builder (SETTINGS_DIALOG_PLUGIN_GLADE )
414414 self .window = builder .get_object ("dialog_settings_plugin" )
415- self .window .set_application ( application )
415+ self .window .set_transient_for ( parent )
416416 box_settings = builder .get_object ("box_settings" )
417417 self .window .set_title (_ ("Plugin Settings" ))
418418 for setting in config .get ("settings" ):
@@ -493,7 +493,7 @@ class BreakSettingsDialog:
493493
494494 def __init__ (
495495 self ,
496- application ,
496+ parent ,
497497 break_config ,
498498 is_short ,
499499 parent_config ,
@@ -512,7 +512,7 @@ def __init__(
512512
513513 builder = utility .create_gtk_builder (SETTINGS_DIALOG_BREAK_GLADE )
514514 self .window = builder .get_object ("dialog_settings_break" )
515- self .window .set_application ( application )
515+ self .window .set_transient_for ( parent )
516516 self .txt_break = builder .get_object ("txt_break" )
517517 self .switch_override_interval = builder .get_object ("switch_override_interval" )
518518 self .switch_override_duration = builder .get_object ("switch_override_duration" )
@@ -692,13 +692,13 @@ def show(self):
692692class NewBreakDialog :
693693 """Builds a new break dialog."""
694694
695- def __init__ (self , application , parent_config , on_add ):
695+ def __init__ (self , parent , parent_config , on_add ):
696696 self .parent_config = parent_config
697697 self .on_add = on_add
698698
699699 builder = utility .create_gtk_builder (SETTINGS_DIALOG_NEW_BREAK_GLADE )
700700 self .window = builder .get_object ("dialog_new_break" )
701- self .window .set_application ( application )
701+ self .window .set_transient_for ( parent )
702702 self .txt_break = builder .get_object ("txt_break" )
703703 self .cmb_type = builder .get_object ("cmb_type" )
704704 list_types = builder .get_object ("lst_break_types" )
0 commit comments