~ubuntu-branches/ubuntu/intrepid/gparted/intrepid

« back to all changes in this revision

Viewing changes to include/HBoxOperations.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-18 09:24:46 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070518092446-qog6ipxs9ah78q0c
Tags: 0.3.3-2ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/control:
    - Maintainer: Ubuntu Core Developers
      <ubuntu-devel-discuss@lists.ubuntu.com> 
    - don't depend on menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2004-2006 Bart 'plors' Hakvoort
 
2
 *
 
3
 *  This program is free software; you can redistribute it and/or modify
 
4
 *  it under the terms of the GNU General Public License as published by
 
5
 *  the Free Software Foundation; either version 2 of the License, or
 
6
 *  (at your option) any later version.
 
7
 *
 
8
 *  This program is distributed in the hope that it will be useful,
 
9
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 *  GNU Library General Public License for more details.
 
12
 *
 
13
 *  You should have received a copy of the GNU General Public License
 
14
 *  along with this program; if not, write to the Free Software
 
15
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
16
 */
 
17
 
 
18
#ifndef HBOX_OPERATIONS
 
19
#define HBOX_OPERATIONS
 
20
 
 
21
#include "../include/Operation.h"
 
22
 
 
23
#include <gtkmm/box.h>
 
24
#include <gtkmm/liststore.h>
 
25
#include <gtkmm/menu.h>
 
26
#include <gtkmm/scrolledwindow.h>
 
27
#include <gtkmm/treeview.h>
 
28
 
 
29
namespace GParted
 
30
{
 
31
 
 
32
class HBoxOperations : public Gtk::HBox
 
33
{
 
34
public:
 
35
        HBoxOperations() ;
 
36
        ~HBoxOperations() ;
 
37
 
 
38
        void load_operations( const std::vector<Operation *> operations ) ;
 
39
        void clear() ;
 
40
 
 
41
        sigc::signal< void > signal_undo ;
 
42
        sigc::signal< void > signal_clear ;
 
43
        sigc::signal< void > signal_apply ;
 
44
        sigc::signal< void > signal_close ;
 
45
 
 
46
private:
 
47
        bool on_signal_button_press_event( GdkEventButton * event ) ;
 
48
        void on_undo() ;
 
49
        void on_clear() ;
 
50
        void on_apply() ;
 
51
        void on_close() ;
 
52
 
 
53
        Gtk::Menu menu_popup ;
 
54
        Gtk::ScrolledWindow scrollwindow ;
 
55
        Gtk::TreeView treeview_operations ;
 
56
        Glib::RefPtr<Gtk::ListStore> liststore_operations ;
 
57
        
 
58
        struct treeview_operations_Columns : public Gtk::TreeModelColumnRecord             
 
59
        {
 
60
                Gtk::TreeModelColumn<Glib::ustring> operation_description;
 
61
                Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > operation_icon;
 
62
                                
 
63
                treeview_operations_Columns() 
 
64
                { 
 
65
                        add( operation_description );
 
66
                        add( operation_icon );
 
67
                } 
 
68
        };
 
69
        treeview_operations_Columns treeview_operations_columns;
 
70
};
 
71
 
 
72
} //GParted
 
73
 
 
74
#endif //HBOX_OPERATIONS