Bug 75128 - Kopete forgets Display Name when going Back in Wizard
Summary: Kopete forgets Display Name when going Back in Wizard
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: 0.8.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 07:23 UTC by Rob Kaper
Modified: 2004-02-14 16:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Kaper 2004-02-13 07:23:40 UTC
Version:           0.8.0 (using KDE 3.2 BRANCH >= 20040204, compiled sources)
Compiler:          gcc version 3.3.2
OS:          Linux (i686) release 2.4.19

When going Back in the Add Contact Wizard to the Display Name / Groups, Kopete seems to remember the selected groups but the chosen Display Name is sadly forgotten.
Comment 1 Richard Smith 2004-02-14 15:35:46 UTC
I'm on it...
Comment 2 Richard Smith 2004-02-14 16:09:04 UTC
CVS commit by lilachaze: 

Two fixes to the AddContactWizard:
1) When going back to the page with display name, don't erase it
2) When going back to start, don't forget KAB contact and subsequently break
CCMAIL: 75128@bugs.kde.org


  M +4 -11     addcontactwizard.cpp   1.37


--- kdenetwork/kopete/kopete/addcontactwizard/addcontactwizard.cpp  #1.36:1.37
@@ -198,4 +198,7 @@ void AddContactWizard::slotAddresseeList
         // enable next if a valid addressee is selected
         setNextEnabled( selectAddressee, addressee ? addressee->isSelected() : false );
+
+        if ( KABC::AddresseeItem* i = static_cast<KABC::AddresseeItem *>( addressee ) )
+                mDisplayName->setText( i->addressee().realName() );
 }
 
@@ -352,5 +355,5 @@ void AddContactWizard::showPage( QWidget
         if ( page == intro )
         {
-                if ( chkAddressee->isChecked() ) // We must check this as we might be showing this page because the back button was pressed
+                if ( chkAddressee->isChecked() && addresseeListView->firstChild() == 0 ) // We must check this as we might be showing this page because the back button was pressed
                 {
                         // Get a reference to the address book
@@ -365,14 +368,4 @@ void AddContactWizard::showPage( QWidget
                 }
         }
-        if ( page == selectGroup )
-        {
-                if ( addresseeListView->isEnabled() )
-                {
-                        if ( KABC::AddresseeItem* i = static_cast<KABC::AddresseeItem *>( addresseeListView->selectedItem() ) )
-                                mDisplayName->setText( i->addressee().realName() );
-                        else
-                                mDisplayName->setText( QString::null );
-                }
-        }
         QWizard::showPage( page );
 }


Comment 3 Richard Smith 2004-02-14 16:09:34 UTC
CVS commit by lilachaze: 

Two fixes to the AddContactWizard: [BACKPORT]
1) When going back to the page with display name, don't erase it
2) When going back to start, don't forget KAB contact and subsequently break
CCMAIL: 75128-done@bugs.kde.org


  M +4 -11     addcontactwizard.cpp   1.36.2.1


--- kdenetwork/kopete/kopete/addcontactwizard/addcontactwizard.cpp  #1.36:1.36.2.1
@@ -198,4 +198,7 @@ void AddContactWizard::slotAddresseeList
         // enable next if a valid addressee is selected
         setNextEnabled( selectAddressee, addressee ? addressee->isSelected() : false );
+
+        if ( KABC::AddresseeItem* i = static_cast<KABC::AddresseeItem *>( addressee ) )
+                mDisplayName->setText( i->addressee().realName() );
 }
 
@@ -352,5 +355,5 @@ void AddContactWizard::showPage( QWidget
         if ( page == intro )
         {
-                if ( chkAddressee->isChecked() ) // We must check this as we might be showing this page because the back button was pressed
+                if ( chkAddressee->isChecked() && addresseeListView->firstChild() == 0 ) // We must check this as we might be showing this page because the back button was pressed
                 {
                         // Get a reference to the address book
@@ -365,14 +368,4 @@ void AddContactWizard::showPage( QWidget
                 }
         }
-        if ( page == selectGroup )
-        {
-                if ( addresseeListView->isEnabled() )
-                {
-                        if ( KABC::AddresseeItem* i = static_cast<KABC::AddresseeItem *>( addresseeListView->selectedItem() ) )
-                                mDisplayName->setText( i->addressee().realName() );
-                        else
-                                mDisplayName->setText( QString::null );
-                }
-        }
         QWizard::showPage( page );
 }