1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
//=======================================================================
// removetab.h
//-----------------------------------------------------------------------
// This file is part of the package paco
// Copyright (C) 2004-2009 David Rosal
// For more information visit http://paco.sourceforge.net
//=======================================================================
#ifndef GPACO_REMOVE_TAB_H
#define GPACO_REMOVE_TAB_H
#include "util.h"
#include "pkg.h"
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/textview.h>
#include <gtkmm/textbuffer.h>
namespace Gpaco
{
class PkgSet;
class RemoveTab : public Gtk::VBox
{
enum {
REPORT_REGULAR,
REPORT_SYMLINK,
REPORT_DIR,
REPORT_ERROR,
REPORT_SHARED,
REPORT_UNLOG
};
public:
RemoveTab(Pkg&);
~RemoveTab();
private:
Pkg& mPkg;
PkgSet& mPkgSet;
Gtk::Label mLabel;
bool mRemoveShared;
Gtk::CheckButton mButtonShared;
Button mButtonRemove;
Button mButtonStop;
Button mButtonResume;
Gtk::TextView mTextView;
Glib::RefPtr<Gtk::TextBuffer> mpTextBuffer;
Glib::RefPtr<Gtk::TextTag> mpTagSuccess;
Glib::RefPtr<Gtk::TextTag> mpTagError;
Glib::RefPtr<Gtk::TextTag> mpTagShared;
bool mStop;
void onSwitchRemoveShared();
void onRemove();
void onStop();
void onResume();
bool removeFile(File*);
void report(std::string const&, int);
void removeDir(std::string const&);
};
} // namespace Gpaco
#endif // GPACO_REMOVE_TAB_H
|