However this eventually sets the default home dir prefix
for the user's profile, and then calls the callback to
update that based on the user's name. This then overwrote
the value we set above.
It is exactly the right thing to do if the user didn't exist
on the system yet, i.e. user == NULL.
So, we just add this right after, which is taking the code above and
moving it below this, with the same guard. This means that
we still set the user's home directory if they already exist, we just do
it later so that it is not overwritten.
I have tested this and found
* It shows both mine and the root account's home
dir correctly, where only mine was shown before.
* It uses the default prefix from the user's profile
when creating a user, and updates the homedir
as you type in the username, which is the same
behaviour as before.
Hi,
This bug is a lot simpler to fix than what my first attempts
were trying to do. The fix is attached.
By way of explanation, as it's not completely obvious I
include the main part here.
+--- gnome-system- tools-2. 22.0~/src/ users/user- settings. c 2008-03-31 16:32:35.000000000 +0100 tools-2. 22.0/src/ users/user- settings. c 2008-03-31 16:32:36.000000000 +0100 get_widget (tool->main_dialog, "user_settings_ shell") ; get_widget (tool->main_dialog, "user_settings_ home"); get_home_ directory (user)); get_widget (tool->main_dialog, "user_settings_ uid"); button_ set_value (GTK_SPIN_BUTTON (widget), oobs_user_get_uid (user)); set_sensitive (GTK_SPIN_BUTTON (widget), FALSE);
++++ gnome-system-
+@@ -347,9 +347,6 @@
+ widget = gst_dialog_
+ set_entry_text (GTK_BIN (widget)->child, oobs_user_get_shell (user));
+
+- widget = gst_dialog_
+- set_entry_text (widget, oobs_user_
+-
+ widget = gst_dialog_
+ gtk_spin_
+ gtk_widget_
Here's where the code used to set the home dir for existing users.
+@@ -394,6 +391,11 @@ default_ profile (GST_USERS_TOOL (tool));
+ if (!login)
+ table_set_
+
However this eventually sets the default home dir prefix
for the user's profile, and then calls the callback to
update that based on the user's name. This then overwrote
the value we set above.
It is exactly the right thing to do if the user didn't exist
on the system yet, i.e. user == NULL.
++ if (user) { get_widget (tool->main_dialog, "user_settings_ home"); get_home_ directory (user));
++ widget = gst_dialog_
++ set_entry_text (widget, oobs_user_
++ }
So, we just add this right after, which is taking the code above and
moving it below this, with the same guard. This means that
we still set the user's home directory if they already exist, we just do
it later so that it is not overwritten.
I have tested this and found
* It shows both mine and the root account's home
dir correctly, where only mine was shown before.
* It uses the default prefix from the user's profile
when creating a user, and updates the homedir
as you type in the username, which is the same
behaviour as before.
Thanks,
James