mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 11:40:03 +00:00
![Mike Fleetwood](/assets/img/avatar_default.png)
It made the code look a little messy, is easily resolved in the build system and made the dependencies more complicated than needed. Each GParted header was tracked via multiple different names (different numbers of "../include/" prefixes). For example just looking at how DialogFeatures.o depends on Utils.h: $ cd src $ make DialogFeatures.o $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po ../include/DialogFeatures.h ../include/../include/Utils.h \ ../include/../include/../include/../include/../include/../include/Utils.h \ ../include/../include/../include/Utils.h \ After removing "../include/" from the GParted header #includes, just need to add "-I../include" to the compile command via the AM_CPPFLAGS in src/Makefile.am. Now the dependencies on GParted header files are tracked under a single name (with a single "../include/" prefix). Now DialogFeatures.o only depends on a single name to Utils.h: $ make DialogFeatures.o $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po ../include/DialogFeatures.h ../include/Utils.h ../include/i18n.h \
90 lines
2.6 KiB
C++
90 lines
2.6 KiB
C++
/* Copyright (C) 2004-2006 Bart 'plors' Hakvoort
|
|
* Copyright (C) 2008 Curtis Gedak
|
|
*
|
|
* 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_DIALOGFEATURES_H
|
|
#define GPARTED_DIALOGFEATURES_H
|
|
|
|
#include "Utils.h"
|
|
|
|
#include <gtkmm/dialog.h>
|
|
#include <gtkmm/frame.h>
|
|
#include <gtkmm/treeview.h>
|
|
#include <gtkmm/liststore.h>
|
|
#include <gtkmm/scrolledwindow.h>
|
|
#include <gtkmm/image.h>
|
|
|
|
namespace GParted
|
|
{
|
|
|
|
class DialogFeatures : public Gtk::Dialog
|
|
{
|
|
public:
|
|
DialogFeatures() ;
|
|
~DialogFeatures() ;
|
|
|
|
void load_filesystems( const std::vector<FS> & FILESYSTEMS ) ;
|
|
|
|
private:
|
|
void show_filesystem( const FS & fs ) ;
|
|
|
|
Gtk::Frame legend_frame ;
|
|
Gtk::TreeView treeview_filesystems;
|
|
Gtk::TreeRow treerow;
|
|
Gtk::ScrolledWindow filesystems_scrolled ;
|
|
Glib::RefPtr<Gtk::ListStore> liststore_filesystems;
|
|
|
|
struct treeview_filesystems_Columns : public Gtk::TreeModelColumnRecord
|
|
{
|
|
Gtk::TreeModelColumn<Glib::ustring> filesystem;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > create ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > grow ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > online_grow ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > shrink ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > online_shrink ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > move ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > copy ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > check ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > label ;
|
|
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > uuid ;
|
|
Gtk::TreeModelColumn<Glib::ustring> software ;
|
|
|
|
treeview_filesystems_Columns()
|
|
{
|
|
add( filesystem );
|
|
add( create ) ;
|
|
add( grow ) ;
|
|
add( online_grow ) ;
|
|
add( shrink ) ;
|
|
add( online_shrink ) ;
|
|
add( move ) ;
|
|
add( copy ) ;
|
|
add( check ) ;
|
|
add( label ) ;
|
|
add( uuid ) ;
|
|
add( software ) ;
|
|
}
|
|
};
|
|
|
|
treeview_filesystems_Columns treeview_filesystems_columns ;
|
|
|
|
Glib::RefPtr<Gdk::Pixbuf> icon_yes, icon_no, icon_blank ;
|
|
};
|
|
|
|
} //GParted
|
|
|
|
#endif /* GPARTED_DIALOGFEATURES_H */
|