pref/appearence: Rename several files

No functional change intended

Change-Id: I6ccc417098f5713e80348da767a914ceec5c8b4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8870
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Pascal Abresch 2025-01-28 01:39:22 +01:00 committed by nephele nephele
parent 3d1f0f31ec
commit 222402172a
11 changed files with 105 additions and 109 deletions

View File

@ -1,49 +0,0 @@
/*
* Copyright 2002-2012, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm (darkwyrm@earthlink.net)
* Alexander von Gluck, kallisti5@unixzen.com
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef APR_WINDOW_H
#define APR_WINDOW_H
#include <Application.h>
#include <Button.h>
#include <Window.h>
#include <Message.h>
#include <TabView.h>
class APRView;
class AntialiasingSettingsView;
class FontView;
class LookAndFeelSettingsView;
class APRWindow : public BWindow {
public:
APRWindow(BRect frame);
void MessageReceived(BMessage *message);
private:
void _UpdateButtons();
bool _IsDefaultable() const;
bool _IsRevertable() const;
APRView* fColorsView;
BButton* fDefaultsButton;
BButton* fRevertButton;
AntialiasingSettingsView* fAntialiasingSettings;
FontView* fFontSettings;
LookAndFeelSettingsView* fLookAndFeelSettings;
};
static const int32 kMsgUpdate = 'updt';
#endif

View File

@ -23,7 +23,7 @@
#include <TextView.h>
#include "APRWindow.h"
#include "AppearanceWindow.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "AntialiasingSettingsView"

View File

@ -5,24 +5,24 @@
* Authors:
* DarkWyrm (darkwyrm@earthlink.net)
*/
#include "APRMain.h"
#include "APRWindow.h"
#include "Appearance.h"
#include "AppearanceWindow.h"
#include <stdio.h>
#include <Catalog.h>
#include <Locale.h>
APRApplication::APRApplication(void)
AppearanceApplication::AppearanceApplication(void)
: BApplication("application/x-vnd.Haiku-Appearance")
{
fWindow = new APRWindow(BRect(100, 100, 550, 420));
fWindow = new AppearanceWindow(BRect(100, 100, 550, 420));
fWindow->Show();
}
int
main(int, char**)
{
APRApplication myApplication;
AppearanceApplication myApplication;
myApplication.Run();
return(0);

View File

@ -5,22 +5,22 @@
* Authors:
* DarkWyrm (darkwyrm@earthlink.net)
*/
#ifndef APR_MAIN_H
#define APR_MAIN_H
#ifndef APPEARANCE_H
#define APPEARANCE_H
#include <Application.h>
#include <Catalog.h>
class APRWindow;
class AppearanceWindow;
class APRApplication : public BApplication
class AppearanceApplication : public BApplication
{
public:
APRApplication(void);
AppearanceApplication(void);
private:
APRWindow *fWindow;
AppearanceWindow *fWindow;
};
#endif
#endif /* APPEARANCE_H */

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2011, Haiku. All rights reserved.
* Copyright 2002-2025, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -9,7 +9,7 @@
*/
#include "APRWindow.h"
#include "AppearanceWindow.h"
#include <Button.h>
#include <Catalog.h>
@ -20,11 +20,12 @@
#include <TabView.h>
#include "AntialiasingSettingsView.h"
#include "APRView.h"
#include "ColorsView.h"
#include "FontView.h"
#include "LookAndFeelSettingsView.h"
// This file used to be called APRWindow, left this to avoid retranslating everything
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "APRWindow"
@ -33,7 +34,7 @@ static const uint32 kMsgSetDefaults = 'dflt';
static const uint32 kMsgRevert = 'rvrt';
APRWindow::APRWindow(BRect frame)
AppearanceWindow::AppearanceWindow(BRect frame)
:
BWindow(frame, B_TRANSLATE_SYSTEM_NAME("Appearance"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS
@ -49,7 +50,7 @@ APRWindow::APRWindow(BRect frame)
fFontSettings = new FontView(B_TRANSLATE("Fonts"));
fColorsView = new APRView(B_TRANSLATE("Colors"));
fColorsView = new ColorsView(B_TRANSLATE("Colors"));
fLookAndFeelSettings = new LookAndFeelSettingsView(
B_TRANSLATE("Look and feel"));
@ -79,7 +80,7 @@ APRWindow::APRWindow(BRect frame)
void
APRWindow::MessageReceived(BMessage *message)
AppearanceWindow::MessageReceived(BMessage *message)
{
switch (message->what) {
case kMsgUpdate:
@ -112,7 +113,7 @@ APRWindow::MessageReceived(BMessage *message)
void
APRWindow::_UpdateButtons()
AppearanceWindow::_UpdateButtons()
{
fDefaultsButton->SetEnabled(_IsDefaultable());
fRevertButton->SetEnabled(_IsRevertable());
@ -120,7 +121,7 @@ APRWindow::_UpdateButtons()
bool
APRWindow::_IsDefaultable() const
AppearanceWindow::_IsDefaultable() const
{
// printf("fonts defaultable: %d\n", fFontSettings->IsDefaultable());
// printf("colors defaultable: %d\n", fColorsView->IsDefaultable());
@ -134,7 +135,7 @@ APRWindow::_IsDefaultable() const
bool
APRWindow::_IsRevertable() const
AppearanceWindow::_IsRevertable() const
{
// printf("fonts revertable: %d\n", fFontSettings->IsRevertable());
// printf("colors revertable: %d\n", fColorsView->IsRevertable());

View File

@ -0,0 +1,49 @@
/*
* Copyright 2002-2025, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm (darkwyrm@earthlink.net)
* Alexander von Gluck, kallisti5@unixzen.com
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef APPEARANCE_WINDOW_H
#define APPEARANCE_WINDOW_H
#include <Application.h>
#include <Button.h>
#include <Window.h>
#include <Message.h>
#include <TabView.h>
class ColorsView;
class AntialiasingSettingsView;
class FontView;
class LookAndFeelSettingsView;
class AppearanceWindow : public BWindow {
public:
AppearanceWindow(BRect frame);
void MessageReceived(BMessage *message);
private:
void _UpdateButtons();
bool _IsDefaultable() const;
bool _IsRevertable() const;
ColorsView* fColorsView;
BButton* fDefaultsButton;
BButton* fRevertButton;
AntialiasingSettingsView* fAntialiasingSettings;
FontView* fFontSettings;
LookAndFeelSettingsView* fLookAndFeelSettings;
};
static const int32 kMsgUpdate = 'updt';
#endif /* APPEARANCE_WINDOW_H */

View File

@ -10,7 +10,6 @@
*/
#include "APRView.h"
#include <stdio.h>
@ -29,8 +28,9 @@
#include <Path.h>
#include <SpaceLayoutItem.h>
#include "APRWindow.h"
#include "AppearanceWindow.h"
#include "Colors.h"
#include "ColorsView.h"
#undef B_TRANSLATION_CONTEXT
@ -47,7 +47,7 @@ using BPrivate::BColorListView;
using BPrivate::BColorPreview;
APRView::APRView(const char* name)
ColorsView::ColorsView(const char* name)
:
BView(name, B_WILL_DRAW)
{
@ -87,13 +87,13 @@ APRView::APRView(const char* name)
}
APRView::~APRView()
ColorsView::~ColorsView()
{
}
void
APRView::AttachedToWindow()
ColorsView::AttachedToWindow()
{
fAutoSelectCheckBox->SetTarget(this);
fPicker->SetTarget(this);
@ -106,7 +106,7 @@ APRView::AttachedToWindow()
void
APRView::MessageReceived(BMessage* message)
ColorsView::MessageReceived(BMessage* message)
{
if (message->WasDropped()) {
// Received from color preview when dropped on
@ -194,7 +194,7 @@ APRView::MessageReceived(BMessage* message)
void
APRView::LoadSettings()
ColorsView::LoadSettings()
{
get_default_colors(&fDefaultColors);
get_current_colors(&fCurrentColors);
@ -203,7 +203,7 @@ APRView::LoadSettings()
void
APRView::SetDefaults()
ColorsView::SetDefaults()
{
_SetUIColors(fDefaultColors);
_UpdatePreviews(fDefaultColors);
@ -221,7 +221,7 @@ APRView::SetDefaults()
void
APRView::Revert()
ColorsView::Revert()
{
_SetUIColors(fPrevColors);
_UpdatePreviews(fPrevColors);
@ -236,21 +236,21 @@ APRView::Revert()
bool
APRView::IsDefaultable()
ColorsView::IsDefaultable()
{
return !fDefaultColors.HasSameData(fCurrentColors);
}
bool
APRView::IsRevertable()
ColorsView::IsRevertable()
{
return !fPrevColors.HasSameData(fCurrentColors);
}
void
APRView::_CreateItems()
ColorsView::_CreateItems()
{
while (fAttrList->CountItems() > 0)
delete fAttrList->RemoveItem((int32)0);
@ -278,7 +278,7 @@ APRView::_CreateItems()
void
APRView::_UpdatePreviews(const BMessage& colors)
ColorsView::_UpdatePreviews(const BMessage& colors)
{
rgb_color color;
for (int32 i = color_description_count() - 1; i >= 0; i--) {
@ -296,7 +296,7 @@ APRView::_UpdatePreviews(const BMessage& colors)
void
APRView::_SetUIColors(const BMessage& colors)
ColorsView::_SetUIColors(const BMessage& colors)
{
set_ui_colors(&colors);
fCurrentColors = colors;
@ -304,7 +304,7 @@ APRView::_SetUIColors(const BMessage& colors)
void
APRView::_SetCurrentColor(rgb_color color)
ColorsView::_SetCurrentColor(rgb_color color)
{
_SetColor(fWhich, color);
@ -321,7 +321,7 @@ APRView::_SetCurrentColor(rgb_color color)
void
APRView::_SetColor(color_which which, rgb_color color)
ColorsView::_SetColor(color_which which, rgb_color color)
{
_SetOneColor(which, color);
@ -437,7 +437,7 @@ APRView::_SetColor(color_which which, rgb_color color)
void
APRView::_SetOneColor(color_which which, rgb_color color)
ColorsView::_SetOneColor(color_which which, rgb_color color)
{
if (ui_color(which) == color)
return;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015, Haiku. All rights reserved.
* Copyright 2002-2025, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -8,8 +8,8 @@
* Stephan Aßmus <superstippi@gmx.de>
* Joseph Groover <looncraz@looncraz.net>
*/
#ifndef APR_VIEW_H_
#define APR_VIEW_H_
#ifndef COLORS_VIEW_H_
#define COLORS_VIEW_H_
#include <Button.h>
@ -38,10 +38,10 @@ class APRWindow;
using BPrivate::BColorPreview;
class APRView : public BView {
class ColorsView : public BView {
public:
APRView(const char *name);
virtual ~APRView();
ColorsView(const char *name);
virtual ~ColorsView();
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg);
@ -80,4 +80,4 @@ private:
BMessage fCurrentColors;
};
#endif // APR_VIEW_H_
#endif // COLORS_VIEW_H_

View File

@ -25,7 +25,7 @@
#include <MessageRunner.h>
#include <SpaceLayoutItem.h>
#include "APRWindow.h"
#include "AppearanceWindow.h"
#include "FontSelectionView.h"
#undef B_TRANSLATION_CONTEXT

View File

@ -5,20 +5,15 @@ AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders shared app interface [ FDirName servers app ] ;
Preference Appearance :
APRMain.cpp
AntialiasingSettingsView.cpp
LookAndFeelSettingsView.cpp
Appearance.cpp
AppearanceWindow.cpp
Colors.cpp
ColorsView.cpp
FakeScrollBar.cpp
FontSelectionView.cpp
FontView.cpp
APRView.cpp
APRWindow.cpp
Colors.cpp
# These are currently disabled while everything else is being worked on
#CurView.cpp
#CursorWhichItem.cpp
#SysCursorAPI.cpp
LookAndFeelSettingsView.cpp
: be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub shared
: Appearance.rdef
@ -28,8 +23,8 @@ DoCatalogs Appearance :
x-vnd.Haiku-Appearance
:
AntialiasingSettingsView.cpp
APRView.cpp
APRWindow.cpp
ColorsView.cpp
AppearanceWindow.cpp
Colors.cpp
LookAndFeelSettingsView.cpp
FontView.cpp

View File

@ -40,7 +40,7 @@
#include <StringView.h>
#include <TextView.h>
#include "APRWindow.h"
#include "AppearanceWindow.h"
#include "FakeScrollBar.h"