summaryrefslogtreecommitdiff
path: root/launcher
diff options
authorSam Spilsbury <sam.spilsbury@canonical.com>2013-02-28 13:23:18 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2013-02-28 13:23:18 +0800
commit8f7ba0c05f948efdcf21c28bd19bb23e51fd9849 (patch)
treec1bf2fc4c01ebef9450447f98268aa1f85e8c0af /launcher
parentcf9193baad2c5858a2158450ce31a63138188300 (diff)
parentfba0495fb07690f7563c54463f75acceb56da45d (diff)
Merge unity.fix_1089811
(bzr r3139.1.10)
Diffstat (limited to 'launcher')
-rw-r--r--launcher/SwitcherController.cpp10
-rw-r--r--launcher/SwitcherController.h1
-rw-r--r--launcher/SwitcherControllerImpl.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/launcher/SwitcherController.cpp b/launcher/SwitcherController.cpp
index 150a12a73..28bbc0c4f 100644
--- a/launcher/SwitcherController.cpp
+++ b/launcher/SwitcherController.cpp
@@ -139,6 +139,11 @@ SwitcherView::Ptr Controller::GetView() const
return impl_->GetView();
}
+bool Controller::IsDetailViewShown()
+{
+ return impl_->IsDetailViewShown();
+}
+
void Controller::SetDetail(bool value, unsigned int min_windows)
{
impl_->SetDetail(value, min_windows);
@@ -522,6 +527,11 @@ SwitcherView::Ptr Controller::Impl::GetView() const
return view_;
}
+bool Controller::Impl::IsDetailViewShown()
+{
+ return model_ && model_->detail_selection();
+}
+
void Controller::Impl::SetDetail(bool value, unsigned int min_windows)
{
if (value && model_->DetailXids().size() >= min_windows)
diff --git a/launcher/SwitcherController.h b/launcher/SwitcherController.h
index 29c5b7e7c..f291b7182 100644
--- a/launcher/SwitcherController.h
+++ b/launcher/SwitcherController.h
@@ -98,6 +98,7 @@ public:
void Select(int index);
+ bool IsDetailViewShown();
void SetDetail(bool detail,
unsigned int min_windows = 1);
diff --git a/launcher/SwitcherControllerImpl.h b/launcher/SwitcherControllerImpl.h
index 5734f1b05..9a877e5d0 100644
--- a/launcher/SwitcherControllerImpl.h
+++ b/launcher/SwitcherControllerImpl.h
@@ -56,6 +56,7 @@ struct Controller::Impl
void NextDetail();
void PrevDetail();
+ bool IsDetailViewShown();
void SetDetail(bool detail, unsigned int min_windows = 1);
void SelectFirstItem();