2006-03-31 10:49:27 +00:00
|
|
|
/* 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
|
2014-01-23 10:59:48 +00:00
|
|
|
* GNU General Public License for more details.
|
2006-03-31 10:49:27 +00:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-23 10:59:48 +00:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2006-03-31 10:49:27 +00:00
|
|
|
*/
|
|
|
|
|
2013-05-27 11:20:16 +00:00
|
|
|
|
|
|
|
#ifndef GPARTED_DIALOGMANAGEFLAGS_H
|
|
|
|
#define GPARTED_DIALOGMANAGEFLAGS_H
|
2006-03-31 10:49:27 +00:00
|
|
|
|
|
|
|
#include "../include/Partition.h"
|
|
|
|
|
|
|
|
#include <gtkmm/dialog.h>
|
|
|
|
#include <gtkmm/treeview.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
|
|
|
|
namespace GParted
|
|
|
|
{
|
|
|
|
|
|
|
|
class DialogManageFlags : public Gtk::Dialog
|
|
|
|
{
|
|
|
|
public:
|
2006-04-02 11:18:34 +00:00
|
|
|
DialogManageFlags( const Partition & partition, std::map<Glib::ustring, bool> flag_info ) ;
|
2006-03-31 10:49:27 +00:00
|
|
|
|
|
|
|
sigc::signal< std::map<Glib::ustring, bool>, const Partition & > signal_get_flags ;
|
|
|
|
sigc::signal< bool, const Partition &, const Glib::ustring &, bool > signal_toggle_flag ;
|
|
|
|
|
|
|
|
bool any_change ;
|
|
|
|
|
|
|
|
private:
|
2006-04-02 11:18:34 +00:00
|
|
|
void load_treeview() ;
|
2006-03-31 10:49:27 +00:00
|
|
|
void on_flag_toggled( const Glib::ustring & path ) ;
|
|
|
|
|
|
|
|
|
|
|
|
Gtk::TreeView treeview_flags ;
|
|
|
|
Gtk::TreeRow row ;
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::ListStore> liststore_flags ;
|
|
|
|
|
|
|
|
struct treeview_flags_Columns : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> flag ;
|
|
|
|
Gtk::TreeModelColumn<bool> status ;
|
|
|
|
|
|
|
|
treeview_flags_Columns()
|
|
|
|
{
|
|
|
|
add( flag ) ;
|
|
|
|
add( status ) ;
|
|
|
|
}
|
|
|
|
} ;
|
|
|
|
treeview_flags_Columns treeview_flags_columns ;
|
|
|
|
|
2015-05-24 11:33:34 +00:00
|
|
|
const Partition & partition; // (Alias to element in Win_GParted::display_partitions[] vector).
|
2006-04-02 11:18:34 +00:00
|
|
|
std::map<Glib::ustring, bool> flag_info ;
|
2006-03-31 10:49:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} //GParted
|
|
|
|
|
2013-05-27 11:20:16 +00:00
|
|
|
#endif /* GPARTED_DIALOGMANAGEFLAGS_H */
|