~ubuntu-branches/debian/experimental/inkscape/experimental

« back to all changes in this revision

Viewing changes to src/ui/widget/licensor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
const struct rdf_license_t _proprietary_license = 
35
35
  {_("Proprietary"), "", 0};
36
36
 
 
37
const struct rdf_license_t _other_license = 
 
38
  {_("Other"), "", 0};
 
39
 
37
40
class LicenseItem : public Gtk::RadioButton {
38
41
public:
39
42
    LicenseItem (struct rdf_license_t const* license, EntityEntry* entity, Registry &wr);
61
64
 
62
65
    _wr.setUpdating (true);
63
66
    rdf_set_license (SP_ACTIVE_DOCUMENT, _lic->details ? _lic : 0);
64
 
    sp_document_done (SP_ACTIVE_DOCUMENT);
 
67
    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_NONE, 
 
68
                      /* TODO: annotate */ "licensor.cpp:65");
65
69
    _wr.setUpdating (false);
66
 
    reinterpret_cast<Gtk::Entry*>(_eep->_packable)->set_text (_lic->uri);
 
70
    static_cast<Gtk::Entry*>(_eep->_packable)->set_text (_lic->uri);
67
71
    _eep->on_changed();
68
72
}
69
73
 
91
95
    i = manage (new LicenseItem (&_proprietary_license, _eentry, wr));
92
96
    add (*i);
93
97
    LicenseItem *pd = i;
 
98
 
94
99
    for (struct rdf_license_t * license = rdf_licenses;
95
100
             license && license->name;
96
101
             license++) {
97
102
        i = manage (new LicenseItem (license, _eentry, wr));
98
103
        add(*i);
99
104
    }
 
105
    // add Other at the end before the URI field for the confused ppl.
 
106
    LicenseItem *io = manage (new LicenseItem (&_other_license, _eentry, wr));
 
107
    add (*io);
 
108
 
100
109
    pd->set_active();
101
110
    wr.setUpdating (false);
102
111
 
120
129
        for (i=0; rdf_licenses[i].name; i++) 
121
130
            if (license == &rdf_licenses[i]) 
122
131
                break;
123
 
        reinterpret_cast<LicenseItem*>(children()[i+1].get_widget())->set_active();
 
132
        static_cast<LicenseItem*>(children()[i+1].get_widget())->set_active();
124
133
    }
125
134
    else {
126
 
        reinterpret_cast<LicenseItem*>(children()[0].get_widget())->set_active();
 
135
        static_cast<LicenseItem*>(children()[0].get_widget())->set_active();
127
136
    }
128
137
    
129
138
    /* update the URI */