@@ -600,16 +600,17 @@ def show_pull_menu(self):
600600 window .model_tag_flow_box .append (category_pill ('language:' + _ ('Others...' ), True ))
601601
602602 for tag_data in tags :
603- if f" { self . get_name () } : { tag_data [ 0 ] } " not in window . model_manager . get_model_list ():
604- tag_row = Adw . ActionRow (
605- title = tag_data [0 ],
606- subtitle = tag_data [1 ] ,
607- name = f"{ self .get_name ()} :{ tag_data [0 ]} "
608- )
609- download_icon = Gtk .Image .new_from_icon_name ("folder-download-symbolic" )
610- tag_row .add_suffix (download_icon )
611- download_icon .update_property ([4 ], [_ ("Download {}:{}" ).format (self .get_name (), tag_data [0 ])])
603+ tag_row = Adw . ActionRow (
604+ title = tag_data [ 0 ],
605+ subtitle = tag_data [1 ],
606+ name = f" { self . get_name () } : { tag_data [0 ] } " ,
607+ sensitive = f"{ self .get_name ()} :{ tag_data [0 ]} " not in window . model_manager . get_model_list ()
608+ )
609+ download_icon = Gtk .Image .new_from_icon_name ("folder-download-symbolic" if f" { self . get_name () } : { tag_data [ 0 ] } " not in window . model_manager . get_model_list () else "check-plain -symbolic" )
610+ tag_row .add_suffix (download_icon )
611+ download_icon .update_property ([4 ], [_ ("Download {}:{}" ).format (self .get_name (), tag_data [0 ])])
612612
613+ if f"{ self .get_name ()} :{ tag_data [0 ]} " not in window .model_manager .get_model_list ():
613614 gesture_click = Gtk .GestureClick .new ()
614615 gesture_click .connect ("pressed" , lambda * _ , name = f"{ self .get_name ()} :{ tag_data [0 ]} " : self .pull_model (name ))
615616
@@ -619,7 +620,7 @@ def show_pull_menu(self):
619620 tag_row .add_controller (gesture_click )
620621 tag_row .add_controller (event_controller_key )
621622
622- window .model_tag_list_box .append (tag_row )
623+ window .model_tag_list_box .append (tag_row )
623624
624625class available_model_list (Gtk .ListBox ):
625626 __gtype_name__ = 'AlpacaAvailableModelList'
0 commit comments