[pkg-boinc-commits] r547 - in /branches/sarge-backports/boinc: clientgui/ clientgui/ValidateEmailAddress.cpp debian/boinc-client.templates debian/overrides/ debian/overrides/boinc-client debian/po/ debian/po/POTFILES.in debian/po/fr.po debian/po/templates.pot

fst-guest at users.alioth.debian.org fst-guest at users.alioth.debian.org
Fri Nov 3 14:53:45 CET 2006


Author: fst-guest
Date: Fri Nov  3 14:53:44 2006
New Revision: 547

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=547
Log:
These should actually be part of the last commit. *jikes*

Added:
    branches/sarge-backports/boinc/clientgui/
    branches/sarge-backports/boinc/clientgui/ValidateEmailAddress.cpp
    branches/sarge-backports/boinc/debian/boinc-client.templates
    branches/sarge-backports/boinc/debian/overrides/
    branches/sarge-backports/boinc/debian/overrides/boinc-client
    branches/sarge-backports/boinc/debian/po/
    branches/sarge-backports/boinc/debian/po/POTFILES.in
    branches/sarge-backports/boinc/debian/po/fr.po
    branches/sarge-backports/boinc/debian/po/templates.pot

Added: branches/sarge-backports/boinc/clientgui/ValidateEmailAddress.cpp
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/clientgui/ValidateEmailAddress.cpp?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/clientgui/ValidateEmailAddress.cpp (added)
+++ branches/sarge-backports/boinc/clientgui/ValidateEmailAddress.cpp Fri Nov  3 14:53:44 2006
@@ -1,0 +1,143 @@
+// Berkeley Open Infrastructure for Network Computing
+// http://boinc.berkeley.edu
+// Copyright (C) 2005 University of California
+//
+// This is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation;
+// either version 2.1 of the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// To view the GNU Lesser General Public License visit
+// http://www.gnu.org/copyleft/lesser.html
+// or write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma implementation "ValidateEmailAddress.h"
+#endif
+
+#include "stdwx.h"
+#include "ValidateEmailAddress.h"
+
+
+IMPLEMENT_DYNAMIC_CLASS(CValidateEmailAddress, wxValidator)
+
+
+CValidateEmailAddress::CValidateEmailAddress(wxString *val) {
+    m_stringValue = val ;
+}
+
+
+CValidateEmailAddress::CValidateEmailAddress(const CValidateEmailAddress& val)
+    : wxValidator()
+{
+    Copy(val);
+}
+
+
+CValidateEmailAddress::~CValidateEmailAddress() {}
+
+
+bool CValidateEmailAddress::Copy(const CValidateEmailAddress& val) {
+    wxValidator::Copy(val);
+
+    m_stringValue = val.m_stringValue ;
+
+    return TRUE;
+}
+
+
+bool CValidateEmailAddress::Validate(wxWindow *parent) {
+    if(!CheckValidator())
+        return FALSE;
+
+    wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
+
+    if (!control->IsEnabled())
+        return TRUE;
+
+    bool ok = TRUE;
+    wxString val(control->GetValue().Trim().Trim(false));  // trim spaces before and after
+
+    // this regex should be the same as in the function
+    // is_valid_email_address() in html/inc/email.inc
+    wxRegEx reEmail(wxT("^([^@]+)@([^@\\.]+)\\.([^@]{2,})$"));
+
+    if (val.Length() == 0) {
+        ok = FALSE;
+        m_errormsg = _("Please specify an email address");
+    } else if (!reEmail.Matches(val)) {
+        ok = FALSE;
+        m_errormsg = _("Invalid email address; please enter a valid email address");
+    }
+
+    if (!ok) {
+        wxASSERT_MSG(!m_errormsg.empty(), _T("you forgot to set errormsg"));
+
+        m_validatorWindow->SetFocus();
+
+        wxString buf;
+        buf.Printf(m_errormsg, control->GetValue().c_str());
+
+        wxMessageBox(buf, _("Validation conflict"),
+            wxOK | wxICON_EXCLAMATION, parent
+        );
+    }
+
+    return ok;
+}
+
+
+bool CValidateEmailAddress::TransferToWindow(void) {
+    if(!CheckValidator())
+        return FALSE;
+    
+    if (!m_stringValue)
+        return TRUE;
+
+    wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
+    control->SetValue(* m_stringValue) ;
+
+    return TRUE;
+}
+
+
+bool CValidateEmailAddress::TransferFromWindow(void) {
+    if(!CheckValidator())
+        return FALSE;
+
+    if (!m_stringValue)
+        return TRUE;
+
+    wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
+    * m_stringValue = control->GetValue() ;
+
+    return TRUE;
+}
+
+
+bool CValidateEmailAddress::wxIsAlphaNumeric(const wxString& val) {
+    int i;
+    for (i = 0; i < (int)val.Length(); i++) {
+        if (!wxIsalnum(val[i]))
+            return FALSE;
+    }
+    return TRUE;
+}
+
+
+bool CValidateEmailAddress::CheckValidator() const {
+    wxCHECK_MSG(m_validatorWindow, FALSE,
+                    _T("No window associated with validator"));
+    wxCHECK_MSG(m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), FALSE,
+                    _T("wxTextValidator is only for wxTextCtrl's"));
+    wxCHECK_MSG(m_stringValue, FALSE,
+                    _T("No variable storage for validator"));
+
+    return TRUE;
+}

Added: branches/sarge-backports/boinc/debian/boinc-client.templates
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/debian/boinc-client.templates?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/debian/boinc-client.templates (added)
+++ branches/sarge-backports/boinc/debian/boinc-client.templates Fri Nov  3 14:53:44 2006
@@ -1,0 +1,13 @@
+Template: boinc-client/remove_boinc_dir
+Type: boolean
+Default: false
+_Description: Do you want to remove the BOINC data directory?
+ The BOINC data directory /var/lib/boinc-client contains the information to
+ which projects the BOINC core client is attached, the work unit cache and
+ several other data.  If you no longer need this data, this is your chance to
+ remove them.
+ .
+ If no longer have need of the data being stored in the BOINC data directory,
+ you should choose this option.  If you want to hold this data for another
+ time, or if you would rather handle this process manually, you should refuse
+ this option.

Added: branches/sarge-backports/boinc/debian/overrides/boinc-client
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/debian/overrides/boinc-client?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/debian/overrides/boinc-client (added)
+++ branches/sarge-backports/boinc/debian/overrides/boinc-client Fri Nov  3 14:53:44 2006
@@ -1,0 +1,1 @@
+boinc-client: no-debconf-config

Added: branches/sarge-backports/boinc/debian/po/POTFILES.in
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/debian/po/POTFILES.in?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/debian/po/POTFILES.in (added)
+++ branches/sarge-backports/boinc/debian/po/POTFILES.in Fri Nov  3 14:53:44 2006
@@ -1,0 +1,1 @@
+[type: gettext/rfc822deb] boinc-client.templates

Added: branches/sarge-backports/boinc/debian/po/fr.po
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/debian/po/fr.po?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/debian/po/fr.po (added)
+++ branches/sarge-backports/boinc/debian/po/fr.po Fri Nov  3 14:53:44 2006
@@ -1,0 +1,50 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the boinc package.
+# Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: boinc_5.4.11-2\n"
+"Report-Msgid-Bugs-To: pkg-boinc-devel at lists.alioth.debian.org\n"
+"POT-Creation-Date: 2006-09-02 12:10+0200\n"
+"PO-Revision-Date: 2006-10-11 21:49+0200\n"
+"Last-Translator: Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid "Do you want to remove the BOINC data directory?"
+msgstr "Faut-il supprimer le répertoire des données de BOINC ?"
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid ""
+"The BOINC data directory /var/lib/boinc-client contains the information to "
+"which projects the BOINC core client is attached, the work unit cache and "
+"several other data.  If you no longer need this data, this is your chance to "
+"remove them."
+msgstr ""
+"Le répertoire des données de BOINC (/var/lib/boinc-client) contient les "
+"informations sur les projets auxquels le client BOINC de base est attaché, "
+"le cache de l'unité de travail et de nombreuses autres informations. Si vous "
+"n'avez plus besoin de ces données, vous pouvez le supprimer."
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid ""
+"If no longer have need of the data being stored in the BOINC data directory, "
+"you should choose this option.  If you want to hold this data for another "
+"time, or if you would rather handle this process manually, you should refuse "
+"this option."
+msgstr ""
+"Choisissez cette option si vous n'avez plus besoin des informations stockées "
+"dans le répertoire des données de BOINC. Ne la choisissez pas si vous voulez "
+"conserver ces informations pour plus tard ou si vous voulez effectuer la "
+"maintenance vous-même."

Added: branches/sarge-backports/boinc/debian/po/templates.pot
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/sarge-backports/boinc/debian/po/templates.pot?rev=547&op=file
==============================================================================
--- branches/sarge-backports/boinc/debian/po/templates.pot (added)
+++ branches/sarge-backports/boinc/debian/po/templates.pot Fri Nov  3 14:53:44 2006
@@ -1,0 +1,43 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: pkg-boinc-devel at lists.alioth.debian.org\n"
+"POT-Creation-Date: 2006-09-02 12:10+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid "Do you want to remove the BOINC data directory?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid ""
+"The BOINC data directory /var/lib/boinc-client contains the information to "
+"which projects the BOINC core client is attached, the work unit cache and "
+"several other data.  If you no longer need this data, this is your chance to "
+"remove them."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../boinc-client.templates:1001
+msgid ""
+"If no longer have need of the data being stored in the BOINC data directory, "
+"you should choose this option.  If you want to hold this data for another "
+"time, or if you would rather handle this process manually, you should refuse "
+"this option."
+msgstr ""




More information about the pkg-boinc-commits mailing list