Disable detaching when on Darwin (MacOSX)

Too many issues/crashes for too long when detaching on MacOSX.  You
can still some strange things but I can't get it to crash now.
wilder-portage
Kurt Hindenburg 13 years ago
parent 194a852d33
commit 205a51839c
  1. 7
      src/CMakeLists.txt
  2. 6
      src/ViewContainer.cpp
  3. 8
      src/ViewManager.cpp
  4. 3
      src/config-konsole.h.cmake

@ -11,6 +11,13 @@ if(HAVE_LIBKONQ)
include_directories(${LIBKONQ_INCLUDE_DIR})
endif()
### Too many crashes/issues with detaching on MacOSX
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(ENABLE_DETACHING 0)
else()
set(ENABLE_DETACHING 1)
endif()
include(CheckIncludeFiles)
configure_file(config-konsole.h.cmake

@ -22,6 +22,8 @@
// Own
#include "ViewContainer.h"
#include <config-konsole.h>
// Qt
#include <QStackedWidget>
#include <QToolButton>
@ -282,9 +284,11 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position, ViewManage
// The context menu of tab bar
_contextPopupMenu = new KMenu(_tabBar);
#if defined(ENABLE_DETACHING)
_contextPopupMenu->addAction(KIcon("tab-detach"),
i18nc("@action:inmenu", "&Detach Tab"), this,
SLOT(tabContextMenuDetachTab()));
#endif
_contextPopupMenu->addAction(KIcon("edit-rename"),
i18nc("@action:inmenu", "&Rename Tab..."), this,
@ -551,10 +555,12 @@ void TabbedViewContainer::openTabContextMenu(int index, const QPoint& pos)
{
_contextMenuTabIndex = index;
#if defined(ENABLE_DETACHING)
// Enable 'Detach Tab' menu item only if there is more than 1 tab
// Note: the code is coupled with that action's position within the menu
QAction* detachAction = _contextPopupMenu->actions().first();
detachAction->setEnabled(_tabBar->count() > 1);
#endif
_contextPopupMenu->exec(pos);
}

@ -20,6 +20,8 @@
// Own
#include "ViewManager.h"
#include <config-konsole.h>
// Qt
#include <QtCore/QSignalMapper>
#include <QtCore/QStringList>
@ -193,6 +195,7 @@ void ViewManager::setupActions()
multiViewOnlyActions << shrinkActiveAction;
#if defined(ENABLE_DETACHING)
KAction* detachViewAction = collection->addAction("detach-view");
detachViewAction->setIcon(KIcon("tab-detach"));
detachViewAction->setText(i18nc("@action:inmenu", "D&etach Current Tab"));
@ -202,6 +205,7 @@ void ViewManager::setupActions()
connect(this , SIGNAL(splitViewToggle(bool)) , this , SLOT(updateDetachViewState()));
connect(detachViewAction , SIGNAL(triggered()) , this , SLOT(detachActiveView()));
#endif
// Next / Previous View , Next Container
collection->addAction("next-view", nextViewAction);
@ -330,6 +334,10 @@ void ViewManager::detachActiveView()
void ViewManager::detachView(ViewContainer* container, QWidget* widgetView)
{
#if !defined(ENABLE_DETACHING)
return;
#endif
TerminalDisplay * viewToDetach = qobject_cast<TerminalDisplay*>(widgetView);
if (!viewToDetach)

@ -1,2 +1,5 @@
/* Defined if you have LibKonq */
#cmakedefine HAVE_LIBKONQ 1
/* Defined if you want detaching enabled */
#cmakedefine ENABLE_DETACHING 1

Loading…
Cancel
Save