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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/acquisition/downloadagaindialog.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:
 
1
/*
 
2
 *
 
3
 *  $Id: InactivityCountdownMessage.cpp $
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
7
 *  http://ginkgo-cadx.com
 
8
 *
 
9
 *  This file is licensed under LGPL v3 license.
 
10
 *  See License.txt for details
 
11
 *
 
12
 *
 
13
 */
 
14
#include <wx/statbmp.h>
 
15
#include <wx/bmpbuttn.h>
 
16
 
 
17
#include "downloadagaindialog.h"
 
18
#include <wx/ginkgostyle/ginkgostyle.h>
 
19
#include <main/controllers/historycontroller.h>
 
20
#include <main/gui/mainwindow/ventanaprincipal.h>
 
21
#include <main/gui/history3/historypanel3.h>
 
22
#include <main/controllers/inactivitycontroller.h>
 
23
#include <main/entorno.h>
 
24
 
 
25
namespace GNC {
 
26
        namespace GUI {
 
27
                DownloadAgainDialog::DownloadAgainDialog(wxWindow* pParent, std::string uid, bool isSeries): DownloadAgainDialogBase(pParent),
 
28
                        IsSeries(isSeries),
 
29
                        UID(uid)
 
30
                {
 
31
                        if (IsSeries) {
 
32
                                m_pLabelMessage->SetLabel(_("This series has been already downloaded in the local history, Do you want to download it again?"));
 
33
                        } else {
 
34
                                m_pLabelMessage->SetLabel(_("This study has been already downloaded in the local history, Do you want to download it again?"));
 
35
                        }
 
36
                        m_pLabelMessage->Wrap(350);
 
37
                        m_pFormPanel->Layout();
 
38
                        m_pBody->Layout();
 
39
                        Layout();
 
40
                }
 
41
 
 
42
                DownloadAgainDialog::~DownloadAgainDialog()
 
43
                {
 
44
                }
 
45
                        
 
46
                void DownloadAgainDialog::OnOpenClick(wxCommandEvent &)
 
47
                {
 
48
                        if (IsSeries) {
 
49
                                GNC::GCS::HistoryController::SeriesModelList sml;
 
50
                                GNC::GCS::HistoryController::Instance()->GetSeriesModelFromUID(UID, sml);
 
51
                                if (!sml.empty()) {
 
52
                                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(sml.front().pk, true);
 
53
                                }
 
54
                        } else {
 
55
                                GNC::GCS::HistoryController::StudyModelList sml;
 
56
                                GNC::GCS::HistoryController::Instance()->GetStudyModelFromUID(UID, sml);
 
57
                                if (!sml.empty()) {
 
58
                                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(sml.front().pk, false);
 
59
                                }
 
60
                        }
 
61
                        EndModal(wxID_CANCEL);
 
62
                }
 
63
        }
 
64
}