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

View File

@ -14,6 +14,7 @@
#include <Path.h>
#include <Screen.h>
#include <View.h>
#include <WindowPrivate.h>
#include "LoginApp.h"
#include "DesktopWindow.h"
@ -21,15 +22,11 @@
#undef B_TRANSLATION_CONTEXT
#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)
: BWindow(frame, B_TRANSLATE("Desktop"),
kPrivateDesktopWindowLook,
kPrivateDesktopWindowFeel,
: BWindow(frame, B_TRANSLATE("Desktop"),
kDesktopWindowLook,
kDesktopWindowFeel,
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
| B_NOT_MINIMIZABLE | B_NOT_RESIZABLE
| B_ASYNCHRONOUS_CONTROLS,

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src apps login ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders app ;
UsePrivateHeaders app interface ;
#UsePrivateHeaders shared ;
#UsePrivateHeaders tracker ;
#SubDirHdrs $(HAIKU_TOP) src kits tracker ;

View File

@ -13,6 +13,7 @@
#include <algorithm>
#include <Bitmap.h>
#include <Control.h>
#include <GradientLinear.h>
#include <LayoutUtils.h>
@ -21,8 +22,7 @@
#include <String.h>
#include <View.h>
#include <Window.h>
#include "ContainerWindow.h"
#include <WindowPrivate.h>
namespace BPrivate {
@ -1790,8 +1790,8 @@ BControlLook::DrawLabel(BView* view, const char* label, const rgb_color& base,
BWindow* window = view->Window();
bool isDesktop = window
&& window->Feel() == kPrivateDesktopWindowFeel
&& window->Look() == kPrivateDesktopWindowLook
&& window->Feel() == kDesktopWindowFeel
&& window->Look() == kDesktopWindowLook
&& view->Parent()
&& view->Parent()->Parent() == NULL
&& (flags & B_IGNORE_OUTLINE) == 0;

View File

@ -58,6 +58,7 @@ All rights reserved.
#include <UnicodeChar.h>
#include <Volume.h>
#include <VolumeRoster.h>
#include <WindowPrivate.h>
#include <fs_attr.h>
#include <image.h>
@ -585,7 +586,7 @@ BContainerWindow::~BContainerWindow()
BRect
BContainerWindow::InitialWindowRect(window_feel feel)
{
if (feel != kPrivateDesktopWindowFeel)
if (feel != kDesktopWindowFeel)
return sNewWindRect;
// do not offset desktop window

View File

@ -70,10 +70,6 @@ class SelectionWindow;
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 {
// flags that describe opening of the window

View File

@ -50,6 +50,7 @@ All rights reserved.
#include <String.h>
#include <StringList.h>
#include <Volume.h>
#include <WindowPrivate.h>
#include <fcntl.h>
#include <unistd.h>
@ -186,8 +187,8 @@ LoadAddOnDir(BDirectory directory, BDeskWindow* window,
BDeskWindow::BDeskWindow(LockingList<BWindow>* windowList)
:
BContainerWindow(windowList, 0, kPrivateDesktopWindowLook,
kPrivateDesktopWindowFeel, B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK
BContainerWindow(windowList, 0, kDesktopWindowLook,
kDesktopWindowFeel, B_NOT_MOVABLE | B_WILL_ACCEPT_FIRST_CLICK
| B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_NOT_MINIMIZABLE
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES,
false, true),

View File

@ -39,6 +39,7 @@ All rights reserved.
#include <Locale.h>
#include <MenuItem.h>
#include <MessageFilter.h>
#include <WindowPrivate.h>
#include "AutoLock.h"
#include "ContainerWindow.h"
@ -65,7 +66,7 @@ SelectionWindow::SelectionWindow(BContainerWindow* window)
| B_NOT_ANCHORED_ON_ACTIVATE),
fParentWindow(window)
{
if (window->Feel() & kPrivateDesktopWindowFeel) {
if (window->Feel() & kDesktopWindowFeel) {
// The window will not show up if we have
// B_FLOATING_SUBSET_WINDOW_FEEL and use it with the desktop window
// since it's never in front.