From d0437f358af898fe1a7dddfb0021da3a1a326d3f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 11 May 2018 12:21:40 +0200 Subject: fixes #1347 (Scriver: remove "Use the contact's status icon as the window icon" option) --- plugins/Scriver/res/resource.rc | 4 +--- plugins/Scriver/src/chat_window.cpp | 14 +++++--------- plugins/Scriver/src/globals.cpp | 2 -- plugins/Scriver/src/globals.h | 1 - plugins/Scriver/src/msgdialog.cpp | 12 +++++------- plugins/Scriver/src/msgoptions.cpp | 4 ---- plugins/Scriver/src/msgs.h | 2 -- plugins/Scriver/src/resource.h | 1 - plugins/Scriver/src/version.h | 2 +- 9 files changed, 12 insertions(+), 30 deletions(-) (limited to 'plugins/Scriver') diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc index 69aadc0e0d..b5254672e9 100644 --- a/plugins/Scriver/res/resource.rc +++ b/plugins/Scriver/res/resource.rc @@ -91,9 +91,7 @@ BEGIN CONTROL "Show toolbar",IDC_SHOWTOOLBAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,34,180,10 CONTROL "Show info bar",IDC_SHOWINFOBAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,45,180,10 CONTROL "Show avatars",IDC_AVATARSUPPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,56,180,10 - CONTROL "Use the contact's status icon as the window icon",IDC_STATUSWIN, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,67,292,10 - CONTROL "Show progress indicator",IDC_SHOWPROGRESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,78,180,10 + CONTROL "Show progress indicator",IDC_SHOWPROGRESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,67,180,10 CONTROL "Enable transparency",IDC_TRANSPARENCY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,95,140,10 LTEXT "active",IDC_TRANSPARENCYTEXT1,152,91,36,8 CONTROL "Slider1",IDC_ATRANSPARENCYVALUE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,194,91,70,12 diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 7331033f84..ad31b1805e 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -533,16 +533,11 @@ void CChatRoomDlg::UpdateStatusBar() void CChatRoomDlg::UpdateTitle() { + MODULEINFO *mi = pci->MM_FindModule(m_si->pszModule); + TitleBarData tbd = {}; - if (g_dat.flags & SMF_STATUSICON) { - MODULEINFO *mi = pci->MM_FindModule(m_si->pszModule); - tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; - tbd.hIconBig = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIconBig : mi->hOfflineIconBig; - } - else { - tbd.hIcon = GetCachedIcon("chat_window"); - tbd.hIconBig = g_dat.hIconChatBig; - } + tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; + tbd.hIconBig = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIconBig : mi->hOfflineIconBig; tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : nullptr; wchar_t szTemp[512]; @@ -564,6 +559,7 @@ void CChatRoomDlg::UpdateTitle() tbd.iFlags = TBDF_TEXT | TBDF_ICON; tbd.pszText = szTemp; SendMessage(m_hwndParent, CM_UPDATETITLEBAR, (WPARAM)&tbd, (LPARAM)m_hwnd); + SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0); } diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 058f0d5286..0886f048cc 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -366,8 +366,6 @@ void ReloadGlobals() g_dat.flags |= SMF_SENDONENTER; if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) g_dat.flags |= SMF_SENDONDBLENTER; - if (db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON)) - g_dat.flags |= SMF_STATUSICON; if (db_get_b(0, SRMM_MODULE, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT)) g_dat.flags |= SMF_INDENTTEXT; diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index a396493a4a..652a077f86 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -33,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SMF_SENDONDBLENTER 0x00000200 #define SMF_SHOWPROGRESS 0x00000400 #define SMF_AVATAR 0x00000800 -#define SMF_STATUSICON 0x00002000 #define SMF_RTL 0x00004000 #define SMF_USEIEVIEW 0x00010000 #define SMF_SHOWICONS 0x00020000 diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index faddf76067..a9110a2e03 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -598,14 +598,14 @@ void CSrmmWindow::GetTitlebarIcon(TitleBarData *tbd) if (m_bShowTyping && (g_dat.flags2 & SMF2_SHOWTYPINGWIN)) tbd->hIconNot = tbd->hIcon = GetCachedIcon("scriver_TYPING"); else if (m_iShowUnread && (GetActiveWindow() != m_hwndParent || GetForegroundWindow() != m_hwndParent)) { - tbd->hIcon = (g_dat.flags & SMF_STATUSICON) ? m_hStatusIcon : g_dat.hMsgIcon; - tbd->hIconNot = (g_dat.flags & SMF_STATUSICON) ? g_dat.hMsgIcon : GetCachedIcon("scriver_OVERLAY"); + tbd->hIcon = m_hStatusIcon; + tbd->hIconNot = g_dat.hMsgIcon; } else { - tbd->hIcon = (g_dat.flags & SMF_STATUSICON) ? m_hStatusIcon : g_dat.hMsgIcon; + tbd->hIcon = m_hStatusIcon; tbd->hIconNot = nullptr; } - tbd->hIconBig = (g_dat.flags & SMF_STATUSICON) ? m_hStatusIconBig : g_dat.hMsgIconBig; + tbd->hIconBig = m_hStatusIconBig; } bool CSrmmWindow::IsTypingNotificationSupported() @@ -784,10 +784,8 @@ void CSrmmWindow::UpdateTitle() ptrW tmplt(db_get_wsa(0, SRMM_MODULE, SRMSGSET_WINDOWTITLE)); if (tmplt != nullptr) wszTitle = tmplt; - else if (g_dat.flags & SMF_STATUSICON) - wszTitle = L"%name% - "; else - wszTitle = L"%name% (%status%) : "; + wszTitle = L"%name% - "; if (m_hContact && m_szProto) { wszTitle.Replace(L"%name%", Clist_GetContactDisplayName(m_hContact)); diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index ecaac38ec9..0ddefba75d 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -398,7 +398,6 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENCYTEXT1), bChecked); EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENCYTEXT2), bChecked); - CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SHOWPROGRESS, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_AVATARSUPPORT, g_dat.flags & SMF_AVATAR); return TRUE; @@ -449,7 +448,6 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar db_set_dw(0, SRMM_MODULE, SRMSGSET_ACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0)); db_set_dw(0, SRMM_MODULE, SRMSGSET_INACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0)); - db_set_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_STATUSWIN)); db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWPROGRESS)); db_set_b(0, SRMM_MODULE, SRMSGSET_AVATARENABLE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AVATARSUPPORT)); @@ -487,8 +485,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_CASCADE, db_get_b(0, SRMM_MODULE, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SENDONENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SENDONDBLENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_HIDECONTAINERS, db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS) ? BST_CHECKED : BST_UNCHECKED); EnableWindow(GetDlgItem(hwndDlg, IDC_STAYMINIMIZED), IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP)); diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index bb209cb686..16c6b6e5d6 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -374,8 +374,6 @@ extern int fontOptionsListSize; #define SRMSGDEFSET_SENDONENTER 1 #define SRMSGSET_SENDONDBLENTER "SendOnDblEnter" #define SRMSGDEFSET_SENDONDBLENTER 0 -#define SRMSGSET_STATUSICON "UseStatusWinIcon" -#define SRMSGDEFSET_STATUSICON 0 #define SRMSGSET_SENDBUTTON "UseSendButton" #define SRMSGDEFSET_SENDBUTTON 0 #define SRMSGSET_CHARCOUNT "ShowCharCount" diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index 7966a71277..7b429acd80 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -125,7 +125,6 @@ #define IDC_ERRORTEXT 1596 #define IDC_MSGTEXT 1597 #define IDC_SHOWNOTIFY 1600 -#define IDC_STATUSWIN 1601 #define IDC_TYPEWIN 1602 #define IDC_TYPETRAY 1603 #define IDC_TABSATBOTTOM 1603 diff --git a/plugins/Scriver/src/version.h b/plugins/Scriver/src/version.h index d6cf92b2b3..fc56d643d5 100644 --- a/plugins/Scriver/src/version.h +++ b/plugins/Scriver/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3 #define __MINOR_VERSION 0 #define __RELEASE_NUM 1 -#define __BUILD_NUM 7 +#define __BUILD_NUM 8 #include -- cgit v1.2.3