diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp index ba3e76684d..ae9b45c6a1 100644 --- a/src/apps/deskbar/BarApp.cpp +++ b/src/apps/deskbar/BarApp.cpp @@ -207,7 +207,6 @@ TBarApp::SaveSettings() storedSettings.AddBool("showTime", fSettings.showTime); storedSettings.AddBool("showSeconds", fSettings.showSeconds); storedSettings.AddBool("showDayOfWeek", fSettings.showDayOfWeek); - storedSettings.AddBool("showTimeZone", fSettings.showTimeZone); storedSettings.AddPoint("switcherLoc", fSettings.switcherLoc); storedSettings.AddInt32("recentAppsCount", fSettings.recentAppsCount); @@ -248,7 +247,6 @@ TBarApp::InitSettings() settings.showTime = true; settings.showSeconds = false; settings.showDayOfWeek = false; - settings.showTimeZone = false; settings.state = kExpandoState; settings.width = 0; settings.switcherLoc = BPoint(5000, 5000); @@ -315,10 +313,6 @@ TBarApp::InitSettings() != B_OK) { settings.showDayOfWeek = false; } - if (storedSettings.FindBool("showTimeZone", &settings.showTimeZone) - != B_OK) { - settings.showTimeZone = false; - } if (storedSettings.FindPoint("switcherLoc", &settings.switcherLoc) != B_OK) { settings.switcherLoc = BPoint(5000, 5000); diff --git a/src/apps/deskbar/BarApp.h b/src/apps/deskbar/BarApp.h index 626286bf38..a184e32b19 100644 --- a/src/apps/deskbar/BarApp.h +++ b/src/apps/deskbar/BarApp.h @@ -78,7 +78,6 @@ struct desk_settings { bool showTime; bool showSeconds; bool showDayOfWeek; - bool showTimeZone; uint32 state; float width; BPoint switcherLoc; diff --git a/src/apps/deskbar/DeskbarMenu.cpp b/src/apps/deskbar/DeskbarMenu.cpp index 4b8c88c605..e6839b7caf 100644 --- a/src/apps/deskbar/DeskbarMenu.cpp +++ b/src/apps/deskbar/DeskbarMenu.cpp @@ -401,7 +401,6 @@ TDeskbarMenu::ResetTargets() case kShowHideTime: case kShowSeconds: case kShowDayOfWeek: - case kShowTimeZone: item->SetTarget(fBarView->fReplicantTray); break; } diff --git a/src/apps/deskbar/PreferencesWindow.cpp b/src/apps/deskbar/PreferencesWindow.cpp index cf8386ba3d..7e54c2a251 100644 --- a/src/apps/deskbar/PreferencesWindow.cpp +++ b/src/apps/deskbar/PreferencesWindow.cpp @@ -90,8 +90,6 @@ PreferencesWindow::PreferencesWindow(BRect frame) new BMessage(kShowSeconds)); fShowDayOfWeek = new BCheckBox(B_TRANSLATE("Show day of week"), new BMessage(kShowDayOfWeek)); - fShowTimeZone = new BCheckBox(B_TRANSLATE("Show time zone"), - new BMessage(kShowTimeZone)); // Get settings from BarApp TBarApp* barApp = static_cast(be_app); @@ -157,11 +155,9 @@ PreferencesWindow::PreferencesWindow(BRect frame) if (replicantTray->Time() != NULL) { fShowSeconds->SetValue(replicantTray->Time()->ShowSeconds()); fShowDayOfWeek->SetValue(replicantTray->Time()->ShowDayOfWeek()); - fShowTimeZone->SetValue(replicantTray->Time()->ShowTimeZone()); } else { fShowSeconds->SetValue(settings->showSeconds); fShowDayOfWeek->SetValue(settings->showDayOfWeek); - fShowTimeZone->SetValue(settings->showTimeZone); } EnableDisableDependentItems(); @@ -179,7 +175,6 @@ PreferencesWindow::PreferencesWindow(BRect frame) fShowSeconds->SetTarget(replicantTray); fShowDayOfWeek->SetTarget(replicantTray); - fShowTimeZone->SetTarget(replicantTray); // Layout fMenuBox = new BBox("fMenuBox"); @@ -253,14 +248,8 @@ PreferencesWindow::PreferencesWindow(BRect frame) view = BLayoutBuilder::Group<>() .AddGroup(B_VERTICAL, 0) - .AddGroup(B_VERTICAL, 0) - .SetInsets(0, 0, 0, B_USE_DEFAULT_SPACING) - .Add(fShowSeconds) - .Add(fShowDayOfWeek) - .Add(fShowTimeZone) - .End() - .Add(new BButton(B_TRANSLATE("Time preferences" B_UTF8_ELLIPSIS), - new BMessage(kTimePreferences))) + .Add(fShowSeconds) + .Add(fShowDayOfWeek) .AddGlue() .SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING) @@ -311,11 +300,6 @@ PreferencesWindow::MessageReceived(BMessage* message) EnableDisableDependentItems(); break; - case kTimePreferences: - // launch the time prefs app - be_roster->Launch("application/x-vnd.Haiku-Time"); - break; - default: BWindow::MessageReceived(message); break; diff --git a/src/apps/deskbar/PreferencesWindow.h b/src/apps/deskbar/PreferencesWindow.h index 1d261973de..d7771266c8 100644 --- a/src/apps/deskbar/PreferencesWindow.h +++ b/src/apps/deskbar/PreferencesWindow.h @@ -26,8 +26,6 @@ const uint32 kAutoHide = 'AtHd'; const uint32 kShowHideTime = 'ShTm'; const uint32 kShowSeconds = 'SwSc'; const uint32 kShowDayOfWeek = 'SwDw'; -const uint32 kShowTimeZone = 'SwTz'; -const uint32 kTimePreferences = 'TmPr'; class BBox; class BButton; @@ -76,7 +74,6 @@ private: BCheckBox* fShowSeconds; BCheckBox* fShowDayOfWeek; - BCheckBox* fShowTimeZone; }; diff --git a/src/apps/deskbar/StatusView.cpp b/src/apps/deskbar/StatusView.cpp index aad0290564..3747b415e6 100644 --- a/src/apps/deskbar/StatusView.cpp +++ b/src/apps/deskbar/StatusView.cpp @@ -150,8 +150,7 @@ TReplicantTray::TReplicantTray(TBarView* parent, bool vertical) // Create the time view fTime = new TTimeView(fMinimumTrayWidth, kMaxReplicantHeight - 1.0, - use24HourClock, settings->showSeconds, settings->showDayOfWeek, - settings->showTimeZone); + use24HourClock, settings->showSeconds, settings->showDayOfWeek); } @@ -319,17 +318,6 @@ TReplicantTray::MessageReceived(BMessage* message) AdjustPlacement(); break; - case kShowTimeZone: - if (fTime == NULL) - return; - - fTime->SetShowTimeZone(!fTime->ShowTimeZone()); - - // time string reformat -> realign - RealignReplicants(); - AdjustPlacement(); - break; - #ifdef DB_ADDONS case B_NODE_MONITOR: HandleEntryUpdate(message); @@ -1252,7 +1240,6 @@ TReplicantTray::SaveTimeSettings() settings->showTime = !fTime->IsHidden(); settings->showSeconds = fTime->ShowSeconds(); settings->showDayOfWeek = fTime->ShowDayOfWeek(); - settings->showTimeZone = fTime->ShowTimeZone(); } @@ -1599,4 +1586,3 @@ TDragRegion::SetDragRegionLocation(int32 location) fDragLocation = location; Invalidate(); } - diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp index 6b90bda372..c212aa2055 100644 --- a/src/apps/deskbar/TimeView.cpp +++ b/src/apps/deskbar/TimeView.cpp @@ -68,7 +68,7 @@ enum { TTimeView::TTimeView(float maxWidth, float height, bool use24HourClock, - bool showSeconds, bool showDayOfWeek, bool showTimeZone) + bool showSeconds, bool showDayOfWeek) : BView(BRect(-100, -100, -90, -90), "_deskbar_tv_", B_FOLLOW_RIGHT | B_FOLLOW_TOP, @@ -79,8 +79,7 @@ TTimeView::TTimeView(float maxWidth, float height, bool use24HourClock, fOrientation(true), fUse24HourClock(use24HourClock), fShowSeconds(showSeconds), - fShowDayOfWeek(showDayOfWeek), - fShowTimeZone(showTimeZone) + fShowDayOfWeek(showDayOfWeek) { fCurrentTime = fLastTime = time(NULL); fSeconds = fMinute = fHour = 0; @@ -354,21 +353,6 @@ TTimeView::SetShowDayOfWeek(bool show) } -bool -TTimeView::ShowTimeZone() const -{ - return fShowTimeZone; -} - - -void -TTimeView::SetShowTimeZone(bool show) -{ - fShowTimeZone = show; - Update(); -} - - void TTimeView::ShowCalendar(BPoint where) { @@ -433,14 +417,6 @@ TTimeView::CalculateTextPlacement() BFont font; GetFont(&font); - // If 12 hour clock with all options turned on shrink font size to fit. - if (!fUse24HourClock && fShowSeconds && fShowDayOfWeek && fShowTimeZone) - font.SetSize(11.0); - else - font.SetSize(12.0); - - SetFont(&font, B_FONT_SIZE); - const char* stringArray[1]; stringArray[0] = fCurrentTimeStr; BRect rectArray[1]; @@ -517,8 +493,5 @@ TTimeView::UpdateTimeFormat() if (!fUse24HourClock) timeFormat.Append(" a"); - if (fShowTimeZone) - timeFormat.Append(" V"); - fTimeFormat = timeFormat; } diff --git a/src/apps/deskbar/TimeView.h b/src/apps/deskbar/TimeView.h index fcb26f1723..24c5495502 100644 --- a/src/apps/deskbar/TimeView.h +++ b/src/apps/deskbar/TimeView.h @@ -55,7 +55,7 @@ class TTimeView : public BView { public: TTimeView(float maxWidth, float height, bool use24HourClock, bool showSeconds, - bool showDayOfWeek, bool showTimeZone); + bool showDayOfWeek); TTimeView(BMessage* data); ~TTimeView(); @@ -86,9 +86,6 @@ public: bool ShowDayOfWeek() const; void SetShowDayOfWeek(bool show); - bool ShowTimeZone() const; - void SetShowTimeZone(bool show); - void ShowCalendar(BPoint where); private: @@ -123,7 +120,6 @@ private: bool fUse24HourClock; bool fShowSeconds; bool fShowDayOfWeek; - bool fShowTimeZone; BString fTimeFormat; BPoint fTimeLocation;