Hello community,
here is the log from the commit of package kdegraphics4 for openSUSE:Factory
checked in at Sat Feb 12 11:50:14 CET 2011.
--------
--- KDE/kdegraphics4/kdegraphics4.changes 2011-01-19 23:39:10.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdegraphics4/kdegraphics4.changes 2011-02-11 19:50:37.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 11 18:47:00 UTC 2011 - ctrippe@gmx.net
+
+- Add upstream patch to make the size of the scan dialog more user
+ friendly (bnc#670968,kde#262595)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
fix_scan_dialog_bnc670968.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdegraphics4.spec ++++++
--- /var/tmp/diff_new_pack.C3GTER/_old 2011-02-12 11:49:57.000000000 +0100
+++ /var/tmp/diff_new_pack.C3GTER/_new 2011-02-12 11:49:57.000000000 +0100
@@ -39,9 +39,10 @@
Summary: Base package for kdegraphics apps
Url: http://www.kde.org
Version: 4.6.0
-Release: 1
+Release: 2
Source0: kdegraphics-%version.tar.bz2
Patch0: 4_6_BRANCH.diff
+Patch1: fix_scan_dialog_bnc670968.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
Suggests: libksane0
@@ -65,6 +66,7 @@
%prep
%setup -q -n kdegraphics-%version
%patch0
+%patch1
%build
%cmake_kde4 -d build
++++++ fix_scan_dialog_bnc670968.diff ++++++
--- libs/libksane/libksane/ksane_viewer.cpp 2011/01/26 18:34:46 1217327
+++ libs/libksane/libksane/ksane_viewer.cpp 2011/01/26 18:36:15 1217328
@@ -934,6 +934,11 @@
}
}
+QSize KSaneViewer::sizeHint() const
+{
+ return QSize(250, 300); // a sensible size for a scan preview
+}
+
void KSaneViewer::refineSelections(int pixelMargin)
{
// The end result
--- libs/libksane/libksane/ksane_viewer.h 2011/01/26 18:34:46 1217327
+++ libs/libksane/libksane/ksane_viewer.h 2011/01/26 18:36:15 1217328
@@ -46,6 +46,8 @@
/** Find selections in the picture
* \param area this parameter determine the area of the reduced sized image. */
void findSelections(float area = 10000.0);
+
+ virtual QSize sizeHint() const;
public Q_SLOTS:
--- ksaneplugin/sanedialog.cpp 2011/01/28 20:44:55 1217819
+++ ksaneplugin/sanedialog.cpp 2011/01/28 21:42:52 1217820
@@ -29,6 +29,7 @@
#include <KDebug>
#include <KPluginLoader>
#include <KMessageBox>
+#include <KSharedConfig>
K_PLUGIN_FACTORY(SaneDialogFactory, registerPlugin<SaneDialog>();)
K_EXPORT_PLUGIN(SaneDialogFactory("ksaneplugin"))
@@ -71,12 +72,35 @@
openDev = QString();
return false;
}
+
+ // restore scan dialog size and all options for the selected device if available
+ KSharedConfigPtr configPtr = KSharedConfig::openConfig("scannersettings");
+ restoreDialogSize(KConfigGroup(configPtr, "ScanDialog"));
+ QString groupName = openDev;
+ if (configPtr->hasGroup(groupName)) {
+ KConfigGroup group(configPtr, groupName);
+ QStringList keys = group.keyList();
+ for (int i = 0; i < keys.count(); i++)
+ ksanew->setOptVal(keys[i], group.readEntry(keys[i]));
+ }
+
return true;
}
-
SaneDialog::~SaneDialog()
{
+ if (ksanew && !openDev.isEmpty()) {
+ // save scan dialog size and all options for the selected device if available
+ KSharedConfigPtr configPtr = KSharedConfig::openConfig("scannersettings");
+ KConfigGroup group(configPtr, "ScanDialog");
+ saveDialogSize(group, KConfigGroup::Persistent);
+ group = configPtr->group(openDev);
+ QMap