Mailinglist Archive: yast-commit (815 mails)

< Previous Next >
[yast-commit] r40079 - in /trunk/qt: VERSION package/yast2-qt.changes src/pkg/YQPkgTextDialog.cc src/pkg/YQPkgTextDialog.h
  • From: kmachalkova@xxxxxxxxxxxxxxxx
  • Date: Wed, 08 Aug 2007 08:25:26 -0000
  • Message-id: <20070808082526.F3CE4CDFC5@xxxxxxxxxxxxxxxx>
Author: kmachalkova
Date: Wed Aug  8 10:25:26 2007
New Revision: 40079

URL: http://svn.opensuse.org/viewcvs/yast?rev=40079&view=rev
Log:
Added text referring to whereabouts of the license text to
license agreement popup (FaTE #302018)

Modified:
    trunk/qt/VERSION
    trunk/qt/package/yast2-qt.changes
    trunk/qt/src/pkg/YQPkgTextDialog.cc
    trunk/qt/src/pkg/YQPkgTextDialog.h

Modified: trunk/qt/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/VERSION?rev=40079&r1=40078&r2=40079&view=diff
==============================================================================
--- trunk/qt/VERSION (original)
+++ trunk/qt/VERSION Wed Aug  8 10:25:26 2007
@@ -1 +1 @@
-2.15.9
+2.15.10

Modified: trunk/qt/package/yast2-qt.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=40079&r1=40078&r2=40079&view=diff
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Wed Aug  8 10:25:26 2007
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Aug  8 09:27:30 CEST 2007 - kmachalkova@xxxxxxx
+
+- Added text referring to whereabouts of the license text to 
+  license agreement popup (FaTE #302018) 
+- V 2.15.10
+
+-------------------------------------------------------------------
 Fri Aug  3 12:42:01 CEST 2007 - sh@xxxxxxx
 
 - Fixed bug #295485: Text cut off in MultiSelectionBox

Modified: trunk/qt/src/pkg/YQPkgTextDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/pkg/YQPkgTextDialog.cc?rev=40079&r1=40078&r2=40079&view=diff
==============================================================================
--- trunk/qt/src/pkg/YQPkgTextDialog.cc (original)
+++ trunk/qt/src/pkg/YQPkgTextDialog.cc Wed Aug  8 10:25:26 2007
@@ -52,10 +52,11 @@
 YQPkgTextDialog::YQPkgTextDialog( const QString &  text,
                                  QWidget *             parent,
                                  const QString &   acceptButtonLabel,
-                                 const QString &   rejectButtonLabel )
+                                 const QString &   rejectButtonLabel,
+                                 const QString &   printLicenseText )
     : QDialog( parent )
 {
-    buildDialog( text, parent, acceptButtonLabel, rejectButtonLabel );
+    buildDialog( text, parent, acceptButtonLabel, rejectButtonLabel, printLicenseText );
 }
 
 
@@ -68,7 +69,8 @@
 void YQPkgTextDialog::buildDialog( const QString &         text,
                                   QWidget *            parent,
                                   const QString &  acceptButtonLabel,
-                                  const QString &  rejectButtonLabel )
+                                  const QString &  rejectButtonLabel,
+                                  const QString &  printLicenseText )
 {
     // Enable dialog resizing even without window manager
     setSizeGripEnabled( true );
@@ -92,6 +94,14 @@
     _textBrowser->setTextFormat( Qt::RichText );
     _textBrowser->installEventFilter( this );
 
+    if ( ! printLicenseText.isEmpty() )
+    {
+       QLabel * printLabel = new QLabel( printLicenseText, this);
+       CHECK_PTR( printLabel);
+        printLabel->setAlignment( AlignHCenter );
+       layout->addWidget( printLabel );
+//     layout->addSpacing(8);
+    }
 
     // Button box
 
@@ -210,12 +220,14 @@
 bool YQPkgTextDialog::confirmText( QWidget *           parent,
                                   const QString &  text,
                                   const QString &  acceptButtonLabel,
-                                  const QString &  rejectButtonLabel )
+                                  const QString &  rejectButtonLabel,
+                                  const QString &  printLicenseText )
 {
     YQPkgTextDialog * dia = new YQPkgTextDialog( text,
                                                 parent,
                                                 acceptButtonLabel,
-                                                rejectButtonLabel );
+                                                rejectButtonLabel,
+                                                printLicenseText );
     CHECK_PTR( dia );
     bool confirmed = ( dia->exec() == QDialog::Accepted );
     delete dia;
@@ -226,8 +238,9 @@
 
 bool YQPkgTextDialog::confirmText( QWidget * parent, const QString & text )
 {
+    const QString printText = _("If you would like to print this license, check the EULA.txt file on the first media");
     // Translators: "Accept" here refers to licenses or similar
-    return confirmText( parent, text, _( "&Accept" ), _( "&Cancel" ) );
+    return confirmText( parent, text, _( "&Accept" ), _( "&Cancel" ), printText );
 }
 
 

Modified: trunk/qt/src/pkg/YQPkgTextDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/pkg/YQPkgTextDialog.h?rev=40079&r1=40078&r2=40079&view=diff
==============================================================================
--- trunk/qt/src/pkg/YQPkgTextDialog.h (original)
+++ trunk/qt/src/pkg/YQPkgTextDialog.h Wed Aug  8 10:25:26 2007
@@ -23,8 +23,10 @@
 
 #include "YQZypp.h"
 #include <qdialog.h>
+#include <qlabel.h>
 #include <zypp/ResObject.h>
 
+class QLabel;
 class QPushButton;
 class QTextBrowser;
 
@@ -52,7 +54,8 @@
     YQPkgTextDialog( const QString &       text,
                     QWidget *          parent,
                     const QString &        acceptButtonLabel,
-                    const QString &        rejectButtonLabel );
+                    const QString &        rejectButtonLabel,
+                    const QString &        printLicenseText = "" );
     /**
      * Constructor.
      *
@@ -93,7 +96,8 @@
     static bool confirmText( QWidget *         parent,
                             const QString &        text,
                             const QString &        acceptButtonLabel,
-                            const QString &        rejectButtonLabel );
+                            const QString &        rejectButtonLabel,
+                            const QString &        printLicenseText );
 
     /**
      * Let the use confirm a text with buttons "Accept" and "Cancel".
@@ -162,7 +166,8 @@
     void buildDialog( const QString &      text,
                      QWidget *         parent,
                      const QString &       acceptButtonLabel,
-                     const QString &       rejectButtonLabel = "" );
+                     const QString &       rejectButtonLabel = "",
+                     const QString &   printLicenseText = "" );
     /**
      * Grab [Return] press events and close dialog.
      * Inherited from QObject.

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages