Skip to content

Commit

Permalink
Merge pull request #78 from ghostbsd/fix-partiotn.py
Browse files Browse the repository at this point in the history
Fixed bug seen on deleting the user name in the UI.
  • Loading branch information
ericbsd authored Nov 16, 2024
2 parents 6f3d634 + 6c7e054 commit a437ea4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/add_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ def on_shell(self, widget):

def user_and_host(self, widget):
username = self.name.get_text().split()
self.host.set_text("%s-ghostbsd-pc" % username[0].lower())
self.user.set_text(username[0].lower())
if len(username) > 1:
self.host.set_text(f"{username[0].lower()}-ghostbsd-pc")
self.user.set_text(username[0].lower())
else:
self.host.set_text("")
self.user.set_text("")

def __init__(self, button3):
self.vbox1 = Gtk.VBox(False, 0)
Expand Down

0 comments on commit a437ea4

Please sign in to comment.