diff --git a/src/preferences/time/SettingsView.cpp b/src/preferences/time/DateTimeView.cpp similarity index 93% rename from src/preferences/time/SettingsView.cpp rename to src/preferences/time/DateTimeView.cpp index 608eb042fa..48b21c10f7 100644 --- a/src/preferences/time/SettingsView.cpp +++ b/src/preferences/time/DateTimeView.cpp @@ -8,7 +8,7 @@ * Julun */ -#include "SettingsView.h" +#include "DateTimeView.h" #include "AnalogClock.h" #include "CalendarView.h" #include "DateTimeEdit.h" @@ -38,7 +38,7 @@ void _kset_tzfilename_(const char *name, size_t length, bool isGMT); #endif -TSettingsView::TSettingsView(BRect frame) +DateTimeView::DateTimeView(BRect frame) : BView(frame,"Settings", B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP), fGmtTime(NULL), @@ -48,14 +48,14 @@ TSettingsView::TSettingsView(BRect frame) } -TSettingsView::~TSettingsView() +DateTimeView::~DateTimeView() { _WriteRTCSettings(); } void -TSettingsView::AttachedToWindow() +DateTimeView::AttachedToWindow() { if (Parent()) SetViewColor(Parent()->ViewColor()); @@ -68,7 +68,7 @@ TSettingsView::AttachedToWindow() void -TSettingsView::Draw(BRect /*updateRect*/) +DateTimeView::Draw(BRect /*updateRect*/) { rgb_color viewcolor = ViewColor(); rgb_color dark = tint_color(viewcolor, B_DARKEN_4_TINT); @@ -92,7 +92,7 @@ TSettingsView::Draw(BRect /*updateRect*/) void -TSettingsView::MessageReceived(BMessage *message) +DateTimeView::MessageReceived(BMessage *message) { int32 change; switch(message->what) { @@ -129,7 +129,7 @@ TSettingsView::MessageReceived(BMessage *message) void -TSettingsView::GetPreferredSize(float *width, float *height) +DateTimeView::GetPreferredSize(float *width, float *height) { // hardcode in TimeWindow ... *width = 470.0f; @@ -144,7 +144,7 @@ TSettingsView::GetPreferredSize(float *width, float *height) void -TSettingsView::_InitView() +DateTimeView::_InitView() { font_height fontHeight; be_plain_font->GetHeight(&fontHeight); @@ -221,7 +221,7 @@ TSettingsView::_InitView() void -TSettingsView::_ReadRTCSettings() +DateTimeView::_ReadRTCSettings() { BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) @@ -252,7 +252,7 @@ TSettingsView::_ReadRTCSettings() void -TSettingsView::_WriteRTCSettings() +DateTimeView::_WriteRTCSettings() { BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) @@ -271,7 +271,7 @@ TSettingsView::_WriteRTCSettings() void -TSettingsView::_UpdateGmtSettings() +DateTimeView::_UpdateGmtSettings() { _WriteRTCSettings(); @@ -294,7 +294,7 @@ TSettingsView::_UpdateGmtSettings() void -TSettingsView::_UpdateDateTime(BMessage *message) +DateTimeView::_UpdateDateTime(BMessage *message) { int32 day; int32 month; diff --git a/src/preferences/time/SettingsView.h b/src/preferences/time/DateTimeView.h similarity index 84% rename from src/preferences/time/SettingsView.h rename to src/preferences/time/DateTimeView.h index 8279050d74..236019d971 100644 --- a/src/preferences/time/SettingsView.h +++ b/src/preferences/time/DateTimeView.h @@ -7,8 +7,8 @@ * Mike Berg * Julun */ -#ifndef SETTINGS_VIEW_H -#define SETTINGS_VIEW_H +#ifndef DATE_TIME_VIEW_H +#define DATE_TIME_VIEW_H #include @@ -21,10 +21,10 @@ class BRadioButton; class TAnalogClock; -class TSettingsView : public BView { +class DateTimeView : public BView { public: - TSettingsView(BRect frame); - virtual ~TSettingsView(); + DateTimeView(BRect frame); + virtual ~DateTimeView(); virtual void AttachedToWindow(); virtual void Draw(BRect updaterect); @@ -50,5 +50,5 @@ class TSettingsView : public BView { bool fInitialized; }; -#endif // SETTINGS_VIEW_H +#endif // DATE_TIME_VIEW_H diff --git a/src/preferences/time/Jamfile b/src/preferences/time/Jamfile index cbcadbfaa7..5d32a5efec 100644 --- a/src/preferences/time/Jamfile +++ b/src/preferences/time/Jamfile @@ -13,7 +13,7 @@ Preference Time : CalendarView.cpp DateTimeEdit.cpp SectionEdit.cpp - SettingsView.cpp + DateTimeView.cpp Time.cpp TimeSettings.cpp TimeWindow.cpp diff --git a/src/preferences/time/TimeWindow.cpp b/src/preferences/time/TimeWindow.cpp index 0469940175..72631af4b5 100644 --- a/src/preferences/time/TimeWindow.cpp +++ b/src/preferences/time/TimeWindow.cpp @@ -10,7 +10,7 @@ #include "TimeWindow.h" #include "BaseView.h" -#include "SettingsView.h" +#include "DateTimeView.h" #include "TimeMessages.h" #include "ZoneView.h" @@ -27,7 +27,7 @@ TTimeWindow::TTimeWindow(const BPoint leftTop) : BWindow(BRect(leftTop, leftTop + BPoint(WINDOW_RIGHT, WINDOW_BOTTOM)), - "Time & Date", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) + "Time", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) { BRect frame = Frame(); BRect bounds = Bounds(); @@ -64,8 +64,8 @@ TTimeWindow::QuitRequested() msg.AddPoint("LeftTop", Frame().LeftTop()); be_app->PostMessage(&msg); - fBaseView->StopWatchingAll(fTimeSettings); fBaseView->StopWatchingAll(fTimeZones); + fBaseView->StopWatchingAll(fDateTimeView); be_app->PostMessage(B_QUIT_REQUESTED); @@ -88,16 +88,16 @@ TTimeWindow::_InitWindow() bounds.InsetBy(4, 6); bounds.bottom -= tabview->TabHeight(); - fTimeSettings = new TSettingsView(bounds); - fBaseView->StartWatchingAll(fTimeSettings); + fDateTimeView = new DateTimeView(bounds); + fBaseView->StartWatchingAll(fDateTimeView); fTimeZones = new TZoneView(bounds); fBaseView->StartWatchingAll(fTimeZones); // add tabs BTab *tab = new BTab(); - tabview->AddTab(fTimeSettings, tab); - tab->SetLabel("Settings"); + tabview->AddTab(fDateTimeView, tab); + tab->SetLabel("Date & Time"); tab = new BTab(); tabview->AddTab(fTimeZones, tab); @@ -107,8 +107,9 @@ TTimeWindow::_InitWindow() float width; float height; - // width/ height from settingsview + all InsetBy etc.. - fTimeSettings->GetPreferredSize(&width, &height); + fDateTimeView->GetPreferredSize(&width, &height); + + // width/ height from DateTimeView + all InsetBy etc.. ResizeTo(width +10, height + tabview->TabHeight() +25); } diff --git a/src/preferences/time/TimeWindow.h b/src/preferences/time/TimeWindow.h index 85459e4209..251b6c25eb 100644 --- a/src/preferences/time/TimeWindow.h +++ b/src/preferences/time/TimeWindow.h @@ -15,7 +15,7 @@ class BMessage; -class TSettingsView; +class DateTimeView; class TTimeBaseView; class TZoneView; @@ -32,7 +32,7 @@ class TTimeWindow : public BWindow { void _InitWindow(); TTimeBaseView *fBaseView; - TSettingsView *fTimeSettings; + DateTimeView *fDateTimeView; TZoneView *fTimeZones; };