| 453 |
453 |
|
| 454 |
454 |
void TabBar::ContextMenu(Bar& bar)
|
| 455 |
455 |
{
|
| 456 |
|
if (GetCursor() >= 0 && crosses) {
|
| 457 |
|
bar.Add(tabs.GetCount() > mintabcount, t_("Close"), THISBACK2(Close, highlight, true));
|
|
456 |
if(highlight > -1){
|
|
457 |
if (GetCursor() >= 0 && crosses) {
|
|
458 |
bar.Add(tabs.GetCount() > mintabcount, t_("Close"), THISBACK2(Close, highlight, true));
|
|
459 |
}
|
|
460 |
int ii = GetHighlight(); // Need copy to freeze it, [=] copies 'this' and thus reference to highlight
|
|
461 |
if (ii >= 0 && crosses)
|
|
462 |
bar.Add(t_("Close others"), [=] { CloseAll(ii); });
|
|
463 |
if (ii < GetCount() - 1 && crosses)
|
|
464 |
bar.Add(t_("Close right tabs"), [=] { CloseAll(-1, ii + 1); });
|
|
465 |
if (mintabcount <= 0 && crosses)
|
|
466 |
bar.Add(t_("Close all"), [=] { CloseAll(-1); });
|
| 458 |
467 |
}
|
| 459 |
|
int ii = GetHighlight(); // Need copy to freeze it, [=] copies 'this' and thus reference to highlight
|
| 460 |
|
if (ii >= 0 && crosses)
|
| 461 |
|
bar.Add(t_("Close others"), [=] { CloseAll(ii); });
|
| 462 |
|
if (ii < GetCount() - 1 && crosses)
|
| 463 |
|
bar.Add(t_("Close right tabs"), [=] { CloseAll(-1, ii + 1); });
|
| 464 |
|
if (mintabcount <= 0 && crosses)
|
| 465 |
|
bar.Add(t_("Close all"), [=] { CloseAll(-1); });
|
|
468 |
|
| 466 |
469 |
if(grouping) {
|
| 467 |
470 |
if(group > 0)
|
| 468 |
471 |
bar.Add(t_("Close group"), THISBACK(CloseGroup));
|