~artmello/gallery-app/gallery-app-start_on_event

« back to all changes in this revision

Viewing changes to src/gallery-application.cpp

  • Committer: CI bot
  • Author(s): Arthur Mello, Bill Filler, Ugo Riboni
  • Date: 2014-03-19 20:19:57 UTC
  • mfrom: (912.3.20 multiple-bug-fixes)
  • Revision ID: ps-jenkins@lists.canonical.com-20140319201957-32sglr01gx1xx9e0
multiple gallery-app bug fixes Bug #907870: [desktop] Gallery does not display photos in sub folders, Bug #1221968: use libthumbnailer for gallery thumbnails, Bug #1268748: videos are not displayed when running on desktop, Bug #1271327: disable switching between camera and gallery on desktop, Bug #1287272: Black flash at the end of the zoom animation" Fixes: 907870, 1221968, 1268748, 1271327, 1287272

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
// qml
40
40
#include "gallery-standard-image-provider.h"
41
 
#include "gallery-thumbnail-image-provider.h"
42
41
#include "qml-album-collection-model.h"
43
42
#include "qml-event-collection-model.h"
44
43
#include "qml-event-overview-model.h"
143
142
 */
144
143
bool GalleryApplication::isDesktopMode() const
145
144
{
146
 
  return (qEnvironmentVariableIsSet("DESKTOP_MODE") && (qgetenv("DESKTOP_MODE") == "1"));
 
145
    return(qEnvironmentVariableIsSet("DESKTOP_MODE") && (qgetenv("DESKTOP_MODE") == "1"));
147
146
}
148
147
 
149
148
/*!
169
168
        size.transpose();
170
169
 
171
170
    m_view->setResizeMode(QQuickView::SizeRootObjectToView);
172
 
    if (m_cmdLineParser->formFactor() == "desktop" || isDesktopMode()) {
 
171
    if (isDesktopMode()) {
173
172
        m_view->setMinimumSize(QSize(60 * m_bguSize, 60 * m_bguSize));
174
173
    }
175
174
 
213
212
    m_galleryManager->postInit();
214
213
    m_view->engine()->addImageProvider(GalleryStandardImageProvider::PROVIDER_ID,
215
214
                                       m_galleryManager->takeGalleryStandardImageProvider());
216
 
    m_view->engine()->addImageProvider(GalleryThumbnailImageProvider::PROVIDER_ID,
217
 
                                       m_galleryManager->takeGalleryThumbnailImageProvider());
218
215
 
219
216
    QApplication::processEvents();
220
217
    if (m_cmdLineParser->startupTimer())