Commit 07a3d552 authored by abveritas's avatar abveritas
Browse files

md5 kde 4.10, removed kdeadmin-print-manager patch

parent db4650e5
This diff is collapsed.
commit d889135b42c809f29a83d0a386915cc88a1b82b6
Author: Daniel Nicoletti <dantti12@gmail.com>
Date: Thu Jan 10 17:30:48 2013 -0200
Enable "Show printers shared by other systems" when on CUPS 1.6, it does support it
diff --git a/libkcups/KCupsServer.cpp b/libkcups/KCupsServer.cpp
index d5a81c5..7ad59f7 100644
--- a/libkcups/KCupsServer.cpp
+++ b/libkcups/KCupsServer.cpp
@@ -56,20 +56,12 @@ void KCupsServer::setAllowUserCancelAnyJobs(bool allow)
bool KCupsServer::showSharedPrinters() const
{
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
return m_arguments.value(CUPS_SERVER_REMOTE_PRINTERS).toBool();
-#else
- return false;
-#endif
}
void KCupsServer::setShowSharedPrinters(bool show)
{
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_arguments[CUPS_SERVER_REMOTE_PRINTERS] = show ? QLatin1String("1") : QLatin1String("0");
-#else
- Q_UNUSED(show)
-#endif // CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
}
bool KCupsServer::sharePrinters() const
diff --git a/printer-manager-kcm/PrintKCM.cpp b/printer-manager-kcm/PrintKCM.cpp
index d7fbbd8..61452a9 100644
--- a/printer-manager-kcm/PrintKCM.cpp
+++ b/printer-manager-kcm/PrintKCM.cpp
@@ -79,11 +79,9 @@ PrintKCM::PrintKCM(QWidget *parent, const QVariantList &args) :
QMenu *systemMenu = new QMenu(this);
connect(systemMenu, SIGNAL(aboutToShow()), this, SLOT(getServerSettings()));
connect(systemMenu, SIGNAL(triggered(QAction*)), this, SLOT(systemPreferencesTriggered()));
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_showSharedPrinters = systemMenu->addAction(i18nc("@action:intoolbar","Show printers shared by other systems"));
m_showSharedPrinters->setCheckable(true);
systemMenu->addSeparator();
-#endif // CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_shareConnectedPrinters = systemMenu->addAction(i18nc("@action:intoolbar","Share printers connected to this system"));
m_shareConnectedPrinters->setCheckable(true);
m_allowPrintringFromInternet = systemMenu->addAction(i18nc("@action:intoolbar","Allow printing from the Internet"));
@@ -323,9 +321,7 @@ void PrintKCM::getServerSettingsFinished()
// we can safely ignore the error since it DOES bring the server settings
bool error = request->hasError() && request->error() != IPP_NOT_FOUND;
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_showSharedPrinters->setEnabled(!error);
-#endif // CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_shareConnectedPrinters->setEnabled(!error);
m_allowPrintringFromInternet->setEnabled(!error);
m_allowRemoteAdmin->setEnabled(!error);
@@ -340,9 +336,7 @@ void PrintKCM::getServerSettingsFinished()
KCupsServer server = request->serverSettings();
m_gotServerSettings = true;
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_showSharedPrinters->setChecked(server.showSharedPrinters());
-#endif // CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
m_shareConnectedPrinters->setChecked(server.sharePrinters());
m_allowPrintringFromInternet->setChecked(server.allowPrintingFromInternet());
m_allowRemoteAdmin->setChecked(server.allowRemoteAdmin());
@@ -379,9 +373,7 @@ void PrintKCM::updateServerFinished()
void PrintKCM::systemPreferencesTriggered()
{
KCupsServer server;
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
server.setShowSharedPrinters(m_showSharedPrinters->isChecked());
-#endif // CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6
server.setSharePrinters(m_shareConnectedPrinters->isChecked());
server.setAllowPrintingFromInternet(m_allowPrintringFromInternet->isChecked());
server.setAllowRemoteAdmin(m_allowRemoteAdmin->isChecked());
......@@ -22,14 +22,11 @@ provides=('print-manager')
replaces=('kdeadmin-system-config-printer' 'print-manager' 'kdeutils-printer-applet')
conflicts=('print-manager')
options=('docs' '!splithdr' 'splitdbg' 'log')
source=("$_mirror/${_pkgname}-$_kdever.tar.xz"
'KCupsServer.diff' )
md5sums=(`grep ${_pkgname}-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`
'6bd7c36cf84a9690237e1039faf78884')
source=("$_mirror/${_pkgname}-$_kdever.tar.xz")
md5sums=(`grep ${_pkgname}-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`)
build() {
cd ${srcdir}/${_pkgname}-${pkgver}
patch -Rp1 -i ${srcdir}/KCupsServer.diff
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment