summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/licensor.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/ui/widget/licensor.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/ui/widget/licensor.cpp')
-rw-r--r--src/ui/widget/licensor.cpp18
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();