Commit 1b128561 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add two new actions into tab menu "Reload Tab" and "Reload all tab"

svn path=/trunk/kdebase/konqueror/; revision=200053
parent bf033020
......@@ -38,7 +38,7 @@
#include "konq_viewmgr.h"
#include <konq_pixmapprovider.h>
#include <kstdaccel.h>
#include <assert.h>
......@@ -773,6 +773,9 @@ KonqTabBar::KonqTabBar(KonqViewManager* viewManager, KonqFrameTabs *parent, cons
m_pPopupMenu->insertItem( SmallIcon( "tab_breakoff" ), i18n("D&etach Tab"), m_pViewManager->mainWindow(), SLOT( slotBreakOffTabPopup() ), QKeySequence("Ctrl+Shift+B") );
m_pPopupMenu->insertItem( SmallIcon( "tab_remove" ), i18n("&Close Tab"), m_pViewManager->mainWindow(), SLOT( slotRemoveTabPopup() ), QKeySequence("Ctrl+W") );
m_pPopupMenu->insertSeparator();
m_pPopupMenu->insertItem( SmallIcon( "reload" ), i18n( "&Reload" ), m_pViewManager->mainWindow(), SLOT( slotReload() ), KStdAccel::key(KStdAccel::Reload) );
m_pPopupMenu->insertItem( SmallIcon( "reload_all_tab" ), i18n( "&Reload All Tab" ), m_pViewManager->mainWindow(), SLOT( slotReloadAllTab() ));
m_pPopupMenu->insertSeparator();
m_pPopupMenu->insertItem( SmallIcon( "tab_remove" ), i18n("Close &Other Tabs"), m_pViewManager->mainWindow(), SLOT( slotRemoveOtherTabsPopup() ) );
}
......
......@@ -2189,6 +2189,11 @@ void KonqMainWindow::slotRemoveOtherTabsPopup()
updateViewActions();
}
void KonqMainWindow::slotReloadAllTab()
{
m_pViewManager->reloadAllTab();
updateViewActions();
}
void KonqMainWindow::slotActivateNextTab()
{
......@@ -3077,7 +3082,7 @@ void KonqMainWindow::initActions()
connectActionCollection( m_bookmarksActionCollection );
m_pBookmarkMenu = new KBookmarkMenu( KonqBookmarkManager::self(), this, m_pamBookmarks->popupMenu(), m_bookmarksActionCollection, true );
m_paShowMenuBar = KStdAction::showMenubar( this, SLOT( slotShowMenuBar() ), actionCollection() );
(void) new KAction( i18n( "Kon&queror Introduction" ), 0, this, SLOT( slotIntro() ), actionCollection(), "konqintro" );
......
......@@ -391,6 +391,7 @@ protected slots:
void slotPopupPasteTo();
void slotRemoveView();
void slotRemoveOtherTabsPopup();
void slotReloadAllTab();
void slotRemoveTab();
void slotRemoveTabPopup();
void slotActivateNextTab();
......
......@@ -552,6 +552,24 @@ void KonqViewManager::removeTab( KonqFrameBase* tab )
#endif
}
void KonqViewManager::reloadAllTab( )
{
if (m_pDocContainer == 0L) return;
if (m_pDocContainer->frameType() != "Tabs") return;
KonqFrameTabs* tabContainer = static_cast<KonqFrameTabs*>(m_pDocContainer);
QPtrList<KonqFrameBase> frameList = *tabContainer->childFrameList();
QPtrListIterator<KonqFrameBase> it( frameList );
for ( it.toFirst(); it != 0L; ++it )
{
if ( it.current()->activeChildView())
{
it.current()->activeChildView()->openURL( it.current()->activeChildView()->url(),it.current()->activeChildView()->locationBarURL());
}
}
}
void KonqViewManager::removeOtherTabs( KonqFrameBase* tab )
{
......
......@@ -148,6 +148,7 @@ public:
void moveTabLeft();
void moveTabRight();
void reloadAllTab();
/**
* Brings the tab specified by @p view to the front of the stack
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment