[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/libkopete/ui
From: Daniel Molkentin <molkentin () kde ! org>
Date: 2002-12-08 13:41:14
[Download RAW message or body]
CVS commit by danimo:
Ok, hopefully fixed renaming and unified it (rmb menu won't pop up a box anymore)
M +0 -12 kopetecontactlistview.cpp 1.57
M +0 -1 kopetecontactlistview.h 1.33
M +11 -9 kopetemetacontactlvi.cpp 1.71
M +4 -0 kopetemetacontactlvi.h 1.34
--- kdenonbeta/kopete/libkopete/ui/kopetecontactlistview.cpp 1.57:
@@ -114,7 +114,4 @@ KopeteContactListView::KopeteContactList
this, SLOT (slotOnItem(QListViewItem *) ));
- connect( this, SIGNAL ( itemRenamed(QListViewItem*, int, const QString&) ),
- this, SLOT(slotRenameContact(QListViewItem*, int, const QString&) ) );
-
addColumn( i18n("Contacts") );
@@ -159,13 +156,4 @@ KopeteContactListView::KopeteContactList
KopeteContactListView::~KopeteContactListView()
{
-}
-
-void KopeteContactListView::slotRenameContact(QListViewItem* item, int, const QString& newName)
-{
- KopeteMetaContactLVI* lvi = static_cast<KopeteMetaContactLVI*>(item);
- if (lvi)
- {
- lvi->rename(newName);
- }
}
--- kdenonbeta/kopete/libkopete/ui/kopetecontactlistview.h 1.33:
@@ -90,5 +90,4 @@ private slots:
void slotShowOffline( bool );
- void slotRenameContact(QListViewItem* item, int, const QString& newName);
void slotAddedToGroup( KopeteGroup *to,KopeteMetaContact *mc );
void slotRemovedFromGroup( KopeteGroup *from, KopeteMetaContact *mc );
--- kdenonbeta/kopete/libkopete/ui/kopetemetacontactlvi.cpp 1.71:
@@ -167,4 +167,5 @@ void KopeteMetaContactLVI::rename(const
{
m_metaContact->setDisplayName( newName );
+ kdDebug() << "Set new contact name to " << newName << endl;
}
@@ -336,14 +337,15 @@ void KopeteMetaContactLVI::slotRemoveFro
void KopeteMetaContactLVI::slotRename()
{
- bool ok;
- QString newName = KLineEditDlg::getText(
- i18n( "Rename - Kopete" ),
- i18n( "Please enter the new name for the user" ),
- m_metaContact->displayName(), &ok );
- if( ok )
- {
- emit rename( newName );
+ setRenameEnabled(0, true);
+ startRename(0);
}
+
+void KopeteMetaContactLVI::okRename(int col)
+{
+ KListViewItem::okRename(col);
+ emit rename(text(col));
+ setRenameEnabled(col, false); // Yeah, that's on purpose...
}
+
void KopeteMetaContactLVI::slotMoveToGroup()
--- kdenonbeta/kopete/libkopete/ui/kopetemetacontactlvi.h 1.34:
@@ -130,4 +130,8 @@ private slots:
void slotAddDialogOkClicked();
+protected:
+ virtual void okRename(int col);
+
+
private:
void initLVI();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic