[cinnamon] modify set_wheel patch

leigh123linux leigh123linux at fedoraproject.org
Fri Jun 6 17:35:36 UTC 2014


commit da1fe70ad83542ebe6f86efb52f46ab281f286e7
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Fri Jun 6 18:35:38 2014 +0100

    modify set_wheel patch

 cinnamon.spec   |    5 ++++-
 set_wheel.patch |   47 +++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 47 insertions(+), 5 deletions(-)
---
diff --git a/cinnamon.spec b/cinnamon.spec
index d3c0361..7213cda 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -2,7 +2,7 @@
 
 Name:           cinnamon
 Version:        2.2.13
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Window management and application launching for GNOME
 License:        GPLv2+ and LGPLv2+
 URL:            http://cinnamon.linuxmint.com 
@@ -253,6 +253,9 @@ fi
 %{_mandir}/man1/*
 
 %changelog
+* Fri Jun 06 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.13-5
+- modify set_wheel patch
+
 * Tue Jun 03 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.13-4
 - fix files from being listed twice
 
diff --git a/set_wheel.patch b/set_wheel.patch
index 3590bf6..81c6dc4 100644
--- a/set_wheel.patch
+++ b/set_wheel.patch
@@ -1,6 +1,42 @@
 --- a/files/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
 +++ b/files/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
-@@ -734,9 +734,9 @@ class Module:
+@@ -144,12 +144,11 @@ class EditableEntry (Gtk.Notebook):
+ 
+ class PasswordDialog(Gtk.Dialog):
+ 
+-    def __init__ (self, user, password_mask, group_mask):            
++    def __init__ (self, user, password_mask):
+         super(PasswordDialog, self).__init__()
+ 
+         self.user = user
+         self.password_mask = password_mask
+-        self.group_mask = group_mask
+ 
+         self.set_modal(True)
+         self.set_skip_taskbar_hint(True)
+@@ -215,12 +214,6 @@ class PasswordDialog(Gtk.Dialog):
+     def change_password(self):        
+         newpass = self.new_password.get_text()
+         self.user.set_password(newpass, "")
+-        os.system("gpasswd -d '%s' nopasswdlogin" % self.user.get_user_name())
+-        mask = self.group_mask.get_text()
+-        mask = mask.split(", ")
+-        mask.remove("nopasswdlogin")
+-        mask = ", ".join(mask)
+-        self.group_mask.set_text(mask)        
+         self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
+         self.destroy()  
+ 
+@@ -515,7 +508,7 @@ class Module:
+         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)                
++            dialog = PasswordDialog(user, self.password_mask)                
+             response = dialog.run()
+ 
+     def _on_groups_button_clicked(self, widget): 
+@@ -745,11 +738,11 @@ class Module:
              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])
@@ -8,7 +44,10 @@
 +            # Add the user to his/her own group and wheel if Administrator was selected
              if dialog.account_type_combo.get_active() == 1:
 -                os.system("usermod %s -G %s,sudo,nopasswdlogin" % (username, username)) 
-+                os.system("usermod %s -G %s,wheel,nopasswdlogin" % (username, username)) 
++                os.system("usermod %s -G %s,wheel" % (username, username)) 
              else:
-                 os.system("usermod %s -G %s" % (username, username))
-             self.load_groups()               
+-                os.system("usermod %s -G %s,nopasswdlogin" % (username, username))
++                os.system("usermod %s -G %s" % (username, username))
+             self.load_groups()
+         dialog.destroy()
+          


More information about the scm-commits mailing list