+ if(!*gtk_entry_get_text(GTK_ENTRY(users_details_name))) {
+ /* No username. Really we wanted to desensitize the Apply button when
+ * there's no userame but there doesn't seem to be a signal to detect
+ * changes to the entry text. Consequently we have error messages
+ * instead. */
+ popup_submsg(users_window, GTK_MESSAGE_ERROR, "Must enter a username");
+ return;
+ }
+ if(strcmp(gtk_entry_get_text(GTK_ENTRY(users_details_password)),
+ gtk_entry_get_text(GTK_ENTRY(users_details_password2)))) {
+ popup_submsg(users_window, GTK_MESSAGE_ERROR, "Passwords do not match");