Small fixes to Gtk::Grid::attach for compilation with gtkmm 3.22

This commit is contained in:
Thanatomanic 2021-02-25 17:49:05 +01:00
parent 6f9f81b057
commit 1214450aaa
4 changed files with 43 additions and 43 deletions

View File

@ -192,53 +192,53 @@ Navigator::Navigator() :
Gtk::Box* hbox1 = Gtk::manage (new Gtk::Box ()); Gtk::Box* hbox1 = Gtk::manage (new Gtk::Box ());
Gtk::Grid* table1 = Gtk::manage (new Gtk::Grid()); Gtk::Grid* table1 = Gtk::manage (new Gtk::Grid());
table1->attach(*lR, 0, 0); table1->attach(*lR, 0, 0, 1, 1);
table1->attach(*R, 1, 0); table1->attach(*R, 1, 0, 1, 1);
table1->attach(*lG, 0, 1); table1->attach(*lG, 0, 1, 1, 1);
table1->attach(*G, 1, 1); table1->attach(*G, 1, 1, 1, 1);
table1->attach(*lB, 0, 2); table1->attach(*lB, 0, 2, 1, 1);
table1->attach(*B, 1, 2); table1->attach(*B, 1, 2, 1, 1);
evBox1->add (*table1); evBox1->add (*table1);
evBox1->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsRGB)); evBox1->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsRGB));
hbox1->pack_start (*evBox1, Gtk::PACK_EXPAND_WIDGET, 4); hbox1->pack_start (*evBox1, Gtk::PACK_EXPAND_WIDGET, 4);
hbox1->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); hbox1->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4);
table0->attach(*hbox1, 0, 0); table0->attach(*hbox1, 0, 0, 1, 1);
// HSV // HSV
Gtk::EventBox *evBox2 = Gtk::manage (new Gtk::EventBox()); Gtk::EventBox *evBox2 = Gtk::manage (new Gtk::EventBox());
Gtk::Box* hbox2 = Gtk::manage (new Gtk::Box ()); Gtk::Box* hbox2 = Gtk::manage (new Gtk::Box ());
Gtk::Grid* table2 = Gtk::manage (new Gtk::Grid()); Gtk::Grid* table2 = Gtk::manage (new Gtk::Grid());
table2->attach(*lH, 0, 0); table2->attach(*lH, 0, 0, 1, 1);
table2->attach(*H, 1, 0); table2->attach(*H, 1, 0, 1, 1);
table2->attach(*lS, 0, 1); table2->attach(*lS, 0, 1, 1, 1);
table2->attach(*S, 1, 1); table2->attach(*S, 1, 1, 1, 1);
table2->attach(*lV, 0, 2); table2->attach(*lV, 0, 2, 1, 1);
table2->attach(*V, 1, 2); table2->attach(*V, 1, 2, 1, 1);
evBox2->add (*table2); evBox2->add (*table2);
evBox2->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsHSV)); evBox2->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Navigator::cycleUnitsHSV));
hbox2->pack_start (*evBox2, Gtk::PACK_EXPAND_WIDGET, 4); hbox2->pack_start (*evBox2, Gtk::PACK_EXPAND_WIDGET, 4);
hbox2->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4); hbox2->pack_start (*Gtk::manage (new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK, 4);
table0->attach(*hbox2, 1, 0); table0->attach(*hbox2, 1, 0, 1, 1);
// LAB // LAB
Gtk::Box* hbox3 = Gtk::manage (new Gtk::Box ()); Gtk::Box* hbox3 = Gtk::manage (new Gtk::Box ());
Gtk::Grid* table3 = Gtk::manage (new Gtk::Grid()); Gtk::Grid* table3 = Gtk::manage (new Gtk::Grid());
table3->attach(*lLAB_L, 0, 0); table3->attach(*lLAB_L, 0, 0, 1, 1);
table3->attach(*LAB_L, 1, 0); table3->attach(*LAB_L, 1, 0, 1, 1);
table3->attach(*lLAB_A, 0, 1); table3->attach(*lLAB_A, 0, 1, 1, 1);
table3->attach(*LAB_A, 1, 1); table3->attach(*LAB_A, 1, 1, 1, 1);
table3->attach(*lLAB_B, 0, 2); table3->attach(*lLAB_B, 0, 2, 1, 1);
table3->attach(*LAB_B, 1, 2); table3->attach(*LAB_B, 1, 2, 1, 1);
hbox3->pack_start (*table3, Gtk::PACK_EXPAND_WIDGET, 4); hbox3->pack_start (*table3, Gtk::PACK_EXPAND_WIDGET, 4);
hbox3->pack_start (*Gtk::manage (new Gtk::Box()), Gtk::PACK_SHRINK, 2); hbox3->pack_start (*Gtk::manage (new Gtk::Box()), Gtk::PACK_SHRINK, 2);
table0->attach(*hbox3, 2, 0); table0->attach(*hbox3, 2, 0, 1, 1);
table0->set_column_homogeneous(true); // all cells will have equal width table0->set_column_homogeneous(true); // all cells will have equal width

View File

@ -530,10 +530,10 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
Gtk::Grid* defpt = Gtk::manage(new Gtk::Grid()); Gtk::Grid* defpt = Gtk::manage(new Gtk::Grid());
defpt->set_row_spacing(2); defpt->set_row_spacing(2);
defpt->attach(*drlab, 0, 0); defpt->attach(*drlab, 0, 0, 1, 1);
defpt->attach(*rprofiles, 1, 0); defpt->attach(*rprofiles, 1, 0, 1, 1);
defpt->attach(*drimg, 0, 1); defpt->attach(*drimg, 0, 1, 1, 1);
defpt->attach(*iprofiles, 1, 1); defpt->attach(*iprofiles, 1, 1, 1, 1);
vbpp->pack_start(*defpt, Gtk::PACK_SHRINK, 4); vbpp->pack_start(*defpt, Gtk::PACK_SHRINK, 4);
useBundledProfiles = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_USEBUNDLEDPROFILES"))); useBundledProfiles = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_USEBUNDLEDPROFILES")));
@ -555,10 +555,10 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
custProfBuilderLabelType->append(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); custProfBuilderLabelType->append(M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME"));
Gtk::Grid* cpbt = Gtk::manage(new Gtk::Grid()); Gtk::Grid* cpbt = Gtk::manage(new Gtk::Grid());
cpbt->set_row_spacing(2); cpbt->set_row_spacing(2);
cpbt->attach(*cplab, 0, 0); cpbt->attach(*cplab, 0, 0, 1, 1);
cpbt->attach(*txtCustProfBuilderPath, 1, 0); cpbt->attach(*txtCustProfBuilderPath, 1, 0, 1, 1);
cpbt->attach(*cpltypelab, 0, 1); cpbt->attach(*cpltypelab, 0, 1, 1, 1);
cpbt->attach(*custProfBuilderLabelType, 1, 1); cpbt->attach(*custProfBuilderLabelType, 1, 1, 1, 1);
cpfrm->add(*cpbt); cpfrm->add(*cpbt);
vbImageProcessing->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4); vbImageProcessing->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4);
@ -574,10 +574,10 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
loadParamsPreference->append(M("PREFERENCES_PROFILEPRCACHE")); loadParamsPreference->append(M("PREFERENCES_PROFILEPRCACHE"));
loadParamsPreference->append(M("PREFERENCES_PROFILEPRFILE")); loadParamsPreference->append(M("PREFERENCES_PROFILEPRFILE"));
vbdp->set_row_spacing(2); vbdp->set_row_spacing(2);
vbdp->attach(*splab, 0, 0); vbdp->attach(*splab, 0, 0, 1, 1);
vbdp->attach(*saveParamsPreference, 1, 0); vbdp->attach(*saveParamsPreference, 1, 0, 1, 1);
vbdp->attach(*lplab, 0, 1); vbdp->attach(*lplab, 0, 1, 1, 1);
vbdp->attach(*loadParamsPreference, 1, 1); vbdp->attach(*loadParamsPreference, 1, 1, 1, 1);
fdp->add(*vbdp); fdp->add(*vbdp);
vbImageProcessing->pack_start (*fdp, Gtk::PACK_SHRINK, 4); vbImageProcessing->pack_start (*fdp, Gtk::PACK_SHRINK, 4);

View File

@ -36,10 +36,10 @@ RenameDialog::RenameDialog (Gtk::Window* parent)
newName->set_hexpand(); newName->set_hexpand();
newName->set_halign(Gtk::ALIGN_FILL); newName->set_halign(Gtk::ALIGN_FILL);
names->attach(*onlab, 0, 0); names->attach(*onlab, 0, 0, 1, 1);
names->attach(*oldName, 1, 0); names->attach(*oldName, 1, 0, 1, 1);
names->attach(*nnlab, 0, 1); names->attach(*nnlab, 0, 1, 1, 1);
names->attach(*newName, 1, 1); names->attach(*newName, 1, 1, 1, 1);
get_content_area()->pack_start (*names, Gtk::PACK_SHRINK, 4); get_content_area()->pack_start (*names, Gtk::PACK_SHRINK, 4);

View File

@ -49,8 +49,8 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals
Gtk::Label *label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"), Gtk::ALIGN_START)); Gtk::Label *label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"), Gtk::ALIGN_START));
combos->attach(*label, 0, 0); combos->attach(*label, 0, 0, 1, 1);
combos->attach(*appliesTo, 1, 0); combos->attach(*appliesTo, 1, 0, 1, 1);
// See Resize::methodChanged() when adding a new method. // See Resize::methodChanged() when adding a new method.
method = Gtk::manage (new MyComboBoxText ()); method = Gtk::manage (new MyComboBoxText ());
@ -62,8 +62,8 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals
label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"), Gtk::ALIGN_START)); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"), Gtk::ALIGN_START));
combos->attach(*label, 0, 1); combos->attach(*label, 0, 1, 1, 1);
combos->attach(*method, 1, 1); combos->attach(*method, 1, 1, 1, 1);
spec = Gtk::manage (new MyComboBoxText ()); spec = Gtk::manage (new MyComboBoxText ());
spec->append (M("TP_RESIZE_SCALE")); spec->append (M("TP_RESIZE_SCALE"));
@ -76,8 +76,8 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals
label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_SPECIFY"), Gtk::ALIGN_START)); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_SPECIFY"), Gtk::ALIGN_START));
combos->attach(*label, 0, 2); combos->attach(*label, 0, 2, 1, 1);
combos->attach(*spec, 1, 2); combos->attach(*spec, 1, 2, 1, 1);
pack_start (*combos, Gtk::PACK_SHRINK, 4); pack_start (*combos, Gtk::PACK_SHRINK, 4);