linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05880
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3013: plugin fixes for MinGW
------------------------------------------------------------
revno: 3013
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2012-07-21 20:23:38 +0200
message:
plugin fixes for MinGW
modified:
plugins/Dev/Dialog.cpp
plugins/Dev/main.cpp
plugins/Example/main.c
plugins/Script/main.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'plugins/Dev/Dialog.cpp'
--- plugins/Dev/Dialog.cpp 2012-07-20 14:43:48 +0000
+++ plugins/Dev/Dialog.cpp 2012-07-21 18:23:38 +0000
@@ -40,6 +40,10 @@
HINSTANCE Dialog::instance;
+#ifndef LVS_EX_DOUBLEBUFFER
+#define LVS_EX_DOUBLEBUFFER 0x00010000
+#endif
+
namespace {
// store the messages to be displayed here; process them with a timer.
@@ -77,7 +81,7 @@
RECT rect;
GetClientRect(control, &rect);
- LVCOLUMN col = { LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 50, _T("N�") };
+ LVCOLUMN col = { LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 50, _T("#") };
ListView_InsertColumn(control, 0, &col);
col.pszText = _T("Dir");
@@ -198,7 +202,7 @@
if(ListView_GetItem(control, &lvi)) {
auto& item = *reinterpret_cast<Item*>(lvi.lParam);
if(!str.empty()) { str += _T("\r\n"); }
- str += item.index + _T(" ") + item.ip + _T(" (") + item.peer + _T("): ") + item.message;
+ str += item.index + _T(" [") + item.dir + _T("] ") + item.ip + _T(" (") + item.peer + _T("): ") + item.message;
}
}
@@ -231,7 +235,7 @@
void filterSelChanged(HWND hwnd) {
auto control = GetDlgItem(hwnd, IDC_FILTER);
- auto sel = ComboBox_GetCurSel(hwnd);
+ auto sel = ComboBox_GetCurSel(control);
tstring str(ComboBox_GetLBTextLen(control, sel), '\0');
ComboBox_GetLBText(control, sel, &str[0]);
@@ -379,7 +383,7 @@
}
void Dialog::create(HWND parent) {
- hwnd = CreateDialog(instance, MAKEINTRESOURCE(IDD_PLUGINDLG), hwnd, DialogProc);
+ hwnd = CreateDialog(instance, MAKEINTRESOURCE(IDD_PLUGINDLG), 0, DialogProc);
#ifdef _DEBUG
if(!hwnd) {
=== modified file 'plugins/Dev/main.cpp'
--- plugins/Dev/main.cpp 2012-07-19 22:00:20 +0000
+++ plugins/Dev/main.cpp 2012-07-21 18:23:38 +0000
@@ -23,19 +23,17 @@
extern "C" {
- // Plugin loader
- DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
- info->name = PLUGIN_NAME;
- info->author = PLUGIN_AUTHOR;
- info->description = PLUGIN_DESC;
- info->web = PLUGIN_WEB;
- info->version = PLUGIN_VERSION;
- info->apiVersion = DCAPI_CORE_VER;
- info->guid = PLUGIN_GUID;
-
- return &Plugin::main;
- }
-
+// Plugin loader
+DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
+ info->name = PLUGIN_NAME;
+ info->author = PLUGIN_AUTHOR;
+ info->description = PLUGIN_DESC;
+ info->web = PLUGIN_WEB;
+ info->version = PLUGIN_VERSION;
+ info->apiVersion = DCAPI_CORE_VER;
+ info->guid = PLUGIN_GUID;
+
+ return &Plugin::main;
}
#ifdef _WIN32
@@ -44,3 +42,5 @@
return TRUE;
}
#endif
+
+}
=== modified file 'plugins/Example/main.c'
--- plugins/Example/main.c 2012-07-19 21:58:04 +0000
+++ plugins/Example/main.c 2012-07-21 18:23:38 +0000
@@ -30,26 +30,22 @@
extern "C" {
#endif
- /* Plugin loader */
- DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
- info->name = PLUGIN_NAME;
- info->author = PLUGIN_AUTHOR;
- info->description = PLUGIN_DESC;
- info->version = PLUGIN_VERSION;
- info->web = PLUGIN_WEB;
- info->apiVersion = DCAPI_CORE_VER;
- info->guid = PLUGIN_GUID;
-
- /* Plugin dependencies
- info->dependencies = dependencies;
- info->numDependencies = 2;*/
-
- return &pluginMain;
- }
-
-#ifdef __cplusplus
+/* Plugin loader */
+DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
+ info->name = PLUGIN_NAME;
+ info->author = PLUGIN_AUTHOR;
+ info->description = PLUGIN_DESC;
+ info->version = PLUGIN_VERSION;
+ info->web = PLUGIN_WEB;
+ info->apiVersion = DCAPI_CORE_VER;
+ info->guid = PLUGIN_GUID;
+
+ /* Plugin dependencies
+ info->dependencies = dependencies;
+ info->numDependencies = 2;*/
+
+ return &pluginMain;
}
-#endif
#ifdef _WIN32
HINSTANCE hInst = NULL;
@@ -61,3 +57,7 @@
return TRUE;
}
#endif
+
+#ifdef __cplusplus
+}
+#endif
=== modified file 'plugins/Script/main.cpp'
--- plugins/Script/main.cpp 2012-07-19 22:01:31 +0000
+++ plugins/Script/main.cpp 2012-07-21 18:23:38 +0000
@@ -22,19 +22,17 @@
extern "C" {
- // Plugin loader
- DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
- info->name = PLUGIN_NAME;
- info->author = PLUGIN_AUTHOR;
- info->description = PLUGIN_DESC;
- info->web = PLUGIN_WEB;
- info->version = PLUGIN_VERSION;
- info->apiVersion = DCAPI_CORE_VER;
- info->guid = PLUGIN_GUID;
-
- return &Plugin::main;
- }
-
+// Plugin loader
+DCEXP DCMAIN DCAPI pluginInit(MetaDataPtr info) {
+ info->name = PLUGIN_NAME;
+ info->author = PLUGIN_AUTHOR;
+ info->description = PLUGIN_DESC;
+ info->web = PLUGIN_WEB;
+ info->version = PLUGIN_VERSION;
+ info->apiVersion = DCAPI_CORE_VER;
+ info->guid = PLUGIN_GUID;
+
+ return &Plugin::main;
}
#ifdef _WIN32
@@ -42,3 +40,5 @@
return TRUE;
}
#endif
+
+}