~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/main/tools/anonymizetool.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#if defined(ENABLE_ANONYMIZETOOL)
18
18
 
19
19
#include <main/gui/anonymize/anonymizedialog.h>
 
20
#include <main/gui/history3/synchronizedialog.h>
20
21
#include <resources/ginkgoresourcesmanager.h>
21
22
#include <main/controllers/historytoolscontroller.h>
22
23
 
35
36
        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
36
37
        std::list<long> listOfPks;
37
38
        pHistory->GetSelectedSeriesPk(listOfPks);
 
39
        Execute (listOfPks);
 
40
}
38
41
 
39
 
        if (listOfPks.empty()) {
 
42
void GNC::AnonymizeTool::Execute(const std::list<long>& seriesPk) 
 
43
{
 
44
        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
 
45
        if (seriesPk.empty()) {
40
46
                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
41
47
                return;
42
48
        }
43
49
 
44
 
        GNC::GUI::AnonymizeDialog dlg(pHistory->GetWxWindow(), listOfPks);
45
 
        dlg.ShowModal();
 
50
        if (!AreSeriesFullyDownloaded(seriesPk)) {
 
51
                GNC::GUI::SynchronizeDialog dlg(pHistory->GetWxWindow(), seriesPk, this);
 
52
                dlg.ShowModal();
 
53
        } else {
 
54
                GNC::GUI::AnonymizeDialog dlg(pHistory->GetWxWindow(), seriesPk);
 
55
                dlg.ShowModal();
 
56
        }
 
57
 
46
58
}
47
59
 
48
60
#endif