void CCP_MainApp::ShowPersistent( bool bVal ) { g_Opt.SetShowPersistent( bVal ); // give some visual indication if( m_bShowingQuickPaste ) { ASSERT( QPasteWnd() ); QPasteWnd()->SetCaptionColorActive(!g_Opt.m_bShowPersistent, theApp.GetConnectCV()); QPasteWnd()->RefreshNc(); } }
void CCP_MainApp::SetConnectCV(bool bConnect) { m_CopyThread.SetConnectCV(bConnect); if(bConnect) m_pMainFrame->m_TrayIcon.SetIcon(IDR_MAINFRAME); else m_pMainFrame->m_TrayIcon.SetIcon(IDI_DITTO_NOCOPYCB); if(QPasteWnd()) { QPasteWnd()->SetCaptionColorActive(!g_Opt.m_bShowPersistent, theApp.GetConnectCV()); QPasteWnd()->RefreshNc(); } }
// Sets a menu entry according to the current Clipboard Viewer Connection status // - the menu text indicates the available command (opposite the current state) // - a check mark appears in the rare cases that the menu text actually represents // the current state, e.g. if we are supposed to be connected, but we somehow // lose that connection, "Disconnect from Clipboard" will have a check next to it. void CCP_MainApp::UpdateMenuConnectCV(CMenu* pMenu, UINT nMenuID) { if(pMenu == NULL) return; bool bConnect = theApp.GetConnectCV(); CString cs; if(bConnect) { cs = theApp.m_Language.GetString("Disconnect_Clipboard", "Disconnect from Clipboard."); pMenu->ModifyMenu(nMenuID, MF_BYCOMMAND, nMenuID, cs); } else { cs = theApp.m_Language.GetString("Connect_Clipboard", "Connect to Clipboard."); pMenu->ModifyMenu(nMenuID, MF_BYCOMMAND, nMenuID, cs); } }