summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/licensor.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-10-31 00:25:06 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-10-31 00:25:06 +0000
commit3c76aba3f2e1dfe8c0568a7d38a732cd2cf3dd8b (patch)
treed58a94d7765f3f0f4ccc794a868e1c902cb92e51 /src/ui/widget/licensor.cpp
parentFix for 1071426 : Swatches dialog doesn't update when swatch is renamed - fix... (diff)
downloadinkscape-3c76aba3f2e1dfe8c0568a7d38a732cd2cf3dd8b.tar.gz
inkscape-3c76aba3f2e1dfe8c0568a7d38a732cd2cf3dd8b.zip
Fix for 1068763 : Opening 'File > Document Properties' dirties current document
(bzr r11855)
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();