Code

Group dock related prefs, add hidden prefs for dock bar and switcher appearance.
[inkscape.git] / src / ui / widget / licensor.cpp
index df00e358a770225fa9f2f7a37034141a8ca231db..24bd5595f54fd583a67f4fcbc9ecfb4f243e2054 100644 (file)
@@ -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);
@@ -45,7 +48,7 @@ protected:
 };
 
 LicenseItem::LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr)
-: Gtk::RadioButton(gettext(license->name)), _lic(license), _eep(entity), _wr(wr)
+: Gtk::RadioButton(_(license->name)), _lic(license), _eep(entity), _wr(wr)
 {
     static Gtk::RadioButtonGroup group = get_group();
     static bool first = true;
@@ -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<Gtk::Entry*>(_eep->_packable)->set_text (_lic->uri);
+    static_cast<Gtk::Entry*>(_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<LicenseItem*>(children()[i+1].get_widget())->set_active();
+        static_cast<LicenseItem*>(children()[i+1].get_widget())->set_active();
     }
     else {
-        reinterpret_cast<LicenseItem*>(children()[0].get_widget())->set_active();
+        static_cast<LicenseItem*>(children()[0].get_widget())->set_active();
     }
     
     /* update the URI */