copies the email or password of the selected row.
(column_index, info_type)
| 139 | pass |
| 140 | |
| 141 | def copy_selected_info(column_index, info_type): |
| 142 | """copies the email or password of the selected row.""" |
| 143 | selected_item = tree.focus() |
| 144 | if not selected_item: |
| 145 | messagebox.showwarning("No Selection", "Please select a row from the table first.", parent=all_passwords_window) |
| 146 | return |
| 147 | |
| 148 | item_values = tree.item(selected_item, 'values') |
| 149 | info_to_copy = item_values[column_index] |
| 150 | pyperclip.copy(info_to_copy) |
| 151 | messagebox.showinfo("Copied!", f"The {info_type.lower()} for '{item_values[0]}' has been copied to your clipboard.", parent=all_passwords_window) |
| 152 | |
| 153 | # a frame for the buttons |
| 154 | button_frame = ttk.Frame(all_passwords_window) |
no test coverage detected