diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-15 18:37:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-15 18:37:53 +0300 |
commit | 5b9675f0504e65ccee46b1ecc304d14e4f0da770 (patch) | |
tree | bad374127fba210ed4b6e8a566bc92ef7c630aea | |
parent | 680873487c4a7987012606119a744e5ca725ad30 (diff) |
merge of fixes with trunk
-rw-r--r-- | plugins/NotesAndReminders/src/notes.cpp | 8 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/reminders.cpp | 4 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/version.h | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_byte.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/netlibsock.cpp | 2 |
6 files changed, 8 insertions, 12 deletions
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 60f409b95f..22e890ba81 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -29,8 +29,6 @@ #define NOTIFY_LIST() if (ListNotesVisible) PostMessage(LV,WM_RELOAD,0,0) -#define PENLINK ENLINK * - #define NOTE_WND_CLASS L"MIM_StickyNote" #define IDM_COLORPRESET_BG 41000 @@ -738,12 +736,10 @@ LRESULT CALLBACK StickyNoteWndProc(HWND hdlg, UINT message, WPARAM wParam, LPARA case WM_NOTIFY: if (LOWORD(wParam) == 1) { - char *Buff; - PENLINK PEnLnk = (PENLINK)lParam; - + ENLINK *PEnLnk = (ENLINK*)lParam; if (PEnLnk->msg == WM_LBUTTONDOWN) { SendDlgItemMessage(hdlg, 1, EM_EXSETSEL, 0, (LPARAM)&(PEnLnk->chrg)); - Buff = (char*)malloc(PEnLnk->chrg.cpMax - PEnLnk->chrg.cpMin + 1); + char* Buff = (char*)malloc(PEnLnk->chrg.cpMax - PEnLnk->chrg.cpMin + 1); SendDlgItemMessage(hdlg, 1, EM_GETSELTEXT, 0, (LPARAM)Buff); if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0) ShellExecuteA(hdlg, "open", "iexplore", Buff, "", SW_SHOWNORMAL); diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 920ac3142e..547dc262af 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -1253,6 +1253,7 @@ public: void onClick_RemindAgain(CCtrlButton*)
{
+ arReminders.remove(m_pReminder);
if (chkAfter.GetState()) {
// delta time
SYSTEMTIME tm;
@@ -1320,7 +1321,6 @@ public: m_pReminder->handle = nullptr;
// re-insert tree item sorted
- arReminders.remove(m_pReminder);
arReminders.insert(m_pReminder);
m_pReminder = nullptr; // prevent reminder from being deleted;
Close();
@@ -1533,6 +1533,7 @@ public: }
else {
// update existing reminder
+ arReminders.remove(m_pReminder);
SystemTimeToFileTime(&Date, (FILETIME*)&m_pReminder->When);
m_pReminder->szText = ptrA(edtText.GetTextA());
@@ -1541,7 +1542,6 @@ public: m_pReminder->RepeatSound = m_pReminder->SoundSel < 0 ? 0 : (UINT)RepeatSound;
// re-insert tree item sorted
- arReminders.remove(m_pReminder);
arReminders.insert(m_pReminder);
m_pReminder->bVisible = false;
diff --git a/plugins/NotesAndReminders/src/version.h b/plugins/NotesAndReminders/src/version.h index c7f03daa18..cc46754d46 100644 --- a/plugins/NotesAndReminders/src/version.h +++ b/plugins/NotesAndReminders/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 2 #define __RELEASE_NUM 0 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include <stdver.h> diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index c72ebaaea6..fe2aaed8fd 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -211,7 +211,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) if (localAddr == nullptr) {
sockaddr_in sin = {};
sin.sin_family = AF_INET;
- sin.sin_addr.S_un.S_addr = nlb.dwExternalIP;
+ sin.sin_addr.S_un.S_addr = htonl(nlb.dwExternalIP);
localAddr = Netlib_AddressToString(&sin);
}
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index f9909972f0..1cb53aa248 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -288,7 +288,7 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) if (myAddr == nullptr) {
sockaddr_in sin = {};
sin.sin_family = AF_INET;
- sin.sin_addr.S_un.S_addr = nlb.dwExternalIP;
+ sin.sin_addr.S_un.S_addr = htonl(nlb.dwExternalIP);
myAddr = Netlib_AddressToString(&sin);
}
diff --git a/src/mir_app/src/netlibsock.cpp b/src/mir_app/src/netlibsock.cpp index a2cbfbe5a1..afe705d98d 100644 --- a/src/mir_app/src/netlibsock.cpp +++ b/src/mir_app/src/netlibsock.cpp @@ -200,7 +200,7 @@ MIR_APP_DLL(char*) Netlib_AddressToString(sockaddr_in *addr) if (addr->sin_family == AF_INET) {
char *szIp = inet_ntoa(addr->sin_addr);
if (addr->sin_port != 0) {
- mir_snprintf(saddr, "%s:%d", szIp, htons(addr->sin_port));
+ mir_snprintf(saddr, "%s:%d", szIp, addr->sin_port);
return mir_strdup(saddr);
}
return mir_strdup(szIp);
|