mirror of https://github.com/BOINC/boinc.git
- MGR: Display the default action in the system tray menu in bold again.
- MGR: If connected to the localhost, don't display the computer name in the window title. - MGR: Change the exit menu item text to be a little more specific about what is being shutdown. Use the same scheme as the exit text in the status bar so that it'll automatically be localized. - SCR: Remove some old Win9x code. clientgui/ AdvancedFrame.cpp BOINCTaskBar.cpp clientscr/ screensaver_win.cpp, .h svn path=/trunk/boinc/; revision=22402
This commit is contained in:
parent
5f23ce067f
commit
66190aa0fc
|
@ -6748,3 +6748,18 @@ David 22 Sept 2010
|
|||
|
||||
client/
|
||||
cs_notice.cpp
|
||||
|
||||
Rom 23 Sept 2010
|
||||
- MGR: Display the default action in the system tray menu in bold again.
|
||||
- MGR: If connected to the localhost, don't display the computer name
|
||||
in the window title.
|
||||
- MGR: Change the exit menu item text to be a little more specific about
|
||||
what is being shutdown. Use the same scheme as the exit text in the
|
||||
status bar so that it'll automatically be localized.
|
||||
- SCR: Remove some old Win9x code.
|
||||
|
||||
clientgui/
|
||||
AdvancedFrame.cpp
|
||||
BOINCTaskBar.cpp
|
||||
clientscr/
|
||||
screensaver_win.cpp, .h
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "BOINCBaseFrame.h"
|
||||
#include "BOINCBaseView.h"
|
||||
#include "BOINCTaskBar.h"
|
||||
#include "BOINCClientManager.h"
|
||||
#include "BOINCDialupManager.h"
|
||||
#include "AdvancedFrame.h"
|
||||
#include "ViewNotices.h"
|
||||
|
@ -279,6 +280,7 @@ bool CAdvancedFrame::CreateMenu() {
|
|||
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
|
||||
ACCT_MGR_INFO ami;
|
||||
bool is_acct_mgr_detected = false;
|
||||
bool is_boinc_started_by_manager = false;
|
||||
wxString strMenuName;
|
||||
wxString strMenuDescription;
|
||||
|
||||
|
@ -293,6 +295,11 @@ bool CAdvancedFrame::CreateMenu() {
|
|||
is_acct_mgr_detected = ami.acct_mgr_url.size() ? true : false;
|
||||
}
|
||||
|
||||
if (pDoc->m_pClientManager->WasBOINCStartedByManager()) {
|
||||
is_boinc_started_by_manager = true;
|
||||
}
|
||||
|
||||
|
||||
// File menu
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
|
||||
|
@ -316,9 +323,24 @@ bool CAdvancedFrame::CreateMenu() {
|
|||
_("Exit %s"),
|
||||
pSkinAdvanced->GetApplicationName().c_str()
|
||||
);
|
||||
if (is_boinc_started_by_manager) {
|
||||
// %s is the application short name
|
||||
// i.e. 'BOINC', 'GridRepublic'
|
||||
strMenuName.Printf(
|
||||
_("Exit %s"),
|
||||
pSkinAdvanced->GetApplicationShortName().c_str()
|
||||
);
|
||||
} else {
|
||||
// %s is the application name
|
||||
// i.e. 'BOINC Manager', 'GridRepublic Manager'
|
||||
strMenuName.Printf(
|
||||
_("Exit %s"),
|
||||
pSkinAdvanced->GetApplicationName().c_str()
|
||||
);
|
||||
}
|
||||
menuFile->Append(
|
||||
wxID_EXIT,
|
||||
_("E&xit"),
|
||||
strMenuName,
|
||||
strMenuDescription
|
||||
);
|
||||
|
||||
|
@ -1879,11 +1901,11 @@ void CAdvancedFrame::OnFrameRender(wxTimerEvent& WXUNUSED(event)) {
|
|||
}
|
||||
|
||||
if (pDoc->IsComputerNameLocal(strComputerName)) {
|
||||
strComputerName = wxT("localhost");
|
||||
strTitle.Printf(wxT("%s"), m_strBaseTitle.c_str());
|
||||
} else {
|
||||
strTitle.Printf(_("%s - (%s)"), m_strBaseTitle.c_str(), strComputerName.c_str());
|
||||
}
|
||||
|
||||
strTitle.Printf(_("%s - (%s)"), m_strBaseTitle.c_str(), strComputerName.c_str());
|
||||
|
||||
if (pDoc->IsReconnecting()) {
|
||||
strStatusText.Printf(_("Connecting to %s"), strComputerName.c_str());
|
||||
} else {
|
||||
|
|
|
@ -551,7 +551,7 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) {
|
|||
pMenu->Remove(pMenuItem);
|
||||
|
||||
font = pMenuItem->GetFont();
|
||||
if (pMenuItem->GetId() != wxID_OPEN) {
|
||||
if (pMenuItem->GetId() != ID_OPENBOINCMANAGER) {
|
||||
font.SetWeight(wxFONTWEIGHT_NORMAL);
|
||||
} else {
|
||||
font.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
|
|
|
@ -349,9 +349,6 @@ HRESULT CScreensaver::Run() {
|
|||
DestroyGraphicsWindowPromotionThread();
|
||||
DestroyInputActivityThread();
|
||||
break;
|
||||
case sm_passwordchange:
|
||||
ChangePassword();
|
||||
break;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1596,7 +1593,7 @@ VOID CScreensaver::FireInterruptSaverEvent() {
|
|||
|
||||
|
||||
// A message was received (mouse move, keydown, etc.) that may mean
|
||||
// the screen saver should show the password dialog and/or shut down.
|
||||
// the screen saver should shut down.
|
||||
//
|
||||
VOID CScreensaver::InterruptSaver() {
|
||||
BOINCTRACE(_T("CScreensaver::InterruptSaver Function Begin\n"));
|
||||
|
@ -1819,25 +1816,3 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
|
|||
if(hFont) DeleteObject(hFont);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
VOID CScreensaver::ChangePassword() {
|
||||
// Load the password change DLL
|
||||
HINSTANCE mpr = LoadLibrary(_T("MPR.DLL"));
|
||||
|
||||
if (mpr != NULL) {
|
||||
// Grab the password change function from it
|
||||
typedef DWORD (PASCAL *PWCHGPROC)(LPCSTR, HWND, DWORD, LPVOID);
|
||||
PWCHGPROC pwd = (PWCHGPROC)GetProcAddress(mpr, "PwdChangePasswordA");
|
||||
|
||||
// Do the password change
|
||||
if (pwd != NULL) {
|
||||
pwd("SCRSAVE", m_hWndParent, 0, NULL);
|
||||
}
|
||||
|
||||
// Free the library
|
||||
FreeLibrary(mpr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,6 @@ protected:
|
|||
VOID FireInterruptSaverEvent();
|
||||
VOID InterruptSaver();
|
||||
VOID ShutdownSaver();
|
||||
VOID ChangePassword();
|
||||
|
||||
|
||||
VOID DoConfig();
|
||||
|
|
Loading…
Reference in New Issue