1
0
mirror of https://gitlab.gnome.org/GNOME/gparted synced 2024-07-07 19:39:25 +00:00
gparted/include/DialogPasswordEntry.h
Mike Fleetwood 5752682c12 Report this LUKS passphrase request reason as resize (#59)
So far when prompting for the LUKS passphrase the dialog always looks
like this:

    +------------------------------------------------+
    |           LUKS Passphrase /dev/sdb1            |
    +------------------------------------------------+
    | Enter LUKS passphrase to open /dev/sdb1        |
    | Passphrase:    [                             ] |
    |                                                |
    |                                                |
    |                          [ Cancel ] [ Unlock ] |
    +------------------------------------------------+

Specifically the first line of the dialog says the reason to provide the
passphrase is to open the encryption mapping.  Now the passphrase may
also be requested when resizing the encryption mapping, as part of a
resize of check operation, show the appropriate reason in the password
dialog.

Closes #59 - Resize of LUKS2 encrypted file system fails with "Nothing
             to read on input"
2021-04-25 15:49:35 +00:00

48 lines
1.3 KiB
C++

/* Copyright (C) 2017 Mike Fleetwood
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GPARTED_DIALOGPASSWORDENTRY_H
#define GPARTED_DIALOGPASSWORDENTRY_H
#include "Partition.h"
#include <gtkmm/dialog.h>
#include <glibmm/ustring.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
namespace GParted
{
class DialogPasswordEntry : public Gtk::Dialog
{
public:
DialogPasswordEntry(const Partition& partition, const Glib::ustring& reason);
~DialogPasswordEntry();
const char * get_password();
void set_error_message( const Glib::ustring & message );
private:
void on_button_unlock();
Gtk::Entry *entry;
Gtk::Label *error_message;
};
} //GParted
#endif /* GPARTEDPASSWORDENTRY_H */