diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 798e98e24..da4e0d64f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,6 +147,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake) ManageProfilesDialog.ui RenameTabsDialog.ui settings/GeneralSettings.ui + settings/TabBarSettings.ui ) kde4_add_library(konsoleprivate SHARED ${konsoleprivate_SRCS}) @@ -159,6 +160,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake) main.cpp AppSettings.cpp settings/GeneralSettings.cpp + settings/TabBarSettings.cpp ) kde4_add_app_icon(konsole_KDEINIT_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/utilities-terminal.png") diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 71089b162..0157767a1 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -57,6 +57,7 @@ #include "SessionManager.h" #include "AppSettings.h" #include "settings/GeneralSettings.h" +#include "settings/TabBarSettings.h" using namespace Konsole; @@ -514,6 +515,11 @@ void MainWindow::showSettingsDialog() i18nc("@title Preferences page name", "General"), "system-run"); + TabBarSettings* tabBarSettings = new TabBarSettings(settingsDialog); + settingsDialog->addPage(tabBarSettings, + i18nc("@title Preferences page name", "TabBar"), + "system-run"); + settingsDialog->show(); } diff --git a/src/settings/AppSettings.kcfgc b/src/settings/AppSettings.kcfgc index f94b16662..267e757a8 100644 --- a/src/settings/AppSettings.kcfgc +++ b/src/settings/AppSettings.kcfgc @@ -6,3 +6,4 @@ MemberVariables=private ItemAccessors=true Mutators=true GlobalEnums=true +SetUserTexts=true diff --git a/src/settings/TabBarSettings.cpp b/src/settings/TabBarSettings.cpp new file mode 100644 index 000000000..272b3aa69 --- /dev/null +++ b/src/settings/TabBarSettings.cpp @@ -0,0 +1,34 @@ +/* + Copyright 2011 Kurt Hindenburg + + 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) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor appro- + ved by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + 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, see http://www.gnu.org/licenses/. +*/ + +// Own +#include "TabBarSettings.h" + +using namespace Konsole; + +TabBarSettings::TabBarSettings(QWidget* parent) : QWidget(parent) +{ + setupUi(this); +} + +TabBarSettings::~TabBarSettings() +{ +} + diff --git a/src/settings/TabBarSettings.h b/src/settings/TabBarSettings.h new file mode 100644 index 000000000..375eef375 --- /dev/null +++ b/src/settings/TabBarSettings.h @@ -0,0 +1,41 @@ +/* + Copyright 2011 Kurt Hindenburg + + 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) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor appro- + ved by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + 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, see http://www.gnu.org/licenses/. +*/ + +#ifndef TABBARSETTINGS_H +#define TABBARSETTINGS_H + +#include "ui_TabBarSettings.h" + +namespace Konsole +{ + +class TabBarSettings : public QWidget, private Ui::TabBarSettings +{ + Q_OBJECT + + public: + TabBarSettings(QWidget* parent = 0); + ~TabBarSettings(); + +}; + +} + +#endif diff --git a/src/settings/TabBarSettings.ui b/src/settings/TabBarSettings.ui new file mode 100644 index 000000000..3e8fa9b12 --- /dev/null +++ b/src/settings/TabBarSettings.ui @@ -0,0 +1,161 @@ + + + TabBarSettings + + + + 0 + 0 + 503 + 224 + + + + + 0 + + + + + Appearance + + + + + + Tab bar display: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 1 + 0 + + + + + Always Hide Tab Bar + + + + + Show Tab Bar When Needed + + + + + Always Show Tab Bar + + + + + + + + Tab bar position: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 1 + 0 + + + + + Below Terminal Displays + + + + + Above Terminal Displays + + + + + + + + Show 'New Tab' and 'Close Tab' buttons in tab bar + + + + + + + + + + Behavior + + + + + + New tab behavior: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 1 + 0 + + + + + Put New Tab At The End + + + + + Put New Tab After Current Tab + + + + + + + + + + + Qt::Vertical + + + + 20 + 4 + + + + + + + + + KComboBox + QComboBox +
kcombobox.h
+
+
+ + +
diff --git a/src/settings/konsole.kcfg b/src/settings/konsole.kcfg index 02237c55d..1302a8f32 100644 --- a/src/settings/konsole.kcfg +++ b/src/settings/konsole.kcfg @@ -9,4 +9,31 @@ true + + + + + + + + AlwaysShowTabBar + + + + + + + Bottom + + + false + + + + + + + PutNewTabAtTheEnd + +