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

List:       kopete-devel
Subject:    [Kopete-devel] Path: bug with addContactWizzard
From:       Olivier Goffart <ogoffart () tiscalinet ! be>
Date:       2002-08-20 8:38:38
[Download RAW message or body]

Hi!

This patch correct two bug in addContactWizzard:  If the user clicks on the 
back button to return at step two, whether it adds or removes services and 
then that it push on next, the remove page appears nevertheless and the other 
appear two times

the second bug relate to IRC page, the function validateData had not been 
written. It was impossible to click on next

--
Olivier Goffart


["addcontacts.diff" (text/x-diff)]

? plugins/translator/translatorprefsbase.h
? plugins/translator/translatorprefsbase.cpp
Index: libkopete/ui/addwizardimpl.cpp
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/libkopete/ui/addwizardimpl.cpp,v
retrieving revision 1.23
diff -u -3 -d -p -r1.23 addwizardimpl.cpp
--- libkopete/ui/addwizardimpl.cpp	17 Aug 2002 19:33:54 -0000	1.23
+++ libkopete/ui/addwizardimpl.cpp	20 Aug 2002 08:12:02 -0000
@@ -142,6 +142,14 @@ void AddWizardImpl::next()
 {
 	if (currentPage() == page3)
 	{
+
+		for (AddContactPage *ePage = protocolPages.first(); ePage != 0; ePage = \
protocolPages.first()) +		{
+			protocolPages.remove(ePage);
+			if(ePage) delete ePage;
+		}
+
+
 		// We don't keep track of this pointer because it gets deleted when the wizard \
does (which is what we want)  for (ProtocolBoxItem *item = \
dynamic_cast<ProtocolBoxItem *>(protocolListView->firstChild()); item != 0; item = \
dynamic_cast<ProtocolBoxItem *>(item->itemBelow()))  {
Index: protocols/irc/ircaddcontactpage.cpp
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/protocols/irc/ircaddcontactpage.cpp,v
retrieving revision 1.10
diff -u -3 -d -p -r1.10 ircaddcontactpage.cpp
--- protocols/irc/ircaddcontactpage.cpp	3 Aug 2002 11:42:30 -0000	1.10
+++ protocols/irc/ircaddcontactpage.cpp	20 Aug 2002 08:12:09 -0000
@@ -52,6 +52,30 @@ void IRCAddContactPage::slotFinish()
 	plugin->addContact(currentGroup, server, name, ircdata->chkConnectNow->isChecked(), \
ircdata->chkJoinNow->isChecked());  }

+/** No descriptions */
+bool IRCAddContactPage::validateData()
+{
+	QString currentGroup = ircdata->cmbGroup->currentText();
+	if (currentGroup.isEmpty() == true)
+	{
+		KMessageBox::sorry(this, i18n("<qt>You need to have a buddy listed under a group. \
Please create a group first. You may do this by right clicking in the buddy list and \
selecting \"Add Group...\"</qt>"), i18n("You Must Select a Group")); +		return false;
+	}
+	QString server = ircdata->ircServer->text();
+	if (server.isEmpty() == true)
+	{
+		KMessageBox::sorry(this, i18n("<qt>You need to specify a server to connect \
to.</qt>"), i18n("You Must Specify a Server")); +		return false;
+	}
+	QString name = ircdata->addID->text();
+	if (name.isEmpty() == true)
+	{
+		KMessageBox::sorry(this, i18n("<qt>You need to specify a channel to join, or query \
to open.</qt>"), i18n("You Must Specify a Channel")); +		return false;
+	}
+  return true;
+}
+
 void IRCAddContactPage::connectNowClicked()
 {
 	if (ircdata->chkConnectNow->isChecked() == true)
@@ -71,4 +95,5 @@ void IRCAddContactPage::connectNowClicke
  * End:
  */
 // vim: set noet ts=4 sts=4 sw=4:
+

Index: protocols/irc/ircaddcontactpage.h
===================================================================
RCS file: /home/kde/kdenonbeta/kopete/protocols/irc/ircaddcontactpage.h,v
retrieving revision 1.4
diff -u -3 -d -p -r1.4 ircaddcontactpage.h
--- protocols/irc/ircaddcontactpage.h	2 Aug 2002 17:02:44 -0000	1.4
+++ protocols/irc/ircaddcontactpage.h	20 Aug 2002 08:12:09 -0000
@@ -23,6 +23,8 @@ public slots: // Public slots
   /** No descriptions */
   virtual void slotFinish();
 private slots:
+  /** No descriptions */
+  virtual bool validateData();
 	void connectNowClicked();
 };


_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel

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

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