Permalink
Browse files

Merge branch 'master' of github.com:ColorCop/ColorCop

Conflicts:
	.gitignore
	ColorCop.cpp
	ColorCop.dsp
	ColorCop.mak
	ColorCopDlg.cpp
	ColorCopDlg.h
	SystemTray.cpp
	inno/colorcop.iss
	packaging/colorcop/license.txt
	packaging/colorcop/readme.txt
	packaging/license.txt
  • Loading branch information...
2 parents cb26c53 + 663b420 commit f19394450f343f835a86e6ad824961576576f362 @j4y j4y committed Aug 23, 2015
Showing with 103 additions and 153 deletions.
  1. +40 −14 .gitignore
  2. +6 −55 ColorCop.cpp
  3. +3 −3 ColorCop.dsp
  4. +2 −2 ColorCop.mak
  5. +10 −0 ColorCop.sln
  6. +14 −73 ColorCopDlg.cpp
  7. +1 −2 ColorCopDlg.h
  8. +0 −1 SystemTray.cpp
  9. +3 −3 inno/colorcop.iss
  10. +8 −0 packaging/colorcop/license.txt
  11. +12 −0 packaging/colorcop/readme.txt
  12. +4 −0 packaging/license.txt
View
@@ -1,14 +1,40 @@
-Release/*
-Debug/*
-ColorCop___Win32_Release_without_ALIGN*/
-# Visual Studio files
-[Bb]in*/
-[Dd]debug*/
-[Rr]elease*/
-*.vspscc
-*.vssscc
-*.aps
-*.ncb
-*.opt
-*.plg
-*.lib
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# non-compiles browse files (NCB) used by IntelliSense
+*.ncb
+
+# Visual Studio options file (OPT) used for breakpoints, etc
+*.opt
+
+# Visual Studio log file (PLG) used for build output
+*.plg
+
+# Visual Studio solution user options (SUO)
+*.suo
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
View
@@ -40,14 +40,11 @@ END_MESSAGE_MAP()
CColorCopApp::CColorCopApp()
{
-/// //ATLTRACE2(atlTraceGeneral, 0, "*** Color Cop Constructor\n");
-
m_hMutex=NULL;
}
CColorCopApp::~CColorCopApp()
{
- //ATLTRACE2(atlTraceGeneral, 0, "*** Color Cop Destructor\n");
}
/////////////////////////////////////////////////////////////////////////////
@@ -79,12 +76,6 @@ BOOL CColorCopApp::InitInstance()
// see srand
srand( (unsigned)time(NULL) );
- //ATLTRACE2(atlTraceGeneral, 0, "Color Cop CreateMutex\n");
-
- //CreateMutex(NULL,TRUE,_T("ColorCopMutex-Jay-Prall")); // mutex will be automatically deleted when process ends.
-
-// BOOL bAlreadyRunning = (GetLastError() == ERROR_ALREADY_EXISTS);
-
// multiple instances are not allowed?
if (!(dlg.m_Appflags & MultipleInstances))
@@ -95,45 +86,27 @@ BOOL CColorCopApp::InitInstance()
// release the obj that we tried to create
ReleaseMutex(m_hMutex);
- // TODO: focus on the current instance
+ // TODO: find the current instance and bring forward instead of a msg. fixes issue #4
+
AfxMessageBox(IDS_APP_RUNNING);
// error instead
return false;
}
- // lets attempt to get the current instance of color cop and use that.
-
}
-
-
-
-
- // if already running and only one instance allowed, error
-
-// if ((bAlreadyRunning) && (!(dlg.m_Appflags & MultipleInstances))) {
-
-// //ATLTRACE2(atlTraceGeneral, 0, "Color Cop Already Running\n");
-// return FALSE; // abandon ship
-
-// } else {
-
- //ATLTRACE2(atlTraceGeneral, 0, "Color Cop Starting\n");
- m_pMainWnd = &dlg; // set the main window
+ // set the main window
+ m_pMainWnd = &dlg;
int nResponse = dlg.DoModal(); // Launch the color cop dialog
if ((nResponse == IDOK)||(nResponse == IDCANCEL)) {
- //ATLTRACE2(atlTraceGeneral, 0, "Color Cop Closing\n");
CloseApplication(); // write the data to a file
}
-// }
- //ATLTRACE2(atlTraceGeneral, 0, "End InitInstance\n");
-
return FALSE;
}
@@ -235,7 +208,6 @@ void CColorCopApp::ClipOrCenterWindowToMonitor(HWND hwnd, UINT flags)
{
RECT rc;
GetWindowRect(hwnd, &rc);
- //ClipOrCenterRectToMonitor(&rc, flags);
SetWindowPos(hwnd, NULL, rc.left, rc.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
dlg.WinLocX= rc.left;
dlg.WinLocY= rc.top;
@@ -244,11 +216,6 @@ void CColorCopApp::ClipOrCenterWindowToMonitor(HWND hwnd, UINT flags)
BOOL CColorCopApp::InitApplication()
{
- ////////////////////////////////////////////////////////////
- // This function reads the settings from a file. It should
- // do this every time no matter what.
- //
- //ATLTRACE2(atlTraceGeneral, 0, "Begin InitApplication\n");
CString strInitFile = GetTempFolder();
@@ -278,8 +245,6 @@ BOOL CColorCopApp::InitApplication()
// set the window to be in the middle
}
- //ATLTRACE2(atlTraceGeneral, 0, "End InitApplication\n");
-
return CWinApp::InitApplication();
}
@@ -360,9 +325,6 @@ void CColorCopApp::LoadDefaultSettings() {
dlg.m_Bluedec = 188;
dlg.m_Appflags = 0; // reset
dlg.m_Appflags |= AlwaysOnTop;
-
- // uppercase hex is now not a default options
- //dlg.m_Appflags |= UpperCaseHex;
dlg.m_Appflags |= AutoCopytoClip;
dlg.m_Appflags |= ModeHTML;
dlg.m_Appflags |= EasyMove;
@@ -402,9 +364,7 @@ void CColorCopApp::CloseApplication() {
// This function writes the settings to a file. It is the
// last thing the application will do. It will only write to
// a file when the dialog has been closed IDOK or IDCANCEL
-
- //ATLTRACE2(atlTraceGeneral, 0, "Begin CloseApplication\n");
-
+
CString strInitFile = GetTempFolder();
@@ -419,23 +379,14 @@ void CColorCopApp::CloseApplication() {
Serialize(ar);
}
- // might as well release this now
- //ATLTRACE2(atlTraceGeneral, 0, "- Release Mutex\n");
+ // release mutex. what if this fails
ReleaseMutex(m_hMutex);
-
- //ATLTRACE2(atlTraceGeneral, 0, "End CloseApplication\n");
-
-
return;
}
void CColorCopApp::Serialize(CArchive& ar)
{
- //ATLTRACE2(atlTraceGeneral, 0, "Serialize\n");
-
- // anything that is serialized here should also
-
if (ar.IsStoring()) {
// storing code
View
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
-# ADD LINK32 MSVCRT.LIB kernel32.lib user32.lib LIBCTINY.LIB /nologo /subsystem:windows /machine:I386 /OPT:REF /ALIGN:4096
+# ADD LINK32 MSVCRT.LIB kernel32.lib user32.lib /nologo /subsystem:windows /machine:I386 /OPT:REF /ALIGN:4096
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ColorCop - Win32 Debug"
@@ -107,9 +107,9 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo /o"Release/ColorCop.bsc"
# ADD BSC32 /nologo /o"Release/ColorCop.bsc"
LINK32=link.exe
-# ADD BASE LINK32 MSVCRT.LIB kernel32.lib user32.lib LIBCTINY.LIB /nologo /subsystem:windows /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
+# ADD BASE LINK32 MSVCRT.LIB kernel32.lib user32.lib /nologo /subsystem:windows /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 MSVCRT.LIB kernel32.lib user32.lib LIBCTINY.LIB /nologo /subsystem:windows /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
+# ADD LINK32 MSVCRT.LIB kernel32.lib user32.lib /nologo /subsystem:windows /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
# SUBTRACT LINK32 /pdb:none
!ENDIF
View
@@ -112,7 +112,7 @@ BSC32_SBRS= \
<<
LINK32=link.exe
-LINK32_FLAGS=MSVCRT.LIB kernel32.lib user32.lib LIBCTINY.LIB /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ColorCop.pdb" /machine:I386 /out:"$(OUTDIR)\ColorCop.exe" /OPT:REF /ALIGN:4096
+LINK32_FLAGS=MSVCRT.LIB kernel32.lib user32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ColorCop.pdb" /machine:I386 /out:"$(OUTDIR)\ColorCop.exe" /OPT:REF /ALIGN:4096
LINK32_OBJS= \
"$(INTDIR)\ColorCop.obj" \
"$(INTDIR)\ColorCopDlg.obj" \
@@ -280,7 +280,7 @@ BSC32_FLAGS=/nologo /o"Release/ColorCop.bsc"
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=MSVCRT.LIB kernel32.lib user32.lib LIBCTINY.LIB /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ColorCop.pdb" /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
+LINK32_FLAGS=MSVCRT.LIB kernel32.lib user32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ColorCop.pdb" /machine:I386 /out:"Release/ColorCop.exe" /OPT:REF
LINK32_OBJS= \
"$(INTDIR)\ColorCop.obj" \
"$(INTDIR)\ColorCopDlg.obj" \
View
@@ -0,0 +1,10 @@
+Microsoft Visual Studio Solution File, Format Version 1.00
+Global
+ GlobalSection(LocalDeployment) = postSolution
+ StartupProject = {00000000-0000-0000-0000-000000000000}
+ EndGlobalSection
+ GlobalSection(BuildOrder) = postSolution
+ EndGlobalSection
+ GlobalSection(DeploymentRoot) = postSolution
+ EndGlobalSection
+EndGlobal
Oops, something went wrong.

0 comments on commit f193944

Please sign in to comment.