diff options
Diffstat (limited to 'konqueror/shellcmdplugin')
-rw-r--r-- | konqueror/shellcmdplugin/Makefile.am | 14 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmddialog.cpp | 90 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmddialog.h | 48 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdexecutor.cpp | 156 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdexecutor.h | 50 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdplugin.cpp | 90 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdplugin.desktop | 135 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdplugin.h | 36 | ||||
-rw-r--r-- | konqueror/shellcmdplugin/kshellcmdplugin.rc | 8 |
9 files changed, 627 insertions, 0 deletions
diff --git a/konqueror/shellcmdplugin/Makefile.am b/konqueror/shellcmdplugin/Makefile.am new file mode 100644 index 000000000..cc213a53b --- /dev/null +++ b/konqueror/shellcmdplugin/Makefile.am @@ -0,0 +1,14 @@ +INCLUDES= -I$(top_srcdir)/libkonq $(all_includes) +METASOURCES=AUTO + +kde_module_LTLIBRARIES = konq_shellcmdplugin.la +konq_shellcmdplugin_la_SOURCES = kshellcmdexecutor.cpp kshellcmddialog.cpp \ + kshellcmdplugin.cpp +konq_shellcmdplugin_la_LIBADD = $(top_builddir)/libkonq/libkonq.la +konq_shellcmdplugin_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) + +iconviewdir = $(kde_datadir)/konqiconview/kpartplugins +iconview_DATA = kshellcmdplugin.rc kshellcmdplugin.desktop + +listviewdir = $(kde_datadir)/konqlistview/kpartplugins +listview_DATA = kshellcmdplugin.rc kshellcmdplugin.desktop diff --git a/konqueror/shellcmdplugin/kshellcmddialog.cpp b/konqueror/shellcmdplugin/kshellcmddialog.cpp new file mode 100644 index 000000000..b39e35cd3 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmddialog.cpp @@ -0,0 +1,90 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Alexander Neundorf <neundorf@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <qhbox.h> +#include <qlayout.h> +#include <qlabel.h> + +#include <klocale.h> +#include <kstdguiitem.h> +#include <kpushbutton.h> + +#include "kshellcmddialog.h" +#include "kshellcmdexecutor.h" + +KShellCommandDialog::KShellCommandDialog(const QString& title, const QString& command, QWidget* parent, bool modal) + :KDialog(parent,"p",modal) +{ + QVBoxLayout * box=new QVBoxLayout (this,marginHint(),spacingHint()); + + QLabel *label=new QLabel(title,this); + m_shell=new KShellCommandExecutor(command,this); + + QHBox *buttonsBox=new QHBox(this); + buttonsBox->setSpacing(spacingHint()); + + cancelButton= new KPushButton(KStdGuiItem::cancel(), buttonsBox); + closeButton= new KPushButton(KStdGuiItem::close(), buttonsBox); + closeButton->setDefault(true); + + label->resize(label->sizeHint()); + m_shell->resize(m_shell->sizeHint()); + closeButton->setFixedSize(closeButton->sizeHint()); + cancelButton->setFixedSize(cancelButton->sizeHint()); + + box->addWidget(label,0); + box->addWidget(m_shell,1); + box->addWidget(buttonsBox,0); + + m_shell->setFocus(); + + connect(cancelButton, SIGNAL(clicked()), m_shell, SLOT(slotFinished())); + connect(m_shell, SIGNAL(finished()), this, SLOT(disableStopButton())); + connect(closeButton,SIGNAL(clicked()), this, SLOT(slotClose())); +} + +KShellCommandDialog::~KShellCommandDialog() +{ + delete m_shell; + m_shell=0; +} + +void KShellCommandDialog::disableStopButton() +{ + cancelButton->setEnabled(false); +} + +void KShellCommandDialog::slotClose() +{ + delete m_shell; + m_shell=0; + accept(); +} + +//blocking +int KShellCommandDialog::executeCommand() +{ + if (m_shell==0) + return 0; + //kdDebug()<<"---------- KShellCommandDialog::executeCommand()"<<endl; + m_shell->exec(); + return exec(); +} + +#include "kshellcmddialog.moc" diff --git a/konqueror/shellcmdplugin/kshellcmddialog.h b/konqueror/shellcmdplugin/kshellcmddialog.h new file mode 100644 index 000000000..790c8e0d0 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmddialog.h @@ -0,0 +1,48 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Alexander Neundorf <neundorf@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef SHELLCOMMANDDIALOG_H +#define SHELLCOMMANDDIALOG_H + +#include <qstring.h> + +#include <kpushbutton.h> +#include <kdialog.h> +class QPushButton; +class KShellCommandExecutor; + +class KShellCommandDialog:public KDialog +{ + Q_OBJECT + public: + KShellCommandDialog(const QString& title, const QString& command, QWidget* parent=0, bool modal=false); + virtual ~KShellCommandDialog(); + //blocking + int executeCommand(); + protected: + + KShellCommandExecutor *m_shell; + KPushButton *cancelButton; + KPushButton *closeButton; + protected slots: + void disableStopButton(); + void slotClose(); +}; + +#endif diff --git a/konqueror/shellcmdplugin/kshellcmdexecutor.cpp b/konqueror/shellcmdplugin/kshellcmdexecutor.cpp new file mode 100644 index 000000000..c83488005 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdexecutor.cpp @@ -0,0 +1,156 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Alexander Neundorf <neundorf@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include "kshellcmdexecutor.h" + +#include <sys/time.h> +#include <sys/types.h> +#include <unistd.h> +#include <signal.h> +#include <stdlib.h> + +#include <qsocketnotifier.h> + +#include <kinputdialog.h> +#include <kglobalsettings.h> +#include <kdesu/process.h> +#include <klocale.h> + +KShellCommandExecutor::KShellCommandExecutor(const QString& command, QWidget* parent) +:QTextView(parent) +,m_shellProcess(0) +,m_command(command) +,m_readNotifier(0) +,m_writeNotifier(0) +{ + setTextFormat(PlainText); + setFont( KGlobalSettings::fixedFont() ); +} + +KShellCommandExecutor::~KShellCommandExecutor() +{ + if (m_shellProcess!=0) + { + ::kill(m_shellProcess->pid()+1, SIGTERM); + delete m_shellProcess; + }; +} + +int KShellCommandExecutor::exec() +{ + //kdDebug()<<"---------- KShellCommandExecutor::exec()"<<endl; + setText(""); + if (m_shellProcess!=0) + { + ::kill(m_shellProcess->pid(),SIGTERM); + delete m_shellProcess; + }; + if (m_readNotifier!=0) + delete m_readNotifier; + if (m_writeNotifier!=0) + delete m_writeNotifier; + + m_shellProcess=new PtyProcess(); + m_shellProcess->setTerminal(true); + + QCStringList args; + args+="-c"; + args+=m_command.local8Bit(); + //kdDebug()<<"------- executing: "<<m_command.local8Bit()<<endl; + + QCString shell( getenv("SHELL") ); + if (shell.isEmpty()) + shell = "sh"; + + int ret = m_shellProcess->exec(shell, args); + if (ret < 0) + { + //kdDebug()<<"could not execute"<<endl; + return 0; + } + + m_readNotifier=new QSocketNotifier(m_shellProcess->fd(),QSocketNotifier::Read, this); + m_writeNotifier=new QSocketNotifier(m_shellProcess->fd(),QSocketNotifier::Write, this); + m_writeNotifier->setEnabled(false); + connect (m_readNotifier, SIGNAL(activated(int)), this,SLOT(readDataFromShell())); + connect (m_writeNotifier, SIGNAL(activated(int)), this,SLOT(writeDataToShell())); + + return 1; +} + +void KShellCommandExecutor::readDataFromShell() +{ + //kdDebug()<<"--------- reading ------------"<<endl; + char buffer[16*1024]; + int bytesRead=::read(m_shellProcess->fd(), buffer, 16*1024-1); + //0-terminate the buffer + //process exited + if (bytesRead<=0) + { + slotFinished(); + } + else if (bytesRead>0) + { + //kdDebug()<<"***********************\n"<<buffer<<"###################\n"<<endl; + buffer[bytesRead]='\0'; + this->append(QString::fromLocal8Bit(buffer)); + setTextFormat(PlainText); + }; +} + +void KShellCommandExecutor::writeDataToShell() +{ + //kdDebug()<<"--------- writing ------------"<<endl; + bool ok; + QString str = KInputDialog::getText( QString::null, + i18n( "Input Required:" ), QString::null, &ok, this ); + if ( ok ) + { + QCString input=str.local8Bit(); + ::write(m_shellProcess->fd(),input,input.length()); + ::write(m_shellProcess->fd(),"\n",1); + } + else + slotFinished(); + + if (m_writeNotifier) + { + m_writeNotifier->setEnabled(false); + } +} + +void KShellCommandExecutor::slotFinished() +{ + setTextFormat(PlainText); + if (m_shellProcess!=0) + { + delete m_readNotifier; + m_readNotifier = 0; + delete m_writeNotifier; + m_writeNotifier = 0; + + //kdDebug()<<"slotFinished: pid: "<<m_shellProcess->pid()<<endl; + ::kill(m_shellProcess->pid()+1, SIGTERM); + ::kill(m_shellProcess->pid(), SIGTERM); + }; + delete m_shellProcess; + m_shellProcess=0; + emit finished(); +} + +#include "kshellcmdexecutor.moc" diff --git a/konqueror/shellcmdplugin/kshellcmdexecutor.h b/konqueror/shellcmdplugin/kshellcmdexecutor.h new file mode 100644 index 000000000..66b066a85 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdexecutor.h @@ -0,0 +1,50 @@ +/* This file is part of the KDE project + Copyright (C) 2000 Alexander Neundorf <neundorf@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef SHELLCOMMANDEXECUTOR_H +#define SHELLCOMMANDEXECUTOR_H + +#include <qstring.h> +#include <qtextview.h> + +class PtyProcess; +class QSocketNotifier; + +class KShellCommandExecutor:public QTextView +{ + Q_OBJECT + public: + KShellCommandExecutor(const QString& command, QWidget* parent=0); + virtual ~KShellCommandExecutor(); + int exec(); + signals: + void finished(); + public slots: + void slotFinished(); + protected: + PtyProcess *m_shellProcess; + QString m_command; + QSocketNotifier *m_readNotifier; + QSocketNotifier *m_writeNotifier; + protected slots: + void readDataFromShell(); + void writeDataToShell(); +}; + +#endif diff --git a/konqueror/shellcmdplugin/kshellcmdplugin.cpp b/konqueror/shellcmdplugin/kshellcmdplugin.cpp new file mode 100644 index 000000000..b7f07ec81 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdplugin.cpp @@ -0,0 +1,90 @@ +/* This file is part of the KDE project + Copyright (C) 2000 David Faure <faure@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kshellcmdplugin.h" +#include <kinputdialog.h> +#include <kmessagebox.h> +#include <konq_dirpart.h> +#include <kprocess.h> +#include <kapplication.h> +#include "kshellcmddialog.h" +#include <kgenericfactory.h> +#include <kio/netaccess.h> + +KShellCmdPlugin::KShellCmdPlugin( QObject* parent, const char* name, + const QStringList & ) + : KParts::Plugin( parent, name ) +{ + if (!kapp->authorize("shell_access")) + return; + + new KAction( i18n( "&Execute Shell Command..." ), "run", CTRL+Key_E, this, + SLOT( slotExecuteShellCommand() ), actionCollection(), "executeshellcommand" ); +} + +void KShellCmdPlugin::slotExecuteShellCommand() +{ + KonqDirPart * part = dynamic_cast<KonqDirPart *>(parent()); + if ( !part ) + { + KMessageBox::sorry(0L, "KShellCmdPlugin::slotExecuteShellCommand: Program error, please report a bug."); + return; + } + KURL url = KIO::NetAccess::mostLocalURL(part->url(),NULL); + if ( !url.isLocalFile() ) + { + KMessageBox::sorry(part->widget(),i18n("Executing shell commands works only on local directories.")); + return; + } + QString path; + if ( part->currentItem() ) + { + // Putting the complete path to the selected file isn't really necessary, + // since we'll cd to the directory first. But we do need to get the + // complete relative path. + path = KURL::relativePath( url.path(), + part->currentItem()->url().path() ); + } + else + { + path = url.path(); + } + bool ok; + QString cmd = KInputDialog::getText( i18n("Execute Shell Command"), + i18n( "Execute shell command in current directory:" ), + KProcess::quote( path ), &ok, part->widget() ); + if ( ok ) + { + QString chDir; + chDir="cd "; + chDir+=KProcess::quote(part->url().path()); + chDir+="; "; + chDir+=cmd; + + KShellCommandDialog *shellCmdDialog=new KShellCommandDialog(i18n("Output from command: \"%1\"").arg(cmd),chDir,part->widget(),true); + shellCmdDialog->resize(500,300); + shellCmdDialog->executeCommand(); + delete shellCmdDialog; + } +} + +typedef KGenericFactory<KShellCmdPlugin> KonqShellCmdPluginFactory; +K_EXPORT_COMPONENT_FACTORY( konq_shellcmdplugin, KonqShellCmdPluginFactory( "kshellcmdplugin" ) ) + +#include "kshellcmdplugin.moc" + diff --git a/konqueror/shellcmdplugin/kshellcmdplugin.desktop b/konqueror/shellcmdplugin/kshellcmdplugin.desktop new file mode 100644 index 000000000..f5c1b3865 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdplugin.desktop @@ -0,0 +1,135 @@ +[Desktop Entry] +Type=Service +X-KDE-PluginInfo-Author=Alexander Neundorf +X-KDE-PluginInfo-Email=neundorf@kde.org +X-KDE-PluginInfo-Name=kshellcmdplugin +X-KDE-PluginInfo-Version=3.4 +X-KDE-PluginInfo-Website= +X-KDE-PluginInfo-Category=Tools +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true +X-KDE-ParentApp=konqueror +Icon=run +Name=Shell Command Plugin +Name[af]=Opdrag tolk inprop module +Name[ar]=قابس أمر المحارة +Name[be]=Утулка выканання каманды ў абалонцы +Name[bg]=Изпълнение на команда +Name[bn]=শেল কমান্ড প্লাগ-ইন +Name[bs]=Dodatak za shell naredbe +Name[ca]=Endollable d'ordres +Name[cs]=Modul shellového příkazu +Name[csb]=Plugins pòlétu pòwłoczi +Name[da]=Plugin for skalkommando +Name[de]=Shell-Befehl-Plugin +Name[el]=Πρόσθετο εντολών κελύφους +Name[eo]=Ŝelkomanda kromaĵo +Name[es]=Complemento para ejecutar órdenes +Name[et]=Shellikäsu plugin +Name[eu]=Shell komandorako plugina +Name[fa]=وصلۀ فرمان پوسته +Name[fi]=Komentoriviliitännäinen +Name[fr]=Module de lignes de commande +Name[fy]=Flueslkommando-plugin +Name[gl]=Plugin para Execución de Comandos +Name[he]=תוסף הפעלת פקודה מסוף +Name[hr]=Dodatak za naredbe u ljuski +Name[hu]=Parancsvégrehajtó modul +Name[is]=Skeljarskipunar íforrit +Name[it]=Plugin per i comandi shell +Name[ja]=シェルコマンドプラグイン +Name[ka]=გარსისს ბრძანების მოდული +Name[kk]=Команда жолы +Name[km]=កម្មវិធីជំនួយពាក្យបញ្ជាសែល +Name[ko]=셸 명령 플러그인 +Name[lt]=Apvalkalo komandų priedas +Name[mk]=Приклучок за команда за школка +Name[ms]=Plugin Arahan Shell +Name[nb]=Programtillegg for skallkommandoer +Name[nds]=Plugin för Konsoolbefehlen +Name[ne]=शेल आदेश प्लगइन +Name[nl]=Schellcommando-plugin +Name[nn]=Programtillegg for skalkommandoar +Name[pa]=ਸੈੱਲ ਕਮਾਂਡ ਪਲੱਗਇਨ +Name[pl]=Wtyczka polecenia powłoki +Name[pt]='Plugin' para Executar um Comando +Name[pt_BR]=Plug-in do Shell +Name[ro]=Plugin shell pentru comenzi +Name[ru]=Выполнить команду +Name[rw]=Icomeka ry'Ibwirizwa Sheli +Name[sk]=Modul Príkaz shellu +Name[sl]=Vstavek Lupinski ukaz +Name[sr]=Прикључак за наредбе шкољке +Name[sr@Latn]=Priključak za naredbe školjke +Name[sv]=Insticksprogram för skalkommando +Name[ta]=ஓட்டு கட்டளை சொருகுப்பொருள் +Name[th]=ปลั๊กอินสำหรับป้อนคำสั่งเชลล์ +Name[tr]=Üçbirim Komut Eklentisi +Name[tt]=Qabıqqa Boyırıq birü Östämäse +Name[uk]=Втулок командної оболонки +Name[vi]=Trình bổ sung Ra lệnh qua Trình giao diện +Name[wa]=Tchôke-divins di comande shell +Name[zh_CN]=Shell 命令插件 +Name[zh_TW]=Shell 命令外掛程式 +Comment=Shell Command Plugin for Konqueror +Comment[af]=Opdrag tolk inprop module vir Konqueror +Comment[ar]=قابس أمر المحارة لِــ Konqueror +Comment[be]=Утулка выканання каманды ў абалонцы для Konqueror +Comment[bg]=Приставка за изпълнение на команда на браузъра +Comment[bn]=কনকরার-এর জন্য শেল কমান্ড প্লাগ-ইন +Comment[bs]=Dodatak za shell naredbe za Konqueror +Comment[ca]=Endollable d'ordres per a Konqueror +Comment[cs]=Modul shellového příkazu pro Konqueror +Comment[csb]=Plugins pòlétu pòwłoczi dlô Konquerora +Comment[da]=Plugin for skalkommandon i Konqueror +Comment[de]=Ein Shell-Befehl-Plugin für Konqueror +Comment[el]=Πρόσθετο εντολών κελύφους για τον Konqueror +Comment[eo]=Ŝelo Komando Kromaĵo por Konkeranto +Comment[es]=Complemento para ejecutar órdenes desde Konqueror +Comment[et]=Konquerori shellikäsu plugin +Comment[eu]=Shell komandorako plugina Konquerorako +Comment[fa]=وصلۀ فرمان پوسته برای Konqueror +Comment[fi]=Konquerorin komentoriviliitännäinen +Comment[fr]=Module de lignes de commande pour Konqueror +Comment[fy]=In flueskommando-plugin foar Konqueror +Comment[gl]=Plugin para Execución de Comandos para Konqueror +Comment[he]=תוסף הפעלת פקודה מסוף עבור Konqueror +Comment[hr]=Dodatak za naredbe u ljuski namijenjen Konqueroru +Comment[hu]=Parancsvégrehajtó modul a Konqueror böngészőhöz +Comment[is]=Skeljarskipunar íforrit fyrir Konqueror +Comment[it]=Plugin per i comandi shell di Konqueror +Comment[ja]=Konqueror 用シェルコマンドプラグイン +Comment[ka]=გარსისს ბრძანების მოდული Konqueror-ისთვის +Comment[kk]=Команда жолы модулі +Comment[km]=កម្មវិធីជំនួយពាក្យបញ្ជាសែលសម្រាប់ Konqueror +Comment[ko]=Konqueror 셸 명령 플러그인 +Comment[lt]=Apvalkalo komandų priedas Konqueror +Comment[mk]=Приклучок за команда за школка за Konqueror +Comment[ms]=Plugin Arahan Shell untuk Konqueror +Comment[nb]=Programtillegg for skallkommandoer i Konqueror +Comment[nds]=Konsoolbefehl-Plugin för Konqueror +Comment[ne]=कन्क्वेररका लागि शेल आदेश प्लगइन +Comment[nl]=Een shellcommando-plugin voor Konqueror +Comment[nn]=Programtillegg for skalkommandoar i Konqueror +Comment[pa]=ਕੋਨਕਿਉਰੋਰ ਲਈ ਸ਼ੈਲ ਕਮਾਂਡ ਪਲੱਗਇਨ +Comment[pl]=Wtyczka polecenia powłoki dla Konquerora +Comment[pt]=Um 'Plugin' para Executar Comandos no Konqueror +Comment[pt_BR]=Plug-in de Comandos do Shell para o Konqueror +Comment[ro]=Plugin shell pentru comenzi pentru Konqueror +Comment[ru]=Выполнить команду из Konqueror +Comment[rw]=Icomeka ry'Ibwiriza Sheli rijyanye na Konqueror +Comment[sk]=Modul Príkaz pre Konqueror +Comment[sl]=Vstavek Lupinski ukaz za Konqueror +Comment[sr]=Прикључак за наредбе шкољке за Konqueror +Comment[sr@Latn]=Priključak za naredbe školjke za Konqueror +Comment[sv]=Insticksprogram för skalkommandon i Konqueror +Comment[ta]=கான்கொரர்க்கான ஓட்டு கட்டளை சொருகுப்பொருள் +Comment[th]=ปลั้กอินป้อนคำสั่งเชลล์สำหรับของคอนเควอร์เรอร์ +Comment[tr]=Konqueror için uçbirim komut eklentisi +Comment[tt]=Konqueror öçen Qabıqqa Boyırıq birü Östämäse +Comment[uk]=Втулок командної оболонки для Konqueror +Comment[vi]=Trình bổ sung Ra lệnh qua Trình giao diện cho Konqueror +Comment[wa]=Tchôke-divins di comande shell po Konqueror +Comment[zh_CN]=Konqueror 的 Shell 命令插件 +Comment[zh_TW]=Konqueror 的 Shell 指令外掛程式 diff --git a/konqueror/shellcmdplugin/kshellcmdplugin.h b/konqueror/shellcmdplugin/kshellcmdplugin.h new file mode 100644 index 000000000..3e1415803 --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdplugin.h @@ -0,0 +1,36 @@ +/* This file is part of the KDE project + Copyright (C) 2000 David Faure <faure@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef kshellcmdplugin_h +#define kshellcmdplugin_h + +#include <kparts/plugin.h> +#include <klibloader.h> + +class KShellCmdPlugin : public KParts::Plugin +{ + Q_OBJECT +public: + KShellCmdPlugin( QObject* parent, const char* name, const QStringList & ); + ~KShellCmdPlugin() {} + +public slots: + void slotExecuteShellCommand(); +}; + +#endif diff --git a/konqueror/shellcmdplugin/kshellcmdplugin.rc b/konqueror/shellcmdplugin/kshellcmdplugin.rc new file mode 100644 index 000000000..fab09c43f --- /dev/null +++ b/konqueror/shellcmdplugin/kshellcmdplugin.rc @@ -0,0 +1,8 @@ +<!DOCTYPE kpartplugin> +<kpartplugin name="kshellcmdplugin" library="konq_shellcmdplugin"> +<MenuBar> + <Menu name="tools"><text>&Tools</text> + <Action name="executeshellcommand"/> + </Menu> +</MenuBar> +</kpartplugin> |