Index: sources/gui/GuiView.cpp =================================================================== diff -u -rfa8a24789926622048cdd480ea48abd9596c03b3 -r465a935949a85d3d1bebd11979737ff38ef96122 --- sources/gui/GuiView.cpp (.../GuiView.cpp) (revision fa8a24789926622048cdd480ea48abd9596c03b3) +++ sources/gui/GuiView.cpp (.../GuiView.cpp) (revision 465a935949a85d3d1bebd11979737ff38ef96122) @@ -57,22 +57,17 @@ this , SLOT( onUSBDriveMount ())); connect(&_GuiController, SIGNAL(didUSBDriveRemove()), this , SLOT( onUSBDriveRemove())); + connect(&_GuiController, SIGNAL(didUSBSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onUSBSpaceChange(bool, qint64, qint64, quint8))); - // USB Drive - connect(&_DeviceController, SIGNAL( didUSBSpaceChange(bool, qint64, qint64, quint8)), - this , SLOT( onUSBSpaceChange(bool, qint64, qint64, quint8))); - // SD Card - connect(&_GuiController, SIGNAL(didSDCardStateChange(bool,bool)), - this , SLOT( onSDCardStateChange(bool,bool))); + connect(&_GuiController , SIGNAL(didSDCardStateChange(bool,bool)), + this , SLOT( onSDCardStateChange(bool,bool))); + connect(&_GuiController , SIGNAL(didSDCardSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onSDCardSpaceChange(bool, qint64, qint64, quint8))); + connect(&_GuiController , SIGNAL(didExport()), + this , SLOT( onExport())); - /// TEST: Test the space on GUI, not sure if we keep it. - connect(&_DeviceController, SIGNAL( didSDCardSpaceChange(bool, qint64, qint64, quint8)), - this , SLOT( onSDCardSpaceChange(bool, qint64, qint64, quint8))); - - connect(&_GuiController, SIGNAL(didExport()), - this , SLOT( onExport())); - // From UI : Export Log connect(this , SIGNAL(didExportLog ()), &_GuiController, SLOT( doExportLog ())); @@ -157,6 +152,7 @@ // has been tested manually usbIsReady (false); usbIsRemoved(false); + exportRunning(false); emit didUSBDriveUmount(); } // disabled coco end @@ -172,6 +168,7 @@ // has been tested manually usbIsReady (false); usbIsRemoved(true ); + exportRunning(false); emit didUSBDriveRemove(); } // disabled coco end @@ -187,9 +184,12 @@ { // disabled coco begin validated: This needs user interaction to plug-in USB device // has been tested manually - /// DEBUG: qDebug() << " ***** GuiView " << Storage::SDCard_Base_Path_Name << vIsReady; + //DEBUG:0: qDebug() << " ***** GuiView " << Storage::SDCard_Base_Path_Name << vIsReady; sdIsReady (vIsReady ); sdIsReadOnly(vIsReadOnly); + if (! vIsReady || vIsReadOnly) exportRunning(false); + + //DEBUG:0: qDebug() << __FUNCTION__ << _sdIsReady << _sdIsReadOnly; } // disabled coco end @@ -215,6 +215,7 @@ { exportRunning(false); emit didExport(); + //DEBUG:0: qDebug() << " ~~~~~ " << "GuiView::onExport" << _exportRunning; } @@ -264,25 +265,21 @@ */ void GuiView::onSDCardSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) { - // disabled coco begin validated: This needs user interaction to change the SD card files system. - // has been tested manually /// DEBUG: qDebug() << vReady << vTotal << vAvailable << vPercent << Storage::Available_Space_Percent; Q_UNUSED(vReady) sdTotal ( vTotal ); sdAvail ( vAvailable ); sdPercent ( vPercent ); sdIsLow ( Storage::Log_Min_Available_Total_Space_IsLow(vPercent) ); } -// disabled coco end void GuiView::onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) { - // has been tested manually - /// DEBUG: qDebug() << vReady << vTotal << vAvailable << vPercent << Storage::Available_Space_Percent; + // DEBUG: qDebug() << "GuiView::onUSBSpaceChange" << vReady << vTotal << vAvailable << vPercent; usbTotal ( vTotal ); usbAvail ( vAvailable ); usbPercent ( vPercent ); usbIsReady ( vReady ); - // TODO : the space check should also be done for the USB as destination but needs calculation has will be done later. + // TODO : the space check should also be done for the USB as destination but needs calculation and will be done later. // usbIsLow ( vPercent <= Storage::Available_Space_Percent ); }