milis/talimatname/genel/c/cinnamon/set_wheel.patch

56 lines
2.6 KiB
Diff
Raw Normal View History

2018-02-03 19:57:02 +01:00
--- a/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
+++ b/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
@@ -153,12 +153,11 @@
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
class PasswordDialog(Gtk.Dialog):
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
- def __init__ (self, user, password_mask, group_mask, parent = None):
+ def __init__ (self, user, password_mask, parent = None):
super(PasswordDialog, self).__init__(None, parent)
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
self.user = user
self.password_mask = password_mask
- self.group_mask = group_mask
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
self.set_modal(True)
self.set_skip_taskbar_hint(True)
@@ -224,14 +223,7 @@
def change_password(self):
newpass = self.new_password.get_text()
self.user.set_password(newpass, "")
- mask = self.group_mask.get_text()
- if "nopasswdlogin" in mask:
- subprocess.call(["gpasswd", "-d", self.user.get_user_name(), "nopasswdlogin"])
- mask = mask.split(", ")
- mask.remove("nopasswdlogin")
- mask = ", ".join(mask)
- self.group_mask.set_text(mask)
2018-05-10 17:58:38 +02:00
- self.password_mask.set_text('\u2022\u2022\u2022\u2022\u2022\u2022')
+ self.password_mask.set_text('\u2022\u2022\u2022\u2022\u2022\u2022')
2018-02-03 19:57:02 +01:00
self.destroy()
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
def set_passwords_visibility(self):
@@ -563,7 +555,7 @@
model, treeiter = self.users_treeview.get_selection().get_selected()
if treeiter != None:
user = model[treeiter][INDEX_USER_OBJECT]
- dialog = PasswordDialog(user, self.password_mask, self.groups_label, self.window)
+ dialog = PasswordDialog(user, self.password_mask, self.window)
response = dialog.run()
2018-05-10 17:58:38 +02:00
2018-02-03 19:57:02 +01:00
def _on_groups_button_clicked(self, widget):
@@ -807,11 +799,11 @@
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/faces/user-generic.png", 48, 48)
description = "<b>%s</b>\n%s" % (fullname, username)
piter = self.users.append(None, [new_user, pixbuf, description])
- # Add the user to his/her own group and sudo if Administrator was selected
+ # Add the user to his/her own group and wheel if Administrator was selected
if dialog.account_type_combo.get_active() == 1:
- subprocess.call(["usermod", username, "-G", "%s,sudo,nopasswdlogin" % username])
+ subprocess.call(["usermod", username, "-G", "%s,wheel" % username])
else:
- subprocess.call(["usermod", username, "-G", "%s,nopasswdlogin" % username])
+ subprocess.call(["usermod", username, "-G", "%s" % username])
self.load_groups()
dialog.destroy()