Commit e38af3f1 authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski

removed tab for editing configuration file, opted for a much simpler approach...

removed tab for editing configuration file, opted for a much simpler approach (spwan a notepad session)
fixed the "Make this stat the window title" logic
Added menu to the dialog

svn path=/trunk/icecast/; revision=3884
parent 08061569
; CLW file contains information for the MFC ClassWizard
[General Info]
Version=1
LastClass=CIcecast2winDlg
LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "Icecast2win.h"
ClassCount=6
Class1=CIcecast2winApp
Class2=CIcecast2winDlg
Class3=CAboutDlg
ResourceCount=9
Resource1=IDR_MENU3
Resource2=IDR_MAINFRAME
Resource3=IDD_ABOUTBOX
Resource4=IDD_STATSDIALOG
Class4=CStatus
Resource5=IDR_MENU2
Class5=CConfigTab
Class6=CStatsTab
Resource6=IDD_SSTATUS
Resource7=IDD_CONFIGDIALOG
Resource8=IDD_ICECAST2WIN_DIALOG
Resource9=IDR_TRAY
[CLS:CIcecast2winApp]
Type=0
HeaderFile=Icecast2win.h
ImplementationFile=Icecast2win.cpp
Filter=N
[CLS:CIcecast2winDlg]
Type=0
HeaderFile=Icecast2winDlg.h
ImplementationFile=Icecast2winDlg.cpp
Filter=C
LastObject=IDC_HIDESYSTRAY
BaseClass=CResizableDialog
VirtualFilter=dWC
[CLS:CAboutDlg]
Type=0
HeaderFile=Icecast2winDlg.h
ImplementationFile=Icecast2winDlg.cpp
Filter=D
[DLG:IDD_ABOUTBOX]
Type=1
Class=CAboutDlg
ControlCount=3
Control1=IDC_STATIC,static,1342177283
Control2=IDC_STATIC,static,1342308480
Control3=IDOK,button,1342373889
[DLG:IDD_ICECAST2WIN_DIALOG]
Type=1
Class=CIcecast2winDlg
ControlCount=8
Control1=IDC_MAINTAB,SysTabControl32,1342177280
Control2=IDC_START,button,1342242816
Control3=IDC_AUTOSTART,button,1342251011
Control4=IDC_STATIC,static,1342177294
Control5=IDC_SERVERSTATUS,static,1342177294
Control6=IDC_STATIC_SS,static,1342308865
Control7=IDC_STATICBLACK,static,1342177294
Control8=IDC_HIDESYSTRAY,button,1342242816
[DLG:IDD_SSTATUS]
Type=1
Class=CStatus
ControlCount=5
Control1=IDC_FILLER2,static,1342308352
Control2=IDC_GLOBALSTAT_LIST,SysListView32,1350631425
Control3=IDC_STATIC_GS,static,1342308353
Control4=IDC_STATIC_RUN,static,1342308352
Control5=IDC_RUNNINGFOR,static,1342308352
[CLS:CStatus]
Type=0
HeaderFile=Status.h
ImplementationFile=Status.cpp
BaseClass=CTabPageSSL
Filter=D
LastObject=ID_POPUP_ADDTOGLOBALSTATLIST
VirtualFilter=dWC
[DLG:IDD_CONFIGDIALOG]
Type=1
Class=CConfigTab
ControlCount=1
Control1=IDC_CONFIG,edit,1352732868
[CLS:CConfigTab]
Type=0
HeaderFile=ConfigTab.h
ImplementationFile=ConfigTab.cpp
BaseClass=CTabPageSSL
Filter=D
VirtualFilter=dWC
LastObject=IDC_CONFIG
[DLG:IDD_STATSDIALOG]
Type=1
Class=CStatsTab
ControlCount=5
Control1=IDC_STATSLIST,SysListView32,1350631425
Control2=IDC_SOURCELIST,SysListView32,1350631425
Control3=IDC_FILLER1,static,1342308352
Control4=IDC_STATIC_SLS,static,1342308353
Control5=IDC_STATIC,static,1342308352
[CLS:CStatsTab]
Type=0
HeaderFile=StatsTab.h
ImplementationFile=StatsTab.cpp
BaseClass=CTabPageSSL
Filter=D
VirtualFilter=dWC
LastObject=IDC_SOURCELIST
[MNU:IDR_MENU2]
Type=1
Class=?
Command1=ID_POPUP_ADDTOGLOBALSTATLIST
CommandCount=1
[MNU:IDR_MENU3]
Type=1
Class=?
Command1=ID__DELETEFROMGLOBALSTATS
Command2=ID__MAKETHISSTATTHEWINDOWTITLE
CommandCount=2
[MNU:IDR_TRAY]
Type=1
Class=CIcecast2winDlg
Command1=ID_BLANK_RESTORE
CommandCount=1
; CLW file contains information for the MFC ClassWizard
[General Info]
Version=1
LastClass=CIcecast2winDlg
LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "Icecast2win.h"
ClassCount=6
Class1=CIcecast2winApp
Class2=CIcecast2winDlg
Class3=CAboutDlg
ResourceCount=10
Resource1=IDD_ABOUTBOX
Resource2=IDR_MAINFRAME
Resource3=IDR_MENU3
Resource4=IDR_TRAY
Class4=CStatus
Resource5=IDR_MENU2
Class5=CConfigTab
Class6=CStatsTab
Resource6=IDD_SSTATUS
Resource7=IDD_CONFIGDIALOG
Resource8=IDD_ICECAST2WIN_DIALOG
Resource9=IDD_STATSDIALOG
Resource10=IDR_MENU4
[CLS:CIcecast2winApp]
Type=0
HeaderFile=Icecast2win.h
ImplementationFile=Icecast2win.cpp
Filter=N
[CLS:CIcecast2winDlg]
Type=0
HeaderFile=Icecast2winDlg.h
ImplementationFile=Icecast2winDlg.cpp
Filter=C
LastObject=ID_ABOUT_HELP
BaseClass=CResizableDialog
VirtualFilter=dWC
[CLS:CAboutDlg]
Type=0
HeaderFile=Icecast2winDlg.h
ImplementationFile=Icecast2winDlg.cpp
Filter=D
[DLG:IDD_ABOUTBOX]
Type=1
Class=CAboutDlg
ControlCount=3
Control1=IDC_STATIC,static,1342177283
Control2=IDC_STATIC,static,1342308480
Control3=IDOK,button,1342373889
[DLG:IDD_ICECAST2WIN_DIALOG]
Type=1
Class=CIcecast2winDlg
ControlCount=8
Control1=IDC_MAINTAB,SysTabControl32,1342177280
Control2=IDC_START,button,1342242816
Control3=IDC_AUTOSTART,button,1342251011
Control4=IDC_STATIC,static,1342177294
Control5=IDC_SERVERSTATUS,static,1342177294
Control6=IDC_STATIC_SS,static,1342308865
Control7=IDC_STATICBLACK,static,1342177294
Control8=IDC_HIDESYSTRAY,button,1342242816
[DLG:IDD_SSTATUS]
Type=1
Class=CStatus
ControlCount=5
Control1=IDC_FILLER2,static,1342308352
Control2=IDC_GLOBALSTAT_LIST,SysListView32,1350631425
Control3=IDC_STATIC_GS,static,1342308353
Control4=IDC_STATIC_RUN,static,1342308352
Control5=IDC_RUNNINGFOR,static,1342308352
[CLS:CStatus]
Type=0
HeaderFile=Status.h
ImplementationFile=Status.cpp
BaseClass=CTabPageSSL
Filter=D
LastObject=ID_POPUP_ADDTOGLOBALSTATLIST
VirtualFilter=dWC
[DLG:IDD_CONFIGDIALOG]
Type=1
Class=CConfigTab
ControlCount=1
Control1=IDC_CONFIG,edit,1352732868
[CLS:CConfigTab]
Type=0
HeaderFile=ConfigTab.h
ImplementationFile=ConfigTab.cpp
BaseClass=CTabPageSSL
Filter=D
VirtualFilter=dWC
LastObject=IDC_CONFIG
[DLG:IDD_STATSDIALOG]
Type=1
Class=CStatsTab
ControlCount=5
Control1=IDC_STATSLIST,SysListView32,1350631425
Control2=IDC_SOURCELIST,SysListView32,1350631425
Control3=IDC_FILLER1,static,1342308352
Control4=IDC_STATIC_SLS,static,1342308353
Control5=IDC_STATIC,static,1342308352
[CLS:CStatsTab]
Type=0
HeaderFile=StatsTab.h
ImplementationFile=StatsTab.cpp
BaseClass=CTabPageSSL
Filter=D
VirtualFilter=dWC
LastObject=IDC_SOURCELIST
[MNU:IDR_MENU2]
Type=1
Class=?
Command1=ID_POPUP_ADDTOGLOBALSTATLIST
CommandCount=1
[MNU:IDR_MENU3]
Type=1
Class=?
Command1=ID__DELETEFROMGLOBALSTATS
Command2=ID__MAKETHISSTATTHEWINDOWTITLE
CommandCount=2
[MNU:IDR_TRAY]
Type=1
Class=CIcecast2winDlg
Command1=ID_BLANK_RESTORE
CommandCount=1
[MNU:IDR_MENU4]
Type=1
Class=CIcecast2winDlg
Command1=ID_FILE_EXIT
Command2=ID_FILE_EDITCONFIGURATION
Command3=ID_ABOUT_HELP
Command4=ID_ABOUT_CREDITS
CommandCount=4
// Icecast2win.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "Icecast2winDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp
BEGIN_MESSAGE_MAP(CIcecast2winApp, CWinApp)
//{{AFX_MSG_MAP(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
#include "colors.h"
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp construction
CIcecast2winApp::CIcecast2winApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CIcecast2winApp object
CIcecast2winApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp initialization
BOOL CIcecast2winApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
if (strlen(m_lpCmdLine) > 0) {
strcpy(m_configFile, m_lpCmdLine);
}
else {
strcpy(m_configFile, ".\\icecast.xml");
}
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CIcecast2winDlg dlg;
m_pMainWnd = &dlg;
// SetDialogBkColor(BGCOLOR,TEXTCOLOR);
m_pIconList[0] = LoadIcon (MAKEINTRESOURCE(IDR_MAINFRAME));
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
// Icecast2win.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "Icecast2winDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp
BEGIN_MESSAGE_MAP(CIcecast2winApp, CWinApp)
//{{AFX_MSG_MAP(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
#include "colors.h"
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp construction
CIcecast2winApp::CIcecast2winApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CIcecast2winApp object
CIcecast2winApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp initialization
BOOL CIcecast2winApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
if (strlen(m_lpCmdLine) > 0) {
strcpy(m_configFile, m_lpCmdLine);
}
else {
strcpy(m_configFile, ".\\icecast.xml");
}
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CIcecast2winDlg dlg;
m_pMainWnd = &dlg;
// SetDialogBkColor(BGCOLOR,TEXTCOLOR);
m_pIconList[0] = LoadIcon (MAKEINTRESOURCE(IDR_MAINFRAME));
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
This diff is collapsed.
// Icecast2win.h : main header file for the ICECAST2WIN application
//
#if !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
#define AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp:
// See Icecast2win.cpp for the implementation of this class
//
class CIcecast2winApp : public CWinApp
{
public:
char m_configFile[1024];
CIcecast2winApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIcecast2winApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
// Icecast2win.h : main header file for the ICECAST2WIN application
//
#if !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
#define AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp:
// See Icecast2win.cpp for the implementation of this class
//
class CIcecast2winApp : public CWinApp
{
public:
char m_configFile[1024];
HICON m_pIconList[2];
CIcecast2winApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIcecast2winApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
extern CIcecast2winApp theApp;
#endif // !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
This diff is collapsed.
This diff is collapsed.
// Icecast2winDlg.h : header file
//
#if !defined(AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_)
#define AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_
#include "ResizableDialog.h"
#include "TabCtrlSSL.h"
#include "TabPageSSL.h"
#include "ConfigTab.h"
#include "StatsTab.h"
#include "Status.h"
#include "TrayNot.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winDlg dialog
class CIcecast2winDlg : public CResizableDialog
{
// Construction
public:
time_t serverStart;
void config_read();
void config_write();
void UpdateStatsLists();
CConfigTab configTab;
CStatsTab statsTab;
CStatus statusTab;
int m_colSource0Width;
int m_colStats0Width;
int m_colStats1Width;
int m_colGStats0Width;
int m_colGStats1Width;
int m_colGStats2Width;
CFont labelFont;
CBitmap runningBitmap;
CBitmap stoppedBitmap;
CTrayNot* m_pTray;
BOOL m_bHidden;
int m_iconSwap;
void StopServer();
bool m_isRunning;
void DisableControl(UINT control);
void EnableControl(UINT control);
void getTag(char *pbuf, char *ptag, char *dest);
CString m_ErrorLog;
CString m_AccessLog;
void ParseConfig();
void LoadConfig();
CIcecast2winDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CIcecast2winDlg)
enum { IDD = IDD_ICECAST2WIN_DIALOG };
CStatic m_SS;
CStatic m_ServerStatusBitmap;
CStatic m_iceLogo;
CButton m_StartButton;
CEdit m_StatsEditCtrl;
CEdit m_ConfigEditCtrl;
CEdit m_ErrorEditCtrl;
CEdit m_AccessEditCtrl;
CTabCtrlSSL m_MainTab;
CString m_AccessEdit;
CString m_ErrorEdit;
CString m_ConfigEdit;
CString m_ServerStatus;
CString m_SourcesConnected;
CString m_NumClients;
FILE *filep_accesslog;
FILE *filep_errorlog;
CString m_StatsEdit;
BOOL m_Autostart;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIcecast2winDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CIcecast2winDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSelchangeMaintab(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnFileExit();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnFileStartserver();
afx_msg void OnFileStopserver();
afx_msg void OnStart();
afx_msg void OnClose();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnHidesystray();
afx_msg void OnHide();
afx_msg void OnBlankRestore();
afx_msg LONG OnTrayNotify ( WPARAM wParam, LPARAM lParam );
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_)
// Icecast2winDlg.h : header file
//
#if !defined(AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_)
#define AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_
#include "ResizableDialog.h"
#include "TabCtrlSSL.h"
#include "TabPageSSL.h"
#include "ConfigTab.h"
#include "StatsTab.h"
#include "Status.h"
#include "TrayNot.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winDlg dialog
class CIcecast2winDlg : public CResizableDialog
{
// Construction
public:
time_t serverStart;
void config_read();
void config_write();
void UpdateStatsLists();
CConfigTab configTab;
CStatsTab statsTab;
CStatus statusTab;
int m_colSource0Width;
int m_colStats0Width;
int m_colStats1Width;
int m_colGStats0Width;
int m_colGStats1Width;
int m_colGStats2Width;
CFont labelFont;
CBitmap runningBitmap;
CBitmap stoppedBitmap;
CTrayNot* m_pTray;
BOOL m_bHidden;
int m_iconSwap;
void StopServer();
bool m_isRunning;
void DisableControl(UINT control);
void EnableControl(UINT control);
void getTag(char *pbuf, char *ptag, char *dest);
CString m_ErrorLog;
CString m_AccessLog;
void ParseConfig();
void LoadConfig();
CIcecast2winDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CIcecast2winDlg)
enum { IDD = IDD_ICECAST2WIN_DIALOG };
CStatic m_SS;
CStatic m_ServerStatusBitmap;
CStatic m_iceLogo;
CButton m_StartButton;
CEdit m_StatsEditCtrl;
CEdit m_ConfigEditCtrl;