RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.cpp,v
retrieving revision 1.6
diff -u -r1.6 Frontend.cpp
--- gui/win32/Main/Frontend.cpp	21 Nov 2004 17:10:27 -0000	1.6
+++ gui/win32/Main/Frontend.cpp	22 Dec 2004 19:55:09 -0000
@@ -42,6 +42,7 @@
 #include "stdafx.h"
 #include "Frontend.h"
 #include "FrontendDlg.h"
+#include "TrayIcon.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -106,6 +107,8 @@
 
 	CFrontendDlg dlg;
 
+	tray_icon = new TrayIcon( dlg, AfxGetInstanceHandle() );
+
 	dlg.ConfigFile = CmdLineInfo.m_strFileName;
 
 	m_pMainWnd = &dlg;
Index: gui/win32/Main/Frontend.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.h,v
retrieving revision 1.4
diff -u -r1.4 Frontend.h
--- gui/win32/Main/Frontend.h	21 Nov 2004 17:10:27 -0000	1.4
+++ gui/win32/Main/Frontend.h	22 Dec 2004 19:55:09 -0000
@@ -52,6 +52,8 @@
 
 #include "resource.h"
 
+class TrayIcon;
+
 class CFrontendApp : public CWinApp
 {
 public:
@@ -61,6 +63,7 @@
 	unsigned int RedirectThreadFunc(void);
 
 	HANDLE OutRead;
+	TrayIcon* tray_icon;
 
 	//{{AFX_VIRTUAL(CFrontendApp)
 	public:
Index: gui/win32/Main/Frontend.rc
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/Frontend.rc,v
retrieving revision 1.4
diff -u -r1.4 Frontend.rc
--- gui/win32/Main/Frontend.rc	20 Nov 2004 22:52:49 -0000	1.4
+++ gui/win32/Main/Frontend.rc	22 Dec 2004 19:55:10 -0000
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
 //
 #include "resource.h"
 
@@ -13,7 +13,7 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// Englisch (USA) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
 #ifdef _WIN32
@@ -27,18 +27,18 @@
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE 
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE 
 BEGIN
     "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
     "#define _AFX_NO_OLE_RESOURCES\r\n"
@@ -65,11 +65,11 @@
 //
 
 IDD_FRONTEND_DIALOG DIALOGEX 0, 0, 399, 289
-STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
-    WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | 
+    WS_CAPTION | WS_SYSMENU
 EXSTYLE WS_EX_APPWINDOW
 CAPTION "olsr.org Switch 0.4.8"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     CONTROL         "Tab1",IDC_TAB1,"SysTabControl32",0x0,7,7,383,256
     PUSHBUTTON      "Start",IDC_BUTTON1,228,268,50,14
@@ -77,8 +77,8 @@
     PUSHBUTTON      "Exit",IDC_BUTTON3,340,268,50,14
 END
 
-IDD_DIALOG1 DIALOG DISCARDABLE  0, 0, 377, 240
-STYLE WS_CHILD | WS_VISIBLE
+IDD_DIALOG1 DIALOG  0, 0, 377, 240
+STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
 FONT 8, "MS Sans Serif"
 BEGIN
     EDITTEXT        IDC_EDIT1,7,25,363,208,ES_MULTILINE | ES_READONLY | 
@@ -89,8 +89,8 @@
     PUSHBUTTON      "Clear",IDC_BUTTON1,320,7,50,14
 END
 
-IDD_DIALOG2 DIALOG DISCARDABLE  0, 0, 377, 240
-STYLE WS_CHILD | WS_VISIBLE
+IDD_DIALOG2 DIALOG  0, 0, 377, 240
+STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
 FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "List1",IDC_LIST1,"SysListView32",LVS_LIST | WS_BORDER | 
@@ -153,8 +153,8 @@
     RTEXT           "Window size:",IDC_STATIC,251,171,43,8
 END
 
-IDD_DIALOG3 DIALOG DISCARDABLE  0, 0, 377, 240
-STYLE WS_CHILD | WS_VISIBLE
+IDD_DIALOG3 DIALOG  0, 0, 377, 240
+STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
 FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "List1",IDC_LIST1,"SysListView32",LVS_REPORT | 
@@ -169,8 +169,8 @@
     LTEXT           "Node information",IDC_STATIC,257,7,59,8
 END
 
-IDD_DIALOG4 DIALOG DISCARDABLE  0, 0, 377, 240
-STYLE WS_CHILD | WS_VISIBLE
+IDD_DIALOG4 DIALOG  0, 0, 377, 240
+STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
 FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "List1",IDC_LIST1,"SysListView32",LVS_REPORT | WS_BORDER | 
@@ -185,7 +185,7 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO 
 BEGIN
     IDD_FRONTEND_DIALOG, DIALOG
     BEGIN
@@ -237,15 +237,17 @@
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDI_ICON1               ICON    DISCARDABLE     "res\\Frontend.ico"
+IDI_ICON1               ICON                    "res\\Frontend.ico"
+IDI_ICON3               ICON                    "res\\icon3.ico"
+IDI_ICON2               ICON                    "res\\icon2.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
-// 24
+// RT_MANIFEST
 //
 
-IDR_241                 24      DISCARDABLE     "Switch.exe.manifest"
-#endif    // English (U.S.) resources
+IDR_241                 RT_MANIFEST             "Switch.exe.manifest"
+#endif    // Englisch (USA) resources
 /////////////////////////////////////////////////////////////////////////////
 
 
Index: gui/win32/Main/FrontendDlg.cpp
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/FrontendDlg.cpp,v
retrieving revision 1.8
diff -u -r1.8 FrontendDlg.cpp
--- gui/win32/Main/FrontendDlg.cpp	21 Nov 2004 01:21:10 -0000	1.8
+++ gui/win32/Main/FrontendDlg.cpp	22 Dec 2004 19:55:11 -0000
@@ -42,6 +42,7 @@
 #include "stdafx.h"
 #include "Frontend.h"
 #include "FrontendDlg.h"
+#include "TrayIcon.h"
 
 #include "Ipc.h"
 
@@ -190,6 +191,11 @@
 		NodeList.GetNext(Pos);
 	}
 
+	if( NodeList.GetSize() == 0 )
+		TrayIcon::getInstance()->setStatus( TrayIcon::ON, "No nodes found" );
+	else
+		TrayIcon::getInstance()->setStatus( TrayIcon::CONNECTED, "Nodes available" );
+
 	m_TabCtrl.m_Dialog3.UpdateNodeInfo(NodeList);
 }
 
@@ -874,6 +880,8 @@
 
 int CFrontendDlg::StopOlsrd()
 {
+	TrayIcon::getInstance()->setStatus( TrayIcon::OFF, "Off" );
+
 	::SetEvent(Event);
 
 	::WaitForSingleObject((HANDLE)LogThread, INFINITE);
@@ -976,6 +984,8 @@
 
 void CFrontendDlg::OnExitButton()
 {
+	delete TrayIcon::getInstance();
+
 	if (StopOlsrd() < 0)
 		return;
 
Index: gui/win32/Main/FrontendDlg.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/FrontendDlg.h,v
retrieving revision 1.5
diff -u -r1.5 FrontendDlg.h
--- gui/win32/Main/FrontendDlg.h	21 Nov 2004 01:21:10 -0000	1.5
+++ gui/win32/Main/FrontendDlg.h	22 Dec 2004 19:55:11 -0000
@@ -68,13 +68,13 @@
 	unsigned int NetThreadFunc(void);
 
 	CString ConfigFile;
+protected:
 
 	//{{AFX_VIRTUAL(CFrontendDlg)
-	protected:
 	virtual void DoDataExchange(CDataExchange* pDX);
 	//}}AFX_VIRTUAL
 
-protected:
+public:
 	//{{AFX_MSG(CFrontendDlg)
 	virtual BOOL OnInitDialog();
 	afx_msg void OnOK();
@@ -84,8 +84,12 @@
 	afx_msg void OnExitButton();
 	//}}AFX_MSG
 
+protected:
 	DECLARE_MESSAGE_MAP()
 
+	int StartOlsrd(void);
+	int StopOlsrd(void);
+
 	int GetInterfaces(void);
 
 	HANDLE Event;
@@ -94,9 +98,6 @@
 
 	SOCKET SockHand;
 
-	int StartOlsrd(void);
-	int StopOlsrd(void);
-
 	int PipeMode;
 	int ExecutePipe(const char *, HANDLE *, HANDLE *, HANDLE *);
 
Index: gui/win32/Main/resource.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/gui/win32/Main/resource.h,v
retrieving revision 1.3
diff -u -r1.3 resource.h
--- gui/win32/Main/resource.h	20 Nov 2004 22:52:49 -0000	1.3
+++ gui/win32/Main/resource.h	22 Dec 2004 19:55:11 -0000
@@ -1,5 +1,5 @@
 //{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
 // Used by Frontend.rc
 //
 #define IDD_FRONTEND_DIALOG             102
@@ -11,6 +11,8 @@
 #define IDD_DIALOG4                     132
 #define IDI_ICON1                       132
 #define IDR_241                         138
+#define IDI_ICON3                       141
+#define IDI_ICON2                       142
 #define IDC_TAB1                        1000
 #define IDC_BUTTON1                     1001
 #define IDC_EDIT1                       1003
@@ -48,7 +50,7 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        140
+#define _APS_NEXT_RESOURCE_VALUE        141
 #define _APS_NEXT_COMMAND_VALUE         32771
 #define _APS_NEXT_CONTROL_VALUE         1030
 #define _APS_NEXT_SYMED_VALUE           101
