[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/certmanager/lib/ui
From:       Dirk Mueller <mueller () kde ! org>
Date:       2007-08-23 15:46:32
Message-ID: 1187883992.315991.2596.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 703908 by mueller:

fix dialog sizing (bnc:301677)


 M  +15 -11    keyselectiondialog.cpp  


--- branches/KDE/3.5/kdepim/certmanager/lib/ui/keyselectiondialog.cpp #703907:703908
@@ -332,23 +332,17 @@
   if ( mKeyUsage & SMIMEKeys )
     mSMIMEBackend = Kleo::CryptoBackendFactory::instance()->smime();
 
-  QSize dialogSize( 580, 400 );
-  if ( kapp ) {
-    KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
-
-    KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" );
-    dialogSize = dialogConfig.readSizeEntry( "Dialog size", &dialogSize );
-  }
-  resize( dialogSize );
-
   mCheckSelectionTimer = new QTimer( this );
   mStartSearchTimer = new QTimer( this );
 
   QFrame *page = makeMainWidget();
   QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
 
-  if ( !text.isEmpty() )
-    topLayout->addWidget( new QLabel( text, page ) );
+  if ( !text.isEmpty() ) {
+    QLabel* textLabel = new QLabel( text, page );
+    textLabel->setAlignment( textLabel->alignment() | Qt::WordBreak );
+    topLayout->addWidget( textLabel );
+  }
 
   QHBoxLayout * hlay = new QHBoxLayout( topLayout ); // inherits spacing
   QLineEdit * le = new QLineEdit( page );
@@ -401,6 +395,16 @@
            this, SLOT(slotRereadKeys()) );
 
   slotRereadKeys();
+  topLayout->activate();
+
+  if ( kapp ) {
+    KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
+    QSize dialogSize( sizeHint() );
+
+    KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" );
+    dialogSize = dialogConfig.readSizeEntry( "Dialog size", &dialogSize );
+    resize( dialogSize );
+  }
 }
 
 Kleo::KeySelectionDialog::~KeySelectionDialog() {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic