From 98d5b7a87cbeddbf061f130a87c647da34d48794 Mon Sep 17 00:00:00 2001
From: Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>
Date: Fri, 1 Sep 2017 20:51:02 +0530
Subject: [PATCH] Time Preferences: Update CalendarView day name header on
locale preferences change.
---
src/preferences/time/DateTimeView.cpp | 5 +++++
src/preferences/time/Time.cpp | 2 ++
src/preferences/time/TimeWindow.cpp | 8 ++++++++
3 files changed, 15 insertions(+)
diff --git a/src/preferences/time/DateTimeView.cpp b/src/preferences/time/DateTimeView.cpp
index abc7557..9f19b75 100644
a
|
b
|
|
24 | 24 | #include <Entry.h> |
25 | 25 | #include <File.h> |
26 | 26 | #include <FindDirectory.h> |
| 27 | #include <LocaleRoster.h> |
27 | 28 | #include <Message.h> |
28 | 29 | #include <Path.h> |
29 | 30 | #include <StringView.h> |
… |
… |
DateTimeView::MessageReceived(BMessage* message)
|
93 | 94 | } |
94 | 95 | break; |
95 | 96 | |
| 97 | case B_LOCALE_CHANGED: |
| 98 | fCalendarView->UpdateDayNameHeader(); |
| 99 | break; |
| 100 | |
96 | 101 | case kDayChanged: |
97 | 102 | { |
98 | 103 | BMessage msg(*message); |
diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp
index 21a65ea..ff32eee 100644
a
|
b
|
|
18 | 18 | |
19 | 19 | #include <Alert.h> |
20 | 20 | #include <Catalog.h> |
| 21 | #include <LocaleRoster.h> |
21 | 22 | |
22 | 23 | #include "NetworkTimeView.h" |
23 | 24 | #include "TimeMessages.h" |
… |
… |
TimeApplication::MessageReceived(BMessage* message)
|
71 | 72 | switch (message->what) { |
72 | 73 | case kSelectClockTab: |
73 | 74 | case kShowHideTime: |
| 75 | case B_LOCALE_CHANGED: |
74 | 76 | fWindow->PostMessage(message); |
75 | 77 | break; |
76 | 78 | |
diff --git a/src/preferences/time/TimeWindow.cpp b/src/preferences/time/TimeWindow.cpp
index c248628..da5c718 100644
a
|
b
|
|
14 | 14 | #include <Button.h> |
15 | 15 | #include <Catalog.h> |
16 | 16 | #include <LayoutBuilder.h> |
| 17 | #include <LocaleRoster.h> |
17 | 18 | #include <Message.h> |
18 | 19 | #include <Screen.h> |
19 | 20 | #include <SeparatorView.h> |
… |
… |
TTimeWindow::MessageReceived(BMessage* message)
|
77 | 78 | be_app->PostMessage(B_ABOUT_REQUESTED); |
78 | 79 | break; |
79 | 80 | |
| 81 | case B_LOCALE_CHANGED: |
| 82 | { |
| 83 | BLocaleRoster::Default()->Refresh(); |
| 84 | fDateTimeView->MessageReceived(message); |
| 85 | break; |
| 86 | } |
| 87 | |
80 | 88 | case kMsgRevert: |
81 | 89 | fDateTimeView->MessageReceived(message); |
82 | 90 | fTimeZoneView->MessageReceived(message); |