From: Pablo d'A. <da...@us...> - 2006-07-23 11:16:11
|
Update of /cvsroot/hugin/hugin/src/hugin In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv10371/src/hugin Modified Files: CPImageCtrl.cpp hugin.vcproj huginApp.cpp Log Message: use custom cursor (back, with white border) for control point picker under windows. Default cursor was black, cursor was invisible in dark image regions. update build system Index: hugin.vcproj =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/hugin.vcproj,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- hugin.vcproj 22 Jul 2006 13:28:18 -0000 1.24 +++ hugin.vcproj 23 Jul 2006 11:16:08 -0000 1.25 @@ -61,7 +61,7 @@ Name="VCPostBuildEventTool" CommandLine="xcopy xrc Debug\xrc /I /Y xcopy xrc\data Debug\xrc\data /I /Y -xcopy "..\..\..\libs\libpano\pano12\DLL Debug\pano12d.dll" Debug\ /I /Y +xcopy "..\..\..\libs\libpano\pano12\Debug\pano12d.dll" Debug\ /I /Y "/> <Tool Name="VCPreBuildEventTool"/> Index: huginApp.cpp =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/huginApp.cpp,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- huginApp.cpp 23 Jul 2006 09:50:10 -0000 1.96 +++ huginApp.cpp 23 Jul 2006 11:16:08 -0000 1.97 @@ -109,7 +109,7 @@ CFURLRef PTOAbsURL = CFURLCopyAbsoluteURL( PTOurl ); if(PTOAbsURL == NULL) { - DEBUG_INFO("Mac: Cannot convert the file path to abosolute"); + DEBUG_INFO("Mac: Cannot convert the file path to absolute"); } else { @@ -205,8 +205,12 @@ // add local Paths locale.AddCatalogLookupPathPrefix(m_huginPath + wxT("/locale")); -#ifdef __WXMSW__ +#if defined __WXMSW__ locale.AddCatalogLookupPathPrefix(wxT("./locale")); +#elif defined __WXMAC__ + wxString thePath = MacGetPathTOBundledResourceFile(CFSTR("locale")); + if(thePath != wxT("")) + locale.AddCatalogLookupPathPrefix(thePath); #else std::cout << INSTALL_LOCALE_DIR << std::endl; locale.AddCatalogLookupPathPrefix(wxT(INSTALL_LOCALE_DIR)); @@ -217,11 +221,6 @@ locale.AddCatalogLookupPathPrefix( config->Read(wxT("locale_path")).c_str() ); } -#ifdef __WXMAC__ - wxString thePath = MacGetPathTOBundledResourceFile(CFSTR("locale")); - if(thePath != wxT("")) - locale.AddCatalogLookupPathPrefix(thePath); -#endif // set the name of locale recource to look for locale.AddCatalog(wxT("hugin")); @@ -251,9 +250,11 @@ } else if ( wxFile::Exists(osxPath + wxT("/main_frame.xrc")) ) { m_xrcPrefix = osxPath + wxT("/"); #endif +#ifdef __WXGTK__ } else if ( wxFile::Exists((wxString)wxT(INSTALL_XRC_DIR) + wxT("/main_frame.xrc")) ) { DEBUG_INFO("using installed xrc files"); m_xrcPrefix = (wxString)wxT(INSTALL_XRC_DIR) + wxT("/"); +#endif } else if (config->HasEntry(wxT("xrc_path")) && wxFile::Exists(config->Read(wxT("xrc_path")) + wxT("/main_frame.xrc")) ) { @@ -266,7 +267,6 @@ return false; } - wxXmlResource::Get()->Load(m_xrcPrefix + wxT("image_center.xrc")); wxXmlResource::Get()->Load(m_xrcPrefix + wxT("nona_panel.xrc")); wxXmlResource::Get()->Load(m_xrcPrefix + wxT("ptstitcher_panel.xrc")); @@ -373,7 +373,7 @@ frame->LoadProjectFile(filename); } else { std::vector<std::string> filesv; - for (unsigned int i=1; i< argc; i++) { + for (int i=1; i< argc; i++) { wxFileName file(argv[1]); if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 || Index: CPImageCtrl.cpp =================================================================== RCS file: /cvsroot/hugin/hugin/src/hugin/CPImageCtrl.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- CPImageCtrl.cpp 10 Aug 2005 22:05:45 -0000 1.52 +++ CPImageCtrl.cpp 23 Jul 2006 11:16:08 -0000 1.53 @@ -36,6 +36,7 @@ #include "hugin/ImageCache.h" #include "hugin/CPEditorPanel.h" #include "hugin/MainFrame.h" +#include "hugin/huginApp.h" #if 0 #include "hugin/UniversalCursor.h" @@ -141,24 +142,12 @@ { wxString filename; -//#if defined(__WXMSW__) || defined(__WXMAC__) -#if 1 - m_CPSelectCursor = new wxCursor(wxCURSOR_CROSS); + +#if defined(__WXMSW__) + wxString cursorPath = huginApp::Get()->GetXRCPath() + wxT("/data/cursor_cp_pick.cur"); + m_CPSelectCursor = new wxCursor(cursorPath, wxBITMAP_TYPE_CUR); #else - int cursorType = wxConfigBase::Get()->Read(wxT("/CPImageCtrl/CursorType"),HUGIN_CP_CURSOR); - if (cursorType == 0) { - m_CPSelectCursor = new wxCursor(wxCURSOR_CROSS); - } else { - filename.Printf(wxT("%sdata/CPCursor%d.png"),MainFrame::Get()->GetXRCPath().c_str(), - cursorType); - wxImage cImg(filename); - if (cImg.Ok()) { - m_CPSelectCursor = new UniversalCursor(filename); - } else { - DEBUG_ERROR("Cursor file:" << filename << " not found"); - m_CPSelectCursor = new wxCursor(wxCURSOR_CROSS); - } - } + m_CPSelectCursor = new wxCursor(wxCURSOR_CROSS); #endif // scroll cursor not used right now. // m_ScrollCursor = new wxCursor(wxCURSOR_HAND); |