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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/controllers/thumbnailcontroller.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:
15
15
#include <main/entorno.h>
16
16
#include <wx/thread.h>
17
17
#include <eventos/progresocomando.h>
18
 
#include <main/controllers/controladorcomandos.h>
 
18
#include <main/controllers/commandcontroller.h>
19
19
#include <main/controllers/controladoreventos.h>
20
20
 
21
21
#define TAMANIO_MAX_PILA 10
55
55
                                m_pCriticalSection = NULL;
56
56
                        }
57
57
                        if (m_pCmd != NULL) {
58
 
                                GNC::GCS::IControladorComandos::Instance()->AbortarComando(m_pCmd);
 
58
                                GNC::GCS::ICommandController::Instance()->AbortarComando(m_pCmd);
59
59
                        }
60
60
                }
61
61
 
65
65
                        m_petitions.push_back(TPetition(pNotifier, file_pk));
66
66
                        if (m_pCmd == NULL) {
67
67
                                m_pCmd = new GADAPI::ThumbnailsCommand(file_pk, pNotifier);
68
 
                                GNC::GCS::IControladorComandos::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
 
68
                                GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
69
69
                        }
70
70
                        m_pCriticalSection->Leave();
71
71
                }
75
75
                        m_pCriticalSection->Enter();
76
76
                        if (!m_petitions.empty()) {
77
77
                                if (m_petitions.front().m_pNotifier == pNotifier && m_pCmd != NULL) {
78
 
                                        GNC::GCS::IControladorComandos::Instance()->AbortarComandosDeOwner(this);
 
78
                                        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(this);
79
79
                                        m_pCmd = NULL;
80
 
                                        //to start with next...
 
80
                                        //to start with next it has to be synchronized with gui so call timer...
81
81
                                        if(IsRunning()) {
82
82
                                                Stop();
83
83
                                                Start(300, true);
101
101
                                TListPetitions::iterator it = m_petitions.begin();
102
102
                                if (it != m_petitions.end()) {
103
103
                                        m_pCmd = new GADAPI::ThumbnailsCommand((*it).m_file_pk, (*it).m_pNotifier);
104
 
                                        GNC::GCS::IControladorComandos::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
 
104
                                        GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
105
105
                                } 
106
106
                        }
107
107
                        m_pCriticalSection->Leave();
114
114
                                return;
115
115
                        }
116
116
                        switch (pEvt->GetTipo()) {
117
 
                case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado:
118
 
                        break;
119
 
                case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
120
 
                        break;
121
 
                case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado:
122
 
                        {
123
 
                                m_pCriticalSection->Enter();
124
 
                                m_petitions.pop_front();
125
 
                                TListPetitions::iterator it = m_petitions.begin();
126
 
                                if (it != m_petitions.end()) {
127
 
                                        m_pCmd = new GADAPI::ThumbnailsCommand((*it).m_file_pk, (*it).m_pNotifier);
128
 
                                        GNC::GCS::IControladorComandos::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
129
 
                                } else {
130
 
                                        m_pCmd = NULL;
131
 
                                }
132
 
                                m_pCriticalSection->Leave();
133
 
                        }
134
 
                        break;
135
 
                case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
 
117
                                case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado:
 
118
                                        break;
 
119
                                case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
 
120
                                        break;
 
121
                                case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado:
 
122
                                        {
 
123
                                                m_pCriticalSection->Enter();
 
124
                                                m_petitions.pop_front();
 
125
                                                TListPetitions::iterator it = m_petitions.begin();
 
126
                                                if (it != m_petitions.end() && !m_pCmd->EstaAbortado()) {
 
127
                                                        m_pCmd = new GADAPI::ThumbnailsCommand((*it).m_file_pk, (*it).m_pNotifier);
 
128
                                                        GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
 
129
                                                } else {
 
130
                                                        m_pCmd = NULL;
 
131
                                                }
 
132
                                                m_pCriticalSection->Leave();
 
133
                                        }
 
134
                                        break;
 
135
                                case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
136
136
                        break;
137
137
                        }       
138
138
                }