Handle edit button for the help list. Query with existing help source information and update config if the values are changed.
(self)
| 2167 | self.update_help_changes() |
| 2168 | |
| 2169 | def helplist_item_edit(self): |
| 2170 | """Handle edit button for the help list. |
| 2171 | |
| 2172 | Query with existing help source information and update |
| 2173 | config if the values are changed. |
| 2174 | """ |
| 2175 | item_index = self.helplist.index(ANCHOR) |
| 2176 | help_source = self.user_helplist[item_index] |
| 2177 | new_help_source = HelpSource( |
| 2178 | self, 'Edit Help Source', |
| 2179 | menuitem=help_source[0], |
| 2180 | filepath=help_source[1], |
| 2181 | ).result |
| 2182 | if new_help_source and new_help_source != help_source: |
| 2183 | self.user_helplist[item_index] = new_help_source |
| 2184 | self.helplist.delete(item_index) |
| 2185 | self.helplist.insert(item_index, new_help_source[0]) |
| 2186 | self.update_help_changes() |
| 2187 | self.set_add_delete_state() # Selected will be un-selected |
| 2188 | |
| 2189 | def helplist_item_remove(self): |
| 2190 | """Handle remove button for the help list. |