2 * This file is part of DisOrder
3 * Copyright (C) 2008 Richard Kettlewell
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 /** @file disobedience/users.c
21 * @brief User management for Disobedience
23 * The user management window contains:
24 * - a list of all the users
27 * - a user details panel
30 * When you select a user that user's details are displayed to the right of the
31 * list. Hit the Apply button and any changes are applied.
33 * When you select 'add' a new empty set of details are displayed to be edited.
34 * Again Apply will commit them.
36 * TODO: it would be really nice if the Username entry could be removed and new
37 * user names entered in the list, rather off in the details panel. This may
38 * be possible with a sufficiently clever GtkCellRenderer.
41 #include "disobedience.h"
44 static GtkWidget
*users_window
;
45 static GtkListStore
*users_list
;
46 static GtkTreeSelection
*users_selection
;
48 static GtkWidget
*users_details_table
;
49 static GtkWidget
*users_apply_button
;
50 static GtkWidget
*users_delete_button
;
51 static GtkWidget
*users_details_name
;
52 static GtkWidget
*users_details_email
;
53 static GtkWidget
*users_details_password
;
54 static GtkWidget
*users_details_password2
;
55 static GtkWidget
*users_details_rights
[32];
56 static int users_details_row
;
57 static const char *users_selected
;
58 static const char *users_deferred_select
;
60 static int users_mode
;
65 #define mode(X) do { \
66 users_mode = MODE_##X; \
67 if(0) fprintf(stderr, "%s:%d: %s(): mode -> %s\n", \
68 __FILE__, __LINE__, __FUNCTION__, #X); \
69 users_details_sensitize_all(); \
72 static const char *users_email
, *users_rights
, *users_password
;
74 /** @brief qsort() callback for username comparison */
75 static int usercmp(const void *a
, const void *b
) {
76 return strcmp(*(char **)a
, *(char **)b
);
79 /** @brief Find a user
80 * @param user User to find
81 * @param iter Iterator to point at user
82 * @return 0 on success, -1 if not found
84 static int users_find_user(const char *user
,
89 if(!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(users_list
), iter
))
92 gtk_tree_model_get(GTK_TREE_MODEL(users_list
), iter
,
94 if(!strcmp(who
, user
)) {
99 } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(users_list
), iter
));
103 /** @brief Called with the list of users
106 * - at startup to populate the initial list
107 * - when we add a user
108 * - maybe in the future when we delete a user
110 * If users_deferred_select is set then that user is selected.
112 static void users_got_list(void attribute((unused
)) *v
, int nvec
, char **vec
) {
116 /* Present users in alphabetical order */
117 qsort(vec
, nvec
, sizeof (char *), usercmp
);
118 /* Set the list contents */
119 gtk_list_store_clear(users_list
);
120 for(n
= 0; n
< nvec
; ++n
)
121 gtk_list_store_insert_with_values(users_list
, &iter
, n
/*position*/,
122 0, vec
[n
], /* column 0 */
123 -1); /* no more columns */
124 /* Only show the window when the list is populated */
125 gtk_widget_show_all(users_window
);
126 if(users_deferred_select
) {
127 if(!users_find_user(users_deferred_select
, &iter
))
128 gtk_tree_selection_select_iter(users_selection
, &iter
);
129 users_deferred_select
= 0;
133 /** @brief Text should be visible */
134 #define DETAIL_VISIBLE 1
136 /** @brief Text should be editable */
137 #define DETAIL_EDITABLE 2
139 /** @brief Add a row to the user detail table */
140 static void users_detail_generic(const char *title
,
141 GtkWidget
*selector
) {
142 const int row
= users_details_row
++;
143 GtkWidget
*const label
= gtk_label_new(title
);
144 gtk_misc_set_alignment(GTK_MISC(label
), 1, 0);
145 gtk_table_attach(GTK_TABLE(users_details_table
),
147 0, 1, /* left/right_attach */
148 row
, row
+1, /* top/bottom_attach */
149 GTK_FILL
, /* xoptions */
151 1, 1); /* x/ypadding */
152 gtk_table_attach(GTK_TABLE(users_details_table
),
154 1, 2, /* left/right_attach */
155 row
, row
+ 1, /* top/bottom_attach */
156 GTK_EXPAND
|GTK_FILL
, /* xoptions */
157 GTK_FILL
, /* yoptions */
158 1, 1); /* x/ypadding */
161 /** @brief Add a row to the user details table
162 * @param entryp Where to put GtkEntry
163 * @param title Label for this row
164 * @param value Initial value or NULL
165 * @param flags Flags word
167 static void users_add_detail(GtkWidget
**entryp
,
173 if(!(entry
= *entryp
)) {
174 *entryp
= entry
= gtk_entry_new();
175 users_detail_generic(title
, entry
);
177 gtk_entry_set_visibility(GTK_ENTRY(entry
),
178 !!(flags
& DETAIL_VISIBLE
));
179 gtk_editable_set_editable(GTK_EDITABLE(entry
),
180 !!(flags
& DETAIL_EDITABLE
));
181 gtk_entry_set_text(GTK_ENTRY(entry
), value ? value
: "");
184 /** @brief Add a checkbox for a right
185 * @param title Label for this row
186 * @param value Current value
187 * @param right Right bit
189 static void users_add_right(const char *title
,
193 GtkWidget
**checkp
= &users_details_rights
[leftmost_bit(right
)];
195 if(!(check
= *checkp
)) {
196 *checkp
= check
= gtk_check_button_new_with_label("");
197 users_detail_generic(title
, check
);
199 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check
), !!(value
& right
));
202 /** @brief Set sensitivity of particular mine/random rights bits */
203 static void users_details_sensitize(rights_type r
) {
204 const int bit
= leftmost_bit(r
);
205 const GtkWidget
*all
= users_details_rights
[bit
];
206 const int sensitive
= (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(all
))
207 && users_mode
!= MODE_NONE
);
209 gtk_widget_set_sensitive(users_details_rights
[bit
+ 1], sensitive
);
210 gtk_widget_set_sensitive(users_details_rights
[bit
+ 2], sensitive
);
213 /** @brief Set sensitivity of everything in sight */
214 static void users_details_sensitize_all(void) {
217 for(n
= 0; n
< 32; ++n
)
218 if(users_details_rights
[n
])
219 gtk_widget_set_sensitive(users_details_rights
[n
], users_mode
!= MODE_NONE
);
220 gtk_widget_set_sensitive(users_details_name
, users_mode
!= MODE_NONE
);
221 gtk_widget_set_sensitive(users_details_email
, users_mode
!= MODE_NONE
);
222 gtk_widget_set_sensitive(users_details_password
, users_mode
!= MODE_NONE
);
223 gtk_widget_set_sensitive(users_details_password2
, users_mode
!= MODE_NONE
);
224 users_details_sensitize(RIGHT_MOVE_ANY
);
225 users_details_sensitize(RIGHT_REMOVE_ANY
);
226 users_details_sensitize(RIGHT_SCRATCH_ANY
);
227 gtk_widget_set_sensitive(users_apply_button
, users_mode
!= MODE_NONE
);
228 gtk_widget_set_sensitive(users_delete_button
, !!users_selected
);
231 /** @brief Called when an _ALL widget is toggled
233 * Modifies sensitivity of the corresponding _MINE and _RANDOM widgets. We
234 * just do the lot rather than trying to figure out which one changed,
236 static void users_any_toggled(GtkToggleButton
attribute((unused
)) *togglebutton
,
237 gpointer
attribute((unused
)) user_data
) {
238 users_details_sensitize_all();
241 /** @brief Add a checkbox for a three-right group
242 * @param title Label for this row
243 * @param bits Rights bits (not masked or normalized)
244 * @param mask Mask for this group (must be 7*2^n)
246 static void users_add_right_group(const char *title
,
249 const uint32_t first
= mask
/ 7;
250 const int bit
= leftmost_bit(first
);
251 GtkWidget
**widgets
= &users_details_rights
[bit
], *any
, *mine
, *rnd
;
254 GtkWidget
*hbox
= gtk_hbox_new(FALSE
, 2);
256 any
= widgets
[0] = gtk_check_button_new_with_label("Any");
257 mine
= widgets
[1] = gtk_check_button_new_with_label("Own");
258 rnd
= widgets
[2] = gtk_check_button_new_with_label("Random");
259 gtk_box_pack_start(GTK_BOX(hbox
), any
, FALSE
, FALSE
, 0);
260 gtk_box_pack_start(GTK_BOX(hbox
), mine
, FALSE
, FALSE
, 0);
261 gtk_box_pack_start(GTK_BOX(hbox
), rnd
, FALSE
, FALSE
, 0);
262 users_detail_generic(title
, hbox
);
263 g_signal_connect(any
, "toggled", G_CALLBACK(users_any_toggled
), NULL
);
264 users_details_rights
[bit
] = any
;
265 users_details_rights
[bit
+ 1] = mine
;
266 users_details_rights
[bit
+ 2] = rnd
;
272 /* Discard irrelevant bits */
274 /* Shift down to bits 0-2; the mask is always 3 contiguous bits */
276 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(any
), !!(bits
& 1));
277 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mine
), !!(bits
& 2));
278 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rnd
), !!(bits
& 4));
281 /** @brief Called when the details table is destroyed */
282 static void users_details_destroyed(GtkWidget
attribute((unused
)) *widget
,
283 GtkWidget
attribute((unused
)) **wp
) {
284 users_details_table
= 0;
285 g_object_unref(users_list
);
287 users_details_name
= 0;
288 users_details_email
= 0;
289 users_details_password
= 0;
290 users_details_password2
= 0;
291 memset(users_details_rights
, 0, sizeof users_details_rights
);
292 /* also users_selection? Not AFAICT; _get_selection does upref */
295 /** @brief Create or modify the user details table
296 * @param name User name (users_edit()) or NULL (users_add())
297 * @param email Email address
298 * @param rights User rights string
299 * @param password Password
301 static void users_makedetails(const char *name
,
304 const char *password
,
309 /* Create the table if it doesn't already exist */
310 if(!users_details_table
) {
311 users_details_table
= gtk_table_new(4, 2, FALSE
/*!homogeneous*/);
312 g_signal_connect(users_details_table
, "destroy",
313 G_CALLBACK(users_details_destroyed
), 0);
316 /* Create or update the widgets */
317 users_add_detail(&users_details_name
, "Username", name
,
318 (DETAIL_EDITABLE
|DETAIL_VISIBLE
) & nameflags
);
320 users_add_detail(&users_details_email
, "Email", email
,
321 (DETAIL_EDITABLE
|DETAIL_VISIBLE
) & flags
);
323 users_add_detail(&users_details_password
, "Password", password
,
324 DETAIL_EDITABLE
& flags
);
325 users_add_detail(&users_details_password2
, "Password", password
,
326 DETAIL_EDITABLE
& flags
);
328 parse_rights(rights
, &r
, 0);
329 users_add_right("Read operations", r
, RIGHT_READ
);
330 users_add_right("Play track", r
, RIGHT_PLAY
);
331 users_add_right_group("Move", r
, RIGHT_MOVE__MASK
);
332 users_add_right_group("Remove", r
, RIGHT_REMOVE__MASK
);
333 users_add_right_group("Scratch", r
, RIGHT_SCRATCH__MASK
);
334 users_add_right("Set volume", r
, RIGHT_VOLUME
);
335 users_add_right("Admin operations", r
, RIGHT_ADMIN
);
336 users_add_right("Rescan", r
, RIGHT_RESCAN
);
337 users_add_right("Register new users", r
, RIGHT_REGISTER
);
338 users_add_right("Modify own userinfo", r
, RIGHT_USERINFO
);
339 users_add_right("Modify track preferences", r
, RIGHT_PREFS
);
340 users_add_right("Modify global preferences", r
, RIGHT_GLOBAL_PREFS
);
341 users_add_right("Pause/resume tracks", r
, RIGHT_PAUSE
);
342 users_details_sensitize_all();
345 /** @brief Called when the 'add' button is pressed */
346 static void users_add(GtkButton
attribute((unused
)) *button
,
347 gpointer
attribute((unused
)) userdata
) {
348 /* Unselect whatever is selected */
349 gtk_tree_selection_unselect_all(users_selection
);
351 /* TODO it would be better to use the server default_rights if there's no
353 users_makedetails("",
355 config
->default_rights
,
357 DETAIL_EDITABLE
|DETAIL_VISIBLE
,
358 DETAIL_EDITABLE
|DETAIL_VISIBLE
);
359 /* Remember we're adding a user */
363 static rights_type
users_get_rights(void) {
367 /* Extract the rights value */
368 for(n
= 0; n
< 32; ++n
) {
369 if(users_details_rights
[n
])
370 if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(users_details_rights
[n
])))
373 /* Throw out redundant bits */
374 if(r
& RIGHT_REMOVE_ANY
)
375 r
&= ~(rights_type
)(RIGHT_REMOVE_MINE
|RIGHT_REMOVE_RANDOM
);
376 if(r
& RIGHT_MOVE_ANY
)
377 r
&= ~(rights_type
)(RIGHT_MOVE_MINE
|RIGHT_MOVE_RANDOM
);
378 if(r
& RIGHT_SCRATCH_ANY
)
379 r
&= ~(rights_type
)(RIGHT_SCRATCH_MINE
|RIGHT_SCRATCH_RANDOM
);
383 /** @brief Called when various things fail */
384 static void users_op_failed(struct callbackdata
attribute((unused
)) *cbd
,
385 int attribute((unused
)) code
,
387 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, msg
);
390 /** @brief Called when a new user has been created */
391 static void users_adduser_completed(void *v
) {
392 struct callbackdata
*cbd
= v
;
394 /* Now the user is created we can go ahead and set the email address */
395 if(*cbd
->u
.edituser
.email
) {
396 struct callbackdata
*ncbd
= xmalloc(sizeof *cbd
);
397 ncbd
->onerror
= users_op_failed
;
398 disorder_eclient_edituser(client
, NULL
, cbd
->u
.edituser
.user
,
399 "email", cbd
->u
.edituser
.email
, ncbd
);
401 /* Refresh the list of users */
402 disorder_eclient_users(client
, users_got_list
, 0);
403 /* We'll select the newly created user */
404 users_deferred_select
= cbd
->u
.edituser
.user
;
407 /** @brief Called if creating a new user fails */
408 static void users_adduser_failed(struct callbackdata
attribute((unused
)) *cbd
,
409 int attribute((unused
)) code
,
411 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, msg
);
412 mode(ADD
); /* Let the user try again */
415 /** @brief Called when the 'Apply' button is pressed */
416 static void users_apply(GtkButton
attribute((unused
)) *button
,
417 gpointer
attribute((unused
)) userdata
) {
418 struct callbackdata
*cbd
;
419 const char *password
;
420 const char *password2
;
428 name
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_name
)));
429 email
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_email
)));
430 password
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_password
)));
431 password2
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_password2
)));
433 /* No username. Really we wanted to desensitize the Apply button when
434 * there's no userame but there doesn't seem to be a signal to detect
435 * changes to the entry text. Consequently we have error messages
437 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, "Must enter a username");
440 if(strcmp(password
, password2
)) {
441 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, "Passwords do not match");
444 if(*email
&& !strchr(email
, '@')) {
445 /* The server will complain about this but we can give a better error
446 * message this way */
447 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, "Invalid email address");
450 cbd
= xmalloc(sizeof *cbd
);
451 cbd
->onerror
= users_adduser_failed
;
452 cbd
->u
.edituser
.user
= name
;
453 cbd
->u
.edituser
.email
= email
;
454 disorder_eclient_adduser(client
, users_adduser_completed
,
457 rights_string(users_get_rights()),
459 /* We switch to no-op mode while creating the user */
463 /* Ugh, can we de-dupe with above? */
464 email
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_email
)));
465 password
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_password
)));
466 password2
= xstrdup(gtk_entry_get_text(GTK_ENTRY(users_details_password2
)));
467 if(strcmp(password
, password2
)) {
468 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, "Passwords do not match");
471 if(*email
&& !strchr(email
, '@')) {
472 popup_submsg(users_window
, GTK_MESSAGE_ERROR
, "Invalid email address");
475 cbd
= xmalloc(sizeof *cbd
);
476 cbd
->onerror
= users_op_failed
;
477 disorder_eclient_edituser(client
, NULL
, users_selected
,
478 "email", email
, cbd
);
479 disorder_eclient_edituser(client
, NULL
, users_selected
,
480 "password", password
, cbd
);
481 disorder_eclient_edituser(client
, NULL
, users_selected
,
482 "rights", rights_string(users_get_rights()), cbd
);
483 /* We remain in edit mode */
488 /** @brief Called when a user has been deleted */
489 static void users_deleted(void *v
) {
490 const struct callbackdata
*const cbd
= v
;
493 if(!users_find_user(cbd
->u
.user
, iter
)) /* Find the user... */
494 gtk_list_store_remove(users_list
, iter
); /* ...and remove them */
497 /** @brief Called when the 'Delete' button is pressed */
498 static void users_delete(GtkButton
attribute((unused
)) *button
,
499 gpointer
attribute((unused
)) userdata
) {
502 struct callbackdata
*cbd
;
506 yesno
= gtk_message_dialog_new(GTK_WINDOW(users_window
),
508 GTK_MESSAGE_QUESTION
,
510 "Do you really want to delete user %s?"
511 " This action cannot be undone.",
513 res
= gtk_dialog_run(GTK_DIALOG(yesno
));
514 gtk_widget_destroy(yesno
);
515 if(res
== GTK_RESPONSE_YES
) {
516 cbd
= xmalloc(sizeof *cbd
);
517 cbd
->onerror
= users_op_failed
;
518 cbd
->u
.user
= users_selected
;
519 disorder_eclient_deluser(client
, users_deleted
, cbd
->u
.user
, cbd
);
523 static void users_got_email(void attribute((unused
)) *v
, const char *value
) {
527 static void users_got_rights(void attribute((unused
)) *v
, const char *value
) {
528 users_rights
= value
;
531 static void users_got_password(void attribute((unused
)) *v
, const char *value
) {
532 users_password
= value
;
533 users_makedetails(users_selected
,
538 DETAIL_EDITABLE
|DETAIL_VISIBLE
);
542 /** @brief Called when the selection MIGHT have changed */
543 static void users_selection_changed(GtkTreeSelection
attribute((unused
)) *treeselection
,
544 gpointer
attribute((unused
)) user_data
) {
546 char *gselected
, *selected
;
548 /* Identify the current selection */
549 if(gtk_tree_selection_get_selected(users_selection
, 0, &iter
)) {
550 gtk_tree_model_get(GTK_TREE_MODEL(users_list
), &iter
,
552 selected
= xstrdup(gselected
);
556 /* Eliminate no-change cases */
557 if(!selected
&& !users_selected
)
559 if(selected
&& users_selected
&& !strcmp(selected
, users_selected
))
561 /* There's been a change; junk the old data and fetch new data in
563 users_selected
= selected
;
564 users_makedetails("", "", "", "",
568 disorder_eclient_userinfo(client
, users_got_email
, users_selected
,
570 disorder_eclient_userinfo(client
, users_got_rights
, users_selected
,
572 disorder_eclient_userinfo(client
, users_got_password
, users_selected
,
575 mode(NONE
); /* not editing *yet* */
578 /** @brief Table of buttons below the user list */
579 static struct button users_buttons
[] = {
593 #define NUSERS_BUTTONS (sizeof users_buttons / sizeof *users_buttons)
595 /** @brief Pop up the user management window */
596 void manage_users(void) {
597 GtkWidget
*tree
, *buttons
, *hbox
, *hbox2
, *vbox
, *vbox2
;
599 GtkTreeViewColumn
*col
;
601 /* If the window already exists just raise it */
603 gtk_window_present(GTK_WINDOW(users_window
));
606 /* Create the window */
607 users_window
= gtk_window_new(GTK_WINDOW_TOPLEVEL
);
608 gtk_widget_set_style(users_window
, tool_style
);
609 g_signal_connect(users_window
, "destroy",
610 G_CALLBACK(gtk_widget_destroyed
), &users_window
);
611 gtk_window_set_title(GTK_WINDOW(users_window
), "User Management");
612 /* default size is too small */
613 gtk_window_set_default_size(GTK_WINDOW(users_window
), 240, 240);
615 /* Create the list of users and populate it asynchronously */
616 users_list
= gtk_list_store_new(1, G_TYPE_STRING
);
617 disorder_eclient_users(client
, users_got_list
, 0);
618 /* Create the view */
619 tree
= gtk_tree_view_new_with_model(GTK_TREE_MODEL(users_list
));
620 /* ...and the renderers for it */
621 cr
= gtk_cell_renderer_text_new();
622 col
= gtk_tree_view_column_new_with_attributes("Username",
626 gtk_tree_view_append_column(GTK_TREE_VIEW(tree
), col
);
627 /* Get the selection for the view; set its mode; arrange for a callback when
629 users_selection
= gtk_tree_view_get_selection(GTK_TREE_VIEW(tree
));
630 gtk_tree_selection_set_mode(users_selection
, GTK_SELECTION_BROWSE
);
631 g_signal_connect(users_selection
, "changed",
632 G_CALLBACK(users_selection_changed
), NULL
);
634 /* Create the control buttons */
635 buttons
= create_buttons_box(users_buttons
,
637 gtk_hbox_new(FALSE
, 1));
638 users_delete_button
= users_buttons
[1].widget
;
640 /* Buttons live below the list */
641 vbox
= gtk_vbox_new(FALSE
, 0);
642 gtk_box_pack_start(GTK_BOX(vbox
), scroll_widget(tree
), TRUE
/*expand*/, TRUE
/*fill*/, 0);
643 gtk_box_pack_start(GTK_BOX(vbox
), buttons
, FALSE
/*expand*/, FALSE
, 0);
645 /* Create an empty user details table, and put an apply button below it */
646 users_apply_button
= gtk_button_new_from_stock(GTK_STOCK_APPLY
);
647 users_makedetails("", "", "", "",
650 g_signal_connect(users_apply_button
, "clicked",
651 G_CALLBACK(users_apply
), NULL
);
652 hbox2
= gtk_hbox_new(FALSE
, 0);
653 gtk_box_pack_end(GTK_BOX(hbox2
), users_apply_button
,
654 FALSE
/*expand*/, FALSE
, 0);
656 vbox2
= gtk_vbox_new(FALSE
, 0);
657 gtk_box_pack_start(GTK_BOX(vbox2
), users_details_table
,
658 TRUE
/*expand*/, TRUE
/*fill*/, 0);
659 gtk_box_pack_start(GTK_BOX(vbox2
), hbox2
,
660 FALSE
/*expand*/, FALSE
, 0);
662 /* User details are to the right of the list. We put in a pointless event
663 * box as as spacer, so that the longest label in the user details isn't
664 * cuddled up to the user list. */
665 hbox
= gtk_hbox_new(FALSE
, 0);
666 gtk_box_pack_start(GTK_BOX(hbox
), vbox
, FALSE
/*expand*/, FALSE
, 0);
667 gtk_box_pack_start(GTK_BOX(hbox
), gtk_event_box_new(), FALSE
/*expand*/, FALSE
, 2);
668 gtk_box_pack_start(GTK_BOX(hbox
), vbox2
, TRUE
/*expand*/, TRUE
/*fill*/, 0);
669 gtk_container_add(GTK_CONTAINER(users_window
), frame_widget(hbox
, NULL
));