gparted/include/Dialog_Partition_Info.h
Mike Fleetwood f91d7e19dd Add encryption section into the Information dialog (#760080)
For LUKS formatted partitions add an encryption section into the
Information dialog and display the type of encryption, path, UUID and
status of the encryption.

The file system section continues to display appropriate file system
details, including the partition graphic with the file system specific
border colour and correct usage.  The details will either be of a plain
file system, an encrypted file system, or nothing when there is no open
dm-crypt mapping, leaving the encrypted file system inaccessible.
Should there be LUKS encryption directly within LUKS encryption then the
details of the inner encryption will be displayed in the file system
section.  However this configuration will not be further supported by
GParted.

Bug 760080 - Implement read-only LUKS support
2016-01-29 13:41:41 -07:00

72 lines
2 KiB
C++

/* Copyright (C) 2004 Bart
*
* 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_DIALOG_PARTITION_INFO_H
#define GPARTED_DIALOG_PARTITION_INFO_H
//what kind of info would one prefer to see here?
//my guess is, it's best to keep the amount of info minimal and wait for users requests
#include "../include/Partition.h"
#include "../include/i18n.h"
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
#include <gtkmm/frame.h>
#include <gtkmm/drawingarea.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/table.h>
#define BORDER 8
namespace GParted
{
class Dialog_Partition_Info : public Gtk::Dialog
{
public:
Dialog_Partition_Info( const Partition & partition );
~Dialog_Partition_Info();
private:
void init_drawingarea() ;
void Display_Info();
//signalhandlers
void drawingarea_on_realize();
bool drawingarea_on_expose( GdkEventExpose *ev );
const Partition & partition; // (Alias to element in Win_GParted::display_partitions[] vector).
const Partition * filesystem; // (Alias to above partition or encrypted file system within).
Gtk::HBox *hbox ;
Gtk::DrawingArea drawingarea ;
Gtk::Frame *frame ;
Gtk::VBox info_msg_vbox ;
Gtk::ScrolledWindow info_scrolled ;
Glib::RefPtr<Gdk::GC> gc;
Glib::RefPtr<Pango::Layout> pango_layout;
Gdk::Color color_partition, color_used, color_unused, color_unallocated, color_text ;
int used, unused, unallocated ;
};
} //GParted
#endif /* GPARTED_DIALOG_PARTITION_INFO_H */