From 0aa8399b649b7253994bb2e25f8cc03a03eb0dde Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sun, 29 May 2022 01:35:04 -0500 Subject: [PATCH] Use newly-exported libshared DateTimeEdit controls --- Makefile | 1 + src/DateTimeEdit.cpp | 138 ++++++++++++++++++++ src/DateTimeEdit.h | 40 ++++++ src/EventWindow.cpp | 292 +++++++++++-------------------------------- src/EventWindow.h | 35 ++---- 5 files changed, 262 insertions(+), 244 deletions(-) create mode 100644 src/DateTimeEdit.cpp create mode 100644 src/DateTimeEdit.h diff --git a/Makefile b/Makefile index 2606712..7f18a43 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ SRCS = \ src/CategoryListItem.cpp \ src/CalendarMenuWindow.cpp \ src/DateHeaderButton.cpp \ + src/DateTimeEdit.cpp \ src/EventListView.cpp \ src/EventListItem.cpp \ src/EventTabView.cpp \ diff --git a/src/DateTimeEdit.cpp b/src/DateTimeEdit.cpp new file mode 100644 index 0000000..35b81c9 --- /dev/null +++ b/src/DateTimeEdit.cpp @@ -0,0 +1,138 @@ +/* + * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. + * Copyright 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com + * Copyright 2022, Jaidyn Levesque, jadedctrl@teknik.io + * All rights reserved. Distributed under the terms of the MIT license. + * + * Authors: + * Axel Dörfler + * Hamish Morrison + * Julun + * Mike Berg + */ + +#include "DateTimeEdit.h" + +#include + +#include "CalendarMenuWindow.h" + + +const uint32 kArrowAreaWidth = 16; +const int32 kCalendarMenuDate = 'cald'; + + +DateEdit::DateEdit(const char* name, BMessage* message) + : + BPrivate::DateEdit(name, 3, message) +{ +} + + +void +DateEdit::MessageReceived(BMessage* message) +{ + if (message->what == kCalendarMenuDate) { + int32 day, month, year; + if (message->FindInt32("day", &day) == B_OK + && message->FindInt32("month", &month) == B_OK + && message->FindInt32("year", &year) == B_OK) + SetDate(year, month, day); + } else + BPrivate::DateEdit::MessageReceived(message); +} + + +void +DateEdit::MouseDown(BPoint where) +{ + if (fCalendarButton.Contains(where) && IsEnabled()) { + if (fCalendarWindow.IsValid()) { + BMessage activate(B_SET_PROPERTY); + activate.AddSpecifier("Active"); + activate.AddBool("data", true); + if (fCalendarWindow.SendMessage(&activate) == B_OK) + return; + } + + CalendarMenuWindow* window = + new CalendarMenuWindow(this, ConvertToScreen(fCalendarPoint)); + window->SetInvocationMessage(new BMessage(kCalendarMenuDate)); + window->SetDate(GetDate()); + fCalendarWindow = BMessenger(window); + + BPoint centeredCalendarPt = ConvertToScreen(fCalendarPoint); + centeredCalendarPt.x -= window->Frame().Width(); + window->MoveTo(centeredCalendarPt); + window->Show(); + } else + BPrivate::DateEdit::MouseDown(where); +} + + +void +DateEdit::Draw(BRect updateRect) +{ + if (IsEnabled()) + SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR); + else + SetViewUIColor(B_PANEL_BACKGROUND_COLOR); + + SetLowColor(ViewColor()); + FillRect(updateRect, B_SOLID_LOW); + BPrivate::DateEdit::Draw(updateRect); +} + + +void +DateEdit::DrawBorder(const BRect& updateRect) +{ + BRect bounds(Bounds()); + bool showFocus = (IsFocus() && Window() && Window()->IsActive()); + + be_control_look->DrawBorder(this, bounds, updateRect, ViewColor(), + B_FANCY_BORDER, showFocus ? BControlLook::B_FOCUSED : 0); + + // Instead of the up-down arrows, draw a "this opens something up" arrow + bounds.left = bounds.right - kArrowAreaWidth; + bounds.right = Bounds().right - 2; + if (!updateRect.Intersects(bounds)) + return; + + const float vertMargin = 6; + const float horizMargin = 3; + BPoint left(bounds.left + horizMargin, bounds.top + vertMargin); + BPoint right(bounds.right - horizMargin, bounds.top + vertMargin); + BPoint middle(bounds.left + floorf(bounds.Width() / 2), bounds.bottom - vertMargin); + + fCalendarButton = bounds; + fCalendarPoint = middle; + + FillRect(bounds, B_SOLID_LOW); + FillTriangle(left, right, middle, B_SOLID_HIGH); +} + + +TimeEdit::TimeEdit(const char* name, BMessage* message) + : + BPrivate::TimeEdit(name, 3, message) +{ + BFormattingConventions conventions; + BLocale().GetFormattingConventions(&conventions); + if (conventions.Use24HourClock() == false) + fSectionCount = 4; +} + + +void +TimeEdit::Draw(BRect updateRect) +{ + if (IsEnabled()) + SetViewUIColor(B_DOCUMENT_BACKGROUND_COLOR); + else + SetViewUIColor(B_PANEL_BACKGROUND_COLOR); + + SetLowColor(ViewColor()); + FillRect(updateRect, B_SOLID_LOW); + BPrivate::TimeEdit::Draw(updateRect); +} diff --git a/src/DateTimeEdit.h b/src/DateTimeEdit.h new file mode 100644 index 0000000..183fbd0 --- /dev/null +++ b/src/DateTimeEdit.h @@ -0,0 +1,40 @@ +/* + * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. + * Copyright 2022, Jaidyn Levesque, jadedctrl@teknik.io + * All rights reserved. Distributed under the terms of the MIT license. + */ +#ifndef DATE_EDIT_H +#define DATE_EDIT_H + +#include +#include + + +class DateEdit : public BPrivate::DateEdit { +public: + DateEdit(const char* name, BMessage* message = NULL); + + virtual void MessageReceived(BMessage* message); + + virtual void MouseDown(BPoint where); + + virtual void Draw(BRect updateRect); + +protected: + virtual void DrawBorder(const BRect& updateRect); + +private: + BMessenger fCalendarWindow; + BRect fCalendarButton; + BPoint fCalendarPoint; +}; + + +class TimeEdit : public BPrivate::TimeEdit { +public: + TimeEdit(const char* name, BMessage* message = NULL); + + virtual void Draw(BRect updateRect); +}; + +#endif // DATE_EDIT_H diff --git a/src/EventWindow.cpp b/src/EventWindow.cpp index 97927a5..7f50ffe 100644 --- a/src/EventWindow.cpp +++ b/src/EventWindow.cpp @@ -1,5 +1,6 @@ /* - * Copyight 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com + * Copyright 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com + * Copyright 2022 Jaidyn Levesque, jadedctrl@teknik.io * All rights reserved. Distributed under the terms of the MIT License. */ @@ -14,29 +15,16 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include #include -#include -#include -#include -#include #include "App.h" #include "CalendarMenuWindow.h" #include "CategoryEditWindow.h" +#include "DateTimeEdit.h" #include "Event.h" #include "MainWindow.h" #include "Preferences.h" @@ -62,6 +50,8 @@ EventWindow::EventWindow() CenterOnScreen(); } + BLocaleRoster::Default()->GetDefaultTimeZone(&fTimeZone); + fNew = true; _DisableControls(); } @@ -102,29 +92,6 @@ EventWindow::MessageReceived(BMessage* message) UnlockLooper(); break; } - case kShowPopUpCalendar: - { - int8 which; - message->FindInt8("which", &which); - _ShowPopUpCalendar(which); - break; - } - - case kStartDateChanged: - { - BDate date; - GetDateFromMessage(message, date); - SetStartDate(date); - break; - } - - case kEndDateChanged: - { - BDate date; - GetDateFromMessage(message, date); - SetEndDate(date); - break; - } default: BWindow::MessageReceived(message); @@ -162,31 +129,16 @@ EventWindow::SetEvent(entry_ref ref) } -void -EventWindow::GetDateFromMessage(BMessage* message, BDate& date) -{ - int32 day, month, year; - message->FindInt32("day", &day); - message->FindInt32("month", &month); - message->FindInt32("year", &year); - date = BDate(year, month, day); -} - - void EventWindow::SetEventDate(BDate& date) { // Set initial start time as (00:00) for a new event - fStartDate = date; - fTextStartDate->SetText(GetDateString(fStartDate)); - fTextStartTime->SetText( - GetLocaleTimeString(BDateTime(fStartDate, BTime(0, 0, 0)).Time_t())); + fStartDateEdit->SetDate(date.Year(), date.Month(), date.Day()); + fStartTimeEdit->SetTime(0, 0, 0); // Set initial end time as (01:00) for a new event - fEndDate = date; - fTextEndDate->SetText(GetDateString(fEndDate)); - fTextEndTime->SetText( - GetLocaleTimeString(BDateTime(fStartDate, BTime(1, 0, 0)).Time_t())); + fEndDateEdit->SetDate(date.Year(), date.Month(), date.Day()); + fEndTimeEdit->SetTime(1, 0, 0); } @@ -195,8 +147,7 @@ EventWindow::SetStartDate(BDate& date) { if (!date.IsValid()) return; - fStartDate = date; - fTextStartDate->SetText(GetDateString(fStartDate)); + fStartDateEdit->SetDate(date.Year(), date.Month(), date.Day()); } @@ -205,28 +156,7 @@ EventWindow::SetEndDate(BDate& date) { if (!date.IsValid()) return; - fEndDate = date; - fTextEndDate->SetText(GetDateString(fEndDate)); -} - - -BString -EventWindow::GetDateString(BDate& date) -{ - BString dateString; - BDateFormat().Format(dateString, date, B_SHORT_DATE_FORMAT); - return dateString; -} - - -BString -EventWindow::GetLocaleTimeString(time_t timeValue) -{ - BString timeString; - BTimeFormat timeFormat; - timeFormat.SetTimeFormat(B_SHORT_TIME_FORMAT, "HH:mm"); - timeFormat.Format(timeString, timeValue, B_SHORT_TIME_FORMAT); - return timeString; + fEndDateEdit->SetDate(date.Year(), date.Month(), date.Day()); } @@ -251,24 +181,18 @@ EventWindow::OnSaveClick() return; } - time_t start; - time_t end; - BTime startTime; - BTime endTime; - - if (fAllDayCheckBox->Value() == B_CONTROL_OFF) { - BTimeFormat timeFormat; - timeFormat.SetTimeFormat(B_SHORT_TIME_FORMAT, "HH:mm"); - timeFormat.Parse( - fTextStartTime->Text(), B_SHORT_TIME_FORMAT, startTime); - timeFormat.Parse(fTextEndTime->Text(), B_SHORT_TIME_FORMAT, endTime); - } else { + BTime startTime = fStartTimeEdit->GetTime(); + BTime endTime = fEndTimeEdit->GetTime(); + + if (fAllDayCheckBox->Value() == B_CONTROL_ON) { startTime.SetTime(0, 0, 0); endTime.SetTime(23, 59, 59, 59); } - start = BDateTime(fStartDate, startTime).Time_t(); - end = BDateTime(fEndDate, endTime).Time_t(); + time_t start; + time_t end; + start = BDateTime(fStartDateEdit->GetDate(), startTime).Time_t(); + end = BDateTime(fEndDateEdit->GetDate(), endTime).Time_t(); if (difftime(start, end) > 0) { BAlert* alert = new BAlert(B_TRANSLATE("Error"), @@ -370,17 +294,11 @@ EventWindow::OnCheckBoxToggle() { if (fAllDayCheckBox->Value() == B_CONTROL_ON) { - fTextStartTime->SetText(""); - fTextEndTime->SetText(""); - fTextStartTime->SetEnabled(false); - fTextEndTime->SetEnabled(false); + fStartTimeEdit->SetEnabled(false); + fEndTimeEdit->SetEnabled(false); } else { - fTextStartTime->SetText(GetLocaleTimeString( - BDateTime(fStartDate, BTime(0, 0, 0)).Time_t())); - fTextEndTime->SetText( - GetLocaleTimeString(BDateTime(fEndDate, BTime(1, 0, 0)).Time_t())); - fTextStartTime->SetEnabled(true); - fTextEndTime->SetEnabled(true); + fStartTimeEdit->SetEnabled(true); + fEndTimeEdit->SetEnabled(true); } } @@ -393,15 +311,30 @@ EventWindow::_InitInterface() fTextName = new BTextControl("EventName", NULL, NULL, NULL); fTextPlace = new BTextControl("EventPlace", NULL, NULL, NULL); - fTextStartDate = new BTextControl("StartDate", NULL, NULL, NULL); - fTextEndDate = new BTextControl("EndDate", NULL, NULL, NULL); - fTextStartTime = new BTextControl("StartTime", NULL, NULL, NULL); - fTextEndTime = new BTextControl("EndTime", NULL, NULL, NULL); + fStartDateEdit = new DateEdit("StartDate"); + fEndDateEdit = new DateEdit("EndDate"); + fStartTimeEdit = new TimeEdit("StartTime"); + fEndTimeEdit = new TimeEdit("EndTime"); + + BString dateFormat, timeFormat; + BFormattingConventions conventions; + BLocale().GetFormattingConventions(&conventions); + + conventions.GetTimeFormat(B_MEDIUM_TIME_FORMAT, timeFormat); + timeFormat.RemoveAll("a"); + timeFormat.Trim(); + + BString tooltip = B_TRANSLATE("Enter the time in %f format."); + tooltip.ReplaceAll("%f", timeFormat); + fStartTimeEdit->SetToolTip(tooltip); + fEndTimeEdit->SetToolTip(tooltip); - const char* tooltip - = B_TRANSLATE("Enter the time in HH:mm (24 hour) format."); - fTextStartTime->SetToolTip(tooltip); - fTextEndTime->SetToolTip(tooltip); + conventions.GetDateFormat(B_SHORT_DATE_FORMAT, dateFormat); + + tooltip = B_TRANSLATE("Enter the date in %f format."); + tooltip.ReplaceAll("%f", dateFormat); + fStartDateEdit->SetToolTip(tooltip); + fEndDateEdit->SetToolTip(tooltip); fTextDescription = new BTextView("TextDescription", B_WILL_DRAW); fTextDescription->MakeEditable(); @@ -423,12 +356,6 @@ EventWindow::_InitInterface() "DescriptionLabel", B_TRANSLATE("Description:")); fCategoryLabel = new BStringView("CategoryLabel", B_TRANSLATE("Category:")); fAllDayLabel = new BStringView("AllDayLabel", B_TRANSLATE("All day:")); - fEndDateLabel = new BStringView("EndDateLabel", B_TRANSLATE("End date:")); - fStartDateLabel = new BStringView( - "StartDateLabel", B_TRANSLATE("Start date:")); - fStartTimeLabel = new BStringView( - "StartTimeLabel", B_TRANSLATE("Start time:")); - fEndTimeLabel = new BStringView("EndTimeLabel", B_TRANSLATE("End time:")); fDeleteButton = new BButton( "DeleteButton", B_TRANSLATE("Delete"), new BMessage(kDeletePressed)); @@ -438,18 +365,6 @@ EventWindow::_InitInterface() BButton* SaveButton = new BButton( "SaveButton", B_TRANSLATE("OK"), new BMessage(kSavePressed)); - BMessage* message = new BMessage(kShowPopUpCalendar); - message->AddInt8("which", 0); - fStartCalButton = new BButton("StartCalButton", "▼", message); - message = new BMessage(kShowPopUpCalendar); - message->AddInt8("which", 1); - fEndCalButton = new BButton("EndCalButton", "▼", message); - - float width, height; - fStartDateLabel->GetPreferredSize(&width, &height); - fStartCalButton->SetExplicitMinSize(BSize(height * 2, height)); - fEndCalButton->SetExplicitMinSize(BSize(height * 2, height)); - fDBManager = new QueryDBManager(); fCategoryList = fDBManager->GetAllCategories(); @@ -465,11 +380,7 @@ EventWindow::_InitInterface() fCategoryMenu->SetLabelFromMarked(true); fCategoryMenu->ItemAt(0)->SetMarked(true); - fStartDateEdit = new BMenu(B_TRANSLATE("Start date")); - fEndDateEdit = new BMenu(B_TRANSLATE("End date")); - - fCategoryMenuField - = new BMenuField("CategoryMenuField", NULL, fCategoryMenu); + fCategoryMenuField = new BMenuField("CategoryMenuField", NULL, fCategoryMenu); BBox* fStatusBox = new BBox("StatusBox"); BLayoutBuilder::Group<>(fStatusBox, B_VERTICAL, B_USE_HALF_ITEM_SPACING) @@ -497,28 +408,18 @@ EventWindow::_InitInterface() BLayoutBuilder::Group<>(fStartDateBox, B_VERTICAL, B_USE_HALF_ITEM_SPACING) .SetInsets(B_USE_ITEM_INSETS) .AddStrut(B_USE_ITEM_SPACING) - .AddGrid() - .Add(fStartDateLabel, 0, 0) - .Add(fTextStartDate, 1, 0) - .Add(fStartCalButton, 2, 0) - .Add(fStartTimeLabel, 0, 1) - .Add(fTextStartTime, 1, 1) - .End() - .End(); + .Add(fStartDateEdit) + .Add(fStartTimeEdit) + .End(); fStartDateBox->SetLabel(B_TRANSLATE("Start date and time")); fEndDateBox = new BBox("enddatetime"); BLayoutBuilder::Group<>(fEndDateBox, B_VERTICAL, B_USE_HALF_ITEM_SPACING) .SetInsets(B_USE_ITEM_INSETS) .AddStrut(B_USE_ITEM_SPACING) - .AddGrid() - .Add(fEndDateLabel, 0, 0) - .Add(fTextEndDate, 1, 0) - .Add(fEndCalButton, 2, 0) - .Add(fEndTimeLabel, 0, 1) - .Add(fTextEndTime, 1, 1) - .End() - .End(); + .Add(fEndDateEdit) + .Add(fEndTimeEdit) + .End(); fEndDateBox->SetLabel(B_TRANSLATE("End date and time")); BBox* divider = new BBox(BRect(0, 0, 1, 1), B_EMPTY_STRING, @@ -582,12 +483,6 @@ EventWindow::_PopulateWithEvent(Event* event) fTextPlace->SetText(event->GetPlace()); fTextDescription->SetText(event->GetDescription()); - fStartDate = BDate(event->GetStartDateTime()); - fEndDate = BDate(event->GetEndDateTime()); - - fTextStartDate->SetText(GetDateString(fStartDate)); - fTextEndDate->SetText(GetDateString(fEndDate)); - Category* category; for (int32 i = 0; i < fCategoryList->CountItems(); i++) { category = fCategoryList->ItemAt(i); @@ -597,20 +492,28 @@ EventWindow::_PopulateWithEvent(Event* event) } } + int offset = fTimeZone.OffsetFromGMT(); + + BDateTime startDateTime, endDateTime; + startDateTime.SetTime_t(event->GetStartDateTime() + offset); + endDateTime.SetTime_t(event->GetEndDateTime() + offset); + + BDate startDate = startDateTime.Date(); + BDate endDate = endDateTime.Date(); + fStartDateEdit->SetDate(startDate.Year(), startDate.Month(), startDate.Day()); + fEndDateEdit->SetDate(endDate.Year(), endDate.Month(), endDate.Day()); + + BTime startTime = startDateTime.Time(); + BTime endTime = endDateTime.Time(); + fStartTimeEdit->SetTime(startTime.Hour(), startTime.Minute(), startTime.Second()); + fEndTimeEdit->SetTime(endTime.Hour(), endTime.Minute(), endTime.Second()); + if (event->IsAllDay()) { fAllDayCheckBox->SetValue(B_CONTROL_ON); - fTextStartTime->SetEnabled(false); - fTextEndTime->SetEnabled(false); - fTextStartTime->SetText(GetLocaleTimeString(event->GetStartDateTime())); - fTextEndTime->SetText(GetLocaleTimeString(event->GetEndDateTime())); - // This is needed for week view - fTextStartDate->SetText(GetDateString(fStartDate)); - fTextEndDate->SetText(GetDateString(fEndDate)); - } else { + fStartTimeEdit->SetEnabled(false); + fEndTimeEdit->SetEnabled(false); + } else fAllDayCheckBox->SetValue(B_CONTROL_OFF); - fTextStartTime->SetText(GetLocaleTimeString(event->GetStartDateTime())); - fTextEndTime->SetText(GetLocaleTimeString(event->GetEndDateTime())); - } uint16 status = 0; if (event != NULL) @@ -661,57 +564,6 @@ EventWindow::_UpdateCategoryMenu() void EventWindow::_DisableControls() { - fTextStartDate->SetEnabled(false); - fTextEndDate->SetEnabled(false); fEveryMonth->SetEnabled(false); fEveryYear->SetEnabled(false); } - - -void -EventWindow::_ShowPopUpCalendar(int8 which) -{ - if (fCalendarWindow.IsValid()) { - BMessage activate(B_SET_PROPERTY); - activate.AddSpecifier("Active"); - activate.AddBool("data", true); - - if (fCalendarWindow.SendMessage(&activate) == B_OK) - return; - } - - BPoint where; - BPoint boxPosition; - BPoint buttonPosition; - BDate date; - BMessage* invocationMessage; - - // TODO: This is bad. Improve how coordinates for pop up calendar - // window is calculated. Better implement a DateTimeEdit control. - - if (which == 0) { - boxPosition = fStartDateBox->Frame().RightTop(); - buttonPosition = fStartCalButton->Frame().LeftBottom(); - date = fStartDate; - invocationMessage = new BMessage(kStartDateChanged); - - } else { - boxPosition = fEndDateBox->Frame().RightTop(); - buttonPosition = fEndCalButton->Frame().LeftBottom(); - date = fEndDate; - invocationMessage = new BMessage(kEndDateChanged); - } - - where.x = boxPosition.x - buttonPosition.x; - where.y = boxPosition.y + buttonPosition.y; - where += BPoint(-62.0, 8.0); - - ConvertToScreen(&where); - - CalendarMenuWindow* window = new CalendarMenuWindow(this, where); - window->SetDate(date); - window->SetInvocationMessage(invocationMessage); - window->SetDate(date); - fCalendarWindow = BMessenger(window); - window->Show(); -} diff --git a/src/EventWindow.h b/src/EventWindow.h index 1df19ab..8f9564b 100644 --- a/src/EventWindow.h +++ b/src/EventWindow.h @@ -1,12 +1,13 @@ /* - * Copyight 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com + * Copyright 2017 Akshay Agarwal, agarwal.akshay.akshay8@gmail.com + * Copyright 2022 Jaidyn Levesque, jadedctrl@teknik.io * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef EVENTWINDOW_H #define EVENTWINDOW_H #include -#include +#include #include #include "Category.h" @@ -23,9 +24,11 @@ class BTextControl; class BTextView; class BView; class Category; +class DateEdit; class Event; class Preferences; class QueryDBManager; +class TimeEdit; static const uint32 kEventWindowQuitting = 'kewq'; @@ -54,16 +57,11 @@ class EventWindow : public BWindow void OnDeleteClick(); void CloseWindow(); - BString GetDateString(BDate& date); - BString GetLocaleTimeString(time_t timeValue); - void GetDateFromMessage(BMessage* message, BDate& date); - private: void _InitInterface(); void _PopulateWithEvent(Event* event); void _DisableControls(); void _UpdateCategoryMenu(); - void _ShowPopUpCalendar(int8 which); static const uint32 kDeletePressed = 1000; static const uint32 kCancelPressed = 1001; @@ -74,18 +72,16 @@ class EventWindow : public BWindow BTextControl* fTextName; BTextControl* fTextPlace; - BTextControl* fTextStartDate; - BTextControl* fTextEndDate; - BTextControl* fTextStartTime; - BTextControl* fTextEndTime; + + DateEdit* fStartDateEdit; + DateEdit* fEndDateEdit; + TimeEdit* fStartTimeEdit; + TimeEdit* fEndTimeEdit; BTextView* fTextDescription; BView* fMainView; BMenu* fCategoryMenu; - BMenu* fStartDateEdit; - BMenu* fEndDateEdit; - BMenuField* fCategoryMenuField; BStringView* fNameLabel; @@ -93,14 +89,8 @@ class EventWindow : public BWindow BStringView* fDescriptionLabel; BStringView* fCategoryLabel; BStringView* fAllDayLabel; - BStringView* fStartDateLabel; - BStringView* fStartTimeLabel; - BStringView* fEndDateLabel; - BStringView* fEndTimeLabel; BButton* fDeleteButton; - BButton* fStartCalButton; - BButton* fEndCalButton; BRadioButton* fEveryMonth; BRadioButton* fEveryYear; @@ -113,10 +103,7 @@ class EventWindow : public BWindow BBox* fEndDateBox; BBox* fStatusBox; - BMessenger fCalendarWindow; - - BDate fStartDate; - BDate fEndDate; + BTimeZone fTimeZone; bool fNew;