Kaydet (Commit) 5bb0cc11 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Keep menubar hidden after Unity registrar activated

... if it was hidden before. Otherwise it becomes
out of sync with MenuBar::mbDisplayable.

Change-Id: I03c551ee70131a50fa694b7009c24833ac391990
üst 7c3f18ca
......@@ -726,7 +726,6 @@ void on_registrar_available( GDBusConnection * /*connection*/,
{
GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu);
pGtkSalMenu->EnableUnity(true);
pGtkSalMenu->UpdateFull();
}
}
......
......@@ -1157,14 +1157,19 @@ void GtkSalMenu::EnableUnity(bool bEnable)
bUnityMode = bEnable;
MenuBar* pMenuBar(static_cast<MenuBar*>(mpVCLMenu.get()));
bool bDisplayable(pMenuBar->IsDisplayable());
if (bEnable)
{
DestroyMenuBarWidget();
UpdateFull();
if (!bDisplayable)
ShowMenuBar(false);
}
else
{
Update();
if (pMenuBar->IsDisplayable())
CreateMenuBarWidget();
ShowMenuBar(bDisplayable);
}
pMenuBar->LayoutChanged();
......
......@@ -742,7 +742,6 @@ void on_registrar_available( GDBusConnection * /*connection*/,
{
GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu);
pGtkSalMenu->EnableUnity(true);
pGtkSalMenu->UpdateFull();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment