[haiku-commits] r42704 - in haiku/branches/developer/aldeck/tracker_layout/src: kits/tracker tests/kits/tracker

  • From: alex@xxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 31 Aug 2011 01:54:32 +0200 (CEST)

Author: aldeck
Date: 2011-08-31 01:54:31 +0200 (Wed, 31 Aug 2011)
New Revision: 42704
Changeset: https://dev.haiku-os.org/changeset/42704

Modified:
   haiku/branches/developer/aldeck/tracker_layout/src/kits/tracker/PoseView.cpp
   
haiku/branches/developer/aldeck/tracker_layout/src/tests/kits/tracker/PoseViewTest.cpp
Log:
* Remove another unneeded dependency on BContainerWindow, BWindow is enough. 
Note for later: activate on click might be unwanted 
for future client apps/windows (make it customizable if needed).

 Left click selecting works in PoseViewTest now.


Modified: 
haiku/branches/developer/aldeck/tracker_layout/src/kits/tracker/PoseView.cpp
===================================================================
--- 
haiku/branches/developer/aldeck/tracker_layout/src/kits/tracker/PoseView.cpp    
    2011-08-30 22:10:46 UTC (rev 42703)
+++ 
haiku/branches/developer/aldeck/tracker_layout/src/kits/tracker/PoseView.cpp    
    2011-08-30 23:54:31 UTC (rev 42704)
@@ -6717,9 +6717,6 @@
 {
        // handle disposing of drag data lazily
        DragStop();
-       BContainerWindow *window = ContainerWindow();
-       if (!window)
-               return;
 
        if (IsDesktopWindow()) {
                BScreen screen(Window());
@@ -6730,7 +6727,7 @@
 
        MakeFocus();
 
-       uint32 buttons = (uint32)window->CurrentMessage()->FindInt32("buttons");
+       uint32 buttons = 
(uint32)Window()->CurrentMessage()->FindInt32("buttons");
        uint32 modifs = modifiers();
 
        if (buttons == B_SECONDARY_MOUSE_BUTTON)
@@ -6754,8 +6751,8 @@
                // click was not in any pose
                fLastClickedPose = NULL;
 
-               window->Activate();
-               window->UpdateIfNeeded();
+               Window()->Activate();
+               Window()->UpdateIfNeeded();
 
                // only clear selection if we are not extending it
                if (!extendSelection || !fSelectionRectEnabled || 
!fMultipleSelection)

Modified: 
haiku/branches/developer/aldeck/tracker_layout/src/tests/kits/tracker/PoseViewTest.cpp
===================================================================
--- 
haiku/branches/developer/aldeck/tracker_layout/src/tests/kits/tracker/PoseViewTest.cpp
      2011-08-30 22:10:46 UTC (rev 42703)
+++ 
haiku/branches/developer/aldeck/tracker_layout/src/tests/kits/tracker/PoseViewTest.cpp
      2011-08-30 23:54:31 UTC (rev 42704)
@@ -28,10 +28,12 @@
 
 
 Window::Window()
-       : BWindow(BRect(100, 100, 520, 430), "PoseViewTest /boot/home",
+       : BWindow(BRect(100, 100, 520, 430), "",
                        B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
 {
-       BEntry entry("/boot/home/");
+       const char* path = "/boot/home/Desktop";
+       SetTitle(BString("PoseViewTest ").Append(path).String());
+       BEntry entry(path);
        entry_ref ref;
        entry.GetRef(&ref);
        Model* model = new Model(&ref, true);


Other related posts:

  • » [haiku-commits] r42704 - in haiku/branches/developer/aldeck/tracker_layout/src: kits/tracker tests/kits/tracker - alex