From fd5c4f4443daf00b8ce3109b3833edcd7cf3636c Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 3 Apr 2011 15:47:41 -0400 Subject: [PATCH] Remove unused ShowRemoteDialog The dialog code was commented out in 2008 as part of https://projects.kde.org/projects/kde/kdebase/konsole/repository/ revisions/5036d8cb00414593631bc611191c9ed95668dcc6 --- src/CMakeLists.txt | 2 - src/MainWindow.cpp | 14 ----- src/MainWindow.h | 1 - src/RemoteConnectionDialog.cpp | 87 --------------------------- src/RemoteConnectionDialog.h | 52 ----------------- src/RemoteConnectionDialog.ui | 104 --------------------------------- 6 files changed, 260 deletions(-) delete mode 100644 src/RemoteConnectionDialog.cpp delete mode 100644 src/RemoteConnectionDialog.h delete mode 100644 src/RemoteConnectionDialog.ui diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e17b27767..0d2dd1e02 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -84,7 +84,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake) ProfileList.cpp ProfileListWidget.cpp Pty.cpp - RemoteConnectionDialog.cpp RenameTabsDialog.cpp Screen.cpp ScreenWindow.cpp @@ -134,7 +133,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake) EditProfileDialog.ui KeyBindingEditor.ui ManageProfilesDialog.ui - RemoteConnectionDialog.ui RenameTabsDialog.ui ) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index fbae223de..df0b0400d 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -49,7 +49,6 @@ // Konsole #include "BookmarkHandler.h" #include "IncrementalSearchBar.h" -#include "RemoteConnectionDialog.h" #include "SessionController.h" #include "ProfileList.h" #include "ManageProfilesDialog.h" @@ -253,12 +252,6 @@ void MainWindow::setupActions() action->setAutoRepeat( false ); connect( action , SIGNAL(triggered()) , this , SLOT(newWindow()) ); - action = collection->addAction("remote-connection"); - action->setText( i18n("Remote Connection...") ); - action->setIcon( KIcon("network-connect") ); - action->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_R) ); - connect( action , SIGNAL(triggered()) , this , SLOT(showRemoteConnectionDialog()) ); - action = KStandardAction::quit( this , SLOT(close()) , collection ); // the default shortcut for quit is typically Ctrl+[Some Letter, usually Q] but that is reserved for // use by terminal applications @@ -500,13 +493,6 @@ void MainWindow::showManageProfilesDialog() dialog->show(); } -void MainWindow::showRemoteConnectionDialog() -{ -// RemoteConnectionDialog dialog(this); -// if ( dialog.exec() == QDialog::Accepted ) -// emit newSessionRequest(dialog.sessionKey(),QString(),_viewManager); -} - void MainWindow::activateMenuBar() { const QList menuActions = menuBar()->actions(); diff --git a/src/MainWindow.h b/src/MainWindow.h index 7065b7d05..33c2e5376 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -158,7 +158,6 @@ class MainWindow : public KXmlGuiWindow void newWindow(); void showManageProfilesDialog(); void activateMenuBar(); - void showRemoteConnectionDialog(); void showShortcutsDialog(); void newFromProfile(Profile::Ptr profile); void activeViewChanged(SessionController* controller); diff --git a/src/RemoteConnectionDialog.cpp b/src/RemoteConnectionDialog.cpp deleted file mode 100644 index 4bb443ea1..000000000 --- a/src/RemoteConnectionDialog.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2007 by Robert Knight - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ - -// Own -#include "RemoteConnectionDialog.h" - -// Qt -#include - -// KDE -#include - -// Konsole -#include "SessionManager.h" - -#include "ui_RemoteConnectionDialog.h" - -using namespace Konsole; - -RemoteConnectionDialog::RemoteConnectionDialog(QWidget* parent) - : KDialog(parent) -{ - setCaption(i18n("New Remote Connection")); - setButtons( KDialog::Ok | KDialog::Cancel ); - setButtonText( KDialog::Ok , i18n("Connect") ); - - _ui = new Ui::RemoteConnectionDialog(); - _ui->setupUi(mainWidget()); - - // set initial UI state - _ui->userEdit->setFocus(Qt::OtherFocusReason); - - _ui->userEdit->setClearButtonShown(true); - _ui->hostEdit->setClearButtonShown(true); -} -RemoteConnectionDialog::~RemoteConnectionDialog() -{ - delete _ui; -} -QString RemoteConnectionDialog::user() const -{ - return _ui->userEdit->text(); -} -QString RemoteConnectionDialog::host() const -{ - return _ui->hostEdit->text(); -} -QString RemoteConnectionDialog::service() const -{ - return "ssh"; -} - -QString RemoteConnectionDialog::sessionKey() const -{ - // SessionManager* manager = SessionManager::instance(); - - /*MutableSessionInfo* customSession = - new MutableSessionInfo(manager->defaultSessionType()->path()); - customSession->setCommand( service() ); - customSession->setName( i18n("%1 at %2",user(),host()) ); - customSession->setArguments( QStringList() << customSession->command(true,true) << - user() + '@' + host() ); -*/ - //QString key = manager->addSessionType( customSession ); - - //kDebug() << "session key = " << key; - - return QString(); - //return key; -} - diff --git a/src/RemoteConnectionDialog.h b/src/RemoteConnectionDialog.h deleted file mode 100644 index ee4fe5d1c..000000000 --- a/src/RemoteConnectionDialog.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright 2007-2008 by Robert Knight - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ - -#ifndef REMOTECONNECTIONDIALOG_H -#define REMOTECONNECTIONDIALOG_H - -// KDE -#include - -namespace Ui -{ - class RemoteConnectionDialog; -} - -namespace Konsole -{ - -class RemoteConnectionDialog : public KDialog -{ -public: - RemoteConnectionDialog(QWidget* parent = 0 ); - ~RemoteConnectionDialog(); - - QString user() const; - QString host() const; - QString service() const; - - QString sessionKey() const; - -private: - Ui::RemoteConnectionDialog* _ui; -}; - -} - -#endif // REMOTECONNECTIONDIALOG_H diff --git a/src/RemoteConnectionDialog.ui b/src/RemoteConnectionDialog.ui deleted file mode 100644 index 64867f600..000000000 --- a/src/RemoteConnectionDialog.ui +++ /dev/null @@ -1,104 +0,0 @@ - - RemoteConnectionDialog - - - - 0 - 0 - 413 - 199 - - - - - 0 - 0 - - - - - 0 - 0 - - - - Remote Connection - - - - - - Host: - - - - - - - - - - User: - - - - - - - - 180 - 0 - - - - - - - - Lookup... - - - - - - - Service: - - - - - - - - SSH - - - - - Secure FTP - - - - - - - - Background color: - - - - - - - - - - Save as custom session - - - - - - - -