@@ -53,10 +53,10 @@ class ItemView : public Gtk::Grid {
5353 }
5454
5555 void processSingleField (const KeychainField& field) {
56- processSingleField (field.name , field.value , field.password );
56+ processSingleField (field.name , field.value , field.password , true );
5757 }
5858
59- void processSingleField (std::string label, std::string value, bool conceal) {
59+ void processSingleField (std::string label, std::string value, bool conceal, bool copy_button ) {
6060 auto my_index = row_index++;
6161
6262 auto label_widget = Gtk::manage (new Gtk::Label (label));
@@ -81,9 +81,9 @@ class ItemView : public Gtk::Grid {
8181
8282 if (conceal && !isTOTP)
8383 value_widget->set_visibility (false );
84- attach (*value_widget, 1 , my_index, conceal ? 1 : 3 , 1 );
84+ attach (*value_widget, 1 , my_index, conceal || copy_button ? 1 : 3 , 1 );
8585
86- if (conceal ) {
86+ if (copy_button ) {
8787 auto copy_button = Gtk::manage (new Gtk::Button (" _Copy" , true ));
8888 copy_button->signal_clicked ().connect ([value_widget]() {
8989 auto valueText = value_widget->get_text ();
@@ -92,6 +92,9 @@ class ItemView : public Gtk::Grid {
9292 clipboard->store ();
9393 });
9494 attach (*copy_button, 2 , my_index, 1 , 1 );
95+ }
96+
97+ if (conceal) {
9598 if (isTOTP) {
9699 auto calculate_button = Gtk::manage (new Gtk::Button (" _Calculate" , true ));
97100 calculate_button->signal_clicked ().connect ([value, value_widget]() {
0 commit comments