summaryrefslogtreecommitdiff
path: root/src
diff options
authorGord Allott <gord.allott@canonical.com>2010-12-15 16:16:09 +0000
committerGord Allott <gord.allott@canonical.com>2010-12-15 16:16:09 +0000
commitaea179e90d34dc9c987705bec5074bd237c4160c (patch)
tree99980e861a7f1fcaf50239347bee5215bbd09181 /src
parent45ded8c25b0086bdf88b2443131a429a5612406f (diff)
fix for the weird offset + jay nux fixes
(bzr r701.2.4)
Diffstat (limited to 'src')
-rw-r--r--src/PlacesController.cpp11
-rw-r--r--src/PlacesController.h4
-rw-r--r--src/PlacesView.cpp14
-rw-r--r--src/PlacesView.h5
4 files changed, 16 insertions, 18 deletions
diff --git a/src/PlacesController.cpp b/src/PlacesController.cpp
index 9afabfce1..cefc61fdc 100644
--- a/src/PlacesController.cpp
+++ b/src/PlacesController.cpp
@@ -43,11 +43,10 @@ PlacesController::PlacesController ()
_Window = new PlacesView ();
_Window->SetConfigureNotifyCallback(&PlacesController::WindowConfigureCallback, this);
- _Window->SetBlurredBackground(true);
+ //_Window->SetBlurredBackground(true);
_Window->ShowWindow(false);
- _Window->EnableInputWindow(false);
- _Window->InputWindowEnableStruts(false);
- _Window->SetBaseXY (0, 0);
+ //_Window->EnableInputWindow(false);
+ //_Window->InputWindowEnableStruts(false);
_Window->OnMouseDownOutsideArea.connect (sigc::mem_fun (this, &PlacesController::RecvMouseDownOutsideOfView));
}
@@ -73,7 +72,7 @@ void PlacesController::Hide ()
void PlacesController::ToggleShowHide ()
{
- if (_Window->IsVisible)
+ if (_Window->IsVisible ())
Hide ();
else
Show ();
@@ -83,7 +82,7 @@ void PlacesController::ToggleShowHide ()
void
PlacesController::WindowConfigureCallback(int WindowWidth, int WindowHeight, nux::Geometry& geo, void *user_data)
{
- geo = nux::Geometry(100, 100, 1024, 600);
+ geo = nux::Geometry(0, 0, 1024, 600);
}
void
diff --git a/src/PlacesController.h b/src/PlacesController.h
index 9f4f723b6..0b5dbd841 100644
--- a/src/PlacesController.h
+++ b/src/PlacesController.h
@@ -38,7 +38,7 @@ public:
void Hide ();
void ToggleShowHide ();
-
+ PlacesView *_Window;
protected:
const gchar* GetName ();
void AddProperties (GVariantBuilder *builder);
@@ -49,7 +49,7 @@ protected:
void RecvMouseDownOutsideOfView (int x, int y, unsigned long button_flags, unsigned long key_flags);
- PlacesView *_Window;
+
nux::Layout *_Layout;
};
diff --git a/src/PlacesView.cpp b/src/PlacesView.cpp
index 4476ed065..1e456a7ae 100644
--- a/src/PlacesView.cpp
+++ b/src/PlacesView.cpp
@@ -24,8 +24,10 @@
#include "PlacesView.h"
+NUX_IMPLEMENT_OBJECT_TYPE (PlacesView);
+
PlacesView::PlacesView (NUX_FILE_LINE_DECL)
-: BaseWindow("", NUX_FILE_LINE_PARAM)
+: nux::BaseWindow("", NUX_FILE_LINE_PARAM)
{
//~ SetBaseSize (800, 600);
//SetWidth (800);
@@ -35,7 +37,7 @@ PlacesView::PlacesView (NUX_FILE_LINE_DECL)
//~ SetMaximumSize (600, 200);
//~ SetMinimumSize (600, 200);
//SetGeometry (nux::Geometry (0, 0, 100, 100));
- IsVisible = false;
+ Hide ();
}
PlacesView::~PlacesView ()
@@ -98,15 +100,14 @@ void PlacesView::PostDraw (nux::GraphicsEngine &GfxContext, bool force_draw)
void PlacesView::ShowWindow (bool b, bool start_modal)
{
- BaseWindow::ShowWindow (b, start_modal);
+ nux::BaseWindow::ShowWindow (b, start_modal);
}
void PlacesView::Show ()
{
- if (IsVisible)
+ if (IsVisible ())
return;
- IsVisible = true;
// FIXME: ShowWindow shouldn't need to be called first
ShowWindow (true, false);
EnableInputWindow (true, 1);
@@ -118,10 +119,9 @@ void PlacesView::Show ()
void PlacesView::Hide ()
{
- if (!IsVisible)
+ if (!IsVisible ())
return;
- IsVisible = false;
CaptureMouseDownAnyWhereElse (false);
ForceStopFocus (1, 1);
UnGrabPointer ();
diff --git a/src/PlacesView.h b/src/PlacesView.h
index 9a2d0cf62..43271f503 100644
--- a/src/PlacesView.h
+++ b/src/PlacesView.h
@@ -28,8 +28,9 @@
#include "Introspectable.h"
-class PlacesView : public Introspectable, public nux::BaseWindow
+class PlacesView : public nux::BaseWindow, public Introspectable
{
+ NUX_DECLARE_OBJECT_TYPE (PlacesView, nux::BaseWindow);
public:
PlacesView (NUX_FILE_LINE_PROTO);
~PlacesView ();
@@ -43,8 +44,6 @@ public:
void Show ();
void Hide ();
- bool IsVisible;
-
protected:
const gchar* GetName ();