[KPhotoAlbum] [Patch] Images size view fails: -1x-1 (0.0MP)

Robert L Krawitz rlk at alum.mit.edu
Mon Apr 23 01:02:52 BST 2007


   From: Shawn Willden <shawn-kimdaba at willden.org>
   Date: Sun, 22 Apr 2007 17:42:01 -0600

   Some small tweaks to Henner Zeller's patch seem to address this
   issue pretty well.  All I had to change was to:

   (1)  avoid emitting the imageReady signal for preloaded images; and
   (2) populate the image info structure's size field from the preloaded image 
   data.

   Per Jesper's suggestion, I'll hold off committing until I receive
   three "Yay" votes and no "Nay" votes.

Gopherit.

   --Boundary-00=_JL/KGRqFwyazI0V
   Content-Type: text/x-diff; charset="iso-8859-1";
	   name="infobox-after-image-load.patch"
   Content-Transfer-Encoding: 7bit
   Content-Disposition: attachment;
	   filename="infobox-after-image-load.patch"

   Index: Viewer/ViewerWidget.cpp
   ===================================================================
   --- Viewer/ViewerWidget.cpp	(revision 657022)
   +++ Viewer/ViewerWidget.cpp	(working copy)
   @@ -92,6 +92,7 @@
	connect( _videoDisplay, SIGNAL( stopped() ), this, SLOT( videoStopped() ) );

	connect( _imageDisplay, SIGNAL( possibleChange() ), this, SLOT( updateCategoryConfig() ) );
   +    connect( _imageDisplay, SIGNAL( imageReady() ), this, SLOT( updateInfoBox() ) );
	connect( _imageDisplay, SIGNAL( setCaptionInfo(const QString&) ),
		 this, SLOT( setCaptionWithDetail(const QString&) ) );
	createToolBar();
   @@ -104,7 +105,7 @@
	// This must not be added to the layout, as it is standing on top of
	// the ImageDisplay
	_infoBox = new InfoBox( this );
   -    _infoBox->setShown( Settings::SettingsData::instance()->showInfoBox() );
   +    _infoBox->hide();

	setupContextMenu();

   @@ -417,7 +418,6 @@
	}

	setCaptionWithDetail( QString() );
   -    updateInfoBox();

	// PENDING(blackie) This needs to be improved, so that it shows the actions only if there are that many images to jump.
	for( QPtrList<KAction>::const_iterator it = _forwardActions.begin(); it != _forwardActions.end(); ++it )
   Index: Viewer/ImageDisplay.cpp
   ===================================================================
   --- Viewer/ImageDisplay.cpp	(revision 657022)
   +++ Viewer/ImageDisplay.cpp	(working copy)
   @@ -183,6 +183,8 @@
	    _loadedImage = found->img;
	    updateZoomPoints( Settings::SettingsData::instance()->viewerStandardSize(), found->img.size() );
	    cropAndScale();
   +        info->setSize( found->size );
   +        emit imageReady();
	}
	else {
	    requestImage( info );
   @@ -406,6 +408,7 @@

	    _loadedImage = img;
	    cropAndScale();
   +        emit imageReady();
	}
	else {
	    if ( imgSize != size() )
   Index: Viewer/ViewerWidget.h
   ===================================================================
   --- Viewer/ViewerWidget.h	(revision 657022)
   +++ Viewer/ViewerWidget.h	(working copy)
   @@ -54,10 +54,10 @@
	void setShowFullScreen( bool on );
	void show( bool slideShow );
	KActionCollection* actions();
   -    void updateInfoBox();

    public slots:
	virtual bool close(bool alsoDelete );
   +    void updateInfoBox();

    protected:
	virtual void contextMenuEvent ( QContextMenuEvent * e );
   Index: Viewer/ImageDisplay.h
   ===================================================================
   --- Viewer/ImageDisplay.h	(revision 657022)
   +++ Viewer/ImageDisplay.h	(working copy)
   @@ -79,6 +79,7 @@

    signals:
	void possibleChange();
   +    void imageReady();
	void setCaptionInfo(const QString& info);

    protected:

   --Boundary-00=_JL/KGRqFwyazI0V
   Content-Type: text/plain; charset="us-ascii"
   MIME-Version: 1.0
   Content-Transfer-Encoding: 7bit
   Content-Disposition: inline

   _______________________________________________
   KPhotoAlbum mailing list
   KPhotoAlbum at kdab.net
   http://mail.kdab.net/mailman/listinfo/kphotoalbum

   --Boundary-00=_JL/KGRqFwyazI0V--




More information about the Kphotoalbum mailing list