summaryrefslogtreecommitdiff
path: root/src/core/stdclist/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdclist/src')
-rw-r--r--src/core/stdclist/src/clistopts.cpp7
-rw-r--r--src/core/stdclist/src/contact.cpp7
-rw-r--r--src/core/stdclist/src/init.cpp5
-rw-r--r--src/core/stdclist/src/resource.h4
-rw-r--r--src/core/stdclist/src/stdafx.h2
5 files changed, 16 insertions, 9 deletions
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp
index 59a31eaeac..691b93074c 100644
--- a/src/core/stdclist/src/clistopts.cpp
+++ b/src/core/stdclist/src/clistopts.cpp
@@ -28,7 +28,7 @@ class ClistOptsDlg : public CDlgBase
{
CCtrlSpin cycleTime, blink;
CCtrlCombo status;
- CCtrlCheck sortByName, sortByStatus, sortByProto;
+ CCtrlCheck sortByName, sortByStatus, sortByProto, chkOfflineBottom;
CCtrlCheck chkDisableBlink, chkCycle, chkDontCycle, chkMulti;
public:
@@ -43,7 +43,8 @@ public:
sortByName(this, IDC_SORTBYNAME),
sortByProto(this, IDC_SORTBYPROTO),
sortByStatus(this, IDC_SORTBYSTATUS),
- chkDisableBlink(this, IDC_DISABLEBLINK)
+ chkDisableBlink(this, IDC_DISABLEBLINK),
+ chkOfflineBottom(this, IDC_NOOFFLINEMOVE)
{
chkDisableBlink.OnChange = Callback(this, &ClistOptsDlg::onChange_DisableBlink);
chkCycle.OnChange = chkDontCycle.OnChange = chkMulti.OnChange = Callback(this, &ClistOptsDlg::onChange_Tray);
@@ -54,6 +55,7 @@ public:
sortByName.SetState(!g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) && !g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT));
sortByProto.SetState(g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT));
sortByStatus.SetState(g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT));
+ chkOfflineBottom.SetState(g_plugin.getByte("NoOfflineBottom"));
CheckDlgButton(m_hwnd, IDC_ONECLK, g_plugin.getByte("Tray1Click", SETTING_TRAY1CLICK_DEFAULT));
CheckDlgButton(m_hwnd, IDC_ALWAYSSTATUS, g_plugin.getByte("AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT));
@@ -91,6 +93,7 @@ public:
{
g_plugin.setByte("SortByStatus", g_bSortByStatus = sortByStatus.GetState());
g_plugin.setByte("SortByProto", g_bSortByProto = sortByProto.GetState());
+ g_plugin.getByte("NoOfflineBottom", g_bNoOfflineBottom = chkOfflineBottom.GetState());
g_plugin.setByte("Tray1Click", IsDlgButtonChecked(m_hwnd, IDC_ONECLK));
g_plugin.setByte("AlwaysStatus", IsDlgButtonChecked(m_hwnd, IDC_ALWAYSSTATUS));
g_plugin.setByte("AlwaysMulti", !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp
index 2fc5bd4757..28f3da370b 100644
--- a/src/core/stdclist/src/contact.cpp
+++ b/src/core/stdclist/src/contact.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int g_bSortByStatus, g_bSortByProto;
+bool g_bSortByStatus, g_bSortByProto, g_bNoOfflineBottom;
const struct
{
@@ -81,8 +81,9 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
}
else {
//one is offline: offline goes below online
- if ((statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE))
- return 2 * (statusa == ID_STATUS_OFFLINE) - 1;
+ if (!g_bNoOfflineBottom)
+ if ((statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE))
+ return 2 * (statusa == ID_STATUS_OFFLINE) - 1;
}
nameb = Clist_GetContactDisplayName(a);
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index 1aec9c59de..e37d6f07cd 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -107,8 +107,9 @@ static INT_PTR GetStatusMode(WPARAM, LPARAM)
int CMPlugin::Load()
{
- g_bSortByStatus = g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
- g_bSortByProto = g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT);
+ g_bSortByStatus = g_plugin.getBool("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
+ g_bSortByProto = g_plugin.getBool("SortByProto", SETTING_SORTBYPROTO_DEFAULT);
+ g_bNoOfflineBottom = g_plugin.getBool("NoOfflineBottom");
Clist_GetInterface();
coreCli = g_clistApi;
diff --git a/src/core/stdclist/src/resource.h b/src/core/stdclist/src/resource.h
index b4c544a1d2..76473f5926 100644
--- a/src/core/stdclist/src/resource.h
+++ b/src/core/stdclist/src/resource.h
@@ -123,6 +123,8 @@
#define IDC_DISABLEDOCKING 1658
#define IDC_WINCOLOUR 1659
#define IDC_STMSDELAY 1661
+#define IDC_CHECK1 1662
+#define IDC_NOOFFLINEMOVE 1662
// Next default values for new objects
//
@@ -130,7 +132,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 293
#define _APS_NEXT_COMMAND_VALUE 40018
-#define _APS_NEXT_CONTROL_VALUE 1662
+#define _APS_NEXT_CONTROL_VALUE 1663
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h
index f734181b6c..6e74d8398a 100644
--- a/src/core/stdclist/src/stdafx.h
+++ b/src/core/stdclist/src/stdafx.h
@@ -65,6 +65,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
// shared vars
extern CLIST_INTERFACE coreCli;
-extern int g_bSortByStatus, g_bSortByProto;
+extern bool g_bSortByStatus, g_bSortByProto, g_bNoOfflineBottom;
void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);