diff options
| author | johnce <johnce@users.sourceforge.net> | 2009-08-05 06:38:07 +0000 |
|---|---|---|
| committer | johnce <johnce@users.sourceforge.net> | 2009-08-05 06:38:07 +0000 |
| commit | 4cd79453c07adefb912a4dbd0afb2e7c2722bd90 (patch) | |
| tree | 66389573099d623138a62cb88f082ccbadc0c11e /src/ui/dialog | |
| parent | SPDocument->Document (diff) | |
| download | inkscape-4cd79453c07adefb912a4dbd0afb2e7c2722bd90.tar.gz inkscape-4cd79453c07adefb912a4dbd0afb2e7c2722bd90.zip | |
SPDocument->Document
(bzr r8408)
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/aboutbox.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/document-metadata.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-win32.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/guides.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/icon-preview.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/layers.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/print.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 30 | ||||
| -rw-r--r-- | src/ui/dialog/swatches.cpp | 16 |
13 files changed, 42 insertions, 42 deletions
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 025bec37a..af6a0c516 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -147,7 +147,7 @@ Gtk::Widget *build_splash_widget() { // should be in UTF-*8.. char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL); - SPDocument *doc=sp_document_new (about, TRUE); + Document *doc=sp_document_new (about, TRUE); g_free(about); g_return_val_if_fail(doc != NULL, NULL); diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp index 96cad1fbe..f69d80fe5 100644 --- a/src/ui/dialog/document-metadata.cpp +++ b/src/ui/dialog/document-metadata.cpp @@ -207,7 +207,7 @@ DocumentMetadata::update() } void -DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *) +DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *) { Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop)); repr->addListener (&_repr_events, this); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 423778276..0e928a9eb 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -851,7 +851,7 @@ DocumentProperties::on_response (int id) } void -DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *document) +DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *document) { Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop)); repr->addListener(&_repr_events, this); @@ -915,7 +915,7 @@ DocumentProperties::onNewGrid() { SPDesktop *dt = getDesktop(); Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(dt)); - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); Glib::ustring typestring = _grids_combo_gridtype.get_active_text(); CanvasGrid::writeNewGridToRepr(repr, doc, CanvasGrid::getGridTypeFromName(typestring.c_str())); diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 70f2f2ae5..30a7e7c2a 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -120,7 +120,7 @@ findExpanderWidgets(Gtk::Container *parent, ### SVG Preview Widget #########################################################################*/ -bool SVGPreview::setDocument(SPDocument *doc) +bool SVGPreview::setDocument(Document *doc) { if (document) sp_document_unref(document); @@ -151,7 +151,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName) * I don't know why passing false to keepalive is bad. But it * prevents the display of an svg with a non-ascii filename */ - SPDocument *doc = sp_document_new (fileName.c_str(), true); + Document *doc = sp_document_new (fileName.c_str(), true); if (!doc) { g_warning("SVGView: error loading document '%s'\n", fileName.c_str()); return false; @@ -172,7 +172,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer) return false; gint len = (gint)strlen(xmlBuffer); - SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0); + Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0); if (!doc) { g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer); return false; diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp index 0d8f0de5f..4a2cc879d 100644 --- a/src/ui/dialog/filedialogimpl-win32.cpp +++ b/src/ui/dialog/filedialogimpl-win32.cpp @@ -887,7 +887,7 @@ bool FileOpenDialogImplWin32::set_svg_preview() gchar *utf8string = g_utf16_to_utf8((const gunichar2*)_path_string, _MAX_PATH, NULL, NULL, NULL); - SPDocument *svgDoc = sp_document_new (utf8string, true); + Document *svgDoc = sp_document_new (utf8string, true); g_free(utf8string); // Check the document loaded properly diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index baf46970a..026af2c9f 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1222,7 +1222,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri if(iter) { SPDesktop *desktop = _dialog.getDesktop(); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); SPFilter* filter = (*iter)[_columns.filter]; Inkscape::Selection *sel = sp_desktop_selection(desktop); @@ -1255,7 +1255,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri void FilterEffectsDialog::FilterModifier::update_filters() { SPDesktop* desktop = _dialog.getDesktop(); - SPDocument* document = sp_desktop_document(desktop); + Document* document = sp_desktop_document(desktop); const GSList* filters = sp_document_get_resource_list(document, "filter"); _model->clear(); @@ -1310,7 +1310,7 @@ void FilterEffectsDialog::FilterModifier::filter_list_button_release(GdkEventBut void FilterEffectsDialog::FilterModifier::add_filter() { - SPDocument* doc = sp_desktop_document(_dialog.getDesktop()); + Document* doc = sp_desktop_document(_dialog.getDesktop()); SPFilter* filter = new_filter(doc); const int count = _model->children().size(); @@ -1330,7 +1330,7 @@ void FilterEffectsDialog::FilterModifier::remove_filter() SPFilter *filter = get_selected_filter(); if(filter) { - SPDocument* doc = filter->document; + Document* doc = filter->document; sp_repr_unparent(filter->repr); sp_document_done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter")); diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 3a7964ba2..2d7f7cb5b 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -119,7 +119,7 @@ void GuidelinePropertiesDialog::_onOK() void GuidelinePropertiesDialog::_onDelete() { - SPDocument *doc = SP_OBJECT_DOCUMENT(_guide); + Document *doc = SP_OBJECT_DOCUMENT(_guide); sp_guide_remove(_guide); sp_document_done(doc, SP_VERB_NONE, _("Delete guide")); diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index 336afc3c5..1490e5b73 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -36,7 +36,7 @@ extern "C" { // takes doc, root, icon, and icon name to produce pixels guchar * -sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, +sp_icon_doc_icon( Document *doc, NRArenaItem *root, const gchar *name, unsigned int psize ); } @@ -247,7 +247,7 @@ void IconPreviewPanel::modeToggled() void IconPreviewPanel::renderPreview( SPObject* obj ) { - SPDocument * doc = SP_OBJECT_DOCUMENT(obj); + Document * doc = SP_OBJECT_DOCUMENT(obj); gchar * id = SP_OBJECT_ID(obj); // g_message(" setting up to render '%s' as the icon", id ); diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index fa47ad88d..0298042ef 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -349,7 +349,7 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt void LayersPanel::_layersChanged() { // g_message("_layersChanged()"); - SPDocument* document = _desktop->doc(); + Document* document = _desktop->doc(); SPObject* root = document->root; if ( root ) { _selectedConnection.block(); @@ -366,7 +366,7 @@ void LayersPanel::_layersChanged() } } -void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level ) +void LayersPanel::_addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level ) { if ( layer && (level < _maxNestDepth) ) { unsigned int counter = _mgr->childCount(layer); diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index dd2dc8250..bea8a096e 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -357,7 +357,7 @@ LivePathEffectEditor::onApply() if ( sel && !sel->isEmpty() ) { SPItem *item = sel->singleItem(); if ( item && SP_IS_LPE_ITEM(item) ) { - SPDocument *doc = current_desktop->doc(); + Document *doc = current_desktop->doc(); const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data(); if (!data) return; diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index d15773ecb..198495f74 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -148,7 +148,7 @@ namespace Inkscape { namespace UI { namespace Dialog { -Print::Print(SPDocument *doc, SPItem *base) : +Print::Print(Document *doc, SPItem *base) : _doc (doc), _base (base) { diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 5f86196b1..64ea07877 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -161,7 +161,7 @@ void GlyphComboBox::update(SPFont* spfont){ void SvgFontsDialog::on_kerning_value_changed(){ if (!this->kerning_pair) return; - SPDocument* document = sp_desktop_document(this->getDesktop()); + Document* document = sp_desktop_document(this->getDesktop()); //TODO: I am unsure whether this is the correct way of calling sp_document_maybe_done Glib::ustring undokey = "svgfonts:hkern:k:"; @@ -242,7 +242,7 @@ void SvgFontsDialog::update_sensitiveness(){ void SvgFontsDialog::update_fonts() { SPDesktop* desktop = this->getDesktop(); - SPDocument* document = sp_desktop_document(desktop); + Document* document = sp_desktop_document(desktop); const GSList* fonts = sp_document_get_resource_list(document, "font"); _model->clear(); @@ -420,7 +420,7 @@ SvgFontsDialog::populate_kerning_pairs_box() } } -SPGlyph *new_glyph(SPDocument* document, SPFont *font, const int count) +SPGlyph *new_glyph(Document* document, SPFont *font, const int count) { g_return_val_if_fail(font != NULL, NULL); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); @@ -459,7 +459,7 @@ void SvgFontsDialog::update_glyphs(){ void SvgFontsDialog::add_glyph(){ const int count = _GlyphsListStore->children().size(); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); /* SPGlyph* glyph =*/ new_glyph(doc, get_selected_spfont(), count+1); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Add glyph")); @@ -475,7 +475,7 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){ } Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop); - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); Inkscape::Selection* sel = sp_desktop_selection(desktop); if (sel->isEmpty()){ char *msg = _("Select a <b>path</b> to define the curves of a glyph"); @@ -519,7 +519,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){ } Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop); - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); Inkscape::Selection* sel = sp_desktop_selection(desktop); if (sel->isEmpty()){ char *msg = _("Select a <b>path</b> to define the curves of a glyph"); @@ -562,7 +562,7 @@ void SvgFontsDialog::reset_missing_glyph_description(){ return; } - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); SPObject* obj; for (obj = get_selected_spfont()->children; obj; obj=obj->next){ if (SP_IS_MISSING_GLYPH(obj)){ @@ -581,7 +581,7 @@ void SvgFontsDialog::glyph_name_edit(const Glib::ustring&, const Glib::ustring& SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; glyph->repr->setAttribute("glyph-name", str.c_str()); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name")); update_glyphs(); @@ -594,7 +594,7 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; glyph->repr->setAttribute("unicode", str.c_str()); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode")); update_glyphs(); @@ -604,7 +604,7 @@ void SvgFontsDialog::remove_selected_font(){ SPFont* font = get_selected_spfont(); sp_repr_unparent(font->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font")); update_fonts(); @@ -619,7 +619,7 @@ void SvgFontsDialog::remove_selected_glyph(){ SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; sp_repr_unparent(glyph->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph")); update_glyphs(); @@ -634,7 +634,7 @@ void SvgFontsDialog::remove_selected_kerning_pair(){ SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode]; sp_repr_unparent(pair->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair")); update_glyphs(); @@ -705,7 +705,7 @@ void SvgFontsDialog::add_kerning_pair(){ if (this->kerning_pair) return; //We already have this kerning pair - SPDocument* document = sp_desktop_document(this->getDesktop()); + Document* document = sp_desktop_document(this->getDesktop()); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); // create a new hkern node @@ -767,7 +767,7 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){ return &kerning_vbox; } -SPFont *new_font(SPDocument *document) +SPFont *new_font(Document *document) { g_return_val_if_fail(document != NULL, NULL); @@ -820,7 +820,7 @@ void set_font_family(SPFont* font, char* str){ } void SvgFontsDialog::add_font(){ - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); SPFont* font = new_font(doc); const int count = _model->children().size(); diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index e273a827c..cdd479e9d 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -377,7 +377,7 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) if ( bounceTarget ) { SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0; SPDesktop* desktop = swp ? swp->getDesktop() : 0; - SPDocument *doc = desktop ? desktop->doc() : 0; + Document *doc = desktop ? desktop->doc() : 0; if (doc) { std::string targetName(bounceTarget->def.descr); const GSList *gradients = sp_document_get_resource_list(doc, "gradient"); @@ -397,7 +397,7 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) if ( bounceTarget ) { SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0; SPDesktop* desktop = swp ? swp->getDesktop() : 0; - SPDocument *doc = desktop ? desktop->doc() : 0; + Document *doc = desktop ? desktop->doc() : 0; if (doc) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); @@ -524,7 +524,7 @@ void ColorItem::_dropDataIn( GtkWidget */*widget*/, { } -static bool bruteForce( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b ) +static bool bruteForce( Document* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b ) { bool changed = false; @@ -612,7 +612,7 @@ void ColorItem::_colorDefChanged(void* data) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; if ( desktop ) { - SPDocument* document = sp_desktop_document( desktop ); + Document* document = sp_desktop_document( desktop ); Inkscape::XML::Node *rroot = sp_document_repr_root( document ); if ( rroot ) { @@ -1362,9 +1362,9 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop ) _currentDesktop->connectToolSubselectionChanged( sigc::hide(sigc::mem_fun(*this, &SwatchesPanel::_updateFromSelection))); - sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, SPDocument*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument); - sigc::slot<void, SPDocument*> base2 = first; - sigc::slot<void,SPDesktop*, SPDocument*> slot2 = sigc::hide<0>( base2 ); + sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, Document*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument); + sigc::slot<void, Document*> base2 = first; + sigc::slot<void,SPDesktop*, Document*> slot2 = sigc::hide<0>( base2 ); _documentConnection = desktop->connectDocumentReplaced( slot2 ); _setDocument( desktop->doc() ); @@ -1374,7 +1374,7 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop ) } } -void SwatchesPanel::_setDocument( SPDocument *document ) +void SwatchesPanel::_setDocument( Document *document ) { if ( document != _currentDocument ) { if ( _currentDocument ) { |
