|
Lines 52-57
Link Here
|
| 52 |
#define BREAKOFF_ID 5 |
52 |
#define BREAKOFF_ID 5 |
| 53 |
#define CLOSETAB_ID 6 |
53 |
#define CLOSETAB_ID 6 |
| 54 |
#define OTHERTABS_ID 7 |
54 |
#define OTHERTABS_ID 7 |
|
|
55 |
#define MOVE_LEFT_ID 8 |
| 56 |
#define MOVE_RIGHT_ID 9 |
| 55 |
|
57 |
|
| 56 |
//################################################################### |
58 |
//################################################################### |
| 57 |
|
59 |
|
|
Lines 103-108
Link Here
|
| 103 |
m_pViewManager->mainWindow()->action("breakoffcurrenttab")->shortcut(), |
105 |
m_pViewManager->mainWindow()->action("breakoffcurrenttab")->shortcut(), |
| 104 |
BREAKOFF_ID ); |
106 |
BREAKOFF_ID ); |
| 105 |
m_pPopupMenu->insertSeparator(); |
107 |
m_pPopupMenu->insertSeparator(); |
|
|
108 |
m_pPopupMenu->insertItem( SmallIconSet( "tab_move_left" ), |
| 109 |
i18n("Move Tab &Left"), |
| 110 |
m_pViewManager->mainWindow(), |
| 111 |
TQT_SLOT( slotMoveTabLeft() ), |
| 112 |
m_pViewManager->mainWindow()->action("tab_move_left")->shortcut(), |
| 113 |
MOVE_LEFT_ID ); |
| 114 |
m_pPopupMenu->insertItem( SmallIconSet( "tab_move_right" ), |
| 115 |
i18n("Move Tab &Right"), |
| 116 |
m_pViewManager->mainWindow(), |
| 117 |
TQT_SLOT( slotMoveTabRight() ), |
| 118 |
m_pViewManager->mainWindow()->action("tab_move_right")->shortcut(), |
| 119 |
MOVE_RIGHT_ID ); |
| 120 |
m_pPopupMenu->insertSeparator(); |
| 106 |
m_pSubPopupMenuTab = new TQPopupMenu( this ); |
121 |
m_pSubPopupMenuTab = new TQPopupMenu( this ); |
| 107 |
m_pPopupMenu->insertItem( i18n("Other Tabs" ), m_pSubPopupMenuTab, OTHERTABS_ID ); |
122 |
m_pPopupMenu->insertItem( i18n("Other Tabs" ), m_pSubPopupMenuTab, OTHERTABS_ID ); |
| 108 |
connect( m_pSubPopupMenuTab, TQT_SIGNAL( activated ( int ) ), |
123 |
connect( m_pSubPopupMenuTab, TQT_SIGNAL( activated ( int ) ), |
|
Lines 364-373
Link Here
|
| 364 |
m_pPopupMenu->setItemEnabled( RELOAD_ID, false ); |
379 |
m_pPopupMenu->setItemEnabled( RELOAD_ID, false ); |
| 365 |
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, false ); |
380 |
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, false ); |
| 366 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false ); |
381 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false ); |
|
|
382 |
m_pPopupMenu->setItemEnabled( MOVE_LEFT_ID, false ); |
| 383 |
// The following line fails to build. Adapted from konq_mainwindow.cc: 4243. Help! |
| 384 |
// m_pPopupMenu->setItemEnabled( MOVE_LEFT_ID, m_pViewManager->mainWindow()->currentView() ? m_pViewManager->mainWindow()->currentView()->frame()!=(TQApplication::reverseLayout() ? childFrameList->last() : childFrameList->first()) : false ); |
| 385 |
m_pPopupMenu->setItemEnabled( MOVE_RIGHT_ID, false ); |
| 386 |
// The following line fails to build. Adapted from konq_mainwindow.cc: 4245. Help! |
| 387 |
// m_pPopupMenu->setItemEnabled( MOVE_RIGHT_ID, m_pViewManager->mainWindow()->currentView() ? m_pViewManager->mainWindow()->currentView()->frame()!=(TQApplication::reverseLayout() ? childFrameList->first() : childFrameList->last()) : false ); |
| 367 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false ); |
388 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false ); |
| 368 |
m_pPopupMenu->setItemEnabled( OTHERTABS_ID, true ); |
389 |
m_pPopupMenu->setItemEnabled( OTHERTABS_ID, true ); |
| 369 |
m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, false ); |
390 |
m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, false ); |
| 370 |
|
391 |
|
| 371 |
m_pPopupMenu->exec( p ); |
392 |
m_pPopupMenu->exec( p ); |
| 372 |
} |
393 |
} |
| 373 |
|
394 |
|
|
Lines 379-384
Link Here
|
| 379 |
m_pPopupMenu->setItemEnabled( RELOAD_ID, true ); |
400 |
m_pPopupMenu->setItemEnabled( RELOAD_ID, true ); |
| 380 |
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, true ); |
401 |
m_pPopupMenu->setItemEnabled( DUPLICATE_ID, true ); |
| 381 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, tabCount>1 ); |
402 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, tabCount>1 ); |
|
|
403 |
m_pPopupMenu->setItemEnabled( MOVE_LEFT_ID, tabCount>1 ); |
| 404 |
m_pPopupMenu->setItemEnabled( MOVE_RIGHT_ID, tabCount>1 ); |
| 382 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, tabCount>1 ); |
405 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, tabCount>1 ); |
| 383 |
m_pPopupMenu->setItemEnabled( OTHERTABS_ID, tabCount>1 ); |
406 |
m_pPopupMenu->setItemEnabled( OTHERTABS_ID, tabCount>1 ); |
| 384 |
m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, true ); |
407 |
m_pSubPopupMenuTab->setItemEnabled( m_closeOtherTabsId, true ); |
|
Lines 520-525
Link Here
|
| 520 |
setTabBarHidden(true); |
543 |
setTabBarHidden(true); |
| 521 |
} |
544 |
} |
| 522 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false ); |
545 |
m_pPopupMenu->setItemEnabled( BREAKOFF_ID, false ); |
|
|
546 |
m_pPopupMenu->setItemEnabled( MOVE_LEFT_ID, false ); |
| 547 |
m_pPopupMenu->setItemEnabled( MOVE_RIGHT_ID, false ); |
| 523 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false ); |
548 |
m_pPopupMenu->setItemEnabled( CLOSETAB_ID, false ); |
| 524 |
} |
549 |
} |
| 525 |
|
550 |
|