diff -r d0b4e67b3a60 -r f291796e213d main/glxaiwservicehandler.cpp --- a/main/glxaiwservicehandler.cpp Wed Jun 23 18:12:48 2010 +0300 +++ b/main/glxaiwservicehandler.cpp Tue Jul 06 14:16:16 2010 +0300 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include "glxlocalisationstrings.h" #include +#include #define IMAGE_FETCHER_SERVICE_NAME QLatin1String("photos.com.nokia.symbian.IImageFetch") #define IMAGE_FETCHER_SERVICE_DEPINTERFACE_NAME QLatin1String("photos.Image") @@ -77,6 +79,8 @@ } else if( 0 == currentInterfaceName.compare(QLatin1String("com.nokia.symbian.IFileView"))) { + viewport()->setAttribute(Qt::WA_AcceptTouchEvents); + viewport()->grabGesture(Qt::PinchGesture); mImageViewerService = new GlxImageViewerService(this); } @@ -194,15 +198,16 @@ } void GlxAiwServiceHandler::itemSpecificMenuTriggered(qint32 viewId,QPointF pos) - { +{ mFetcherContextMenu = new HbMenu(); HbAction *action = mFetcherContextMenu->addAction(GLX_MENU_OPEN); + action->setObjectName( "Menu Open" ); connect(action, SIGNAL(triggered()), this, SLOT(openFSView())); connect(this, SIGNAL(aboutToChangeOrientation ()), mFetcherContextMenu, SLOT(close())); connect( mFetcherContextMenu, SIGNAL( aboutToClose () ), this, SLOT( closeContextMenu() ) ); mFetcherContextMenu->setPreferredPos( pos ); mFetcherContextMenu->show(); - } +} void GlxAiwServiceHandler::closeContextMenu() { @@ -221,6 +226,8 @@ mModel->setData(QModelIndex(), (int)GlxContextPtFs, GlxContextRole ); } HbAction* selectAction = new HbAction(GLX_BUTTON_SELECT); + selectAction->setObjectName( "FS Select" ); + connect(selectAction, SIGNAL(triggered()), this, SLOT(handleFSSelect())); HbToolBar* toolBar = new HbToolBar(); toolBar->setOrientation( Qt::Horizontal ); @@ -546,6 +553,20 @@ bool GlxImageViewerService::view(QString file) { + XQApplicationManager appmgr; + QFile tempfile(file); + QVariantList attrValues; + QList attrNames; + attrNames.append(XQApplicationManager::IsProtected); + bool ok = appmgr.getDrmAttributes(tempfile, attrNames, attrValues); + if(attrValues.at(0).toBool()){ + HbNotificationDialog::launchDialog("NOT SUPPORTED"); + connect(this, SIGNAL(returnValueDelivered()), mServiceApp, + SLOT(handleAnswerDelivered())); + complete(true); + return false; + } + XQRequestInfo info = requestInfo(); mAsyncRequest = !info.isSynchronous(); if (!mImageViewerInstance)