@@ -234,9 +234,9 @@ def __init__(self, parent):
234
234
self .selection_dirty = False
235
235
self .editing = None # the QTableWidgetItem being edited
236
236
self .clipboard = ["" ]
237
- self .add_tag_action = QtGui .QAction (_ ("Add New Tag…" ), parent )
237
+ self .add_tag_action = QtGui .QAction (_ ("Add New Tag…" ), self )
238
238
self .add_tag_action .triggered .connect (partial (self .edit_tag , "" ))
239
- self .changes_first_action = QtGui .QAction (_ ("Show Changes First" ), parent )
239
+ self .changes_first_action = QtGui .QAction (_ ("Show Changes First" ), self )
240
240
self .changes_first_action .setCheckable (True )
241
241
self .changes_first_action .setChecked (config .persist ['show_changes_first' ])
242
242
self .changes_first_action .toggled .connect (self .toggle_changes_first )
@@ -366,18 +366,18 @@ def contextMenuEvent(self, event):
366
366
if single_tag :
367
367
selected_tag = tags [0 ]
368
368
editable = self .tag_is_editable (selected_tag )
369
- edit_tag_action = QtGui .QAction (_ ("Edit…" ), self . parent )
369
+ edit_tag_action = QtGui .QAction (_ ("Edit…" ), self )
370
370
edit_tag_action .triggered .connect (partial (self .edit_tag , selected_tag ))
371
371
edit_tag_action .setShortcut (self .edit_tag_shortcut .key ())
372
372
edit_tag_action .setEnabled (editable )
373
373
menu .addAction (edit_tag_action )
374
374
if selected_tag not in self .preserved_tags :
375
- add_to_preserved_tags_action = QtGui .QAction (_ ("Add to 'Preserve Tags' List" ), self . parent )
375
+ add_to_preserved_tags_action = QtGui .QAction (_ ("Add to 'Preserve Tags' List" ), self )
376
376
add_to_preserved_tags_action .triggered .connect (partial (self .preserved_tags .add , selected_tag ))
377
377
add_to_preserved_tags_action .setEnabled (editable )
378
378
menu .addAction (add_to_preserved_tags_action )
379
379
else :
380
- remove_from_preserved_tags_action = QtGui .QAction (_ ("Remove from 'Preserve Tags' List" ), self . parent )
380
+ remove_from_preserved_tags_action = QtGui .QAction (_ ("Remove from 'Preserve Tags' List" ), self )
381
381
remove_from_preserved_tags_action .triggered .connect (partial (self .preserved_tags .discard , selected_tag ))
382
382
remove_from_preserved_tags_action .setEnabled (editable )
383
383
menu .addAction (remove_from_preserved_tags_action )
@@ -393,7 +393,7 @@ def contextMenuEvent(self, event):
393
393
values = self .tag_diff .orig [tag ]
394
394
else :
395
395
values = self .tag_diff .new [tag ]
396
- lookup_action = QtGui .QAction (_ ("Lookup in &Browser" ), self . parent )
396
+ lookup_action = QtGui .QAction (_ ("Lookup in &Browser" ), self )
397
397
lookup_action .triggered .connect (partial (self .open_link , values , tag ))
398
398
menu .addAction (lookup_action )
399
399
if self .tag_is_removable (tag ):
@@ -419,14 +419,14 @@ def contextMenuEvent(self, event):
419
419
objects = [album ]
420
420
orig_values = list (album .orig_metadata .getall (tag )) or ["" ]
421
421
useorigs .append (partial (self .set_tag_values , tag , orig_values , objects ))
422
- remove_tag_action = QtGui .QAction (_ ("Remove" ), self . parent )
422
+ remove_tag_action = QtGui .QAction (_ ("Remove" ), self )
423
423
remove_tag_action .triggered .connect (partial (self ._apply_update_funcs , removals ))
424
424
remove_tag_action .setShortcut (self .remove_tag_shortcut .key ())
425
425
remove_tag_action .setEnabled (bool (removals ))
426
426
menu .addAction (remove_tag_action )
427
427
if useorigs :
428
428
name = ngettext ("Use Original Value" , "Use Original Values" , len (useorigs ))
429
- use_orig_value_action = QtGui .QAction (name , self . parent )
429
+ use_orig_value_action = QtGui .QAction (name , self )
430
430
use_orig_value_action .triggered .connect (partial (self ._apply_update_funcs , useorigs ))
431
431
menu .addAction (use_orig_value_action )
432
432
menu .addSeparator ()
0 commit comments