Hello community,

here is the log from the commit of package yast2-users for openSUSE:Factory 
checked in at 2014-08-20 17:53:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2014-08-01 
14:34:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes     
2014-08-20 17:54:08.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Aug 13 16:31:09 CEST 2014 - [email protected]
+
+- Fixed handling of the [Abort] button in inst_user_first, user is
+  asked for confirmation (bnc#886662)
+- Fixed UsersSimple.Transliterate not to return a trailing newline
+- 3.1.30
+
+-------------------------------------------------------------------

Old:
----
  yast2-users-3.1.29.tar.bz2

New:
----
  yast2-users-3.1.30.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.uitw5K/_old  2014-08-20 17:54:09.000000000 +0200
+++ /var/tmp/diff_new_pack.uitw5K/_new  2014-08-20 17:54:09.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.29
+Version:        3.1.30
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-users-3.1.29.tar.bz2 -> yast2-users-3.1.30.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.29/package/yast2-users.changes 
new/yast2-users-3.1.30/package/yast2-users.changes
--- old/yast2-users-3.1.29/package/yast2-users.changes  2014-07-31 
17:53:44.000000000 +0200
+++ new/yast2-users-3.1.30/package/yast2-users.changes  2014-08-15 
11:58:11.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Wed Aug 13 16:31:09 CEST 2014 - [email protected]
+
+- Fixed handling of the [Abort] button in inst_user_first, user is
+  asked for confirmation (bnc#886662)
+- Fixed UsersSimple.Transliterate not to return a trailing newline
+- 3.1.30
+
+-------------------------------------------------------------------
 Thu Jul 31 17:31:29 CEST 2014 - [email protected]
 
 - Checking max UID for system users correctly while importing from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.29/package/yast2-users.spec 
new/yast2-users-3.1.30/package/yast2-users.spec
--- old/yast2-users-3.1.29/package/yast2-users.spec     2014-07-31 
17:53:44.000000000 +0200
+++ new/yast2-users-3.1.30/package/yast2-users.spec     2014-08-15 
11:58:11.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.29
+Version:        3.1.30
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.29/src/clients/inst_user_first.rb 
new/yast2-users-3.1.30/src/clients/inst_user_first.rb
--- old/yast2-users-3.1.29/src/clients/inst_user_first.rb       2014-07-31 
17:53:44.000000000 +0200
+++ new/yast2-users-3.1.30/src/clients/inst_user_first.rb       2014-08-15 
11:58:11.000000000 +0200
@@ -25,6 +25,8 @@
 # Authors:     Jiri Suchomel <[email protected]>
 #
 # $Id$
+require "yast"
+
 module Yast
   class InstUserFirstClient < Client
 
@@ -183,7 +185,7 @@
 
       @user_type = @user.fetch("type", "local")
       @username = @user.fetch("uid", "")
-      @cn = @user.fetch("cn", "")
+      @full_name = @user.fetch("cn", "")
       @password = @user["userPassword"]
 
       @autologin = UsersSimple.AutologinUsed
@@ -215,11 +217,11 @@
 
       @fields = VBox(
         InputField(
-          Id(:cn),
+          Id(:full_name),
           Opt(:notify, :hstretch),
           # text entry
           _("User's &Full Name"),
-          @cn
+          @full_name
         ),
         InputField(
           Id(:username),
@@ -285,16 +287,16 @@
         GetInstArgs.enable_next || Mode.normal
       )
 
-      widgets = [:cn, :username, :pw1, :pw2, :root_pw, :root_mail, :autologin]
+      widgets = [:full_name, :username, :pw1, :pw2, :root_pw, :root_mail, 
:autologin]
 
       widgets.each do |w|
         UI.ChangeWidget(Id(w), :Enabled, @to_import.empty?)
       end
 
-      UI.SetFocus(Id(:cn))
+      UI.SetFocus(Id(:full_name))
 
       @login_modified = false
-      @ret = :back
+
       while true
         @ret = UI.UserInput
 
@@ -308,22 +310,12 @@
           Wizard.RestoreHelp(main_help)
         end
 
-        if @ret == :cn
-          @uname = UI.QueryWidget(Id(:username), :Value)
-          @login_modified = false if @login_modified && @uname.empty? # 
reenable suggestion
-
-          if !@login_modified
-            # get the first part
-            @full = UI.QueryWidget(Id(:cn), :Value).split(" ", 2).first
-            @full = UsersSimple.Transliterate(@full)
-            UI.ChangeWidget(
-              Id(:username),
-              :Value,
-              Builtins.tolower(
-                Builtins.filterchars(@full, UsersSimple.ValidLognameChars)
-              )
-            )
-          end
+        # UI sends events as user types the full name
+        if @ret == :full_name
+          # reenable suggestion
+          @login_modified = false if UI.QueryWidget(Id(:username), 
:Value).empty?
+
+          propose_login unless @login_modified
         end
 
         @login_modified = true if @ret == :username
@@ -365,11 +357,11 @@
           end
 
           # full name checks
-          @cn = UI.QueryWidget(Id(:cn), :Value)
-          @error = UsersSimple.CheckFullname(@cn)
+          @full_name = UI.QueryWidget(Id(:full_name), :Value)
+          @error = UsersSimple.CheckFullname(@full_name)
           if [email protected]?
             Report.Error(@error)
-            UI.SetFocus(Id(:cn))
+            UI.SetFocus(Id(:full_name))
             next
           end
 
@@ -386,6 +378,11 @@
           # set UID if home directory is found on future home partition
           @password = pw1
         end
+
+        if @ret == :abort && !Popup.ConfirmAbort(:painless)
+          next
+        end
+
         break if [:back, :abort, :cancel, :next].include?(@ret)
       end
 
@@ -412,7 +409,7 @@
           @user_map = {
             "uid"          => @username,
             "userPassword" => @password,
-            "cn"           => @cn
+            "cn"           => @full_name
           }
           UsersSimple.SetUsers([@user_map])
           UsersSimple.SkipRootPasswordDialog(@use_pw_for_root)
@@ -435,6 +432,18 @@
       @ret
     end
 
+    # Takes the first word from full name and proposes a login name which is 
then used
+    # to relace the current login name in UI
+    def propose_login
+      # get the first name
+      full_name = UI.QueryWidget(Id(:full_name), :Value)
+
+      login = full_name.strip.split(" ", 2).first || ""
+      login = UsersSimple.Transliterate(login).delete("^" + 
UsersSimple.ValidLognameChars).downcase
+
+      UI.ChangeWidget(Id(:username), :Value, login)
+    end
+
     # help text for main add user dialog
     def main_help
       # help text for main add user dialog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.29/src/modules/UsersSimple.pm 
new/yast2-users-3.1.30/src/modules/UsersSimple.pm
--- old/yast2-users-3.1.29/src/modules/UsersSimple.pm   2014-07-31 
17:53:44.000000000 +0200
+++ new/yast2-users-3.1.30/src/modules/UsersSimple.pm   2014-08-15 
11:58:11.000000000 +0200
@@ -1322,6 +1322,8 @@
        "echo '$text' | iconv -f utf-8 -t ascii//translit",
        { "LANG" => $language });
     my $stdout = $out->{"stdout"} || "";
+    chomp($stdout);
+
     return $stdout;
 }
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to