+ case Tabular::SET_TABULAR_WIDTH:
+ status.setEnabled(!tabular.rotate && !tabular.is_long_tabular
+ && tabular.tabular_valignment == Tabular::LYX_VALIGN_MIDDLE);
+ break;
+
+ case Tabular::MOVE_COLUMN_RIGHT:
+ case Tabular::MOVE_COLUMN_LEFT:
+ case Tabular::MOVE_ROW_DOWN:
+ case Tabular::MOVE_ROW_UP: {
+ if (cur.selection()) {
+ status.message(_("Selections not supported."));
+ status.setEnabled(false);
+ break;
+ }
+
+ if ((action == Tabular::MOVE_COLUMN_RIGHT &&
+ tabular.ncols() == tabular.cellColumn(cur.idx()) + 1) ||
+ (action == Tabular::MOVE_COLUMN_LEFT &&
+ tabular.cellColumn(cur.idx()) == 0) ||
+ (action == Tabular::MOVE_ROW_DOWN &&
+ tabular.nrows() == tabular.cellRow(cur.idx()) + 1) ||
+ (action == Tabular::MOVE_ROW_UP &&
+ tabular.cellRow(cur.idx()) == 0)) {
+ status.setEnabled(false);
+ break;
+ }
+
+ if (action == Tabular::MOVE_COLUMN_RIGHT ||
+ action == Tabular::MOVE_COLUMN_LEFT) {
+ if (tabular.hasMultiColumn(tabular.cellColumn(cur.idx())) ||
+ tabular.hasMultiColumn(tabular.cellColumn(cur.idx()) +
+ (action == Tabular::MOVE_COLUMN_RIGHT ? 1 : -1))) {
+ status.message(_("Multi-column in current or"
+ " destination column."));
+ status.setEnabled(false);
+ break;
+ }
+ }
+
+ if (action == Tabular::MOVE_ROW_DOWN ||
+ action == Tabular::MOVE_ROW_UP) {
+ if (tabular.hasMultiRow(tabular.cellRow(cur.idx())) ||
+ tabular.hasMultiRow(tabular.cellRow(cur.idx()) +
+ (action == Tabular::MOVE_ROW_DOWN ? 1 : -1))) {
+ status.message(_("Multi-row in current or"
+ " destination row."));
+ status.setEnabled(false);
+ break;
+ }
+ }
+
+ status.setEnabled(true);
+ break;
+ }
+
+ case Tabular::SET_DECIMAL_POINT:
+ status.setEnabled(
+ tabular.getAlignment(cur.idx()) == LYX_ALIGN_DECIMAL);
+ break;
+
+ case Tabular::SET_MULTICOLUMN:
+ case Tabular::UNSET_MULTICOLUMN: