mirror of
https://github.com/Syping/dtranslatebot.git
synced 2026-04-21 14:40:41 +02:00
translator_dialog: hide api key
This commit is contained in:
parent
9971378f3c
commit
39435f1370
1 changed files with 3 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
#include <gtkmm/checkbutton.h>
|
#include <gtkmm/checkbutton.h>
|
||||||
#include <gtkmm/entry.h>
|
#include <gtkmm/entry.h>
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
|
#include <gtkmm/passwordentry.h>
|
||||||
#include "translator_dialog.h"
|
#include "translator_dialog.h"
|
||||||
using namespace bot::gui;
|
using namespace bot::gui;
|
||||||
|
|
||||||
|
|
@ -135,8 +136,9 @@ translator_dialog::translator_dialog(Gtk::Window &parent, const std::string &tra
|
||||||
auto apikey_label = Gtk::make_managed<Gtk::Label>("API Key");
|
auto apikey_label = Gtk::make_managed<Gtk::Label>("API Key");
|
||||||
apikey_box->append(*apikey_label);
|
apikey_box->append(*apikey_label);
|
||||||
|
|
||||||
auto apikey_entry = Gtk::make_managed<Gtk::Entry>();
|
auto apikey_entry = Gtk::make_managed<Gtk::PasswordEntry>();
|
||||||
apikey_entry->set_hexpand(true);
|
apikey_entry->set_hexpand(true);
|
||||||
|
apikey_entry->set_show_peek_icon(true);
|
||||||
auto json_apiKey = m_json.find("apiKey");
|
auto json_apiKey = m_json.find("apiKey");
|
||||||
if (json_apiKey != m_json.end())
|
if (json_apiKey != m_json.end())
|
||||||
apikey_entry->set_text(static_cast<const std::string>(*json_apiKey));
|
apikey_entry->set_text(static_cast<const std::string>(*json_apiKey));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue