diff --git a/build/jam/images/definitions/regular b/build/jam/images/definitions/regular index d1aeda59b2..9dfe36b815 100644 --- a/build/jam/images/definitions/regular +++ b/build/jam/images/definitions/regular @@ -26,7 +26,6 @@ SYSTEM_APPS += [ FFilterByBuildFeatures RemoteDesktop Screenshot SerialConnect SoundRecorder TV - WebWatch ] ; DESKBAR_APPLICATIONS += diff --git a/src/apps/Jamfile b/src/apps/Jamfile index 5833742768..c883cf7b07 100644 --- a/src/apps/Jamfile +++ b/src/apps/Jamfile @@ -59,5 +59,4 @@ HaikuSubInclude text_search ; HaikuSubInclude tracker ; HaikuSubInclude tv ; HaikuSubInclude webpositive ; -HaikuSubInclude webwatch ; HaikuSubInclude workspaces ; diff --git a/src/apps/webwatch/Jamfile b/src/apps/webwatch/Jamfile deleted file mode 100644 index 909eafdef6..0000000000 --- a/src/apps/webwatch/Jamfile +++ /dev/null @@ -1,17 +0,0 @@ -SubDir HAIKU_TOP src apps webwatch ; - -SetSubDirSupportedPlatformsBeOSCompatible ; - -Application WebWatch : - WatchApp.cpp - WatchView.cpp - : be localestub [ TargetLibsupc++ ] - : WebWatch.rdef -; - -DoCatalogs WebWatch : - x-vnd.mahlzeit.webwatch - : - WatchApp.cpp - WatchView.cpp -; diff --git a/src/apps/webwatch/WatchApp.cpp b/src/apps/webwatch/WatchApp.cpp deleted file mode 100644 index bcb4e82337..0000000000 --- a/src/apps/webwatch/WatchApp.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1999-2003 Matthijs Hollemans - * - * 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: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 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. - */ - -#include -#include - -#include "WatchApp.h" -#include "WatchView.h" - - -BView* instantiate_deskbar_item() -{ - return new WatchView; -} - - -WatchApp::WatchApp() : BApplication(APP_SIGNATURE) -{ - B_TRANSLATE_MARK_SYSTEM_NAME_VOID("WebWatch"); - - // Here we tell the Deskbar that we want to add a new replicant, and - // where it can find this replicant (in our app). Because we only run - // less than a second, there is no need for our title to appear inside - // the Deskbar. Therefore, the application flags inside our resource - // file should be set to B_BACKGROUND_APP. - - BDeskbar deskbar; - if (!deskbar.HasItem(DESKBAR_ITEM_NAME)) - { - entry_ref ref; - be_roster->FindApp(APP_SIGNATURE, &ref); - deskbar.AddItem(&ref); - } - - PostMessage(B_QUIT_REQUESTED); -} - - -int main() -{ - WatchApp watchApp; - watchApp.Run(); - return 0; -} - diff --git a/src/apps/webwatch/WatchApp.h b/src/apps/webwatch/WatchApp.h deleted file mode 100644 index e3753ea2a4..0000000000 --- a/src/apps/webwatch/WatchApp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1999-2003 Matthijs Hollemans - * - * 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: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 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. - */ - -#ifndef WATCHAPP_H -#define WATCHAPP_H - -#include - -#define VERSION "1.5" -#define APP_SIGNATURE "application/x-vnd.mahlzeit.webwatch" -#define DESKBAR_ITEM_NAME "WebWatch2" -#define REPLICANT_CLASS "WatchView" - -class WatchApp : public BApplication -{ -public: - WatchApp(); -}; - -extern "C" _EXPORT BView* instantiate_deskbar_item(); - -#endif // WATCHAPP_H diff --git a/src/apps/webwatch/WatchView.cpp b/src/apps/webwatch/WatchView.cpp deleted file mode 100644 index b0ab5bf9ff..0000000000 --- a/src/apps/webwatch/WatchView.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 1999-2003 Matthijs Hollemans - * - * 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: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "WatchApp.h" -#include "WatchView.h" - -#undef B_TRANSLATION_CONTEXT -#define B_TRANSLATION_CONTEXT "WatchView" - - -WatchView::WatchView() - : - BView(BRect(0, 0, 1, 1), 0, 0, 0) -{ -} - - -WatchView::WatchView(BMessage* message) - : BView( - BRect(0, 0, 15, 15), DESKBAR_ITEM_NAME, B_FOLLOW_NONE, - B_WILL_DRAW | B_PULSE_NEEDED) -{ - oldTime = 0; - - //SetFont(be_bold_font); - SetFont(be_plain_font); - - // Calculate the maximum width for our replicant. Note that the Deskbar - // accepts replicants that are wider than 16 pixels, but not replicants - // that are higher than 16 pixels. - - float width = StringWidth("@999") + 4; - ResizeTo(width, 15); - - SetViewColor(B_TRANSPARENT_COLOR); -} - - -WatchView* WatchView::Instantiate(BMessage* archive) -{ - if (validate_instantiation(archive, REPLICANT_CLASS)) - { - return new WatchView(archive); - } - - return NULL; -} - - -status_t WatchView::Archive(BMessage* archive, bool deep) const -{ - super::Archive(archive, deep); - - archive->AddString("add_on", APP_SIGNATURE); - archive->AddString("class", REPLICANT_CLASS); - - return B_OK; -} - - -void WatchView::Draw(BRect updateRect) -{ - super::Draw(updateRect); - - char string[5]; - sprintf(string, "@%03" B_PRId32, GetInternetTime()); - - font_height height; // center the text horizontally - GetFontHeight(&height); // and vertically in the Deskbar - BRect rect = Bounds(); - float width = StringWidth(string); - float x = 1 + (rect.Width() - width)/2; - float y = height.ascent - + (rect.Height() - (height.ascent + height.descent))/2; - - SetHighColor(Parent()->ViewColor()); - FillRect(updateRect); - - SetLowColor(Parent()->ViewColor()); - SetHighColor(ui_color(B_MENU_ITEM_TEXT_COLOR)); - SetDrawingMode(B_OP_OVER); - DrawString(string, BPoint(x, y)); -} - - -void WatchView::MouseDown(BPoint point) -{ - BPopUpMenu* menu = new BPopUpMenu("WatchView", false, false); - - menu->AddItem(new BMenuItem( - B_TRANSLATE("About"), - new BMessage(B_ABOUT_REQUESTED))); - - menu->AddItem(new BMenuItem( - B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED))); - - menu->SetTargetForItems(this); - - ConvertToScreen(&point); - menu->Go(point, true, false, true); - - delete menu; -} - - -void WatchView::MessageReceived(BMessage* msg) -{ - switch (msg->what) - { - case B_ABOUT_REQUESTED: OnAboutRequested(); break; - case B_QUIT_REQUESTED: OnQuitRequested(); break; - default: super::MessageReceived(msg); break; - } -} - - -void WatchView::OnAboutRequested() -{ - BString text = B_TRANSLATE("WebWatch %1" - "\nAn internet time clock for your Deskbar\n\n" - "Created by Matthijs Hollemans\n" - "mahlzeit@users.sourceforge.net\n\n" - "Thanks to Jason Parks for his help.\n"); - text.ReplaceFirst("%1", VERSION); - BAlert* alert = new BAlert(NULL, text.String(), B_TRANSLATE("OK")); - alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); - alert->Go(NULL); -} - - -void WatchView::OnQuitRequested() -{ - // According to the Be Book, we are not allowed to do this - // since we're a view that's sitting on the Deskbar's shelf. - // But it works just fine for me, and I see no other way to - // make a Deskbar replicant quit itself. - - BDeskbar deskbar; - deskbar.RemoveItem(DESKBAR_ITEM_NAME); -} - - -void WatchView::Pulse() -{ - int32 currentTime = GetInternetTime(); - if (oldTime != currentTime) - { - oldTime = currentTime; - Invalidate(); - } -} - - -int32 WatchView::GetInternetTime() -{ - // First we get the current time as the number of seconds since - // 1 January 1970 GMT and add an hour's worth of seconds to adjust - // for the Biel Mean Time (BMT). Then we get the number of seconds - // that have passed today, and divide it with the length of a beat - // to get the number of elapsed beats. - - return (int32) (((real_time_clock() + 3600) % 86400) / 86.4); -} - diff --git a/src/apps/webwatch/WatchView.h b/src/apps/webwatch/WatchView.h deleted file mode 100644 index f6d0e88ce5..0000000000 --- a/src/apps/webwatch/WatchView.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1999-2003 Matthijs Hollemans - * - * 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: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * 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. - */ - -#ifndef WATCHVIEW_H -#define WATCHVIEW_H - -#include -#include -#include - -class WatchView : public BView -{ -public: - - // This constructor is used by the WatchApp class to install the - // WebWatch replicant into the Deskbar. - WatchView(); - - // This constructor is used to "rehydrate" the archived WatchView - // object after the Deskbar (or any other BShelf) has received it. - WatchView(BMessage* message); - - // Called by the Deskbar's shelf after it has received the message - // that contains our replicant. (To enable the Deskbar to find this - // function, we export it from the executable.) - static WatchView* Instantiate(BMessage* archive); - - // Archives the data that we need in order to instantiate ourselves. - virtual status_t Archive(BMessage* archive, bool deep = true) const; - - virtual void Draw(BRect updateRect); - virtual void MouseDown(BPoint point); - virtual void MessageReceived(BMessage* message); - - // Periodically checks whether the Internet Time has changed, and tells - // the view to redraw itself. The time between these checks depends on - // the pulse rate of the Deskbar window. By default the pulse rate is 500 - // milliseconds, which is fine for our purposes. Note that other Deskbar - // replicants could possibly change the pulse rate of the Deskbar window. - virtual void Pulse(); - -private: - - typedef BView super; - - void OnAboutRequested(); - void OnQuitRequested(); - - // Calculates the current Internet Time. - int32 GetInternetTime(); - - // The Internet Time from the last call to Pulse(). - int32 oldTime; -}; - -#endif // WATCHVIEW_H diff --git a/src/apps/webwatch/WebWatch.rdef b/src/apps/webwatch/WebWatch.rdef deleted file mode 100644 index 7b2af818bf..0000000000 --- a/src/apps/webwatch/WebWatch.rdef +++ /dev/null @@ -1,50 +0,0 @@ - -resource app_signature "application/x-vnd.mahlzeit.webwatch"; - -resource app_name_catalog_entry "x-vnd.mahlzeit.webwatch:System name:WebWatch"; - -resource app_version { - major = 1, - middle = 5, - minor = 0, - variety = B_APPV_FINAL, - internal = 0, - short_info = "WebWatch", - long_info = "WebWatch 1.5.0 ©1999-2003 Matthijs Hollemans.,\n" - "©2008-2009 Haiku, Inc.\n" - "A port of Swatch Internet Time " -}; - -resource app_flags B_SINGLE_LAUNCH | B_BACKGROUND_APP; - -resource vector_icon { - $"6E636966080500040071020006043D88273D8827BED4133ED4134B1000C6104F" - $"4104A3A585B3FEFFE1026667FF037072020006033B9EE13B9EE1BB9EE13B9EE1" - $"47C3854A3E7A009BEFF03FFFFFFFFF04A8AA020006033C63923CAF4CBEFCFD3E" - $"A8B54B019A4657497C40C5C70030A3A5FF28A3A5020106023C60000000000000" - $"003CE0004940004A100000F8F8FFFF9898FF0200160236921535A80EBE517B3F" - $"427A4A81C644E5E400DAFF0005FF0E0604EB5E5264555E52524C486050605060" - $"5660060EFEEFFF07C6A7C82FC6A7C82FC6A7C82FC6D3C7F9525352C7AF525352" - $"40524052BB93C08D26C482B75FBE11B425BA33B55C36242E28B6D0B7F2B6D0B7" - $"F2B6D0B7F2B5EBB8C3B565BBC226BA0FB565BBC2B565C354B565C354B565C46D" - $"B764C651B649C5C4B764C651C1C0CB82C1C0CB82C27DCBE0C37ACB5FC321CBCB" - $"C37ACB5FCB5F060AFE6F06C6A7C82FC6A7C82FC6A7C82FC6D3C7F9525352C7AF" - $"52535240524052BB93C08D26C482B75FBE11B425BA33B55C36242E28B6D0B7F2" - $"B7F2C37ACB5FCB5F0607FE3F382C382C382CC046B9A3C3B446C353BE25C3B2BD" - $"F7BD5D2AC151B8F7BD5D2A3A2A3A2ABAAFB5A4B71FB7B2B85AB606B86FB6BD38" - $"2CBA62B6B0382C0208382C382CB89AB5CCB565BBC226B793B565BBC2B565C354" - $"B565C354B565C46DB764C651B649C5C4B764C651C1C0CB82C1C0CB82C2D9CC0E" - $"C3BF5BC3BECB9DC3BF5BC3BF48C3BF484ABEC3BC912CC085B9C3BC912C020438" - $"30B97AB7D4BFA4BAEA464646BED746C572BC924EBFA5C6DEB97EC3C92ABC8E2A" - $"BFDB2AB94102043832BF33BB7EB9EBB8D9B7C9BCF42CBA18B7C9BFD1BC924CB9" - $"EDC335BF36C5DAC15B45C15AC49B44BEE2020730BE8C30BE8C30BC21BD5D37BB" - $"28BB0FBE33BC95BF9FBE10BEFABD41BEE2BCBDBC9134BDC9BB95BA5DB9DDB896" - $"BD5AB895BAEFB896BEDABA51C1D4B945C084B9BBC0C7B962BE8CB961BF9FB962" - $"BE8C02053DBDBC3DBDBCBDFEBD74BD8ABE3EBD89BDAFBD8ABECEBE90BFC5BDFF" - $"BF7DBF20C00DBF94BF43BF94BFD2BF93BEB3BE90BDBCBF1EBE04BE90BDBC0802" - $"403440360802404A404C08024A404C400802344036400407EE2F41423F3EC091" - $"BE32BE22BFB53C454541C190C215C1DDBEC6403946393B393848BB1CC0853B4D" - $"4647090A010100000A0001011001178400040A020102000A040104000A030103" - $"000A000105000A050106000A07020708000A06050D0C0B0A09123EFE743DD3DA" - $"3559283F4C7FBECFC1C690AD0117832204" -}; diff --git a/src/apps/webwatch/readme.html b/src/apps/webwatch/readme.html deleted file mode 100644 index 32db17c2a0..0000000000 --- a/src/apps/webwatch/readme.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - -WebWatch - - - - - -

WebWatch 1.5

- -

Released on Thursday, 13 February 2003
-Created by Matthijs -Hollemans

- -

What is it

- -

WebWatch is an unofficial port of Swatch's Internet Time utility for BeOS -R5 or higher that runs inside the Deskbar.

- -

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.

- -

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.

- -

Please check out the Swatch website -for more information.

- -

How to use it

- -

Simply double-click the WebWatch icon to install WebWatch into the Deskbar. -To get rid of it, right-click WebWatch in the Deskbar and select -the Quit option from the pop-up menu.

- -

Legal stuff

- -

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.

- -

Copyright © 1999-2003 Matthijs Hollemans

- -

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:

- -

The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software.

- -

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.

- -

History

- -

Version 1.5 (Thursday, 13 February 2003)

- -
    -
  • Cleaned up the source code.
  • -
  • Now uses the plain font, not the bold font.
  • -
- -

Version 1.4 (Saturday, 9 December 2000)

- -
    -
  • With certain fonts, WebWatch didn't always fit in the Deskbar.
  • -
- -

Version 1.3 (Sunday, 26 November 2000)

- -
    -
  • The time is now written using a bold font, making it better readable.
  • -
  • 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.
  • -
- -

Version 1.2 (Tuesday, 26 September 2000)

- -
    -
  • Finally fixed a long-standing bug with WebWatch's background color. Now it -uses the same color as the Deskbar.
  • -
- -

Version 1.1 (Tuesday, 28 March 2000)

- -
    -
  • 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.
  • -
- -

Version 1.0 (Saturday, 14 August 1999)

- -
    -
  • First version.
  • -
- -

- Valid XHTML 1.0 Transitional -

- - -