From 4c1e1ee95c4eee8ff9a5f01d80c631f7fd4b9b97 Mon Sep 17 00:00:00 2001 From: Ilia Ryabokon Date: Mon, 20 Aug 2012 18:09:08 +0300 Subject: [PATCH 1/2] Sankore-655 little fixes --- src/board/UBBoardPaletteManager.cpp | 6 ++++++ src/gui/UBFeaturesWidget.cpp | 3 ++- src/gui/gui.pri | 2 -- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 2407ad37..73a245dc 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -704,6 +704,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is mAddItemPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); + mStylusPalette->raise(); // Maybe threre is a reason to keep that functions but with them right palette in desktop mode is not interactable // mRightPalette->lower(); // mLeftPalette->lower(); @@ -724,7 +725,12 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is mKeyboardPalette->show(); } else +// In linux keyboard in desktop mode have to allways be with null parent +#ifdef Q_WS_X11 + mKeyboardPalette->setParent(0); +#else mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); +#endif //Q_WS_X11 #ifdef Q_WS_MAC mKeyboardPalette->setWindowFlags(Qt::Dialog | Qt::Popup | Qt::FramelessWindowHint); #endif diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index 2e7798cd..85a41cad 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -1395,6 +1395,7 @@ QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLoc Q_UNUSED(locale) QString text = value.toString(); + text = text.replace(".wgt", ""); if (listView) { const QFontMetrics fm = listView->fontMetrics(); @@ -1423,7 +1424,7 @@ void UBFeaturesPathItemDelegate::paint( QPainter *painter, const QStyleOptionVie QRect rect = option.rect; if ( !feature.getFullPath().isEmpty() ) { - painter->drawPixmap( rect.left() - 10, rect.center().y() - 5, *arrowPixmap ); + painter->drawPixmap( rect.left() - 10, rect.center().y() - 5, *arrowPixmap ); } painter->drawImage( rect.left() + 5, rect.center().y() - 5, feature.getThumbnail().scaledToHeight( 30, Qt::SmoothTransformation ) ); } diff --git a/src/gui/gui.pri b/src/gui/gui.pri index 9fa8c3dc..d0c80f80 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -35,10 +35,8 @@ HEADERS += src/gui/UBThumbnailView.h \ src/gui/UBLeftPalette.h \ src/gui/UBRightPalette.h \ src/gui/UBPageNavigationWidget.h \ - src/gui/UBLibWidget.h \ src/gui/UBMagnifer.h \ src/gui/UBCachePropertiesWidget.h \ - src/gui/UBLibWebView.h \ src/gui/UBDownloadWidget.h \ src/gui/UBDockDownloadWidget.h \ src/gui/UBFeaturesWidget.h \ From 134746af1045b80b4ff291b49050557f5970d163 Mon Sep 17 00:00:00 2001 From: Ilia Ryabokon Date: Mon, 20 Aug 2012 18:24:14 +0300 Subject: [PATCH 2/2] Sankore-1021 safe thread termination --- src/board/UBFeaturesController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index 3750685d..b13b7312 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -160,7 +160,7 @@ void UBFeaturesComputingThread::run() emit scanFinished(); mMutex.lock(); - if (!restart) { + if (!abort) { mWaitCondition.wait(&mMutex); } restart = false;