Index: mainwin.h
===================================================================
--- mainwin.h	(revision 4798)
+++ mainwin.h	(working copy)
@@ -165,6 +165,7 @@
        m_chatVertSpacing,
        m_chatAppendLineBreak,
        m_histVertSpacing,
+       m_histReversing,
        m_bFlashTaskbar,
        m_bMainWinSticky,
        m_bMsgWinSticky,
Index: userinfodlg.cpp
===================================================================
--- userinfodlg.cpp	(revision 4798)
+++ userinfodlg.cpp	(working copy)
@@ -1721,7 +1721,7 @@
 
   chkHistoryReverse = new QCheckBox(tr("Rever&se"), p);
   connect(chkHistoryReverse, SIGNAL(toggled(bool)), SLOT(HistoryReverse(bool)));
-  chkHistoryReverse->setChecked(m_bHistoryReverse = true);
+  chkHistoryReverse->setChecked(mainwin->m_histReversing);
   chkHistoryReverse->setFixedSize(chkHistoryReverse->sizeHint());
   l->addWidget(chkHistoryReverse);
 
Index: optionsdlg.cpp
===================================================================
--- optionsdlg.cpp	(revision 4798)
+++ optionsdlg.cpp	(working copy)
@@ -218,6 +218,7 @@
   cmbChatStyle->setCurrentItem(mainwin->m_chatMsgStyle);
   cmbHistStyle->setCurrentItem(mainwin->m_histMsgStyle);
   chkHistVertSpacing->setChecked(mainwin->m_histVertSpacing);
+  chkHistReversing->setChecked(mainwin->m_histReversing);
   cmbHistDateFormat->lineEdit()->setText(mainwin->m_histDateFormat);
   btnColorRcv->setPaletteBackgroundColor(mainwin->m_colorRcv);
   btnColorSnt->setPaletteBackgroundColor(mainwin->m_colorSnt);
@@ -522,6 +523,7 @@
   mainwin->m_chatDateFormat = cmbChatDateFormat->currentText();
   mainwin->m_histMsgStyle = cmbHistStyle->currentItem();
   mainwin->m_histVertSpacing = chkHistVertSpacing->isChecked();
+  mainwin->m_histReversing = chkHistReversing->isChecked();
   mainwin->m_histDateFormat = cmbHistDateFormat->currentText();
   mainwin->m_colorRcv = btnColorRcv->paletteBackgroundColor();
   mainwin->m_colorSnt = btnColorSnt->paletteBackgroundColor();
@@ -1639,6 +1641,10 @@
   connect(chkHistVertSpacing, SIGNAL(toggled(bool)), this, SLOT(slot_refresh_msgViewer()));
   QWhatsThis::add(chkHistVertSpacing, tr("Insert extra space between messages."));
 
+  chkHistReversing = new QCheckBox(tr("Reversed"), boxHistOptions);
+  connect(chkHistReversing, SIGNAL(toggled(bool)), this, SLOT(slot_refresh_msgViewer()));
+  QWhatsThis::add(chkHistReversing, tr("Display history in reversed order."));
+
   QLabel* lblHistDateFormat = new QLabel(tr("Date Format:"), boxHistOptions);
   cmbHistDateFormat = new QComboBox(true, boxHistOptions);
   for(int i = 0; i < dateFormatsLength; ++i)
@@ -1739,6 +1745,7 @@
   msgChatViewer->clear();
   msgHistViewer->clear();
 
+  /* FIXME History pane must honour reversing option */
   QDateTime msgDate = date;
   for (unsigned int i = 0; i<7; i++)
   {
Index: mainwin.cpp
===================================================================
--- mainwin.cpp	(revision 4798)
+++ mainwin.cpp	(working copy)
@@ -446,6 +446,7 @@
   m_chatDateFormat = QString::fromLatin1(szTemp);
   licqConf.ReadNum("HistoryMessageStyle", m_histMsgStyle, 0);
   licqConf.ReadBool("HistoryVerticalSpacing", m_histVertSpacing, true);
+  licqConf.ReadBool("HistoryReversing", m_histReversing, true);
   licqConf.ReadStr("HistoryDateFormat", szTemp, "yyyy-MM-dd hh:mm:ss");
   m_histDateFormat = QString::fromLatin1(szTemp);
 
@@ -3597,6 +3598,7 @@
   licqConf.WriteStr("DateFormat", m_chatDateFormat.latin1());
   licqConf.WriteNum("HistoryMessageStyle", m_histMsgStyle);
   licqConf.WriteBool("HistoryVerticalSpacing", m_histVertSpacing);
+  licqConf.WriteBool("HistoryReversing", m_histReversing);
   licqConf.WriteStr("HistoryDateFormat", m_histDateFormat.latin1());
 
   licqConf.WriteBool("showPopPicture", m_bPopPicture);
Index: optionsdlg.h
===================================================================
--- optionsdlg.h	(revision 4798)
+++ optionsdlg.h	(working copy)
@@ -168,6 +168,7 @@
   QCheckBox *chkChatLineBreak;
   QComboBox *cmbHistStyle;
   QCheckBox *chkHistVertSpacing;
+  QCheckBox *chkHistReversing;
   QComboBox *cmbHistDateFormat;
    CColorOption *btnColorRcv;
    CColorOption *btnColorSnt;
