2006-09-17 07:23:47 -06:00
|
|
|
/* Copyright (C) 2004-2006 Bart 'plors' Hakvoort
|
|
|
|
*
|
|
|
|
* 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 03:59:48 -07:00
|
|
|
* GNU General Public License for more details.
|
2006-09-17 07:23:47 -06:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-23 03:59:48 -07:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2006-09-17 07:23:47 -06:00
|
|
|
*/
|
2013-05-27 05:20:16 -06:00
|
|
|
|
|
|
|
#ifndef GPARTED_HBOXOPERATIONS_H
|
|
|
|
#define GPARTED_HBOXOPERATIONS_H
|
2006-09-17 07:23:47 -06:00
|
|
|
|
2016-10-18 16:45:28 -06:00
|
|
|
#include "Operation.h"
|
2006-09-17 07:23:47 -06:00
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/menu.h>
|
|
|
|
#include <gtkmm/scrolledwindow.h>
|
|
|
|
#include <gtkmm/treeview.h>
|
|
|
|
|
|
|
|
namespace GParted
|
|
|
|
{
|
|
|
|
|
|
|
|
class HBoxOperations : public Gtk::HBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HBoxOperations() ;
|
|
|
|
~HBoxOperations() ;
|
|
|
|
|
|
|
|
void load_operations( const std::vector<Operation *> operations ) ;
|
|
|
|
void clear() ;
|
|
|
|
|
|
|
|
sigc::signal< void > signal_undo ;
|
|
|
|
sigc::signal< void > signal_clear ;
|
|
|
|
sigc::signal< void > signal_apply ;
|
|
|
|
sigc::signal< void > signal_close ;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool on_signal_button_press_event( GdkEventButton * event ) ;
|
|
|
|
void on_undo() ;
|
|
|
|
void on_clear() ;
|
|
|
|
void on_apply() ;
|
|
|
|
void on_close() ;
|
|
|
|
|
|
|
|
Gtk::Menu menu_popup ;
|
|
|
|
Gtk::ScrolledWindow scrollwindow ;
|
|
|
|
Gtk::TreeView treeview_operations ;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> liststore_operations ;
|
2018-08-02 01:24:41 -06:00
|
|
|
std::map<int, Gtk::MenuItem*> menu_popup_items;
|
|
|
|
|
2006-09-17 07:23:47 -06:00
|
|
|
struct treeview_operations_Columns : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> operation_description;
|
|
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > operation_icon;
|
|
|
|
|
|
|
|
treeview_operations_Columns()
|
|
|
|
{
|
|
|
|
add( operation_description );
|
|
|
|
add( operation_icon );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
treeview_operations_Columns treeview_operations_columns;
|
|
|
|
};
|
|
|
|
|
|
|
|
} //GParted
|
|
|
|
|
2013-05-27 05:20:16 -06:00
|
|
|
#endif /* GPARTED_HBOXOPERATIONS_H */
|