summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkshay Agarwal <agarwal.akshay.akshay8@gmail.com>2017-09-01 15:21:02 (GMT)
committerAdrien Destugues <pulkomandy@pulkomandy.tk>2017-09-16 15:45:24 (GMT)
commit9dc787581801463ab7b9603447216e8328626d42 (patch)
tree3ccbf659d45f4364cede8ea5d23078cebaf3b3fe
parent42745b94f8e9d74d585f0b1cd600085ed9776ef8 (diff)
Time Preferences: Update CalendarView day name header on locale preferences change.HEADhrev51428master
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
-rw-r--r--src/preferences/time/DateTimeView.cpp5
-rw-r--r--src/preferences/time/Time.cpp2
-rw-r--r--src/preferences/time/TimeWindow.cpp8
3 files changed, 15 insertions, 0 deletions
diff --git a/src/preferences/time/DateTimeView.cpp b/src/preferences/time/DateTimeView.cpp
index abc7557..9f19b75 100644
--- a/src/preferences/time/DateTimeView.cpp
+++ b/src/preferences/time/DateTimeView.cpp
@@ -24,6 +24,7 @@
#include <Entry.h>
#include <File.h>
#include <FindDirectory.h>
+#include <LocaleRoster.h>
#include <Message.h>
#include <Path.h>
#include <StringView.h>
@@ -93,6 +94,10 @@ DateTimeView::MessageReceived(BMessage* message)
}
break;
+ case B_LOCALE_CHANGED:
+ fCalendarView->UpdateDayNameHeader();
+ break;
+
case kDayChanged:
{
BMessage msg(*message);
diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp
index 21a65ea..ff32eee 100644
--- a/src/preferences/time/Time.cpp
+++ b/src/preferences/time/Time.cpp
@@ -18,6 +18,7 @@
#include <Alert.h>
#include <Catalog.h>
+#include <LocaleRoster.h>
#include "NetworkTimeView.h"
#include "TimeMessages.h"
@@ -71,6 +72,7 @@ TimeApplication::MessageReceived(BMessage* message)
switch (message->what) {
case kSelectClockTab:
case kShowHideTime:
+ case B_LOCALE_CHANGED:
fWindow->PostMessage(message);
break;
diff --git a/src/preferences/time/TimeWindow.cpp b/src/preferences/time/TimeWindow.cpp
index c248628..da5c718 100644
--- a/src/preferences/time/TimeWindow.cpp
+++ b/src/preferences/time/TimeWindow.cpp
@@ -14,6 +14,7 @@
#include <Button.h>
#include <Catalog.h>
#include <LayoutBuilder.h>
+#include <LocaleRoster.h>
#include <Message.h>
#include <Screen.h>
#include <SeparatorView.h>
@@ -77,6 +78,13 @@ TTimeWindow::MessageReceived(BMessage* message)
be_app->PostMessage(B_ABOUT_REQUESTED);
break;
+ case B_LOCALE_CHANGED:
+ {
+ BLocaleRoster::Default()->Refresh();
+ fDateTimeView->MessageReceived(message);
+ break;
+ }
+
case kMsgRevert:
fDateTimeView->MessageReceived(message);
fTimeZoneView->MessageReceived(message);