Kaydet (Commit) cbdfab6e authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Keep track of the current view and close it when we click close icon.

Change-Id: I63faf58203ac43b4216a57d8ad5fbfe8d9f0bfff
üst 7d2e94d0
......@@ -17,6 +17,7 @@
class Edit;
class PopupMenu;
class TemplateAbstractView;
class TemplateFolderView;
class TemplateOnlineView;
class TemplateSearchView;
......@@ -95,6 +96,7 @@ private:
ToolBox *mpActionBar;
ToolBox *mpTemplateBar;
TemplateSearchView *mpSearchView;
TemplateAbstractView *mpCurView;
TemplateFolderView *maView;
TemplateOnlineView *mpOnlineView;
PopupMenu *mpCreateMenu;
......
......@@ -198,6 +198,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
ITEM_MAX_HEIGHT-THUMBNAIL_MAX_HEIGHT,
ITEM_PADDING);
mpOnlineView->setOverlayCloseHdl(LINK(this,SfxTemplateManagerDlg,CloseOverlayHdl));
mpSearchView->SetSizePixel(aThumbSize);
mpSearchView->setItemMaxTextLength(ITEM_MAX_TEXT_LENGTH);
......@@ -308,7 +310,7 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, CloseOverlayHdl)
mpTemplateBar->Hide();
mpViewBar->Show();
maView->showOverlay(false);
mpCurView->showOverlay(false);
return 0;
}
......@@ -839,6 +841,8 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
{
if (bDisplayLocal)
{
mpCurView = maView;
mpViewBar->ShowItem(TBI_TEMPLATE_ONLINE);
mpViewBar->HideItem(TBI_TEMPLATE_LOCAL);
......@@ -847,6 +851,8 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
}
else
{
mpCurView = mpOnlineView;
mpViewBar->ShowItem(TBI_TEMPLATE_LOCAL);
mpViewBar->HideItem(TBI_TEMPLATE_ONLINE);
......
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