From 865f314dd5ed55508f45a32973b709b79a541e36 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 03:46:01 +0000 Subject: kdelibs update to Trinity v3.5.11 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeprint/Makefile.am | 4 ++-- kdeprint/configure.in.in | 5 +++-- kdeprint/cups/Makefile.am | 2 +- kdeprint/cups/cupsdconf2/Makefile.am | 2 +- kdeprint/cups/cupsdconf2/cupsd.conf.template | 14 +++++++------- kdeprint/cups/cupsdconf2/cupsdconf.cpp | 6 +++--- kdeprint/cups/cupsdconf2/cupsddialog.cpp | 11 +++-------- kdeprint/cups/kmcupsmanager.cpp | 2 +- kdeprint/ext/Makefile.am | 2 +- kdeprint/filters/psnup.xml | 9 +++++++++ kdeprint/kprinter.cpp | 2 +- kdeprint/lpdunix/Makefile.am | 2 +- kdeprint/lpr/Makefile.am | 3 ++- kdeprint/management/Makefile.am | 6 +++--- kdeprint/management/kmmainview.cpp | 8 ++++++++ kdeprint/management/kmmainview.h | 1 + kdeprint/management/smbview.cpp | 20 +++++++++----------- kdeprint/rlpr/Makefile.am | 2 +- kdeprint/tools/escputil/Makefile.am | 2 +- 19 files changed, 58 insertions(+), 45 deletions(-) (limited to 'kdeprint') diff --git a/kdeprint/Makefile.am b/kdeprint/Makefile.am index 2379e5f02..06f3a583c 100644 --- a/kdeprint/Makefile.am +++ b/kdeprint/Makefile.am @@ -11,7 +11,7 @@ INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/kded -I$(top_srcdir) $(all_inclu kde_module_LTLIBRARIES = kded_kdeprintd.la kded_kdeprintd_la_SOURCES = kdeprintd.skel kdeprintd.cpp kprintprocess.cpp -kded_kdeprintd_la_LIBADD = $(LIB_KIO) $(LIB_KDED) +kded_kdeprintd_la_LIBADD = $(LIB_KIO) $(LIB_KDED) $(LIB_QT) $(LIB_KDEUI) $(top_builddir)/dcop/libDCOP.la $(LIB_KDECORE) $(top_builddir)/kded/libkdeinit_kded.la kded_kdeprintd_la_LDFLAGS = $(all_libraries) -module -avoid-version #kded_kdeprintd_la_METASOURCES = AUTO @@ -30,7 +30,7 @@ libkdeprint_la_SOURCES = kmfactory.cpp kmjob.cpp kmjobmanager.cpp kmmanager.cpp fooparser.cpp fooscanner.cpp ppdparser.cpp ppdscanner.cpp ppdloader.cpp libkdeprint_la_LDFLAGS = $(all_libraries) -version-info 6:0:2 -no-undefined -libkdeprint_la_LIBADD = $(LIB_KPARTS) $(LIBZ) +libkdeprint_la_LIBADD = $(LIBZ) $(LIB_QT) $(LIB_KDEUI) $(top_builddir)/dcop/libDCOP.la $(LIB_KDECORE) $(LIB_KFILE) libkdeprint_la_DEPENDENCIES = $(LIB_KPARTS) libkdeprint_la_METASOURCES = AUTO diff --git a/kdeprint/configure.in.in b/kdeprint/configure.in.in index 8dd3880d6..3165cc4c4 100644 --- a/kdeprint/configure.in.in +++ b/kdeprint/configure.in.in @@ -51,10 +51,11 @@ if test "$ac_use_cups" = "yes"; then ac_LDFLAGS_save="$LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries" kde_cups_config= - kde_cups_libs="-lcups $LIBDL $LIBSOCKET" + kde_cups_libs="-lcups" AC_PATH_PROG(kde_cups_config,cups-config) if test -n "$kde_cups_config"; then - kde_cups_libs=`$kde_cups_config --libs` +# kde_cups_libs=`$kde_cups_config --libs` + kde_cups_libs="$kde_cups_libs" else AC_MSG_RESULT(cups-config not found, using default libraries: $kde_cups_libs. You should consider upgrading CUPS) fi diff --git a/kdeprint/cups/Makefile.am b/kdeprint/cups/Makefile.am index 60bd22c08..4e21a545e 100644 --- a/kdeprint/cups/Makefile.am +++ b/kdeprint/cups/Makefile.am @@ -15,7 +15,7 @@ kdeprint_cups_la_SOURCES = cupsinfos.cpp ipprequest.cpp kmcupsfactory.cpp kmcups kptextpage.cpp kphpgl2page.cpp cupsaddsmb2.cpp kmwother.cpp ippreportdlg.cpp \ kptagspage.cpp kdeprint_cups_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_cups_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la $(LIB_KIO) $(LIB_CUPS) $(top_builddir)/kdecore/libkdefakes.la +kdeprint_cups_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la $(LIB_KIO) $(LIB_CUPS) $(LIB_QT) $(LIB_KDEPRINT) $(LIB_KDECORE) $(LIB_KDEUI) kdeprint_cups_la_METASOURCES = AUTO noinst_HEADERS = cupsinfos.h ipprequest.h kmcupsjobmanager.h kmcupsmanager.h kmcupsuimanager.h \ diff --git a/kdeprint/cups/cupsdconf2/Makefile.am b/kdeprint/cups/cupsdconf2/Makefile.am index 84c68ae98..58c83dc6d 100644 --- a/kdeprint/cups/cupsdconf2/Makefile.am +++ b/kdeprint/cups/cupsdconf2/Makefile.am @@ -15,7 +15,7 @@ cupsdconf_la_SOURCES = cupsdconf.cpp cupsddialog.cpp cupsdpage.cpp cupsdcomment. qdirmultilineedit.cpp sizewidget.cpp main.cpp cupsdconf_la_METASOURCES = AUTO cupsdconf_la_LDFLAGS = -avoid-version -module $(all_libraries) $(KDE_RPATH) -cupsdconf_la_LIBADD = $(LIB_KIO) $(LIB_CUPS) +cupsdconf_la_LIBADD = $(LIB_KIO) $(LIB_CUPS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) noinst_HEADERS = cupsdconf.h cupsdpage.h cupsddialog.h cupsdcomment.h cupsdsplash.h \ cupsdserverpage.h cupsdlogpage.h cupsdjobspage.h cupsdfilterpage.h \ diff --git a/kdeprint/cups/cupsdconf2/cupsd.conf.template b/kdeprint/cups/cupsdconf2/cupsd.conf.template index c91f0dfa3..ae1a4c362 100644 --- a/kdeprint/cups/cupsdconf2/cupsd.conf.template +++ b/kdeprint/cups/cupsdconf2/cupsd.conf.template @@ -100,9 +100,9 @@ $$ # The root directory for HTTP documents that are served. # By default the compiled-in directory.

#

-# ex: /usr/share/cups/doc

+# ex: /usr/share/cups/doc-root

$$ -#DocumentRoot /usr/share/cups/doc +#DocumentRoot /usr/share/cups/doc-root @@ %%errorlog @@ -272,12 +272,12 @@ $$ # Group (Group) #

# The group the server runs under. Normally this -# must be sys, however you can configure things for another +# must be lpadmin, however you can configure things for another # group as needed.

#

-# ex: sys

+# ex: lpadmin

$$ -#Group sys +#Group lpadmin @@ %%ripcache @@ -592,9 +592,9 @@ $$ # access. The default varies depending on the operating system, but # will be sys, system, or root (checked for in that order).

#

-# ex: sys

+# ex: lpadmin

$$ -#SystemGroup sys +#SystemGroup lpadmin @@ %%servercertificate diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp index 4018ab2fb..1794d693d 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -66,7 +66,7 @@ CupsdConf::CupsdConf() << "/usr/local/share/cups" << "/opt/share/cups" << "/opt/local/share/cups"); - documentdir_ = findDir(QStringList(datadir_+"/doc") + documentdir_ = findDir(QStringList(datadir_+"/doc-root") << datadir_.left(datadir_.length()-5)+"/doc/cups"); //fontpath_ << (datadir_+"/fonts"); requestdir_ = findDir(QStringList("/var/spool/cups") @@ -90,7 +90,7 @@ CupsdConf::CupsdConf() printcap_ = "/etc/printcap"; printcapformat_ = PRINTCAP_BSD; remoteroot_ = "remroot"; - systemgroup_ = "sys"; + systemgroup_ = "lpadmin"; encryptcert_ = serverfiles_+"/ssl/server.crt"; encryptkey_ = serverfiles_+"/ssl/server.key"; hostnamelookup_ = HOSTNAME_OFF; @@ -115,7 +115,7 @@ CupsdConf::CupsdConf() maxjobsperprinter_ = 0; maxjobsperuser_ = 0; user_ = "lp"; - group_ = "sys"; + group_ = "lpadmin"; ripcache_ = "8m"; filterlimit_ = 0; browsing_ = true; diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp index a70b5b59e..92f8eef51 100644 --- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -206,14 +206,9 @@ bool CupsdDialog::restartServer(QString& msg) else { bool success = false; - if (getuid() == 0 ) - success = (::kill(serverPid, SIGHUP) == 0); - else - { - KProcess proc; - proc << "kdesu" << "-c" << "kill -SIGHUP " + QString::number( serverPid ); - success = proc.start( KProcess::Block ) && proc.normalExit(); - } + KProcess proc; + proc << "kdesu" << "-c" << "/etc/init.d/cupsys restart"; + success = proc.start( KProcess::Block ) && proc.normalExit(); if( !success ) msg = i18n("Unable to restart CUPS server (pid = %1)").arg(serverPid); } diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp index bc17bb93d..003d408fc 100644 --- a/kdeprint/cups/kmcupsmanager.cpp +++ b/kdeprint/cups/kmcupsmanager.cpp @@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager() QString KMCupsManager::driverDbCreationProgram() { - return QString::fromLatin1("make_driver_db_cups"); + return QString::fromLatin1("/opt/kde3/bin/make_driver_db_cups"); } QString KMCupsManager::driverDirectory() diff --git a/kdeprint/ext/Makefile.am b/kdeprint/ext/Makefile.am index a280e1451..1cb50d9fb 100644 --- a/kdeprint/ext/Makefile.am +++ b/kdeprint/ext/Makefile.am @@ -6,7 +6,7 @@ kde_module_LTLIBRARIES = kdeprint_ext.la kdeprint_ext_la_SOURCES = kmextfactory.cpp kmextmanager.cpp kextprinterimpl.cpp kmextuimanager.cpp kdeprint_ext_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_ext_la_LIBADD = $(top_builddir)/kdeprint/libkdeprint.la +kdeprint_ext_la_LIBADD = $(LIB_KDEPRINT) $(LIB_QT) $(LIB_KDECORE) kdeprint_ext_la_METASOURCES = AUTO noinst_HEADERS = kmextmanager.h kextprinterimpl.h kmextuimanager.h diff --git a/kdeprint/filters/psnup.xml b/kdeprint/filters/psnup.xml index 76436f81c..54b71531f 100644 --- a/kdeprint/filters/psnup.xml +++ b/kdeprint/filters/psnup.xml @@ -11,6 +11,15 @@ + + + + + + + + + diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp index e6a0d0eb7..bba70e62d 100644 --- a/kdeprint/kprinter.cpp +++ b/kdeprint/kprinter.cpp @@ -403,7 +403,7 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer) } else { - if (/* !outputToFile() && */ startviewer) + if (/* !outputToFile() && */ startviewer && !QFile::exists("/etc/xdg/autostart/system-config-printer-applet-kde.desktop") ) { QStringList args; args << "-d"; diff --git a/kdeprint/lpdunix/Makefile.am b/kdeprint/lpdunix/Makefile.am index 79d4dce56..89b08d839 100644 --- a/kdeprint/lpdunix/Makefile.am +++ b/kdeprint/lpdunix/Makefile.am @@ -6,7 +6,7 @@ kde_module_LTLIBRARIES = kdeprint_lpdunix.la kdeprint_lpdunix_la_SOURCES = kmlpdunixfactory.cpp kmlpdunixmanager.cpp klpdunixprinterimpl.cpp kmlpdunixuimanager.cpp kdeprint_lpdunix_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_lpdunix_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la +kdeprint_lpdunix_la_LIBADD = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEPRINT) kdeprint_lpdunix_la_METASOURCES = AUTO noinst_HEADERS = kmlpdunixmanager.h klpdunixprinterimpl.h kmlpdunixuimanager.h diff --git a/kdeprint/lpr/Makefile.am b/kdeprint/lpr/Makefile.am index 4ee2545ca..29944f348 100644 --- a/kdeprint/lpr/Makefile.am +++ b/kdeprint/lpr/Makefile.am @@ -13,7 +13,8 @@ kdeprint_lpr_la_SOURCES = printcapreader.cpp lprhandler.cpp \ lprngtoolhandler.cpp \ editentrydialog.cpp kdeprint_lpr_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_lpr_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la $(top_builddir)/kdecore/libkdefakes.la +kdeprint_lpr_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la \ + $(LIB_QT) $(LIB_KDEPRINT) $(LIB_KDEUI) $(LIB_KDECORE) kdeprint_lpr_la_METASOURCES = AUTO noinst_HEADERS = printcapreader.h \ diff --git a/kdeprint/management/Makefile.am b/kdeprint/management/Makefile.am index b6485fdfb..42bdeba4d 100644 --- a/kdeprint/management/Makefile.am +++ b/kdeprint/management/Makefile.am @@ -8,7 +8,7 @@ kdeinit_LTLIBRARIES = kaddprinterwizard.la bin_PROGRAMS = kaddprinterwizard_la_SOURCES = kaddprinterwizard.cpp -kaddprinterwizard_la_LIBADD = libkdeprint_management.la +kaddprinterwizard_la_LIBADD = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEPRINT) $(LIB_KDEUI) kaddprinterwizard_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_RPATH) libkdeprint_management_la_SOURCES = \ @@ -26,12 +26,12 @@ libkdeprint_management_la_SOURCES = \ pluginaction.cpp kxmlcommanddlg.cpp kxmlcommandselector.cpp kmconfigcommand.cpp \ kmconfigfilter.cpp kmconfigfonts.cpp kmconfigjobs.cpp networkscanner.cpp libkdeprint_management_la_LDFLAGS = $(all_libraries) -version-info 6:0:2 -no-undefined -libkdeprint_management_la_LIBADD = ../libkdeprint.la +libkdeprint_management_la_LIBADD = ../libkdeprint.la $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) libkdeprint_management_la_METASOURCES = AUTO libkdeprint_management_module_la_SOURCES = kdeprint_management_module.cpp libkdeprint_management_module_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -no-undefined -libkdeprint_management_module_la_LIBADD = libkdeprint_management.la +libkdeprint_management_module_la_LIBADD = libkdeprint_management.la $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) kdeprint_HEADERS = kmmainview.h kmjobviewer.h kmprinterpage.h kiconselectaction.h kmtimer.h kdeprintdir = $(includedir)/kdeprint diff --git a/kdeprint/management/kmmainview.cpp b/kdeprint/management/kmmainview.cpp index c506725af..a1ecd6bbc 100644 --- a/kdeprint/management/kmmainview.cpp +++ b/kdeprint/management/kmmainview.cpp @@ -209,6 +209,7 @@ void KMMainView::initActions() new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,SLOT(slotServerRestart()),m_actions,"server_restart"); new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,SLOT(slotServerConfigure()),m_actions,"server_configure"); + new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure"); KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); tact->setCheckedState(i18n("Hide &Toolbar")); @@ -691,6 +692,13 @@ void KMMainView::slotServerConfigure() } } +void KMMainView::slotServerConfigureAccess() +{ + KProcess *proc = new KProcess; + *proc << "/usr/bin/system-config-printer-kde"; + proc->start(KProcess::DontCare); +} + void KMMainView::slotToggleToolBar(bool on) { if (on) m_toolbar->show(); diff --git a/kdeprint/management/kmmainview.h b/kdeprint/management/kmmainview.h index 150ee9129..2e521e50f 100644 --- a/kdeprint/management/kmmainview.h +++ b/kdeprint/management/kmmainview.h @@ -78,6 +78,7 @@ public slots: void slotTest(); void slotServerRestart(); void slotServerConfigure(); + void slotServerConfigureAccess(); void slotManagerConfigure(); void slotAddSpecial(); void slotRefresh(); diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp index 79e088209..6cf5ee4c8 100644 --- a/kdeprint/management/smbview.cpp +++ b/kdeprint/management/smbview.cpp @@ -179,11 +179,8 @@ void SmbView::setOpen(QListViewItem *item, bool on) m_current = item; *m_proc << "nmblookup"+m_wins_server+"-M "; *m_proc << KProcess::quote(item->text(0)); - *m_proc << " -S | grep '<20>' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*<20>.*//' | xargs -Iserv_name smbclient -N -L 'serv_name' -W "; - *m_proc << KProcess::quote(item->text(0)); - *m_proc << " -A "; - *m_proc << KProcess::quote(m_passwdFile->name()); - startProcess(ServerListing); + *m_proc << " -S"; + startProcess(ServerListing); } else if (item->depth() == 1) { // opening server @@ -192,8 +189,11 @@ void SmbView::setOpen(QListViewItem *item, bool on) *m_proc << KProcess::quote(item->text(0)); *m_proc << " -W "; *m_proc << KProcess::quote(item->parent()->text(0)); - *m_proc << " -A "; - *m_proc << KProcess::quote(m_passwdFile->name()); + if (m_login != QString::null) + { + *m_proc << " -A "; + *m_proc << KProcess::quote(m_passwdFile->name()); + } startProcess(ShareListing); } } @@ -220,16 +220,14 @@ void SmbView::processServers() QStringList lines = QStringList::split('\n',m_buffer,true); QString line; uint index(0); - for (;index < lines.count();index++) - if (lines[index].stripWhiteSpace().startsWith("Server")) - break; - index += 2; while (index < lines.count()) { line = lines[index++].stripWhiteSpace(); if (line.isEmpty()) break; QStringList words = QStringList::split(' ',line,false); + if (words[1] != "<00>" || words[3] == "") + continue; QListViewItem *item = new QListViewItem(m_current,words[0]); item->setExpandable(true); item->setPixmap(0,SmallIcon("kdeprint_computer")); diff --git a/kdeprint/rlpr/Makefile.am b/kdeprint/rlpr/Makefile.am index ce075fb7c..d0ea535ec 100644 --- a/kdeprint/rlpr/Makefile.am +++ b/kdeprint/rlpr/Makefile.am @@ -7,7 +7,7 @@ kde_module_LTLIBRARIES = kdeprint_rlpr.la kdeprint_rlpr_la_SOURCES = kmrlprfactory.cpp kmrlprmanager.cpp krlprprinterimpl.cpp kmrlpruimanager.cpp \ kmwrlpr.cpp kmproprlpr.cpp kmproxywidget.cpp kmconfigproxy.cpp kdeprint_rlpr_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_rlpr_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la +kdeprint_rlpr_la_LIBADD = $(top_builddir)/kdeprint/management/libkdeprint_management.la $(LIB_QT) $(LIB_KDEPRINT) $(LIB_KDECORE) $(LIB_KDEUI) kdeprint_rlpr_la_METASOURCES = AUTO noinst_HEADERS = kmrlprmanager.h krlprprinterimpl.h kmrlpruimanager.h kmwrlpr.h kmproprlpr.h \ diff --git a/kdeprint/tools/escputil/Makefile.am b/kdeprint/tools/escputil/Makefile.am index 71a4a63b7..beb7c2a5e 100644 --- a/kdeprint/tools/escputil/Makefile.am +++ b/kdeprint/tools/escputil/Makefile.am @@ -4,7 +4,7 @@ kde_module_LTLIBRARIES = kdeprint_tool_escputil.la kdeprint_tool_escputil_la_SOURCES = escpwidget.cpp kdeprint_tool_escputil_la_METASOURCES = AUTO kdeprint_tool_escputil_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kdeprint_tool_escputil_la_LIBADD = $(LIB_KDEUI) +kdeprint_tool_escputil_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE) noinst_HEADERS = escpwidget.h -- cgit v1.2.1