Index: src/lang/french.txt
===================================================================
--- src/lang/french.txt	(revision 18973)
+++ src/lang/french.txt	(working copy)
@@ -3655,4 +3655,8 @@
 STR_CONTENT_INTRO_BUTTON_TIP                                    :{BLACK}Vérifier les contenus à télécharger nouveaux et mis à jour
 STR_CONTENT_INTRO_MISSING_BUTTON                                :{BLACK}Trouver le contenu manquant en ligne
 STR_CONTENT_INTRO_MISSING_BUTTON_TIP                            :{BLACK}Vérifier si le contenu manquant peut être trouvé en ligne
+
+STR_WATCH_WINDOW_TITLE                                          :{WHITE}en train d'observer {STRING}
+STR_WATCH_CLICK_TO_WATCH_COMPANY                                :{BLACK}Cliquer ici pour observer les constructions de la compagnie
+STR_WATCH_CLICK_NEW_WINDOW                                      :{BLACK}Cliquer ici pour ouvrir une nouvelle fenêtre d'observation
 ########
Index: src/lang/english.txt
===================================================================
--- src/lang/english.txt	(revision 18973)
+++ src/lang/english.txt	(working copy)
@@ -3655,4 +3655,8 @@
 STR_CONTENT_INTRO_BUTTON_TIP                                    :{BLACK}Check for new and updated content to download
 STR_CONTENT_INTRO_MISSING_BUTTON                                :{BLACK}Find missing content online
 STR_CONTENT_INTRO_MISSING_BUTTON_TIP                            :{BLACK}Check whether the missing content can be found online
+
+STR_WATCH_WINDOW_TITLE                                          :{WHITE}Watching {RAW_STRING}
+STR_WATCH_CLICK_TO_WATCH_COMPANY                                :{BLACK}Click here to watch company building
+STR_WATCH_CLICK_NEW_WINDOW                                      :{BLACK}Click here to open new watching window
 ########
Index: src/console_cmds.cpp
===================================================================
--- src/console_cmds.cpp	(revision 18973)
+++ src/console_cmds.cpp	(working copy)
@@ -33,6 +33,8 @@
 #include "ai/ai.hpp"
 #include "ai/ai_config.hpp"
 
+#include "watch_gui.h"
+
 #ifdef ENABLE_NETWORK
 	#include "table/strings.h"
 #endif /* ENABLE_NETWORK */
@@ -364,7 +366,13 @@
 	return true;
 }
 
+DEF_CONSOLE_CMD(ConWatch)
+{
+	ShowWatchWindow( );
+	return true;
+}
 
+
 /**********************************
  * Network Core Console Commands
  **********************************/
@@ -1760,6 +1768,7 @@
 	IConsoleCmdRegister("setting",      ConSetting);
 	IConsoleCmdRegister("list_settings",ConListSettings);
 	IConsoleCmdRegister("gamelog",      ConGamelogPrint);
+	IConsoleCmdRegister("watch",        ConWatch);
 
 	IConsoleAliasRegister("dir",          "ls");
 	IConsoleAliasRegister("del",          "rm %+");
Index: src/window_type.h
===================================================================
--- src/window_type.h	(revision 18973)
+++ src/window_type.h	(working copy)
@@ -99,6 +99,7 @@
 	WC_AI_DEBUG,
 	WC_AI_LIST,
 	WC_AI_SETTINGS,
+	WC_WATCH_COMPANY,
 
 	WC_INVALID = 0xFFFF
 };
Index: src/command.cpp
===================================================================
--- src/command.cpp	(revision 18973)
+++ src/command.cpp	(working copy)
@@ -21,6 +21,9 @@
 #include "company_base.h"
 #include "signal_func.h"
 
+#include "watch_gui.h"
+#include "window_func.h"
+
 #include "table/strings.h"
 
 StringID _error_message;
@@ -493,6 +496,8 @@
 	assert(_docommand_recursive == 0);
 
 	CommandCost res, res2;
+	int watching_window = 0;
+	WatchCompany *wc;
 
 	int x = TileX(tile) * TILE_SIZE;
 	int y = TileY(tile) * TILE_SIZE;
@@ -629,6 +634,18 @@
 
 	if (callback) callback(true, tile, p1, p2);
 	ClearStorageChanges(true);
+
+	/* Send information to the Watching windows */
+	// Search for all watching windows...
+	wc = dynamic_cast<WatchCompany*>(FindWindowById(WC_WATCH_COMPANY, watching_window));
+	while ( wc != NULL) {
+		wc->OnDoCommand( _current_company, tile );
+		watching_window++;
+		wc = dynamic_cast<WatchCompany*>(FindWindowById(WC_WATCH_COMPANY, watching_window));
+	}
+
+
+
 	return true;
 
 show_error:
Index: src/watch_gui.cpp
===================================================================
--- src/watch_gui.cpp	(revision 0)
+++ src/watch_gui.cpp	(revision 0)
@@ -0,0 +1,348 @@
+/* $Id: watch_gui.cpp  17678 2009-10-07 20:54:05  muxy $ */
+
+/** @file watch_gui.cpp GUI that follow other company building. */
+
+#include "stdafx.h"
+#include "watch_gui.h"
+#include "widget_type.h"
+#include "gfx_type.h"
+#include "gfx_func.h"
+#include "company_base.h"
+#include "company_gui.h"
+#include "viewport_func.h"
+#include "window_func.h"
+#include "strings_func.h"
+#include "zoom_func.h"
+#include "map_func.h"
+#include "network/network.h"
+#include "network/network_base.h"
+
+#include "table/sprites.h"
+#include "table/strings.h"
+
+
+static const Widget _watch_company_widgets[] = {
+// main window stuff
+{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,    0,   13, STR_00C5,                  STR_018B_CLOSE_WINDOW},
+{    WWT_CAPTION,  RESIZE_RIGHT,  COLOUR_GREY,    11,   287,    0,   13, STR_WATCH_WINDOW_TITLE,    STR_018C_WINDOW_TITLE_DRAG_THIS},
+{  WWT_STICKYBOX,     RESIZE_LR,  COLOUR_GREY,   288,   299,    0,   13, 0x0,                       STR_STICKY_BUTTON},
+// frame & watch zone
+{      WWT_PANEL,     RESIZE_RB,  COLOUR_GREY,    74,   299,   14,  244, 0x0,                       STR_NULL},
+{      WWT_INSET,     RESIZE_RB,  COLOUR_GREY,    76,   297,   16,  242, 0x0,                       STR_NULL},
+
+// Company, has a client, activity
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    14,    26, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    27,    39, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    40,    52, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    53,    65, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    66,    78, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    79,    91, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,    92,   104, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   105,   117, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   118,   130, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   131,   142, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   143,   155, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   156,   168, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   169,   181, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   182,   194, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   195,   207, 0x0,                     STR_WATCH_CLICK_TO_WATCH_COMPANY},
+
+// Player in company
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    14,    26, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    27,    39, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    40,    52, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    53,    65, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    66,    78, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    79,    91, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,    92,   104, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   105,   117, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   118,   130, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   131,   142, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   143,   155, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   156,   168, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   169,   181, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   182,   194, 0x0,                STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    55,   195,   207, 0x0,                STR_NULL},
+
+// Company activity
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    14,    26, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    27,    39, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    40,    52, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    53,    65, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    66,    78, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    79,    91, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,    92,   104, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   105,   117, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   118,   130, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   131,   142, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   143,   155, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   156,   168, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   169,   181, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   182,   194, 0x0,                     STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    56,    73,   195,   207, 0x0,                     STR_NULL},
+// New window btn
+{    WWT_PUSHBTN,   RESIZE_NONE,  COLOUR_GREY,     0,    36,   208,   220, 0x0,                     STR_WATCH_CLICK_NEW_WINDOW},
+{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    37,    73,   208,   220, 0x0,                     STR_NULL},
+
+// Zoom Out, In, Center btns
+{ WWT_PUSHIMGBTN,   RESIZE_NONE,  COLOUR_GREY,     0,    24,   221,   242, SPR_IMG_ZOOMOUT,         STR_0180_ZOOM_THE_VIEW_OUT},
+{ WWT_PUSHIMGBTN,   RESIZE_NONE,  COLOUR_GREY,    25,    49,   221,   242, SPR_IMG_ZOOMIN,          STR_017F_ZOOM_THE_VIEW_IN},
+{ WWT_PUSHIMGBTN,   RESIZE_NONE,  COLOUR_GREY,    48,    73,   221,   242, SPR_CENTRE_VIEW_VEHICLE, 0x0  },
+// extra stuff for resizing purpose
+{      WWT_PANEL, RESIZE_BOTTOM,  COLOUR_GREY,     0,    73,   243,   244, 0x0,                     STR_NULL},
+// status bar stuff
+{      WWT_PANEL,    RESIZE_RTB,  COLOUR_GREY,     0,   287,   245,   256, 0x0,                     STR_NULL},
+{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,   288,   299,   245,   256, 0x0,                     STR_RESIZE_BUTTON},
+
+
+{   WIDGETS_END},
+};
+
+static const WindowDesc _watch_company_desc(
+	WDP_AUTO, WDP_AUTO, 300, 257, 300, 257,
+	WC_WATCH_COMPANY, WC_NONE,
+	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
+	_watch_company_widgets
+);
+/* Watch Company Window Stuff */
+
+WatchCompany::WatchCompany(const WindowDesc *desc, int window_number, CompanyID company_to_watch ) : Window(desc, window_number)
+{
+	this->watched_company = IsValidCompanyID( company_to_watch)?company_to_watch:INVALID_COMPANY;
+
+	for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
+		this->company_activity[i] = 0;
+		this->SetWidgetDisabledState(i + EWW_PB_COMPANY_FIRST, !IsValidCompanyID(i));
+	}
+	InitializeWindowViewport(this, this->widget[EWW_WATCH].left+1, this->widget[EWW_WATCH].top+1, this->widget[EWW_WATCH].right - this->widget[EWW_WATCH].left - 1, this->widget[EWW_WATCH].bottom - this->widget[EWW_WATCH].top - 1, 0, ZOOM_LVL_VIEWPORT);
+	this->DisableWidget(EWW_ZOOMIN);
+	
+	this->FindWindowPlacementAndResize(desc);
+
+	Point pt;
+	const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
+	/* center on same place as main window (zoom is maximum, no adjustment needed) */
+	pt.x = w->viewport->scrollpos_x + w->viewport->virtual_height / 2;
+	pt.y = w->viewport->scrollpos_y + w->viewport->virtual_height / 2;
+
+	this->viewport->scrollpos_x = pt.x - ((this->widget[EWW_WATCH].right - this->widget[EWW_WATCH].left) - 1) / 2;
+	this->viewport->scrollpos_y = pt.y - ((this->widget[EWW_WATCH].bottom - this->widget[EWW_WATCH].top) - 1) / 2;
+	this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
+	this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
+}
+
+void WatchCompany::OnPaint()
+{
+	const Company *c;
+	NetworkClientInfo *ci;
+	char company_name[NETWORK_COMPANY_NAME_LENGTH];
+
+	this->owner = this->watched_company;
+
+	if ( this->watched_company == INVALID_COMPANY || !IsValidCompanyID(this->watched_company) ) {
+		SetDParamStr( 0, "nothing" );
+	} else {
+		c = GetCompany( this->watched_company );
+		SetDParam(0, c->index);
+		GetString(company_name, STR_COMPANY_NAME, lastof(company_name));
+		SetDParamStr( 0, company_name );
+	}
+	FOR_ALL_CLIENT_INFOS( ci ) {
+		if (IsValidCompanyID(ci->client_playas)) {
+			company_count_client[ci->client_playas]+=1;
+		}
+	}
+	/* Draw standard stuff */
+	this->DrawWidgets();
+
+	this->DrawViewport();
+
+	/* Check if the currently selected company is still active. */
+	if ( this->watched_company == INVALID_COMPANY || !IsValidCompanyID(this->watched_company) ) {
+		if (this->watched_company != INVALID_COMPANY) {
+			/* Raise and disable the widget for the previous selection. */
+			this->RaiseWidget(watched_company + EWW_PB_COMPANY_FIRST);
+			this->DisableWidget(watched_company + EWW_PB_COMPANY_FIRST);
+			this->SetDirty();
+
+			this->watched_company = INVALID_COMPANY;
+		}
+	}
+	// Lower the current company
+	if (this->watched_company != INVALID_COMPANY) {
+		this->LowerWidget(watched_company + EWW_PB_COMPANY_FIRST);
+	}
+
+	/* Paint the company icons */
+	for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
+		if (!IsValidCompanyID(i)) {
+			/* Check if we have the company as an active company */
+			if (!this->IsWidgetDisabled(i + EWW_PB_COMPANY_FIRST)) {
+				/* Bah, company gone :( */
+				this->DisableWidget(i + EWW_PB_COMPANY_FIRST);
+
+				/* We need a repaint */
+				this->SetDirty();
+			}
+			continue;
+		}
+
+		/* Check if we have the company marked as inactive */
+		if (this->IsWidgetDisabled(i + EWW_PB_COMPANY_FIRST)) {
+			/* New company! Yippie :p */
+			this->EnableWidget(i + EWW_PB_COMPANY_FIRST);
+			/* We need a repaint */
+			this->SetDirty();
+		}
+
+		int x = (i==this->watched_company?1:0);
+		DrawCompanyIcon(i, this->widget[i + EWW_PB_COMPANY_FIRST].left + 12 + x , this->widget[i + EWW_PB_COMPANY_FIRST].top + 2 + x );
+
+		// Paint the has_client buttons
+#ifdef ENABLE_NETWORK
+		if (!_networking) {
+#endif
+			// Local mode, company 0 must have a client (except if cheating)
+			// company AI always has a client
+			c = GetCompany( i );
+			if (c->is_ai || i==COMPANY_FIRST) {
+				DrawSprite(SPR_BLOT, PALETTE_TO_GREEN, this->widget[EWW_HAS_CLIENT_FIRST + i].right - 11, this->widget[EWW_HAS_CLIENT_FIRST + i].top + 2);
+			} else {
+				DrawSprite(SPR_BLOT, PALETTE_TO_GREY, this->widget[EWW_HAS_CLIENT_FIRST + i].right - 11, this->widget[EWW_HAS_CLIENT_FIRST + i].top + 2);
+			}
+#ifdef ENABLE_NETWORK
+		} else {
+			// Mode partie r�seau, compter les clients qui jouent pour la compagnie
+			if (company_count_client[i]>0) {
+				DrawSprite(SPR_BLOT, PALETTE_TO_GREEN, this->widget[EWW_HAS_CLIENT_FIRST + i].right - 11, this->widget[EWW_HAS_CLIENT_FIRST + i].top + 2);
+			} else {
+				DrawSprite(SPR_BLOT, PALETTE_TO_GREY, this->widget[EWW_HAS_CLIENT_FIRST + i].right - 11, this->widget[EWW_HAS_CLIENT_FIRST + i].top + 2);
+			}
+		}
+#endif
+		DrawSprite(SPR_BLOT, company_activity[i]>0?PALETTE_TO_RED:PALETTE_TO_GREY, this->widget[EWW_ACTIVITY_FIRST + i].right - 11, this->widget[EWW_ACTIVITY_FIRST + i].top + 2);
+	}
+}
+void WatchCompany::OnHundredthTick()
+{
+}
+
+void WatchCompany::OnTick()
+{
+	for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
+		if ( this->company_activity[i]>0 )
+		{
+			this->company_activity[i]--;
+			if ( this->company_activity[i]==0 ) {
+				this->InvalidateWidget( EWW_ACTIVITY_FIRST + i );
+			}
+		}
+	}
+}
+
+void WatchCompany::OnTimeout()
+{
+	this->RaiseWidget( EWW_ZOOMIN );
+	this->RaiseWidget( EWW_ZOOMOUT );
+	this->RaiseWidget( EWW_PB_NEW_WINDOW );
+	this->RaiseWidget( EWW_CENTER );
+	this->InvalidateWidget( EWW_ZOOMIN );
+	this->InvalidateWidget( EWW_ZOOMOUT );
+	this->InvalidateWidget( EWW_PB_NEW_WINDOW );
+	this->InvalidateWidget( EWW_CENTER );
+}
+void WatchCompany::OnClick(Point pt, int widget)
+{
+	if ( (widget >= EWW_PB_COMPANY_FIRST) && (widget <= EWW_PB_COMPANY_LAST) ) {
+		// work only if widget is not disabled
+		if (!this->IsWidgetDisabled(widget)) {
+			// Change company requested
+			if (this->watched_company != INVALID_COMPANY) {
+				this->RaiseWidget(this->watched_company + EWW_PB_COMPANY_FIRST);
+			}
+			if ( this->watched_company == (CompanyID)(widget-EWW_PB_COMPANY_FIRST) ) {
+				this->watched_company = INVALID_COMPANY;
+			}
+			else {
+				this->watched_company = (CompanyID)(widget-EWW_PB_COMPANY_FIRST);
+				this->LowerWidget(watched_company + EWW_PB_COMPANY_FIRST);
+			}
+			this->SetDirty();
+		}
+	}
+	else {
+		switch (widget) {
+
+			case EWW_ZOOMOUT: DoZoomInOutWindow(ZOOM_OUT, this); break;
+			case EWW_ZOOMIN: DoZoomInOutWindow(ZOOM_IN,  this); break;
+
+			case EWW_PB_NEW_WINDOW: ShowWatchWindow( ); break;
+
+			case EWW_CENTER: { 
+				Window *main_window = FindWindowById(WC_MAIN_WINDOW, 0);
+				int x = this->viewport->scrollpos_x; 
+				int y = this->viewport->scrollpos_y;
+
+				main_window->viewport->dest_scrollpos_x =  x - (main_window->viewport->virtual_width -  this->viewport->virtual_width) / 2;
+				main_window->viewport->dest_scrollpos_y =  y - (main_window->viewport->virtual_height - this->viewport->virtual_height) / 2;
+				main_window->viewport->follow_vehicle   = INVALID_VEHICLE;
+			} break;
+		}
+	}
+}
+
+void WatchCompany::OnResize(Point new_size, Point delta)
+{
+	this->viewport->width          += delta.x;
+	this->viewport->height         += delta.y;
+	this->viewport->virtual_width  += delta.x;
+	this->viewport->virtual_height += delta.y;
+}
+
+void WatchCompany::OnScroll(Point delta)
+{
+	const ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y);
+	if (vp == NULL) return;
+
+	this->viewport->scrollpos_x += ScaleByZoom(delta.x, vp->zoom);
+	this->viewport->scrollpos_y += ScaleByZoom(delta.y, vp->zoom);
+	this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
+	this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
+}
+
+void WatchCompany::OnMouseWheel(int wheel)
+{
+	ZoomInOrOutToCursorWindow(wheel < 0, this);
+}
+
+void WatchCompany::OnInvalidateData(int data = 0)
+{
+	/* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */
+	HandleZoomMessage(this, this->viewport, EWW_ZOOMIN, EWW_ZOOMOUT);
+}
+void WatchCompany::OnDoCommand( CompanyByte company, TileIndex tile )
+{
+	if (this->watched_company == company)
+	{
+		// Scroll window to the tile, only if not zero
+		if (tile != 0) {
+			ScrollWindowTo( TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, -1, this );
+		}
+	} else {
+		// This is for another company, paint the activity with SPR_BLOT green
+		// Set the activity bit for company
+		this->company_activity[company] = 50;
+		this->InvalidateWidget( EWW_ACTIVITY_FIRST + company );
+	}
+}
+
+
+void ShowWatchWindow( )
+{
+	int i = 0;
+
+	/* find next free window number for watch viewport */
+	while (FindWindowById(WC_WATCH_COMPANY, i) != NULL) i++;
+
+	new WatchCompany( &_watch_company_desc, i, INVALID_COMPANY);
+}
Index: src/watch_gui.h
===================================================================
--- src/watch_gui.h	(revision 0)
+++ src/watch_gui.h	(revision 0)
@@ -0,0 +1,59 @@
+/* $Id: watch_gui.h 17678 2009-10-07 20:54:05  muxy $ */
+
+/** @file watch_gui.h GUI Functions related to watching. */
+
+#ifndef WATCH_GUI_H
+#define WATCH_GUI_H
+
+#include "window_gui.h"
+#include "company_base.h"
+
+struct WatchCompany : Window
+{
+	enum WatchCompanyWidgets {
+		EWW_CLOSE,
+		EWW_CAPTION,
+		EWW_STICKY,
+		EWW_FRAME,
+		EWW_WATCH,
+		EWW_PB_COMPANY_FIRST,
+		EWW_PB_COMPANY_LAST  = EWW_PB_COMPANY_FIRST + MAX_COMPANIES - 1,
+		EWW_HAS_CLIENT_FIRST,
+		EWW_HAS_CLIENT_LAST = EWW_HAS_CLIENT_FIRST + MAX_COMPANIES - 1,
+		EWW_ACTIVITY_FIRST,
+		EWW_ACTIVITY_LAST = EWW_ACTIVITY_FIRST + MAX_COMPANIES - 1,
+		EWW_PB_NEW_WINDOW,
+		EWW_SPACER1,
+		EWW_ZOOMOUT,
+		EWW_ZOOMIN,
+		EWW_CENTER,
+		EWW_SPACER2,
+		EWW_SPACER3,
+		EWW_RESIZE,
+	};
+
+public:
+	CompanyID watched_company;
+	// CompanyMask company_activity;
+	int company_activity[MAX_COMPANIES];
+	int company_count_client[MAX_COMPANIES];
+
+	// WatchCompany(const WindowDesc *desc, int window_number, CompanyID company_to_watch ) : Window(desc, window_number)
+	WatchCompany(const WindowDesc *desc, int window_number, CompanyID company_to_watch );
+
+	virtual void OnPaint( );
+	virtual void OnTimeout( );
+	virtual void OnClick(Point pt, int widget);
+	virtual void OnResize(Point new_size, Point delta);
+	virtual void OnScroll(Point delta);
+	virtual void OnMouseWheel(int wheel);
+	virtual void OnInvalidateData(int data );
+	virtual void OnHundredthTick( );
+	virtual void OnTick( );
+
+	void OnDoCommand( CompanyByte company, TileIndex tile );
+};
+
+void ShowWatchWindow( );
+
+#endif /* COMPANY_GUI_H */
Index: projects/openttd_vs80.vcproj
===================================================================
--- projects/openttd_vs80.vcproj	(revision 18973)
+++ projects/openttd_vs80.vcproj	(working copy)
@@ -1592,6 +1592,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\watch_gui.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\water.h"
 				>
 			</File>
@@ -1904,6 +1908,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\watch_gui.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\waypoint_gui.cpp"
 				>
 			</File>
Index: projects/openttd_vs90.vcproj
===================================================================
--- projects/openttd_vs90.vcproj	(revision 18973)
+++ projects/openttd_vs90.vcproj	(working copy)
@@ -1589,6 +1589,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\watch_gui.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\water.h"
 				>
 			</File>
@@ -1901,6 +1905,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\watch_gui.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\waypoint_gui.cpp"
 				>
 			</File>
Index: source.list
===================================================================
--- source.list	(revision 18973)
+++ source.list	(working copy)
@@ -326,6 +326,7 @@
 vehiclelist.h
 viewport_func.h
 viewport_type.h
+watch_gui.h
 water.h
 waypoint.h
 waypoint_type.h
@@ -420,6 +421,7 @@
 transparency_gui.cpp
 tree_gui.cpp
 vehicle_gui.cpp
+watch_gui.cpp
 waypoint_gui.cpp
 
 # Widgets
