Ticket #6101: webwatchLocalization.patch
File webwatchLocalization.patch, 14.2 KB (added by , 14 years ago) |
---|
-
src/apps/webwatch/readme.html
1 <HTML> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 2 4 3 <HEAD> 4 <TITLE>WebWatch</TITLE> 5 </HEAD> 5 <head> 6 <title>WebWatch</title> 7 <meta http-equiv="content-type" content="text/html;charset=utf-8" /> 8 </head> 6 9 7 < BODY BGCOLOR="#FFFFFF">10 <body style="background-color:#FFFFFF;"> 8 11 9 < H1>WebWatch 1.5</H1>12 <h1>WebWatch 1.5</h1> 10 13 11 < P>Released on Thursday, 13 February 2003<BR>12 Created by < A HREF="mailto:mahlzeit@users.sourceforge.net">Matthijs13 Hollemans</ A></P>14 <p>Released on Thursday, 13 February 2003<br /> 15 Created by <a href="mailto:mahlzeit@users.sourceforge.net">Matthijs 16 Hollemans</a></p> 14 17 15 < H3>What is it</H3>18 <h3>What is it</h3> 16 19 17 < P>WebWatch is an unofficial port of Swatch's Internet Time utility for BeOS18 R5 or higher that runs inside the Deskbar.</ P>20 <p>WebWatch is an unofficial port of Swatch's Internet Time utility for BeOS 21 R5 or higher that runs inside the Deskbar.</p> 19 22 20 < P>Someone at Swatch (you know, the company that makes the watches) came up23 <p>Someone at Swatch (you know, the company that makes the watches) came up 21 24 with an idea for a universal time format that eliminates time zones and 22 25 geographical borders. The idea is very simple: time is no longer measured in 23 26 hours, minutes, and seconds, but in "beats." A single day consists of 1000 24 beats, so each beat corresponds to 1 minute and 26.4 seconds.</ P>27 beats, so each beat corresponds to 1 minute and 26.4 seconds.</p> 25 28 26 < P>This "Internet Time"is the same all over the world, because it is measured29 <p>This "Internet Time" is the same all over the world, because it is measured 27 30 relatively to something called the Biel Mean Time (BMT), a new meridian that 28 31 lies in Switzerland. A day in Internet Time begins at midnight BMT, or @000 29 32 Swatch Beats, 12 noon is equivalent to @500 beats, and so on. So if it's @812 30 at my place, it's also 812 beats at yours and everyone else's.</ P>33 at my place, it's also 812 beats at yours and everyone else's.</p> 31 34 32 < P>Please check out the <A HREF="http://www.swatch.com">Swatch website</A>33 for more information.</ P>35 <p>Please check out the <a href="http://www.swatch.com">Swatch website</a> 36 for more information.</p> 34 37 35 < H3>How to use it</H3>38 <h3>How to use it</h3> 36 39 37 < P>Simply double-click the WebWatch icon to install WebWatch into the Deskbar.38 To get rid of it, right-click < CODE>WebWatch</CODE> in the Deskbar and select39 the < CODE>Quit</CODE> option from the pop-up menu.</P>40 <p>Simply double-click the WebWatch icon to install WebWatch into the Deskbar. 41 To get rid of it, right-click <code>WebWatch</code> in the Deskbar and select 42 the <code>Quit</code> option from the pop-up menu.</p> 40 43 41 < H3>Legal stuff</H3>44 <h3>Legal stuff</h3> 42 45 43 < P>This version of WebWatch is open source and may be distributed under the46 <p>This version of WebWatch is open source and may be distributed under the 44 47 terms of the MIT license. Note that the author is in no way affiliated with 45 Swatch, and fully respects their copyrights and trademarks.</ P>48 Swatch, and fully respects their copyrights and trademarks.</p> 46 49 47 < P>Copyright (c) 1999-2003 Matthijs Hollemans</P>50 <p>Copyright © 1999-2003 Matthijs Hollemans</p> 48 51 49 < P>Permission is hereby granted, free of charge, to any person obtaining a50 copy of this software and associated documentation files (the "Software"),52 <p>Permission is hereby granted, free of charge, to any person obtaining a 53 copy of this software and associated documentation files (the "Software"), 51 54 to deal in the Software without restriction, including without limitation 52 55 the rights to use, copy, modify, merge, publish, distribute, sublicense, 53 56 and/or sell copies of the Software, and to permit persons to whom the 54 Software is furnished to do so, subject to the following conditions:</ P>57 Software is furnished to do so, subject to the following conditions:</p> 55 58 56 < P>The above copyright notice and this permission notice shall be included in57 all copies or substantial portions of the Software.</ P>59 <p>The above copyright notice and this permission notice shall be included in 60 all copies or substantial portions of the Software.</p> 58 61 59 < P>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR62 <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 60 63 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 61 64 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 62 65 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 63 66 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 64 67 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 65 DEALINGS IN THE SOFTWARE.</ P>68 DEALINGS IN THE SOFTWARE.</p> 66 69 67 < H3>History</H3>70 <h3>History</h3> 68 71 69 < P><I>Version 1.5 (Thursday, 13 February 2003)</I></P>72 <p><i>Version 1.5 (Thursday, 13 February 2003)</i></p> 70 73 71 < UL>72 < LI>Cleaned up the source code.</LI>73 < LI>Now uses the plain font, not the bold font.</LI>74 </ UL>74 <ul> 75 <li>Cleaned up the source code.</li> 76 <li>Now uses the plain font, not the bold font.</li> 77 </ul> 75 78 76 < P><I>Version 1.4 (Saturday, 9 December 2000)</I></P>79 <p><i>Version 1.4 (Saturday, 9 December 2000)</i></p> 77 80 78 < UL>79 < LI>With certain fonts, WebWatch didn't always fit in the Deskbar.</LI>80 </ UL>81 <ul> 82 <li>With certain fonts, WebWatch didn't always fit in the Deskbar.</li> 83 </ul> 81 84 82 < P><I>Version 1.3 (Sunday, 26 November 2000)</I></P>85 <p><i>Version 1.3 (Sunday, 26 November 2000)</i></p> 83 86 84 < UL>85 < LI>The time is now written using a bold font, making it better readable.</LI>86 < LI>Thanks to Jason Parks for turning WebWatch into a real Deskbar add-on.87 <ul> 88 <li>The time is now written using a bold font, making it better readable.</li> 89 <li>Thanks to Jason Parks for turning WebWatch into a real Deskbar add-on. 87 90 Because of this, WebWatch no longer needs to be installed in the 88 91 UserBootscript; the Deskbar starts it automatically. This also means that 89 WebWatch is now BeOS R5 or higher only.</ LI>90 </ UL>92 WebWatch is now BeOS R5 or higher only.</li> 93 </ul> 91 94 92 < P><I>Version 1.2 (Tuesday, 26 September 2000)</I></P>95 <p><i>Version 1.2 (Tuesday, 26 September 2000)</i></p> 93 96 94 < UL>95 < LI>Finally fixed a long-standing bug with WebWatch's background color. Now it96 uses the same color as the Deskbar.</ LI>97 </ UL>97 <ul> 98 <li>Finally fixed a long-standing bug with WebWatch's background color. Now it 99 uses the same color as the Deskbar.</li> 100 </ul> 98 101 99 < P><I>Version 1.1 (Tuesday, 28 March 2000)</I></P>102 <p><i>Version 1.1 (Tuesday, 28 March 2000)</i></p> 100 103 101 < UL>102 < LI>New release for BeOS R5. Older versions of WebWatch came with source104 <ul> 105 <li>New release for BeOS R5. Older versions of WebWatch came with source 103 106 code only, which was automatically compiled during installation. However, 104 107 because of header file changes between R5 and older versions of the BeOS, 105 108 and because the free version of BeOS R5 doesn't necessarily include 106 109 development tools, WebWatch 1.1 is already compiled. This means that it 107 only runs on the Intel platform, since I don't have a PowerPC machine.</ LI>108 </ UL>110 only runs on the Intel platform, since I don't have a PowerPC machine.</li> 111 </ul> 109 112 110 < P><I>Version 1.0 (Saturday, 14 August 1999)</I></P>113 <p><i>Version 1.0 (Saturday, 14 August 1999)</i></p> 111 114 112 < UL>113 < LI>First version.</LI>114 </ UL>115 <ul> 116 <li>First version.</li> 117 </ul> 115 118 116 </BODY> 117 </HTML> 119 <p> 120 <a href="http://validator.w3.org/check?uri=referer"><img 121 src="http://www.w3.org/Icons/valid-xhtml10" 122 alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> 123 </p> 124 125 </body> 126 </html> -
src/apps/webwatch/WatchView.cpp
30 30 #include "WatchApp.h" 31 31 #include "WatchView.h" 32 32 33 #undef B_TRANSLATE_CONTEXT 34 #define B_TRANSLATE_CONTEXT "WatchView" 35 36 33 37 const rgb_color COLOR_FOREGROUND = { 0, 0, 0 }; 34 38 35 /////////////////////////////////////////////////////////////////////////////// /39 /////////////////////////////////////////////////////////////////////////////// 36 40 37 41 WatchView::WatchView() 38 : BView(BRect(0, 0, 1, 1), 0, 0, 0) 42 : 43 BView(BRect(0, 0, 1, 1), 0, 0, 0), 44 fAppCatalog(NULL) 39 45 { 40 // Do nothing.46 be_locale->GetAppCatalog(&fAppCatalog); 41 47 } 42 48 43 /////////////////////////////////////////////////////////////////////////////// /49 /////////////////////////////////////////////////////////////////////////////// 44 50 45 51 WatchView::WatchView(BMessage* message) 46 52 : BView( … … 62 68 SetViewColor(B_TRANSPARENT_COLOR); 63 69 } 64 70 65 /////////////////////////////////////////////////////////////////////////////// /71 /////////////////////////////////////////////////////////////////////////////// 66 72 67 73 __declspec(dllexport) WatchView* WatchView::Instantiate(BMessage* archive) 68 74 { … … 74 80 return NULL; 75 81 } 76 82 77 /////////////////////////////////////////////////////////////////////////////// /83 /////////////////////////////////////////////////////////////////////////////// 78 84 79 85 status_t WatchView::Archive(BMessage* archive, bool deep) const 80 86 { … … 86 92 return B_OK; 87 93 } 88 94 89 /////////////////////////////////////////////////////////////////////////////// /95 /////////////////////////////////////////////////////////////////////////////// 90 96 91 97 void WatchView::Draw(BRect updateRect) 92 98 { … … 112 118 DrawString(string, BPoint(x, y)); 113 119 } 114 120 115 /////////////////////////////////////////////////////////////////////////////// /121 /////////////////////////////////////////////////////////////////////////////// 116 122 117 123 void WatchView::MouseDown(BPoint point) 118 124 { 119 BPopUpMenu* menu = new BPopUpMenu( "WatchView", false, false);125 BPopUpMenu* menu = new BPopUpMenu(B_TRANSLATE("WatchView"), false, false); 120 126 121 127 menu->AddItem(new BMenuItem( 122 "About" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED))); 128 B_TRANSLATE("About" B_UTF8_ELLIPSIS), 129 new BMessage(B_ABOUT_REQUESTED))); 123 130 124 131 menu->AddItem(new BMenuItem( 125 "Quit", new BMessage(B_QUIT_REQUESTED)));132 B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED))); 126 133 127 134 menu->SetTargetForItems(this); 128 135 … … 132 139 delete menu; 133 140 } 134 141 135 /////////////////////////////////////////////////////////////////////////////// /142 /////////////////////////////////////////////////////////////////////////////// 136 143 137 144 void WatchView::MessageReceived(BMessage* msg) 138 145 { … … 144 151 } 145 152 } 146 153 147 /////////////////////////////////////////////////////////////////////////////// /154 /////////////////////////////////////////////////////////////////////////////// 148 155 149 156 void WatchView::OnAboutRequested() 150 157 { 151 (new BAlert( 152 NULL, 153 "WebWatch " VERSION 158 BString text = B_TRANSLATE("WebWatch %1" 154 159 "\nAn internet time clock for your Deskbar\n\n" 155 160 "Created by Matthijs Hollemans\n" 156 161 "mahlzeit@users.sourceforge.net\n\n" 157 "Thanks to Jason Parks for his help.\n", 158 "OK"))->Go(NULL); 162 "Thanks to Jason Parks for his help.\n"); 163 text.ReplaceFirst("%1", VERSION); 164 (new BAlert(NULL, text.String(), B_TRANSLATE("OK")))->Go(NULL); 159 165 } 160 166 161 /////////////////////////////////////////////////////////////////////////////// /167 /////////////////////////////////////////////////////////////////////////////// 162 168 163 169 void WatchView::OnQuitRequested() 164 170 { … … 171 177 deskbar.RemoveItem(DESKBAR_ITEM_NAME); 172 178 } 173 179 174 /////////////////////////////////////////////////////////////////////////////// /180 /////////////////////////////////////////////////////////////////////////////// 175 181 176 182 void WatchView::Pulse() 177 183 { … … 183 189 } 184 190 } 185 191 186 /////////////////////////////////////////////////////////////////////////////// /192 /////////////////////////////////////////////////////////////////////////////// 187 193 188 194 int32 WatchView::GetInternetTime() 189 195 { … … 196 202 return (int32) (((real_time_clock() + 3600) % 86400) / 86.4); 197 203 } 198 204 199 /////////////////////////////////////////////////////////////////////////////// /205 /////////////////////////////////////////////////////////////////////////////// -
src/apps/webwatch/Jamfile
10 10 Application WebWatch : 11 11 WatchApp.cpp 12 12 WatchView.cpp 13 : be $(TARGET_LIBSUPC++)13 : be locale $(TARGET_LIBSUPC++) 14 14 : WebWatch.rdef 15 15 ; 16 16 17 DoCatalogs WebWatch : 18 x-vnd.mahlzeit.webwatch 19 : 20 WatchView.cpp 21 ; -
src/apps/webwatch/WatchView.h
23 23 #ifndef WATCHVIEW_H 24 24 #define WATCHVIEW_H 25 25 26 #include <Catalog.h> 27 #include <Locale.h> 26 28 #include <View.h> 27 29 28 30 class WatchView : public BView … … 68 70 69 71 // The Internet Time from the last call to Pulse(). 70 72 int32 oldTime; 73 BCatalog fAppCatalog; 71 74 }; 72 75 73 76 #endif // WATCHVIEW_H -
src/apps/webwatch/WatchApp.cpp
26 26 #include "WatchApp.h" 27 27 #include "WatchView.h" 28 28 29 /////////////////////////////////////////////////////////////////////////////// /29 /////////////////////////////////////////////////////////////////////////////// 30 30 31 31 BView* instantiate_deskbar_item() 32 32 { 33 33 return new WatchView; 34 34 } 35 35 36 /////////////////////////////////////////////////////////////////////////////// /36 /////////////////////////////////////////////////////////////////////////////// 37 37 38 38 WatchApp::WatchApp() : BApplication(APP_SIGNATURE) 39 39 { … … 54 54 PostMessage(B_QUIT_REQUESTED); 55 55 } 56 56 57 /////////////////////////////////////////////////////////////////////////////// /57 /////////////////////////////////////////////////////////////////////////////// 58 58 59 59 int main() 60 60 { … … 63 63 return 0; 64 64 } 65 65 66 /////////////////////////////////////////////////////////////////////////////// /66 ///////////////////////////////////////////////////////////////////////////////