summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-05-13 17:49:55 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-05-13 19:18:54 +0900
commit86187cb0d45d6eeedd5ac6ceee4b584f81d74447 (patch)
tree15d503f99c682bb591755a53f4e92568fe5a2b13
parent2ff1fe8c9e65011e6f0f7717eca64205fe0d7b5f (diff)
downloadtdewebdev-86187cb0.tar.gz
tdewebdev-86187cb0.zip
Kommander: removed 'Run in KDE4' menu entry and code.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kommander/editor/mainwindow.cpp64
-rw-r--r--kommander/editor/mainwindow.h1
-rw-r--r--kommander/editor/mainwindowactions.cpp8
-rw-r--r--kommander/widgets/table.cpp8
4 files changed, 4 insertions, 77 deletions
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp
index 3fde775c..5ff1b6fb 100644
--- a/kommander/editor/mainwindow.cpp
+++ b/kommander/editor/mainwindow.cpp
@@ -471,70 +471,6 @@ void MainWindow::runForm()
}
-void MainWindow::runForm4()
-{
- if (previewing)
- {
- KMessageBox::information(this, i18n("There is a dialog already running."), i18n("Run"));
- return;
- }
- FormWindow* form = activeForm();
- if (!form || !form->formFile())
- return;
-
- TQObjectList *editors = queryList("AssocTextEditor");
- TQObjectListIt it(*editors);
- TQObject *editor;
-
- while ((editor = it.current()) != 0L)
- {
- ++it;
- static_cast<AssocTextEditor*>(TQT_TQWIDGET(editor))->save();
- }
- delete editors;
-
- if (form->formFile()->hasTempFileName())
- {
- if (!form->formFile()->saveAs())
- return;
- }
-
- m_fileName = form->formFile()->fileName();
- m_backupName = m_fileName + ".running";
- m_modified = form->formFile()->isModified();
-
- bool readOnlyFile = !TQFileInfo(m_fileName).isWritable();
- struct stat statbuf;
- ::stat(m_fileName.local8Bit(), &statbuf);
- if (!readOnlyFile && !TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
- {
- KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName));
- return;
- }
- form->formFile()->setFileName(m_fileName);
- if (!readOnlyFile || m_modified)
- form->formFile()->setModified(true);
- if (form->formFile()->save(false))
- {
- if (!readOnlyFile && !TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
- {
- KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup"));
- }
- ::chmod(m_fileName.local8Bit(), S_IRWXU);
- TDEProcess* process = new TDEProcess;
- process->setUseShell(true);
- (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName());
- connect(process, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), messageLog,
- TQT_SLOT(receivedStdout(TDEProcess*, char*, int)));
- connect(process, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), messageLog,
- TQT_SLOT(receivedStderr(TDEProcess*, char*, int)));
- connect(process, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(closeRunningForm(TDEProcess*)));
- messageLog->clear(MessageLog::All);
- previewing = process->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
- }
-}
-
-
void MainWindow::closeRunningForm(TDEProcess* process)
{
previewing = false;
diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h
index 69f06c5f..16c143f6 100644
--- a/kommander/editor/mainwindow.h
+++ b/kommander/editor/mainwindow.h
@@ -192,7 +192,6 @@ public slots:
void configureEditor();
void runForm();
- void runForm4();
private slots:
void activeWindowChanged( TQWidget *w );
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index dd760f81..e5fa0050 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -476,14 +476,6 @@ void MainWindow::setupRunActions()
connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(menu);
- // add KDE4 executor
-
- TDEAction* b = new TDEAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R,
- TQT_TQOBJECT(this), TQT_SLOT(runForm4()), actionCollection(), "run4");
- b->setToolTip(i18n("Executes dialog in KDE4"));
- b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
- connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool)));
- b->plug(menu);
}
void MainWindow::setupWindowActions()
diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp
index 49ea5c19..252dbcee 100644
--- a/kommander/widgets/table.cpp
+++ b/kommander/widgets/table.cpp
@@ -57,11 +57,11 @@ Table::Table(TQWidget *a_parent, const char *a_name)
KommanderPlugin::setDefaultGroup(Group::DCOP);
KommanderPlugin::registerFunction(TBL_sortColumnExtra, "sortColumnExtra(TQString widget, int col, bool ascending, bool wholeRows)", i18n("Sets a column to sort ascending or descending. Optionally can sort with rows intact for database use."), 2, 4);
KommanderPlugin::registerFunction(TBL_keepCellVisible, "keepCellVisible(TQString widget, int row, int col)", i18n("Scrolls the table so the cell indicated is visible."), 3);
- KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(TQString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 5);
+ KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(TQString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses"), 5);
KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(TQString widget, int row)", i18n("Select the row with the zero based index."), 2);
- KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(TQString widget, int col)", i18n("Select the column with the zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
- KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(TQString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
- KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(TQString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(TQString widget, int col)", i18n("Select the column with the zero based index."), 2);
+ KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(TQString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index."), 3);
+ KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(TQString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index."), 3);
KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(TQString widget)", i18n("Returns the number of rows of the table"), 1);
KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(TQString widget, int Column)", i18n("Returns the text of the header for the column index"), 2);
KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(TQString widget, int Row)", i18n("Returns the text of the header for the row index"), 2);