[vlc-devel] [PATCH 14/14] Qt: ask user to store the password
Thomas Guillem
thomas at gllm.fr
Wed Jan 6 17:31:27 CET 2016
Just fixed this set of patch in order to don't display the "store
password" checkbox if there is no keystore available. I changed bool
store to bool *store in dialog_login_t. If store is null, password can't
be stored (there is no keystore).
On Wed, Jan 6, 2016, at 17:21, Thomas Guillem wrote:
> ---
> modules/gui/qt4/dialogs/external.cpp | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/modules/gui/qt4/dialogs/external.cpp
> b/modules/gui/qt4/dialogs/external.cpp
> index 6a5d94f..46e207c 100644
> --- a/modules/gui/qt4/dialogs/external.cpp
> +++ b/modules/gui/qt4/dialogs/external.cpp
> @@ -29,6 +29,7 @@
> #include <vlc_dialog.h>
>
> #include <QDialog>
> +#include <QCheckBox>
> #include <QDialogButtonBox>
> #include <QLabel>
> #include <QLineEdit>
> @@ -118,6 +119,11 @@ void DialogHandler::requestLogin (void *value)
> grid->addWidget (new QLabel (qtr("Password")), 2, 0);
> grid->addWidget (passLine, 2, 1);
>
> + QCheckBox *checkbox = new QCheckBox;
> + checkbox->setChecked (getSettings()->value ("store_password").toBool
> ());
> + grid->addWidget (new QLabel (qtr("Store the Password")), 3, 0);
> + grid->addWidget (checkbox, 3, 1);
> +
> panel->setLayout (grid);
> layout->addWidget (panel);
>
> @@ -139,9 +145,14 @@ void DialogHandler::requestLogin (void *value)
> {
> *data->username = strdup (qtu(userLine->text ()));
> *data->password = strdup (qtu(passLine->text ()));
> + data->store = checkbox->isChecked ();
> + getSettings()->setValue ("store_password", data->store);
> }
> else
> + {
> *data->username = *data->password = NULL;
> + data->store = false;
> + }
>
> delete dialog;
> }
> --
> 2.1.4
>
More information about the vlc-devel
mailing list