Hello community,
here is the log from the commit of package kdegraphics4
checked in at Fri Jul 18 00:22:52 CEST 2008.
--------
--- KDE/kdegraphics4/kdegraphics4.changes 2008-07-07 11:04:48.000000000 +0200
+++ kdegraphics4/kdegraphics4.changes 2008-07-11 12:35:54.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Jul 11 12:35:49 CEST 2008 - dmueller@suse.de
+
+- update to 4.0.98
+
+-------------------------------------------------------------------
Old:
----
kdegraphics-4.0.85.tar.bz2
New:
----
kdegraphics-4.0.98.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdegraphics4.spec ++++++
--- /var/tmp/diff_new_pack.Vjm936/_old 2008-07-18 00:21:43.000000000 +0200
+++ /var/tmp/diff_new_pack.Vjm936/_new 2008-07-18 00:21:43.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kdegraphics4 (Version 4.0.85)
+# spec file for package kdegraphics4 (Version 4.0.98)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -26,7 +26,7 @@
Group: Productivity/Graphics/Other
Summary: kdegraphics base package
Url: http://www.kde.org
-Version: 4.0.85
+Version: 4.0.98
Release: 1
Source0: kdegraphics-%version.tar.bz2
Source1: _upstream
@@ -514,6 +514,8 @@
%_kde_share_dir/services/ksane_scan_service.desktop
%changelog
+* Fri Jul 11 2008 dmueller@suse.de
+- update to 4.0.98
* Mon Jul 07 2008 dmueller@suse.de
- update to 4.0.85
* Tue Jul 01 2008 dmueller@suse.de
++++++ kdegraphics-4.0.85.tar.bz2 -> kdegraphics-4.0.98.tar.bz2 ++++++
Files old/kdegraphics-4.0.85/doc/gwenview/index.cache.bz2 and new/kdegraphics-4.0.98/doc/gwenview/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/kamera/index.cache.bz2 and new/kdegraphics-4.0.98/doc/kamera/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/kgamma/index.cache.bz2 and new/kdegraphics-4.0.98/doc/kgamma/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/kolourpaint/index.cache.bz2 and new/kdegraphics-4.0.98/doc/kolourpaint/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/kruler/index.cache.bz2 and new/kdegraphics-4.0.98/doc/kruler/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/ksnapshot/index.cache.bz2 and new/kdegraphics-4.0.98/doc/ksnapshot/index.cache.bz2 differ
Files old/kdegraphics-4.0.85/doc/okular/index.cache.bz2 and new/kdegraphics-4.0.98/doc/okular/index.cache.bz2 differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/app/documentview.cpp new/kdegraphics-4.0.98/gwenview/app/documentview.cpp
--- old/kdegraphics-4.0.85/gwenview/app/documentview.cpp 2008-06-26 16:16:13.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/app/documentview.cpp 2008-07-08 11:29:06.000000000 +0200
@@ -198,7 +198,7 @@
mThumbnailBar = new ThumbnailBarView(mPartContainer);
ThumbnailBarItemDelegate* delegate = new ThumbnailBarItemDelegate(mThumbnailBar);
mThumbnailBar->setItemDelegate(delegate);
- mThumbnailBar->hide();
+ mThumbnailBar->setVisible(GwenviewConfig::thumbnailBarIsVisible());
QColor bgColor = mThumbnailBar->palette().color(QPalette::Normal, QPalette::Window);
QColor bgSelColor = mThumbnailBar->palette().color(QPalette::Normal, QPalette::Highlight);
@@ -252,8 +252,6 @@
mThumbnailSplitter->addWidget(mPartContainer);
mThumbnailSplitter->addWidget(mThumbnailBar);
mThumbnailSplitter->setSizes(GwenviewConfig::thumbnailSplitterSizes());
- QObject::connect(mThumbnailSplitter, SIGNAL(splitterMoved(int,int)),
- mView, SLOT(saveSplitterSizes(int, int)));
}
void setPartWidget(QWidget* partWidget) {
@@ -279,6 +277,12 @@
partPalette.setBrush(mPart->widget()->foregroundRole(), palette.text());
mPart->widget()->setPalette(partPalette);
}
+
+ void saveSplitterConfig() {
+ if (mThumbnailBar->isVisible()) {
+ GwenviewConfig::setThumbnailSplitterSizes(mThumbnailSplitter->sizes());
+ }
+ }
};
@@ -315,8 +319,9 @@
d->mToggleThumbnailBarAction->setText(i18n("Thumbnail Bar"));
d->mToggleThumbnailBarAction->setIcon(KIcon("folder-image"));
d->mToggleThumbnailBarAction->setShortcut(Qt::CTRL | Qt::Key_B);
+ d->mToggleThumbnailBarAction->setChecked(GwenviewConfig::thumbnailBarIsVisible());
connect(d->mToggleThumbnailBarAction, SIGNAL(triggered(bool)),
- d->mThumbnailBar, SLOT(setVisible(bool)));
+ this, SLOT(setThumbnailBarVisibility(bool)) );
d->mToggleThumbnailBarButton->setDefaultAction(d->mToggleThumbnailBarAction);
}
@@ -326,6 +331,18 @@
}
+void DocumentView::saveConfig() {
+ d->saveSplitterConfig();
+ GwenviewConfig::setThumbnailBarIsVisible(d->mToggleThumbnailBarAction->isChecked());
+}
+
+
+void DocumentView::setThumbnailBarVisibility(bool visible) {
+ d->saveSplitterConfig();
+ d->mThumbnailBar->setVisible(visible);
+}
+
+
KStatusBar* DocumentView::statusBar() const {
return d->mStatusBar;
}
@@ -494,8 +511,4 @@
}
-void DocumentView::saveSplitterSizes(int /*pos*/, int /*index*/) {
- GwenviewConfig::setThumbnailSplitterSizes(d->mThumbnailSplitter->sizes());
-}
-
} // namespace
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/app/documentview.h new/kdegraphics-4.0.98/gwenview/app/documentview.h
--- old/kdegraphics-4.0.85/gwenview/app/documentview.h 2008-06-25 09:54:21.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/app/documentview.h 2008-07-08 11:29:06.000000000 +0200
@@ -49,6 +49,8 @@
ThumbnailBarView* thumbnailBar() const;
+ void saveConfig();
+
/**
* Reset the view
*/
@@ -105,7 +107,7 @@
void enterFullScreenRequested();
private Q_SLOTS:
- void saveSplitterSizes(int, int);
+ void setThumbnailBarVisibility(bool visible);
private:
DocumentViewPrivate* const d;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/app/fullscreencontent.cpp new/kdegraphics-4.0.98/gwenview/app/fullscreencontent.cpp
--- old/kdegraphics-4.0.85/gwenview/app/fullscreencontent.cpp 2008-06-18 14:41:07.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/app/fullscreencontent.cpp 2008-07-08 11:29:06.000000000 +0200
@@ -257,7 +257,8 @@
connect(d->mImageMetaInfoDialog, SIGNAL(preferredMetaInfoKeyListChanged(const QStringList&)),
SLOT(slotPreferredMetaInfoKeyListChanged(const QStringList&)) );
}
- d->mImageMetaInfoDialog->setMetaInfo(d->mCurrentDocument->metaInfo(), GwenviewConfig::fullScreenPreferredMetaInfoKeyList());
+ if ( d->mCurrentDocument )
+ d->mImageMetaInfoDialog->setMetaInfo(d->mCurrentDocument->metaInfo(), GwenviewConfig::fullScreenPreferredMetaInfoKeyList());
d->mImageMetaInfoDialog->show();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/app/mainwindow.cpp new/kdegraphics-4.0.98/gwenview/app/mainwindow.cpp
--- old/kdegraphics-4.0.85/gwenview/app/mainwindow.cpp 2008-07-03 07:05:14.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/app/mainwindow.cpp 2008-07-08 11:29:06.000000000 +0200
@@ -575,6 +575,25 @@
mSaveBar->setCurrentUrl(url);
mSlideShow->setCurrentUrl(url);
}
+
+ /**
+ * Sometimes we can get in handleResizeRequest() before geometry() has been
+ * correctly initialized. In this case the difference between geometry
+ */
+ void ensureGeometryIsValid() {
+ // Wait until height difference between frameGeometry and geometry is less than maxDelta
+ // But don't wait for more than timeout (avoid infinite loop)
+ const int timeout = 1000;
+ const int maxDelta = 100;
+ QTime chrono;
+ chrono.start();
+ while (mWindow->frameGeometry().height() - mWindow->geometry().height() > maxDelta
+ && chrono.elapsed() < timeout)
+ {
+ qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+ }
+ }
+
};
@@ -685,13 +704,13 @@
openDirUrl(url);
} else {
d->mViewAction->trigger();
- d->mSideBarContainer->hide();
// Resize the window once image is loaded
connect(d->mDocumentView, SIGNAL(resizeRequested(const QSize&)),
d->mWindow, SLOT(handleResizeRequest(const QSize&)) );
openDocumentUrl(url);
}
d->updateContextDependentComponents();
+ d->mSideBarContainer->setVisible(GwenviewConfig::sideBarIsVisible());
d->updateToggleSideBarAction();
}
@@ -805,6 +824,8 @@
d->mBrowseAction->setChecked(false);
}
d->mBrowseAction->trigger();
+ d->mSideBarContainer->setVisible(GwenviewConfig::sideBarIsVisible());
+ d->updateToggleSideBarAction();
}
@@ -812,6 +833,21 @@
if (url.equals(d->mDirModel->dirLister()->url(), KUrl::CompareWithoutTrailingSlash)) {
return;
}
+
+ KUrl currentUrl = d->mDirModel->dirLister()->url();
+ if (url.isParentOf(currentUrl)) {
+ // Keep first child between url and currentUrl selected
+ // If currentPath is "/home/user/photos/2008/event"
+ // and wantedPath is "/home/user/photos"
+ // pathToSelect should be "/home/user/photos/2008"
+ const QString currentPath = QDir::cleanPath(currentUrl.path(KUrl::RemoveTrailingSlash));
+ const QString wantedPath = QDir::cleanPath(url.path(KUrl::RemoveTrailingSlash));
+ const QChar separator('/');
+ const int slashCount = wantedPath.count(separator);
+ const QString pathToSelect = currentPath.section(separator, 0, slashCount + 1);
+ d->mUrlToSelect = url;
+ d->mUrlToSelect.setPath(pathToSelect);
+ }
d->mDirModel->dirLister()->openUrl(url);
d->spreadCurrentDirUrl(url);
d->mDocumentView->reset();
@@ -1009,7 +1045,8 @@
d->mSaveBar->setFullScreenMode(true);
d->mFullScreenBar->setActivated(true);
} else {
- d->mStateBeforeFullScreen.mActiveViewModeAction->trigger();
+ if ( d->mStateBeforeFullScreen.mActiveViewModeAction )
+ d->mStateBeforeFullScreen.mActiveViewModeAction->trigger();
d->mSideBarContainer->setVisible(d->mStateBeforeFullScreen.mSideBarVisible);
// Back to normal
@@ -1225,7 +1262,9 @@
void MainWindow::saveConfig() {
+ d->mDocumentView->saveConfig();
GwenviewConfig::setThumbnailSize(d->mThumbnailSlider->value());
+ GwenviewConfig::setSideBarIsVisible(d->mSideBarContainer->isVisible());
}
@@ -1252,9 +1291,13 @@
return;
}
+ d->ensureGeometryIsValid();
+
QSize size = _size;
- int sideBarWidth = d->mSideBar->isVisible() ? d->mSideBar->width() : 0;
+ int sideBarWidth = d->mSideBar->isVisible()
+ ? (d->mSideBar->width() + d->mCentralSplitter->handleWidth())
+ : 0;
// innerMargin is the margin around the view, not including the window
// frame
QSize innerMargin = QSize(
@@ -1295,6 +1338,20 @@
windowRect.moveBottom(availableRect.bottom() - bottomFrameMargin);
}
+ // This should not be necessary, but sometimes frameGeometry top left
+ // corner is outside of availableRect
+ int leftFrameMargin = geometry().left() - frameGeometry().left();
+ if (windowRect.left() - leftFrameMargin < availableRect.left()) {
+ kWarning() << "Window is too much on the left, adjusting";
+ windowRect.moveLeft(availableRect.left() + leftFrameMargin);
+ }
+
+ int topFrameMargin = geometry().top() - frameGeometry().top();
+ if (windowRect.top() - topFrameMargin < availableRect.top()) {
+ kWarning() << "Window is too high, adjusting";
+ windowRect.moveTop(availableRect.top() + topFrameMargin);
+ }
+
// Define geometry
setGeometry(windowRect);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/lib/document/document.cpp new/kdegraphics-4.0.98/gwenview/lib/document/document.cpp
--- old/kdegraphics-4.0.85/gwenview/lib/document/document.cpp 2008-06-10 13:40:55.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/lib/document/document.cpp 2008-07-09 15:28:21.000000000 +0200
@@ -40,6 +40,11 @@
AbstractDocumentImpl* mImpl;
KUrl mUrl;
bool mKeepRawData;
+
+ /**
+ * @defgroup imagedata should be reset in reload()
+ * @{
+ */
QSize mSize;
QImage mImage;
QMap mDownSampledImageMap;
@@ -47,6 +52,7 @@
QByteArray mFormat;
ImageMetaInfoModel mImageMetaInfoModel;
QUndoStack mUndoStack;
+ /** @} */
void scheduleImageLoading(int invertedZoom) {
LoadingDocumentImpl* impl = qobject_cast(mImpl);
@@ -82,9 +88,15 @@
void Document::reload() {
- d->mUndoStack.clear();
+ d->mSize = QSize();
+ d->mImage = QImage();
+ d->mDownSampledImageMap.clear();
+ d->mExiv2Image.reset();
+ d->mFormat = QByteArray();
KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, d->mUrl);
d->mImageMetaInfoModel.setFileItem(fileItem);
+ d->mUndoStack.clear();
+
switchToImpl(new LoadingDocumentImpl(this));
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/lib/gwenviewconfig.kcfg new/kdegraphics-4.0.98/gwenview/lib/gwenviewconfig.kcfg
--- old/kdegraphics-4.0.85/gwenview/lib/gwenviewconfig.kcfg 2008-06-25 09:54:21.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/lib/gwenviewconfig.kcfg 2008-07-08 11:29:07.000000000 +0200
@@ -31,6 +31,12 @@
load. This is useful to exclude raw files which are recognized as
TIFF or JPEG.</whatsthis>
</entry>
+ <entry name="SideBarIsVisible" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="ThumbnailBarIsVisible" type="Bool">
+ <default>false</default>
+ </entry>
</group>
<group name="FullScreen">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/part/CMakeLists.txt new/kdegraphics-4.0.98/gwenview/part/CMakeLists.txt
--- old/kdegraphics-4.0.85/gwenview/part/CMakeLists.txt 2008-03-13 23:10:21.000000000 +0100
+++ new/kdegraphics-4.0.98/gwenview/part/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -14,4 +14,5 @@
install(TARGETS gvpart DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES gvpart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-install(FILES gvpart.rc DESTINATION ${DATA_INSTALL_DIR}/gvpart)
+install(FILES gvpart.rc gvpart-gwenview.rc
+ DESTINATION ${DATA_INSTALL_DIR}/gvpart)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/part/gvpart.cpp new/kdegraphics-4.0.98/gwenview/part/gvpart.cpp
--- old/kdegraphics-4.0.85/gwenview/part/gvpart.cpp 2008-06-18 14:41:07.000000000 +0200
+++ new/kdegraphics-4.0.98/gwenview/part/gvpart.cpp 2008-07-08 11:29:07.000000000 +0200
@@ -87,6 +87,8 @@
, mZoomUpdatedBySlider(false)
{
mGwenviewHost = args.contains("gwenviewHost");
+ mStatusBarExtension = 0;
+ mStatusBarWidgetContainer = 0;
mView = new ImageView(parentWidget);
setWidget(mView);
@@ -128,13 +130,16 @@
addPartSpecificActions();
}
- createStatusBarWidget();
createErrorLabel();
- mStatusBarExtension = new KParts::StatusBarExtension(this);
- QTimer::singleShot(0, this, SLOT(initStatusBarExtension()) );
-
- setXMLFile("gvpart/gvpart.rc");
+ if (mGwenviewHost) {
+ createStatusBarWidget();
+ mStatusBarExtension = new KParts::StatusBarExtension(this);
+ QTimer::singleShot(0, this, SLOT(initStatusBarExtension()) );
+ setXMLFile("gvpart/gvpart-gwenview.rc");
+ } else {
+ setXMLFile("gvpart/gvpart.rc");
+ }
loadConfig();
}
@@ -148,7 +153,9 @@
void GVPart::updateZoomSnapValues() {
qreal min = computeMinimumZoom();
- mZoomSlider->setRange(sliderValueForZoom(min), sliderValueForZoom(MAXIMUM_ZOOM_VALUE));
+ if (mStatusBarWidgetContainer) {
+ mZoomSlider->setRange(sliderValueForZoom(min), sliderValueForZoom(MAXIMUM_ZOOM_VALUE));
+ }
mZoomSnapValues.clear();
for (qreal zoom = 1/min; zoom > 1. ; zoom -= 1.) {
@@ -277,7 +284,7 @@
}
setUrl(url);
mErrorWidget->hide();
- if (mStatusBarWidgetContainer->parent()) {
+ if (mStatusBarWidgetContainer && mStatusBarWidgetContainer->parent()) {
// Don't show mStatusBarWidgetContainer until it has been embedded in
// the statusbar by GVPart::initStatusBarExtension()
mStatusBarWidgetContainer->show();
@@ -310,7 +317,9 @@
mErrorWidget->adjustSize();
mErrorWidget->show();
- mStatusBarWidgetContainer->hide();
+ if (mStatusBarWidgetContainer) {
+ mStatusBarWidgetContainer->hide();
+ }
}
@@ -379,19 +388,32 @@
void GVPart::updateCaption() {
QString caption = url().fileName();
+ QSize size = mDocument->size();
+ if (size.isValid()) {
+ int intZoom = int(mView->zoom() * 100);
+ caption +=
+ QString(" - %1x%2 - %3%")
+ .arg(size.width())
+ .arg(size.height())
+ .arg(intZoom);
+ }
emit setWindowCaption(caption);
}
void GVPart::slotZoomChanged() {
- int intZoom = int(mView->zoom() * 100);
- mZoomLabel->setText(QString("%1%").arg(intZoom));
-
- // Update slider, but only if the change does not come from it.
- if (!mZoomUpdatedBySlider) {
- SignalBlocker blocker(mZoomSlider);
- int value = sliderValueForZoom(mView->zoom());
- mZoomSlider->setValue(value);
+ if (mStatusBarWidgetContainer) {
+ int intZoom = int(mView->zoom() * 100);
+ mZoomLabel->setText(QString("%1%").arg(intZoom));
+
+ // Update slider, but only if the change does not come from it.
+ if (!mZoomUpdatedBySlider) {
+ SignalBlocker blocker(mZoomSlider);
+ int value = sliderValueForZoom(mView->zoom());
+ mZoomSlider->setValue(value);
+ }
+ } else {
+ updateCaption();
}
}
@@ -516,11 +538,6 @@
}
} else if (event->type() == QEvent::Resize) {
updateZoomSnapValues();
- } else if (event->type() == QEvent::Hide) {
- // See bug #161443
- mStatusBarWidgetContainer->hide();
- } else if (event->type() == QEvent::Show) {
- mStatusBarWidgetContainer->show();
}
return false;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/part/gvpart-gwenview.rc new/kdegraphics-4.0.98/gwenview/part/gvpart-gwenview.rc
--- old/kdegraphics-4.0.85/gwenview/part/gvpart-gwenview.rc 1970-01-01 01:00:00.000000000 +0100
+++ new/kdegraphics-4.0.98/gwenview/part/gvpart-gwenview.rc 2008-07-08 11:29:07.000000000 +0200
@@ -0,0 +1,15 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="GVPart" version="4">
+<MenuBar>
+ <Menu name="file"><text>&File</text>
+ <Action name="file_save_as"/>
+ </Menu>
+ <Menu name="view"><Text>&View</Text>
+ <Action name="view_actual_size"/>
+ <Action name="view_zoom_to_fit"/>
+ <Action name="view_zoom_in"/>
+ <Action name="view_zoom_out"/>
+ </Menu>
+</MenuBar>
+</kpartgui>
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/gwenview/part/gvpart.rc new/kdegraphics-4.0.98/gwenview/part/gvpart.rc
--- old/kdegraphics-4.0.85/gwenview/part/gvpart.rc 2008-03-25 18:22:03.000000000 +0100
+++ new/kdegraphics-4.0.98/gwenview/part/gvpart.rc 2008-07-08 11:29:07.000000000 +0200
@@ -11,5 +11,11 @@
<Action name="view_zoom_out"/>
</Menu>
</MenuBar>
+<ToolBar name="mainToolBar"><text>Main Toolbar</text>
+ <Action name="view_actual_size"/>
+ <Action name="view_zoom_to_fit"/>
+ <Action name="view_zoom_in"/>
+ <Action name="view_zoom_out"/>
+</ToolBar>
</kpartgui>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/kgamma/kcmkgamma/CMakeLists.txt new/kdegraphics-4.0.98/kgamma/kcmkgamma/CMakeLists.txt
--- old/kdegraphics-4.0.85/kgamma/kcmkgamma/CMakeLists.txt 2008-01-05 00:53:45.000000000 +0100
+++ new/kdegraphics-4.0.98/kgamma/kcmkgamma/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -15,7 +15,7 @@
target_link_libraries(kcm_kgamma Xxf86vm ${KDE4_KDEUI_LIBS}
-${KDE4_KDE3SUPPORT_LIBS} )
+${KDE4_KDE3SUPPORT_LIBS} ${X11_LIBRARIES} )
install(TARGETS kcm_kgamma DESTINATION ${PLUGIN_INSTALL_DIR} )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/libs/libkipi/libkipi/imageinfo.cpp new/kdegraphics-4.0.98/libs/libkipi/libkipi/imageinfo.cpp
--- old/kdegraphics-4.0.85/libs/libkipi/libkipi/imageinfo.cpp 2008-06-03 15:48:04.000000000 +0200
+++ new/kdegraphics-4.0.98/libs/libkipi/libkipi/imageinfo.cpp 2008-07-09 13:02:35.000000000 +0200
@@ -75,12 +75,16 @@
}
/**
- Returns a Map of attributes of the image
- In case the host application supports some special attributes of the image
- this function can be used to return them.
- Tags are supported by this feature: "tags" key contains QStringList()
- encapsulated in a QVariant
-
+ Returns a Map of attributes of the image
+ In case the host application supports some special attributes of the image
+ this function can be used to return them. following attribes are supported by this feature:
+
+ QString("tagspath") :: QStringList() with tags path list formated as "Country/France/City/Paris" for ex.
+ QString("tags") :: QStringList() with tags name list.
+ QString("rating") :: integer value (ususally 0 <= rate <= 5).
+ QString("latitude") :: double value in degrees (-90.0 >= lat <=90.0).
+ QString("longitude") :: double value in degrees (-180.0 >= lat <=180.0).
+ QString("altitude") :: double value in meters.
*/
QMap ImageInfo::attributes() const
{
@@ -121,16 +125,30 @@
_data->setDescription( description );
}
+/** Remove all attribute from the image. See delAttributes() for list of all attributes removed.
+*/
void ImageInfo::clearAttributes()
{
_data->clearAttributes();
}
+/** Set the attributes defined from the map to the image. Following keys/values can be used:
+ QString("tagspath") :: QStringList() with tags path list formated as "Country/France/City/Paris" for ex.
+ QString("rating") :: integer value (ususally 0 <= rate <= 5).
+ QString("latitude") :: double value in degrees (-90.0 >= lat <=90.0).
+ QString("longitude") :: double value in degrees (-180.0 >= lat <=180.0).
+ QString("altitude") :: double value in meters.
+*/
void ImageInfo::addAttributes( const QMap& attributes )
{
_data->addAttributes( attributes );
}
+/** Remove attributes listed from the image. Following values can be used:
+ "tags" : remove all tags.
+ "rating" : remove rating.
+ "gpslocation" : remove latitude, longitude, and altitude values.
+*/
void ImageInfo::delAttributes( const QStringList& attributes )
{
_data->delAttributes( attributes );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/core/version.h new/kdegraphics-4.0.98/okular/core/version.h
--- old/kdegraphics-4.0.85/okular/core/version.h 2008-01-29 10:15:19.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/core/version.h 2008-07-08 11:29:07.000000000 +0200
@@ -10,10 +10,10 @@
#ifndef _OKULAR_VERSION_H_
#define _OKULAR_VERSION_H_
-#define OKULAR_VERSION_STRING "0.6.80"
+#define OKULAR_VERSION_STRING "0.6.90"
#define OKULAR_VERSION_MAJOR 0
#define OKULAR_VERSION_MINOR 6
-#define OKULAR_VERSION_RELEASE 80
+#define OKULAR_VERSION_RELEASE 90
#define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
#define OKULAR_VERSION \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/comicbook/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/comicbook/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/comicbook/CMakeLists.txt 2008-01-05 00:53:45.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/comicbook/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -15,7 +15,10 @@
kde4_add_plugin(okularGenerator_comicbook ${okularGenerator_comicbook_PART_SRCS})
-target_link_libraries(okularGenerator_comicbook okularcore ${KDE4_KDEUI_LIBS} )
+target_link_libraries(okularGenerator_comicbook okularcore ${KDE4_KIO_LIBS} )
+if (UNIX)
+ target_link_libraries(okularGenerator_comicbook ${KDE4_KPTY_LIBRARY})
+endif (UNIX)
install(TARGETS okularGenerator_comicbook DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/comicbook/unrar.cpp new/kdegraphics-4.0.98/okular/generators/comicbook/unrar.cpp
--- old/kdegraphics-4.0.85/okular/generators/comicbook/unrar.cpp 2008-05-29 13:18:37.000000000 +0200
+++ new/kdegraphics-4.0.98/okular/generators/comicbook/unrar.cpp 2008-07-08 11:29:07.000000000 +0200
@@ -9,14 +9,20 @@
#include "unrar.h"
+#include
#include
-#include
#include
#include
#include
+#include
+#include
#include
#include
+#if !defined(Q_OS_WIN)
+#include
+#include
+#endif
#include "unrarflavours.h"
@@ -78,7 +84,7 @@
Unrar::Unrar()
- : QObject( 0 ), mTempDir( 0 )
+ : QObject( 0 ), mLoop( 0 ), mTempDir( 0 )
{
}
@@ -103,16 +109,8 @@
mStdOutData.clear();
mStdErrData.clear();
- mProcess = new QProcess( this );
-
- connect( mProcess, SIGNAL( readyReadStandardOutput() ), SLOT( readFromStdout() ) );
- connect( mProcess, SIGNAL( readyReadStandardError() ), SLOT( readFromStderr() ) );
-
- mProcess->start( helper->unrarPath, QStringList() << "e" << mFileName << mTempDir->name(), QIODevice::ReadOnly );
- bool ok = mProcess->waitForFinished( -1 );
-
- delete mProcess;
- mProcess = 0;
+ int ret = startSyncProcess( QStringList() << "e" << mFileName << mTempDir->name() );
+ bool ok = ret == 0;
return ok;
}
@@ -125,16 +123,7 @@
if ( !isSuitableVersionAvailable() )
return QStringList();
- mProcess = new QProcess( this );
-
- connect( mProcess, SIGNAL( readyReadStandardOutput() ), SLOT( readFromStdout() ) );
- connect( mProcess, SIGNAL( readyReadStandardError() ), SLOT( readFromStderr() ) );
-
- mProcess->start( helper->unrarPath, QStringList() << "lb" << mFileName, QIODevice::ReadOnly );
- mProcess->waitForFinished( -1 );
-
- delete mProcess;
- mProcess = 0;
+ startSyncProcess( QStringList() << "lb" << mFileName );
return helper->kind->processListing( QString::fromLocal8Bit( mStdOutData ).split( "\n", QString::SkipEmptyParts ) );
}
@@ -166,12 +155,78 @@
void Unrar::readFromStdout()
{
+ if ( !mProcess )
+ return;
+
mStdOutData += mProcess->readAllStandardOutput();
}
void Unrar::readFromStderr()
{
+ if ( !mProcess )
+ return;
+
mStdErrData += mProcess->readAllStandardError();
+ if ( !mStdErrData.isEmpty() )
+ {
+ mProcess->kill();
+ return;
+ }
+}
+
+void Unrar::finished( int exitCode, QProcess::ExitStatus exitStatus )
+{
+ Q_UNUSED( exitCode )
+ if ( mLoop )
+ {
+ mLoop->exit( exitStatus == QProcess::CrashExit ? 1 : 0 );
+ }
+}
+
+int Unrar::startSyncProcess( const QStringList &args )
+{
+ int ret = 0;
+
+#if defined(Q_OS_WIN)
+ mProcess = new QProcess( this );
+#else
+ mProcess = new KPtyProcess( this );
+ mProcess->setOutputChannelMode( KProcess::SeparateChannels );
+#endif
+
+ connect( mProcess, SIGNAL( readyReadStandardOutput() ), SLOT( readFromStdout() ) );
+ connect( mProcess, SIGNAL( readyReadStandardError() ), SLOT( readFromStderr() ) );
+ connect( mProcess, SIGNAL( finished( int, QProcess::ExitStatus ) ), SLOT( finished( int, QProcess::ExitStatus ) ) );
+
+#if defined(Q_OS_WIN)
+ mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
+ ret = mProcess->waitForFinished( -1 ) ? 0 : 1;
+#else
+ mProcess->setProgram( helper->unrarPath, args );
+ mProcess->setNextOpenMode( QIODevice::ReadWrite | QIODevice::Unbuffered );
+ mProcess->start();
+ QEventLoop loop;
+ mLoop = &loop;
+ ret = loop.exec( QEventLoop::WaitForMoreEvents );
+ mLoop = 0;
+#endif
+
+ delete mProcess;
+ mProcess = 0;
+
+ return ret;
+}
+
+void Unrar::writeToProcess( const QByteArray &data )
+{
+ if ( !mProcess || data.isNull() )
+ return;
+
+#if defined(Q_OS_WIN)
+ mProcess->write( data );
+#else
+ mProcess->pty()->write( data );
+#endif
}
#include "unrar.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/comicbook/unrar.h new/kdegraphics-4.0.98/okular/generators/comicbook/unrar.h
--- old/kdegraphics-4.0.85/okular/generators/comicbook/unrar.h 2008-05-21 10:32:44.000000000 +0200
+++ new/kdegraphics-4.0.98/okular/generators/comicbook/unrar.h 2008-07-08 11:29:07.000000000 +0200
@@ -11,10 +11,12 @@
#define UNRAR_H
#include
+#include
#include
-class QProcess;
+class QEventLoop;
class KTempDir;
+class KPtyProcess;
class Unrar : public QObject
{
@@ -52,9 +54,18 @@
private Q_SLOTS:
void readFromStdout();
void readFromStderr();
+ void finished( int exitCode, QProcess::ExitStatus exitStatus );
private:
+ int startSyncProcess( const QStringList &args );
+ void writeToProcess( const QByteArray &data );
+
+#if defined(Q_OS_WIN)
QProcess *mProcess;
+#else
+ KPtyProcess *mProcess;
+#endif
+ QEventLoop *mLoop;
QString mFileName;
QByteArray mStdOutData;
QByteArray mStdErrData;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/fictionbook/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/fictionbook/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/fictionbook/CMakeLists.txt 2008-02-28 18:05:37.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/fictionbook/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -15,7 +15,7 @@
kde4_add_plugin(okularGenerator_fb ${okularGenerator_fb_PART_SRCS})
-target_link_libraries(okularGenerator_fb okularcore ${KDE4_KDEUI_LIBS})
+target_link_libraries(okularGenerator_fb okularcore ${KDE4_KIO_LIBS} ${QT_QTXML_LIBRARY})
install(TARGETS okularGenerator_fb DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/kimgio/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/kimgio/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/kimgio/CMakeLists.txt 2008-02-28 18:05:36.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/kimgio/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -10,7 +10,7 @@
kde4_add_plugin(okularGenerator_kimgio ${okularGenerator_kimgio_PART_SRCS})
-target_link_libraries(okularGenerator_kimgio okularcore ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY})
+target_link_libraries(okularGenerator_kimgio okularcore ${KDE4_KDEUI_LIBS} )
install(TARGETS okularGenerator_kimgio DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/ooo/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/ooo/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/ooo/CMakeLists.txt 2008-02-14 15:36:04.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/ooo/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -27,9 +27,9 @@
kde4_add_plugin(okularGenerator_ooo ${okularGenerator_ooo_PART_SRCS})
if (QCA2_FOUND)
- target_link_libraries(okularGenerator_ooo okularcore ${KDE4_KDEUI_LIBS} ${MATH_LIB} ${QCA2_LIBRARIES})
+ target_link_libraries(okularGenerator_ooo okularcore ${KDE4_KIO_LIBS} ${MATH_LIB} ${QCA2_LIBRARIES} ${QT_QTXML_LIBRARY})
else (QCA2_FOUND)
- target_link_libraries(okularGenerator_ooo okularcore ${KDE4_KDEUI_LIBS} ${MATH_LIB})
+ target_link_libraries(okularGenerator_ooo okularcore ${KDE4_KIO_LIBS} ${MATH_LIB} ${QT_QTXML_LIBRARY})
endif (QCA2_FOUND)
install(TARGETS okularGenerator_ooo DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/poppler/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/poppler/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/poppler/CMakeLists.txt 2008-04-18 09:21:28.000000000 +0200
+++ new/kdegraphics-4.0.98/okular/generators/poppler/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -48,7 +48,7 @@
kde4_add_plugin(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
-target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore ${KDE4_KDEUI_LIBS})
+target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
install(TARGETS okularGenerator_poppler DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/spectre/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/spectre/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/spectre/CMakeLists.txt 2008-02-07 14:19:07.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/spectre/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -22,7 +22,7 @@
kde4_add_plugin(okularGenerator_ghostview ${okularGenerator_ghostview_SRCS})
-target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} ${KDE4_KDEUI_LIBRARY})
+target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
install(TARGETS okularGenerator_ghostview DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/tiff/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/tiff/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/tiff/CMakeLists.txt 2008-02-28 18:05:37.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/tiff/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -13,7 +13,7 @@
kde4_add_plugin(okularGenerator_tiff ${okularGenerator_tiff_SRCS})
-target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES} ${KDE4_KDEUI_LIBS})
+target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES} ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY})
install(TARGETS okularGenerator_tiff DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/generators/xps/CMakeLists.txt new/kdegraphics-4.0.98/okular/generators/xps/CMakeLists.txt
--- old/kdegraphics-4.0.85/okular/generators/xps/CMakeLists.txt 2008-01-05 00:53:45.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/generators/xps/CMakeLists.txt 2008-07-08 11:29:07.000000000 +0200
@@ -12,7 +12,7 @@
kde4_add_plugin(okularGenerator_xps ${okularGenerator_xps_SRCS})
-target_link_libraries(okularGenerator_xps okularcore ${KDE4_KDEUI_LIBS} )
+target_link_libraries(okularGenerator_xps okularcore ${KDE4_KIO_LIBS} ${QT_QTXML_LIBRARY})
install(TARGETS okularGenerator_xps DESTINATION ${PLUGIN_INSTALL_DIR})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdegraphics-4.0.85/okular/VERSION new/kdegraphics-4.0.98/okular/VERSION
--- old/kdegraphics-4.0.85/okular/VERSION 2008-01-15 02:47:59.000000000 +0100
+++ new/kdegraphics-4.0.98/okular/VERSION 2008-07-08 11:29:07.000000000 +0200
@@ -1 +1 @@
-okular v0.6.80
+okular v0.6.90
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org