Skip to content

Commit

Permalink
Use date locale
Browse files Browse the repository at this point in the history
  • Loading branch information
dospuntos committed May 27, 2024
1 parent 355cd6f commit 32763ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 691 deletions.
10 changes: 1 addition & 9 deletions src/DateBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ DateBoxFilter::KeyFilter(const int32& key, const int32& mod)
box->TextView()->SelectAll();
TextControl()->Invoke();
return B_SKIP_MESSAGE;
} else if (keystring == "-") {
if (strlen(box->Text()) > 0)
box->fCurrentDate = DecrementDateByDay(box->fCurrentDate);
gDefaultLocale.DateToString(box->fCurrentDate, string);
box->SetText(string.String());
box->TextView()->SelectAll();
TextControl()->Invoke();
return B_SKIP_MESSAGE;
} else if (key == B_PAGE_UP) {
if (strlen(box->Text()) > 0) {
if (mod & B_SHIFT_KEY)
Expand Down Expand Up @@ -108,7 +100,7 @@ DateBox::DateBox(const char* name, const char* label, const char* text, BMessage

const char date_disallowed[] =
"`~!@#$%^&*()_=QWERTYUIOP{[}]|\\ASDFGHJKL;:'\""
"ZXCVBNM,.<>?qwertyuiopasdfghjklzxcvbnm";
"ZXCVBNM,<>?qwertyuiopasdfghjklzxcvbnm";
int32 i = 0;
while (date_disallowed[i]) {
TextView()->DisallowChar(date_disallowed[i]);
Expand Down
Loading

0 comments on commit 32763ba

Please sign in to comment.