[Pkg-kde-extras] Bug#357018: kvpnc: Suggest Account Data dialog skip focus to password if username already cached

Tim Wootton tim.wootton at reuters.com
Wed Mar 15 11:06:39 UTC 2006


Package: kvpnc
Version: 0.8.3-2
Severity: wishlist
Tags: patch

It would be nice, if the username field is already automatically filled
in, that the focus skip straight to the next field. This patch does the
trick for me (using PPTP)

--- kvpnc.cpp.cvs-14032006-1455	2006-03-14 14:56:33.000000000 +0000
+++ kvpnc.cpp	2006-03-15 10:41:31.000000000 +0000
@@ -843,8 +843,11 @@
         bool requestUsername = GlobalConfig->currentProfile->getUserPassword().isEmpty();
         EnterUsernamePasswordDialog dlg(this, i18n("Enter Account Data"), true, requestUsername);
 
-        if (!requestUsername)
+        if (!requestUsername){
           dlg.main->UsernameEdit->setText(GlobalConfig->currentProfile->getUserName());
+          if (!dlg.main->UsernameEdit->text().isEmpty()) //go straight to pw if username present
+            dlg.main->PasswordEdit->setFocus(); 
+        }
 
         dlg.main->LabelGroupPassword->setText(i18n("Enter group password:"));
 
@@ -2145,6 +2148,8 @@
         dlg.main->PasswordEdit->setText(GlobalConfig->currentProfile->getUserPassword());
 
       dlg.main->UsernameEdit->setText(GlobalConfig->currentProfile->getUserName());
+      if (!dlg.main->UsernameEdit->text().isEmpty()) //go straight to pw if username present
+        dlg.main->PasswordEdit->setFocus();
       dlg.main->SaveValuesCheckBox->setText(i18n("Save username and password"));
 
       if (dlg.exec())
@@ -2785,6 +2790,8 @@
             dlg.main->PasswordEdit->setText(GlobalConfig->currentProfile->getUserPassword());
 
           dlg.main->UsernameEdit->setText(GlobalConfig->currentProfile->getUserName());
+          if (!dlg.main->UsernameEdit->text().isEmpty()) //go straight to pw if username present
+            dlg.main->PasswordEdit->setFocus(); 
 
           dlg.main->SaveValuesCheckBox->setText(i18n("Save username and password"));
 

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages kvpnc depends on:
ii  kdelibs4c2a               4:3.5.1-4      core libraries for all KDE applica
ii  libacl1                   2.2.35-1       Access control list shared library
ii  libart-2.0-2              2.3.17-1       Library of functions for 2D graphi
ii  libattr1                  2.4.25-1       Extended attribute shared library
ii  libaudio2                 1.7-5          The Network Audio System (NAS). (s
ii  libc6                     2.3.5-13       GNU C Library: Shared libraries an
ii  libfontconfig1            2.3.2-1.1      generic font configuration library
ii  libfreetype6              2.1.10-1       FreeType 2 font engine, shared lib
ii  libgamin0 [libfam0]       0.1.7-3        Client library for the gamin file 
ii  libgcc1                   1:4.0.2-9      GCC support library
ii  libgcrypt11               1.2.2-1        LGPL Crypto library - runtime libr
ii  libgpg-error0             1.2-1          library for common error values an
ii  libice6                   6.9.0.dfsg.1-4 Inter-Client Exchange library
ii  libidn11                  0.5.18-2       GNU libidn library, implementation
ii  libjpeg62                 6b-11          The Independent JPEG Group's JPEG 
ii  libpng12-0                1.2.8rel-5     PNG library - runtime
ii  libqt3-mt                 3:3.3.5-4      Qt GUI Library (Threaded runtime v
ii  libsm6                    6.9.0.dfsg.1-4 X Window System Session Management
ii  libstdc++6                4.0.2-9        The GNU Standard C++ Library v3
ii  libx11-6                  6.9.0.dfsg.1-4 X Window System protocol client li
ii  libxcursor1               1.1.3-1        X cursor management library
ii  libxext6                  6.9.0.dfsg.1-4 X Window System miscellaneous exte
ii  libxft2                   2.1.8.2-3      FreeType-based font drawing librar
ii  libxi6                    6.9.0.dfsg.1-4 X Window System Input extension li
ii  libxinerama1              6.9.0.dfsg.1-4 X Window System multi-head display
ii  libxrandr2                6.9.0.dfsg.1-4 X Window System Resize, Rotate and
ii  libxrender1               1:0.9.0.2-1    X Rendering Extension client libra
ii  libxt6                    6.9.0.dfsg.1-4 X Toolkit Intrinsics
ii  module-init-tools         3.2.2-2        tools for managing Linux kernel mo
ii  net-tools                 1.60-17        The NET-3 networking toolkit
ii  psmisc                    22.1-1         Utilities that use the proc filesy
ii  zlib1g                    1:1.2.3-9      compression library - runtime

Versions of packages kvpnc recommends:
ii  kdebase-bin                   4:3.5.1-1  core binaries for the KDE base mod

-- no debconf information




More information about the pkg-kde-extras mailing list