@@ -157,6 +157,8 @@ class GraphView(NavigationView):
157
157
('interface.graphview-avatars-style' , 1 ),
158
158
('interface.graphview-avatars-male' , '' ), # custom avatar
159
159
('interface.graphview-avatars-female' , '' ), # custom avatar
160
+ ('interface.graphview-avatars-unknown' , '' ), # custom avatar
161
+ ('interface.graphview-avatars-other' , '' ), # custom avatar
160
162
('interface.graphview-show-full-dates' , False ),
161
163
('interface.graphview-show-places' , False ),
162
164
('interface.graphview-place-format' , 0 ),
@@ -469,6 +471,22 @@ def cb_female_avatar_set(self, file_chooser_button):
469
471
file_chooser_button .get_filename ())
470
472
self .graph_widget .populate (self .get_active ())
471
473
474
+ def cb_unknown_avatar_set (self , file_chooser_button ):
475
+ """
476
+ Called when the configuration menu changes the unknown sex avatar.
477
+ """
478
+ self ._config .set ('interface.graphview-avatars-unknown' ,
479
+ file_chooser_button .get_filename ())
480
+ self .graph_widget .populate (self .get_active ())
481
+
482
+ def cb_other_avatar_set (self , file_chooser_button ):
483
+ """
484
+ Called when the configuration menu changes the other sex avatar.
485
+ """
486
+ self ._config .set ('interface.graphview-avatars-other' ,
487
+ file_chooser_button .get_filename ())
488
+ self .graph_widget .populate (self .get_active ())
489
+
472
490
def cb_update_show_full_dates (self , _client , _cnxn_id , entry , _data ):
473
491
"""
474
492
Called when the configuration menu changes the date setting.
@@ -836,6 +854,32 @@ def theme_config_panel(self, configdialog):
836
854
grid .attach (FCB_female , 2 , row , 1 , 1 )
837
855
self .avatar_widgets .append (lbl )
838
856
self .avatar_widgets .append (FCB_female )
857
+
858
+ row += 1
859
+ lbl = Gtk .Label (label = _ ('Unknown avatar:' ), halign = Gtk .Align .END )
860
+ FCB_unknown = Gtk .FileChooserButton .new (_ ('Choose Unknown avatar' ),
861
+ Gtk .FileChooserAction .OPEN )
862
+ FCB_unknown .add_filter (file_filter )
863
+ FCB_unknown .set_filename (
864
+ self ._config .get ('interface.graphview-avatars-unknown' ))
865
+ FCB_unknown .connect ('file-set' , self .cb_unknown_avatar_set )
866
+ grid .attach (lbl , 1 , row , 1 , 1 )
867
+ grid .attach (FCB_unknown , 2 , row , 1 , 1 )
868
+ self .avatar_widgets .append (lbl )
869
+ self .avatar_widgets .append (FCB_unknown )
870
+
871
+ row += 1
872
+ lbl = Gtk .Label (label = _ ('Other avatar:' ), halign = Gtk .Align .END )
873
+ FCB_other = Gtk .FileChooserButton .new (_ ('Choose Other avatar' ),
874
+ Gtk .FileChooserAction .OPEN )
875
+ FCB_other .add_filter (file_filter )
876
+ FCB_other .set_filename (
877
+ self ._config .get ('interface.graphview-avatars-other' ))
878
+ FCB_other .connect ('file-set' , self .cb_other_avatar_set )
879
+ grid .attach (lbl , 1 , row , 1 , 1 )
880
+ grid .attach (FCB_other , 2 , row , 1 , 1 )
881
+ self .avatar_widgets .append (lbl )
882
+ self .avatar_widgets .append (FCB_other )
839
883
# ===================================================================
840
884
841
885
row += 1
0 commit comments