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

List:       kmail-devel
Subject:    [PATCH] fixes for new ConfigureDialog: PGP tab layout, transports problem
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2001-11-30 14:45:22
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

A small patch relative to the big configuredialog.cpp one:

- - fix OpenPGP page layout
- - fix saving of transports (off by one error in ::apply()) that lead to 
duplicate entires in the Sending tab's listview.
- - minor code prettification

- --- configuredialog.cpp.orig    Fri Nov 30 13:45:32 2001
+++ configuredialog.cpp Fri Nov 30 17:07:56 2001
@@ -1216,7 +1217,7 @@

 void NetworkPage::SendingTab::slotTransportUp()
 {
- -  QListViewItem *item = mTransportList->currentItem();
+  QListViewItem *item = mTransportList->selectedItem();
   if ( !item ) return;
   QListViewItem *above = item->itemAbove();
   if ( !above ) return;
@@ -1254,10 +1255,10 @@

 void NetworkPage::SendingTab::slotTransportDown()
 {
- -  QListViewItem *item = mTransportList->currentItem();
- -  if (!item) return;
- -  QListViewItem *below = item->itemBelow();
- -  if (!below) return;
+  QListViewItem * item = mTransportList->selectedItem();
+  if ( !item ) return;
+  QListViewItem * below = item->itemBelow();
+  if ( !below ) return;

   KMTransportInfo *ti, *ti2 = NULL;
   int i = 0;
@@ -1301,9 +1302,7 @@
     ti->readConfig(i);
     mTransportInfoList.append( ti );
     transportNames << ti->name;
- -    QListViewItem *listItem =
- -      new QListViewItem( mTransportList, top, ti->name, ti->type );
- -    top = listItem;
+    top = new QListViewItem( mTransportList, top, ti->name, ti->type );
   }
   emit transportListChanged( transportNames );

@@ -1337,7 +1336,7 @@
   // Save transports:
   general.writeEntry( "transports", mTransportInfoList.count() );
   QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
- -  for ( int i = 0 ; it.current() ; ++it, ++i )
+  for ( int i = 1 ; it.current() ; ++it, ++i )
     (*it)->writeConfig(i);

   // Save common options:
@@ -3093,7 +3092,10 @@
   // "PGP" tab:
   //
   mPgpTab = new Kpgp::Config();
- -  KDialog::resizeLayout( mPgpTab, 0, KDialog::spacingHint() ); // just 
in case
+  if ( mPgpTab->layout() ) {
+    mPgpTab->layout()->setSpacing( KDialog::spacingHint() );
+    mPgpTab->layout()->setMargin( KDialog::marginHint() );
+  }
   addTab( mPgpTab, i18n("Open&PGP") );
 }



Marc

- -- 
We have once again come full circle on the same basic question of
privacy on the Internet. If you have privacy, so does the person
sending around terrorist documents. And of course, we wouldn't want
that now, would we? [...] But what if governments, concerned about
mounting public pressure, decided to label protesters at the next WTO
roundtable, World Bank meeting, or G-8 summit as terrorists?
                  -- John Horvath: The Internet: A Terrorist Network?
                     Telepolis 2001/08/22 (#9350)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8B7iq3oWD+L2/6DgRAujLAKCyaJIqFNOZn2HhQ4LhWXloicXuJQCeOT1G
EPlfi8G0zF5bt7vXwqSLS6E=
=w6Pa
-----END PGP SIGNATURE-----

_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

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

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