Browse Source

Add apprestart

master
boisso 7 years ago
parent
commit
c8dd86c322
  1. 5
      k-meleon/HiddenWnd.cpp
  2. 1
      k-meleon/KmCommand.cpp
  3. 8
      k-meleon/MfcEmbed.cpp
  4. 2
      k-meleon/MfcEmbed.h
  5. 1
      k-meleon/defineMap.cpp
  6. 1
      k-meleon/resource.h

5
k-meleon/HiddenWnd.cpp

@ -351,6 +351,5 @@ void CHiddenWnd::OnEndSession(BOOL bEnding)
theApp.favicons.WriteCache();
theApp.preferences.Flush();
XRE_TermEmbedding();
theApp.plugins.UnLoadAll();
}
//theApp.plugins.UnLoadAll();
}

1
k-meleon/KmCommand.cpp

@ -190,6 +190,7 @@ void KmCmdService::InitDefaultCmd()
ADD_DEFCMD(appExit, ID_APP_EXIT);
ADD_DEFCMD(appAbout, ID_APP_ABOUT);
ADD_DEFCMD(appRestart, ID_APP_RESTART);
ADD_DEFCMD(windowClose, ID_FILE_CLOSE);
ADD_DEFCMD(windowNew, ID_NEW_BROWSER);
ADD_DEFCMD(windowNext, ID_WINDOW_NEXT);

8
k-meleon/MfcEmbed.cpp

@ -128,6 +128,8 @@ ON_COMMAND(ID_MANAGE_PROFILES, OnManageProfiles)
ON_COMMAND(ID_PREFERENCES, OnPreferences)
ON_COMMAND(ID_OFFLINE, OnToggleOffline)
ON_COMMAND(ID_TOGGLE_JS, OnToggleJS)
ON_COMMAND(ID_APP_RESTART, OnAppRestart)
ON_UPDATE_COMMAND_UI(ID_APP_RESTART, OnUpdateAppRestart)
ON_UPDATE_COMMAND_UI(ID_TOGGLE_JS, OnUpdateToggleJS)
ON_UPDATE_COMMAND_UI(ID_OFFLINE, OnUpdateToggleOffline)
ON_UPDATE_COMMAND_UI_RANGE(WINDOW_MENU_START_ID, WINDOW_MENU_STOP_ID, OnUpdateWindows)
@ -1872,3 +1874,9 @@ BOOL CMfcEmbedApp::PumpMessage2(UINT filter)
}
return TRUE;
}
void CMfcEmbedApp::OnAppRestart()
{
((CMfcEmbedApp*)::AfxGetApp())->SetRestart(TRUE);
PostQuitMessage(0);
}

2
k-meleon/MfcEmbed.h

@ -173,6 +173,8 @@ public:
afx_msg void OnUpdateToggleOffline(CCmdUI* pCmdUI);
afx_msg void OnUpdateWindows(CCmdUI* pCmdUI);
afx_msg void OnWindowSelect(UINT id);
afx_msg void OnAppRestart();
afx_msg void OnUpdateAppRestart(CCmdUI* pCmdUI) { pCmdUI->Enable(); }
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !

1
k-meleon/defineMap.cpp

@ -99,3 +99,4 @@ DEFINEMAP_ADD(ID_PAGE_TOGGLE_JS)
DEFINEMAP_ADD(ID_ENABLE_JS)
DEFINEMAP_ADD(ID_DISABLE_JS)
DEFINEMAP_ADD(ID_TOGGLE_JS)
DEFINEMAP_ADD(ID_APP_RESTART)

1
k-meleon/resource.h

@ -485,6 +485,7 @@
#define ID_DISABLE_JS 32922
#define ID_TOGGLE_JS 32923
#define ID_PAGE_TOGGLE_JS 32924
#define ID_APP_RESTART 32925
#define ID_CLOSE_FINDBAR 33822
#define IDS_FAILED_TO_CREATE_BROWSER 61204

Loading…
Cancel
Save