diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-11-01 12:05:13 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-11-01 12:05:13 +0000 |
| commit | 811fe8472f8ef1aa36eb5957baa45bfc916e16f1 (patch) | |
| tree | 823a9e6c54a5924edeffe3b71d5389e253c86ad4 /src/ui/widget/licensor.cpp | |
| parent | changes_2012_10_31b.patch (diff) | |
| parent | Fix for 1006816 : Newly applied filter doesn't show in Filters Editor (diff) | |
| download | inkscape-811fe8472f8ef1aa36eb5957baa45bfc916e16f1.tar.gz inkscape-811fe8472f8ef1aa36eb5957baa45bfc916e16f1.zip | |
merge from trunk (r11858)
(bzr r11668.1.38)
Diffstat (limited to 'src/ui/widget/licensor.cpp')
| -rw-r--r-- | src/ui/widget/licensor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 7fff7d87f..8ecd36af2 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -44,7 +44,7 @@ const struct rdf_license_t _other_license = class LicenseItem : public Gtk::RadioButton { public: - LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr); + LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr, Gtk::RadioButtonGroup *group); protected: void on_toggled(); struct rdf_license_t const *_lic; @@ -52,13 +52,12 @@ protected: Registry &_wr; }; -LicenseItem::LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr) +LicenseItem::LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr, Gtk::RadioButtonGroup *group) : Gtk::RadioButton(_(license->name)), _lic(license), _eep(entity), _wr(wr) { - static Gtk::RadioButtonGroup group = get_group(); - static bool first = true; - if (first) first = false; - else set_group (group); + if (group) { + set_group (*group); + } } /// \pre it is assumed that the license URI entry is a Gtk::Entry @@ -97,18 +96,19 @@ void Licensor::init (Registry& wr) LicenseItem *i; wr.setUpdating (true); - i = manage (new LicenseItem (&_proprietary_license, _eentry, wr)); + i = manage (new LicenseItem (&_proprietary_license, _eentry, wr, NULL)); + Gtk::RadioButtonGroup group = i->get_group(); add (*i); LicenseItem *pd = i; for (struct rdf_license_t * license = rdf_licenses; license && license->name; license++) { - i = manage (new LicenseItem (license, _eentry, wr)); + i = manage (new LicenseItem (license, _eentry, wr, &group)); add(*i); } // add Other at the end before the URI field for the confused ppl. - LicenseItem *io = manage (new LicenseItem (&_other_license, _eentry, wr)); + LicenseItem *io = manage (new LicenseItem (&_other_license, _eentry, wr, &group)); add (*io); pd->set_active(); |
