enable = buf;
break;
+ case LFUN_CLOSE_TAB_GROUP:
+ enable = d.currentTabWorkArea();
+ break;
+
case LFUN_TOOLBAR_TOGGLE:
flag.setOnOff(d.toolbars_->visible(cmd.getArg(0)));
break;
case LFUN_SPLIT_VIEW:
if (Buffer * buf = buffer()) {
+ string const orientation = cmd.getArg(0);
+ d.splitter_->setOrientation(orientation == "vertical"
+ ? Qt::Vertical : Qt::Horizontal);
TabWorkArea * twa = addTabWorkArea();
GuiWorkArea * wa = twa->addWorkArea(*buf, *this);
setCurrentWorkArea(wa);
}
break;
+ case LFUN_CLOSE_TAB_GROUP:
+ if (TabWorkArea * twa = d.currentTabWorkArea()) {
+ delete twa;
+ twa = d.currentTabWorkArea();
+ // Switch to the next GuiWorkArea in the found TabWorkArea.
+ d.current_work_area_ = twa? twa->currentWorkArea() : 0;
+ if (d.splitter_->count() == 0)
+ // No more work area, switch to the background widget.
+ d.setBackground();
+ }
+ break;
+
default:
return false;
}