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 <[email protected]>
This commit is contained in:
Pascal Abresch
2025-01-28 03:10:21 +00:00
committed by nephele nephele
parent 3d1f0f31ec
commit 222402172a
11 changed files with 105 additions and 109 deletions
-49
View File
@@ -1,49 +0,0 @@
/*
* Copyright 2002-2012, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm ([email protected])
* Alexander von Gluck, [email protected]
* Stephan Aßmus <[email protected]>
*/
#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
@@ -23,7 +23,7 @@
#include <TextView.h> #include <TextView.h>
#include "APRWindow.h" #include "AppearanceWindow.h"
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "AntialiasingSettingsView" #define B_TRANSLATION_CONTEXT "AntialiasingSettingsView"
@@ -5,24 +5,24 @@
* Authors: * Authors:
* DarkWyrm (darkwyrm@earthlink.net) * DarkWyrm (darkwyrm@earthlink.net)
*/ */
#include "APRMain.h" #include "Appearance.h"
#include "APRWindow.h" #include "AppearanceWindow.h"
#include <stdio.h> #include <stdio.h>
#include <Catalog.h> #include <Catalog.h>
#include <Locale.h> #include <Locale.h>
APRApplication::APRApplication(void) AppearanceApplication::AppearanceApplication(void)
: BApplication("application/x-vnd.Haiku-Appearance") : BApplication("application/x-vnd.Haiku-Appearance")
{ {
fWindow = new APRWindow(BRect(100, 100, 550, 420)); fWindow = new AppearanceWindow(BRect(100, 100, 550, 420));
fWindow->Show(); fWindow->Show();
} }
int int
main(int, char**) main(int, char**)
{ {
APRApplication myApplication; AppearanceApplication myApplication;
myApplication.Run(); myApplication.Run();
return(0); return(0);
@@ -5,22 +5,22 @@
* Authors: * Authors:
* DarkWyrm (darkwyrm@earthlink.net) * DarkWyrm (darkwyrm@earthlink.net)
*/ */
#ifndef APR_MAIN_H #ifndef APPEARANCE_H
#define APR_MAIN_H #define APPEARANCE_H
#include <Application.h> #include <Application.h>
#include <Catalog.h> #include <Catalog.h>
class APRWindow; class AppearanceWindow;
class APRApplication : public BApplication class AppearanceApplication : public BApplication
{ {
public: public:
APRApplication(void); AppearanceApplication(void);
private: private:
APRWindow *fWindow; AppearanceWindow *fWindow;
}; };
#endif #endif /* APPEARANCE_H */
@@ -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. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -9,7 +9,7 @@
*/ */
#include "APRWindow.h" #include "AppearanceWindow.h"
#include <Button.h> #include <Button.h>
#include <Catalog.h> #include <Catalog.h>
@@ -20,11 +20,12 @@
#include <TabView.h> #include <TabView.h>
#include "AntialiasingSettingsView.h" #include "AntialiasingSettingsView.h"
#include "APRView.h" #include "ColorsView.h"
#include "FontView.h" #include "FontView.h"
#include "LookAndFeelSettingsView.h" #include "LookAndFeelSettingsView.h"
// This file used to be called APRWindow, left this to avoid retranslating everything
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "APRWindow" #define B_TRANSLATION_CONTEXT "APRWindow"
@@ -33,7 +34,7 @@ static const uint32 kMsgSetDefaults = 'dflt';
static const uint32 kMsgRevert = 'rvrt'; static const uint32 kMsgRevert = 'rvrt';
APRWindow::APRWindow(BRect frame) AppearanceWindow::AppearanceWindow(BRect frame)
: :
BWindow(frame, B_TRANSLATE_SYSTEM_NAME("Appearance"), B_TITLED_WINDOW, BWindow(frame, B_TRANSLATE_SYSTEM_NAME("Appearance"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS 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")); fFontSettings = new FontView(B_TRANSLATE("Fonts"));
fColorsView = new APRView(B_TRANSLATE("Colors")); fColorsView = new ColorsView(B_TRANSLATE("Colors"));
fLookAndFeelSettings = new LookAndFeelSettingsView( fLookAndFeelSettings = new LookAndFeelSettingsView(
B_TRANSLATE("Look and feel")); B_TRANSLATE("Look and feel"));
@@ -79,7 +80,7 @@ APRWindow::APRWindow(BRect frame)
void void
APRWindow::MessageReceived(BMessage *message) AppearanceWindow::MessageReceived(BMessage *message)
{ {
switch (message->what) { switch (message->what) {
case kMsgUpdate: case kMsgUpdate:
@@ -112,7 +113,7 @@ APRWindow::MessageReceived(BMessage *message)
void void
APRWindow::_UpdateButtons() AppearanceWindow::_UpdateButtons()
{ {
fDefaultsButton->SetEnabled(_IsDefaultable()); fDefaultsButton->SetEnabled(_IsDefaultable());
fRevertButton->SetEnabled(_IsRevertable()); fRevertButton->SetEnabled(_IsRevertable());
@@ -120,7 +121,7 @@ APRWindow::_UpdateButtons()
bool bool
APRWindow::_IsDefaultable() const AppearanceWindow::_IsDefaultable() const
{ {
// printf("fonts defaultable: %d\n", fFontSettings->IsDefaultable()); // printf("fonts defaultable: %d\n", fFontSettings->IsDefaultable());
// printf("colors defaultable: %d\n", fColorsView->IsDefaultable()); // printf("colors defaultable: %d\n", fColorsView->IsDefaultable());
@@ -134,7 +135,7 @@ APRWindow::_IsDefaultable() const
bool bool
APRWindow::_IsRevertable() const AppearanceWindow::_IsRevertable() const
{ {
// printf("fonts revertable: %d\n", fFontSettings->IsRevertable()); // printf("fonts revertable: %d\n", fFontSettings->IsRevertable());
// printf("colors revertable: %d\n", fColorsView->IsRevertable()); // printf("colors revertable: %d\n", fColorsView->IsRevertable());
@@ -0,0 +1,49 @@
/*
* Copyright 2002-2025, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm ([email protected])
* Alexander von Gluck, [email protected]
* Stephan Aßmus <[email protected]>
*/
#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 */
@@ -10,7 +10,6 @@
*/ */
#include "APRView.h"
#include <stdio.h> #include <stdio.h>
@@ -29,8 +28,9 @@
#include <Path.h> #include <Path.h>
#include <SpaceLayoutItem.h> #include <SpaceLayoutItem.h>
#include "APRWindow.h" #include "AppearanceWindow.h"
#include "Colors.h" #include "Colors.h"
#include "ColorsView.h"
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
@@ -47,7 +47,7 @@ using BPrivate::BColorListView;
using BPrivate::BColorPreview; using BPrivate::BColorPreview;
APRView::APRView(const char* name) ColorsView::ColorsView(const char* name)
: :
BView(name, B_WILL_DRAW) BView(name, B_WILL_DRAW)
{ {
@@ -87,13 +87,13 @@ APRView::APRView(const char* name)
} }
APRView::~APRView() ColorsView::~ColorsView()
{ {
} }
void void
APRView::AttachedToWindow() ColorsView::AttachedToWindow()
{ {
fAutoSelectCheckBox->SetTarget(this); fAutoSelectCheckBox->SetTarget(this);
fPicker->SetTarget(this); fPicker->SetTarget(this);
@@ -106,7 +106,7 @@ APRView::AttachedToWindow()
void void
APRView::MessageReceived(BMessage* message) ColorsView::MessageReceived(BMessage* message)
{ {
if (message->WasDropped()) { if (message->WasDropped()) {
// Received from color preview when dropped on // Received from color preview when dropped on
@@ -194,7 +194,7 @@ APRView::MessageReceived(BMessage* message)
void void
APRView::LoadSettings() ColorsView::LoadSettings()
{ {
get_default_colors(&fDefaultColors); get_default_colors(&fDefaultColors);
get_current_colors(&fCurrentColors); get_current_colors(&fCurrentColors);
@@ -203,7 +203,7 @@ APRView::LoadSettings()
void void
APRView::SetDefaults() ColorsView::SetDefaults()
{ {
_SetUIColors(fDefaultColors); _SetUIColors(fDefaultColors);
_UpdatePreviews(fDefaultColors); _UpdatePreviews(fDefaultColors);
@@ -221,7 +221,7 @@ APRView::SetDefaults()
void void
APRView::Revert() ColorsView::Revert()
{ {
_SetUIColors(fPrevColors); _SetUIColors(fPrevColors);
_UpdatePreviews(fPrevColors); _UpdatePreviews(fPrevColors);
@@ -236,21 +236,21 @@ APRView::Revert()
bool bool
APRView::IsDefaultable() ColorsView::IsDefaultable()
{ {
return !fDefaultColors.HasSameData(fCurrentColors); return !fDefaultColors.HasSameData(fCurrentColors);
} }
bool bool
APRView::IsRevertable() ColorsView::IsRevertable()
{ {
return !fPrevColors.HasSameData(fCurrentColors); return !fPrevColors.HasSameData(fCurrentColors);
} }
void void
APRView::_CreateItems() ColorsView::_CreateItems()
{ {
while (fAttrList->CountItems() > 0) while (fAttrList->CountItems() > 0)
delete fAttrList->RemoveItem((int32)0); delete fAttrList->RemoveItem((int32)0);
@@ -278,7 +278,7 @@ APRView::_CreateItems()
void void
APRView::_UpdatePreviews(const BMessage& colors) ColorsView::_UpdatePreviews(const BMessage& colors)
{ {
rgb_color color; rgb_color color;
for (int32 i = color_description_count() - 1; i >= 0; i--) { for (int32 i = color_description_count() - 1; i >= 0; i--) {
@@ -296,7 +296,7 @@ APRView::_UpdatePreviews(const BMessage& colors)
void void
APRView::_SetUIColors(const BMessage& colors) ColorsView::_SetUIColors(const BMessage& colors)
{ {
set_ui_colors(&colors); set_ui_colors(&colors);
fCurrentColors = colors; fCurrentColors = colors;
@@ -304,7 +304,7 @@ APRView::_SetUIColors(const BMessage& colors)
void void
APRView::_SetCurrentColor(rgb_color color) ColorsView::_SetCurrentColor(rgb_color color)
{ {
_SetColor(fWhich, color); _SetColor(fWhich, color);
@@ -321,7 +321,7 @@ APRView::_SetCurrentColor(rgb_color color)
void void
APRView::_SetColor(color_which which, rgb_color color) ColorsView::_SetColor(color_which which, rgb_color color)
{ {
_SetOneColor(which, color); _SetOneColor(which, color);
@@ -437,7 +437,7 @@ APRView::_SetColor(color_which which, rgb_color color)
void void
APRView::_SetOneColor(color_which which, rgb_color color) ColorsView::_SetOneColor(color_which which, rgb_color color)
{ {
if (ui_color(which) == color) if (ui_color(which) == color)
return; return;
@@ -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. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -8,8 +8,8 @@
* Stephan Aßmus <superstippi@gmx.de> * Stephan Aßmus <superstippi@gmx.de>
* Joseph Groover <looncraz@looncraz.net> * Joseph Groover <looncraz@looncraz.net>
*/ */
#ifndef APR_VIEW_H_ #ifndef COLORS_VIEW_H_
#define APR_VIEW_H_ #define COLORS_VIEW_H_
#include <Button.h> #include <Button.h>
@@ -38,10 +38,10 @@ class APRWindow;
using BPrivate::BColorPreview; using BPrivate::BColorPreview;
class APRView : public BView { class ColorsView : public BView {
public: public:
APRView(const char *name); ColorsView(const char *name);
virtual ~APRView(); virtual ~ColorsView();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg); virtual void MessageReceived(BMessage *msg);
@@ -80,4 +80,4 @@ private:
BMessage fCurrentColors; BMessage fCurrentColors;
}; };
#endif // APR_VIEW_H_ #endif // COLORS_VIEW_H_
+1 -1
View File
@@ -25,7 +25,7 @@
#include <MessageRunner.h> #include <MessageRunner.h>
#include <SpaceLayoutItem.h> #include <SpaceLayoutItem.h>
#include "APRWindow.h" #include "AppearanceWindow.h"
#include "FontSelectionView.h" #include "FontSelectionView.h"
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
+7 -12
View File
@@ -5,20 +5,15 @@ AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders shared app interface [ FDirName servers app ] ; UsePrivateHeaders shared app interface [ FDirName servers app ] ;
Preference Appearance : Preference Appearance :
APRMain.cpp
AntialiasingSettingsView.cpp AntialiasingSettingsView.cpp
LookAndFeelSettingsView.cpp Appearance.cpp
AppearanceWindow.cpp
Colors.cpp
ColorsView.cpp
FakeScrollBar.cpp FakeScrollBar.cpp
FontSelectionView.cpp FontSelectionView.cpp
FontView.cpp FontView.cpp
APRView.cpp LookAndFeelSettingsView.cpp
APRWindow.cpp
Colors.cpp
# These are currently disabled while everything else is being worked on
#CurView.cpp
#CursorWhichItem.cpp
#SysCursorAPI.cpp
: be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub shared : be [ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub shared
: Appearance.rdef : Appearance.rdef
@@ -28,8 +23,8 @@ DoCatalogs Appearance :
x-vnd.Haiku-Appearance x-vnd.Haiku-Appearance
: :
AntialiasingSettingsView.cpp AntialiasingSettingsView.cpp
APRView.cpp ColorsView.cpp
APRWindow.cpp AppearanceWindow.cpp
Colors.cpp Colors.cpp
LookAndFeelSettingsView.cpp LookAndFeelSettingsView.cpp
FontView.cpp FontView.cpp
@@ -40,7 +40,7 @@
#include <StringView.h> #include <StringView.h>
#include <TextView.h> #include <TextView.h>
#include "APRWindow.h" #include "AppearanceWindow.h"
#include "FakeScrollBar.h" #include "FakeScrollBar.h"