[xiph-cvs] cvs commit: icecast/win32 Icecast2win.clw Icecast2winDlg.cpp StatsTab.cpp

Ed oddsock at xiph.org
Tue Dec 30 11:39:12 PST 2003



oddsock     03/12/30 14:39:12

  Modified:    win32    Icecast2win.clw Icecast2winDlg.cpp StatsTab.cpp
  Log:
  Fixed some peculiarities when shutting down server...

Revision  Changes    Path
1.6       +9 -9      icecast/win32/Icecast2win.clw

Index: Icecast2win.clw
===================================================================
RCS file: /usr/local/cvsroot/icecast/win32/Icecast2win.clw,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Icecast2win.clw	25 Nov 2003 03:04:40 -0000	1.5
+++ Icecast2win.clw	30 Dec 2003 19:39:11 -0000	1.6
@@ -2,7 +2,7 @@
 
 [General Info]
 Version=1
-LastClass=CIcecast2winDlg
+LastClass=CStatus
 LastTemplate=CDialog
 NewFileInclude1=#include "stdafx.h"
 NewFileInclude2=#include "Icecast2win.h"
@@ -13,18 +13,18 @@
 Class3=CAboutDlg
 
 ResourceCount=10
-Resource1=IDD_SSTATUS
+Resource1=IDD_ABOUTBOX
 Resource2=IDR_MAINFRAME
-Resource3=IDD_ABOUTBOX
-Resource4=IDD_ICECAST2WIN_DIALOG
+Resource3=IDD_SSTATUS
+Resource4=IDR_TRAY
 Class4=CStatus
-Resource5=IDR_TRAY
+Resource5=IDR_MENU2
 Class5=CConfigTab
 Class6=CStatsTab
-Resource6=IDD_STATSDIALOG
-Resource7=IDR_MENU2
-Resource8=IDD_CONFIGDIALOG
-Resource9=IDR_MENU3
+Resource6=IDR_MENU3
+Resource7=IDD_CONFIGDIALOG
+Resource8=IDD_ICECAST2WIN_DIALOG
+Resource9=IDD_STATSDIALOG
 Resource10=IDR_MENU4
 
 [CLS:CIcecast2winApp]

<p><p>1.10      +4 -0      icecast/win32/Icecast2winDlg.cpp

Index: Icecast2winDlg.cpp
===================================================================
RCS file: /usr/local/cvsroot/icecast/win32/Icecast2winDlg.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Icecast2winDlg.cpp	4 Dec 2003 16:29:27 -0000	1.9
+++ Icecast2winDlg.cpp	30 Dec 2003 19:39:11 -0000	1.10
@@ -574,6 +574,10 @@
                         Sleep(5000);
                 }
                 if (global.running != ICE_RUNNING) {
+			numMainStats = 0;
+			g_mainDialog->statusTab.m_GlobalStatList.DeleteAllItems();
+			g_mainDialog->statsTab.m_SourceListCtrl.DeleteAllItems();
+			g_mainDialog->statsTab.m_StatsListCtrl.DeleteAllItems();
                         _endthread();
                 }
         }

<p><p>1.2       +149 -148  icecast/win32/StatsTab.cpp

Index: StatsTab.cpp
===================================================================
RCS file: /usr/local/cvsroot/icecast/win32/StatsTab.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatsTab.cpp	9 Aug 2002 15:55:01 -0000	1.1
+++ StatsTab.cpp	30 Dec 2003 19:39:11 -0000	1.2
@@ -1,148 +1,149 @@
-// StatsTab.cpp : implementation file
-//
-
-#include "stdafx.h"
-#include "Icecast2win.h"
-#include "StatsTab.h"
-
-#include "Icecast2winDlg.h"
-
-extern CIcecast2winDlg	*g_mainDialog;
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-extern void AddToAdditionalGlobalStats(CString source, CString name);
-
-/////////////////////////////////////////////////////////////////////////////
-// CStatsTab dialog
-
-
-CStatsTab::CStatsTab(CWnd* pParent /*=NULL*/)
-	: CTabPageSSL(CStatsTab::IDD, pParent)
-{
-	//{{AFX_DATA_INIT(CStatsTab)
-		// NOTE: the ClassWizard will add member initialization here
-	//}}AFX_DATA_INIT
-}
-
-
-void CStatsTab::DoDataExchange(CDataExchange* pDX)
-{
-	CTabPageSSL::DoDataExchange(pDX);
-	//{{AFX_DATA_MAP(CStatsTab)
-	DDX_Control(pDX, IDC_STATIC_SLS, m_SLS);
-	DDX_Control(pDX, IDC_STATSLIST, m_StatsListCtrl);
-	DDX_Control(pDX, IDC_SOURCELIST, m_SourceListCtrl);
-	//}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(CStatsTab, CTabPageSSL)
-	//{{AFX_MSG_MAP(CStatsTab)
-	ON_NOTIFY(NM_DBLCLK, IDC_SOURCELIST, OnDblclkSourcelist)
-	ON_NOTIFY(NM_RCLICK, IDC_STATSLIST, OnRclickStatslist)
-	ON_NOTIFY(NM_CLICK, IDC_SOURCELIST, OnClickSourcelist)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// CStatsTab message handlers
-
-BOOL CStatsTab::OnInitDialog() 
-{
-	CTabPageSSL::OnInitDialog();
-	
-	// TODO: Add extra initialization here
-	m_SourceListCtrl.InsertColumn(0, _T("Source"), LVCFMT_LEFT, m_colSource0Width);
-	m_StatsListCtrl.InsertColumn(0, _T("Statistic"), LVCFMT_LEFT, m_colStats0Width);
-	m_StatsListCtrl.InsertColumn(1, _T("Value"), LVCFMT_LEFT, m_colStats1Width);
-
-	AddAnchor(IDC_STATSLIST, TOP_LEFT, BOTTOM_RIGHT);
-	AddAnchor(IDC_SOURCELIST, TOP_LEFT, BOTTOM_LEFT);
-	AddAnchor(IDC_FILLER1, BOTTOM_LEFT, BOTTOM_RIGHT);
-	
-	m_SourceListCtrl.SetSelectionMark(0);
-	m_SLS.SetFont(&(g_mainDialog->labelFont), TRUE);
-
-	return TRUE;  // return TRUE unless you set the focus to a control
-	              // EXCEPTION: OCX Property Pages should return FALSE
-}
-
-void CStatsTab::OnDblclkSourcelist(NMHDR* pNMHDR, LRESULT* pResult) 
-{
-	// TODO: Add your control notification handler code here
-	g_mainDialog->UpdateStatsLists();
-	*pResult = 0;
-}
-
-void CStatsTab::OnRclickStatslist(NMHDR* pNMHDR, LRESULT* pResult) 
-{
-	// TODO: Add your control notification handler code here
-	CMenu	menu;
-
-	
-    CPoint point;                                            
-    ::GetCursorPos(&point); //where is the mouse?
-
-    DWORD dwSelectionMade;                                       
-    menu.LoadMenu(IDR_MENU2);  
-    CMenu *pmenuPopup = menu.GetSubMenu(0);
-    dwSelectionMade = pmenuPopup->TrackPopupMenu( (TPM_LEFTALIGN|TPM_LEFTBUTTON|
-                                                       TPM_NONOTIFY|TPM_RETURNCMD),
-                                                       point.x, point.y, this);                                
-  
-    pmenuPopup->DestroyMenu();
-	char	msg[255] ="";
-	char	buffer[1024] = "";
-	char	buffer2[1024] = "";
-
-	CString name;
-	CString source;
-	POSITION pos;
-	switch (dwSelectionMade) {
-	case ID_POPUP_ADDTOGLOBALSTATLIST :
-		pos = m_StatsListCtrl.GetFirstSelectedItemPosition();
-		if (pos != NULL) {
-			int nItem = m_StatsListCtrl.GetNextSelectedItem(pos);
-			LVITEM	lvi;
-
-			lvi.mask =  LVIF_TEXT;
-			lvi.iItem = nItem;
-			lvi.iSubItem = 0;
-			lvi.pszText = buffer;
-			lvi.cchTextMax = sizeof(buffer);
-			m_StatsListCtrl.GetItem(&lvi);
-			name = buffer;
-	   }
-		pos = m_SourceListCtrl.GetFirstSelectedItemPosition();
-		if (pos != NULL) {
-			int nItem = m_SourceListCtrl.GetNextSelectedItem(pos);
-			LVITEM	lvi;
-
-			lvi.mask =  LVIF_TEXT;
-			lvi.iItem = nItem;
-			lvi.iSubItem = 0;
-			lvi.pszText = buffer2;
-			lvi.cchTextMax = sizeof(buffer2);
-			m_SourceListCtrl.GetItem(&lvi);
-			source = buffer2;
-	   }
-		AddToAdditionalGlobalStats(source, name);
-		break;
-	default :
-		break;
-	}
-
-	*pResult = 0;
-}
-
-void CStatsTab::OnClickSourcelist(NMHDR* pNMHDR, LRESULT* pResult) 
-{
-	// TODO: Add your control notification handler code here
-	OnDblclkSourcelist(pNMHDR, pResult);
-	*pResult = 0;
-}
+// StatsTab.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "Icecast2win.h"
+#include "StatsTab.h"
+
+#include "Icecast2winDlg.h"
+
+extern CIcecast2winDlg	*g_mainDialog;
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+extern void AddToAdditionalGlobalStats(CString source, CString name);
+
+/////////////////////////////////////////////////////////////////////////////
+// CStatsTab dialog
+
+
+CStatsTab::CStatsTab(CWnd* pParent /*=NULL*/)
+	: CTabPageSSL(CStatsTab::IDD, pParent)
+{
+	//{{AFX_DATA_INIT(CStatsTab)
+		// NOTE: the ClassWizard will add member initialization here
+	//}}AFX_DATA_INIT
+}
+
+
+void CStatsTab::DoDataExchange(CDataExchange* pDX)
+{
+	CTabPageSSL::DoDataExchange(pDX);
+	//{{AFX_DATA_MAP(CStatsTab)
+	DDX_Control(pDX, IDC_STATIC_SLS, m_SLS);
+	DDX_Control(pDX, IDC_STATSLIST, m_StatsListCtrl);
+	DDX_Control(pDX, IDC_SOURCELIST, m_SourceListCtrl);
+	//}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CStatsTab, CTabPageSSL)
+	//{{AFX_MSG_MAP(CStatsTab)
+	ON_NOTIFY(NM_DBLCLK, IDC_SOURCELIST, OnDblclkSourcelist)
+	ON_NOTIFY(NM_RCLICK, IDC_STATSLIST, OnRclickStatslist)
+	ON_NOTIFY(NM_CLICK, IDC_SOURCELIST, OnClickSourcelist)
+	//}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CStatsTab message handlers
+
+BOOL CStatsTab::OnInitDialog() 
+{
+	CTabPageSSL::OnInitDialog();
+	
+	// TODO: Add extra initialization here
+	m_SourceListCtrl.InsertColumn(0, _T("Source"), LVCFMT_LEFT, m_colSource0Width);
+	m_StatsListCtrl.InsertColumn(0, _T("Statistic"), LVCFMT_LEFT, m_colStats0Width);
+	m_StatsListCtrl.InsertColumn(1, _T("Value"), LVCFMT_LEFT, m_colStats1Width);
+
+	AddAnchor(IDC_STATSLIST, TOP_LEFT, BOTTOM_RIGHT);
+	AddAnchor(IDC_SOURCELIST, TOP_LEFT, BOTTOM_LEFT);
+	AddAnchor(IDC_FILLER1, BOTTOM_LEFT, BOTTOM_RIGHT);
+	
+	m_SourceListCtrl.SetSelectionMark(0);
+	m_SLS.SetFont(&(g_mainDialog->labelFont), TRUE);
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+	              // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CStatsTab::OnDblclkSourcelist(NMHDR* pNMHDR, LRESULT* pResult) 
+{
+	// TODO: Add your control notification handler code here
+	g_mainDialog->statsTab.m_StatsListCtrl.DeleteAllItems();
+	g_mainDialog->UpdateStatsLists();
+	*pResult = 0;
+}
+
+void CStatsTab::OnRclickStatslist(NMHDR* pNMHDR, LRESULT* pResult) 
+{
+	// TODO: Add your control notification handler code here
+	CMenu	menu;
+
+	
+    CPoint point;                                            
+    ::GetCursorPos(&point); //where is the mouse?
+
+    DWORD dwSelectionMade;                                       
+    menu.LoadMenu(IDR_MENU2);  
+    CMenu *pmenuPopup = menu.GetSubMenu(0);
+    dwSelectionMade = pmenuPopup->TrackPopupMenu( (TPM_LEFTALIGN|TPM_LEFTBUTTON|
+                                                       TPM_NONOTIFY|TPM_RETURNCMD),
+                                                       point.x, point.y, this);                                
+  
+    pmenuPopup->DestroyMenu();
+	char	msg[255] ="";
+	char	buffer[1024] = "";
+	char	buffer2[1024] = "";
+
+	CString name;
+	CString source;
+	POSITION pos;
+	switch (dwSelectionMade) {
+	case ID_POPUP_ADDTOGLOBALSTATLIST :
+		pos = m_StatsListCtrl.GetFirstSelectedItemPosition();
+		if (pos != NULL) {
+			int nItem = m_StatsListCtrl.GetNextSelectedItem(pos);
+			LVITEM	lvi;
+
+			lvi.mask =  LVIF_TEXT;
+			lvi.iItem = nItem;
+			lvi.iSubItem = 0;
+			lvi.pszText = buffer;
+			lvi.cchTextMax = sizeof(buffer);
+			m_StatsListCtrl.GetItem(&lvi);
+			name = buffer;
+	   }
+		pos = m_SourceListCtrl.GetFirstSelectedItemPosition();
+		if (pos != NULL) {
+			int nItem = m_SourceListCtrl.GetNextSelectedItem(pos);
+			LVITEM	lvi;
+
+			lvi.mask =  LVIF_TEXT;
+			lvi.iItem = nItem;
+			lvi.iSubItem = 0;
+			lvi.pszText = buffer2;
+			lvi.cchTextMax = sizeof(buffer2);
+			m_SourceListCtrl.GetItem(&lvi);
+			source = buffer2;
+	   }
+		AddToAdditionalGlobalStats(source, name);
+		break;
+	default :
+		break;
+	}
+
+	*pResult = 0;
+}
+
+void CStatsTab::OnClickSourcelist(NMHDR* pNMHDR, LRESULT* pResult) 
+{
+	// TODO: Add your control notification handler code here
+	OnDblclkSourcelist(pNMHDR, pResult);
+	*pResult = 0;
+}

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list