-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hello list
a set of incremental patches that affect the qt-gui's history.
The comments of the patches at the begining of each file:
0_edithistory.diff
D: Removes unused slot.
D:
1_reloadhistory.diff
D: ReloadHistory() was dead code. I think that this happened because
D: UserInfoDlg has only two buttons.
D: I binded the accelerators F5 and CTRL+U to this function.
D: Sometimes is nice to have it
2_enabled.diff
D: Controls enabled mode of the history's Next and Prev.
D:
D: One note: Displaying Prev enabled when filtering something
D: that returns 0 matches is not a bug.
D:
- --
Buenos Aires, Argentina
-----BEGIN PGP SIGNATURE-----
iD8DBQE9xvu4UMlRieHkprgRAiOVAJ9a3FaHQrDCvQ9O9DRVUi/465SkVACdEkwq
LYcNSm6UR1TFyL7qJiUAqfQ=
=3IZd
-----END PGP SIGNATURE-----
D: Removes unused slot.
D:
diff -u -d -p -r1.57 userinfodlg.cpp
--- plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 04:51:56 -0000 1.57
+++ plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 22:14:59 -0000
@@ -1012,17 +1012,6 @@ void UserInfoDlg::HistoryReload()
SetupHistory();
}
-void UserInfoDlg::HistoryEdit()
-{
- ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R);
- if (u == NULL) return;
-
- (void) new EditFileDlg(u->HistoryFile());
-
- gUserManager.DropUser(u);
-}
-
-
void UserInfoDlg::HistoryReverse(bool newVal)
{
if (chkHistoryReverse->isChecked() != newVal)
Index: plugins/qt-gui/src/userinfodlg.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/userinfodlg.h,v
retrieving revision 1.17
diff -u -d -p -r1.17 userinfodlg.h
--- plugins/qt-gui/src/userinfodlg.h 21 Aug 2002 00:06:56 -0000 1.17
+++ plugins/qt-gui/src/userinfodlg.h 4 Nov 2002 22:14:59 -0000
@@ -131,7 +131,7 @@ protected:
HistoryListIter m_iHistoryEIter;
bool m_bHistoryReverse;
unsigned short m_nHistoryIndex, m_nHistoryShowing;
- QPushButton *btnHistoryReload, *btnHistoryEdit;
+ QPushButton *btnHistoryReload;
void SetGeneralInfo(ICQUser *);
void SetMoreInfo(ICQUser *);
@@ -151,7 +151,6 @@ protected slots:
void ShowHistoryNext();
void HistoryReverse(bool);
void HistoryReload();
- void HistoryEdit();
void updateTab(const QString&);
void updatedUser(CICQSignal*);
void SaveSettings();
-----BEGIN PGP SIGNATURE-----
iD8DBQA9xvtZUMlRieHkprgRAgSlAKCyM7fvUBEps8X0sLfVbNhF18i9/ACfcwqI
G6dRS4wBijQqDKgeHmWIuME=
=z49k
-----END PGP SIGNATURE-----
D: ReloadHistory() was dead code. I think that this happened because UserInfoDlg
D: has only two buttons.
D: I binded the accelerators F5 and CTRL+U to this function.
D: Sometimes is nice to have it
diff -u plugins/qt-gui/src/userinfodlg.cpp plugins/qt-gui/src/userinfodlg.cpp
--- plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 22:14:59 -0000
+++ plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 22:18:56 -0000
@@ -36,6 +36,7 @@
#include <qprogressbar.h>
#include <qapplication.h>
#include <qtextcodec.h>
+#include <qaccel.h>
#include "licq_countrycodes.h"
#include "licq_events.h"
@@ -969,6 +970,12 @@
connect(lneFilter, SIGNAL(textChanged(const QString&)), this, SLOT(ShowHistory()));
barFiltering = new QProgressBar(p);
l->addWidget(barFiltering, 1);
+
+ QAccel *a = new QAccel( p );
+ a->connectItem(a->insertItem(Key_U + CTRL), this,
+ SLOT(HistoryReload()));
+ a->connectItem(a->insertItem(Key_F5 ), this,
+ SLOT(HistoryReload()));
}
void UserInfoDlg::SetupHistory()
@@ -1005,7 +1012,6 @@
// -----------------------------------------------------------------------------
-
void UserInfoDlg::HistoryReload()
{
ICQUser::ClearHistory(m_lHistoryList);
diff -u plugins/qt-gui/src/userinfodlg.h plugins/qt-gui/src/userinfodlg.h
--- plugins/qt-gui/src/userinfodlg.h 4 Nov 2002 22:14:59 -0000
+++ plugins/qt-gui/src/userinfodlg.h 4 Nov 2002 22:18:57 -0000
@@ -131,7 +131,6 @@
HistoryListIter m_iHistoryEIter;
bool m_bHistoryReverse;
unsigned short m_nHistoryIndex, m_nHistoryShowing;
- QPushButton *btnHistoryReload;
void SetGeneralInfo(ICQUser *);
void SetMoreInfo(ICQUser *);
-----BEGIN PGP SIGNATURE-----
iD8DBQA9xvthUMlRieHkprgRAnsSAJ9QR6BNNvmXfRyI3vgrPCbtJLZHFACfXoEu
cNlwJj5HjSiEtUBFpkU+geM=
=qCH/
-----END PGP SIGNATURE-----
D:
D: Controls enabled mode of the history's Next and Prev.
D:
D: One note: Displaying Prev enabled when filtering something that returns
D: 0 matches is not a bug.
D:
diff -u plugins/qt-gui/src/userinfodlg.cpp plugins/qt-gui/src/userinfodlg.cpp
--- plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 22:18:56 -0000
+++ plugins/qt-gui/src/userinfodlg.cpp 4 Nov 2002 22:38:01 -0000
@@ -1008,6 +1008,9 @@
ShowHistory();
}
gUserManager.DropUser(u);
+
+ btnMain2->setEnabled( m_nHistoryIndex - m_nHistoryShowing != 0 );
+ btnMain3->setEnabled( false );
}
// -----------------------------------------------------------------------------
@@ -1042,7 +1045,10 @@
m_iHistorySIter--;
}
ShowHistory();
+ btnMain2->setEnabled( m_iHistorySIter != m_lHistoryList.begin() );
+ btnMain3->setEnabled( true );
}
+
}
void UserInfoDlg::ShowHistoryNext()
@@ -1058,6 +1064,8 @@
m_nHistoryIndex++;
}
ShowHistory();
+ btnMain3->setEnabled( m_iHistoryEIter != m_lHistoryList.end() );
+ btnMain2->setEnabled( true );
}
}
@@ -1255,8 +1263,8 @@
{
btnMain3->setText(tr("Nex&t"));
btnMain2->setText(tr("P&rev"));
- btnMain3->setEnabled(true);
- btnMain2->setEnabled(true);
+ btnMain3->setEnabled(false);
+ btnMain2->setEnabled(false);
currentTab = HistoryInfo;
if (!tabList[HistoryInfo].loaded)
SetupHistory();
-----BEGIN PGP SIGNATURE-----
iD8DBQA9xvtqUMlRieHkprgRAqLNAJ9WvQdct2mspmRvHOB6bAk06u3mUACgimMy
vCx33B2z1BLnBV2DH4WUaFo=
=bUgd
-----END PGP SIGNATURE-----