@@ -94,10 +94,6 @@ ContentPromotionManager::ContentPromotionManager(bool show_tooltips): show_toolt
94
94
using namespace ftxui ;
95
95
96
96
subject_component = Input (&new_subject, " subject" );
97
-
98
- flags = Container::Vertical ({
99
- Checkbox (&options_label[0 ], &options_state[0 ]),
100
- });
101
97
}
102
98
103
99
void ContentPromotionManager::setBranchRadiobox (ftxui::Component radiobox) {
@@ -106,7 +102,7 @@ void ContentPromotionManager::setBranchRadiobox(ftxui::Component radiobox) {
106
102
branch_selection = CatchEvent (radiobox, [&](const Event& event) {
107
103
// copy commit id
108
104
if (event == Event::Return) {
109
- flags ->TakeFocus ();
105
+ subject_component ->TakeFocus ();
110
106
}
111
107
return false ;
112
108
});
@@ -126,14 +122,8 @@ ftxui::Elements ContentPromotionManager::renderPromotionCommand(cpplibostree::OS
126
122
line.push_back (text (" ostree commit" ) | bold );
127
123
line.push_back (text (" --repo=" + ostree_repo.getRepoPath ()) | bold );
128
124
line.push_back (text (" -b " + ostree_repo.getBranches ().at (static_cast <size_t >(branch_selected))) | bold );
129
- // flags
130
- for (size_t i = 0 ; i < 8 ; ++i) {
131
- if (options_state[i]) {
132
- line.push_back (text (" " ));
133
- line.push_back (text (options_label[i]) | dim);
134
- }
135
- }
136
- // optional subject
125
+ line.push_back (text (" --keep-metadata" ) | bold );
126
+ // optional subject
137
127
if (!new_subject.empty ()) {
138
128
line.push_back (text (" -s \" " ) | bold );
139
129
line.push_back (text (new_subject) | color (Color::BlueLight) | bold );
@@ -150,13 +140,10 @@ ftxui::Component ContentPromotionManager::composePromotionComponent() {
150
140
151
141
return Container::Vertical ({
152
142
branch_selection,
153
- Container::Horizontal ({
154
- flags,
155
- Container::Vertical ({
156
- subject_component,
157
- apply_button,
158
- }),
159
- }),
143
+ Container::Vertical ({
144
+ subject_component,
145
+ apply_button,
146
+ }),
160
147
});
161
148
}
162
149
@@ -181,7 +168,6 @@ ftxui::Element ContentPromotionManager::renderPromotionView(cpplibostree::OSTree
181
168
// build elements
182
169
auto commit_hash = vbox ({text (" Commit: " ) | bold | color (Color::Green), text (" " + display_commit.hash )}) | flex;
183
170
auto branch_win = window (text (" New Branch" ), branch_selection->Render () | vscroll_indicator | frame);
184
- auto flags_win = window (text (" Flags" ), flags->Render () | vscroll_indicator | frame);
185
171
auto subject_win = window (text (" Subject" ), subject_component->Render ()) | flex;
186
172
auto aButton_win = apply_button->Render () | color (Color::Green) | size (WIDTH, GREATER_THAN, 9 ) | flex;
187
173
@@ -193,22 +179,18 @@ ftxui::Element ContentPromotionManager::renderPromotionView(cpplibostree::OSTree
193
179
};
194
180
auto tool_tips_win = !show_tooltips || tooltips_win_height < 2 ? filler () : // only show if screen is reasonable size
195
181
branch_selection->Focused () ? toolTipContent (0 ) :
196
- flags->Focused () ? toolTipContent (1 ) :
197
- subject_component->Focused () ? toolTipContent (2 ) :
198
- apply_button->Focused () ? toolTipContent (3 ) :
182
+ subject_component->Focused () ? toolTipContent (1 ) :
183
+ apply_button->Focused () ? toolTipContent (2 ) :
199
184
filler ();
200
185
201
186
// build element composition
202
187
return vbox ({
203
188
commit_hash | size (HEIGHT, EQUAL, commit_win_height),
204
189
branch_win | size (HEIGHT, LESS_THAN, branch_select_win_height),
205
- hbox ({
206
- flags_win,
207
- vbox ({
208
- subject_win,
209
- aButton_win,
210
- }) | flex,
211
- }) | size (HEIGHT, LESS_THAN, apsect_win_height),
190
+ vbox ({
191
+ subject_win,
192
+ aButton_win,
193
+ }) | flex | size (HEIGHT, LESS_THAN, apsect_win_height),
212
194
hflow (renderPromotionCommand (ostree_repo, display_commit.hash )) | flex_grow,
213
195
filler (),
214
196
tool_tips_win,
0 commit comments