* Paths now ellide when they get too big. That is, according to the font size, not character length.
* Added automatic mnemomics (or however you spell that crazy word) to the menu's items.
svn path=/trunk/KDE/kdebase/apps/; revision=937504
#include <QLineEdit>
#include <QSplitter>
#include <QDockWidget>
#include <QLineEdit>
#include <QSplitter>
#include <QDockWidget>
+#include <kacceleratormanager.h>
/*
* Remembers the tab configuration if a tab has been closed.
/*
* Remembers the tab configuration if a tab has been closed.
const QString primaryPath = m_viewTab[index].primaryView->url().path();
const QString iconName = KMimeType::iconNameForUrl(primaryPath);
const QString primaryPath = m_viewTab[index].primaryView->url().path();
const QString iconName = KMimeType::iconNameForUrl(primaryPath);
- QAction* action = new QAction(primaryPath, tabsMenu);
+ const QFontMetrics fm = fontMetrics();
+ const QString actionText = fm.elidedText(primaryPath, Qt::ElideMiddle, fm.maxWidth() * 20);
+
+ QAction* action = new QAction(actionText, tabsMenu);
ClosedTab closedTab;
closedTab.primaryUrl = m_viewTab[index].primaryView->url();
ClosedTab closedTab;
closedTab.primaryUrl = m_viewTab[index].primaryView->url();
tabsMenu->removeAction(tabsMenu->actions().last());
}
actionCollection()->action("closed_tabs")->setEnabled(true);
tabsMenu->removeAction(tabsMenu->actions().last());
}
actionCollection()->action("closed_tabs")->setEnabled(true);
+ KAcceleratorManager::manage(tabsMenu);
}
void DolphinMainWindow::clearStatusBar()
}
void DolphinMainWindow::clearStatusBar()