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