summaryrefslogtreecommitdiff
path: root/shortcuts
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-11 00:32:46 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-11 00:32:46 +0100
commit6b81ba5340f26a9de8675dc14a67a5cb1333d88f (patch)
tree3cfb829d88bae5cb3168838b58dab43546d92664 /shortcuts
parent11337282626e4d84752735858db2b0bbab4fcab2 (diff)
ShortcutController: make the view closable on first run
(bzr r3702.5.3)
Diffstat (limited to 'shortcuts')
-rw-r--r--shortcuts/ShortcutController.cpp5
-rw-r--r--shortcuts/ShortcutController.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/shortcuts/ShortcutController.cpp b/shortcuts/ShortcutController.cpp
index da796d9ca..a2570888b 100644
--- a/shortcuts/ShortcutController.cpp
+++ b/shortcuts/ShortcutController.cpp
@@ -37,7 +37,8 @@ const unsigned int FADE_DURATION = 100;
Controller::Controller(BaseWindowRaiser::Ptr const& base_window_raiser,
AbstractModeller::Ptr const& modeller)
- : modeller_(modeller)
+ : first_run(false)
+ , modeller_(modeller)
, base_window_raiser_(base_window_raiser)
, visible_(false)
, enabled_(true)
@@ -155,6 +156,7 @@ void Controller::ConstructView()
AddChild(view_.GetPointer());
view_->SetModel(modeller_->GetCurrentModel());
view_->background_color = WindowManager::Default().average_color();
+ view_->closable = first_run();
if (!view_window_)
{
@@ -197,6 +199,7 @@ void Controller::Hide()
if (view_window_ && view_window_->GetOpacity() > 0.0f)
{
view_->live_background = false;
+ view_->closable = false;
animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD);
}
}
diff --git a/shortcuts/ShortcutController.h b/shortcuts/ShortcutController.h
index c4a89c6f9..956fcb32b 100644
--- a/shortcuts/ShortcutController.h
+++ b/shortcuts/ShortcutController.h
@@ -47,6 +47,8 @@ public:
Controller(BaseWindowRaiser::Ptr const& raiser, AbstractModeller::Ptr const& modeller);
virtual ~Controller();
+ nux::Property<bool> first_run;
+
bool Show();
void Hide();