Use the kDesktopWindowLook/kDesktopWindowFeel constants from WindowPrivate.h...

... instead of redefining them, or including a private Tracker header to
get them.
This commit is contained in:
Augustin Cavalier
2016-10-22 04:24:49 -04:00
parent 49a2d53d35
commit 3798bf90cb
7 changed files with 16 additions and 20 deletions
+4 -7
View File
@@ -14,6 +14,7 @@
#include <Path.h> #include <Path.h>
#include <Screen.h> #include <Screen.h>
#include <View.h> #include <View.h>
#include <WindowPrivate.h>
#include "LoginApp.h" #include "LoginApp.h"
#include "DesktopWindow.h" #include "DesktopWindow.h"
@@ -21,15 +22,11 @@
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Desktop Window" #define B_TRANSLATION_CONTEXT "Desktop Window"
const window_feel kPrivateDesktopWindowFeel = window_feel(1024);
const window_look kPrivateDesktopWindowLook = window_look(4);
// this is a mirror of an app server private values
DesktopWindow::DesktopWindow(BRect frame, bool editMode) DesktopWindow::DesktopWindow(BRect frame, bool editMode)
: BWindow(frame, B_TRANSLATE("Desktop"), : BWindow(frame, B_TRANSLATE("Desktop"),
kPrivateDesktopWindowLook, kDesktopWindowLook,
kPrivateDesktopWindowFeel, kDesktopWindowFeel,
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
| B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE
| B_ASYNCHRONOUS_CONTROLS, | B_ASYNCHRONOUS_CONTROLS,
+1 -1
View File
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src apps login ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders app ; UsePrivateHeaders app interface ;
#UsePrivateHeaders shared ; #UsePrivateHeaders shared ;
#UsePrivateHeaders tracker ; #UsePrivateHeaders tracker ;
#SubDirHdrs $(HAIKU_TOP) src kits tracker ; #SubDirHdrs $(HAIKU_TOP) src kits tracker ;
+4 -4
View File
@@ -13,6 +13,7 @@
#include <algorithm> #include <algorithm>
#include <Bitmap.h>
#include <Control.h> #include <Control.h>
#include <GradientLinear.h> #include <GradientLinear.h>
#include <LayoutUtils.h> #include <LayoutUtils.h>
@@ -21,8 +22,7 @@
#include <String.h> #include <String.h>
#include <View.h> #include <View.h>
#include <Window.h> #include <Window.h>
#include <WindowPrivate.h>
#include "ContainerWindow.h"
namespace BPrivate { namespace BPrivate {
@@ -1790,8 +1790,8 @@ BControlLook::DrawLabel(BView* view, const char* label, const rgb_color& base,
BWindow* window = view->Window(); BWindow* window = view->Window();
bool isDesktop = window bool isDesktop = window
&& window->Feel() == kPrivateDesktopWindowFeel && window->Feel() == kDesktopWindowFeel
&& window->Look() == kPrivateDesktopWindowLook && window->Look() == kDesktopWindowLook
&& view->Parent() && view->Parent()
&& view->Parent()->Parent() == NULL && view->Parent()->Parent() == NULL
&& (flags & B_IGNORE_OUTLINE) == 0; && (flags & B_IGNORE_OUTLINE) == 0;
+2 -1
View File
@@ -58,6 +58,7 @@ All rights reserved.
#include <UnicodeChar.h> #include <UnicodeChar.h>
#include <Volume.h> #include <Volume.h>
#include <VolumeRoster.h> #include <VolumeRoster.h>
#include <WindowPrivate.h>
#include <fs_attr.h> #include <fs_attr.h>
#include <image.h> #include <image.h>
@@ -585,7 +586,7 @@ BContainerWindow::~BContainerWindow()
BRect BRect
BContainerWindow::InitialWindowRect(window_feel feel) BContainerWindow::InitialWindowRect(window_feel feel)
{ {
if (feel != kPrivateDesktopWindowFeel) if (feel != kDesktopWindowFeel)
return sNewWindRect; return sNewWindRect;
// do not offset desktop window // do not offset desktop window
-4
View File
@@ -70,10 +70,6 @@ class SelectionWindow;
extern const char* kAddOnsMenuName; extern const char* kAddOnsMenuName;
const window_feel kPrivateDesktopWindowFeel = window_feel(1024);
const window_look kPrivateDesktopWindowLook = window_look(4);
// this is a mirror of an app server private values
enum { enum {
// flags that describe opening of the window // flags that describe opening of the window
+3 -2
View File
@@ -50,6 +50,7 @@ All rights reserved.
#include <String.h> #include <String.h>
#include <StringList.h> #include <StringList.h>
#include <Volume.h> #include <Volume.h>
#include <WindowPrivate.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
@@ -186,8 +187,8 @@ LoadAddOnDir(BDirectory directory, BDeskWindow* window,
BDeskWindow::BDeskWindow(LockingList<BWindow>* windowList) BDeskWindow::BDeskWindow(LockingList<BWindow>* windowList)
: :
BContainerWindow(windowList, 0, kPrivateDesktopWindowLook, BContainerWindow(windowList, 0, kDesktopWindowLook,
kPrivateDesktopWindowFeel, B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK kDesktopWindowFeel, B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK
| B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_NOT_MINIMIZABLE
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES, | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES,
false, true), false, true),
+2 -1
View File
@@ -39,6 +39,7 @@ All rights reserved.
#include <Locale.h> #include <Locale.h>
#include <MenuItem.h> #include <MenuItem.h>
#include <MessageFilter.h> #include <MessageFilter.h>
#include <WindowPrivate.h>
#include "AutoLock.h" #include "AutoLock.h"
#include "ContainerWindow.h" #include "ContainerWindow.h"
@@ -65,7 +66,7 @@ SelectionWindow::SelectionWindow(BContainerWindow* window)
| B_NOT_ANCHORED_ON_ACTIVATE), | B_NOT_ANCHORED_ON_ACTIVATE),
fParentWindow(window) fParentWindow(window)
{ {
if (window->Feel() & kPrivateDesktopWindowFeel) { if (window->Feel() & kDesktopWindowFeel) {
// The window will not show up if we have // The window will not show up if we have
// B_FLOATING_SUBSET_WINDOW_FEEL and use it with the desktop window // B_FLOATING_SUBSET_WINDOW_FEEL and use it with the desktop window
// since it's never in front. // since it's never in front.