From: <hug...@li...> - 2013-01-27 17:33:28
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/eb96b174a53a changeset: 6121:eb96b174a53a user: tmodes date: Sun Jan 27 18:33:56 2013 +0100 description: Added short message box before stitching. diffstat: src/hugin1/hugin/PanoPanel.cpp | 13 ++++++++ src/hugin1/hugin/xrc/pano_panel.xrc | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 0 deletions(-) diffs (91 lines): diff -r d9f9cbe9c8c8 -r eb96b174a53a src/hugin1/hugin/PanoPanel.cpp --- a/src/hugin1/hugin/PanoPanel.cpp Sun Jan 27 12:10:43 2013 +0100 +++ b/src/hugin1/hugin/PanoPanel.cpp Sun Jan 27 18:33:56 2013 +0100 @@ -1124,6 +1124,19 @@ } if(pano->isDirty()) { + bool showDlg=wxConfigBase::Get()->Read(wxT("ShowSaveMessage"), 1l)==1; + if(showDlg) + { + wxDialog dlg; + wxXmlResource::Get()->LoadDialog(&dlg, NULL, wxT("stitch_message_dlg")); + if(dlg.ShowModal()) + { + if(XRCCTRL(dlg, "stitch_dont_ask_checkbox", wxCheckBox)->IsChecked()) + { + wxConfigBase::Get()->Write(wxT("ShowSaveMessage"), 0l); + }; + }; + }; wxCommandEvent dummy; MainFrame::Get()->OnSaveProject(dummy); //test if save was sucessful diff -r d9f9cbe9c8c8 -r eb96b174a53a src/hugin1/hugin/xrc/pano_panel.xrc --- a/src/hugin1/hugin/xrc/pano_panel.xrc Sun Jan 27 12:10:43 2013 +0100 +++ b/src/hugin1/hugin/xrc/pano_panel.xrc Sun Jan 27 18:33:56 2013 +0100 @@ -1028,4 +1028,63 @@ </object> </object> </object> + <object class="wxDialog" name="stitch_message_dlg"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <object class="sizeritem"> + <object class="wxStaticBitmap"> + <bitmap stock_id="wxART_INFORMATION"/> + </object> + <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> + <border>12</border> + </object> + <orient>wxHORIZONTAL</orient> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>The project needs to be saved before it can send to\nthe batch processor PTBatcherGUI.\nYou will first ask for the filename for the project file\nand then for the prefix for the panorama output.\n\nYou may need to start the stitching in the batch processor\n PTBatcherGUI.</label> + <style>wxALIGN_LEFT</style> + </object> + <option>1</option> + <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> + </object> + </object> + <option>1</option> + <flag>wxALL|wxEXPAND</flag> + <border>12</border> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <object class="sizeritem"> + <object class="wxCheckBox" name="stitch_dont_ask_checkbox"> + <label>Don't ask again</label> + </object> + <flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag> + <border>6</border> + </object> + <object class="spacer"> + <option>1</option> + <flag>wxEXPAND</flag> + </object> + <object class="sizeritem"> + <object class="wxStdDialogButtonSizer"> + <orient>wxVERTICAL</orient> + <object class="button"> + <object class="wxButton" name="wxID_OK"> + <label>Ok</label> + <default>1</default> + </object> + </object> + </object> + </object> + <orient>wxHORIZONTAL</orient> + </object> + <flag>wxALL|wxEXPAND</flag> + <border>6</border> + </object> + </object> + <title>Hugin</title> + <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSTAY_ON_TOP</style> + </object> </resource> \ No newline at end of file |