chiark / gitweb /
Only offer user management window if you have RIGHT_ADMIN. The server
[disorder] / disobedience / disobedience.h
index 999ef3166df136f600cabd66b848609a1567a296..4885c8ef47c43b676af6ba0fa6a116bc59d95639 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2006, 2007 Richard Kettlewell
+ * Copyright (C) 2006-2008 Richard Kettlewell
  *
  * 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
@@ -75,6 +75,10 @@ struct callbackdata {
     struct choosenode *choosenode;      /* gtkchoose.c got_files/got_dirs */
     struct queuelike *ql;               /* gtkqueue.c queuelike_completed */
     struct prefdata *f;                 /* properties.c */
+    const char *user;                   /* users.c */
+    struct {
+      const char *user, *email;         /* users.c */
+    } edituser;
   } u;
 };
 
@@ -86,8 +90,10 @@ struct callbackdata {
 struct tabtype {
   int (*properties_sensitive)(GtkWidget *tab);
   int (*selectall_sensitive)(GtkWidget *tab);
+  int (*selectnone_sensitive)(GtkWidget *tab);
   void (*properties_activate)(GtkWidget *tab);
   void (*selectall_activate)(GtkWidget *tab);
+  void (*selectnone_activate)(GtkWidget *tab);
 };
 
 /** @brief Button definitions */
@@ -95,6 +101,7 @@ struct button {
   const gchar *stock;
   void (*clicked)(GtkButton *button, gpointer userdata);
   const char *tip;
+  GtkWidget *widget;
 };
 
 /* Variables --------------------------------------------------------------- */
@@ -141,7 +148,7 @@ GdkPixbuf *find_image(const char *name);
  * found. */
 
 void popup_msg(GtkMessageType mt, const char *msg);
-/* Pop up a message */
+void popup_submsg(GtkWidget *parent, GtkMessageType mt, const char *msg);
 
 void fpopup_msg(GtkMessageType mt, const char *fmt, ...);
 
@@ -155,8 +162,11 @@ void progress_window_progress(struct progress_window *pw,
 
 GtkWidget *iconbutton(const char *path, const char *tip);
 
-GtkWidget *create_buttons(const struct button *buttons,
+GtkWidget *create_buttons(struct button *buttons,
                           size_t nbuttons);
+GtkWidget *create_buttons_box(struct button *buttons,
+                              size_t nbuttons,
+                              GtkWidget *box);
 
 void register_monitor(monitor_callback *callback,
                       void *u,
@@ -183,6 +193,7 @@ void menu_update(int page);
 /* Called whenever the main menu might need to change.  PAGE is the current
  * page if known or -1 otherwise. */
 
+void users_set_sensitive(int sensitive);
 
 /* Controls */
 
@@ -211,7 +222,8 @@ void added_update(void);
  * changed */
 
 void queue_select_all(struct queuelike *ql);
-/* Select all on some queue */
+void queue_select_none(struct queuelike *ql);
+/* Select all/none on some queue */
 
 void queue_properties(struct queuelike *ql);
 /* Pop up properties of selected items in some queue */
@@ -237,6 +249,12 @@ void choose_update(void);
 
 void login_box(void);
 
+GtkWidget *login_window;
+
+/* User management */
+
+void manage_users(void);
+
 /* Help */
 
 void popup_help(void);
@@ -264,6 +282,7 @@ extern const char *browser;
 void save_settings(void);
 void load_settings(void);
 void set_tool_colors(GtkWidget *w);
+void popup_settings(void);
 
 /* Widget leakage debugging rubbish ---------------------------------------- */