Changeset 3525

Show
Ignore:
Timestamp:
05/25/03 23:44:26 (5 years ago)
Author:
dreamforce2
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.

Location:
trunk/qt-gui/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/mainwin.cpp

    r3510 r3525  
    342342  licqConf.ReadBool("ShowDividers", m_bShowDividers, true); 
    343343  licqConf.ReadNum("SortByStatus", m_nSortByStatus, 1); 
     344  licqConf.ReadNum("SortColumn", m_nSortColumn, 0); 
     345  licqConf.ReadBool("SortColumnAscending", m_bSortColumnAscending, true); 
    344346  licqConf.ReadBool("ShowGroupIfNoMsg", m_bShowGroupIfNoMsg, true); 
    345347  licqConf.ReadBool("BoldOnMsg", m_bBoldOnMsg, true); 
     
    30083010  licqConf.WriteBool("ShowDividers", m_bShowDividers); 
    30093011  licqConf.WriteNum("SortByStatus", m_nSortByStatus); 
     3012  licqConf.WriteNum("SortColumn", m_nSortColumn); 
     3013  licqConf.WriteBool("SortColumnAscending", m_bSortColumnAscending); 
    30103014  licqConf.WriteBool("ShowGroupIfNoMsg", m_bShowGroupIfNoMsg); 
    30113015  licqConf.WriteBool("UseThreadView", m_bThreadView); 
  • trunk/qt-gui/src/mainwin.h

    r3462 r3525  
    135135       m_bPopIdleTime, 
    136136       m_bShowAllEncodings, 
    137        m_bTabbedChatting; 
     137       m_bTabbedChatting, 
     138       m_bSortColumnAscending; 
    138139 
    139140  QString m_MsgAutopopupKey; 
     
    145146 
    146147  unsigned long m_nCurrentGroup, m_nGroupStates; 
    147   unsigned short m_nSortByStatus; 
     148  unsigned short m_nSortByStatus, 
     149                 m_nSortColumn; 
    148150  GroupType m_nGroupType; 
    149151  QString usprintfHelp; 
  • trunk/qt-gui/src/userbox.cpp

    r3449 r3525  
    795795    return (m_sPrefix + m_sSortKey + text(1).lower()); 
    796796  else 
    797     return(QListViewItem::key(column, ascending).lower()); 
     797    return (m_sPrefix + QListViewItem::key(column, ascending).lower()); 
    798798} 
    799799 
     
    835835  setAllColumnsShowFocus(true); 
    836836  setTreeStepSize(0); 
    837   setSorting(0); 
     837  setSorting(gMainWindow->m_nSortColumn, gMainWindow->m_bSortColumnAscending); 
    838838  setVScrollBarMode(gMainWindow->m_bScrollBar ? Auto : AlwaysOff); 
    839839 
     
    15841584  } 
    15851585} 
     1586 
     1587void CUserView::setSorting( int column, bool ascending) 
     1588{ 
     1589  gMainWindow->m_nSortColumn = column; 
     1590  gMainWindow->m_bSortColumnAscending = ascending; 
     1591  QListView::setSorting( column, ascending ); 
     1592} 
  • trunk/qt-gui/src/userbox.h

    r3449 r3525  
    149149#endif 
    150150  static void UpdateFloaties(); 
     151  virtual void setSorting( int column, bool ascending = true); 
    151152 
    152153protected: