X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Fwidget%2Flicensor.cpp;h=24bd5595f54fd583a67f4fcbc9ecfb4f243e2054;hb=569ef8f6dbacc8a8b0b933d02a806c2e091ce02b;hp=50c49e9122da129e902694b9dfae0e92bced8338;hpb=4ec52515516e3a6bf2fbc3ed01a7e179bde16d20;p=inkscape.git diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 50c49e912..24bd5595f 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -34,6 +34,9 @@ namespace Widget { const struct rdf_license_t _proprietary_license = {_("Proprietary"), "", 0}; +const struct rdf_license_t _other_license = + {_("Other"), "", 0}; + class LicenseItem : public Gtk::RadioButton { public: LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr); @@ -64,7 +67,7 @@ LicenseItem::on_toggled() sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_NONE, /* TODO: annotate */ "licensor.cpp:65"); _wr.setUpdating (false); - reinterpret_cast(_eep->_packable)->set_text (_lic->uri); + static_cast(_eep->_packable)->set_text (_lic->uri); _eep->on_changed(); } @@ -92,12 +95,17 @@ Licensor::init (Gtk::Tooltips& tt, Registry& wr) i = manage (new LicenseItem (&_proprietary_license, _eentry, wr)); add (*i); LicenseItem *pd = i; + for (struct rdf_license_t * license = rdf_licenses; license && license->name; license++) { i = manage (new LicenseItem (license, _eentry, wr)); add(*i); } + // add Other at the end before the URI field for the confused ppl. + LicenseItem *io = manage (new LicenseItem (&_other_license, _eentry, wr)); + add (*io); + pd->set_active(); wr.setUpdating (false); @@ -121,10 +129,10 @@ Licensor::update (SPDocument *doc) for (i=0; rdf_licenses[i].name; i++) if (license == &rdf_licenses[i]) break; - reinterpret_cast(children()[i+1].get_widget())->set_active(); + static_cast(children()[i+1].get_widget())->set_active(); } else { - reinterpret_cast(children()[0].get_widget())->set_active(); + static_cast(children()[0].get_widget())->set_active(); } /* update the URI */