Hey,<br><br>I just tried applying your patch, but it does not seem to apply on the current trunk, should it?<br><br><div style="margin-left: 40px;">$ patch -p0 < risto.patch <br>patching file Settings/SettingsData.h<br>
Hunk #1 FAILED at 96.<br>1 out of 1 hunk FAILED -- saving rejects to file Settings/SettingsData.h.rej<br>patching file Settings/SettingsDialog.cpp<br>Hunk #1 FAILED at 227.<br>Hunk #2 FAILED at 281.<br>Hunk #3 FAILED at 404.
<br>Hunk #4 FAILED at 486.<br>4 out of 4 hunks FAILED -- saving rejects to file Settings/SettingsDialog.cpp.rej<br>patching file Settings/SettingsDialog.h<br>Hunk #1 FAILED at 116.<br>1 out of 1 hunk FAILED -- saving rejects to file Settings/SettingsDialog.h.rej
<br>patching file ThumbnailView/ThumbnailWidget.cpp<br>Hunk #1 FAILED at 414.<br>Hunk #2 FAILED at 595.<br>2 out of 2 hunks FAILED -- saving rejects to file ThumbnailView/ThumbnailWidget.cpp.rej<br></div><br>Thanks<br><br>
<div><span class="gmail_quote">2007/5/4, Jan Kundrát <<a href="mailto:jkt@gentoo.org">jkt@gentoo.org</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Henner Zeller wrote:<br>> Hi,<br>> I haven't applied this patch yet locally, but the<br>><br>> +    if (Settings::SettingsData::instance()->thumbnailDisplayGrid()) {<br>><br>> line should probably be
<br>><br>> +    if (_mouseHandler->isResizingGrid() ||<br>> Settings::SettingsData::instance()->thumbnailDisplayGrid()) {<br>><br>> .. because when we resize the grid, we want to see gridlines.<br><br>
Absolutely, thanks for correction. I missed that because this grid<br>resizing is another feature that I couldn't have used because I can't<br>really use middle button with mouse movement at the same time in my<br>
particular setup.<br><br>Attached is the updated version of the patch which also makes resizing<br>work with left button and control key :), same as in my last patch for<br>enabling panning in Viewer.<br><br>Thanks again for your review,
<br>-jkt<br><br>--<br>cd /local/pub && more beer > /dev/mouth<br><br>Index: Settings/SettingsData.h<br>===================================================================<br>--- Settings/SettingsData.h     (revision 660935)
<br>+++ Settings/SettingsData.h     (working copy)<br>@@ -96,6 +96,7 @@<br>     intProperty( Thumbnails, autoShowThumbnailView, setAutoShowThumbnailView, 0 );<br>     boolProperty( Thumbnails, showNewestThumbnailFirst, setShowNewestFirst, false );
<br>     boolProperty( Thumbnails, thumbnailDarkBackground, setThumbnailDarkBackground, false );<br>+    boolProperty( Thumbnails, thumbnailDisplayGrid, setThumbnailDisplayGrid, true );<br><br>     void setThumbnailCache( int value );
<br>     int thumbnailCache() const;<br>Index: Settings/SettingsDialog.cpp<br>===================================================================<br>--- Settings/SettingsDialog.cpp (revision 660935)<br>+++ Settings/SettingsDialog.cpp (working copy)
<br>@@ -227,6 +227,12 @@<br>     _thumbnailDarkBackground = new QCheckBox( i18n("Show thumbnails on dark background" ), top, "thumbnailDarkBackground");<br>     lay->addMultiCellWidget( _thumbnailDarkBackground, row, row, 0, 1 );
<br><br>+    // Display grid lines in the thumbnail view<br>+    ++row;<br>+    _thumbnailDisplayGrid = new QCheckBox( i18n("Display grid around thumbnails" ),<br>+                                           top, "thumbnailDisplayGrid");
<br>+    lay->addMultiCellWidget( _thumbnailDisplayGrid, row, row, 0, 1 );<br>+<br>     // Display Labels<br>     ++row;<br>     _displayLabels = new QCheckBox( i18n("Display labels in thumbnail view" ), top, "displayLabels" );
<br>@@ -275,6 +281,10 @@<br>                "you can set it to be dark instead.</p>");<br>     QWhatsThis::add( _thumbnailDarkBackground, txt );<br><br>+    txt = i18n("<p>If you want to see grid around your thumbnail images, "
<br>+               "select this option.</p>");<br>+    QWhatsThis::add( _thumbnailDisplayGrid, txt );<br>+<br>     txt = i18n("<p>Checking this option will show the base name for the file under "
<br>                "thumbnails in the thumbnail view.</p>");<br>     QWhatsThis::add( _displayLabels, txt );<br>@@ -394,6 +404,7 @@<br>     _albumCategory->setCurrentText( cat->text() );<br><br>     _thumbnailDarkBackground->setChecked( opt->thumbnailDarkBackground() );
<br>+    _thumbnailDisplayGrid->setChecked( opt->thumbnailDisplayGrid() );<br>     _displayLabels->setChecked( opt->displayLabels() );<br>     _displayCategories->setChecked( opt->displayCategories() );<br>
     _viewImageSetup->setSize( opt->viewerSize() );<br>@@ -475,6 +486,7 @@<br><br>     opt->setAlbumCategory( name );<br>     opt->setThumbnailDarkBackground( _thumbnailDarkBackground->isChecked() );<br>+    opt->setThumbnailDisplayGrid( _thumbnailDisplayGrid->isChecked() );
<br>     opt->setDisplayLabels( _displayLabels->isChecked() );<br>     opt->setDisplayCategories( _displayCategories->isChecked() );<br>     opt->setViewerSize( _viewImageSetup->size() );<br>Index: Settings/SettingsDialog.h
<br>===================================================================<br>--- Settings/SettingsDialog.h   (revision 660935)<br>+++ Settings/SettingsDialog.h   (working copy)<br>@@ -116,6 +116,7 @@<br>     QCheckBox* _thumbnailDarkBackground;
<br>     QCheckBox* _displayLabels;<br>     QCheckBox* _displayCategories;<br>+    QCheckBox* _thumbnailDisplayGrid;<br>     QSpinBox* _autoShowThumbnailView;<br>     QSpinBox* _thumbnailCache;<br><br>Index: ThumbnailView/ThumbnailWidget.cpp
<br>===================================================================<br>--- ThumbnailView/ThumbnailWidget.cpp   (revision 660935)<br>+++ ThumbnailView/ThumbnailWidget.cpp   (working copy)<br>@@ -414,14 +414,17 @@<br>     else
<br>         p->fillRect( rect, palette().active().base() );<br><br>-    p->setPen( palette().active().dark() );<br>-    // left of frame<br>-    if ( col != 0 )<br>-        p->drawLine( rect.left(), rect.top(), 
rect.left(), rect.bottom() );<br>+    if (_mouseHandler->isResizingGrid() ||<br>+        Settings::SettingsData::instance()->thumbnailDisplayGrid()) {<br>+        p->setPen( palette().active().dark() );<br>+        // left of frame
<br>+        if ( col != 0 )<br>+            p->drawLine( rect.left(), rect.top(), rect.left(), rect.bottom() );<br><br>-    // bottom line<br>-    if ( row != numRows() -1 ) {<br>-        p->drawLine( rect.left(), 
rect.bottom() -1, rect.right(), rect.bottom()-1 );<br>+        // bottom line<br>+        if ( row != numRows() -1 ) {<br>+            p->drawLine( rect.left(), rect.bottom() -1, rect.right(), rect.bottom()-1 );<br>+        }
<br>     }<br> }<br><br>@@ -592,7 +595,7 @@<br><br> void ThumbnailView::ThumbnailWidget::mousePressEvent( QMouseEvent* event )<br> {<br>-    if (event->button() & MidButton )<br>+    if ( (event->button() & MidButton) || (event->state() & Qt::ControlButton) )
<br>         _mouseHandler = &_gridResizeInteraction;<br>     else<br>         _mouseHandler = &_selectionInteraction;<br><br>_______________________________________________<br>KPhotoAlbum mailing list<br><a href="mailto:KPhotoAlbum@kdab.net">
KPhotoAlbum@kdab.net</a><br><a href="http://mail.kdab.net/mailman/listinfo/kphotoalbum">http://mail.kdab.net/mailman/listinfo/kphotoalbum</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Baptiste <Batmat> MATHUS
<br>BMathus at Batmat point net - <a href="http://batmat.net">http://batmat.net</a><br>---------<br>Si chacun de nous a une idée et que nous les partageons, nous<br>repartirons tous les deux avec deux idées... C'est ça le Libre.