Browse Source

Remove menu image without restart

master
Dorian 7 years ago
parent
commit
e40658c9fb
  1. 1
      k-meleon/app/KmMenu.h
  2. 6
      k-meleon/app/Preferences.cpp
  3. 1
      k-meleon/app/Preferences.h

1
k-meleon/app/KmMenu.h

@ -168,6 +168,7 @@ public:
void RebuildAll()
{
mOwnerDraw = -1;
KmMenu* kmenu;
CString s;
POSITION pos = mMenus.GetStartPosition();

6
k-meleon/app/Preferences.cpp

@ -313,6 +313,11 @@ void CPreferences::AdBlockChanged()
LoadAdBlock(GetBool("kmeleon.adblocking", false));
}
void CPreferences::MenuChanged()
{
theApp.menus.RebuildAll();
}
void CPreferences::Release() {
m_prefservice = nullptr;
m_prefs = nullptr;
@ -348,6 +353,7 @@ void CPreferences::Load() {
new CPrefObserver("kmeleon.general.skinsCurrent", &CPreferences::SkinChanged);
new CPrefObserver("kmeleon.display.backgroundImageEnabled", &CPreferences::BackgroundChanged);
new CPrefObserver("kmeleon.display.backgroundImage", &CPreferences::BackgroundChanged);
new CPrefObserver("kmeleon.display.bitmapInMenus", &CPreferences::MenuChanged);
// -- Folders XXX have to put this somewhere else

1
k-meleon/app/Preferences.h

@ -321,6 +321,7 @@ public:
void AdBlockChanged();
void SkinChanged();
void BackgroundChanged();
void MenuChanged();
protected:
nsCOMPtr<nsIPrefBranch> m_prefs;

Loading…
Cancel
Save