1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * Author : Peter Colijn <pcolijn@nit.ca>
4 * Hubert Figuiere <hub@nit.ca>
6 * Copyright 2003-2004, Net Integration Technologies, Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 #ifndef __ACL_DIALOG_H
24 #define __ACL_DIALOG_H
32 #define DIALOG_WIDTH 390
33 #define DIALOG_HEIGHT 400
34 #define BORDER_WIDTH 12
36 #define USERNAME_COL_WIDTH 215
37 #define ACCESS_COL_WIDTH 50
48 void dialog_closed(GtkWidget
*widget
, gpointer data
);
50 gint
bool_compare(GtkTreeModel
*model
,
58 AclDialog(const WvStringParm _eit_path
,
59 const WvStringParm _folder_name
,
60 const UniConf
&_state
,
64 const UniConf
get_state() const { return state
; }
65 const WvString
get_folder_name() const { return folder_name
; }
66 const WvString
get_eit_path() const { return eit_path
; }
67 GtkWidget
*get_dialog() { return dialog
; }
68 GtkTreeModel
*get_model() { return model
; }
69 GtkEntry
*get_find_entry() { return find_entry
; }
71 void update_model(GtkListStore
*store
);
74 void toggle_permissions(gchar
*path_str
, int which_acl
);
75 void toggle_permissions_for_selection(int which_acl
);
78 static void find_entry_activate_cb(GtkWidget
*widget
, gpointer data
);
79 static void find_clear_clicked_cb(GtkWidget
*widget
, gpointer data
);
80 static void find_clicked_cb(GtkWidget
*widget
, gpointer data
);
81 /* gtk tree view callbacks */
82 static void read_toggled(GtkCellRendererToggle
*cell
,
86 static void write_toggled(GtkCellRendererToggle
*cell
,
90 static void admin_toggled(GtkCellRendererToggle
*cell
,
93 static void selection_read_toggled(GtkWidget
*widget
, gpointer data
);
94 static void selection_write_toggled(GtkWidget
*widget
, gpointer data
);
95 static void selection_admin_toggled(GtkWidget
*widget
, gpointer data
);
97 GtkTreeModel
*create_model();
98 void add_columns(GtkTreeView
*treeview
);
99 GtkWidget
*create_dialog(bool active
);
102 GtkTreeView
*permlist
;
104 GtkEntry
*find_entry
;
105 GtkWidget
*find_button
;
108 WvString folder_name
;
112 #endif // __ACL_DIALOG_H