summaryrefslogtreecommitdiffstats
path: root/kdeprint/management
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
commit865f314dd5ed55508f45a32973b709b79a541e36 (patch)
treedc1a3a884bb2fc10a89a3c46313897d22c5771eb /kdeprint/management
parentce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff)
downloadtdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz
tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip
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
Diffstat (limited to 'kdeprint/management')
-rw-r--r--kdeprint/management/Makefile.am6
-rw-r--r--kdeprint/management/kmmainview.cpp8
-rw-r--r--kdeprint/management/kmmainview.h1
-rw-r--r--kdeprint/management/smbview.cpp20
4 files changed, 21 insertions, 14 deletions
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] == "<GROUP>")
+ continue;
QListViewItem *item = new QListViewItem(m_current,words[0]);
item->setExpandable(true);
item->setPixmap(0,SmallIcon("kdeprint_computer"));