X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Fwidget%2Flicensor.cpp;h=24bd5595f54fd583a67f4fcbc9ecfb4f243e2054;hb=ee3ad2b5b26e1e7be85a2de966ac7f208d88ff45;hp=72c4663e422d237a85cbe0039242db72bc5aba15;hpb=0e0ded38da27b91261c0a27d788ec3e71f7bdcd1;p=inkscape.git diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 72c4663e4..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); @@ -61,9 +64,10 @@ LicenseItem::on_toggled() _wr.setUpdating (true); rdf_set_license (SP_ACTIVE_DOCUMENT, _lic->details ? _lic : 0); - sp_document_done (SP_ACTIVE_DOCUMENT); + 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(); } @@ -91,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); @@ -120,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 */