diff options
| author | Manuel de la Pena <manuel@canonical.com> | 2013-04-16 13:53:34 +0200 |
|---|---|---|
| committer | Manuel de la Pena <manuel@canonical.com> | 2013-04-16 13:53:34 +0200 |
| commit | 29d0f8feb6d603e9351172c53ac665be056178f0 (patch) | |
| tree | 402226bf2cb1d1eeeb76f8fd868fbaa239bb7252 /dash | |
| parent | ca00ec3d58f534da655c2def7aba334d138916b0 (diff) | |
| parent | 9da7abe5c95035cc23c4be60dd9cba3d62c75064 (diff) | |
Merged with plan-b.
(bzr r3263.2.8)
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/DashView.cpp | 11 | ||||
| -rw-r--r-- | dash/LensBar.h | 3 | ||||
| -rw-r--r-- | dash/previews/MusicPreview.cpp | 15 |
3 files changed, 18 insertions, 11 deletions
diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 854428e0b..5abc29405 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -1136,8 +1136,15 @@ void DashView::OnActivateRequest(GVariant* args) } else if (/* visible_ && */ handled_type == NOT_HANDLED) { - ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST, NULL, - glib::Source::Priority::HIGH); + if (lens_bar_->GetActiveLensId() != id) + { + lens_bar_->Activate(id); + } + else + { + ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST, NULL, + glib::Source::Priority::HIGH); + } } else if (/* visible_ && */ handled_type == GOTO_DASH_URI) { diff --git a/dash/LensBar.h b/dash/LensBar.h index 8609d33af..a8d426d57 100644 --- a/dash/LensBar.h +++ b/dash/LensBar.h @@ -61,6 +61,8 @@ public: void Activate(std::string id); void ActivateNext(); void ActivatePrevious(); + + std::string GetActiveLensId() const; sigc::signal<void, std::string const&> lens_activated; @@ -81,7 +83,6 @@ private: std::string GetName() const; void AddProperties(GVariantBuilder* builder); - std::string GetActiveLensId() const; typedef std::unique_ptr<nux::AbstractPaintLayer> LayerPtr; LensIcons icons_; diff --git a/dash/previews/MusicPreview.cpp b/dash/previews/MusicPreview.cpp index 6abb0a248..cac139152 100644 --- a/dash/previews/MusicPreview.cpp +++ b/dash/previews/MusicPreview.cpp @@ -96,7 +96,8 @@ bool MusicPreview::HasUbuntuOneCredentials() { dash::Preview::InfoHintPtrList hints = preview_model_->GetInfoHints(); GVariant *preview_data = NULL; - for (dash::Preview::InfoHintPtr info_hint : hints) + + for (dash::Preview::InfoHintPtr const& info_hint : hints) { if (info_hint->id == "music_preview") { @@ -225,8 +226,8 @@ void MusicPreview::SetupViews() nux::VLayout* icon_layout = new nux::VLayout(); icon_layout->SetLeftAndRightPadding(10); - warning_texture_ = new IconTexture(style.GetWarningIcon(), style.GetPaymentLockWidth(), - style.GetPaymentLockHeight()); + warning_texture_ = new IconTexture(style.GetWarningIcon(), style.GetPaymentWarningWidth(), + style.GetPaymentWarningHeight()); icon_layout->AddView(warning_texture_.GetPointer(), 0, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL, 100.0f, nux::NUX_LAYOUT_BEGIN); actions_layout->AddLayout(icon_layout, 0, nux::MINOR_POSITION_CENTER); @@ -234,17 +235,15 @@ void MusicPreview::SetupViews() warning_msg_ = new StaticCairoText( no_credentials_message_, true, NUX_TRACKER_LOCATION); - warning_msg_->SetFont(style.payment_intro_font().c_str()); - warning_msg_->SetLineSpacing(10); - warning_msg_->SetLines(-style.GetDescriptionLineCount()); + warning_msg_->SetFont(style.u1_warning_font().c_str()); + warning_msg_->SetLines(-2); warning_msg_->SetMinimumHeight(50); warning_msg_->SetMaximumWidth(300); actions_layout->AddView(warning_msg_.GetPointer(), 0, nux::MINOR_POSITION_CENTER); } - - + ///////////////////// if (hints_layout) hint_actions_layout->AddView(hints_layout, 1); |
