summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorhandsome_feng <445865575@qq.com>2015-11-24 09:29:33 +0800
committerhandsome_feng <445865575@qq.com>2015-11-24 09:29:33 +0800
commit271e97757c874f5058f12c0a7c997a653b48b659 (patch)
tree77c798dcf4a13e116b0300dfa649069463528795 /lockscreen
parent0ba4ad707833928adc16d697bd9a3fefa40598bf (diff)
modified some tests and the AbstractShield
(bzr r4016.2.27)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/KylinLockScreenShield.cpp10
-rw-r--r--lockscreen/KylinLockScreenShield.h2
-rw-r--r--lockscreen/KylinUserPromptView.h2
-rw-r--r--lockscreen/LockScreenAbstractPromptView.h2
-rw-r--r--lockscreen/LockScreenAbstractShield.h6
-rw-r--r--lockscreen/LockScreenShield.cpp10
-rw-r--r--lockscreen/LockScreenShield.h2
7 files changed, 8 insertions, 26 deletions
diff --git a/lockscreen/KylinLockScreenShield.cpp b/lockscreen/KylinLockScreenShield.cpp
index ee865fee8..8cc544922 100644
--- a/lockscreen/KylinLockScreenShield.cpp
+++ b/lockscreen/KylinLockScreenShield.cpp
@@ -89,11 +89,6 @@ KylinShield::KylinShield(session::Manager::Ptr const& session_manager,
});
}
-void KylinShield::UpdateScale()
-{
- scale = unity::Settings::Instance().em(monitor)->DPIScale();
-}
-
void KylinShield::UpdateBackgroundTexture()
{
auto const& monitor_geo = UScreen::GetDefault()->GetMonitorGeometry(monitor);
@@ -210,11 +205,6 @@ nux::Area* KylinShield::FindKeyFocusArea(unsigned etype, unsigned long keysym, u
return nullptr;
}
-bool KylinShield::AcceptKeyNavFocus()
-{
- return false;
-}
-
nux::Area* KylinShield::FindAreaUnderMouse(nux::Point const& mouse, nux::NuxEventType event_type)
{
nux::Area* area = BaseWindow::FindAreaUnderMouse(mouse, event_type);
diff --git a/lockscreen/KylinLockScreenShield.h b/lockscreen/KylinLockScreenShield.h
index e896c0583..3bf828801 100644
--- a/lockscreen/KylinLockScreenShield.h
+++ b/lockscreen/KylinLockScreenShield.h
@@ -45,7 +45,6 @@ public:
bool HasGrab() const override;
protected:
- bool AcceptKeyNavFocus() override;
nux::Area* FindKeyFocusArea(unsigned int, unsigned long, unsigned long) override;
nux::Area* FindAreaUnderMouse(nux::Point const&, nux::NuxEventType) override;
@@ -54,7 +53,6 @@ private:
void GrabScreen(bool cancel_on_failure);
void ShowPrimaryView();
void ShowSecondaryView();
- void UpdateScale();
std::shared_ptr<BackgroundSettings> bg_settings_;
std::unique_ptr<nux::AbstractPaintLayer> background_layer_;
diff --git a/lockscreen/KylinUserPromptView.h b/lockscreen/KylinUserPromptView.h
index a6938e409..b19733395 100644
--- a/lockscreen/KylinUserPromptView.h
+++ b/lockscreen/KylinUserPromptView.h
@@ -1,6 +1,6 @@
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
/*
-* Copyright (C) 2014 Canonical Ltd
+* Copyright (C) 2015 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
diff --git a/lockscreen/LockScreenAbstractPromptView.h b/lockscreen/LockScreenAbstractPromptView.h
index 3a5d5284f..11811d92d 100644
--- a/lockscreen/LockScreenAbstractPromptView.h
+++ b/lockscreen/LockScreenAbstractPromptView.h
@@ -1,6 +1,6 @@
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
/*
- * Copyright (C) 2014 Canonical Ltd
+ * Copyright (C) 2015 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
diff --git a/lockscreen/LockScreenAbstractShield.h b/lockscreen/LockScreenAbstractShield.h
index 603e0294a..394b73689 100644
--- a/lockscreen/LockScreenAbstractShield.h
+++ b/lockscreen/LockScreenAbstractShield.h
@@ -25,6 +25,7 @@
#include <UnityCore/Indicators.h>
#include "unity-shared/MockableBaseWindow.h"
+#include "unity-shared/UnitySettings.h"
#include "LockScreenAccelerators.h"
namespace unity
@@ -60,6 +61,11 @@ public:
virtual bool HasGrab() const = 0;
virtual bool IsIndicatorOpen() const { return false; }
virtual void ActivatePanel() {}
+ virtual bool AcceptKeyNavFocus() { return false; }
+ virtual void UpdateScale()
+ {
+ scale = Settings::Instance().em(monitor)->DPIScale();
+ }
sigc::signal<void> grabbed;
sigc::signal<void> grab_failed;
diff --git a/lockscreen/LockScreenShield.cpp b/lockscreen/LockScreenShield.cpp
index d936b12f2..f0719b765 100644
--- a/lockscreen/LockScreenShield.cpp
+++ b/lockscreen/LockScreenShield.cpp
@@ -96,11 +96,6 @@ Shield::Shield(session::Manager::Ptr const& session_manager,
});
}
-void Shield::UpdateScale()
-{
- scale = unity::Settings::Instance().em(monitor)->DPIScale();
-}
-
void Shield::UpdateBackgroundTexture()
{
auto const& monitor_geo = UScreen::GetDefault()->GetMonitorGeometry(monitor);
@@ -259,11 +254,6 @@ nux::Area* Shield::FindKeyFocusArea(unsigned etype, unsigned long keysym, unsign
return nullptr;
}
-bool Shield::AcceptKeyNavFocus()
-{
- return false;
-}
-
nux::Area* Shield::FindAreaUnderMouse(nux::Point const& mouse, nux::NuxEventType event_type)
{
nux::Area* area = BaseWindow::FindAreaUnderMouse(mouse, event_type);
diff --git a/lockscreen/LockScreenShield.h b/lockscreen/LockScreenShield.h
index 7c2e31380..b6000f62b 100644
--- a/lockscreen/LockScreenShield.h
+++ b/lockscreen/LockScreenShield.h
@@ -49,7 +49,6 @@ public:
void ActivatePanel() override;
protected:
- bool AcceptKeyNavFocus() override;
nux::Area* FindKeyFocusArea(unsigned int, unsigned long, unsigned long) override;
nux::Area* FindAreaUnderMouse(nux::Point const&, nux::NuxEventType) override;
@@ -58,7 +57,6 @@ private:
void GrabScreen(bool cancel_on_failure);
void ShowPrimaryView();
void ShowSecondaryView();
- void UpdateScale();
Panel* CreatePanel();
std::shared_ptr<BackgroundSettings> bg_settings_;