#include <PasswordImportDialog.hpp>
Public Types | |
| using | BulkItem = std::pair<PasswordEntry, std::string> |
Public Member Functions | |
| PasswordImportDialog (Gtk::Window &parent) | |
| ~PasswordImportDialog () | |
| void | present () |
| void | hide () |
| sigc::signal< void(std::vector< BulkItem >)> | signal_import_confirmed () |
Private Member Functions | |
| void | buildUi () |
| void | styleImportButton () |
| void | onChooseFile () |
| void | loadFile (const std::string &path) |
| void | populatePreview () |
| void | onImportClicked () |
| void | onProgressTick () |
| void | onImportDone () |
Private Attributes | |
| Gtk::Window & | parent_ |
| Gtk::Dialog * | dialog_ = nullptr |
| Gtk::Box | mainBox_ |
| Gtk::Label | hintLabel_ |
| Gtk::Button | chooseFileBtn_ |
| Gtk::Label | fileLabel_ |
| Gtk::Label | formatLabel_ |
| Gtk::Label | countLabel_ |
| Gtk::ListBox | previewList_ |
| Gtk::ScrolledWindow | previewScrolled_ |
| Gtk::Box | progressBox_ |
| Gtk::ProgressBar | progressBar_ |
| Gtk::Label | progressLabel_ |
| Gtk::Button | importBtn_ |
| std::vector< ImportedCredential > | parsed_ |
| std::vector< BulkItem > | pendingItems_ |
| sigc::signal< void(std::vector< BulkItem >)> | signalImportConfirmed_ |
| std::thread | importThread_ |
| std::atomic< bool > | importing_ { false } |
| std::atomic< int > | progressDone_ { 0 } |
| std::atomic< int > | progressTotal_ { 0 } |
| Glib::Dispatcher | dispProgress_ |
| Glib::Dispatcher | dispDone_ |
Definition at line 31 of file PasswordImportDialog.hpp.
| using PasswordImportDialog::BulkItem = std::pair<PasswordEntry, std::string> |
Definition at line 39 of file PasswordImportDialog.hpp.
|
explicit |
Definition at line 28 of file PasswordImportDialog.cpp.
References _, buildUi(), chooseFileBtn_, dialog_, dispDone_, dispProgress_, hintLabel_, importBtn_, mainBox_, onImportDone(), onProgressTick(), parent_, and progressBox_.
Referenced by PasswordManagerPage::onImportClicked().
| PasswordImportDialog::~PasswordImportDialog | ( | ) |
Definition at line 45 of file PasswordImportDialog.cpp.
References dialog_, and importThread_.
|
private |
Definition at line 53 of file PasswordImportDialog.cpp.
References _, chooseFileBtn_, countLabel_, dialog_, fileLabel_, formatLabel_, hintLabel_, importBtn_, importing_, mainBox_, onChooseFile(), onImportClicked(), previewList_, previewScrolled_, progressBar_, progressBox_, progressLabel_, and styleImportButton().
Referenced by PasswordImportDialog().
| void PasswordImportDialog::hide | ( | ) |
|
private |
Definition at line 168 of file PasswordImportDialog.cpp.
References _, Chrome, countLabel_, PasswordImporter::detectFormat(), Edge, fileLabel_, Firefox, formatLabel_, importBtn_, PasswordImporter::importFromFile(), parsed_, populatePreview(), previewList_, and Safari.
Referenced by onChooseFile().
|
private |
Definition at line 136 of file PasswordImportDialog.cpp.
References _, dialog_, and loadFile().
Referenced by buildUi().
|
private |
Definition at line 278 of file PasswordImportDialog.cpp.
References _, chooseFileBtn_, dialog_, dispDone_, dispProgress_, importBtn_, importing_, importThread_, parsed_, pendingItems_, progressBar_, progressBox_, progressDone_, progressLabel_, progressTotal_, and PasswordImporter::toPasswordEntry().
Referenced by buildUi().
|
private |
Definition at line 322 of file PasswordImportDialog.cpp.
References _, importing_, importThread_, pendingItems_, progressBar_, progressLabel_, and signalImportConfirmed_.
Referenced by PasswordImportDialog().
|
private |
Definition at line 311 of file PasswordImportDialog.cpp.
References _, progressBar_, progressDone_, progressLabel_, and progressTotal_.
Referenced by PasswordImportDialog().
|
private |
Definition at line 213 of file PasswordImportDialog.cpp.
References _, PasswordImporter::domainFromUrl(), parsed_, and previewList_.
Referenced by loadFile().
| void PasswordImportDialog::present | ( | ) |
Definition at line 50 of file PasswordImportDialog.cpp.
References dialog_.
| sigc::signal< void(std::vector< PasswordImportDialog::BulkItem >)> PasswordImportDialog::signal_import_confirmed | ( | ) |
Definition at line 332 of file PasswordImportDialog.cpp.
References signalImportConfirmed_.
|
private |
Definition at line 121 of file PasswordImportDialog.cpp.
References importBtn_.
Referenced by buildUi().
|
private |
Definition at line 48 of file PasswordImportDialog.hpp.
Referenced by buildUi(), onImportClicked(), and PasswordImportDialog().
|
private |
Definition at line 51 of file PasswordImportDialog.hpp.
Referenced by buildUi(), and loadFile().
|
private |
Definition at line 44 of file PasswordImportDialog.hpp.
Referenced by buildUi(), hide(), onChooseFile(), onImportClicked(), PasswordImportDialog(), present(), and ~PasswordImportDialog().
|
private |
Definition at line 69 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), and PasswordImportDialog().
|
private |
Definition at line 68 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), and PasswordImportDialog().
|
private |
Definition at line 49 of file PasswordImportDialog.hpp.
Referenced by buildUi(), and loadFile().
|
private |
Definition at line 50 of file PasswordImportDialog.hpp.
Referenced by buildUi(), and loadFile().
|
private |
Definition at line 47 of file PasswordImportDialog.hpp.
Referenced by buildUi(), and PasswordImportDialog().
|
private |
Definition at line 57 of file PasswordImportDialog.hpp.
Referenced by buildUi(), loadFile(), onImportClicked(), PasswordImportDialog(), and styleImportButton().
|
private |
Definition at line 65 of file PasswordImportDialog.hpp.
Referenced by buildUi(), onImportClicked(), and onImportDone().
|
private |
Definition at line 64 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), onImportDone(), and ~PasswordImportDialog().
|
private |
Definition at line 46 of file PasswordImportDialog.hpp.
Referenced by buildUi(), and PasswordImportDialog().
|
private |
Definition at line 43 of file PasswordImportDialog.hpp.
Referenced by PasswordImportDialog().
|
private |
Definition at line 59 of file PasswordImportDialog.hpp.
Referenced by loadFile(), onImportClicked(), and populatePreview().
|
private |
Definition at line 60 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), and onImportDone().
|
private |
Definition at line 52 of file PasswordImportDialog.hpp.
Referenced by buildUi(), loadFile(), and populatePreview().
|
private |
Definition at line 53 of file PasswordImportDialog.hpp.
Referenced by buildUi().
|
private |
Definition at line 55 of file PasswordImportDialog.hpp.
Referenced by buildUi(), onImportClicked(), onImportDone(), and onProgressTick().
|
private |
Definition at line 54 of file PasswordImportDialog.hpp.
Referenced by buildUi(), onImportClicked(), and PasswordImportDialog().
|
private |
Definition at line 66 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), and onProgressTick().
|
private |
Definition at line 56 of file PasswordImportDialog.hpp.
Referenced by buildUi(), onImportClicked(), onImportDone(), and onProgressTick().
|
private |
Definition at line 67 of file PasswordImportDialog.hpp.
Referenced by onImportClicked(), and onProgressTick().
|
private |
Definition at line 62 of file PasswordImportDialog.hpp.
Referenced by onImportDone(), and signal_import_confirmed().