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

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete/ui
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2003-03-24 2:53:24
[Download RAW message or body]

CVS commit by brunes: 

Sort the members list by status weight as well as nickname. Default has \
higher wieghts at the top, so all protocols pls. make sure Online is \
weighted higher than offline, etc. This finally makes the Op / Voice icon \
handling in IRC work as in other clients.


  M +6 -1      chatview.cpp   1.222
  M +11 -14    chatview.h   1.102


--- kdenonbeta/kopete/libkopete/ui/chatview.cpp  #1.221:1.222
@@ -21,4 +21,5 @@
 #include <qcolor.h>
 #include <qregexp.h>
+#include <qheader.h>
 
 #include <dom/dom_doc.h>
@@ -379,6 +380,8 @@ void ChatView::createMembersList(void)
                 membersList = new KListView(this);
                 membersList->setAllColumnsShowFocus( true );
-                membersList->addColumn( QString::null, -1);
+                membersList->addColumn( QString::null, 16);
                 membersList->addColumn( i18n("Chat Members"), -1 );
+                membersList->header()->setResizeEnabled(false, 0);
+                membersList->setSorting( 0, true );
 
                 //Add the contacts that are in the message manager
@@ -1266,5 +1269,7 @@ void KopeteContactLVI::slotDisplayNameCh
 void KopeteContactLVI::slotStatusChanged()
 {
+        setText( 0, QChar( -m_view->msgManager()->contactOnlineStatus( \
                m_contact ).weight() ) );
         setPixmap( 0, m_view->msgManager()->contactOnlineStatus( m_contact \
).iconFor(m_contact) ); +        m_parentView->sort();
 }
 

--- kdenonbeta/kopete/libkopete/ui/chatview.h  #1.101:1.102
@@ -55,21 +55,18 @@ namespace Kopete
 {
 
-struct ChatViewPrivate;
-
-
 class KopeteContactLVI : public QObject, public KListViewItem
 {
         Q_OBJECT
 
-public:
+        public:
         KopeteContactLVI( KopeteView *view, const KopeteContact *contact, \
                KListView *parent );
-        const KopeteContact *contact() { return m_contact; }
+                const KopeteContact *contact() const { return m_contact; }
 
-private:
+        private:
         const KopeteContact *m_contact;
         KListView *m_parentView;
         KopeteView *m_view;
 
-private slots:
+        private slots:
         void slotDisplayNameChanged(const QString &, const QString&);
         void slotStatusChanged();


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

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