summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11a230f)
raw | patch | inline | side by side (parent: 11a230f)
author | keescook <keescook@users.sourceforge.net> | |
Sat, 13 Jan 2007 01:17:19 +0000 (01:17 +0000) | ||
committer | keescook <keescook@users.sourceforge.net> | |
Sat, 13 Jan 2007 01:17:19 +0000 (01:17 +0000) |
index 7c845e70f62da61aa5b3d9a5c8cc900474b4101b..a3e87b31b5fd1c3c97c983d1642459d116b91931 100644 (file)
@@ -156,7 +156,7 @@ attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int star
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
else if (arr[i])
{
- Gtk::Label& label = reinterpret_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
+ Gtk::Label& label = static_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
label.set_alignment (0.0);
table.attach (label, 0, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
index 7df2eaee5954f0882bfcd510afe9e16550f686f9..5f6386046a49bdca088a4f3dd65e6616d1ce6c7c 100644 (file)
void
ExtensionEditor::dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data)
{
- ExtensionEditor * ee = reinterpret_cast<ExtensionEditor *>(in_data);
+ ExtensionEditor * ee = static_cast<ExtensionEditor *>(in_data);
ee->add_extension(in_plug);
return;
}
index 6563040dc33c33963775d5a5341db268d3e6a1b2..980d225b289151f7a614968dc350b2a392c85abd 100644 (file)
obj = new EntityMultiLineEntry (ent, tt, wr);
break;
default:
- g_warning ("Can't happen.");
+ g_warning ("An unknown RDF format was requested.");
}
+ g_assert (obj);
obj->_label.show();
return obj;
}
@@ -78,14 +79,14 @@ EntityLineEntry::EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Reg
EntityLineEntry::~EntityLineEntry()
{
- delete reinterpret_cast<Gtk::Entry*>(_packable);
+ delete static_cast<Gtk::Entry*>(_packable);
}
void
EntityLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
- reinterpret_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
+ static_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
}
void
_wr->setUpdating (true);
SPDocument *doc = SP_ACTIVE_DOCUMENT;
- char const *text = reinterpret_cast<Gtk::Entry*>(_packable)->get_text().c_str();
- if (rdf_set_work_entity (doc, _entity, text))
+ Glib::ustring text = static_cast<Gtk::Entry*>(_packable)->get_text();
+ if (rdf_set_work_entity (doc, _entity, text.c_str()))
sp_document_done (doc, SP_VERB_NONE,
/* TODO: annotate */ "entity-entry.cpp:101");
_wr->setUpdating (false);
@@ -119,15 +120,15 @@ EntityMultiLineEntry::EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltip
EntityMultiLineEntry::~EntityMultiLineEntry()
{
- delete reinterpret_cast<Gtk::ScrolledWindow*>(_packable);
+ delete static_cast<Gtk::ScrolledWindow*>(_packable);
}
void
EntityMultiLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
- Gtk::ScrolledWindow *s = reinterpret_cast<Gtk::ScrolledWindow*>(_packable);
- Gtk::TextView *tv = reinterpret_cast<Gtk::TextView*>(s->get_child());
+ Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
+ Gtk::TextView *tv = static_cast<Gtk::TextView*>(s->get_child());
tv->get_buffer()->set_text (text ? text : "");
}
_wr->setUpdating (true);
SPDocument *doc = SP_ACTIVE_DOCUMENT;
- Gtk::ScrolledWindow *s = reinterpret_cast<Gtk::ScrolledWindow*>(_packable);
- Gtk::TextView *tv = reinterpret_cast<Gtk::TextView*>(s->get_child());
- char const *text = tv->get_buffer()->get_text().c_str();
- if (rdf_set_work_entity (doc, _entity, text))
+ Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
+ Gtk::TextView *tv = static_cast<Gtk::TextView*>(s->get_child());
+ Glib::ustring text = tv->get_buffer()->get_text();
+ if (rdf_set_work_entity (doc, _entity, text.c_str()))
sp_document_done (doc, SP_VERB_NONE,
/* TODO: annotate */ "entity-entry.cpp:146");
_wr->setUpdating (false);
index c872c06df5c48eb2b49533284763e4f498c7de15..24bd5595f54fd583a67f4fcbc9ecfb4f243e2054 100644 (file)
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();
}
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 */