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

List:       licq-cvs
Subject:    [Licq-cvs] qt-gui/src
From:       Thomas Reitelbach <dreamforce2 () users ! sourceforge ! net>
Date:       2003-05-25 14:44:29
[Download RAW message or body]

Update of /cvsroot/licq/qt-gui/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5262

Modified Files:
	mainwin.cpp mainwin.h userbox.cpp userbox.h 
Log Message:
- fix bug 720836, sort by alias mixed up online and offline users with non-threaded view.
- "save settings" now saves the column and order for sorting, qt-gui restores these settings on startup.


Index: mainwin.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -d -r1.286 -r1.287
--- mainwin.cpp	18 May 2003 15:43:14 -0000	1.286
+++ mainwin.cpp	25 May 2003 14:44:26 -0000	1.287
@@ -341,6 +341,8 @@
   licqConf.ReadBool("AlwaysShowONU", m_bAlwaysShowONU, true);
   licqConf.ReadBool("ShowDividers", m_bShowDividers, true);
   licqConf.ReadNum("SortByStatus", m_nSortByStatus, 1);
+  licqConf.ReadNum("SortColumn", m_nSortColumn, 0);
+  licqConf.ReadBool("SortColumnAscending", m_bSortColumnAscending, true);
   licqConf.ReadBool("ShowGroupIfNoMsg", m_bShowGroupIfNoMsg, true);
   licqConf.ReadBool("BoldOnMsg", m_bBoldOnMsg, true);
   licqConf.ReadBool("ManualNewUser", m_bManualNewUser, false);
@@ -3007,6 +3009,8 @@
   licqConf.WriteBool("ShowHeader", m_bShowHeader);
   licqConf.WriteBool("ShowDividers", m_bShowDividers);
   licqConf.WriteNum("SortByStatus", m_nSortByStatus);
+  licqConf.WriteNum("SortColumn", m_nSortColumn);
+  licqConf.WriteBool("SortColumnAscending", m_bSortColumnAscending);
   licqConf.WriteBool("ShowGroupIfNoMsg", m_bShowGroupIfNoMsg);
   licqConf.WriteBool("UseThreadView", m_bThreadView);
   licqConf.WriteNum("TVGroupStates", m_nGroupStates);

Index: mainwin.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- mainwin.h	27 Apr 2003 16:44:31 -0000	1.108
+++ mainwin.h	25 May 2003 14:44:26 -0000	1.109
@@ -134,7 +134,8 @@
        m_bPopOnlineSince,
        m_bPopIdleTime,
        m_bShowAllEncodings,
-       m_bTabbedChatting;
+       m_bTabbedChatting,
+       m_bSortColumnAscending;
 
   QString m_MsgAutopopupKey;
   QString m_DefaultEncoding;
@@ -144,7 +145,8 @@
   CSkin *skin;
 
   unsigned long m_nCurrentGroup, m_nGroupStates;
-  unsigned short m_nSortByStatus;
+  unsigned short m_nSortByStatus,
+                 m_nSortColumn;
   GroupType m_nGroupType;
   QString usprintfHelp;
 

Index: userbox.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/userbox.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- userbox.cpp	19 Apr 2003 01:44:49 -0000	1.144
+++ userbox.cpp	25 May 2003 14:44:26 -0000	1.145
@@ -794,7 +794,7 @@
   if (column == 0)
     return (m_sPrefix + m_sSortKey + text(1).lower());
   else
-    return(QListViewItem::key(column, ascending).lower());
+    return (m_sPrefix + QListViewItem::key(column, ascending).lower());
 }
 
 UserFloatyList* CUserView::floaties = 0;
@@ -834,7 +834,7 @@
 #endif
   setAllColumnsShowFocus(true);
   setTreeStepSize(0);
-  setSorting(0);
+  setSorting(gMainWindow->m_nSortColumn, gMainWindow->m_bSortColumnAscending);
   setVScrollBarMode(gMainWindow->m_bScrollBar ? Auto : AlwaysOff);
 
   if (parent != NULL)
@@ -1582,4 +1582,11 @@
 
     tip(r, s);
   }
+}
+
+void CUserView::setSorting( int column, bool ascending)
+{
+  gMainWindow->m_nSortColumn = column;
+  gMainWindow->m_bSortColumnAscending = ascending;
+  QListView::setSorting( column, ascending );
 }

Index: userbox.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/userbox.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- userbox.h	19 Apr 2003 01:44:49 -0000	1.50
+++ userbox.h	25 May 2003 14:44:26 -0000	1.51
@@ -148,6 +148,7 @@
   static CUserView *FindFloaty(const char *, unsigned long);
 #endif
   static void UpdateFloaties();
+  virtual void setSorting( int column, bool ascending = true);
 
 protected:
   int m_nFlashCounter;



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Licq-cvs mailing list
Licq-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/licq-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

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