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 72 73 74 75
|
#ifndef _CDLGUSPACERULES_HH
#define _CDLGUSPACERULES_HH
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <config.h>
#include "fireflierIO.h"
#include "dispatcher.h"
#include "CSync.h"
#ifdef WITHGCONF
#include "CGConf.h"
#endif
using Glib::ustring;
class CDlgUSpaceRules: public Gtk::Window, public CSync
{
private:
class CUSpaceRulesColumnRecord: public Gtk::TreeModel::ColumnRecord
{
public:
Gtk::TreeModelColumn <ustring> m_colUSpaceRule;
CUSpaceRulesColumnRecord()
{
add(m_colUSpaceRule);
}
};
static const CUSpaceRulesColumnRecord m_colRecord;
Glib::RefPtr <Gtk::ListStore> m_pListUSpaceRules;
Glib::RefPtr <Gtk::TreeSelection> m_pListSel;
Dispatcher1 <int> m_signalAuthentication;
Dispatcher2 <CffIO::pCffIOError, bool> m_signalNetworkThreadError;
Dispatcher2 <const char*, int> m_signalUSpaceRulesAvail;
#ifdef WITHGCONF
CGConfUI m_gconfUI;
#endif
protected:
Gtk::Button m_butDel;
Gtk::TreeView m_tvUSpaceRules;
public:
CDlgUSpaceRules();
virtual ~CDlgUSpaceRules();
protected:
#ifdef WITHGCONF
void on_value_changed(const ustring& strKey, const Gnome::Conf::Value& value);
void on_butCancel_clicked();
bool on_delete(GdkEventAny*);
void save_pos_and_size();
#endif
void initGUI();
void on_butDel_clicked();
void on_selection_changed();
void on_USpaceRules_avail(const char* szMsg, int nLen);
static void deleteRule(const Gtk::TreePath& path, int* nCount);
// callback for Gtk::TreeSelection::selected_foreach
// callback just to find out whether any node is selected
static void isAnySelected(const Gtk::TreePath& path, bool* bWasHere);
// callbacks for the network thread
void on_Authentication(int nAuthenticated);
void on_networkthread_error(CffIO::pCffIOError pErr, bool bDisconnected);
};
#endif
|