Commit 1e6e8d4f authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

Merge branch 'Sankore-1.40' of github.com:Sankore/Sankore-3.1 into Sankore-1.40

parents 5940b79e 37c90523
......@@ -13,7 +13,7 @@ linux-g++-64 {
VERSION_MAJ = 1
VERSION_MIN = 40
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 06
VERSION_PATCH = 07
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -45,12 +45,12 @@ var sankoreLang = {
"country":"Niger"
},
"TD":{
"city":"Ndjamena",
"city":"N'Djamena",
"country":"Tchad"
},
"SD":{
"city":"Khartoum",
"country":"Soudan"
"country":"Sudan"
},
"ER":{
"city":"Asmara",
......@@ -61,11 +61,11 @@ var sankoreLang = {
"country":"Djibouti"
},
"ET":{
"city":"Addis Ababa",
"city":"Addis-Ababa",
"country":"Ethiopia"
},
"SO":{
"city":"Mogadiscio",
"city":"Mogadishu",
"country":"Somalia"
},
"KE":{
......@@ -86,14 +86,14 @@ var sankoreLang = {
},
"CM":{
"city":"Yaounde",
"country":"Cameroun"
"country":"Cameroon"
},
"NG":{
"city":"Abuja",
"country":"Nigeria"
},
"BJ":{
"city":"Porto Novo",
"city":"Porto-Novo",
"country":"Benin"
},
"TG":{
......@@ -106,14 +106,14 @@ var sankoreLang = {
},
"CI":{
"city":"Yamoussoukro",
"country":"Cote d'Ivoire"
"country":"Côte d'Ivoire"
},
"BF":{
"city":"Ouagadougou",
"country":"Burkina Faso"
},
"LR":{
"city":"Monravia",
"city":"Monrovia",
"country":"Liberia"
},
"SL":{
......@@ -185,7 +185,7 @@ var sankoreLang = {
"country":"Botswana"
},
"NA":{
"city":"Windhoec",
"city":"Windhoek",
"country":"Namibia"
},
"ZA":{
......@@ -206,11 +206,11 @@ var sankoreLang = {
},
"AR":{
"city":"Buenos Aires",
"country":"Argentine"
"country":"Argentina"
},
"CL":{
"city":"Santiago",
"country":"Chili"
"country":"Chile"
},
"UY":{
"city":"Montevideo",
......@@ -221,7 +221,7 @@ var sankoreLang = {
"country":"Paraguay"
},
"BO":{
"city":"La Paz",
"city":"Sucre",
"country":"Bolivia"
},
"BR":{
......@@ -253,7 +253,7 @@ var sankoreLang = {
"country":"Suriname"
},
"GF":{
"city":"Paris",
"city":"Cayenne",
"country":"French Guyana"
},
"CA":{
......@@ -269,7 +269,7 @@ var sankoreLang = {
"country":"United States of America"
},
"MX":{
"city":"Mexico",
"city":"Mexico city",
"country":"Mexico"
},
"CU":{
......@@ -301,7 +301,7 @@ var sankoreLang = {
"country":"Belize"
},
"SV":{
"city":"Salvador",
"city":"El Salvador",
"country":"San Salvador"
},
"HN":{
......@@ -314,7 +314,7 @@ var sankoreLang = {
},
"CR":{
"city":"San Jose",
"country":"Costa-Rica"
"country":"Costa Rica"
},
"PA":{
"city":"Panama",
......@@ -345,7 +345,7 @@ var sankoreLang = {
"country":"Vanuatu"
},
"NC":{
"city":"Paris",
"city":"Noumea",
"country":"New Caledonia"
},
"AL":{
......@@ -373,7 +373,7 @@ var sankoreLang = {
"country":"Azerbaijan"
},
"BE":{
"city":"Bruxelles",
"city":"Brussels",
"country":"Belgium"
},
"BY":{
......@@ -382,7 +382,7 @@ var sankoreLang = {
},
"BA":{
"city":"Sarajevo",
"country":"Bosnia"
"country":"Bosnia and Herzegovina"
},
"BG":{
"city":"Sofia",
......@@ -421,7 +421,7 @@ var sankoreLang = {
"country":"Georgia"
},
"EL":{
"city":"Athenes",
"city":"Athens",
"country":"Greece"
},
"HU":{
......@@ -434,7 +434,7 @@ var sankoreLang = {
},
"IS":{
"city":"Reykjavik",
"country":"Island"
"country":"Iceland"
},
"IT":{
"city":"Rome",
......@@ -458,15 +458,15 @@ var sankoreLang = {
},
"MK":{
"city":"Skopje",
"country":"Macedoine"
"country":"Macedonia"
},
"MT":{
"city":"La Valetta",
"city":"Valetta",
"country":"Malta"
},
"MD":{
"city":"Chisinau",
"country":"Moldavia"
"country":"Moldova"
},
"MC":{
"city":"Monaco",
......@@ -505,8 +505,8 @@ var sankoreLang = {
"country":"United Kingdom"
},
"SM":{
"city":"Saint-Marin",
"country":"Saint-Marin"
"city":"San Marino",
"country":"San Marino"
},
"RS":{
"city":"Belgrade",
......@@ -525,7 +525,7 @@ var sankoreLang = {
"country":"Sweden"
},
"CH":{
"city":"Berne",
"city":"Bern",
"country":"Switzerland"
},
"TR":{
......@@ -537,7 +537,7 @@ var sankoreLang = {
"country":"Ukraine"
},
"VA":{
"city":"Vatican",
"city":"Vatican city",
"country":"Vatican"
},
"AF":{
......@@ -550,7 +550,7 @@ var sankoreLang = {
},
"BH":{
"city":"Manama",
"country":"Bahrein"
"country":"Bahrain"
},
"BD":{
"city":"Dhaka",
......@@ -561,7 +561,7 @@ var sankoreLang = {
"country":"Bhutan"
},
"BN":{
"city":"andar Seri Begawan",
"city":"Bandar Seri Begawan",
"country":"Brunei"
},
"KH":{
......@@ -569,8 +569,8 @@ var sankoreLang = {
"country":"Cambodia"
},
"CN":{
"city":"Pekin",
"country":"Chine"
"city":"Beijing",
"country":"China"
},
"KP":{
"city":"Pyongyang",
......@@ -581,19 +581,19 @@ var sankoreLang = {
"country":"South Korea"
},
"AE":{
"city":"Abu Dhabi",
"city":"Abu Dabi",
"country":"United Arab Emirates"
},
"IN":{
"city":"Delhi",
"city":"New Delhi",
"country":"India"
},
"IR":{
"city":"Teheran",
"city":"Tehran",
"country":"Iran"
},
"IQ":{
"city":"Bagdad",
"city":"Baghdad",
"country":"Iraq"
},
"IL":{
......@@ -617,15 +617,15 @@ var sankoreLang = {
"country":"Kyrgyzstan"
},
"KW":{
"city":"Koweit",
"country":"Koweit"
"city":"Kuwait",
"country":"Kuwait"
},
"LA":{
"city":"Laos",
"country":"Vientiane"
"city":"Vientiane",
"country":"Laos"
},
"LB":{
"city":"Beyrouth",
"city":"Beirut",
"country":"Lebanon"
},
"MY":{
......@@ -637,15 +637,15 @@ var sankoreLang = {
"country":"Maldives"
},
"MN":{
"city":"Ulan-Bator",
"city":"Ulaanbaatar",
"country":"Mongolia"
},
"MM":{
"city":"Naypyidaw",
"country":"Myanmar"
"city":"Myanmar",
"country":"Burma"
},
"NP":{
"city":"Katmandu",
"city":"Kathmandu",
"country":"Nepal"
},
"OM":{
......@@ -661,7 +661,7 @@ var sankoreLang = {
"country":"Pakistan"
},
"PH":{
"city":"Manille",
"city":"Manila",
"country":"Philippines"
},
"QA":{
......@@ -681,7 +681,7 @@ var sankoreLang = {
"country":"Sri Lanka"
},
"SY":{
"city":"Damask",
"city":"Damascus",
"country":"Syria"
},
"TJ":{
......@@ -694,7 +694,7 @@ var sankoreLang = {
},
"TL":{
"city":"Dili",
"country":"Timor-oriental"
"country":"East Timor"
},
"TM":{
"city":"Ashgabat",
......@@ -702,10 +702,10 @@ var sankoreLang = {
},
"VN":{
"city":"Hanoi",
"country":"Viet Nam"
"country":"Vietnam"
},
"YE":{
"city":"Sana",
"city":"Sana'a",
"country":"Yemen"
}
},
......
......@@ -940,19 +940,21 @@ void UBBoardView::virtualKeyboardActivated(bool b)
// Apple remote desktop sends funny events when the transmission is bad
bool
UBBoardView::isAbsurdPoint (QPoint point)
bool UBBoardView::isAbsurdPoint(QPoint point)
{
QDesktopWidget *desktop = qApp->desktop ();
#ifdef Q_WS_MACX
QDesktopWidget *desktop = qApp->desktop();
bool isValidPoint = false;
for (int i = 0; i < desktop->numScreens (); i++)
{
QRect screenRect = desktop->screenGeometry (i);
isValidPoint = isValidPoint || screenRect.contains (point);
for (int i = 0; i < desktop->numScreens() && !isValidPoint; i++){
QRect screenRect = desktop->screenGeometry(i);
screenRect=QRect(QPoint(0,0),screenRect.size());
isValidPoint = isValidPoint || screenRect.contains(point);
}
return !isValidPoint;
#else
return false;
#endif
}
void
......
......@@ -291,7 +291,6 @@ QImage UBLibraryController::createThumbnail(UBLibElement* pElement)
{
QString thumbnailPath = UBFileSystemUtils::thumbnailPath(pElement->path().toLocalFile());
QString mimetype = UBFileSystemUtils::mimeTypeFromFileName(pElement->path().toLocalFile());
UBApplication::showMessage(tr("Creating image thumbnail for %1.").arg(pElement->name()));
if (mimetype.contains("audio"))
thumbnailPath = ":images/libpalette/soundIcon.svg";
......@@ -309,6 +308,7 @@ QImage UBLibraryController::createThumbnail(UBLibElement* pElement)
pix.save(thumbnailPath);
UBThumbnailPixmap pixmap(pix);
UBPlatformUtils::hideFile(thumbnailPath);
UBApplication::showMessage(tr("Creating image thumbnail for %1.").arg(pElement->name()));
}
else{
thumbnailPath = ":images/libpalette/notFound.png";
......
......@@ -35,8 +35,6 @@
#include "UBIdleTimer.h"
#include "UBApplicationController.h"
//#include "softwareupdate/UBSoftwareUpdateController.h"
#include "board/UBBoardController.h"
#include "board/UBDrawingController.h"
#include "board/UBBoardView.h"
......
......@@ -37,7 +37,6 @@ class UBSettings;
class UBPersistenceManager;
class UBApplicationController;
class UBDocumentController;
class UBSoftwareUpdateController;
class UBMainWindow;
class UBApplication : public QtSingleApplication
......@@ -59,7 +58,6 @@ class UBApplication : public QtSingleApplication
static UBBoardController* boardController;
static UBWebController* webController;
static UBDocumentController* documentController;
static UBSoftwareUpdateController* softwareUpdateController;
static UniboardSankoreTransition* mUniboardSankoreTransition;
static UBMainWindow* mainWindow;
......
......@@ -1605,7 +1605,6 @@ void UBGraphicsScene::addTriangle(QPointF center)
UBGraphicsTriangle* triangle = new UBGraphicsTriangle(); // mem : owned and destroyed by the scene
mTools << triangle;
// triangle->setZValue(toolLayerStart + toolOffsetProtractor);
UBGraphicsItem::assignZValue(triangle, toolLayerStart + toolOffsetTriangle);
triangle->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool));
......
......@@ -559,7 +559,7 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
{
setObjectName(name);
setWindowTitle(tr("Add new folder"));
setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint);
mpLabel = new QLabel(tr("New Folder name:"),this);
mpLineEdit = new QLineEdit(this);
mpAddButton = new QPushButton(tr("Add"));
......@@ -570,7 +570,7 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent
mpButtons = new QDialogButtonBox(Qt::Horizontal, this);
mpLayout = new QVBoxLayout(this);
mpHLayout = new QHBoxLayout(this);
mpHLayout = new QHBoxLayout(0);
setLayout(mpLayout);
mpLayout->addLayout(mpHLayout, 0);
mpHLayout->addWidget(mpLabel, 0);
......@@ -699,20 +699,8 @@ void UBLibraryWidget::onAddDownloadedFileToLibrary(bool pSuccess, QUrl sourceUrl
Q_UNUSED(pContentHeader);
if(pSuccess)
{
// QDir dir;
// dir.mkdir("tmp");
// QString qsFileName = QFileInfo(sourceUrl.toString()).fileName();
// QString qsFilePath = UBFileSystemUtils::normalizeFilePath(QString("tmp/%0").arg(qsFileName));
// QFile f(qsFilePath);
// if(f.open(QIODevice::WriteOnly))
// {
// f.write(pData);
// f.close();
// }
QString urlString = sourceUrl.toString();
mLibraryController->routeDataItem(urlString, pData);
// dir.remove(qsFileName);
// dir.rmdir("tmp"); // Due to Qt, the directoy will be removed only if it's empty :)
}
}
......
......@@ -162,14 +162,10 @@ QString UBAudioQueueRecorder::deviceNameFromDeviceID(AudioDeviceID id)
if (noErr == AudioDeviceGetProperty(id, 0, true, kAudioObjectPropertyName, &size, &name))
{
char *cname = new char[1024];
bool result = CFStringGetCString (name, cname, 1024, kCFStringEncodingUTF8);
int length = CFStringGetLength (name);
deviceName = QString::fromUtf8(cname, length);
delete cname;
char cname[1024];
memset(cname,0,1024);
CFStringGetCString (name, cname, 1024, kCFStringEncodingUTF8);
deviceName = QString::fromUtf8(cname);
}
CFRelease(name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment