obfuscate token in input dialog

This commit is contained in:
ouwou 2022-03-04 23:04:07 -05:00
parent af60bceada
commit 46b88566f1

View File

@ -1,6 +1,6 @@
#include "token.hpp"
std::string trim(const std::string& str) {
std::string trim(const std::string &str) {
const auto first = str.find_first_not_of(' ');
if (first == std::string::npos) return str;
const auto last = str.find_last_not_of(' ');
@ -30,6 +30,8 @@ TokenDialog::TokenDialog(Gtk::Window &parent)
m_bbox.pack_start(m_cancel, Gtk::PACK_SHRINK);
m_bbox.set_layout(Gtk::BUTTONBOX_END);
m_entry.set_input_purpose(Gtk::INPUT_PURPOSE_PASSWORD);
m_entry.set_visibility(false);
m_entry.set_hexpand(true);
m_layout.add(m_entry);
m_layout.add(m_bbox);