Skip to content

Commit da74bd2

Browse files
authored
Some small gtkmm4 fixes (#507)
1 parent 4ca6021 commit da74bd2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

gui/faders/faderwindow.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,10 @@ bool FaderWindow::IsAssigned(theatre::SourceValue *source_value) const {
607607
}
608608

609609
void FaderWindow::onSetNameClicked() {
610-
Gtk::MessageDialog dialog(*this, "Name fader setup", false,
610+
dialog_ = std::make_unique<Gtk::MessageDialog>(*this, "Name fader setup", false,
611611
Gtk::MessageType::QUESTION,
612612
Gtk::ButtonsType::OK_CANCEL);
613+
Gtk::MessageDialog& dialog = static_cast<Gtk::MessageDialog&>(*dialog_);
613614
std::shared_ptr<Gtk::Entry> entry = std::make_shared<Gtk::Entry>();
614615
dialog.get_message_area()->append(*entry);
615616
dialog.set_secondary_text("Please enter a name for this fader setup");
@@ -619,6 +620,7 @@ void FaderWindow::onSetNameClicked() {
619620
set_title(_state->name);
620621
Instance::State().EmitFaderSetChangeSignal();
621622
}
623+
dialog_.reset();
622624
});
623625
dialog.show();
624626
}

gui/windows/designwizard.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ void DesignWizard::initPage4_1RunningLight() {
188188
initPage4Destination("Running light");
189189
_vBoxPage4.append(_colorsWidgetP4);
190190
_vBoxPage4.append(_increasingRunRB);
191+
_increasingRunRB.set_active(true);
191192
_decreasingRunRB.set_group(_increasingRunRB);
192193
_vBoxPage4.append(_decreasingRunRB);
193194
_backAndForthRunRB.set_group(_increasingRunRB);
@@ -213,6 +214,7 @@ void DesignWizard::initPage4_3ShiftColors() {
213214
initPage4Destination("Shift colors");
214215
_vBoxPage4.append(_colorsWidgetP4);
215216
_vBoxPage4.append(_shiftIncreasingRB);
217+
_shiftIncreasingRB.set_active(true);
216218
_shiftDecreasingRB.set_group(_shiftIncreasingRB);
217219
_vBoxPage4.append(_shiftDecreasingRB);
218220
_shiftBackAndForthRB.set_group(_shiftIncreasingRB);
@@ -225,6 +227,7 @@ void DesignWizard::initPage4_4VUMeter() {
225227
initPage4Destination("VUMeter");
226228
_vBoxPage4.append(_colorsWidgetP4);
227229
_vBoxPage4.append(_vuIncreasingRB);
230+
_vuIncreasingRB.set_active(true);
228231
_vuDecreasingRB.set_group(_vuIncreasingRB);
229232
_vBoxPage4.append(_vuDecreasingRB);
230233
_vuInwardRunRB.set_group(_vuIncreasingRB);
@@ -243,6 +246,7 @@ void DesignWizard::initPage4_6Increasing() {
243246
initPage4Destination("Increase chase");
244247
_vBoxPage4.append(_colorsWidgetP4);
245248
_vBoxPage4.append(_incForwardRB);
249+
_incForwardRB.set_active(true);
246250
_incBackwardRB.set_group(_incForwardRB);
247251
_vBoxPage4.append(_incBackwardRB);
248252
_incForwardReturnRB.set_group(_incForwardRB);
@@ -255,6 +259,7 @@ void DesignWizard::initPage4_7Rotation() {
255259
initPage4Destination("Rotation");
256260
_vBoxPage4.append(_colorsWidgetP4);
257261
_vBoxPage4.append(_rotForwardRB);
262+
_rotForwardRB.set_active(true);
258263
_rotBackwardRB.set_group(_rotForwardRB);
259264
_vBoxPage4.append(_rotBackwardRB);
260265
_rotForwardReturnRB.set_group(_rotForwardRB);

0 commit comments

Comments
 (0)