From: <da...@us...> - 2007-10-25 19:52:52
|
Revision: 2495 http://hugin.svn.sourceforge.net/hugin/?rev=2495&view=rev Author: dangelo Date: 2007-10-25 12:52:50 -0700 (Thu, 25 Oct 2007) Log Message: ----------- execute external command line programs with xterm (only on Unix) Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/hugin/config_defaults.h Modified: hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2007-10-24 20:27:24 UTC (rev 2494) +++ hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2007-10-25 19:52:50 UTC (rev 2495) @@ -91,6 +91,8 @@ // Wait until child process exits. WaitForSingleObject( piProcessInfo.hProcess, INFINITE ); + // TODO: interrupt waiting and redraw window. + // Close process and thread handles. CloseHandle( piProcessInfo.hProcess ); CloseHandle( piProcessInfo.hThread ); @@ -106,20 +108,20 @@ wxString cmdline = command + wxT(" ") + args; // other unix like operating system - if (wxConfig::Get()->Read(wxT("/ExecDialog/Enabled"), HUGIN_EXECDIALOG_ENABLED)) + if (wxConfig::Get()->Read(wxT("/ExecDialog/Enabled2"), HUGIN_EXECDIALOG_ENABLED2)) { MyExternalCmdExecDialog dlg(parent, wxID_ANY); return dlg.ShowModal(cmdline); } else { - int ret = -1; - wxProgressDialog progress(wxString::Format(_("Running %s"), command.c_str()),_("You can watch the enblend progress in the command window")); - DEBUG_DEBUG("using system() to execute:" << cmdline.mb_str()); - ret = system(cmdline.mb_str()); + + wxString terminal = wxConfigBase::Get()->Read(wxT("terminalEmulator"), wxT(HUGIN_STITCHER_TERMINAL)); + wxString commandstr = terminal + wxT("'") + cmdline + wxString(wxT(" || read dummy'")); + // execute commands.. + DEBUG_TRACE("Executing command: " << (const char *)commandstr.mb_str()); + int ret = wxExecute(commandstr, wxEXEC_SYNC); + if (ret == -1) { - wxLogError(_("Could not execute enblend, system() failed: \nCommand was :") + cmdline + wxT("\n") + - _("Error returned was :") + wxString(strerror(errno), *wxConvCurrent)); - } else { - ret = WEXITSTATUS(ret); + wxLogError(_("Error executing command:\n") + commandstr); } return ret; } Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-10-24 20:27:24 UTC (rev 2494) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-10-25 19:52:50 UTC (rev 2495) @@ -289,7 +289,7 @@ #endif wxString cmd = autopanoExe + wxT(" ") + autopanoArgs; - DEBUG_DEBUG("Executing: " << autopanoExe.c_str() << " " << autopanoArgs.c_str()); + DEBUG_DEBUG("Executing: " << autopanoExe.mb_str() << " " << autopanoArgs.mb_str()); int ret = 0; Modified: hugin/trunk/src/hugin1/hugin/config_defaults.h =================================================================== --- hugin/trunk/src/hugin1/hugin/config_defaults.h 2007-10-24 20:27:24 UTC (rev 2494) +++ hugin/trunk/src/hugin1/hugin/config_defaults.h 2007-10-25 19:52:50 UTC (rev 2495) @@ -163,6 +163,8 @@ #define HUGIN_STITCHER_TERMINAL "xterm -e " +#define HUGIN_EXECDIALOG_ENABLED2 0l + #endif // enblend args This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-01 00:03:59
|
Revision: 2517 http://hugin.svn.sourceforge.net/hugin/?rev=2517&view=rev Author: dangelo Date: 2007-10-31 17:03:56 -0700 (Wed, 31 Oct 2007) Log Message: ----------- fixed error when running autopano kolor Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-01 00:02:06 UTC (rev 2516) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-01 00:03:56 UTC (rev 2517) @@ -374,7 +374,9 @@ imgNr++; } - wxString ptofile = wxFileName::CreateTempFileName(wxT("ap_res")); + wxString ptofilepath = wxFileName::CreateTempFileName(wxT("ap_res")); + wxFileName ptofn(ptofilepath); + wxString ptofile = ptofn.GetFullName(); wxFileName ptofn(ptofile); autopanoArgs.Replace(wxT("%o"), ptofn.GetFullName()); wxString tmp; Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-01 00:02:06 UTC (rev 2516) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-01 00:03:56 UTC (rev 2517) @@ -123,8 +123,7 @@ wxSetEnv(wxT("PATH"), wxString(huginRoot + wxT(";") + wxGetenv(wxT("PATH")))); #elif defined __WXMAC__ // TODO: add localisation init - - wxSetEnv(wxT("PATH"), wxString(wxGetenv(wxT("PATH")))+wxT(":")+wxFileName(MacGetPathTOBundledExecutableFile(CFSTR("enblend"))).GetPath()); + wxSetEnv(wxT("PATH"), wxString(wxGetenv(wxT("PATH")))+wxT(":")+wxFileName(MacGetPathTOBundledExecutableFile(CFSTR("enblend"))).GetPath()); #else DEBUG_INFO("add locale path: " << INSTALL_LOCALE_DIR); m_locale.AddCatalogLookupPathPrefix(wxT(INSTALL_LOCALE_DIR)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-03 18:40:31
|
Revision: 2521 http://hugin.svn.sourceforge.net/hugin/?rev=2521&view=rev Author: dangelo Date: 2007-11-03 11:40:29 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Move bundle functions into base_wx, should fix compilation of hugin_stitch_project on OSX. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/CMakeLists.txt hugin/trunk/src/hugin1/hugin/huginApp.cpp hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/base_wx/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/base_wx/CMakeLists.txt 2007-11-03 10:09:32 UTC (rev 2520) +++ hugin/trunk/src/hugin1/base_wx/CMakeLists.txt 2007-11-03 18:40:29 UTC (rev 2521) @@ -1,6 +1,6 @@ SET(HUGIN_WX_BASE_SRC ImageCache.cpp MyProgressDialog.cpp Plot2D.cpp PTWXDlg.cpp - huginConfig.cpp MyExternalCmdExecDialog.cpp) + huginConfig.cpp MyExternalCmdExecDialog.cpp platform.h) IF ($HUGIN_SHARED_LIBS) add_library(huginbasewx SHARED ${HUGIN_WX_BASE_SRC}) Modified: hugin/trunk/src/hugin1/hugin/huginApp.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/huginApp.cpp 2007-11-03 10:09:32 UTC (rev 2520) +++ hugin/trunk/src/hugin1/hugin/huginApp.cpp 2007-11-03 18:40:29 UTC (rev 2521) @@ -38,7 +38,9 @@ #include "hugin/CommandHistory.h" #include "hugin/wxPanoCommand.h" +#include "base_wx/platform.h" + #include <tiffio.h> using namespace utils; @@ -65,88 +67,8 @@ } } -#ifdef __WXMAC__ -wxString MacGetPathTOBundledResourceFile(CFStringRef filename) -{ - wxString theResult = wxT(""); - CFBundleRef mainbundle = CFBundleGetMainBundle(); - if(mainbundle == NULL) - { - DEBUG_INFO("Mac: Not bundled"); - } - else - { - CFURLRef XRCurl = CFBundleCopyResourceURL(mainbundle, filename, NULL, NULL); - if(XRCurl == NULL) - { - DEBUG_INFO("Mac: Cannot locate the file in bundle."); - } - else - { - CFStringRef pathInCFString = CFURLCopyFileSystemPath(XRCurl, kCFURLPOSIXPathStyle); - if(pathInCFString == NULL) - { - DEBUG_INFO("Mac: Failed to get URL in CFString"); - } - else - { - CFRetain( pathInCFString ); - theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); - DEBUG_INFO("Mac: returned the resource file's path in the application bundle"); - } - CFRelease( XRCurl ); - } - } - return theResult; -} -wxString MacGetPathTOBundledExecutableFile(CFStringRef filename) -{ - wxString theResult = wxT(""); - - CFBundleRef mainbundle = CFBundleGetMainBundle(); - if(mainbundle == NULL) - { - DEBUG_INFO("Mac: Not bundled"); - } - else - { - CFURLRef PTOurl = CFBundleCopyAuxiliaryExecutableURL(mainbundle, filename); - if(PTOurl == NULL) - { - DEBUG_INFO("Mac: Cannot locate the file in the bundle."); - } - else - { - CFURLRef PTOAbsURL = CFURLCopyAbsoluteURL( PTOurl ); - if(PTOAbsURL == NULL) - { - DEBUG_INFO("Mac: Cannot convert the file path to absolute"); - } - else - { - CFStringRef pathInCFString = CFURLCopyFileSystemPath(PTOAbsURL, kCFURLPOSIXPathStyle); - if(pathInCFString == NULL) - { - DEBUG_INFO("Mac: Failed to get URL in CFString"); - } - else - { - CFRetain( pathInCFString ); - theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); - DEBUG_INFO("Mac: returned the executable's full path in the application bundle"); - } - CFRelease( PTOAbsURL ); - } - CFRelease( PTOurl ); - } - } - return theResult; -} -#endif - - // make wxwindows use this class as the main application IMPLEMENT_APP(huginApp) Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-03 10:09:32 UTC (rev 2520) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-03 18:40:29 UTC (rev 2521) @@ -39,6 +39,7 @@ #include "base_wx/huginConfig.h" #include "base_wx/MyProgressDialog.h" #include "base_wx/MyExternalCmdExecDialog.h" +#include "base_wx/platform.h" #include "common/wxPlatform.h" #include <tiffio.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-07 20:53:27
|
Revision: 2524 http://hugin.svn.sourceforge.net/hugin/?rev=2524&view=rev Author: dangelo Date: 2007-11-07 12:53:26 -0800 (Wed, 07 Nov 2007) Log Message: ----------- tried to fix compilation on Mac Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/huginApp.h Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2007-11-05 06:57:33 UTC (rev 2523) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2007-11-07 20:53:26 UTC (rev 2524) @@ -30,10 +30,10 @@ #include "panoinc_WX.h" #ifdef __WXMAC__ - +#include <CoreFoundation/CFBundle.h> +#include "wx/mac/private.h" wxString MacGetPathTOBundledResourceFile(CFStringRef filename); wxString MacGetPathTOBundledExecutableFile(CFStringRef filename); - #endif #endif Modified: hugin/trunk/src/hugin1/hugin/huginApp.h =================================================================== --- hugin/trunk/src/hugin1/hugin/huginApp.h 2007-11-05 06:57:33 UTC (rev 2523) +++ hugin/trunk/src/hugin1/hugin/huginApp.h 2007-11-07 20:53:26 UTC (rev 2524) @@ -28,17 +28,8 @@ #include "hugin/MainFrame.h" -#ifdef __WXMAC__ -#include <CoreFoundation/CFBundle.h> -#include "wx/mac/private.h" -#endif - // utility functions bool str2double(wxString s, double & d); -#ifdef __WXMAC__ -wxString MacGetPathTOBundledResourceFile(CFStringRef filename); -wxString MacGetPathTOBundledExecutableFile(CFStringRef filename); -#endif /// Store window size and position in configfile/registry void StoreFramePosition(wxTopLevelWindow * frame, const wxString & basename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-10 00:39:29
|
Revision: 2527 http://hugin.svn.sourceforge.net/hugin/?rev=2527&view=rev Author: dangelo Date: 2007-11-09 16:39:28 -0800 (Fri, 09 Nov 2007) Log Message: ----------- fixed compilation error on OSX, thanks to Brent for the patch. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/hugin/MainFrame.cpp Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2007-11-10 00:38:17 UTC (rev 2526) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2007-11-10 00:39:28 UTC (rev 2527) @@ -24,7 +24,7 @@ * */ -#ifdef HUGIN1_BASE_PLATFORM_H +#ifndef HUGIN1_BASE_PLATFORM_H #define HUGIN1_BASE_PLATFORM_H #include "panoinc_WX.h" Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-10 00:38:17 UTC (rev 2526) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-10 00:39:28 UTC (rev 2527) @@ -39,6 +39,7 @@ #include "hugin/CommandHistory.h" #include "base_wx/MyExternalCmdExecDialog.h" +#include "base_wx/platform.h" #include "common/wxPlatform.h" #include <wx/utils.h> Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2007-11-10 00:38:17 UTC (rev 2526) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2007-11-10 00:39:28 UTC (rev 2527) @@ -54,6 +54,7 @@ #include "base_wx/MyProgressDialog.h" #include "base_wx/ImageCache.h" #include "base_wx/huginConfig.h" +#include "base_wx/platform.h" #include "hugin/LocalizedFileTipProvider.h" #include "hugin/HFOVDialog.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-11 01:04:57
|
Revision: 2530 http://hugin.svn.sourceforge.net/hugin/?rev=2530&view=rev Author: dangelo Date: 2007-11-10 17:04:55 -0800 (Sat, 10 Nov 2007) Log Message: ----------- (MSVC) fixed compilation against unicode wxWidgets Modified Paths: -------------- hugin/trunk/src/hugin1/CMakeLists.txt hugin/trunk/src/hugin1/panoinc_WX.h Modified: hugin/trunk/src/hugin1/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/CMakeLists.txt 2007-11-11 01:02:09 UTC (rev 2529) +++ hugin/trunk/src/hugin1/CMakeLists.txt 2007-11-11 01:04:55 UTC (rev 2530) @@ -4,6 +4,13 @@ # build gui only if wxWidgets was found IF(wxWidgets_FOUND) # INCLUDE(${wxWidgets_USE_FILE}) + + # do we need to define _UNICODE on windows? + IF(WIN32 AND ${wxWidgets_CONFIGURATION} STREQUAL "mswu") + ADD_DEFINITIONS("-D_UNICODE") + MESSAGE("Defining -D_UNICODE") + ENDIF(WIN32 AND ${wxWidgets_CONFIGURATION} STREQUAL "mswu") + add_subdirectory(base_wx) add_subdirectory(stitch_project) add_subdirectory(hugin) Modified: hugin/trunk/src/hugin1/panoinc_WX.h =================================================================== --- hugin/trunk/src/hugin1/panoinc_WX.h 2007-11-11 01:02:09 UTC (rev 2529) +++ hugin/trunk/src/hugin1/panoinc_WX.h 2007-11-11 01:04:55 UTC (rev 2530) @@ -83,7 +83,7 @@ // remove stupid #defines from the evil windows.h #ifdef __WXMSW__ -#include <wx/msw/winundef.h> +//#include <wx/msw/winundef.h> #undef DIFFERENCE #undef FindWindow #undef min This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2007-11-14 07:08:19
|
Revision: 2533 http://hugin.svn.sourceforge.net/hugin/?rev=2533&view=rev Author: dangelo Date: 2007-11-13 23:08:18 -0800 (Tue, 13 Nov 2007) Log Message: ----------- Reworked cmd line execute dialog. Works under windows, but probably consumes 100% cpu under linux. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2007-11-13 21:13:01 UTC (rev 2532) +++ hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2007-11-14 07:08:18 UTC (rev 2533) @@ -32,12 +32,242 @@ #include "common/wxPlatform.h" +#include "wx/ffile.h" +#include "wx/process.h" +#include "wx/mimetype.h" + +#ifdef __WINDOWS__ + #include "wx/dde.h" +#endif // __WINDOWS__ + + #include "MyExternalCmdExecDialog.h" #include "hugin/config_defaults.h" #define LINE_IO 1 -int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent) + + + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// IDs for the controls and the menu commands +enum +{ + // control ids + Exec_Btn_Cancel = 1000, +}; + +static const wxChar *DIALOG_TITLE = _T("Exec sample"); + +// ---------------------------------------------------------------------------- +// event tables and other macros for wxWidgets +// ---------------------------------------------------------------------------- + + +BEGIN_EVENT_TABLE(MyExecDialog, wxDialog) + EVT_BUTTON(wxID_CANCEL, MyExecDialog::OnCancel) + + EVT_IDLE(MyExecDialog::OnIdle) + + EVT_TIMER(wxID_ANY, MyExecDialog::OnTimer) +// EVT_END_PROCESS(wxID_ANY, MyFrame::OnProcessTerm) +END_EVENT_TABLE() + + +// ============================================================================ +// implementation +// ============================================================================ + + +// frame constructor +MyExecDialog::MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size) + : wxDialog(parent, wxID_ANY, title, pos, size), + m_timerIdleWakeUp(this) +{ + m_pidLast = 0; + + wxBoxSizer * topsizer = new wxBoxSizer( wxVERTICAL ); + // create the listbox in which we will show misc messages as they come + m_lbox = new wxListBox(this, wxID_ANY); + wxFont font(8, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL); + if ( font.Ok() ) + m_lbox->SetFont(font); + + topsizer->Add(m_lbox, 1, wxEXPAND | wxALL, 10); + + topsizer->Add( new wxButton(this, wxID_CANCEL, _("Cancel")), + 0, wxALL, 10); + + SetSizer( topsizer ); +// topsizer->SetSizeHints( this ); +} + + +void MyExecDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + wxKillError rc = wxProcess::Kill(m_pidLast, wxSIGTERM); + if ( rc != wxKILL_OK ) { + static const wxChar *errorText[] = + { + _T(""), // no error + _T("signal not supported"), + _T("permission denied"), + _T("no such process"), + _T("unspecified error"), + }; + + wxLogStatus(_("Failed to kill process %ld with sigterm: %s"), + m_pidLast, errorText[rc]); + } +} + + +int MyExecDialog::ExecWithRedirect(wxString cmd) +{ + if ( !cmd ) + return -1; + + MyPipedProcess *process = new MyPipedProcess(this, cmd); + if ( !wxExecute(cmd, wxEXEC_ASYNC, process) ) + { + wxLogError(_T("Execution of '%s' failed."), cmd.c_str()); + + delete process; + return -1; + } + else + { + AddAsyncProcess(process); + } + m_cmdLast = cmd; + + return ShowModal(); +} + +// ---------------------------------------------------------------------------- +// various helpers +// ---------------------------------------------------------------------------- + +// input polling +void MyExecDialog::OnIdle(wxIdleEvent& event) +{ + size_t count = m_running.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( m_running[n]->HasInput() ) + { + event.RequestMore(); + } + } +} + +void MyExecDialog::OnTimer(wxTimerEvent& WXUNUSED(event)) +{ + wxWakeUpIdle(); +} + +void MyExecDialog::OnProcessTerminated(MyPipedProcess *process, int pid, int status) +{ + RemoveAsyncProcess(process); + if (status != 0) { + wxMessageBox(_("Error while executing process"),_("Error")); + } + EndModal(status); +} + + +void MyExecDialog::ShowOutput(const wxString& cmd, + const wxArrayString& output, + const wxString& title) +{ + size_t count = output.GetCount(); + if ( !count ) + return; + + m_lbox->Append(wxString::Format(_T("--- %s of '%s' ---"), + title.c_str(), cmd.c_str())); + + for ( size_t n = 0; n < count; n++ ) + { + m_lbox->Append(output[n]); + } + + m_lbox->Append(wxString::Format(_T("--- End of %s ---"), + title.Lower().c_str())); +} + + + +// ---------------------------------------------------------------------------- +// MyProcess +// ---------------------------------------------------------------------------- + +void MyProcess::OnTerminate(int pid, int status) +{ +// wxLogStatus(m_parent, _T("Process %u ('%s') terminated with exit code %d."), +// pid, m_cmd.c_str(), status); + + // we're not needed any more + delete this; +} + +// ---------------------------------------------------------------------------- +// MyPipedProcess +// ---------------------------------------------------------------------------- + +bool MyPipedProcess::HasInput() +{ + bool hasInput = false; + + if ( IsInputAvailable() ) + { + wxTextInputStream tis(*GetInputStream()); + + // this assumes that the output is always line buffered + wxString msg; + //msg << m_cmd << _T(" (stdout): ") << tis.ReadLine(); + msg << tis.ReadLine(); + + m_parent->GetLogListBox()->Append(msg); + + hasInput = true; + } + + if ( IsErrorAvailable() ) + { + wxTextInputStream tis(*GetErrorStream()); + + // this assumes that the output is always line buffered + wxString msg; + //msg << m_cmd << _T(" (stderr): ") << tis.ReadLine(); + msg << tis.ReadLine(); + + m_parent->GetLogListBox()->Append(msg); + + hasInput = true; + } + + return hasInput; +} + +void MyPipedProcess::OnTerminate(int pid, int status) +{ + // show the rest of the output + while ( HasInput() ) + ; + + m_parent->OnProcessTerminated(this, pid, status); + + MyProcess::OnTerminate(pid, status); +} + + +int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent, + wxString title) { /* @@ -52,7 +282,7 @@ MyExternalCmdExecDialog dlg(parent, wxID_ANY); return dlg.ShowModal(cmdline); */ -#if defined __WXMSW__ +#if defined DISABLED__WXMSW__ int ret = -1; wxFileName tname(command); wxString ext = tname.GetExt(); @@ -110,11 +340,22 @@ } return ret; #else + command = utils::wxQuoteFilename(command); wxString cmdline = command + wxT(" ") + args; +#if 0 MyExternalCmdExecDialog dlg(parent, wxID_ANY); - return dlg.ShowModal(cmdline); + dlg.ShowModal(cmdline); + wxMessageBox(_("program finished"), _("ExecuteProcess")); + return 0; + +#else + MyExecDialog dlg(NULL, title, + wxDefaultPosition, wxSize(640, 400)); + return dlg.ExecWithRedirect(cmdline); #endif + +#endif } //---------- @@ -128,8 +369,8 @@ MyExternalCmdExecDialog::MyExternalCmdExecDialog(wxWindow* parent, wxWindowID id, const wxString& title, - const wxPoint& pos, - const wxSize& size, + const wxPoint& pos, + const wxSize& size, long style, const wxString& name) : wxDialog(parent, id, title, pos, size, style, name), @@ -153,7 +394,7 @@ int MyExternalCmdExecDialog::ShowModal(const wxString &cmd) { - process = new MyPipedProcess(this, cmd); + process = new HuginPipedProcess(this, cmd); processID = wxExecute(cmd, wxEXEC_ASYNC, process); if (!processID) @@ -170,7 +411,7 @@ int MyExternalCmdExecDialog::Execute(const wxString & cmd) { - process = new MyPipedProcess(this, cmd); + process = new HuginPipedProcess(this, cmd); m_exitCode = 0; processID = wxExecute(cmd, wxEXEC_ASYNC, process); @@ -218,7 +459,7 @@ //---------- -bool MyPipedProcess::HasInput() +bool HuginPipedProcess::HasInput() { bool hasInput = false; @@ -292,7 +533,7 @@ return hasInput; } -void MyPipedProcess::OnTerminate(int pid, int status) +void HuginPipedProcess::OnTerminate(int pid, int status) { // show the rest of the output while ( HasInput() ) ; @@ -303,3 +544,4 @@ // we're not needed any more delete this; } + Modified: hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h 2007-11-13 21:13:01 UTC (rev 2532) +++ hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h 2007-11-14 07:08:18 UTC (rev 2533) @@ -26,14 +26,140 @@ #ifndef _MYEXTERNALCMDEXECDIALOG__H #define _MYEXTERNALCMDEXECDIALOG__H -#endif class MyExternalCmdExecDialog; +class HuginPipedProcess; +int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent, wxString title); + + +// Define an array of process pointers used by MyFrame +class MyPipedProcess; +WX_DEFINE_ARRAY_PTR(MyPipedProcess *, MyProcessesArray); + + class MyPipedProcess; -int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent); +class MyProcessListener +{ +public: + virtual void OnProcessTerminated(MyPipedProcess *process, int pid, int status) = 0; + virtual wxListBox *GetLogListBox() const = 0; + +}; + + +// Define a new exec dialog +class MyExecDialog : public wxDialog, public MyProcessListener +{ +public: + // ctor(s) + MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size); + + void OnCancel(wxCommandEvent& event); + + void OnExecWithRedirect(wxCommandEvent& event); + + int ExecWithRedirect(wxString command); + + // polling output of async processes + void OnTimer(wxTimerEvent& event); + void OnIdle(wxIdleEvent& event); + + // for MyPipedProcess + void OnProcessTerminated(MyPipedProcess *process, int pid, int status); + wxListBox *GetLogListBox() const { return m_lbox; } + +private: + void ShowOutput(const wxString& cmd, + const wxArrayString& output, + const wxString& title); + + void DoAsyncExec(const wxString& cmd); + + void AddAsyncProcess(MyPipedProcess *process) + { + if ( m_running.IsEmpty() ) + { + // we want to start getting the timer events to ensure that a + // steady stream of idle events comes in -- otherwise we + // wouldn't be able to poll the child process input + m_timerIdleWakeUp.Start(100); + } + //else: the timer is already running + + m_running.Add(process); + } + + void RemoveAsyncProcess(MyPipedProcess *process) + { + m_running.Remove(process); + + if ( m_running.IsEmpty() ) + { + // we don't need to get idle events all the time any more + m_timerIdleWakeUp.Stop(); + } + } + + // the PID of the last process we launched asynchronously + long m_pidLast; + + // last command we executed + wxString m_cmdLast; + + wxListBox *m_lbox; + + MyProcessesArray m_running; + + // the idle event wake up timer + wxTimer m_timerIdleWakeUp; + + // any class wishing to process wxWidgets events must use this macro + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// wxProcess-derived classes +// ---------------------------------------------------------------------------- + +// This is the handler for process termination events +class MyProcess : public wxProcess +{ +public: + MyProcess(MyProcessListener *parent, const wxString& cmd) + : wxProcess(0), m_cmd(cmd) + { + m_parent = parent; + } + // instead of overriding this virtual function we might as well process the + // event from it in the frame class - this might be more convenient in some + // cases + virtual void OnTerminate(int pid, int status); +protected: + MyProcessListener *m_parent; + wxString m_cmd; +}; + +// A specialization of MyProcess for redirecting the output +class MyPipedProcess : public MyProcess +{ +public: + MyPipedProcess(MyProcessListener *parent, const wxString& cmd) + : MyProcess(parent, cmd) + { + Redirect(); + } + + virtual void OnTerminate(int pid, int status); + + virtual bool HasInput(); +}; + + //---------- + + class MyExternalCmdExecDialog : public wxDialog { public: @@ -41,12 +167,12 @@ wxWindowID id, const wxString& title = _("Command Line Progress"), const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, #ifdef __WXMAC__ - const wxSize& size = wxDefaultSize, + long style = wxRESIZE_BORDER|wxFRAME_FLOAT_ON_PARENT|wxMINIMIZE_BOX, #else - const wxSize& size = wxSize(650,480), + long style = wxDEFAULT_DIALOG_STYLE, #endif - long style = wxRESIZE_BORDER|wxFRAME_FLOAT_ON_PARENT|wxMINIMIZE_BOX, const wxString& name = wxT("externalCmDialogBox")); int ShowModal(const wxString &cmd); @@ -62,7 +188,7 @@ //wxListBox *m_lbox; wxTextCtrl *m_tbox; wxTimer m_timerIdleWakeUp; - MyPipedProcess *process; + HuginPipedProcess *process; long processID; int m_exitCode; @@ -71,10 +197,10 @@ //---------- -class MyPipedProcess : public wxProcess +class HuginPipedProcess : public wxProcess { public: - MyPipedProcess(MyExternalCmdExecDialog *parent, const wxString& cmd) + HuginPipedProcess(MyExternalCmdExecDialog *parent, const wxString& cmd) : wxProcess(parent), m_cmd(cmd) { m_parent = parent; @@ -88,3 +214,5 @@ MyExternalCmdExecDialog *m_parent; wxString m_cmd; }; + +#endif Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-13 21:13:01 UTC (rev 2532) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2007-11-14 07:08:18 UTC (rev 2533) @@ -295,7 +295,7 @@ int ret = 0; // use MyExternalCmdExecDialog - ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, 0); + ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, 0, _("finding control points")); if (ret == -1) { wxMessageBox( _("Could not execute command: " + cmd), _("wxExecute Error"), wxOK | wxICON_ERROR); @@ -400,7 +400,7 @@ int ret = 0; // use MyExternalCmdExecDialog - ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, 0); + ret = MyExecuteCommandOnDialog(autopanoExe, autopanoArgs, 0, _("finding control points")); if (ret == -1) { wxMessageBox( _("Could not execute command: " + cmd), _("wxExecute Error"), Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-13 21:13:01 UTC (rev 2532) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2007-11-14 07:08:18 UTC (rev 2533) @@ -336,7 +336,7 @@ wxString cmd = wxT("make ") + args; #if 1 - int ret = MyExecuteCommandOnDialog(wxT("make"), args, NULL); + int ret = MyExecuteCommandOnDialog(wxT("make"), args, NULL, caption); #else // This crashes.. Don't know why.. MyExternalCmdExecDialog execDlg(NULL, wxID_ANY); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-11 18:45:34
|
Revision: 2622 http://hugin.svn.sourceforge.net/hugin/?rev=2622&view=rev Author: dangelo Date: 2008-01-11 10:45:33 -0800 (Fri, 11 Jan 2008) Log Message: ----------- fixed a possible crash when checking the "Link" checkboxes. Modified Paths: -------------- hugin/trunk/src/hugin1/PT/PanoCommand.h hugin/trunk/src/hugin1/hugin/LensPanel.cpp Modified: hugin/trunk/src/hugin1/PT/PanoCommand.h =================================================================== --- hugin/trunk/src/hugin1/PT/PanoCommand.h 2008-01-11 18:44:22 UTC (rev 2621) +++ hugin/trunk/src/hugin1/PT/PanoCommand.h 2008-01-11 18:45:33 UTC (rev 2622) @@ -479,7 +479,43 @@ }; + //========================================================================= + //========================================================================= + + /** update LensVariables for multiple lenses */ + class SetLensesVariableCmd : public PanoCommand + { + public: + SetLensesVariableCmd(Panorama & p, UIntSet lenses, const std::vector<LensVarMap> & var) + : PanoCommand(p), lensNrs(lenses), vars(var) + { }; + + virtual bool processPanorama(Panorama& pano) + { + assert(lensNrs.size() == vars.size()); + std::vector<LensVarMap>::iterator vit = vars.begin(); + for (UIntSet::iterator lit = lensNrs.begin(); lit != lensNrs.end(); ++lit, ++vit) { + LensVarMap::const_iterator it; + for (it = (*vit).begin(); it != (*vit).end(); ++it) { + pano.updateLensVariable(*lit, it->second); + } + pano.changeFinished(); + } + return true; + } + + virtual std::string getName() const + { + return "set lens variable"; + } + + private: + UIntSet lensNrs; + std::vector<LensVarMap> vars; + }; + + //========================================================================= //========================================================================= Modified: hugin/trunk/src/hugin1/hugin/LensPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-11 18:44:22 UTC (rev 2621) +++ hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-11 18:45:33 UTC (rev 2622) @@ -610,21 +610,23 @@ } bool inherit = e.IsChecked(); - for (UIntSet::iterator it = m_selectedLenses.begin(); + std::vector<LensVarMap> lmaps; + for (UIntSet::const_iterator it = m_selectedLenses.begin(); it != m_selectedLenses.end(); ++it) { // get the current Lens. unsigned int lensNr = *it; - LensVarMap lmap; - for (unsigned i=0; i < varnames.size(); i++) { - LensVariable lv = const_map_get(pano.getLens(lensNr).variables, varnames[i]); - lv.setLinked(inherit); + LensVarMap lmap; + for (unsigned i=0; i < varnames.size(); i++) { + LensVariable lv = const_map_get(pano.getLens(lensNr).variables, varnames[i]); + lv.setLinked(inherit); lmap.insert(make_pair(lv.getName(),lv)); - } - GlobalCmdHist::getInstance().addCommand( - new PT::SetLensVariableCmd(pano, *it, lmap) - ); + } + lmaps.push_back(lmap); } + GlobalCmdHist::getInstance().addCommand( + new PT::SetLensesVariableCmd(pano, m_selectedLenses, lmaps) + ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-15 21:05:47
|
Revision: 2641 http://hugin.svn.sourceforge.net/hugin/?rev=2641&view=rev Author: dangelo Date: 2008-01-15 13:04:49 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Tried to fix CMake OSX scripts. Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/CMakeLists.txt hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt Modified: hugin/trunk/src/hugin1/hugin/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/hugin/CMakeLists.txt 2008-01-15 18:45:48 UTC (rev 2640) +++ hugin/trunk/src/hugin1/hugin/CMakeLists.txt 2008-01-15 21:04:49 UTC (rev 2641) @@ -99,17 +99,20 @@ target_link_libraries( ${PROGNAME} ${common_libs} ${image_libs} huginbasewx ${wxWidgets_LIBRARIES}) -install(TARGETS ${PROGNAME} - DESTINATION ${BINDIR}) +IF (!APPLE) + install(TARGETS ${PROGNAME} + DESTINATION ${BINDIR}) +ENDIF(!APPLE) # install further stuff (icons etc.) - IF (APPLE) IF(MAC_SELF_CONTAINED_BUNDLE) INCLUDE (${CMAKE_SOURCE_DIR}/CMakeModules/AppleRELEASEOptions.cmake) ENDIF(MAC_SELF_CONTAINED_BUNDLE) # already done by bundle ELSEIF(UNIX) + + INSTALL(FILES hugin.desktop DESTINATION ${DATADIR}/applications) INSTALL(FILES gnome-mime-application-x-ptoptimizer-script.png DESTINATION ${DATADIR}/icons/gnome/48x48/mimetypes) INSTALL(FILES hugin.xml DESTINATION ${DATADIR}/mime/packages) Modified: hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2008-01-15 18:45:48 UTC (rev 2640) +++ hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2008-01-15 21:04:49 UTC (rev 2641) @@ -5,11 +5,11 @@ ELSEIF(APPLE) set( PROGNAME HuginStitchProject ) set( MACOSX_BUNDLE_EXTENSION pto) - set( MACOSX_BUNDLE_ICON_FILE Hugin.icns ) - set( MACOSX_BUNDLE_TYPE_ICON_FILE HuginFiles.icns ) + set( MACOSX_BUNDLE_ICON_FILE ../hugin/Hugin.icns ) + set( MACOSX_BUNDLE_TYPE_ICON_FILE ../hugin/HuginFiles.icns ) set( MACOSX_BUNDLE_MIME_TYPE application/x-ptoptimizer-script ) set( MACOSX_BUNDLE_TYPE_NAME "Hugin Project" ) - set( MACOSX_BUNDLE_TYPE_ROLE Editor ) + set( MACOSX_BUNDLE_TYPE_ROLE Viewer ) set( MACOSX_BUNDLE_VERSION ${V_MAJOR}.${V_MINOR}.${V_PATCH} ) set( MACOSX_BUNDLE_SHORT_VERSION_STRING ${MACOSX_BUNDLE_VERSION}) set( MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${MACOSX_BUNDLE_VERSION}" ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ip...@us...> - 2008-01-23 00:05:19
|
Revision: 2686 http://hugin.svn.sourceforge.net/hugin/?rev=2686&view=rev Author: ippei Date: 2008-01-22 16:05:16 -0800 (Tue, 22 Jan 2008) Log Message: ----------- mac more fix and a revert Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-22 07:46:57 UTC (rev 2685) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 00:05:16 UTC (rev 2686) @@ -28,6 +28,7 @@ #define HUGIN1_BASE_PLATFORM_H #include "panoinc_WX.h" +#include <config.h> #if defined __WXMAC__ Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-01-22 07:46:57 UTC (rev 2685) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-01-23 00:05:16 UTC (rev 2686) @@ -129,6 +129,21 @@ PTPrograms progs = getPTProgramsConfig(wxT(""), wxConfigBase::Get()); #endif +#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE + { + wxString exec_path = MacGetPathToBundledExecutableFile(CFSTR("nona")); + if(exec_path != wxT("")) + { + progs.nona = exec_path.mb_str(); + } + + exec_path = MacGetPathToBundledExecutableFile(CFSTR("hugin_hdrmerge")); + if(exec_path != wxT("")) + { + progs.hdrmerge = exec_path.mb_str(); + } + } +#endif // set the name of locale recource to look for m_locale.AddCatalog(wxT("hugin")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-23 06:41:37
|
Revision: 2687 http://hugin.svn.sourceforge.net/hugin/?rev=2687&view=rev Author: dangelo Date: 2008-01-22 22:41:35 -0800 (Tue, 22 Jan 2008) Log Message: ----------- applied patch [ 1876976 ] Fixes for non-self-contained Mac app to compile by Wim Lewis Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.cpp hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp hugin/trunk/src/hugin1/hugin/CPImageCtrl.h hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/PanoPanel.cpp hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc Modified: hugin/trunk/src/hugin1/base_wx/platform.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 06:41:35 UTC (rev 2687) @@ -41,14 +41,18 @@ } -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath) +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath) { wxString theResult = wxT(""); - CFURLRef bundleURL = CFURLCreateWithString(NULL,bundlePath,NULL); + CFStringRef cfBundlePath = MacCreateCFStringWithWxString(bundlePath); + + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(NULL, cfBundlePath, kCFURLPOSIXPathStyle, TRUE); + CFRelease (cfBundlePath); + if(bundleURL == NULL) { - DEBUG_ERROR("Mac: CFURL from string failed." ); + DEBUG_ERROR("Mac: CFURL from string (" << bundlePath << ") failed." ); return theResult; } @@ -97,7 +101,7 @@ #if defined MAC_SELF_CONTAINED_BUNDLE -wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename) +wxString MacGetPathToBundledAppMainExecutableFile(const wxString& unusedFilename) { wxString theResult = wxT(""); @@ -240,6 +244,7 @@ return theResult; } +#endif // MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToUserDomainTempDir() { @@ -263,6 +268,4 @@ return tmpDirPath; } -#endif // MAC_SELF_CONTAINED_BUNDLE - -#endif // __WXMAC__ \ No newline at end of file +#endif // __WXMAC__ Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 06:41:35 UTC (rev 2687) @@ -36,17 +36,19 @@ #include <wx/mac/private.h> CFStringRef MacCreateCFStringWithWxString(const wxString& string); -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath); +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath); + #if defined MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToBundledResourceFile(CFStringRef filename); wxString MacGetPathToBundledExecutableFile(CFStringRef filename); wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename); -wxString MacGetPathToUserDomainTempDir(); #endif // MAC_SELF_CONTAINED_BUNDLE +wxString MacGetPathToUserDomainTempDir(); + #endif //__WXMAC__ #endif Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-23 06:41:35 UTC (rev 2687) @@ -52,6 +52,8 @@ #include "vigra/localminmax.hxx" #include "vigra_ext/Correlation.h" +#define HUGIN_XRC_SUBCLASS + using namespace std; using namespace PT; using namespace vigra; @@ -132,12 +134,19 @@ m_leftTabs->SetSizeHints(1,tabH,1000,tabH,-1,-1); #endif #ifdef HUGIN_CP_IMG_CHOICE - m_leftChoice = XRCCTRL(*this, "cp_editor_left_choice", wxChoice); + m_leftChoice = XRCCTRL(*this, "cp_editor_left_choice", wxChoice); #endif - m_leftImg = new CPImageCtrl(this); +#ifdef HUGIN_XRC_SUBCLASS + m_leftImg = XRCCTRL(*this, "cp_editor_left_img", CPImageCtrl); + assert(m_leftImg); + m_leftImg->Init(this); +#else + m_leftImg = new CPImageCtrl(); + m_leftImg->Init(this); wxXmlResource::Get()->AttachUnknownControl(wxT("cp_editor_left_img"), m_leftImg); +#endif // right image #ifdef HUGIN_CP_IMG_TAB @@ -147,9 +156,19 @@ #ifdef HUGIN_CP_IMG_CHOICE m_rightChoice = XRCCTRL(*this, "cp_editor_right_choice", wxChoice); #endif - m_rightImg = new CPImageCtrl(this); + + +#ifdef HUGIN_XRC_SUBCLASS + m_rightImg = XRCCTRL(*this, "cp_editor_right_img", CPImageCtrl); + m_rightImg->Init(this); +#else + m_rightImg = new CPImageCtrl(); + m_rightImg->Init(this); wxXmlResource::Get()->AttachUnknownControl(wxT("cp_editor_right_img"), m_rightImg); +#endif + + #ifdef USE_FINETUNEFRAME // setup finetune frame m_fineTuneFrame = new CPFineTuneFrame(this, *pano); Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-23 06:41:35 UTC (rev 2687) @@ -132,23 +132,48 @@ EVT_TIMER(-1, CPImageCtrl::OnTimer) END_EVENT_TABLE() -CPImageCtrl::CPImageCtrl(CPEditorPanel* parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) - : wxScrolledWindow(parent, id, pos, size, style, name), - selectedPointNr(0), - editState(NO_IMAGE), - scaleFactor(1), fitToWindow(false), - m_showSearchArea(false), m_searchRectWidth(0), - m_showTemplateArea(false), m_templateRectWidth(0), - m_tempZoom(false),m_savedScale(1), m_editPanel(parent), - m_imgRotation(ROT0) +CPImageCtrl::CPImageCtrl() { + DEBUG_TRACE("*************"); +} + +CPImageCtrl::CPImageCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + DEBUG_TRACE("*************"); + Create(parent, id, pos, size, style, name); +} + + +bool CPImageCtrl::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + DEBUG_TRACE("*************"); + return wxScrolledWindow::Create(parent, id, pos, size, style, name); +} + +void CPImageCtrl::Init(CPEditorPanel* parent) +{ + DEBUG_TRACE("*************"); + m_editPanel = parent; + selectedPointNr = 0; + editState = NO_IMAGE; + scaleFactor = 0; + fitToWindow = false; + m_showSearchArea = false; + m_searchRectWidth = 0; + m_showTemplateArea = false; + m_templateRectWidth = 0; + m_tempZoom = false; + m_savedScale = 1; + m_editPanel = parent; + m_imgRotation = ROT0; + wxString filename; - #if defined(__WXMSW__) wxString cursorPath = huginApp::Get()->GetXRCPath() + wxT("/data/cursor_cp_pick.cur"); m_CPSelectCursor = new wxCursor(cursorPath, wxBITMAP_TYPE_CUR); Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.h =================================================================== --- hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2008-01-23 06:41:35 UTC (rev 2687) @@ -102,21 +102,22 @@ public: /** ctor. */ - CPImageCtrl(CPEditorPanel* parent, wxWindowID id = -1, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxHSCROLL | wxVSCROLL, - const wxString& name=wxT("CPImageCtrl")); + CPImageCtrl(); - CPImageCtrl() - : scaleFactor(1),fitToWindow(false) - { } + CPImageCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = wxT("scrolledWindow")); + /** dtor. */ ~CPImageCtrl(); + /** Delayed creation */ + bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name); + + /** proper initialisation */ + void Init(CPEditorPanel* parent); + /** image rotation. * Useful to display images depending on their roll setting. * rotation is clockwise Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-23 06:41:35 UTC (rev 2687) @@ -203,6 +203,7 @@ dc.DrawText(version, bitmap.GetWidth() - tw - 5, bitmap.GetHeight() - th - 5); } + /* #ifdef __unix__ splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_NO_TIMEOUT, @@ -216,11 +217,12 @@ wxDefaultSize, wxSIMPLE_BORDER); #endif + */ } else { wxLogFatalError(_("Fatal installation error\nThe file data/splash.png was not found at:") + huginApp::Get()->GetXRCPath()); abort(); } - splash->Refresh(); + //splash->Refresh(); wxYield(); // save our pointer Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 06:41:35 UTC (rev 2687) @@ -623,11 +623,9 @@ } #elif defined __WXMAC__ // HuginStitchProject installed in INSTALL_OSX_BUNDLE_DIR - wxString hugin_stitch_project(wxT(INSTALL_OSX_BUNDLE_DIR)); - hugin_stitch_project.append(wxT("HuginStitchProject.app")); - CFStringRef bundlePath = MacCreateCFStringWithWxString(hugin_stitch_project); - wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(bundlePath); - CFRelease(bundlePath); + wxFileName hugin_stitch_project_app(wxT(INSTALL_OSX_BUNDLE_DIR), wxEmptyString); + hugin_stitch_project_app.AppendDir(wxT("HuginStitchProject.app")); + wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(hugin_stitch_project_app.GetFullPath()); #else wxString hugin_stitch_project = wxT("hugin_stitch_project"); #endif Modified: hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc 2008-01-23 00:05:16 UTC (rev 2686) +++ hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc 2008-01-23 06:41:35 UTC (rev 2687) @@ -39,7 +39,9 @@ <border>3</border> </object> <object class="sizeritem"> - <object class="unknown" name="cp_editor_left_img"/> + <object class="wxScrolledWindow" name="cp_editor_left_img"> + <style>wxTAB_TRAVERSAL</style> + </object> <option>1</option> <flag>wxALL|wxEXPAND</flag> <border>3</border> @@ -74,7 +76,7 @@ <border>3</border> </object> <object class="sizeritem"> - <object class="unknown" name="cp_editor_right_img"/> + <object class="wxScrolledWindow" name="cp_editor_right_img"/> <option>1</option> <flag>wxALL|wxEXPAND</flag> <border>3</border> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-23 11:47:18
|
Revision: 2688 http://hugin.svn.sourceforge.net/hugin/?rev=2688&view=rev Author: dangelo Date: 2008-01-23 03:47:16 -0800 (Wed, 23 Jan 2008) Log Message: ----------- reverted revision 2687, it accidentally included some work in progress changes Revision Links: -------------- http://hugin.svn.sourceforge.net/hugin/?rev=2687&view=rev Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.cpp hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp hugin/trunk/src/hugin1/hugin/CPImageCtrl.h hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/PanoPanel.cpp hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc Modified: hugin/trunk/src/hugin1/base_wx/platform.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 11:47:16 UTC (rev 2688) @@ -41,18 +41,14 @@ } -wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath) +wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath) { wxString theResult = wxT(""); - CFStringRef cfBundlePath = MacCreateCFStringWithWxString(bundlePath); - - CFURLRef bundleURL = CFURLCreateWithFileSystemPath(NULL, cfBundlePath, kCFURLPOSIXPathStyle, TRUE); - CFRelease (cfBundlePath); - + CFURLRef bundleURL = CFURLCreateWithString(NULL,bundlePath,NULL); if(bundleURL == NULL) { - DEBUG_ERROR("Mac: CFURL from string (" << bundlePath << ") failed." ); + DEBUG_ERROR("Mac: CFURL from string failed." ); return theResult; } @@ -101,7 +97,7 @@ #if defined MAC_SELF_CONTAINED_BUNDLE -wxString MacGetPathToBundledAppMainExecutableFile(const wxString& unusedFilename) +wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename) { wxString theResult = wxT(""); @@ -244,7 +240,6 @@ return theResult; } -#endif // MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToUserDomainTempDir() { @@ -268,4 +263,6 @@ return tmpDirPath; } -#endif // __WXMAC__ +#endif // MAC_SELF_CONTAINED_BUNDLE + +#endif // __WXMAC__ \ No newline at end of file Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 11:47:16 UTC (rev 2688) @@ -36,19 +36,17 @@ #include <wx/mac/private.h> CFStringRef MacCreateCFStringWithWxString(const wxString& string); +wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath); -wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath); - #if defined MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToBundledResourceFile(CFStringRef filename); wxString MacGetPathToBundledExecutableFile(CFStringRef filename); wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename); +wxString MacGetPathToUserDomainTempDir(); #endif // MAC_SELF_CONTAINED_BUNDLE -wxString MacGetPathToUserDomainTempDir(); - #endif //__WXMAC__ #endif Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-23 11:47:16 UTC (rev 2688) @@ -52,8 +52,6 @@ #include "vigra/localminmax.hxx" #include "vigra_ext/Correlation.h" -#define HUGIN_XRC_SUBCLASS - using namespace std; using namespace PT; using namespace vigra; @@ -134,19 +132,12 @@ m_leftTabs->SetSizeHints(1,tabH,1000,tabH,-1,-1); #endif #ifdef HUGIN_CP_IMG_CHOICE - m_leftChoice = XRCCTRL(*this, "cp_editor_left_choice", wxChoice); + m_leftChoice = XRCCTRL(*this, "cp_editor_left_choice", wxChoice); #endif -#ifdef HUGIN_XRC_SUBCLASS - m_leftImg = XRCCTRL(*this, "cp_editor_left_img", CPImageCtrl); - assert(m_leftImg); - m_leftImg->Init(this); -#else - m_leftImg = new CPImageCtrl(); - m_leftImg->Init(this); + m_leftImg = new CPImageCtrl(this); wxXmlResource::Get()->AttachUnknownControl(wxT("cp_editor_left_img"), m_leftImg); -#endif // right image #ifdef HUGIN_CP_IMG_TAB @@ -156,19 +147,9 @@ #ifdef HUGIN_CP_IMG_CHOICE m_rightChoice = XRCCTRL(*this, "cp_editor_right_choice", wxChoice); #endif - - -#ifdef HUGIN_XRC_SUBCLASS - m_rightImg = XRCCTRL(*this, "cp_editor_right_img", CPImageCtrl); - m_rightImg->Init(this); -#else - m_rightImg = new CPImageCtrl(); - m_rightImg->Init(this); + m_rightImg = new CPImageCtrl(this); wxXmlResource::Get()->AttachUnknownControl(wxT("cp_editor_right_img"), m_rightImg); -#endif - - #ifdef USE_FINETUNEFRAME // setup finetune frame m_fineTuneFrame = new CPFineTuneFrame(this, *pano); Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-23 11:47:16 UTC (rev 2688) @@ -132,48 +132,23 @@ EVT_TIMER(-1, CPImageCtrl::OnTimer) END_EVENT_TABLE() -CPImageCtrl::CPImageCtrl() +CPImageCtrl::CPImageCtrl(CPEditorPanel* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) + : wxScrolledWindow(parent, id, pos, size, style, name), + selectedPointNr(0), + editState(NO_IMAGE), + scaleFactor(1), fitToWindow(false), + m_showSearchArea(false), m_searchRectWidth(0), + m_showTemplateArea(false), m_templateRectWidth(0), + m_tempZoom(false),m_savedScale(1), m_editPanel(parent), + m_imgRotation(ROT0) { - DEBUG_TRACE("*************"); -} - -CPImageCtrl::CPImageCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style, const wxString& name) -{ - DEBUG_TRACE("*************"); - Create(parent, id, pos, size, style, name); -} - - -bool CPImageCtrl::Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - DEBUG_TRACE("*************"); - return wxScrolledWindow::Create(parent, id, pos, size, style, name); -} - -void CPImageCtrl::Init(CPEditorPanel* parent) -{ - DEBUG_TRACE("*************"); - m_editPanel = parent; - selectedPointNr = 0; - editState = NO_IMAGE; - scaleFactor = 0; - fitToWindow = false; - m_showSearchArea = false; - m_searchRectWidth = 0; - m_showTemplateArea = false; - m_templateRectWidth = 0; - m_tempZoom = false; - m_savedScale = 1; - m_editPanel = parent; - m_imgRotation = ROT0; - wxString filename; + #if defined(__WXMSW__) wxString cursorPath = huginApp::Get()->GetXRCPath() + wxT("/data/cursor_cp_pick.cur"); m_CPSelectCursor = new wxCursor(cursorPath, wxBITMAP_TYPE_CUR); Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.h =================================================================== --- hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.h 2008-01-23 11:47:16 UTC (rev 2688) @@ -102,22 +102,21 @@ public: /** ctor. */ + CPImageCtrl(CPEditorPanel* parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHSCROLL | wxVSCROLL, + const wxString& name=wxT("CPImageCtrl")); - CPImageCtrl(); - CPImageCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = wxT("scrolledWindow")); + CPImageCtrl() + : scaleFactor(1),fitToWindow(false) + { } - /** dtor. */ ~CPImageCtrl(); - /** Delayed creation */ - bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name); - - /** proper initialisation */ - void Init(CPEditorPanel* parent); - /** image rotation. * Useful to display images depending on their roll setting. * rotation is clockwise Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-23 11:47:16 UTC (rev 2688) @@ -203,7 +203,6 @@ dc.DrawText(version, bitmap.GetWidth() - tw - 5, bitmap.GetHeight() - th - 5); } - /* #ifdef __unix__ splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_NO_TIMEOUT, @@ -217,12 +216,11 @@ wxDefaultSize, wxSIMPLE_BORDER); #endif - */ } else { wxLogFatalError(_("Fatal installation error\nThe file data/splash.png was not found at:") + huginApp::Get()->GetXRCPath()); abort(); } - //splash->Refresh(); + splash->Refresh(); wxYield(); // save our pointer Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 11:47:16 UTC (rev 2688) @@ -623,9 +623,11 @@ } #elif defined __WXMAC__ // HuginStitchProject installed in INSTALL_OSX_BUNDLE_DIR - wxFileName hugin_stitch_project_app(wxT(INSTALL_OSX_BUNDLE_DIR), wxEmptyString); - hugin_stitch_project_app.AppendDir(wxT("HuginStitchProject.app")); - wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(hugin_stitch_project_app.GetFullPath()); + wxString hugin_stitch_project(wxT(INSTALL_OSX_BUNDLE_DIR)); + hugin_stitch_project.append(wxT("HuginStitchProject.app")); + CFStringRef bundlePath = MacCreateCFStringWithWxString(hugin_stitch_project); + wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(bundlePath); + CFRelease(bundlePath); #else wxString hugin_stitch_project = wxT("hugin_stitch_project"); #endif Modified: hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc 2008-01-23 06:41:35 UTC (rev 2687) +++ hugin/trunk/src/hugin1/hugin/xrc/cp_editor_panel.xrc 2008-01-23 11:47:16 UTC (rev 2688) @@ -39,9 +39,7 @@ <border>3</border> </object> <object class="sizeritem"> - <object class="wxScrolledWindow" name="cp_editor_left_img"> - <style>wxTAB_TRAVERSAL</style> - </object> + <object class="unknown" name="cp_editor_left_img"/> <option>1</option> <flag>wxALL|wxEXPAND</flag> <border>3</border> @@ -76,7 +74,7 @@ <border>3</border> </object> <object class="sizeritem"> - <object class="wxScrolledWindow" name="cp_editor_right_img"/> + <object class="unknown" name="cp_editor_right_img"/> <option>1</option> <flag>wxALL|wxEXPAND</flag> <border>3</border> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-23 11:49:02
|
Revision: 2689 http://hugin.svn.sourceforge.net/hugin/?rev=2689&view=rev Author: dangelo Date: 2008-01-23 03:49:01 -0800 (Wed, 23 Jan 2008) Log Message: ----------- applied only '[ 1876976 ] Fixes for non-self-contained Mac app to compile' by Wim Lewis Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.cpp hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/PanoPanel.cpp Modified: hugin/trunk/src/hugin1/base_wx/platform.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/base_wx/platform.cpp 2008-01-23 11:49:01 UTC (rev 2689) @@ -41,14 +41,18 @@ } -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath) +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath) { wxString theResult = wxT(""); - CFURLRef bundleURL = CFURLCreateWithString(NULL,bundlePath,NULL); + CFStringRef cfBundlePath = MacCreateCFStringWithWxString(bundlePath); + + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(NULL, cfBundlePath, kCFURLPOSIXPathStyle, TRUE); + CFRelease (cfBundlePath); + if(bundleURL == NULL) { - DEBUG_ERROR("Mac: CFURL from string failed." ); + DEBUG_ERROR("Mac: CFURL from string (" << bundlePath << ") failed." ); return theResult; } @@ -97,7 +101,7 @@ #if defined MAC_SELF_CONTAINED_BUNDLE -wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename) +wxString MacGetPathToBundledAppMainExecutableFile(const wxString& unusedFilename) { wxString theResult = wxT(""); @@ -240,6 +244,7 @@ return theResult; } +#endif // MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToUserDomainTempDir() { @@ -263,6 +268,4 @@ return tmpDirPath; } -#endif // MAC_SELF_CONTAINED_BUNDLE - -#endif // __WXMAC__ \ No newline at end of file +#endif // __WXMAC__ Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-01-23 11:49:01 UTC (rev 2689) @@ -36,17 +36,19 @@ #include <wx/mac/private.h> CFStringRef MacCreateCFStringWithWxString(const wxString& string); -wxString MacGetPathToMainExecutableFileOfBundle(CFStringRef bundlePath); +wxString MacGetPathToMainExecutableFileOfBundle(const wxString& bundlePath); + #if defined MAC_SELF_CONTAINED_BUNDLE wxString MacGetPathToBundledResourceFile(CFStringRef filename); wxString MacGetPathToBundledExecutableFile(CFStringRef filename); wxString MacGetPathToBundledAppMainExecutableFile(CFStringRef filename); -wxString MacGetPathToUserDomainTempDir(); #endif // MAC_SELF_CONTAINED_BUNDLE +wxString MacGetPathToUserDomainTempDir(); + #endif //__WXMAC__ #endif Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 11:47:16 UTC (rev 2688) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-23 11:49:01 UTC (rev 2689) @@ -623,11 +623,9 @@ } #elif defined __WXMAC__ // HuginStitchProject installed in INSTALL_OSX_BUNDLE_DIR - wxString hugin_stitch_project(wxT(INSTALL_OSX_BUNDLE_DIR)); - hugin_stitch_project.append(wxT("HuginStitchProject.app")); - CFStringRef bundlePath = MacCreateCFStringWithWxString(hugin_stitch_project); - wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(bundlePath); - CFRelease(bundlePath); + wxFileName hugin_stitch_project_app(wxT(INSTALL_OSX_BUNDLE_DIR), wxEmptyString); + hugin_stitch_project_app.AppendDir(wxT("HuginStitchProject.app")); + wxString hugin_stitch_project = MacGetPathToMainExecutableFileOfBundle(hugin_stitch_project_app.GetFullPath()); #else wxString hugin_stitch_project = wxT("hugin_stitch_project"); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <po...@us...> - 2008-01-26 22:06:49
|
Revision: 2701 http://hugin.svn.sourceforge.net/hugin/?rev=2701&view=rev Author: pooh22 Date: 2008-01-26 14:06:47 -0800 (Sat, 26 Jan 2008) Log Message: ----------- fixes for hugin1 warnings with gcc 4.2 these can turn into errors when compiled with the latest libpano13, which has the same type of warning fixes (casting errors from char* to const char*) Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/PTWXDlg.cpp hugin/trunk/src/hugin1/hugin/LensPanel.cpp Modified: hugin/trunk/src/hugin1/base_wx/PTWXDlg.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/PTWXDlg.cpp 2008-01-26 22:05:45 UTC (rev 2700) +++ hugin/trunk/src/hugin1/base_wx/PTWXDlg.cpp 2008-01-26 22:06:47 UTC (rev 2701) @@ -53,7 +53,7 @@ #else -static void PTPrintErrorWX(char* fmt, va_list ap) +static void PTPrintErrorWX(const char* fmt, va_list ap) { char message[257]; Modified: hugin/trunk/src/hugin1/hugin/LensPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-26 22:05:45 UTC (rev 2700) +++ hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-26 22:06:47 UTC (rev 2701) @@ -877,7 +877,7 @@ cfg.Write(wxT("Lens/crop"), lens.getCropFactor()); // loop to save lens variables - char ** varname = Lens::variableNames; + const char ** varname = Lens::variableNames; while (*varname) { wxString key(wxT("Lens/")); key.append(wxString(*varname, *wxConvCurrent)); @@ -1024,7 +1024,7 @@ DEBUG_DEBUG("read lens hfov: " << d); // loop to load lens variables - char ** varname = Lens::variableNames; + const char ** varname = Lens::variableNames; while (*varname) { wxString key(wxT("Lens/")); key.append(wxString(*varname, *wxConvCurrent)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-01-28 10:43:36
|
Revision: 2715 http://hugin.svn.sourceforge.net/hugin/?rev=2715&view=rev Author: dangelo Date: 2008-01-28 02:31:38 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Code cleanup: Remove old code referring to wxWindows 2.4 Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/CPEditorPanel.h hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp hugin/trunk/src/hugin1/hugin/ImagesPanel.h hugin/trunk/src/hugin1/hugin/LensPanel.cpp hugin/trunk/src/hugin1/hugin/LensPanel.h hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp hugin/trunk/src/hugin1/hugin/OptimizePanel.h hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.h hugin/trunk/src/hugin1/hugin/PanoPanel.cpp hugin/trunk/src/hugin1/hugin/PanoPanel.h hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp hugin/trunk/src/hugin1/panoinc_WX.h Modified: hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -151,18 +151,13 @@ m_druid->Update(m_pano); */ -#ifdef USE_WX253 m_panel = XRCCTRL(*this, "ass_control_panel", wxScrolledWindow); DEBUG_ASSERT(m_panel); m_panel->FitInside(); m_panel->SetScrollRate(10, 10); -#endif - -#ifdef USE_WX253 SetAutoLayout(false); -#endif m_degDigits = 2; @@ -184,12 +179,9 @@ void AssistantPanel::RestoreLayout() { DEBUG_TRACE(""); -#ifdef USE_WX253 int winWidth, winHeight; GetClientSize(&winWidth, &winHeight); DEBUG_INFO( "window size: " << winWidth <<"x"<< winHeight); -#endif - } // We need to override the default handling of size events because the Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -317,9 +317,8 @@ { DEBUG_TRACE("dtor"); -#ifdef USE_WX253 int sashPos; - sashPos = m_cp_splitter->GetSashPosition(); + sashPos = m_cp_splitter->GetSashPosition(); #ifdef __WXMSW__ // Work around a bug in GetSashPosition/SetSashPosition on wxMSW when the // splitter is housed in a wxNotebook. We adjust the sash position by the @@ -333,11 +332,10 @@ #endif - DEBUG_INFO("CP Editor panel adjusted sash pos: " << sashPos); - - wxConfigBase::Get()->Write(wxT("/CPEditorPanel/sashPos"), sashPos); -#endif - + DEBUG_INFO("CP Editor panel adjusted sash pos: " << sashPos); + + wxConfigBase::Get()->Write(wxT("/CPEditorPanel/sashPos"), sashPos); + m_x1Text->PopEventHandler(true); m_y1Text->PopEventHandler(true); m_x2Text->PopEventHandler(true); @@ -360,7 +358,6 @@ void CPEditorPanel::RestoreLayout() { DEBUG_TRACE(""); -#ifdef USE_WX253 DEBUG_ASSERT(m_cp_splitter_img); // reset splitter between the two images @@ -373,9 +370,7 @@ } leftWindow->Show(true); rightWindow->Show(true); -#ifdef USE_WX26x m_cp_splitter_img->SetSashGravity(0.5); -#endif m_cp_splitter_img->SplitVertically( leftWindow, rightWindow ); m_cp_splitter_img->SetMinimumPaneSize(20); @@ -389,13 +384,11 @@ } leftWindow->Show(true); rightWindow->Show(true); -#ifdef USE_WX26x #ifdef __WXGTK__ m_cp_splitter->SetSashGravity(0.75); #else m_cp_splitter->SetSashGravity(1); #endif -#endif m_cp_splitter->SetMinimumPaneSize(20); m_cp_splitter->SplitHorizontally( leftWindow, rightWindow ); #ifdef __WXMSW__ @@ -407,7 +400,6 @@ int sashPos = wxConfigBase::Get()->Read(wxT("/CPEditorPanel/sashPos"), splitsize.GetHeight()-200); #endif m_cp_splitter->SetSashPosition(sashPos); -#endif } void CPEditorPanel::setLeftImage(unsigned int imgNr) @@ -1345,10 +1337,8 @@ t1->SetSizeHints(0,0,0,0); // to make the window visible... // t1->SetBackgroundColour(wxColour(255,0,0)); -#ifdef USE_WX253 t1->SetMaxSize(sz); t1->SetMinSize(sz); -#endif wxWindow* t2= new wxWindow(m_rightTabs,-1,wxPoint(0,0),wxSize(0,0)); if (!m_rightTabs->AddPage(t2, wxString::Format(wxT("%d"),i))){ @@ -1358,11 +1348,9 @@ t2->SetSize(0,0); t2->SetSizeHints(0,0,0,0); // t2->SetBackgroundColour(wxColour(255,0,0)); -#ifdef USE_WX253 t2->SetMaxSize(sz); t2->SetMinSize(sz); #endif -#endif } } } Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -280,11 +280,9 @@ wxCheckBox *m_autoAddCB; wxCheckBox *m_fineTuneCB; wxCheckBox *m_estimateCB; -#ifdef USE_WX253 wxScrolledWindow *m_cp_ctrls; wxSplitterWindow *m_cp_splitter; wxSplitterWindow *m_cp_splitter_img; -#endif // my data PT::Panorama * m_pano; Modified: hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/CPImageCtrl.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -226,11 +226,7 @@ void CPImageCtrl::OnDraw(wxDC & dc) { -#ifdef USE_WX253 wxSize vSize = GetClientSize(); -#else - wxSize vSize = GetVirtualSize(); -#endif // draw image (FIXME, redraw only visible regions.) if (editState != NO_IMAGE) { //clear the blank rectangle to the left of the image @@ -805,7 +801,7 @@ vector<wxRect>::const_iterator itr; if (m_labelPos.size() == points.size() && m_labelPos.size() > 0) { for(int i=m_labelPos.size()-1; i >= 0; i--) { -#ifdef USE_WX28x +#if wxCHECK_VERSION(2,8,0) if (m_labelPos[i].Inside(mousePos)) { #else if (m_labelPos[i].Contains(mousePos)) { Modified: hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -60,9 +60,7 @@ EVT_SIZE ( ImagesPanel::OnSize ) // EVT_MOUSE_EVENTS ( ImagesPanel::OnMouse ) // EVT_MOTION ( ImagesPanel::ChangePreview ) -#ifdef USE_WX253 EVT_SPLITTER_SASH_POS_CHANGED(XRCID("image_panel_splitter"), ImagesPanel::OnPositionChanged) -#endif EVT_LIST_ITEM_SELECTED( XRCID("images_list_unknown"), ImagesPanel::ListSelectionChanged ) EVT_LIST_ITEM_DESELECTED( XRCID("images_list_unknown"), @@ -110,7 +108,6 @@ m_moveDownButton = XRCCTRL(*this, "images_move_image_down", wxButton); DEBUG_ASSERT(m_moveDownButton); -#ifdef USE_WX253 m_img_ctrls = XRCCTRL(*this, "image_control_panel", wxScrolledWindow); DEBUG_ASSERT(m_img_ctrls); m_img_splitter = XRCCTRL(*this, "image_panel_splitter", wxSplitterWindow); @@ -118,11 +115,8 @@ m_img_ctrls->FitInside(); m_img_ctrls->SetScrollRate(10, 10); -#ifdef USE_WX26x m_img_splitter->SetSashGravity(1); -#endif m_img_splitter->SetMinimumPaneSize(200); -#endif // Image Preview m_smallImgCtrl = XRCCTRL(*this, "images_selected_image", wxStaticBitmap); @@ -145,10 +139,8 @@ pano->addObserver(this); DEBUG_TRACE("end"); -#ifdef USE_WX253 SetAutoLayout(false); -#endif - + m_degDigits = wxConfigBase::Get()->Read(wxT("/General/DegreeFractionalDigitsEdit"),3); } @@ -157,12 +149,10 @@ { DEBUG_TRACE("dtor"); -#ifdef USE_WX253 int sashPos; sashPos = m_img_splitter->GetSashPosition(); DEBUG_INFO("Image panel sash pos: " << sashPos); wxConfigBase::Get()->Write(wxT("/ImageFrame/sashPos"), sashPos); -#endif XRCCTRL(*this, "images_text_yaw", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "images_text_roll", wxTextCtrl)->PopEventHandler(true); @@ -178,13 +168,11 @@ void ImagesPanel::RestoreLayout() { DEBUG_TRACE(""); -#ifdef USE_WX253 int winWidth, winHeight; GetClientSize(&winWidth, &winHeight); int sP = wxConfigBase::Get()->Read(wxT("/ImageFrame/sashPos"),winHeight/2); m_img_splitter->SetSashPosition(sP); DEBUG_INFO( "image panel: " << winWidth <<"x"<< winHeight << " sash pos: " << sP); -#endif } @@ -196,7 +184,6 @@ void ImagesPanel::OnSize( wxSizeEvent & e ) { -#ifdef USE_WX253 int winWidth, winHeight; GetClientSize(&winWidth, &winHeight); XRCCTRL(*this, "images_panel", wxPanel)->SetSize (winWidth, winHeight); @@ -205,11 +192,6 @@ m_img_splitter->GetWindow2()->GetSize(&winWidth, &winHeight); DEBUG_INFO( "image controls: " << winWidth <<"x"<< winHeight ); m_img_ctrls->SetSize(winWidth, winHeight); -#else - wxSize new_size = GetSize(); - XRCCTRL(*this, "images_panel", wxPanel)->SetSize ( new_size ); - DEBUG_INFO( "image panel: " << new_size.GetWidth() <<"x"<< new_size.GetHeight() ); -#endif UpdatePreviewImage(); if (m_restoreLayoutOnResize) { @@ -220,13 +202,11 @@ e.Skip(); } -#ifdef USE_WX253 void ImagesPanel::OnPositionChanged(wxSplitterEvent& e) { DEBUG_INFO("Sash Position now:" << e.GetSashPosition() << " or: " << m_img_splitter->GetSashPosition()); e.Skip(); } -#endif void ImagesPanel::panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & _imgNr) { @@ -514,7 +494,6 @@ double iRatio = img.GetWidth() / (double) img.GetHeight(); wxSize sz; -#ifdef USE_WX253 // estimate image size sz = m_img_splitter->GetWindow2()->GetSize(); int maxw = sz.GetWidth() - 40; @@ -522,13 +501,6 @@ sz.SetHeight(std::max(maxh, 20)); sz.SetWidth(std::max(maxw, 20)); double sRatio = (double)sz.GetWidth() / sz.GetHeight(); -#else - wxPanel * imgctrlpanel = XRCCTRL(*this, "images_selected_image_panel", wxPanel); - DEBUG_ASSERT(imgctrlpanel); - sz = imgctrlpanel->GetSize(); - DEBUG_DEBUG("imgctrl panel size: " << sz.x << "," << sz.y); - double sRatio = (double)sz.GetWidth() / sz.GetHeight(); -#endif if (iRatio > sRatio) { // image is wider than screen, display landscape sz.SetHeight((int) (sz.GetWidth() / iRatio)); Modified: hugin/trunk/src/hugin1/hugin/ImagesPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesPanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/ImagesPanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -83,9 +83,7 @@ // event handlers void OnAddImages(wxCommandEvent & e); void OnRemoveImages(wxCommandEvent & e); -#ifdef USE_WX253 - void OnPositionChanged(wxSplitterEvent& event); -#endif + void OnPositionChanged(wxSplitterEvent& event); // Here we select the preview image @@ -149,14 +147,12 @@ wxButton * m_matchingButton; wxButton * m_removeCPButton; - -#ifdef USE_WX253 - wxScrolledWindow *m_img_ctrls; - wxSplitterWindow *m_img_splitter; -#endif - + + wxScrolledWindow *m_img_ctrls; + wxSplitterWindow *m_img_splitter; + int m_degDigits; - + bool m_restoreLayoutOnResize; DECLARE_EVENT_TABLE() Modified: hugin/trunk/src/hugin1/hugin/LensPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -170,7 +170,6 @@ m_pixelDigits = wxConfigBase::Get()->Read(wxT("/General/PixelFractionalDigitsEdit"),2); m_distDigitsEdit = wxConfigBase::Get()->Read(wxT("/General/DistortionFractionalDigitsEdit"),5); -#ifdef USE_WX253 m_lens_ctrls = XRCCTRL(*this, "lens_control_panel", wxScrolledWindow); DEBUG_ASSERT(m_lens_ctrls); m_lens_splitter = XRCCTRL(*this, "lens_panel_splitter", wxSplitterWindow); @@ -178,12 +177,9 @@ m_lens_ctrls->FitInside(); m_lens_ctrls->SetScrollRate(10, 10); -#ifdef USE_WX26x // resize only the images list, and keep the control parameters at the same size m_lens_splitter->SetSashGravity(1); -#endif m_lens_splitter->SetMinimumPaneSize(200); -#endif // dummy to disable controls wxListEvent ev; @@ -196,12 +192,10 @@ { DEBUG_TRACE("dtor"); -#ifdef USE_WX253 int sashPos; sashPos = m_lens_splitter->GetSashPosition(); DEBUG_INFO("Lens panel sash pos: " << sashPos); wxConfigBase::Get()->Write(wxT("/LensFrame/sashPos"), sashPos); -#endif XRCCTRL(*this, "lens_val_v", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "lens_val_focalLength", wxTextCtrl)->PopEventHandler(true); @@ -234,14 +228,12 @@ void LensPanel::RestoreLayout() { - DEBUG_TRACE(""); -#ifdef USE_WX253 + DEBUG_TRACE(""); int winWidth, winHeight; GetClientSize(&winWidth, &winHeight); int sP = wxConfigBase::Get()->Read(wxT("/LensFrame/sashPos"),winHeight/2); m_lens_splitter->SetSashPosition(sP); DEBUG_INFO( "lens panel: " << winWidth <<"x"<< winHeight << " sash pos: " << sP); -#endif } // We need to override the default handling of size events because the @@ -251,7 +243,6 @@ void LensPanel::OnSize( wxSizeEvent & e ) { -#ifdef USE_WX253 int winWidth, winHeight; GetClientSize(&winWidth, &winHeight); XRCCTRL(*this, "lens_panel", wxPanel)->SetSize (winWidth, winHeight); @@ -260,12 +251,7 @@ m_lens_splitter->GetWindow2()->GetSize(&winWidth, &winHeight); DEBUG_INFO( "lens controls: " << winWidth <<"x"<< winHeight ); m_lens_ctrls->SetSize(winWidth, winHeight); -#else - wxSize new_size = GetSize(); - XRCCTRL(*this, "lens_panel", wxPanel)->SetSize ( new_size ); - DEBUG_INFO( "" << new_size.GetWidth() <<"x"<< new_size.GetHeight() ); -#endif - + if (m_restoreLayoutOnResize) { m_restoreLayoutOnResize = false; RestoreLayout(); Modified: hugin/trunk/src/hugin1/hugin/LensPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/LensPanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -134,11 +134,9 @@ int m_distDigitsEdit; int m_pixelDigits; -#ifdef USE_WX253 wxScrolledWindow *m_lens_ctrls; - wxSplitterWindow *m_lens_splitter; -#endif - + wxSplitterWindow *m_lens_splitter; + bool m_restoreLayoutOnResize; static const char *m_varNames[]; Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -362,10 +362,8 @@ pano.addObserver(this); // Set sizing characteristics -#ifdef USE_WX253 // a minimum nice looking size; smaller than this would clutter the layout. SetSizeHints(900, 675); //set minumum size -#endif #if 0 bool maximized = config->Read(wxT("/MainFrame/maximized"), 0l) != 0; Modified: hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -107,18 +107,16 @@ m_mode_cb = XRCCTRL(*this, "optimize_panel_mode", wxChoice); DEBUG_ASSERT(m_mode_cb); -#ifdef USE_WX253 m_opt_ctrls = XRCCTRL(*this, "optimize_controls_panel", wxScrolledWindow); DEBUG_ASSERT(m_opt_ctrls); m_opt_ctrls->SetSizeHints(20, 20); m_opt_ctrls->FitInside(); m_opt_ctrls->SetScrollRate(10, 10); -#endif - // disable the optimize panel controls by default - XRCCTRL(*this, "optimize_frame_optimize", wxButton)->Disable(); - m_mode_cb->Disable(); - m_edit_cb->Disable(); + // disable the optimize panel controls by default + XRCCTRL(*this, "optimize_frame_optimize", wxButton)->Disable(); + m_mode_cb->Disable(); + m_edit_cb->Disable(); return true; } Modified: hugin/trunk/src/hugin1/hugin/OptimizePanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/OptimizePanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -105,14 +105,12 @@ wxCheckBox * m_edit_cb; wxChoice * m_mode_cb; - -#ifdef USE_WX253 - wxScrolledWindow *m_opt_ctrls; -#endif - + + wxScrolledWindow *m_opt_ctrls; + PT::Panorama * m_pano; private: - + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(OptimizePanel) }; Modified: hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -83,11 +83,9 @@ wxCheckListBox * m_resp_list; wxChoice * m_mode_cb; - -#ifdef USE_WX253 - wxScrolledWindow *m_opt_ctrls; -#endif - + + wxScrolledWindow *m_opt_ctrls; + PT::Panorama * m_pano; private: Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -197,14 +197,12 @@ DEBUG_ASSERT(m_FileFormatChoice); m_HDRFileFormatChoice = XRCCTRL(*this, "pano_choice_hdr_file_format", wxChoice); DEBUG_ASSERT(m_HDRFileFormatChoice); - -#ifdef USE_WX253 + m_pano_ctrls = XRCCTRL(*this, "pano_controls_panel", wxScrolledWindow); DEBUG_ASSERT(m_pano_ctrls); m_pano_ctrls->SetSizeHints(20, 20); m_pano_ctrls->FitInside(); m_pano_ctrls->SetScrollRate(10, 10); -#endif // observe the panorama pano->addObserver (this); Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -163,9 +163,7 @@ wxChoice * m_FileFormatChoice; wxChoice * m_HDRFileFormatChoice; -#ifdef USE_WX253 wxScrolledWindow *m_pano_ctrls; -#endif DECLARE_EVENT_TABLE() }; Modified: hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-01-28 10:31:38 UTC (rev 2715) @@ -100,11 +100,7 @@ EVT_SCROLL_THUMBTRACK(PreviewFrame::OnChangeFOV) END_EVENT_TABLE() -#ifdef USE_WX253 #define PF_STYLE (wxMAXIMIZE_BOX | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN) -#else -#define PF_STYLE (wxMAXIMIZE_BOX | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION) -#endif PreviewFrame::PreviewFrame(wxFrame * frame, PT::Panorama &pano) : wxFrame(frame,-1, _("Panorama preview"), wxDefaultPosition, wxDefaultSize, @@ -519,11 +515,7 @@ // remove items for nonexisting images for (int i=nrButtons-1; i>=(int)nrImages; i--) { -#ifdef USE_WX253 m_ButtonSizer->Detach(m_ToggleButtons[i]); -#else - m_ButtonSizer->Remove(m_ToggleButtons[i]); -#endif delete m_ToggleButtons[i]; m_ToggleButtons.pop_back(); dirty = true; Modified: hugin/trunk/src/hugin1/panoinc_WX.h =================================================================== --- hugin/trunk/src/hugin1/panoinc_WX.h 2008-01-28 10:22:13 UTC (rev 2714) +++ hugin/trunk/src/hugin1/panoinc_WX.h 2008-01-28 10:31:38 UTC (rev 2715) @@ -67,20 +67,9 @@ #include <wx/filesys.h> #include <wx/fs_zip.h> -#if wxCHECK_VERSION(2,5,3) #include <wx/numdlg.h> #include <wx/imaglist.h> -// Allow features of wx 2.5.3 and above to be used on GTK -#ifdef __WXGTK__ -#define USE_WX253 -#endif -#endif -#if wxCHECK_VERSION(2,6,0) -#define USE_WX253 -#define USE_WX26x -#endif - // remove stupid #defines from the evil windows.h #ifdef __WXMSW__ //#include <wx/msw/winundef.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-02-03 20:32:54
|
Revision: 2779 http://hugin.svn.sourceforge.net/hugin/?rev=2779&view=rev Author: dangelo Date: 2008-02-03 12:32:52 -0800 (Sun, 03 Feb 2008) Log Message: ----------- hugin_stitch_project: Keep window open after error, modularized code. General: better display of command line progress (less wxTextCtrl updates, no more flicker) Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/CMakeLists.txt hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Added Paths: ----------- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp hugin/trunk/src/hugin1/base_wx/RunStitchPanel.h Modified: hugin/trunk/src/hugin1/base_wx/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/base_wx/CMakeLists.txt 2008-02-03 20:28:53 UTC (rev 2778) +++ hugin/trunk/src/hugin1/base_wx/CMakeLists.txt 2008-02-03 20:32:52 UTC (rev 2779) @@ -1,6 +1,7 @@ SET(HUGIN_WX_BASE_SRC ImageCache.cpp MyProgressDialog.cpp Plot2D.cpp PTWXDlg.cpp - huginConfig.cpp MyExternalCmdExecDialog.cpp platform.cpp) + huginConfig.cpp MyExternalCmdExecDialog.cpp platform.cpp + RunStitchPanel.cpp ) IF ($HUGIN_SHARED_LIBS) add_library(huginbasewx SHARED ${HUGIN_WX_BASE_SRC}) Modified: hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2008-02-03 20:28:53 UTC (rev 2778) +++ hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.cpp 2008-02-03 20:32:52 UTC (rev 2779) @@ -42,14 +42,6 @@ #include "MyExternalCmdExecDialog.h" #include "hugin/config_defaults.h" -#define LINE_IO 1 - -//Mac TextCtrl too slow with a lot of output -#if defined(__WXMAC__) && DEBUG -#define HUGIN_EXEC_AVOID_STREAM_GETCHAR -#endif - - // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -66,11 +58,9 @@ // ---------------------------------------------------------------------------- -BEGIN_EVENT_TABLE(MyExecDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, MyExecDialog::OnCancel) +BEGIN_EVENT_TABLE(MyExecPanel, wxPanel) // EVT_IDLE(MyExecDialog::OnIdle) - EVT_TIMER(wxID_ANY, MyExecDialog::OnTimer) -// EVT_END_PROCESS(wxID_ANY, MyFrame::OnProcessTerm) + EVT_TIMER(wxID_ANY, MyExecPanel::OnTimer) END_EVENT_TABLE() @@ -80,8 +70,8 @@ // frame constructor -MyExecDialog::MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size) - : wxDialog(parent, wxID_ANY, title, pos, size, wxRESIZE_BORDER | wxCAPTION | wxCLOSE_BOX | wxSYSTEM_MENU), +MyExecPanel::MyExecPanel(wxWindow * parent) + : wxPanel(parent), m_timerIdleWakeUp(this) { m_pidLast = 0; @@ -116,15 +106,15 @@ topsizer->Add(m_textctrl, 1, wxEXPAND | wxALL, 10); #endif - topsizer->Add( new wxButton(this, wxID_CANCEL, _("Cancel")), - 0, wxALL | wxALIGN_RIGHT, 10); +// topsizer->Add( new wxButton(this, wxID_CANCEL, _("Cancel")), +// 0, wxALL | wxALIGN_RIGHT, 10); SetSizer( topsizer ); // topsizer->SetSizeHints( this ); } -void MyExecDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +void MyExecPanel::KillProcess() { if (m_pidLast) { DEBUG_DEBUG("Killing process " << m_pidLast << " with sigterm"); @@ -139,14 +129,14 @@ _T("unspecified error"), }; - wxLogError(_("Failed to kill process %ld with sigterm: %s"), - m_pidLast, errorText[rc]); + wxLogError(_("Failed to kill process %ld with sigterm, error %d: %s"), + m_pidLast, rc, errorText[rc]); } } } -int MyExecDialog::ExecWithRedirect(wxString cmd) +int MyExecPanel::ExecWithRedirect(wxString cmd) { if ( !cmd ) return -1; @@ -164,18 +154,17 @@ AddAsyncProcess(process); } m_cmdLast = cmd; - - return ShowModal(); + return 0; } -void MyExecDialog::AddAsyncProcess(MyPipedProcess *process) +void MyExecPanel::AddAsyncProcess(MyPipedProcess *process) { if ( m_running.IsEmpty() ) { // we want to start getting the timer events to ensure that a // steady stream of idle events comes in -- otherwise we // wouldn't be able to poll the child process input - m_timerIdleWakeUp.Start(500); + m_timerIdleWakeUp.Start(200); } //else: the timer is already running @@ -183,7 +172,7 @@ } -void MyExecDialog::RemoveAsyncProcess(MyPipedProcess *process) +void MyExecPanel::RemoveAsyncProcess(MyPipedProcess *process) { m_running.Remove(process); @@ -199,9 +188,7 @@ // various helpers // ---------------------------------------------------------------------------- - - -void MyExecDialog::AddToOutput(wxInputStream & s) +void MyExecPanel::AddToOutput(wxInputStream & s) { DEBUG_TRACE(""); wxTextInputStream ts(s); @@ -225,7 +212,7 @@ m_lbox->SetString(m_lbox->GetCount()-1, m_currLine); #else - + #ifdef HUGIN_EXEC_AVOID_STREAM_GETCHAR while(s.CanRead()) { wxString buffer = ts.ReadLine() + wxT("\n"); @@ -243,15 +230,16 @@ } return; #endif - bool lastCR= false; + wxString currLine = m_textctrl->GetRange(m_lastLineStart, m_textctrl->GetLastPosition()); while(s.CanRead()) { wxChar c = ts.GetChar(); if (c == '\b') { lastCR=false; // backspace - if (m_textctrl->GetLastPosition() != m_lastLineStart) { - m_textctrl->Remove(m_textctrl->GetLastPosition(), m_textctrl->GetLastPosition()+1); + if (currLine.size() > 0) { + if (currLine.Last() != wxChar('\n') ) + currLine.Trim(); } /* if (m_output.Last() != '\n') { @@ -259,65 +247,47 @@ }*/ } else if (c == 0x0d) { lastCR=true; -#ifdef __WXMSW__ -#else +#ifndef __WXMSW__ // back to start of line - m_textctrl->Remove(m_lastLineStart, m_textctrl->GetLastPosition()+1); + if (currLine.Last() != wxChar('\n') ) { + currLine = currLine.BeforeLast('\n'); + if(currLine.size() > 0) { + currLine.Append('\n'); + } + } #endif - /* - if (m_output.Last() != '\n') { - m_output = m_output.BeforeLast('\n') + wxT("\n"); - } - */ } else if (c == '\n') { - (*m_textctrl) << c; - m_lastLineStart = m_textctrl->GetLastPosition(); + currLine.Append(c); lastCR=false; } else { #ifdef __WXMSW__ if (lastCR) { // need to move to front? - m_textctrl->Remove(m_lastLineStart, m_textctrl->GetLastPosition()+1); + currLine = currLine.beforeLast('\n'); + if(currLine.size() > 0) { + currLine.Append('\n'); + } } #endif - (*m_textctrl) << c; + currLine.Append(c); lastCR=false; } } -#endif -} - -void MyExecDialog::AddToOutput(wxString str) -{ -#if HUGIN_EXEC_LISTBOX - m_lbox->Append(str); -#else - for (size_t i = 0; i < str.length(); i++) { - wxChar c = str[i]; - if (c == '\b') { - // backspace - if (m_output.Last() != '\n') { - m_output.RemoveLast(); - } - } else if (c == 0x0d) { - // back to start of line - if (m_output.Last() != '\n') { - m_output = m_output.BeforeLast('\n') + wxT("\n"); - } - } else { - m_output.Append(c); - } + m_textctrl->Replace(m_lastLineStart, m_textctrl->GetLastPosition(), currLine); + size_t lret = currLine.find_last_of(wxChar('\n')); + if (lret > 0 && lret+1 < currLine.size()) { + m_lastLineStart += lret+1; } #endif } -void MyExecDialog::OnTimer(wxTimerEvent& WXUNUSED(event)) +void MyExecPanel::OnTimer(wxTimerEvent& WXUNUSED(event)) { // wxWakeUpIdle(); #ifndef HUGIN_EXEC_LISTBOX - m_textctrl->Freeze(); +// m_textctrl->Freeze(); #endif bool changed=false; size_t count = m_running.GetCount(); @@ -339,29 +309,31 @@ #else if (changed) { DEBUG_DEBUG("refreshing textctrl"); - m_textctrl->ShowPosition(m_textctrl->GetLastPosition()); - m_textctrl->SetInsertionPoint(m_textctrl->GetLastPosition()-1); +#ifndef LINE_IO +// m_textctrl->ShowPosition(m_textctrl->GetLastPosition()); +// m_textctrl->SetInsertionPoint(m_textctrl->GetLastPosition()-1); +#endif } - m_textctrl->Thaw(); +// m_textctrl->Thaw(); #endif } -void MyExecDialog::OnProcessTerminated(MyPipedProcess *process, int pid, int status) +void MyExecPanel::OnProcessTerminated(MyPipedProcess *process, int pid, int status) { + DEBUG_TRACE(""); // show the rest of the output - wxString my_stderr, my_stdout; - while ( process->HasInput(my_stdout, my_stderr) ) { - if (my_stdout.length() > 0) AddToOutput(my_stdout); - if (my_stderr.length() > 0) AddToOutput(my_stderr); - my_stdout.clear(); - my_stderr.clear(); - } + AddToOutput(*(process->GetInputStream())); + AddToOutput(*(process->GetErrorStream())); RemoveAsyncProcess(process); - if (status != 0) { - wxMessageBox(_("Error while executing process"),_("Error")); + // send termination to other parent + if (this->GetParent()) { + wxProcessEvent event( wxID_ANY, pid, status); + event.SetEventObject( this ); + DEBUG_TRACE("Sending wxProcess event"); + this->GetParent()->ProcessEvent( event ); } - EndModal(status); + } @@ -371,6 +343,8 @@ void MyProcess::OnTerminate(int pid, int status) { + DEBUG_TRACE(""); + // wxLogStatus(m_parent, _T("Process %u ('%s') terminated with exit code %d."), // pid, m_cmd.c_str(), status); @@ -381,7 +355,7 @@ // ---------------------------------------------------------------------------- // MyPipedProcess // ---------------------------------------------------------------------------- - +/* bool MyPipedProcess::HasInput(wxString & my_stdout, wxString & my_stderr) { bool hasInput = false; @@ -416,106 +390,74 @@ return hasInput; } +*/ void MyPipedProcess::OnTerminate(int pid, int status) { - + DEBUG_TRACE(""); m_parent->OnProcessTerminated(this, pid, status); MyProcess::OnTerminate(pid, status); } +// ============================================================================== +// MyExecDialog -int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent, - wxString title) +BEGIN_EVENT_TABLE(MyExecDialog, wxDialog) + EVT_BUTTON(wxID_CANCEL, MyExecDialog::OnCancel) + EVT_END_PROCESS(wxID_ANY, MyExecDialog::OnProcessTerminate) +END_EVENT_TABLE() + + + + +MyExecDialog::MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size) + : wxDialog(parent, wxID_ANY, title, pos, size, wxRESIZE_BORDER | wxCAPTION | wxCLOSE_BOX | wxSYSTEM_MENU) { -/* - command = utils::wxQuoteFilename(command); - wxString cmdline = command + wxT(" ") + args; - MyExternalCmdExecDialog dlg(parent, wxID_ANY); - return dlg.ShowModal(cmdline); + wxBoxSizer * topsizer = new wxBoxSizer( wxVERTICAL ); + m_execPanel = new MyExecPanel(this); + + topsizer->Add(m_execPanel, 1, wxEXPAND | wxALL, 10); -#if defined __WXMAC__ - command = utils::wxQuoteFilename(command); - wxString cmdline = command + wxT(" ") + args; - MyExternalCmdExecDialog dlg(parent, wxID_ANY); - return dlg.ShowModal(cmdline); -*/ -#if defined DISABLED__WXMSW__ - int ret = -1; - wxFileName tname(command); - wxString ext = tname.GetExt(); - if (ext != wxT("exe")) { - SHELLEXECUTEINFO seinfo; - memset(&seinfo, 0, sizeof(SHELLEXECUTEINFO)); - seinfo.cbSize = sizeof(SHELLEXECUTEINFO); - seinfo.fMask = SEE_MASK_NOCLOSEPROCESS; - seinfo.lpFile = command.c_str(); - seinfo.lpParameters = args.c_str(); - if (ShellExecuteEx(&seinfo) != TRUE) { - ret = -1; - wxMessageBox(_("Could not execute command: ") + command + wxT(" ") + args, _("ShellExecuteEx failed"), wxCANCEL | wxICON_ERROR); - } else { - // wait for process - WaitForSingleObject(seinfo.hProcess, INFINITE); - ret = 0; - } - } else { - wxString cmdline = utils::wxQuoteFilename(command) + wxT(" ") + args; - // using CreateProcess on windows - /* CreateProcess API initialization */ - STARTUPINFO siStartupInfo; - PROCESS_INFORMATION piProcessInfo; - memset(&siStartupInfo, 0, sizeof(siStartupInfo)); - memset(&piProcessInfo, 0, sizeof(piProcessInfo)); - siStartupInfo.cb = sizeof(siStartupInfo); -#if wxUSE_UNICODE - WCHAR * cmdline_c = (WCHAR *) cmdline.wc_str(); - WCHAR * exe_c = (WCHAR *) command.wc_str(); -#else //ANSI - char * cmdline_c = (char*) cmdline.mb_str(); - char * exe_c = (char*) command.mb_str(); -#endif - DEBUG_DEBUG("using CreateProcess() to execute :" << command.mb_str()); - DEBUG_DEBUG("with cmdline:" << cmdline.mb_str()); - ret = CreateProcess(exe_c, cmdline_c, NULL, NULL, FALSE, - IDLE_PRIORITY_CLASS | CREATE_NEW_CONSOLE, NULL, - NULL, &siStartupInfo, &piProcessInfo); - if (ret) { - ret = 0; - // Wait until child process exits. - WaitForSingleObject( piProcessInfo.hProcess, INFINITE ); + topsizer->Add( new wxButton(this, wxID_CANCEL, _("Cancel")), + 0, wxALL | wxALIGN_RIGHT, 10); - // TODO: interrupt waiting and redraw window. + SetSizer( topsizer ); +// topsizer->SetSizeHints( this ); +} - // Close process and thread handles. - CloseHandle( piProcessInfo.hProcess ); - CloseHandle( piProcessInfo.hThread ); +void MyExecDialog::OnProcessTerminate(wxProcessEvent & event) +{ + EndModal(event.GetExitCode()); +} - } else { - ret = -1; - wxLogError(_("Could not execute command: ") + cmdline , _("CreateProcess Error")); - } +void MyExecDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + m_execPanel->KillProcess(); +} + + +int MyExecDialog::ExecWithRedirect(wxString cmd) +{ + if (m_execPanel->ExecWithRedirect(cmd) == -1) { + return -1; } - return ret; -#else + return ShowModal(); +} + +int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow* parent, + wxString title) +{ + + command = utils::wxQuoteFilename(command); wxString cmdline = command + wxT(" ") + args; -#if 0 - MyExternalCmdExecDialog dlg(parent, wxID_ANY); - dlg.ShowModal(cmdline); - wxMessageBox(_("program finished"), _("ExecuteProcess")); - return 0; - -#else MyExecDialog dlg(NULL, title, wxDefaultPosition, wxSize(640, 400)); return dlg.ExecWithRedirect(cmdline); -#endif -#endif } //---------- Modified: hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h 2008-02-03 20:28:53 UTC (rev 2778) +++ hugin/trunk/src/hugin1/base_wx/MyExternalCmdExecDialog.h 2008-02-03 20:32:52 UTC (rev 2779) @@ -48,13 +48,13 @@ // Define a new exec dialog -class MyExecDialog : public wxDialog, public MyProcessListener +class MyExecPanel : public wxPanel, public MyProcessListener { public: // ctor(s) - MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size); + MyExecPanel(wxWindow * parent); - void OnCancel(wxCommandEvent& event); + void KillProcess(); void OnExecWithRedirect(wxCommandEvent& event); @@ -69,9 +69,7 @@ private: - void AddToOutput(wxString str); void AddToOutput(wxInputStream & s); - void AddToOutput(wxChar c); void DoAsyncExec(const wxString& cmd); @@ -85,7 +83,7 @@ // last command we executed wxString m_cmdLast; - wxString m_output; +// wxString m_output; #ifdef HUGIN_EXEC_LISTBOX wxListBox *m_lbox; @@ -137,11 +135,30 @@ } virtual void OnTerminate(int pid, int status); +}; - virtual bool HasInput(wxString& my_stdout, wxString& my_stderr); + +// Define a new exec dialog, which uses MyExecPanel defined above +class MyExecDialog : public wxDialog +{ +public: +// ctor(s) + MyExecDialog(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size); + + void OnCancel(wxCommandEvent& event); + + int ExecWithRedirect(wxString command); + + void OnProcessTerminate(wxProcessEvent & event); + +private: + + MyExecPanel * m_execPanel; + + // any class wishing to process wxWidgets events must use this macro + DECLARE_EVENT_TABLE() }; - //---------- Added: hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp (rev 0) +++ hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-02-03 20:32:52 UTC (rev 2779) @@ -0,0 +1,237 @@ +// -*- c-basic-offset: 4 -*- + +/** @file RunStitchPanel.cpp + * + * @author Pablo d'Angelo <pab...@we...> + * + * $Id: hugin_stitch_project.cpp 2705 2008-01-27 19:56:06Z ippei $ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include <hugin_config.h> +#include <hugin_version.h> +#include "panoinc_WX.h" +#include "panoinc.h" + +#include <wx/wfstream.h> + +#include <fstream> +#include <sstream> +#include <vigra/error.hxx> +#include <vigra_ext/MultiThreadOperations.h> +#include "PT/Panorama.h" +#include "PT/utils.h" +#include "base_wx/huginConfig.h" +#include "base_wx/MyProgressDialog.h" +#include "base_wx/MyExternalCmdExecDialog.h" +#include "base_wx/platform.h" +#include "common/wxPlatform.h" + +#include "RunStitchPanel.h" + +using namespace vigra; +using namespace PT; +using namespace std; +using namespace utils; + + +// ========================================== +// Implementation of stitch window + +// event ID's for RunStitchPanel +enum +{ + ID_Quit = 1, + ID_About +}; + + +BEGIN_EVENT_TABLE(RunStitchPanel, wxPanel) + EVT_END_PROCESS(-1, RunStitchPanel::OnProcessTerminate) +END_EVENT_TABLE() + +RunStitchPanel::RunStitchPanel(wxWindow * parent) + : wxPanel(parent) +{ + /* + wxMenu *menuFile = new wxMenu; + + menuFile->AppendSeparator(); + menuFile->Append( ID_Quit, _("E&xit") ); + + wxMenu *menuHelp = new wxMenu; + menuHelp->Append( ID_About, _("&About...") ); + + wxMenuBar *menuBar = new wxMenuBar; + menuBar->Append( menuFile, _("&File") ); + menuBar->Append( menuHelp, _("&Help") ); + SetMenuBar( menuBar ); + */ + + wxBoxSizer * topsizer = new wxBoxSizer( wxVERTICAL ); + m_execPanel = new MyExecPanel(this); + + topsizer->Add(m_execPanel, 1, wxEXPAND, 0); + SetSizer( topsizer ); +// topsizer->SetSizeHints( this ); // set size hints to honour minimum size +} + + +bool RunStitchPanel::StitchProject(wxString scriptFile, wxString outname, PTPrograms progs) +{ + wxFileName fname(scriptFile); + if ( !fname.FileExists() ) { + wxLogError( _("Could not open project file:") + scriptFile); + return false; + } + + wxString pathToPTO; + wxFileName::SplitPath(scriptFile, &pathToPTO, NULL, NULL); + pathToPTO.Append(wxT("/")); + + ifstream prjfile((const char *)scriptFile.mb_str()); + if (prjfile.bad()) { + wxLogError( wxString::Format(_("could not open script : %s"), scriptFile.c_str()) ); + return false; + } + + PT::Panorama pano; + PT::PanoramaMemento newPano; + + if (newPano.loadPTScript(prjfile, (const char *)pathToPTO.mb_str())) { + pano.setMemento(newPano); + } else { + wxLogError( wxString::Format(_("error while parsing panos tool script: %s"), scriptFile.c_str()) ); + return false; + } + + // make sure we got an absolute path + if (! wxIsAbsolutePath(outname)) { + outname = wxGetCwd() + wxT("/") + outname; + } + + DEBUG_DEBUG("output file specified is " << (const char *)outname.mb_str()); + + wxString basename; + wxString outpath; + wxFileName outputPrefix(outname); + outpath = outputPrefix.GetPath(); + basename = outputPrefix.GetFullName(); + cout << "output path: " << outpath.mb_str() << " file:" << basename.mb_str() << endl; + + // stitch only active images + UIntSet activeImgs = pano.getActiveImages(); + + try { + PanoramaOptions opts = pano.getOptions(); + + // copy pto file to temporary file + m_currentPTOfn = wxFileName::CreateTempFileName(wxT("huginpto_")); + if(m_currentPTOfn.size() == 0) { + wxLogError(_("Could not create temporary file")); + } + DEBUG_DEBUG("tmpPTOfn file: " << (const char *)m_currentPTOfn.mb_str()); + // copy is not enough, need to adjust image path names... + ofstream script(m_currentPTOfn.mb_str()); + PT::UIntSet all; + if (pano.getNrOfImages() > 0) { + fill_set(all, 0, pano.getNrOfImages()-1); + } + pano.printPanoramaScript(script, pano.getOptimizeVector(), pano.getOptions(), all, false, ""); + script.close(); + + // produce suitable makefile + + wxFile makeFile; + //TODO: change to implementatin with config->Read(wxT("tempDir"),wxT("")) + m_currentMakefn = wxFileName::CreateTempFileName(wxT("huginmk_"), &makeFile); + if(m_currentMakefn.size() == 0) { + wxLogError(_("Could not create temporary file")); + return false; + } + DEBUG_DEBUG("makefn file: " << (const char *)m_currentMakefn.mb_str()); + ofstream makeFileStream(m_currentMakefn.mb_str()); + makeFile.Close(); + + std::string resultFn(basename.mb_str()); + std::string tmpPTOfnC = (const char *) m_currentPTOfn.mb_str(); + + PT::createMakefile(pano, + activeImgs, + tmpPTOfnC, + resultFn, + progs, + "", + makeFileStream); + + // cd to output directory, if one is given. + wxString oldCWD = wxFileName::GetCwd(); + wxFileName::SetCwd(outpath); + + wxString args = wxT("-f ") + wxQuoteString(m_currentMakefn) + wxT(" all clean"); + + wxString caption = wxString::Format(_("Stitching %s"), scriptFile.c_str()); + +#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE + wxString cmd = MacGetPathToBundledExecutableFile(CFSTR("gnumake")); + if(cmd != wxT("")) { + cmd = wxQuoteString(cmd); + } else { + wxMessageBox(wxString::Format(_("External program %s not found in the bundle, reverting to system path"), wxT("gnumake")), _("Error")); + cmd = wxT("make"); + } + cmd += wxT(" ") + args; +#else + wxString cmd = wxT("make ") + args; +#endif + + if (m_execPanel->ExecWithRedirect(cmd) == -1) { + wxMessageBox(wxString::Format(_("Error while stitching project\n%s"), cmd.c_str()), + _("Error during stitching"), wxICON_ERROR | wxOK ); + } + } catch (std::exception & e) { + cerr << "caught exception: " << e.what() << std::endl; + wxMessageBox(wxString(e.what(), wxConvLocal), + _("Error during stitching"), wxICON_ERROR | wxOK ); + + } + return true; +} + +void RunStitchPanel::OnProcessTerminate(wxProcessEvent & event) +{ + DEBUG_TRACE(""); + // delete temporary files +#ifndef DEBUG + wxRemoveFile(m_currentMakefn); + wxRemoveFile(m_currentPTOfn); +#endif + int ret = event.GetExitCode(); + // notify parent of exit + if (this->GetParent()) { + event.SetEventObject( this ); + DEBUG_TRACE("Sending wxProcess event"); + this->GetParent()->ProcessEvent( event ); + } +} + +void RunStitchPanel::CancelStitch() +{ + DEBUG_TRACE(""); + m_execPanel->KillProcess(); +} + Added: hugin/trunk/src/hugin1/base_wx/RunStitchPanel.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.h (rev 0) +++ hugin/trunk/src/hugin1/base_wx/RunStitchPanel.h 2008-02-03 20:32:52 UTC (rev 2779) @@ -0,0 +1,72 @@ +// -*- c-basic-offset: 4 -*- + +/** @file RunStitchFrame.h + * + * @brief Stitch a pto project file, with GUI output etc. + * + * @author Pablo d'Angelo <pab...@we...> + * + * $Id: hugin_stitch_project.cpp 2705 2008-01-27 19:56:06Z ippei $ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef RUN_STITCH_FRAME_H +#define RUN_STITCH_FRAME_H + +#include <vector> +#include <set> +#include <functional> +#include <utility> +#include <string> + +#include <PT/Panorama.h> + +#include "MyExternalCmdExecDialog.h" + +struct StitchProjectEntry +{ + StitchProjectEntry(wxString script, wxString output) + : scriptFile(script), outputPrefix(output), finished(false), + error(false) + { + } + + wxString scriptFile; + wxString outputPrefix; + bool finished; + bool error; +}; + +class RunStitchPanel: public wxPanel +{ +public: + RunStitchPanel(wxWindow * parent); + + bool StitchProject(wxString scriptFile, wxString outname, PT::PTPrograms progs); + void CancelStitch(); + +private: + wxString m_currentPTOfn; + wxString m_currentMakefn; + void OnProcessTerminate(wxProcessEvent & event); + + MyExecPanel * m_execPanel; + + DECLARE_EVENT_TABLE() +}; + +#endif Modified: hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt =================================================================== --- hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2008-02-03 20:28:53 UTC (rev 2778) +++ hugin/trunk/src/hugin1/stitch_project/CMakeLists.txt 2008-02-03 20:32:52 UTC (rev 2779) @@ -33,7 +33,7 @@ ENDIF (WIN32) -target_link_libraries(${PROGNAME} ${common_libs} ${image_libs} huginbasewx ${wxWidgets_LIBRARIES}) +target_link_libraries(${PROGNAME} huginbasewx ${common_libs} ${image_libs} ${wxWidgets_LIBRARIES}) IF (APPLE) IF (NOT MAC_SELF_CONTAINED_BUNDLE) Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-02-03 20:28:53 UTC (rev 2778) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-02-03 20:32:52 UTC (rev 2779) @@ -1,6 +1,6 @@ // -*- c-basic-offset: 4 -*- -/** @file wx_nona.cpp +/** @file hugin_stitch_project * * @brief Stitch a pto project file, with GUI output etc. * @@ -31,12 +31,14 @@ #include <wx/wfstream.h> + #include <fstream> #include <sstream> #include <vigra/error.hxx> #include <vigra_ext/MultiThreadOperations.h> #include "PT/Panorama.h" #include "PT/utils.h" +#include "base_wx/RunStitchPanel.h" #include "base_wx/huginConfig.h" #include "base_wx/MyProgressDialog.h" #include "base_wx/MyExternalCmdExecDialog.h" @@ -57,7 +59,128 @@ using namespace std; using namespace utils; -/** The application class for nona gui + +class RunStitchFrame: public wxFrame +{ +public: + RunStitchFrame(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size); + + void StitchProject(wxString scriptFile, wxString outname, PTPrograms progs); + + void OnQuit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + +private: + + bool m_isStitching; + + void OnProcessTerminate(wxProcessEvent & event); + void OnCancel(wxCommandEvent & event); + + RunStitchPanel * m_stitchPanel; + + DECLARE_EVENT_TABLE() +}; + +// event ID's for RunStitchPanel +enum +{ + ID_Quit = 1, + ID_About +}; + +BEGIN_EVENT_TABLE(RunStitchFrame, wxFrame) + EVT_MENU(ID_Quit, RunStitchFrame::OnQuit) + EVT_MENU(ID_About, RunStitchFrame::OnAbout) + EVT_BUTTON(wxID_CANCEL, RunStitchFrame::OnCancel) + EVT_END_PROCESS(-1, RunStitchFrame::OnProcessTerminate) +END_EVENT_TABLE() + +RunStitchFrame::RunStitchFrame(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size) + : wxFrame(parent, -1, title, pos, size), m_isStitching(false) +{ + /* + wxMenu *menuFile = new wxMenu; + + menuFile->AppendSeparator(); + menuFile->Append( ID_Quit, _("E&xit") ); + + wxMenu *menuHelp = new wxMenu; + menuHelp->Append( ID_About, _("&About...") ); + + wxMenuBar *menuBar = new wxMenuBar; + menuBar->Append( menuFile, _("&File") ); + menuBar->Append( menuHelp, _("&Help") ); + SetMenuBar( menuBar ); + */ + + wxBoxSizer * topsizer = new wxBoxSizer( wxVERTICAL ); + m_stitchPanel = new RunStitchPanel(this); + + topsizer->Add(m_stitchPanel, 1, wxEXPAND | wxALL, 10); + + topsizer->Add( new wxButton(this, wxID_CANCEL, _("Cancel")), + 0, wxALL | wxALIGN_RIGHT, 10); + + SetSizer( topsizer ); +// topsizer->SetSizeHints( this ); // set size hints to honour minimum size +} + +void RunStitchFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + wxMessageBox( wxString::Format(_("HuginStitchProject. Application to stitch hugin project files.\n Version: %s"), wxT(PACKAGE_VERSION)), + wxT("About hugin_stitch_project"), + wxOK | wxICON_INFORMATION ); +} +void RunStitchFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + DEBUG_TRACE(""); + if (m_isStitching) { + m_stitchPanel->CancelStitch(); + m_isStitching = false; + } + Close(); +} + +void RunStitchFrame::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + DEBUG_TRACE(""); + if (m_isStitching) { + m_stitchPanel->CancelStitch(); + m_isStitching = false; + } else { + Close(); + } +} + +void RunStitchFrame::OnProcessTerminate(wxProcessEvent & event) +{ + if (! m_isStitching) { + // canceled stitch + // TODO: Cleanup files? + Close(); + } else { + m_isStitching = false; + if (event.GetExitCode() != 0) { + wxMessageBox(_("Error during stitching\nPlease report the complete text to the bug tracker on http://sf.net/projects/hugin."), + _("Error during stitching"), wxICON_ERROR | wxOK ); + } else { + Close(); + } + } +} + +void RunStitchFrame::StitchProject(wxString scriptFile, wxString outname, PT::PTPrograms progs) +{ + m_stitchPanel->StitchProject(scriptFile, outname, progs); + m_isStitching = true; +} + + +// ********************************************************************** + + +/** The application class for hugin_stitch_project * * it contains the main frame. */ @@ -92,7 +215,6 @@ #endif }; - stitchApp::stitchApp() { // suppress tiff warnings @@ -130,19 +252,19 @@ #endif #if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE - { + { wxString exec_path = MacGetPathToBundledExecutableFile(CFSTR("nona")); if(exec_path != wxT("")) { progs.nona = exec_path.mb_str(); - } - + } + exec_path = MacGetPathToBundledExecutableFile(CFSTR("hugin_hdrmerge")); if(exec_path != wxT("")) - { + { progs.hdrmerge = exec_path.mb_str(); - } - } + } + } #endif // set the name of locale recource to look for @@ -177,6 +299,7 @@ bool imgsFromCmdline = false; + wxString scriptFile; #ifdef __WXMAC__ m_macFileNameToOpenOnStart = wxT(""); @@ -222,36 +345,8 @@ } } - cout << "input file is " << (const char *)scriptFile.mb_str() << endl; - wxFileName fname(scriptFile); - if ( !fname.FileExists() ) { - wxLogError( _("Could not open project file:") + scriptFile); - return false; - } - - wxString pathToPTO; - wxFileName::SplitPath(scriptFile, &pathToPTO, NULL, NULL); - pathToPTO.Append(wxT("/")); - - ifstream prjfile((const char *)scriptFile.mb_str()); - if (prjfile.bad()) { - wxLogError( wxString::Format(_("could not open script : %s"), scriptFile.c_str()) ); - return false; - } - - - Panorama pano; - PanoramaMemento newPano; - - if (newPano.loadPTScript(prjfile, (const char *)pathToPTO.mb_str())) { - pano.setMemento(newPano); - } else { - wxLogError( wxString::Format(_("error while parsing panos tool script: %s"), scriptFile.c_str()) ); - return false; - } - wxString outname; if ( !parser.Found(wxT("o"), &outname) ) { @@ -269,147 +364,15 @@ return false; } } - // make sure we got an absolute path - if (! wxIsAbsolutePath(outname)) { - outname = wxGetCwd() + wxT("/") + outname; - } - - DEBUG_DEBUG("output file specified is " << (const char *)outname.mb_str()); - wxString basename; - wxString outpath; - wxFileName outputPrefix(outname); - outpath = outputPrefix.GetPath(); - basename = outputPrefix.GetFullName(); - cout << "output path: " << outpath.mb_str() << " file:" << basename.mb_str() << endl; + RunStitchFrame *frame = new RunStitchFrame(NULL, wxT("Hugin Stitcher"), wxDefaultPosition, wxSize(640,600) ); + frame->Show( true ); + SetTopWindow( frame ); - long nThreads = wxThread::GetCPUCount(); - parser.Found(wxT("t"), & nThreads); - if (nThreads <= 0) nThreads = 1; - vigra_ext::ThreadManager::get().setNThreads((unsigned) nThreads); - - //utils::StreamMultiProgressDisplay pdisp(cout); - //MyProgressDialog pdisp(_("Stitching Panorama"), wxT(""), NULL, wxPD_ELAPSED_TIME | wxPD_AUTO_HIDE | wxPD_APP_MODAL ); - - - // stitch only active images - UIntSet activeImgs = pano.getActiveImages(); - - bool keepWindow = false; - if (imgsFromCmdline) { - if (parser.GetParamCount() -1 != activeImgs.size()) { - wxLogError(_("Wrong number of images specified on command line")); - return false; - } - size_t i = 0; - for (UIntSet::iterator it = activeImgs.begin(); - it != activeImgs.end(); ++it, ++i) - { - pano.setImageFilename(*it, (const char *)parser.GetParam(i+1).mb_str()); - } - } - - try { - PanoramaOptions opts = pano.getOptions(); - - // copy pto file to temporary file - wxString tmpPTOfn = wxFileName::CreateTempFileName(wxT("huginpto_")); - if(tmpPTOfn.size() == 0) { - wxLogError(_("Could not create temporary file")); - } - DEBUG_DEBUG("tmpPTOfn file: " << (const char *)tmpPTOfn.mb_str()); - // copy is not enough, need to adjust image path names... - ofstream script(tmpPTOfn.mb_str()); - PT::UIntSet all; - if (pano.getNrOfImages() > 0) { - fill_set(all, 0, pano.getNrOfImages()-1); - } - pano.printPanoramaScript(script, pano.getOptimizeVector(), pano.getOptions(), all, false, ""); - script.close(); - - - // produce suitable makefile - - wxFile makeFile; - //TODO: change to implementatin with config->Read(wxT("tempDir"),wxT("")) - wxString makefn = wxFileName::CreateTempFileName(wxT("huginmk_"), &makeFile); - if(makefn.size() == 0) { - wxLogError(_("Could not create temporary file")); - return false; - } - DEBUG_DEBUG("makefn file: " << (const char *)makefn.mb_str()); - ofstream makeFileStream(makefn.mb_str()); - makeFile.Close(); - - std::string ptoFn = (const char *) tmpPTOfn.mb_str(); - - std::string resultFn(basename.mb_str()); - - std::string tmpPTOfnC = (const char *) tmpPTOfn.mb_str(); - - PT::createMakefile(pano, - activeImgs, - tmpPTOfnC, - resultFn, - progs, - "", - makeFileStream); - - // cd to output directory, if one is given. - wxString oldCWD = wxFileName::GetCwd(); - wxFileName::SetCwd(outpath); - - wxString args = wxT("-f ") + wxQuoteString(makefn) + wxT(" all clean"); - - wxString caption = wxString::Format(_("Stitching %s"), scriptFile.c_str()); -#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE - wxString make_path = MacGetPathToBundledExecutableFile(CFSTR("gnumake")); - if(make_path != wxT("")) { - make_path = wxQuoteString(make_path); - } else { - wxMessageBox(wxString::Format(_("External program %s not found in the bundle, reverting to system path"), wxT("gnumake")), _("Error")); - make_path = wxT("make"); - } -#else - wxString make_path = wxT("make"); -#endif - -#if 1 - int ret = MyExecuteCommandOnDialog(make_path, args, NULL, caption); - if (ret != 0) { - keepWindow = true; - wxMessageBox(wxString::Format(_("Error while stitching project\n%s"), scriptFile.c_str()), - _("Error during stitching"), wxICON_ERROR | wxOK ); - } -#else - wxString cmd = make_path + wxT(" ") + args; - - // This crashes.. Don't know why.. - MyExternalCmdExecDialog execDlg(NULL, wxID_ANY); - int ret = execDlg.ShowModal(cmd); - cout << " exit code: " << ret << std::endl; - if (ret != 0) { - keepWindow = true; - wxMessageBox(wxString::Format(_("Error while stitching project\n%s"), scriptFile.c_str()), - _("Error during stitching"), wxICON_ERROR | wxOK ); - } -#endif - - // delete temporary files -#ifndef DEBUG - wxRemoveFile(makefn); - wxRemoveFile(tmpPTOfn); -#endif - } catch (std::exception & e) { - cerr << "caught exception: " << e.what() << std::endl; - wxMessageBox(wxString(e.what(), wxConvLocal), - _("Error during stitching"), wxICON_ERROR | wxOK ); - - return true; - } - -// return keepWindow; - return false; + wxFileName basename(scriptFile); + frame->SetTitle(wxString::Format(_("%s - Stitching"), basename.GetName().c_str())); + frame->StitchProject(scriptFile, outname, progs); + return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-02-13 21:59:55
|
Revision: 2831 http://hugin.svn.sourceforge.net/hugin/?rev=2831&view=rev Author: dangelo Date: 2008-02-13 13:59:52 -0800 (Wed, 13 Feb 2008) Log Message: ----------- exiftool: do not copy rotation tags to avoid apps rotating the final panorama. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp hugin/trunk/src/hugin1/hugin/config_defaults.h Modified: hugin/trunk/src/hugin1/base_wx/huginConfig.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-02-13 21:58:57 UTC (rev 2830) +++ hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-02-13 21:59:52 UTC (rev 2831) @@ -172,9 +172,11 @@ // TODO: read hugin config version, based on SVN_BUILD long revision = config->Read(wxT("HuginRevision"), 0l); if (revision <= 2797) { - config->DeleteEntry(wxT("/Exiftool/CopyArgs")); config->DeleteEntry(wxT("/Assistant/panoDownsizeFactor")); } + if (revision <= 2827) { + config->DeleteEntry(wxT("/Exiftool/CopyArgs")); + } // set new config config->Write(wxT("HuginRevision"), HUGIN_WC_REVISION); } Modified: hugin/trunk/src/hugin1/hugin/config_defaults.h =================================================================== --- hugin/trunk/src/hugin1/hugin/config_defaults.h 2008-02-13 21:58:57 UTC (rev 2830) +++ hugin/trunk/src/hugin1/hugin/config_defaults.h 2008-02-13 21:59:52 UTC (rev 2831) @@ -73,7 +73,7 @@ // Exiftool -#define HUGIN_EXIFTOOL_COPY_ARGS " -XMP:all -exif:all -ICC_Profile:all -Meta:all -GeoTiff:all --XResolution --YResolution " +#define HUGIN_EXIFTOOL_COPY_ARGS " -XMP:all -exif:all -ICC_Profile:all -Meta:all -GeoTiff:all --XResolution --YResolution --Rotation --Orientation --AutoRotate" #define HUGIN_EXECDIALOG_ENABLED 1l This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-02-15 21:05:44
|
Revision: 2854 http://hugin.svn.sourceforge.net/hugin/?rev=2854&view=rev Author: dangelo Date: 2008-02-15 13:05:43 -0800 (Fri, 15 Feb 2008) Log Message: ----------- really fixed [ 1890052 ] extension .jpeg is not recognised for input images Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-02-15 21:04:29 UTC (rev 2853) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-02-15 21:05:43 UTC (rev 2854) @@ -30,6 +30,8 @@ #include "panoinc_WX.h" #include <config.h> +#define HUGIN_WX_FILE_IMG_FILTER _("All Image files|*.jpg;*.JPG;*jpeg;*JPEG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg)|*.jpg;*.JPG;*.jpeg;*.JPEG|All files (*)|*") + #if defined __WXMAC__ #include <CoreFoundation/CFString.h> Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-02-15 21:04:29 UTC (rev 2853) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-02-15 21:05:43 UTC (rev 2854) @@ -725,12 +725,11 @@ // get the global config object wxConfigBase* config = wxConfigBase::Get(); - wxString wildcard (_("All Image files|*.jpg;*.JPG;*jpeg;*JPEG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg)|*.jpg;*.JPG;*.jpeg;*.JPEG|All files (*)|*")); - wxString path = config->Read(wxT("/actualPath"), wxT("")); wxFileDialog dlg(this,_("Add images"), path, wxT(""), - wildcard, wxOPEN|wxMULTIPLE , wxDefaultPosition); + HUGIN_WX_FILE_IMG_FILTER, + wxOPEN|wxMULTIPLE , wxDefaultPosition); dlg.SetDirectory(path); // remember the image extension Modified: hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp 2008-02-15 21:04:29 UTC (rev 2853) +++ hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp 2008-02-15 21:05:43 UTC (rev 2854) @@ -31,6 +31,7 @@ #include "common/wxPlatform.h" #include <base_wx/ImageCache.h> +#include <base_wx/platform.h> #include <hugin/wxPanoCommand.h> #include <vigra/cornerdetection.hxx> @@ -318,11 +319,11 @@ if (basedir == wxT("")) { basedir = fname.GetPath(); } - // open file dialog - wxString wildcard (_("All Image files|*.jpg;*.JPG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg)|*.jpg;*.JPG;*.jpeg;*.JPEG|All files (*)|*")); + + // open file dialog wxFileDialog dlg(MainFrame::Get(), _("Add images"), basedir, fname.GetFullName(), - wildcard, wxOPEN, wxDefaultPosition); + HUGIN_WX_FILE_IMG_FILTER, wxOPEN, wxDefaultPosition); dlg.SetDirectory(basedir); if (dlg.ShowModal() == wxID_OK) { pano.setImageFilename(i, (const char *)dlg.GetPath().mb_str(*wxConvCurrent)); @@ -389,12 +390,10 @@ Lens dummyLens; pano.addLens(dummyLens); - wxString wildcard (_("All Image files|*.jpg;*.JPG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg)|*.jpg;*.JPG;*.jpeg;*.jpg|All files (*)|*")); - wxString path = config->Read(wxT("actualPath"), wxT("")); wxFileDialog dlg(MainFrame::Get(), _("Add images"), path, wxT(""), - wildcard, wxOPEN|wxMULTIPLE , wxDefaultPosition); + HUGIN_WX_FILE_IMG_FILTER, wxOPEN|wxMULTIPLE , wxDefaultPosition); dlg.SetDirectory(path); // remember the image extension This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-02-15 23:32:24
|
Revision: 2860 http://hugin.svn.sourceforge.net/hugin/?rev=2860&view=rev Author: dangelo Date: 2008-02-15 15:32:22 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Changed exiftool copy arguments to copy only safe meta data. Made autopano-sift-c (previously called APSC) the default matching program. The autopano preferences are not updated automatically, though. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp hugin/trunk/src/hugin1/hugin/config_defaults.h Modified: hugin/trunk/src/hugin1/base_wx/huginConfig.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-02-15 22:44:05 UTC (rev 2859) +++ hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-02-15 23:32:22 UTC (rev 2860) @@ -174,7 +174,7 @@ if (revision <= 2797) { config->DeleteEntry(wxT("/Assistant/panoDownsizeFactor")); } - if (revision <= 2827) { + if (revision <= 2860) { config->DeleteEntry(wxT("/Exiftool/CopyArgs")); } // set new config Modified: hugin/trunk/src/hugin1/hugin/config_defaults.h =================================================================== --- hugin/trunk/src/hugin1/hugin/config_defaults.h 2008-02-15 22:44:05 UTC (rev 2859) +++ hugin/trunk/src/hugin1/hugin/config_defaults.h 2008-02-15 23:32:22 UTC (rev 2860) @@ -73,7 +73,7 @@ // Exiftool -#define HUGIN_EXIFTOOL_COPY_ARGS " -XMP:all -exif:all -ICC_Profile:all -Meta:all -GeoTiff:all --XResolution --YResolution --Rotation --Orientation --AutoRotate" +#define HUGIN_EXIFTOOL_COPY_ARGS "-ImageDescription -Make -Model -Artist -WhitePoint -Copyright -GPS:all -DateTimeOriginal -CreateDate -UserComment -ColorSpace -OwnerName -SerialNumber" #define HUGIN_EXECDIALOG_ENABLED 1l @@ -92,12 +92,12 @@ #define HUGIN_ENBLEND_EXE "enblend.exe" #define HUGIN_ENFUSE_EXE "enfuse.exe" -#define HUGIN_AP_TYPE 0l +#define HUGIN_AP_TYPE 1l #define HUGIN_APKOLOR_EXE "autopano.exe" #define HUGIN_APKOLOR_ARGS "/allinone /path:%d /keys:%p /project:oto /name:%o /size:1024 /f %i" -#define HUGIN_APSIFT_EXE "autopano-win32.exe" -#define HUGIN_APSIFT_ARGS "--output %o --imagelist %namefile" +#define HUGIN_APSIFT_EXE "autopano-sift-c.exe" +#define HUGIN_APSIFT_ARGS "--maxmatches %p %o %i" #define HUGIN_STITCHER_RUN_EDITOR 0l #define HUGIN_STITCHER_EDITOR "" @@ -122,8 +122,8 @@ #define HUGIN_APKOLOR_EXE "" #define HUGIN_APKOLOR_ARGS "" -#define HUGIN_APSIFT_EXE "autopano-complete.sh" -#define HUGIN_APSIFT_ARGS "-o %o -p %p %i" +#define HUGIN_APSIFT_EXE "autopano-sift-c" +#define HUGIN_APSIFT_ARGS "--maxmatches %p %o %i" #define HUGIN_STITCHER_RUN_EDITOR 0l #define HUGIN_STITCHER_EDITOR "" @@ -149,8 +149,8 @@ #define HUGIN_APKOLOR_EXE "" #define HUGIN_APKOLOR_ARGS "" -#define HUGIN_APSIFT_EXE "autopano-complete.sh" -#define HUGIN_APSIFT_ARGS "--output %o --points %p %i" +#define HUGIN_APSIFT_EXE "autopano-sift-c" +#define HUGIN_APSIFT_ARGS "--maxmatches %p %o %i" #define HUGIN_STITCHER_RUN_EDITOR 0l #define HUGIN_STITCHER_EDITOR "gimp-remote" #define HUGIN_STITCHER_EDITOR_ARGS "%f" @@ -162,8 +162,8 @@ #endif // enblend args -#define HUGIN_ENBLEND_ARGS "-v " -#define HUGIN_ENFUSE_ARGS "-v " +#define HUGIN_ENBLEND_ARGS "" +#define HUGIN_ENFUSE_ARGS "" // smartblend args #define HUGIN_SMARTBLEND_ARGS "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-02-18 10:43:09
|
Revision: 2887 http://hugin.svn.sourceforge.net/hugin/?rev=2887&view=rev Author: dangelo Date: 2008-02-18 02:43:06 -0800 (Mon, 18 Feb 2008) Log Message: ----------- Windows: Avoid ugly gray background on preview and stitch window in windows Windows: Fixed jumping jpeg quality control Made some textfields (jpeg quality, focal length, crop factor) smaller. Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc Modified: hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-02-18 10:40:07 UTC (rev 2886) +++ hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-02-18 10:43:06 UTC (rev 2887) @@ -85,6 +85,10 @@ wxBoxSizer * topsizer = new wxBoxSizer( wxVERTICAL ); m_execPanel = new MyExecPanel(this); +#ifdef __WXMSW__ + // wxFrame does have a strange background color on Windows, copy color from a child widget + this->SetBackgroundColour(m_execPanel->GetBackgroundColour()); +#endif topsizer->Add(m_execPanel, 1, wxEXPAND, 0); SetSizer( topsizer ); // topsizer->SetSizeHints( this ); // set size hints to honour minimum size Modified: hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-02-18 10:40:07 UTC (rev 2886) +++ hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-02-18 10:43:06 UTC (rev 2887) @@ -132,7 +132,7 @@ m_ToggleButtonSizer->Add(m_ButtonPanel, 1, wxEXPAND | wxADJUST_MINSIZE, 0); - m_topsizer->Add(m_ToggleButtonSizer, 0, wxEXPAND | wxADJUST_MINSIZE | wxALL, 5); + m_topsizer->Add(m_ToggleButtonSizer, 0, wxEXPAND | wxADJUST_MINSIZE | wxBOTTOM, 5); wxFlexGridSizer * flexSizer = new wxFlexGridSizer(2,0,5,5); flexSizer->AddGrowableCol(0); @@ -371,7 +371,7 @@ m_ToolBar->ToggleTool(XRCID("preview_auto_update_tool"), aup !=0); -#if __WXMSW_ +#ifdef __WXMSW__ // wxFrame does have a strange background color on Windows.. this->SetBackgroundColour(m_PreviewPanel->GetBackgroundColour()); #endif @@ -552,7 +552,7 @@ but->SetValue(true); m_ButtonSizer->Add(but, 0, - wxLEFT | wxADJUST_MINSIZE, + wxLEFT | wxTOP | wxADJUST_MINSIZE, 5); m_ToggleButtons.push_back(but); dirty = true; Modified: hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc 2008-02-18 10:40:07 UTC (rev 2886) +++ hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc 2008-02-18 10:43:06 UTC (rev 2887) @@ -1,363 +1,369 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<resource> - <object class="wxPanel" name="assistant_panel"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxScrolledWindow" name="ass_control_panel"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="spacer"> - <size>0,12</size> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <object class="sizeritem"> - <object class="wxButton" name="ass_load_images_button"> - <label>1. Load images...</label> - <tooltip>load a series of photos</tooltip> - </object> - <flag>wxBOTTOM</flag> - <border>12</border> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText" name="ass_load_images_text"> - <label>no images loaded</label> - </object> - <flag>wxBOTTOM|wxEXPAND|wxADJUST_MINSIZE</flag> - <border>6</border> - </object> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>15</border> - </object> - <object class="sizeritem"> - <object class="wxStaticBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxCheckBox" name="ass_exif_cb"> - <label>Automatic (use EXIF data)</label> - <hidden>1</hidden> - </object> - <flag>wxTOP|wxBOTTOM</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxPanel" name="ass_lens_group"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Lens type:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="ass_lens_proj_choice"> - <content> - <item>Normal (rectilinear)</item> - <item>Panoramic (cylindrical)</item> - <item>Circular fisheye</item> - <item>Full frame fisheye</item> - <item>Equirectangular</item> - </content> - </object> - </object> - <cols>2</cols> - <hgap>6</hgap> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> - </object> - <object class="spacer"> - <size>0,6</size> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Focal length:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="ass_focallength_text"/> - </object> - <cols>6</cols> - <hgap>6</hgap> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>mm</label> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Focal length multiplier:</label> - </object> - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - <border>20</border> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="ass_cropfactor_text"/> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>x</label> - </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - </object> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> - </object> - <object class="spacer"> - <size>0,6</size> - </object> - <object class="sizeritem"> - <object class="wxButton" name="ass_load_lens_button"> - <label>Load lens...</label> - </object> - <flag>wxLEFT</flag> - <border>12</border> - </object> - </object> - </object> - <flag>wxEXPAND</flag> - </object> - <label>Camera and Lens</label> - </object> - <flag>wxLEFT</flag> - <border>15</border> - </object> - <object class="spacer"> - <size>0,20</size> - </object> - <object class="sizeritem"> - <object class="wxButton" name="ass_align_button"> - <label>2. Align...</label> - <tooltip>Align all images. Creates control points and optimizes the image positions</tooltip> - </object> - <flag>wxBOTTOM</flag> - <border>12</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name="ass_align_text"> - <label>\n\n\n\n</label> - <style></style> - </object> - <flag>wxLEFT|wxEXPAND|wxADJUST_MINSIZE</flag> - <border>15</border> - </object> - <object class="spacer"> - <size>0,20</size> - </object> - <object class="sizeritem"> - <object class="wxButton" name="ass_create_button"> - <label>3. Create panorama...</label> - <tooltip>Create a high resolution panorama.</tooltip> - </object> - </object> - <orient>wxVERTICAL</orient> - </object> - <option>1</option> - <flag>wxEXPAND</flag> - </object> - <object class="spacer"> - <size>0,12</size> - </object> - <object class="sizeritem"> - <object class="unknown" name="ass_druid"> - <hidden>1</hidden> - </object> - <flag>wxRIGHT</flag> - <border>10</border> - </object> - </object> - </object> - <option>1</option> - <flag>wxLEFT|wxEXPAND</flag> - <border>10</border> - </object> - </object> - </object> - <object class="wxDialog" name="dlg_focallength"> - <title>Camera and Lens data</title> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText" name="lensdlg_message"> - <label>a0123456789012345678901234567890123456789 -b -c -d -e</label> - </object> - <flag>wxEXPAND|wxADJUST_MINSIZE</flag> - </object> - <object class="spacer"> - <size>0,10</size> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Lens type:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="lensdlg_type_choice"> - <content> - <item>Normal (rectilinear)</item> - <item>Panoramic (cylindrical)</item> - <item>Circular fisheye</item> - <item>Full frame fisheye</item> - <item>Equirectangular</item> - </content> - <selection>0</selection> - </object> - </object> - <object class="spacer"> - <option>1</option> - <flag>wxEXPAND</flag> - </object> - <object class="sizeritem"> - <object class="wxButton" name="lensdlg_load_lens_button"> - <label>Load lens data...</label> - <style></style> - </object> - <flag>wxLEFT|wxALIGN_RIGHT</flag> - <border>12</border> - </object> - <orient>wxHORIZONTAL</orient> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> - </object> - <object class="spacer"> - <size>0,10</size> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Enter horizontal field of view (HFOV) or focal length and crop factor:</label> - </object> - <flag>wxEXPAND</flag> - </object> - <object class="spacer"> - <size>0,6</size> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>HFOV (v):</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="lensdlg_hfov_text"/> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>degrees</label> - </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="spacer"> - <size>0,0</size> - </object> - <object class="spacer"> - <size>0,0</size> - </object> - <object class="spacer"> - <size>0,0</size> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Focal length:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="lensdlg_focallength_text"/> - </object> - <cols>6</cols> - <vgap>6</vgap> - <hgap>6</hgap> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>mm</label> - </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Focal length multiplier:</label> - </object> - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - <border>20</border> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="lensdlg_cropfactor_text"/> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>x</label> - </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - </object> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> - </object> - <object class="spacer"> - <size>0,6</size> - </object> - </object> - <flag>wxALL</flag> - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="spacer"> - <size>0,0</size> - <option>1</option> - </object> - <object class="sizeritem"> - <object class="wxButton" name="wxID_OK"> - <label></label> - </object> - <flag>wxRIGHT</flag> - <border>8</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="wxID_CANCEL"> - <label></label> - </object> - <flag>wxRIGHT</flag> - <border>8</border> - </object> - </object> - <flag>wxALL|wxEXPAND</flag> - <border>5</border> - </object> - </object> - <style>wxCAPTION|wxRESIZE_BORDER</style> - </object> +<?xml version="1.0" encoding="ISO-8859-1"?> +<resource> + <object class="wxPanel" name="assistant_panel"> + <object class="wxBoxSizer"> + <orient>wxHORIZONTAL</orient> + <object class="sizeritem"> + <object class="wxScrolledWindow" name="ass_control_panel"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="spacer"> + <size>0,12</size> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <object class="sizeritem"> + <object class="wxButton" name="ass_load_images_button"> + <label>1. Load images...</label> + <tooltip>load a series of photos</tooltip> + </object> + <flag>wxBOTTOM</flag> + <border>12</border> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxStaticText" name="ass_load_images_text"> + <label>no images loaded</label> + </object> + <flag>wxBOTTOM|wxEXPAND|wxADJUST_MINSIZE</flag> + <border>6</border> + </object> + </object> + <flag>wxLEFT|wxEXPAND</flag> + <border>15</border> + </object> + <object class="sizeritem"> + <object class="wxStaticBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxCheckBox" name="ass_exif_cb"> + <label>Automatic (use EXIF data)</label> + <hidden>1</hidden> + </object> + <flag>wxTOP|wxBOTTOM</flag> + <border>6</border> + </object> + <object class="sizeritem"> + <object class="wxPanel" name="ass_lens_group"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Lens type:</label> + <style>wxALIGN_RIGHT</style> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxChoice" name="ass_lens_proj_choice"> + <content> + <item>Normal (rectilinear)</item> + <item>Panoramic (cylindrical)</item> + <item>Circular fisheye</item> + <item>Full frame fisheye</item> + <item>Equirectangular</item> + </content> + </object> + </object> + <cols>2</cols> + <hgap>6</hgap> + </object> + <flag>wxLEFT|wxEXPAND</flag> + <border>12</border> + </object> + <object class="spacer"> + <size>0,6</size> + </object> + <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Focal length:</label> + <style>wxALIGN_RIGHT</style> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="ass_focallength_text"/> + <minsize>60,-1</minsize> + </object> + <cols>6</cols> + <hgap>6</hgap> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>mm</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Focal length multiplier:</label> + </object> + <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> + <border>20</border> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="ass_cropfactor_text"/> + <minsize>60,-1</minsize> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>x</label> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + </object> + </object> + <flag>wxLEFT|wxEXPAND</flag> + <border>12</border> + </object> + <object class="spacer"> + <size>0,6</size> + </object> + <object class="sizeritem"> + <object class="wxButton" name="ass_load_lens_button"> + <label>Load lens...</label> + </object> + <flag>wxLEFT</flag> + <border>12</border> + </object> + </object> + </object> + <flag>wxEXPAND</flag> + </object> + <label>Camera and Lens</label> + </object> + <flag>wxLEFT</flag> + <border>15</border> + </object> + <object class="spacer"> + <size>0,20</size> + </object> + <object class="sizeritem"> + <object class="wxButton" name="ass_align_button"> + <label>2. Align...</label> + <tooltip>Align all images. Creates control points and optimizes the image positions</tooltip> + </object> + <flag>wxBOTTOM</flag> + <border>12</border> + </object> + <object class="sizeritem"> + <object class="wxStaticText" name="ass_align_text"> + <label>012345678901234567890123456789012345678901234567890 +1 +2 +3 +4</label> + <style></style> + </object> + <flag>wxLEFT|wxEXPAND|wxADJUST_MINSIZE</flag> + <border>15</border> + </object> + <object class="spacer"> + <size>0,20</size> + </object> + <object class="sizeritem"> + <object class="wxButton" name="ass_create_button"> + <label>3. Create panorama...</label> + <tooltip>Create a high resolution panorama.</tooltip> + </object> + </object> + <orient>wxVERTICAL</orient> + </object> + <option>1</option> + <flag>wxEXPAND</flag> + </object> + <object class="spacer"> + <size>0,12</size> + </object> + <object class="sizeritem"> + <object class="unknown" name="ass_druid"> + <hidden>1</hidden> + </object> + <flag>wxRIGHT</flag> + <border>10</border> + </object> + </object> + </object> + <option>1</option> + <flag>wxLEFT|wxEXPAND</flag> + <border>10</border> + </object> + </object> + </object> + <object class="wxDialog" name="dlg_focallength"> + <title>Camera and Lens data</title> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxStaticText" name="lensdlg_message"> + <label>a0123456789012345678901234567890123456789 +b +c +d +e</label> + </object> + <flag>wxEXPAND|wxADJUST_MINSIZE</flag> + </object> + <object class="spacer"> + <size>0,10</size> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Lens type:</label> + <style>wxALIGN_RIGHT</style> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + <border>6</border> + </object> + <object class="sizeritem"> + <object class="wxChoice" name="lensdlg_type_choice"> + <content> + <item>Normal (rectilinear)</item> + <item>Panoramic (cylindrical)</item> + <item>Circular fisheye</item> + <item>Full frame fisheye</item> + <item>Equirectangular</item> + </content> + <selection>0</selection> + </object> + </object> + <object class="spacer"> + <option>1</option> + <flag>wxEXPAND</flag> + </object> + <object class="sizeritem"> + <object class="wxButton" name="lensdlg_load_lens_button"> + <label>Load lens data...</label> + <style></style> + </object> + <flag>wxLEFT|wxALIGN_RIGHT</flag> + <border>12</border> + </object> + <orient>wxHORIZONTAL</orient> + </object> + <flag>wxLEFT|wxEXPAND</flag> + <border>12</border> + </object> + <object class="spacer"> + <size>0,10</size> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Enter horizontal field of view (HFOV) or focal length and crop factor:</label> + </object> + <flag>wxEXPAND</flag> + </object> + <object class="spacer"> + <size>0,6</size> + </object> + <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>HFOV (v):</label> + <style>wxALIGN_RIGHT</style> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="lensdlg_hfov_text"/> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>degrees</label> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="spacer"> + <size>0,0</size> + </object> + <object class="spacer"> + <size>0,0</size> + </object> + <object class="spacer"> + <size>0,0</size> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Focal length:</label> + <style>wxALIGN_RIGHT</style> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="lensdlg_focallength_text"/> + </object> + <cols>6</cols> + <vgap>6</vgap> + <hgap>6</hgap> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>mm</label> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>Focal length multiplier:</label> + </object> + <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> + <border>20</border> + </object> + <object class="sizeritem"> + <object class="wxTextCtrl" name="lensdlg_cropfactor_text"/> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>x</label> + </object> + <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> + </object> + </object> + <flag>wxLEFT|wxEXPAND</flag> + <border>12</border> + </object> + <object class="spacer"> + <size>0,6</size> + </object> + </object> + <flag>wxALL</flag> + <border>10</border> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxHORIZONTAL</orient> + <object class="spacer"> + <size>0,0</size> + <option>1</option> + </object> + <object class="sizeritem"> + <object class="wxButton" name="wxID_OK"> + <label></label> + </object> + <flag>wxRIGHT</flag> + <border>8</border> + </object> + <object class="sizeritem"> + <object class="wxButton" name="wxID_CANCEL"> + <label></label> + </object> + <flag>wxRIGHT</flag> + <border>8</border> + </object> + </object> + <flag>wxALL|wxEXPAND</flag> + <border>5</border> + </object> + </object> + <style>wxCAPTION|wxRESIZE_BORDER</style> + </object> </resource> \ No newline at end of file Modified: hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc 2008-02-18 10:40:07 UTC (rev 2886) +++ hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc 2008-02-18 10:43:06 UTC (rev 2887) @@ -1,727 +1,723 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<resource> - <object class="wxPanel" name="panorama_panel"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxScrolledWindow" name="pano_controls_panel"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Panorama</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag></flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>projection (f):</label> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_pano_type"> - <content/> - <selection>2</selection> - </object> - <flag>wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - </object> - <flag>wxLEFT</flag> - <border>12</border> - </object> - <object class="sizeritem"> - <object class="wxGridBagSizer"> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Field of View</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag></flag> - <border>6</border> - <cellpos>0,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <cellpos>1,0</cellpos> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <object class="wxStaticText"> - <label>horizontal (v):</label> - </object> - <border>6</border> - </object> - <object class="sizeritem"> - <cellpos>1,1</cellpos> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <object class="wxTextCtrl" name="pano_text_hfov"> - <size>60,-1</size> - </object> - </object> - <object class="sizeritem"> - <cellpos>1,2</cellpos> - <flag>wxRIGHT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <object class="wxStaticText"> - <label>vertical:</label> - </object> - </object> - <object class="sizeritem"> - <cellpos>1,3</cellpos> - <flag>wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <object class="wxTextCtrl" name="pano_text_vfov"> - <size>60,-1</size> - </object> - </object> - <object class="sizeritem"> - <cellpos>1,4</cellpos> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - <object class="wxButton" name="pano_button_calc_fov"> - <label>Calculate Field of View</label> - </object> - <border>6</border> - <flag>wxALL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Panorama Canvas Size</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag>wxTOP</flag> - <border>6</border> - <cellpos>2,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>width:</label> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - <cellpos>3,0</cellpos> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_width"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,1</cellpos> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>height:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,2</cellpos> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_height"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,3</cellpos> - </object> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_opt_width"> - <label>Calculate Optimal Size</label> - <tooltip>calculate highest sensible width. (uses every image pixel)</tooltip> - </object> - <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,4</cellpos> - </object> - <hgap>6</hgap> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Crop</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag>wxTOP</flag> - <border>6</border> - <cellpos>4,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>left:</label> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - <cellpos>3,0</cellpos> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_roi_left"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,1</cellpos> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>top:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,2</cellpos> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_roi_top"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,3</cellpos> - </object> - </object> - <flag>wxLEFT</flag> - <border>6</border> - <cellpos>5,0</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>right:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,2</cellpos> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_roi_right"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,3</cellpos> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>bottom:</label> - <style>wxALIGN_RIGHT</style> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,2</cellpos> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_roi_bottom"> - <size>60,-1</size> - <style>wxTE_PROCESS_ENTER</style> - </object> - <flag>wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL</flag> - <cellpos>3,3</cellpos> - </object> - </object> - <cellpos>5,2</cellpos> - <cellspan>0,3</cellspan> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Output</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag>wxTOP|wxBOTTOM</flag> - <border>6</border> - <cellpos>6,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Normal</label> - <tooltip>For panoramas consisting of images with similar exposure</tooltip> - </object> - <flag>wxLEFT</flag> - <border>6</border> - <cellpos>7,0</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Exposure Blending</label> - <tooltip>For panoramas consisting of images with varying exposure</tooltip> - </object> - <cellpos>7,2</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Merge to HDR</label> - <tooltip>For panoramas consisting of images with varying exposure</tooltip> - </object> - <cellpos>7,4</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_ldr_output_blended"> - <label>Blended panorama</label> - <tooltip>Use blend the individual layers using the selected blender</tooltip> - </object> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_ldr_output_layers"> - <label>Remapped images</label> - <tooltip>Output remapped images with exposure correction</tooltip> - </object> - </object> - </object> - <flag>wxLEFT</flag> - <border>12</border> - <cellpos>8,0</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_ldr_output_exposure_blended"> - <label>Blended panorama (enfuse)</label> - <tooltip>Fully automatic exposure blending</tooltip> - </object> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_ldr_output_exposure_layers"> - <label>Blended exposure layers</label> - <tooltip>Output a complete blended panorama of each exposure. Useful for manual exposure blending, for example in Photoshop or Gimp</tooltip> - </object> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_ldr_output_exposure_remapped"> - <label>Remapped images</label> - <tooltip>Output remapped images with original exposure</tooltip> - </object> - </object> - </object> - <flag>wxLEFT</flag> - <border>12</border> - <cellpos>8,2</cellpos> - <cellspan>0,2</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_hdr_output_blended"> - <label>Blended HDR panorama</label> - <tooltip>Output a blended high dynamic range panorama</tooltip> - </object> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_hdr_output_stacks"> - <label>Stacked HDR images</label> - <tooltip>Output the individual, remapped HDR stacks</tooltip> - </object> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_cb_hdr_output_layers"> - <label>Individual non merged images</label> - <tooltip>Output remapped images in a linear color space</tooltip> - </object> - </object> - </object> - <flag>wxLEFT</flag> - <border>12</border> - <cellpos>8,4</cellpos> - <cellspan>0,2</cellspan> - </object> - </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> - </object> - <object class="spacer"> - <size>0,12</size> - <option>0</option> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_stitch"> - <label>Save project and stitch</label> - </object> - <flag>wxRIGHT</flag> - <border>12</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_batch"> - <label>Save project and send to batch</label> - <enabled>0</enabled> - </object> - </object> - </object> - </object> - <object class="spacer"> - <size>0,12</size> - <option>0</option> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Processing</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag>wxTOP</flag> - <border>6</border> - <cellpos>4,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <cols>3</cols> - <rows>2</rows> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Remapper:</label> - </object> - <flag>wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_remapper"> - <content> - <item>Nona</item> - </content> - <selection>0</selection> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_remapper_opts"> - <label>Options</label> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Blender:</label> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>14</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_blender"> - <content> - <item>enblend</item> - </content> - <selection>0</selection> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_blender_opts"> - <label>Options</label> - <enabled>0</enabled> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>HDR merger:</label> - </object> - <flag>wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>14</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_blender"> - <content> - <item>builtin</item> - </content> - <selection>0</selection> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="pano_button_hdrmerge_opts"> - <label>Options</label> - <enabled>0</enabled> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - </object> - </object> - </object> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>File formats</label> - <font> - <style platform="mac">normal</style> - <family platform="mac">swiss</family> - <weight>bold</weight> - <size platform="mac">12</size> - </font> - </object> - <flag>wxTOP</flag> - <border>6</border> - <cellpos>4,0</cellpos> - <cellspan>0,4</cellspan> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <cols>3</cols> - <rows>2</rows> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>Normal Output:</label> - </object> - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - <border>14</border> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_file_format"> - <content> - <item>TIFF</item> - <item>JPEG</item> - <item>PNG</item> - <item>EXR</item> - </content> - <selection>0</selection> - </object> - <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxPanel" name="pano_output_normal_opts_jpeg"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - ... [truncated message content] |
From: <da...@us...> - 2008-04-09 20:48:13
|
Revision: 3010 http://hugin.svn.sourceforge.net/hugin/?rev=3010&view=rev Author: dangelo Date: 2008-04-09 13:48:09 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Fixed spelling problems reported in bug [ 1934841 ] messages should be more understandable to ordinary users so far Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/ImageCache.cpp hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/CPListFrame.cpp hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.cpp hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt hugin/trunk/src/hugin1/hugin/xrc/images_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/lens_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/optimize_photo_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/pref_dialog.xrc hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp Removed Paths: ------------- hugin/trunk/src/hugin1/hugin/xrc/ptstitcher_panel.xrc Modified: hugin/trunk/src/hugin1/base_wx/ImageCache.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/ImageCache.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/base_wx/ImageCache.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -680,7 +680,7 @@ } } catch (std::exception & e) { // could not load image.. - wxLogError(wxString::Format(_("Error during image reading: %s"), wxString(e.what(),wxConvLocal).c_str())); + wxLogError(wxString::Format(_("Error reading image: %s"), wxString(e.what(),wxConvLocal).c_str())); throw; } Modified: hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -130,7 +130,7 @@ pano.setOptions(opts); } } else { - wxLogError( wxString::Format(_("error while parsing panos tool script: %s"), scriptFile.c_str()) ); + wxLogError( wxString::Format(_("error while parsing panotools script: %s"), scriptFile.c_str()) ); return false; } Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -748,7 +748,7 @@ // if fine-tune is checked, run a fine-tune session as well. // hmm probably there should be another separate function for this.. if (m_fineTuneCB->IsChecked()) { - MainFrame::Get()->SetStatusText(_("searching similar point..."),0); + MainFrame::Get()->SetStatusText(_("searching similar points..."),0); FDiff2D newPoint = otherImg->getNewPoint(); long templWidth = wxConfigBase::Get()->Read(wxT("/Finetune/TemplateSize"), HUGIN_FT_TEMPLATE_SIZE); @@ -972,7 +972,7 @@ DEBUG_TRACE("tmpl img nr: " << tmplImgNr << " corr src: " << subjImgNr); - MainFrame::Get()->SetStatusText(_("searching similar point..."),0); + MainFrame::Get()->SetStatusText(_("searching similar points..."),0); double corrThresh=HUGIN_FT_CORR_THRESHOLD; wxConfigBase::Get()->Read(wxT("/Finetune/CorrThreshold"),&corrThresh, Modified: hugin/trunk/src/hugin1/hugin/CPListFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPListFrame.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/CPListFrame.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -612,7 +612,7 @@ double threshold = mean_error + std_dev; - wxString t=wxGetTextFromUser(_("Enter minimum control point error.\nAll point with a higher error will be selected"), _("Select Control Points"), + wxString t=wxGetTextFromUser(_("Enter minimum control point error.\nAll points with a higher error will be selected"), _("Select Control Points"), doubleTowxString(threshold,2)); if (t == wxT("")) { // do not select anything @@ -621,7 +621,7 @@ while (!t.ToDouble(&threshold)) { wxMessageBox(_("Error: please enter a valid number."), _("Could not read number"), wxICON_ERROR); - t=wxGetTextFromUser(_("Enter minimum control point error.\nAll point with a higher error will be selected"), _("Select Control Points"), + t=wxGetTextFromUser(_("Enter minimum control point error.\nAll points with a higher error will be selected"), _("Select Control Points"), utils::doubleTowxString(threshold,2)); } Modified: hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -71,7 +71,7 @@ // fill fields wxString fn(srcImg.getFilename().c_str(), *wxConvFileName); wxString message; - message.Printf(_("No or only partial information about field of view was found in image file\n%s\n\nPlease enter the the horizontal field of view (HFOV) or the focal length and crop factor."), fn.c_str()); + message.Printf(_("No or only partial information about field of view was found in image file\n%s\n\nPlease enter the horizontal field of view (HFOV) or the focal length and crop factor."), fn.c_str()); XRCCTRL(*this, "lensdlg_message", wxStaticText)->SetLabel(message); m_projChoice->SetSelection(m_srcImg.getProjection()); Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -1288,7 +1288,8 @@ } } wxString result; - result.Printf(_("%d points fine-tuned, %d points not updated due to low correlation\n\nHint: The errors of the fine-tuned points have been set to the correlation coefficient\nProblematic point can be spotted (just after fine-tune, before optimizing)\nby an error <= %.3f.\nThe error of points without a well defined peak (typically in regions with uniform color)\nwill be set to 0\n\nUse the Control Point list (F3) to see all point of the current project\n"), + result.Printf( +_("%d points fine-tuned, %d points not updated due to low correlation\n\nHint: The errors of the fine-tuned points have been set to the correlation coefficient\nProblematic points can be spotted (just after fine-tune, before optimizing)\nby an error <= %.3f.\nThe error of points without a well defined peak (typically in regions with uniform color)\nwill be set to 0\n\nUse the Control Point list (F3) to see all points of the current project\n") nGood, nBad, corrThresh); wxMessageBox(result, _("Fine-tune result"), wxOK); // set newly optimized points Modified: hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -583,7 +583,7 @@ wxString msg; int style=0; if (smallHFOV) { - msg.Printf( _("Optimizer run finished.\nWARNING: a very small Field of View (v) has been estimated\n\nThe results are probably invalid.\n\nOptimisation of the Field of View (v) of partial panoramas can lead to bad results.\nTry adding more images and control points.\n\nApply the changes anyway?")); + msg.Printf( _("Optimizer run finished.\nWARNING: a very small Field of View (v) has been estimated\n\nThe results are probably invalid.\n\nOptimization of the Field of View (v) of partial panoramas can lead to bad results.\nTry adding more images and control points.\n\nApply the changes anyway?")); style = wxYES_NO; } else if (highDist) { msg.Printf(_("Optimizer run finished.\nResults:\n average control point distance: %f\n standard deviation: %f\n maximum: %f\n\n*WARNING*: very high distortion coefficients (a,b,c) have been estimated.\nThe results are probably invalid.\nOnly optimize all distortion parameters when many, well spread control points are used.\nPlease reset the a,b and c parameters to zero and add more control points\n\nApply the changes anyway?"), @@ -595,7 +595,7 @@ style = wxYES_NO | wxICON_EXCLAMATION; } - int id = wxMessageBox(msg,_("Optimisation result"),style); + int id = wxMessageBox(msg,_("Optimization result"),style); return id == wxYES; } Modified: hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/OptimizePhotometricPanel.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -465,9 +465,9 @@ long nPoints = 200; wxConfigBase::Get()->Read(wxT("/OptimizePhotometric/nRandomPointsPerImage"), & nPoints); // get parameters for estimation. - nPoints = wxGetNumberFromUser(_("The vignetting and exposure correctione is determined by analysing color values in the overlaping areas.\nTo speed up the computation, only a random subset of points is used."), + nPoints = wxGetNumberFromUser(_("The vignetting and exposure correction is determined by analysing color values in the overlapping areas.\nTo speed up the computation, only a random subset of points is used."), _("Number of points per image"), - _("Photometric optimisation"), nPoints, 0, 32000, + _("Photometric optimization"), nPoints, 0, 32000, this); if (nPoints < 0) { return; @@ -505,7 +505,7 @@ extractPoints(optPano, srcImgs, nPoints, randomPoints, progress, m_points); if (m_points.size() == 0) { - wxMessageBox(_("Error: no overlapping points found, Photometric optimisation aborted"), _("Error")); + wxMessageBox(_("Error: no overlapping points found, Photometric optimization aborted"), _("Error")); return; } @@ -538,14 +538,14 @@ m_points, progress, error); } } catch (std::exception & error) { - wxMessageBox(_("Internal error during photometric optimisation:\n") + wxString(error.what(), wxConvLocal), _("Internal error")); + wxMessageBox(_("Internal error during photometric optimization:\n") + wxString(error.what(), wxConvLocal), _("Internal error")); } progress.Close(); // display information about the estimation process: - int ret = wxMessageBox(wxString::Format(_("Photometric optimisation results:\n Root mean square error:%.2f in gray values (0..255)\nApply results?"), error*255), - _("Photometric optimisation finished"), wxYES_NO | wxICON_INFORMATION); + int ret = wxMessageBox(wxString::Format(_("Photometric optimization results:\n Root mean square error:%.2f in gray values (0..255)\nApply results?"), error*255), + _("Photometric optimization finished"), wxYES_NO | wxICON_INFORMATION); if (ret == wxYES) { DEBUG_DEBUG("Applying vignetting corr"); Modified: hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/data/tips.txt 2008-04-09 20:48:09 UTC (rev 3010) @@ -30,4 +30,4 @@ _("The precision of \"fine tuning\" control points can be improved by enabling rotation search. This is essential for fisheye and wide angle images.") _("Multiple images can be selected in the image and lens tabs. Commands will act on all selected images.") _("Lens parameters may vary with changing focus. For best results, calibrate the parameters using know settings and reuse them later.") -_("Optimisation of all distortion parameters \"everything\" makes only sense with heavily overlapping images and many well distributed control points.") +_("Optimization of all distortion parameters \"everything\" makes only sense with heavily overlapping images and many well distributed control points.") Modified: hugin/trunk/src/hugin1/hugin/xrc/images_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/images_panel.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/images_panel.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -69,8 +69,8 @@ </object> <object class="sizeritem"> <object class="wxButton" name="action_remove_images"> - <label>Remove this image</label> - <tooltip>dismiss the current photo from this project</tooltip> + <label>Remove selected image(s)</label> + <tooltip>Remove the selected images from this project</tooltip> </object> <flag>wxEXPAND</flag> </object> @@ -360,4 +360,4 @@ </object> </object> </object> -</resource> \ No newline at end of file +</resource> Modified: hugin/trunk/src/hugin1/hugin/xrc/lens_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/lens_panel.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/lens_panel.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -33,7 +33,7 @@ <object class="sizeritem"> <object class="wxButton" name="lens_button_save"> <label>Save lens...</label> - <tooltip>Save lens parameters to an file</tooltip> + <tooltip>Save lens parameters to a file</tooltip> </object> <flag>wxEXPAND|wxTOP|wxBOTTOM</flag> <border>5</border> @@ -846,4 +846,4 @@ </object> </object> </object> -</resource> \ No newline at end of file +</resource> Modified: hugin/trunk/src/hugin1/hugin/xrc/optimize_photo_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/optimize_photo_panel.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/optimize_photo_panel.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -12,7 +12,7 @@ <orient>wxVERTICAL</orient> <object class="sizeritem"> <object class="wxStaticText"> - <label>Photometric Optimisation</label> + <label>Photometric Optimization</label> <font> <style platform="mac">normal</style> <family platform="mac">swiss</family> @@ -332,4 +332,4 @@ <style>wxTAB_TRAVERSAL</style> <tooltip>Only use pixels from images selected in preview window. Useful to avoid errors due to badly aligned images (for example, the nadir image in a fisheye panorama).</tooltip> </object> -</resource> \ No newline at end of file +</resource> Modified: hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/pano_panel.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -20,7 +20,7 @@ <item>Sinc 256</item> <item>Spline 64</item> <item>Bilinear</item> - <item>Nearest neighbour</item> + <item>Nearest neighbor</item> <item>Sinc 1024</item> </content> <selection>0</selection> @@ -470,7 +470,7 @@ <object class="sizeritem"> <object class="wxCheckBox" name="pano_cb_ldr_output_blended"> <label>Blended panorama</label> - <tooltip>Use blend the individual layers using the selected blender</tooltip> + <tooltip>Blend all images into a seamless panorama. Use if all images have similar exposure</tooltip> </object> </object> <object class="sizeritem"> @@ -968,4 +968,4 @@ </object> </object> </object> -</resource> \ No newline at end of file +</resource> Modified: hugin/trunk/src/hugin1/hugin/xrc/pref_dialog.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/pref_dialog.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/pref_dialog.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -185,7 +185,7 @@ <cols>3</cols> <object class="sizeritem"> <object class="wxStaticText" name=""> - <label>Number of Ctrl Points + <label>Number of Control Points per overlap</label> </object> <flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag> @@ -1043,4 +1043,4 @@ </object> </object> </object> -</resource> \ No newline at end of file +</resource> Deleted: hugin/trunk/src/hugin1/hugin/xrc/ptstitcher_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/ptstitcher_panel.xrc 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/hugin/xrc/ptstitcher_panel.xrc 2008-04-09 20:48:09 UTC (rev 3010) @@ -1,298 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<resource> - <object class="wxPanel" name="ptstitcher_panel"> - <object class="wxBoxSizer"> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>Stitching Options</label> - - <font> - - <size platform="mac">12</size> - - <style platform="mac">normal</style> - - <weight>bold</weight> - - <family platform="mac">swiss</family> - - </font> - </object> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <cols>4</cols> - <rows>6</rows> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>interpolator (i):</label> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_interpolator"> - - <content> - <item>Poly3 (Bicubic)</item> - <item>Spline 16</item> - <item>Spline 36</item> - <item>Sinc 256</item> - <item>Spline 64</item> - <item>Bilinear</item> - <item>Nearest neighbour</item> - <item>Sinc 1024</item> - </content> - - <selection>0</selection> - - <tooltip>approximation of values between source pixels</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - - <label>gamma (g):</label> - </object> - - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxTextCtrl" name="pano_val_gamma"> - - <value>1</value> - - <size>50,-1</size> - - <style>wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB</style> - - <tooltip></tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>exposure correction:</label> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_color_corr_mode"> - - <content> - <item>None</item> - <item>Brightness and Color (k)</item> - <item>Brightness (b)</item> - <item>Color (d)</item> - </content> - - <selection>0</selection> - - <tooltip>select kind of exposure correction relative to the anchor image</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>exposure anchor:</label> - </object> - - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxSpinCtrl" name="pano_spin_color_corr_reference"> - - <value>0</value> - - <size>50,-1</size> - - <tooltip>image used as reference for exposure correction</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>fast transform (f):</label> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_speedup"> - - <content> - <item>None</item> - <item>Fast (0)</item> - <item>Medium (1)</item> - </content> - - <selection>0</selection> - - <tooltip>approximate remapping, faster but slightly less accurate. Fast should work well with usual panos, Medium even with morphed panos</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>feather width:</label> - </object> - - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxSpinCtrl" name="pano_spin_feather_width"> - - <size>50,-1</size> - - <tooltip>width of the transition between images</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <vgap>6</vgap> - <hgap>12</hgap> - </object> - - <flag>wxALL</flag> - - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>Output File Options</label> - - <font> - - <size platform="mac">12</size> - - <style platform="mac">normal</style> - - <weight>bold</weight> - - <family platform="mac">swiss</family> - - </font> - </object> - - <flag>wxTOP</flag> - - <border>6</border> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <cols>4</cols> - <rows>6</rows> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>image format:</label> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxChoice" name="pano_choice_format_final"> - - <content> - <item>JPG</item> - <item>PNG</item> - <item>TIFF</item> - <item>Multiple TIFF</item> - <item>Multiple TIFF with masks</item> - <item>PICT</item> - <item>PSD</item> - <item>Layered PSD</item> - <item>Layered PSD with masks</item> - <item>PAN</item> - <item>IVR</item> - <item>Java IVR</item> - <item>VRML</item> - <item>QTVR</item> - </content> - - <selection>2</selection> - - <style></style> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - - <label>compression:</label> - - <tooltip>JPEG compression (0-100)</tooltip> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxSpinCtrl" name="pano_jpeg_quality"> - - <size>50,-1</size> - - <min>0</min> - - <max>100</max> - </object> - - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <vgap>6</vgap> - <hgap>12</hgap> - </object> - - <flag>wxALL</flag> - - <border>6</border> - </object> - <object class="spacer"> - - <size>0,6</size> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="pano_edit_script"> - - <label>edit script before stitching</label> - - <tooltip>for advanced users</tooltip> - </object> - - <flag>wxTOP|wxALIGN_CENTRE_VERTICAL</flag> - - <border>6</border> - </object> - </object> - - <flag>wxTOP|wxLEFT|wxRIGHT|wxEXPAND</flag> - - <border>6</border> - </object> - <orient>wxVERTICAL</orient> - </object> - </object> -</resource> \ No newline at end of file Modified: hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp =================================================================== --- hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-04-09 20:47:06 UTC (rev 3009) +++ hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-04-09 20:48:09 UTC (rev 3010) @@ -235,7 +235,7 @@ if (newPano.loadPTScript(prjfile, ptoVersion, (const char *)path.mb_str(*wxConvFileName))) { pano.setMemento(newPano); } else { - wxLogError( wxString::Format(_("error while parsing panos tool script: %s"), scriptFile.c_str()) ); + wxLogError( wxString::Format(_("error while parsing panotools script: %s"), scriptFile.c_str()) ); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-05-05 05:48:29
|
Revision: 3054 http://hugin.svn.sourceforge.net/hugin/?rev=3054&view=rev Author: dangelo Date: 2008-05-04 22:48:28 -0700 (Sun, 04 May 2008) Log Message: ----------- Patch by Guido Kohlmeyer. Fixed loading of translations of nona_gui and hugin_stitch_project on Windows and maybe OSX. Modified Paths: -------------- hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp =================================================================== --- hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-05-04 15:38:03 UTC (rev 3053) +++ hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-05-05 05:48:28 UTC (rev 3054) @@ -35,6 +35,7 @@ #include <vigra/error.hxx> #include "PT/Stitcher.h" #include "base_wx/MyProgressDialog.h" +#include "base_wx/huginConfig.h" #include <tiffio.h> @@ -102,15 +103,14 @@ bool nonaApp::OnInit() { SetAppName(wxT("nona_gui")); - - wxString exePath; - wxFileName::SplitPath( argv[0], &exePath, NULL, NULL ); - m_locale.Init(wxLANGUAGE_DEFAULT); - // add local Paths - m_locale.AddCatalogLookupPathPrefix(exePath + wxT("/locale")); #if defined __WXMSW__ - m_locale.AddCatalogLookupPathPrefix(wxT("./locale")); + wxString nonaExeDir = getExePath(argv[0]); + + wxString nonaRoot; + wxFileName::SplitPath(nonaExeDir, &nonaRoot, NULL, NULL); + // locale setup + m_locale.AddCatalogLookupPathPrefix(nonaRoot + wxT("/share/locale")); #elif (defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE) // TODO: add localisation init #else Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-05-04 15:38:03 UTC (rev 3053) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-05-05 05:48:28 UTC (rev 3054) @@ -251,18 +251,14 @@ wxString huginExeDir = getExePath(argv[0]); wxString huginRoot; - wxFileName::SplitPath( huginExeDir, &huginRoot, NULL, NULL ); - m_locale.AddCatalogLookupPathPrefix(huginRoot + wxT("/locale")); + wxFileName::SplitPath(huginExeDir, &huginRoot, NULL, NULL); + + // locale setup + m_locale.AddCatalogLookupPathPrefix(huginRoot + wxT("/share/locale")); PTPrograms progs = getPTProgramsConfig(huginExeDir, wxConfigBase::Get()); -#else - // add the locale directory specified during configure - m_locale.AddCatalogLookupPathPrefix(wxT(INSTALL_LOCALE_DIR)); - PTPrograms progs = getPTProgramsConfig(wxT(""), wxConfigBase::Get()); -#endif - -#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE - { +#elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE + { wxString exec_path = MacGetPathToBundledExecutableFile(CFSTR("nona")); if(exec_path != wxT("")) { @@ -274,8 +270,22 @@ { progs.hdrmerge = exec_path.mb_str(*wxConvFileName); } + } + { + wxString thePath = MacGetPathToBundledResourceFile(CFSTR("locale")); + if(thePath != wxT("")) + locale.AddCatalogLookupPathPrefix(thePath); + else { + wxMessageBox(_("Translations not found in bundle"), _("Fatal Error")); + return false; + } } +#else + // add the locale directory specified during configure + m_locale.AddCatalogLookupPathPrefix(wxT(INSTALL_LOCALE_DIR)); + PTPrograms progs = getPTProgramsConfig(wxT(""), wxConfigBase::Get()); #endif + // update incompatible configuration entries. updateHuginConfig(wxConfigBase::Get()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-05-12 08:57:09
|
Revision: 3063 http://hugin.svn.sourceforge.net/hugin/?rev=3063&view=rev Author: dangelo Date: 2008-05-12 01:57:08 -0700 (Mon, 12 May 2008) Log Message: ----------- When stitching, save project to temporary pto file and then run hugin_stitch_project on that. Fixes bug [ 1961684 ] error when cancel Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp Modified: hugin/trunk/src/hugin1/hugin/PanoPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-05-12 08:53:24 UTC (rev 3062) +++ hugin/trunk/src/hugin1/hugin/PanoPanel.cpp 2008-05-12 08:57:08 UTC (rev 3063) @@ -758,13 +758,24 @@ } // save project - wxCommandEvent dummy; - MainFrame::Get()->OnSaveProject(dummy); + // copy pto file to temporary file + wxString currentPTOfn = wxFileName::CreateTempFileName(wxT("huginpto_")); + if(currentPTOfn.size() == 0) { + wxLogError(_("Could not create temporary file")); + } + DEBUG_DEBUG("tmp PTO file: " << (const char *)currentPTOfn.mb_str(wxConvLocal)); + // copy is not enough, need to adjust image path names... + ofstream script(currentPTOfn.mb_str(HUGIN_CONV_FILENAME)); + PT::UIntSet all; + if (pano->getNrOfImages() > 0) { + fill_set(all, 0, pano->getNrOfImages()-1); + } + pano->printPanoramaScript(script, pano->getOptimizeVector(), pano->getOptions(), all, false, ""); + script.close(); - // run stitching in a separate process - wxString ptofile = MainFrame::Get()->getProjectName(); - - +// wxCommandEvent dummy; +// MainFrame::Get()->OnSaveProject(dummy); + #if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE // HuginStitchProject inside main bundle wxString hugin_stitch_project = MacGetPathToBundledAppMainExecutableFile(CFSTR("HuginStitchProject.app")); @@ -783,6 +794,8 @@ #else wxString hugin_stitch_project = wxT("hugin_stitch_project"); #endif + +/* wxFileName prefixFN(ptofile); wxString outputPrefix; if (prefixFN.GetExt() == wxT("pto")) { @@ -790,10 +803,11 @@ } else { outputPrefix = ptofile; } - +*/ + //TODO: don't overwrite files without warning! // wxString command = hugin_stitch_project + wxT(" -o ") + wxQuoteFilename(outputPrefix) + wxT(" ") + wxQuoteFilename(ptofile); - wxString command = hugin_stitch_project + wxT(" ") + wxQuoteFilename(ptofile); + wxString command = hugin_stitch_project + wxT(" -d ") + wxQuoteFilename(currentPTOfn); #ifdef __WXGTK__ // work around a wxExecute bug/problem @@ -823,7 +837,7 @@ } else { wxString quoted = utils::wxQuoteFilename(wxfn); args.Replace(wxT("%f"), quoted); - quoted = utils::wxQuoteFilename(wxString(pano->getImage(0).getFilename().c_str(), *wxConvFileName)); + quoted = utils::wxQuoteFilename(wxString(pano->getImage(0).getFilename().c_str(), HUGIN_CONV_FILENAME)); args.Replace(wxT("%i"), quoted); wxString cmdline = utils::wxQuoteFilename(editor) + wxT(" ") + args; Modified: hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp =================================================================== --- hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-05-12 08:53:24 UTC (rev 3062) +++ hugin/trunk/src/hugin1/stitch_project/hugin_stitch_project.cpp 2008-05-12 08:57:08 UTC (rev 3063) @@ -262,13 +262,13 @@ wxString exec_path = MacGetPathToBundledExecutableFile(CFSTR("nona")); if(exec_path != wxT("")) { - progs.nona = exec_path.mb_str(*wxConvFileName); + progs.nona = exec_path.mb_str(HUGIN_CONV_FILENAME); } exec_path = MacGetPathToBundledExecutableFile(CFSTR("hugin_hdrmerge")); if(exec_path != wxT("")) { - progs.hdrmerge = exec_path.mb_str(*wxConvFileName); + progs.hdrmerge = exec_path.mb_str(HUGIN_CONV_FILENAME); } } { @@ -300,6 +300,7 @@ { wxCMD_LINE_OPTION, wxT("o"), wxT("output"), wxT("output prefix") }, { wxCMD_LINE_OPTION, wxT("t"), wxT("threads"), wxT("number of threads"), wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, wxT("d"), wxT("delete"), wxT("delete pto file after stitching") }, { wxCMD_LINE_PARAM, NULL, NULL, _T("<project> <images>"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + wxCMD_LINE_PARAM_MULTIPLE }, { wxCMD_LINE_NONE } @@ -406,7 +407,11 @@ wxFileName basename(scriptFile); frame->SetTitle(wxString::Format(_("%s - Stitching"), basename.GetName().c_str())); - return frame->StitchProject(scriptFile, outname, progs); + int n = frame->StitchProject(scriptFile, outname, progs); + if (parser.Found(wxT("d")) ) { + wxRemoveFile(scriptFile); + } + return n; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <da...@us...> - 2008-05-12 09:44:18
|
Revision: 3066 http://hugin.svn.sourceforge.net/hugin/?rev=3066&view=rev Author: dangelo Date: 2008-05-12 02:44:15 -0700 (Mon, 12 May 2008) Log Message: ----------- Windows only: Change conversion routine for wxString <-> std::string used for filenames back to wxConvCurrent. Might fix [ 1908349 ] "failed to decode image" when path contains non-latin chars Modified Paths: -------------- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp hugin/trunk/src/hugin1/base_wx/huginConfig.cpp hugin/trunk/src/hugin1/base_wx/platform.h hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp hugin/trunk/src/hugin1/hugin/ImagesList.cpp hugin/trunk/src/hugin1/hugin/LensPanel.cpp hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp hugin/trunk/src/hugin1/hugin/huginApp.cpp hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp hugin/trunk/src/hugin1/hugin/wxPanoCommand.h hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp Modified: hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/base_wx/RunStitchPanel.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -111,7 +111,7 @@ wxFileName::SplitPath(scriptFile, &pathToPTO, NULL, NULL); pathToPTO.Append(wxT("/")); - ifstream prjfile((const char *)scriptFile.mb_str(*wxConvFileName)); + ifstream prjfile((const char *)scriptFile.mb_str(HUGIN_CONV_FILENAME)); if (prjfile.bad()) { wxLogError( wxString::Format(_("could not open script : %s"), scriptFile.c_str()) ); return false; @@ -120,7 +120,7 @@ PT::Panorama pano; PT::PanoramaMemento newPano; int ptoVersion = 0; - if (newPano.loadPTScript(prjfile, ptoVersion, (const char *)pathToPTO.mb_str(*wxConvFileName))) { + if (newPano.loadPTScript(prjfile, ptoVersion, (const char *)pathToPTO.mb_str(HUGIN_CONV_FILENAME))) { pano.setMemento(newPano); if (ptoVersion < 2) { HuginBase::PanoramaOptions opts = pano.getOptions(); @@ -170,7 +170,7 @@ } DEBUG_DEBUG("tmpPTOfn file: " << (const char *)m_currentPTOfn.mb_str(wxConvLocal)); // copy is not enough, need to adjust image path names... - ofstream script(m_currentPTOfn.mb_str(*wxConvFileName)); + ofstream script(m_currentPTOfn.mb_str(HUGIN_CONV_FILENAME)); PT::UIntSet all; if (pano.getNrOfImages() > 0) { fill_set(all, 0, pano.getNrOfImages()-1); @@ -188,11 +188,11 @@ return false; } DEBUG_DEBUG("makefn file: " << (const char *)m_currentMakefn.mb_str(wxConvLocal)); - ofstream makeFileStream(m_currentMakefn.mb_str(*wxConvFileName)); + ofstream makeFileStream(m_currentMakefn.mb_str(HUGIN_CONV_FILENAME)); makeFile.Close(); - std::string resultFn(basename.mb_str(*wxConvFileName)); - std::string tmpPTOfnC = (const char *) m_currentPTOfn.mb_str(*wxConvFileName); + std::string resultFn(basename.mb_str(HUGIN_CONV_FILENAME)); + std::string tmpPTOfnC = (const char *) m_currentPTOfn.mb_str(HUGIN_CONV_FILENAME); std::vector<std::string> outputFiles; HuginBase::PanoramaMakefileExport::createMakefile(pano, Modified: hugin/trunk/src/hugin1/base_wx/huginConfig.cpp =================================================================== --- hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/base_wx/huginConfig.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -41,7 +41,7 @@ if (config->Read(name + wxT("/Custom"), 0l)) { wxString fn = config->Read(name + wxT("/Exe"),wxT("")); if (wxFileName::FileExists(fn)) { - pname = fn.mb_str(*wxConvFileName); + pname = fn.mb_str(HUGIN_CONV_FILENAME); return pname; } else { wxMessageBox(wxString::Format(_("External program %s not found as specified in preferences, reverting to bundled version"), file.c_str()), _("Error")); @@ -52,10 +52,10 @@ wxString exiftoolDirPath = MacGetPathToBundledResourceFile(CFSTR("ExifTool")); if(exiftoolDirPath != wxT("")) { - pname = (exiftoolDirPath+wxT("/")+file).mb_str(*wxConvFileName); + pname = (exiftoolDirPath+wxT("/")+file).mb_str(HUGIN_CONV_FILENAME); } else { wxMessageBox(wxString::Format(_("External program %s not found in the bundle, reverting to system path"), file.c_str()), _("Error")); - pname = file.mb_str(*wxConvFileName); + pname = file.mb_str(HUGIN_CONV_FILENAME); } return pname; } @@ -67,9 +67,9 @@ if(fn == wxT("")) { wxMessageBox(wxString::Format(_("External program %s not found in the bundle, reverting to system path"), file.c_str()), _("Error")); - pname = file.mb_str(*wxConvFileName); + pname = file.mb_str(HUGIN_CONV_FILENAME); } else { - pname = fn.mb_str(*wxConvFileName); + pname = fn.mb_str(HUGIN_CONV_FILENAME); } return pname; @@ -77,32 +77,32 @@ if (config->Read(name + wxT("/Custom"), 0l)) { wxString fn = config->Read(name + wxT("/Exe"),wxT("")); if (wxFileName::FileExists(fn)) { - pname = fn.mb_str(*wxConvFileName); + pname = fn.mb_str(HUGIN_CONV_FILENAME); } else { wxMessageBox(wxString::Format(_("External program %s not found as specified in preferences, reverting to bundled version"), file.c_str()), _("Error")); - pname = (bindir + wxT("\\") + file).mb_str(*wxConvFileName); + pname = (bindir + wxT("\\") + file).mb_str(HUGIN_CONV_FILENAME); } } else { - pname = (bindir + wxT("\\") + file).mb_str(*wxConvFileName); + pname = (bindir + wxT("\\") + file).mb_str(HUGIN_CONV_FILENAME); } return pname; #else // unix, never bundled if (config->Read(name + wxT("/Custom"), 0l)) { wxString fn = config->Read(name + wxT("/Exe"),wxT("")); - pname = fn.mb_str(*wxConvFileName); + pname = fn.mb_str(HUGIN_CONV_FILENAME); return pname; // TODO: need to search path, a simple FileExists() doesn't work as expected. /* if (wxFileName::FileExists(fn)) { - pname = fn.mb_str(*wxConvFileName); + pname = fn.mb_str(HUGIN_CONV_FILENAME); return pname; } else { wxMessageBox(wxString::Format(_("External program %s not found as specified in preferences, reverting to system path"), file.c_str()), _("Error")); } */ } - pname = file.mb_str(*wxConvFileName); + pname = file.mb_str(HUGIN_CONV_FILENAME); return pname; #endif } @@ -136,7 +136,7 @@ progs.exiftool_opts = config->Read(wxT("/Exiftool/CopyArgs"), wxT(HUGIN_EXIFTOOL_COPY_ARGS)).mb_str(wxConvLocal); // smartblend (never bundled) - progs.smartblend = config->Read(wxT("/Smartblend/SmartblendExe"),wxT("smartblend.exe")).mb_str(*wxConvFileName); + progs.smartblend = config->Read(wxT("/Smartblend/SmartblendExe"),wxT("smartblend.exe")).mb_str(HUGIN_CONV_FILENAME); progs.smartblend_opts = config->Read(wxT("/Smartblend/SmartblendArgs"),wxT(HUGIN_SMARTBLEND_ARGS)).mb_str(wxConvLocal); return progs; Modified: hugin/trunk/src/hugin1/base_wx/platform.h =================================================================== --- hugin/trunk/src/hugin1/base_wx/platform.h 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/base_wx/platform.h 2008-05-12 09:44:15 UTC (rev 3066) @@ -30,6 +30,12 @@ #include "panoinc_WX.h" #include <config.h> +#ifdef __WXMSW__ +#define HUGIN_CONV_FILENAME (*wxConvCurrent) +#else +#define HUGIN_CONV_FILENAME (*wxConvFileName) +#endif + #define HUGIN_WX_FILE_IMG_FILTER _("All Image files|*.jpg;*.JPG;*jpeg;*JPEG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg)|*.jpg;*.JPG;*.jpeg;*.JPEG|All files (*)|*") #if defined __WXMAC__ Modified: hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/AutoCtrlPointCreator.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -43,6 +43,7 @@ #include "base_wx/MyExternalCmdExecDialog.h" #include "base_wx/platform.h" +#include "base_wx/huginConfig.h" #include "common/wxPlatform.h" #include <wx/utils.h> @@ -281,7 +282,7 @@ for(UIntSet::const_iterator it = imgs.begin(); it != imgs.end(); it++) { imgMapping[imgNr] = *it; - namefile.Write(wxString(pano.getImage(*it).getFilename().c_str(), *wxConvFileName)); + namefile.Write(wxString(pano.getImage(*it).getFilename().c_str(), HUGIN_CONV_FILENAME)); namefile.Write(wxT("\r\n")); imgNr++; } @@ -298,7 +299,7 @@ imgFiles.append(" ").append(quoteFilename(pano.getImage(*it).getFilename())); imgNr++; } - autopanoArgs.Replace(wxT("%i"), wxString (imgFiles.c_str(), *wxConvFileName)); + autopanoArgs.Replace(wxT("%i"), wxString (imgFiles.c_str(), HUGIN_CONV_FILENAME)); } wxString ptoinfile_name; @@ -356,7 +357,7 @@ } // read and update control points - cps = readUpdatedControlPoints((const char *)ptofile.mb_str(*wxConvFileName), pano); + cps = readUpdatedControlPoints((const char *)ptofile.mb_str(HUGIN_CONV_FILENAME), pano); #ifdef __WXMSW__ // set old cwd. @@ -425,7 +426,7 @@ tmp.Printf(wxT("%d"), (int) firstImg.getProjection()); autopanoArgs.Replace(wxT("%f"), tmp); - autopanoArgs.Replace(wxT("%i"), wxString (imgFiles.c_str(), *wxConvFileName)); + autopanoArgs.Replace(wxT("%i"), wxString (imgFiles.c_str(), HUGIN_CONV_FILENAME)); wxString tempdir = ptofn.GetPath(); autopanoArgs.Replace(wxT("%d"), ptofn.GetPath()); @@ -467,7 +468,7 @@ return cps; } // read and update control points - cps = readUpdatedControlPoints((const char *)ptofile.mb_str(*wxConvFileName), pano); + cps = readUpdatedControlPoints((const char *)ptofile.mb_str(HUGIN_CONV_FILENAME), pano); if (!wxRemoveFile(ptofile)) { DEBUG_DEBUG("could not remove temporary file: " << ptofile.c_str()); Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -1290,7 +1290,7 @@ #ifdef HUGIN_CP_IMG_CHOICE for (unsigned int i=0; i < ((nrTabs < nrImages)? nrTabs: nrImages); i++) { - wxFileName fileName(wxString (pano.getImage(i).getFilename().c_str(), *wxConvFileName)); + wxFileName fileName(wxString (pano.getImage(i).getFilename().c_str(), HUGIN_CONV_FILENAME)); m_leftChoice->SetString(i, wxString::Format(wxT("%2d"), i) + wxT(". - ") + fileName.GetFullName()); m_rightChoice->SetString(i, wxString::Format(wxT("%2d"), i) + wxT(". - ") + fileName.GetFullName()); } @@ -1312,7 +1312,7 @@ if (nrTabs < nrImages) { for (unsigned int i=nrTabs; i < nrImages; i++) { #ifdef HUGIN_CP_IMG_CHOICE - wxFileName fileName(wxString (pano.getImage(i).getFilename().c_str(), *wxConvFileName)); + wxFileName fileName(wxString (pano.getImage(i).getFilename().c_str(), HUGIN_CONV_FILENAME)); m_leftChoice->Append(wxString::Format(wxT("%2d"), i) + wxT(". - ") + fileName.GetFullName()); m_rightChoice->Append(wxString::Format(wxT("%2d"), i) + wxT(". - ") + fileName.GetFullName()); #endif Modified: hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/HFOVDialog.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -29,6 +29,7 @@ #include "panoinc_WX.h" #include "common/wxPlatform.h" +#include "base_wx/platform.h" #include "hugin/huginApp.h" #include "hugin/HFOVDialog.h" #include "hugin/MainFrame.h" @@ -69,7 +70,7 @@ DEBUG_ASSERT(m_okButton); // fill fields - wxString fn(srcImg.getFilename().c_str(), *wxConvFileName); + wxString fn(srcImg.getFilename().c_str(), HUGIN_CONV_FILENAME); wxString message; message.Printf(_("No or only partial information about field of view was found in image file\n%s\n\nPlease enter the horizontal field of view (HFOV) or the focal length and crop factor."), fn.c_str()); XRCCTRL(*this, "lensdlg_message", wxStaticText)->SetLabel(message); Modified: hugin/trunk/src/hugin1/hugin/ImagesList.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesList.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/ImagesList.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -31,6 +31,7 @@ #include "common/wxPlatform.h" #include "hugin/ImagesList.h" #include "base_wx/ImageCache.h" +#include "base_wx/platform.h" #ifdef __WXMAC__ #include "hugin/MainFrame.h" @@ -358,7 +359,7 @@ DEBUG_DEBUG("update image list item " << imgNr); DEBUG_ASSERT((int)imgNr < GetItemCount()); const PanoImage & img = pano->getImage(imgNr); - wxFileName fn(wxString (img.getFilename().c_str(), *wxConvFileName)); + wxFileName fn(wxString (img.getFilename().c_str(), HUGIN_CONV_FILENAME)); VariableMap var = pano->getImageVariables(imgNr); // wxLogMessage(wxString::Format(_("updating image list item %d, filename %s"),imgNr, fn.GetFullName())); @@ -476,7 +477,7 @@ void ImagesListLens::UpdateItem(unsigned int imgNr) { const PanoImage & img = pano->getImage(imgNr); - wxFileName fn(wxString (img.getFilename().c_str(), *wxConvFileName)); + wxFileName fn(wxString (img.getFilename().c_str(), HUGIN_CONV_FILENAME)); SetItem(imgNr, 1, fn.GetFullName() ); SetItem(imgNr, 2, wxString::Format(wxT("%d"),img.getLensNr())); @@ -579,7 +580,7 @@ void ImagesListCrop::UpdateItem(unsigned int imgNr) { const PanoImage & img = pano->getImage(imgNr); - wxFileName fn(wxString (img.getFilename().c_str(), *wxConvFileName)); + wxFileName fn(wxString (img.getFilename().c_str(), HUGIN_CONV_FILENAME)); wxString cropstr(wxT("-")); if ( img.getOptions().docrop ) { Modified: hugin/trunk/src/hugin1/hugin/LensPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -814,7 +814,7 @@ { unsigned int imgNr = *it; // check file extension - wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), *wxConvFileName)); + wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), HUGIN_CONV_FILENAME)); #ifndef HUGIN_USE_EXIV2 if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 || file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ) @@ -884,6 +884,10 @@ // loop to save lens variables const char ** varname = Lens::variableNames; while (*varname) { + if (string(*varname) == "Eev") { + varname++; + continue; + } wxString key(wxT("Lens/")); key.append(wxString(*varname, wxConvLocal)); cfg.Write(key, const_map_get(vars,*varname).getValue()); @@ -895,7 +899,7 @@ ImageOptions imgopts = pano->getImage(imgNr).getOptions(); cfg.Write(wxT("Lens/vigCorrMode"), imgopts.m_vigCorrMode); cfg.Write(wxT("Lens/flatfield"), - wxString(imgopts.m_flatfield.c_str(), *wxConvFileName) ); + wxString(imgopts.m_flatfield.c_str(), HUGIN_CONV_FILENAME) ); cfg.Write(wxT("Lens/crop/enabled"), imgopts.docrop ? 1l : 0l); cfg.Write(wxT("Lens/crop/autoCenter"), imgopts.autoCenterCrop ? 1l : 0l); @@ -905,11 +909,12 @@ cfg.Write(wxT("Lens/crop/bottom"), imgopts.cropRect.bottom()); // try to read the exif data and add that to the lens ini file - wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), *wxConvFileName)); + wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), HUGIN_CONV_FILENAME)); if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 || file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ) { + // TODO: use EXIF2 for reading this exif data. ImageInfo_t exif; ResetJpgfile(); // Start with an empty image information structure. @@ -1031,6 +1036,10 @@ // loop to load lens variables const char ** varname = Lens::variableNames; while (*varname) { + if (string(*varname) == "Eev") { + varname++; + continue; + } wxString key(wxT("Lens/")); key.append(wxString(*varname, wxConvLocal)); d = 0; @@ -1053,7 +1062,7 @@ wxString flatfield; bool readok = cfg.Read(wxT("Lens/flatfield"), &flatfield); if (readok) { - imgopts.m_flatfield = std::string((const char *)flatfield.mb_str(*wxConvFileName)); + imgopts.m_flatfield = std::string((const char *)flatfield.mb_str(HUGIN_CONV_FILENAME)); } // TODO: crop parameters Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -118,7 +118,7 @@ file.GetExt().CmpNoCase(wxT("hdr")) == 0 || file.GetExt().CmpNoCase(wxT("viff")) == 0 ) { - filesv.push_back((const char *)filenames[i].mb_str(*wxConvFileName)); + filesv.push_back((const char *)filenames[i].mb_str(HUGIN_CONV_FILENAME)); } } // we got some images to add. @@ -500,9 +500,9 @@ scriptName = m_filename; } else { // the project file is just a PTOptimizer script... - std::string path = getPathPrefix(std::string(scriptName.GetFullPath().mb_str(*wxConvFileName))); + std::string path = getPathPrefix(std::string(scriptName.GetFullPath().mb_str(HUGIN_CONV_FILENAME))); DEBUG_DEBUG("stripping " << path << " from image filenames"); - std::ofstream script(scriptName.GetFullPath().mb_str(*wxConvFileName)); + std::ofstream script(scriptName.GetFullPath().mb_str(HUGIN_CONV_FILENAME)); PT::OptimizeVector optvec = opt_panel->getOptimizeVector(); PT::UIntSet all; if (pano.getNrOfImages() > 0) { @@ -517,14 +517,14 @@ #endif if (createMakefile && pano.getNrOfImages() > 0) { wxString makefn = scriptName.GetFullPath() + wxT(".mk"); - std::ofstream makefile(makefn.mb_str(*wxConvFileName)); + std::ofstream makefile(makefn.mb_str(HUGIN_CONV_FILENAME)); wxString ptoFnWX = scriptName.GetFullPath(); - std::string ptoFn(ptoFnWX.mb_str(*wxConvFileName)); + std::string ptoFn(ptoFnWX.mb_str(HUGIN_CONV_FILENAME)); wxString bindir = huginApp::Get()->GetUtilsBinDir(); PTPrograms progs = getPTProgramsConfig(bindir, wxConfigBase::Get()); std::string resultFn; wxString resultFnwx = scriptName.GetFullPath(); - resultFn = resultFnwx.mb_str(*wxConvFileName); + resultFn = resultFnwx.mb_str(HUGIN_CONV_FILENAME); resultFn = utils::stripPath(utils::stripExtension(resultFn)); std::vector<std::string> outputFiles; @@ -601,7 +601,7 @@ if (pano.getNrOfImages() > 0) { fill_set(all, 0, pano.getNrOfImages()-1); } - std::ofstream script(scriptName.GetFullPath().mb_str(*wxConvFileName)); + std::ofstream script(scriptName.GetFullPath().mb_str(HUGIN_CONV_FILENAME)); pano.printStitcherScript(script, pano.getOptions(), all); script.close(); } @@ -623,11 +623,11 @@ // get the global config object wxConfigBase* config = wxConfigBase::Get(); - std::ifstream file((const char *)filename.mb_str(*wxConvFileName)); + std::ifstream file((const char *)filename.mb_str(HUGIN_CONV_FILENAME)); if (file.good()) { wxBusyCursor wait; GlobalCmdHist::getInstance().addCommand( - new wxLoadPTProjectCmd(pano,file, (const char *)path.mb_str(*wxConvFileName)) + new wxLoadPTProjectCmd(pano,file, (const char *)path.mb_str(HUGIN_CONV_FILENAME)) ); DEBUG_DEBUG("project contains " << pano.getNrOfImages() << " after load"); opt_panel->setOptimizeVector(pano.getOptimizeVector()); @@ -762,7 +762,7 @@ std::vector<std::string> filesv; for (unsigned int i=0; i< Pathnames.GetCount(); i++) { - filesv.push_back((const char *)Pathnames[i].mb_str(*wxConvFileName)); + filesv.push_back((const char *)Pathnames[i].mb_str(HUGIN_CONV_FILENAME)); } // we got some images to add. @@ -856,11 +856,11 @@ // Get the filename. const PanoImage& image = pano.getImage(images); std::string filename = image.getFilename(); - wxString file(filename.c_str(), *wxConvFileName); + wxString file(filename.c_str(), HUGIN_CONV_FILENAME); preloaded[file] = 1; // Glob for all files of same type in same directory. - wxString name(filename.c_str(), *wxConvFileName); + wxString name(filename.c_str(), HUGIN_CONV_FILENAME); wxString path = ::wxPathOnly(name) + wxT("/*"); file = ::wxFindFirstFile(path); while (!file.IsEmpty()) @@ -881,10 +881,10 @@ { wxString file = found->first; // Check the time if it's got a camera EXIF timestamp. - time_t stamp = ReadJpegTime(file.mb_str(*wxConvFileName)); + time_t stamp = ReadJpegTime(file.mb_str(HUGIN_CONV_FILENAME)); if (stamp) { filenames[file] = stamp; - timeMap[(const char *)file.mb_str(*wxConvFileName)] = stamp; + timeMap[(const char *)file.mb_str(HUGIN_CONV_FILENAME)] = stamp; } } @@ -913,7 +913,7 @@ --images; const PanoImage& image = pano.getImage(images); std::string filename = image.getFilename(); - wxString file(filename.c_str(), *wxConvFileName); + wxString file(filename.c_str(), HUGIN_CONV_FILENAME); if (file == recruit) continue; @@ -923,7 +923,7 @@ { // Load this file, and remember it. DEBUG_TRACE("Recruited " << recruit.mb_str(wxConvLocal)); - std::string file = (const char *)recruit.mb_str(*wxConvFileName); + std::string file = (const char *)recruit.mb_str(HUGIN_CONV_FILENAME); filesv.push_back(file); // Don't recruit it again. filenames[recruit] = 0; @@ -1157,7 +1157,7 @@ wxString filename = dlg.GetPath(); wxConfig::Get()->Write(wxT("/templatePath"), dlg.GetDirectory()); // remember for later - std::ifstream file((const char *)filename.mb_str(*wxConvFileName)); + std::ifstream file((const char *)filename.mb_str(HUGIN_CONV_FILENAME)); GlobalCmdHist::getInstance().addCommand( new wxApplyTemplateCmd(pano, file)); Modified: hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/PreviewFrame.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -37,6 +37,7 @@ #include "panoinc.h" +#include "base_wx/platform.h" #include "hugin/config_defaults.h" #include "hugin/PreviewFrame.h" #include "hugin/huginApp.h" @@ -548,7 +549,7 @@ ID_TOGGLE_BUT + *it, wxString::Format(wxT("%d"),*it)); #endif - wxFileName tFilename(wxString (pano.getImage(imgNr).getFilename().c_str(), *wxConvFileName)); + wxFileName tFilename(wxString (pano.getImage(imgNr).getFilename().c_str(), HUGIN_CONV_FILENAME)); but->SetToolTip(tFilename.GetFullName()); wxSize sz = but->GetSize(); // but->SetSize(res.GetWidth(),sz.GetHeight()); Modified: hugin/trunk/src/hugin1/hugin/huginApp.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/huginApp.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/huginApp.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -68,8 +68,8 @@ { if (pano.getNrOfImages() > 0) { - wxString first_img(stripExtension(stripPath(pano.getImage(0).getFilename())).c_str(), *wxConvFileName); - wxString last_img(stripExtension(stripPath(pano.getImage(pano.getNrOfImages()-1).getFilename())).c_str(), *wxConvFileName); + wxString first_img(stripExtension(stripPath(pano.getImage(0).getFilename())).c_str(), HUGIN_CONV_FILENAME); + wxString last_img(stripExtension(stripPath(pano.getImage(pano.getNrOfImages()-1).getFilename())).c_str(), HUGIN_CONV_FILENAME); return first_img + wxT("-") + last_img; } else { return wxString(wxT("pano")); @@ -330,7 +330,7 @@ file.GetExt().CmpNoCase(wxT("hdr")) == 0 || file.GetExt().CmpNoCase(wxT("viff")) == 0 ) { - filesv.push_back((const char *)(file.GetFullPath().mb_str(*wxConvFileName))); + filesv.push_back((const char *)(file.GetFullPath().mb_str(HUGIN_CONV_FILENAME))); } } GlobalCmdHist::getInstance().addCommand( Modified: hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/wxPanoCommand.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -176,7 +176,7 @@ for (it = files.begin(); it != files.end(); ++it) { bool added = false; const std::string &filename = *it; - wxString fname(filename.c_str(), *wxConvFileName); + wxString fname(filename.c_str(), HUGIN_CONV_FILENAME); int assumeSimilar = wxConfigBase::Get()->Read(wxT("/LensDefaults/AssumeSimilar"), HUGIN_LENS_ASSUME_SIMILAR); if (!assumeSimilar) { @@ -319,21 +319,21 @@ bool autopanoSiftFile=false; SrcPanoImage autopanoSiftRefImg; for (unsigned int i = 0; i < nImg; i++) { - wxFileName fname(wxString (pano.getImage(i).getFilename().c_str(), *wxConvFileName)); + wxFileName fname(wxString (pano.getImage(i).getFilename().c_str(), HUGIN_CONV_FILENAME)); while (! fname.FileExists()){ // Is file in the new path if (basedir != wxT("")) { DEBUG_DEBUG("Old filename: " << pano.getImage(i).getFilename()); std::string fn = utils::stripPath(pano.getImage(i).getFilename()); DEBUG_DEBUG("Old filename, without path): " << fn); - wxString newname(fn.c_str(), *wxConvFileName); + wxString newname(fn.c_str(), HUGIN_CONV_FILENAME); // GetFullName does only work with local paths (not compatible across platforms) // wxString newname = fname.GetFullName(); fname.AssignDir(basedir); fname.SetFullName(newname); DEBUG_TRACE("filename with new path: " << fname.GetFullPath().mb_str(wxConvLocal)); if (fname.FileExists()) { - pano.setImageFilename(i, (const char *)fname.GetFullPath().mb_str(*wxConvFileName)); + pano.setImageFilename(i, (const char *)fname.GetFullPath().mb_str(HUGIN_CONV_FILENAME)); DEBUG_TRACE("New filename set: " << fname.GetFullPath().mb_str(wxConvLocal)); // TODO - set pano dirty flag so that new paths are saved continue; @@ -352,7 +352,7 @@ HUGIN_WX_FILE_IMG_FILTER, wxOPEN, wxDefaultPosition); dlg.SetDirectory(basedir); if (dlg.ShowModal() == wxID_OK) { - pano.setImageFilename(i, (const char *)dlg.GetPath().mb_str(*wxConvFileName)); + pano.setImageFilename(i, (const char *)dlg.GetPath().mb_str(HUGIN_CONV_FILENAME)); // save used path basedir = dlg.GetDirectory(); DEBUG_INFO("basedir is: " << basedir.mb_str(wxConvLocal)); @@ -459,7 +459,7 @@ // add images. for (unsigned int i=0; i< Pathnames.GetCount(); i++) { - std::string filename = (const char *)Pathnames[i].mb_str(*wxConvFileName); + std::string filename = (const char *)Pathnames[i].mb_str(HUGIN_CONV_FILENAME); vigra::ImageImportInfo inf(filename.c_str()); PanoImage img(filename, inf.width(), inf.height(), 0); VariableMap vars; Modified: hugin/trunk/src/hugin1/hugin/wxPanoCommand.h =================================================================== --- hugin/trunk/src/hugin1/hugin/wxPanoCommand.h 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/hugin/wxPanoCommand.h 2008-05-12 09:44:15 UTC (rev 3066) @@ -31,6 +31,7 @@ #include "vigra/impex.hxx" #include "hugin/LensPanel.h" #include "hugin/config_defaults.h" +#include "base_wx/platform.h" namespace PT { @@ -40,7 +41,7 @@ bool operator()(const std::string & file1, const std::string & file2) { // lets hope the operating system caches files stats. - return wxFileModificationTime(wxString(file1.c_str(),*wxConvFileName)) < wxFileModificationTime(wxString(file2.c_str(),*wxConvFileName)); + return wxFileModificationTime(wxString(file1.c_str(),HUGIN_CONV_FILENAME)) < wxFileModificationTime(wxString(file2.c_str(),HUGIN_CONV_FILENAME)); }; }; Modified: hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp =================================================================== --- hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-05-12 09:11:35 UTC (rev 3065) +++ hugin/trunk/src/hugin1/nona_gui/nona_gui.cpp 2008-05-12 09:44:15 UTC (rev 3066) @@ -36,6 +36,7 @@ #include "PT/Stitcher.h" #include "base_wx/MyProgressDialog.h" #include "base_wx/huginConfig.h" +#include "base_wx/platform.h" #include <tiffio.h> @@ -226,13 +227,13 @@ Panorama pano; PanoramaMemento newPano; - ifstream prjfile((const char *)scriptFile.mb_str(*wxConvFileName)); + ifstream prjfile((const char *)scriptFile.mb_str(HUGIN_CONV_FILENAME)); if (prjfile.bad()) { wxLogError( wxString::Format(_("could not open script : %s"), scriptFile.c_str()) ); return false; } int ptoVersion = 0; - if (newPano.loadPTScript(prjfile, ptoVersion, (const char *)path.mb_str(*wxConvFileName))) { + if (newPano.loadPTScript(prjfile, ptoVersion, (const char *)path.mb_str(HUGIN_CONV_FILENAME))) { pano.setMemento(newPano); } else { wxLogError( wxString::Format(_("error while parsing panotools script: %s"), scriptFile.c_str()) ); @@ -245,7 +246,7 @@ return false; } for (size_t i = 0; i < pano.getNrOfImages(); i++) { - pano.setImageFilename(i, (const char *)parser.GetParam(i+1).mb_str(*wxConvFileName)); + pano.setImageFilename(i, (const char *)parser.GetParam(i+1).mb_str(HUGIN_CONV_FILENAME)); } } @@ -269,7 +270,7 @@ // stitch panorama UIntSet simgs = pano.getActiveImages(); PT::stitchPanorama(pano, opts, - pdisp, (const char *)outfile.mb_str(*wxConvFileName), simgs); + pdisp, (const char *)outfile.mb_str(HUGIN_CONV_FILENAME), simgs); } catch (std::exception & e) { cerr << "caught exception: " << e.what() << std::endl; return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |