* Pathc by Jorma Karvonnen updated by me : localize WebWatch. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37338 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,7 +10,12 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
Application WebWatch :
|
||||
WatchApp.cpp
|
||||
WatchView.cpp
|
||||
: be $(TARGET_LIBSUPC++)
|
||||
: be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||
: WebWatch.rdef
|
||||
;
|
||||
|
||||
DoCatalogs WebWatch :
|
||||
x-vnd.mahlzeit.webwatch
|
||||
:
|
||||
WatchView.cpp
|
||||
;
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
#include "WatchApp.h"
|
||||
#include "WatchView.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BView* instantiate_deskbar_item()
|
||||
{
|
||||
return new WatchView;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WatchApp::WatchApp() : BApplication(APP_SIGNATURE)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ WatchApp::WatchApp() : BApplication(APP_SIGNATURE)
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -63,4 +63,4 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,17 +30,21 @@
|
||||
#include "WatchApp.h"
|
||||
#include "WatchView.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "WatchView"
|
||||
|
||||
|
||||
const rgb_color COLOR_FOREGROUND = { 0, 0, 0 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WatchView::WatchView()
|
||||
: BView(BRect(0, 0, 1, 1), 0, 0, 0)
|
||||
:
|
||||
BView(BRect(0, 0, 1, 1), 0, 0, 0)
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WatchView::WatchView(BMessage* message)
|
||||
: BView(
|
||||
@@ -62,7 +66,7 @@ WatchView::WatchView(BMessage* message)
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__declspec(dllexport) WatchView* WatchView::Instantiate(BMessage* archive)
|
||||
{
|
||||
@@ -74,7 +78,7 @@ __declspec(dllexport) WatchView* WatchView::Instantiate(BMessage* archive)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
status_t WatchView::Archive(BMessage* archive, bool deep) const
|
||||
{
|
||||
@@ -86,7 +90,7 @@ status_t WatchView::Archive(BMessage* archive, bool deep) const
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::Draw(BRect updateRect)
|
||||
{
|
||||
@@ -112,17 +116,18 @@ void WatchView::Draw(BRect updateRect)
|
||||
DrawString(string, BPoint(x, y));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::MouseDown(BPoint point)
|
||||
{
|
||||
BPopUpMenu* menu = new BPopUpMenu("WatchView", false, false);
|
||||
BPopUpMenu* menu = new BPopUpMenu(B_TRANSLATE("WatchView"), false, false);
|
||||
|
||||
menu->AddItem(new BMenuItem(
|
||||
"About" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED)));
|
||||
B_TRANSLATE("About" B_UTF8_ELLIPSIS),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
|
||||
menu->AddItem(new BMenuItem(
|
||||
"Quit", new BMessage(B_QUIT_REQUESTED)));
|
||||
B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED)));
|
||||
|
||||
menu->SetTargetForItems(this);
|
||||
|
||||
@@ -132,7 +137,7 @@ void WatchView::MouseDown(BPoint point)
|
||||
delete menu;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::MessageReceived(BMessage* msg)
|
||||
{
|
||||
@@ -144,21 +149,20 @@ void WatchView::MessageReceived(BMessage* msg)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::OnAboutRequested()
|
||||
{
|
||||
(new BAlert(
|
||||
NULL,
|
||||
"WebWatch " VERSION
|
||||
BString text = B_TRANSLATE("WebWatch %1"
|
||||
"\nAn internet time clock for your Deskbar\n\n"
|
||||
"Created by Matthijs Hollemans\n"
|
||||
"[email protected]\n\n"
|
||||
"Thanks to Jason Parks for his help.\n",
|
||||
"OK"))->Go(NULL);
|
||||
"Thanks to Jason Parks for his help.\n");
|
||||
text.ReplaceFirst("%1", VERSION);
|
||||
(new BAlert(NULL, text.String(), B_TRANSLATE("OK")))->Go(NULL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::OnQuitRequested()
|
||||
{
|
||||
@@ -171,7 +175,7 @@ void WatchView::OnQuitRequested()
|
||||
deskbar.RemoveItem(DESKBAR_ITEM_NAME);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void WatchView::Pulse()
|
||||
{
|
||||
@@ -183,7 +187,7 @@ void WatchView::Pulse()
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int32 WatchView::GetInternetTime()
|
||||
{
|
||||
@@ -196,4 +200,4 @@ int32 WatchView::GetInternetTime()
|
||||
return (int32) (((real_time_clock() + 3600) % 86400) / 86.4);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef WATCHVIEW_H
|
||||
#define WATCHVIEW_H
|
||||
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <View.h>
|
||||
|
||||
class WatchView : public BView
|
||||
|
||||
@@ -1,117 +1,126 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
|
||||
<HEAD>
|
||||
<TITLE>WebWatch</TITLE>
|
||||
</HEAD>
|
||||
<head>
|
||||
<title>WebWatch</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
</head>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<body style="background-color:#FFFFFF;">
|
||||
|
||||
<H1>WebWatch 1.5</H1>
|
||||
<h1>WebWatch 1.5</h1>
|
||||
|
||||
<P>Released on Thursday, 13 February 2003<BR>
|
||||
Created by <A HREF="mailto:[email protected]">Matthijs
|
||||
Hollemans</A></P>
|
||||
<p>Released on Thursday, 13 February 2003<br />
|
||||
Created by <a href="mailto:[email protected]">Matthijs
|
||||
Hollemans</a></p>
|
||||
|
||||
<H3>What is it</H3>
|
||||
<h3>What is it</h3>
|
||||
|
||||
<P>WebWatch is an unofficial port of Swatch's Internet Time utility for BeOS
|
||||
R5 or higher that runs inside the Deskbar.</P>
|
||||
<p>WebWatch is an unofficial port of Swatch's Internet Time utility for BeOS
|
||||
R5 or higher that runs inside the Deskbar.</p>
|
||||
|
||||
<P>Someone at Swatch (you know, the company that makes the watches) came up
|
||||
<p>Someone at Swatch (you know, the company that makes the watches) came up
|
||||
with an idea for a universal time format that eliminates time zones and
|
||||
geographical borders. The idea is very simple: time is no longer measured in
|
||||
hours, minutes, and seconds, but in "beats." A single day consists of 1000
|
||||
beats, so each beat corresponds to 1 minute and 26.4 seconds.</P>
|
||||
beats, so each beat corresponds to 1 minute and 26.4 seconds.</p>
|
||||
|
||||
<P>This "Internet Time" is the same all over the world, because it is measured
|
||||
<p>This "Internet Time" is the same all over the world, because it is measured
|
||||
relatively to something called the Biel Mean Time (BMT), a new meridian that
|
||||
lies in Switzerland. A day in Internet Time begins at midnight BMT, or @000
|
||||
Swatch Beats, 12 noon is equivalent to @500 beats, and so on. So if it's @812
|
||||
at my place, it's also 812 beats at yours and everyone else's.</P>
|
||||
at my place, it's also 812 beats at yours and everyone else's.</p>
|
||||
|
||||
<P>Please check out the <A HREF="http://www.swatch.com">Swatch website</A>
|
||||
for more information.</P>
|
||||
<p>Please check out the <a href="http://www.swatch.com">Swatch website</a>
|
||||
for more information.</p>
|
||||
|
||||
<H3>How to use it</H3>
|
||||
<h3>How to use it</h3>
|
||||
|
||||
<P>Simply double-click the WebWatch icon to install WebWatch into the Deskbar.
|
||||
To get rid of it, right-click <CODE>WebWatch</CODE> in the Deskbar and select
|
||||
the <CODE>Quit</CODE> option from the pop-up menu.</P>
|
||||
<p>Simply double-click the WebWatch icon to install WebWatch into the Deskbar.
|
||||
To get rid of it, right-click <code>WebWatch</code> in the Deskbar and select
|
||||
the <code>Quit</code> option from the pop-up menu.</p>
|
||||
|
||||
<H3>Legal stuff</H3>
|
||||
<h3>Legal stuff</h3>
|
||||
|
||||
<P>This version of WebWatch is open source and may be distributed under the
|
||||
<p>This version of WebWatch is open source and may be distributed under the
|
||||
terms of the MIT license. Note that the author is in no way affiliated with
|
||||
Swatch, and fully respects their copyrights and trademarks.</P>
|
||||
Swatch, and fully respects their copyrights and trademarks.</p>
|
||||
|
||||
<P>Copyright (c) 1999-2003 Matthijs Hollemans</P>
|
||||
<p>Copyright © 1999-2003 Matthijs Hollemans</p>
|
||||
|
||||
<P>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:</P>
|
||||
Software is furnished to do so, subject to the following conditions:</p>
|
||||
|
||||
<P>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</P>
|
||||
<p>The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.</p>
|
||||
|
||||
<P>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.</P>
|
||||
DEALINGS IN THE SOFTWARE.</p>
|
||||
|
||||
<H3>History</H3>
|
||||
<h3>History</h3>
|
||||
|
||||
<P><I>Version 1.5 (Thursday, 13 February 2003)</I></P>
|
||||
<p><i>Version 1.5 (Thursday, 13 February 2003)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>Cleaned up the source code.</LI>
|
||||
<LI>Now uses the plain font, not the bold font.</LI>
|
||||
</UL>
|
||||
<ul>
|
||||
<li>Cleaned up the source code.</li>
|
||||
<li>Now uses the plain font, not the bold font.</li>
|
||||
</ul>
|
||||
|
||||
<P><I>Version 1.4 (Saturday, 9 December 2000)</I></P>
|
||||
<p><i>Version 1.4 (Saturday, 9 December 2000)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>With certain fonts, WebWatch didn't always fit in the Deskbar.</LI>
|
||||
</UL>
|
||||
<ul>
|
||||
<li>With certain fonts, WebWatch didn't always fit in the Deskbar.</li>
|
||||
</ul>
|
||||
|
||||
<P><I>Version 1.3 (Sunday, 26 November 2000)</I></P>
|
||||
<p><i>Version 1.3 (Sunday, 26 November 2000)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>The time is now written using a bold font, making it better readable.</LI>
|
||||
<LI>Thanks to Jason Parks for turning WebWatch into a real Deskbar add-on.
|
||||
<ul>
|
||||
<li>The time is now written using a bold font, making it better readable.</li>
|
||||
<li>Thanks to Jason Parks for turning WebWatch into a real Deskbar add-on.
|
||||
Because of this, WebWatch no longer needs to be installed in the
|
||||
UserBootscript; the Deskbar starts it automatically. This also means that
|
||||
WebWatch is now BeOS R5 or higher only.</LI>
|
||||
</UL>
|
||||
WebWatch is now BeOS R5 or higher only.</li>
|
||||
</ul>
|
||||
|
||||
<P><I>Version 1.2 (Tuesday, 26 September 2000)</I></P>
|
||||
<p><i>Version 1.2 (Tuesday, 26 September 2000)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>Finally fixed a long-standing bug with WebWatch's background color. Now it
|
||||
uses the same color as the Deskbar.</LI>
|
||||
</UL>
|
||||
<ul>
|
||||
<li>Finally fixed a long-standing bug with WebWatch's background color. Now it
|
||||
uses the same color as the Deskbar.</li>
|
||||
</ul>
|
||||
|
||||
<P><I>Version 1.1 (Tuesday, 28 March 2000)</I></P>
|
||||
<p><i>Version 1.1 (Tuesday, 28 March 2000)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>New release for BeOS R5. Older versions of WebWatch came with source
|
||||
<ul>
|
||||
<li>New release for BeOS R5. Older versions of WebWatch came with source
|
||||
code only, which was automatically compiled during installation. However,
|
||||
because of header file changes between R5 and older versions of the BeOS,
|
||||
and because the free version of BeOS R5 doesn't necessarily include
|
||||
development tools, WebWatch 1.1 is already compiled. This means that it
|
||||
only runs on the Intel platform, since I don't have a PowerPC machine.</LI>
|
||||
</UL>
|
||||
only runs on the Intel platform, since I don't have a PowerPC machine.</li>
|
||||
</ul>
|
||||
|
||||
<P><I>Version 1.0 (Saturday, 14 August 1999)</I></P>
|
||||
<p><i>Version 1.0 (Saturday, 14 August 1999)</i></p>
|
||||
|
||||
<UL>
|
||||
<LI>First version.</LI>
|
||||
</UL>
|
||||
<ul>
|
||||
<li>First version.</li>
|
||||
</ul>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<p>
|
||||
<a href="http://validator.w3.org/check?uri=referer"><img
|
||||
src="http://www.w3.org/Icons/valid-xhtml10"
|
||||
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user