From 97398077b69bea0e21e940338638bd9de8917dd4 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sat, 18 Jul 2009 10:01:28 +0000 Subject: Fix for bug LP #400985 (3 strings in UI are not translatable) (bzr r8300) --- src/ui/view/edit-widget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index b12d5adf7..756f4df73 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1071,15 +1071,15 @@ EditWidget::initStatusbar() _coord_eventbox.add (_coord_status); _tooltips.set_tip (_coord_eventbox, _("Cursor coordinates")); _coord_status.attach (*new Gtk::VSeparator(), 0,1, 0,2, Gtk::FILL,Gtk::FILL, 0,0); - _coord_status.attach (*new Gtk::Label("X:", 0.0, 0.5), 1,2, 0,1, Gtk::FILL,Gtk::FILL, 0,0); - _coord_status.attach (*new Gtk::Label("Y:", 0.0, 0.5), 1,2, 1,2, Gtk::FILL,Gtk::FILL, 0,0); + _coord_status.attach (*new Gtk::Label(_("X:"), 0.0, 0.5), 1,2, 0,1, Gtk::FILL,Gtk::FILL, 0,0); + _coord_status.attach (*new Gtk::Label(_("Y:"), 0.0, 0.5), 1,2, 1,2, Gtk::FILL,Gtk::FILL, 0,0); _coord_status_x.set_text ("0.0"); _coord_status_x.set_alignment (0.0, 0.5); _coord_status_y.set_text ("0.0"); _coord_status_y.set_alignment (0.0, 0.5); _coord_status.attach (_coord_status_x, 2,3, 0,1, Gtk::FILL,Gtk::FILL, 0,0); _coord_status.attach (_coord_status_y, 2,3, 1,2, Gtk::FILL,Gtk::FILL, 0,0); - _coord_status.attach (*new Gtk::Label("Z:", 0.0, 0.5), 3,4, 0,2, Gtk::FILL,Gtk::FILL, 0,0); + _coord_status.attach (*new Gtk::Label(_("Z:"), 0.0, 0.5), 3,4, 0,2, Gtk::FILL,Gtk::FILL, 0,0); _coord_status.attach (_zoom_status, 4,5, 0,2, Gtk::FILL,Gtk::FILL, 0,0); sp_set_font_size_smaller (static_cast((void*)_coord_status.gobj())); _statusbar.pack_end (_coord_eventbox, false, false, 1); -- cgit v1.2.3 From feea521541c5d36d23a5fefa579eb9c8323ac30e Mon Sep 17 00:00:00 2001 From: johnce Date: Wed, 5 Aug 2009 06:21:55 +0000 Subject: SPDocument->Document (bzr r8407) --- src/ui/view/edit-widget.h | 6 +++--- src/ui/view/view.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.h b/src/ui/view/edit-widget.h index 2bb708305..28b4b52d2 100644 --- a/src/ui/view/edit-widget.h +++ b/src/ui/view/edit-widget.h @@ -36,7 +36,7 @@ #include "ui/widget/zoom-status.h" struct SPDesktop; -struct SPDocument; +struct Document; struct SPNamedView; namespace Inkscape { @@ -46,14 +46,14 @@ namespace View { class EditWidget : public Gtk::Window, public EditWidgetInterface { public: - EditWidget (SPDocument*); + EditWidget (Document*); ~EditWidget(); // Initialization void initActions(); void initUIManager(); void initLayout(); - void initEdit (SPDocument*); + void initEdit (Document*); void destroyEdit(); // Actions diff --git a/src/ui/view/view.h b/src/ui/view/view.h index 882746cea..6465807d6 100644 --- a/src/ui/view/view.h +++ b/src/ui/view/view.h @@ -53,7 +53,7 @@ struct StopOnNonZero { } }; -class SPDocument; +class Document; namespace Inkscape { class MessageContext; @@ -80,7 +80,7 @@ public: void close() { _close(); } /// Returns a pointer to the view's document. - SPDocument *doc() const + Document *doc() const { return _doc; } /// Returns a pointer to the view's message stack. Inkscape::MessageStack *messageStack() const @@ -108,12 +108,12 @@ public: virtual void onDocumentResized (double, double) = 0; protected: - SPDocument *_doc; + Document *_doc; Inkscape::MessageStack *_message_stack; Inkscape::MessageContext *_tips_message_context; virtual void _close(); - virtual void setDocument(SPDocument *doc); + virtual void setDocument(Document *doc); sigc::signal _position_set_signal; sigc::signal _resized_signal; -- cgit v1.2.3 From 4cd79453c07adefb912a4dbd0afb2e7c2722bd90 Mon Sep 17 00:00:00 2001 From: johnce Date: Wed, 5 Aug 2009 06:38:07 +0000 Subject: SPDocument->Document (bzr r8408) --- src/ui/view/edit-widget.cpp | 8 ++++---- src/ui/view/view.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 756f4df73..9619380bb 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -71,7 +71,7 @@ namespace Inkscape { namespace UI { namespace View { -EditWidget::EditWidget (SPDocument *doc) +EditWidget::EditWidget (Document *doc) : _main_window_table(4), _viewport_table(3,3), _act_grp(Gtk::ActionGroup::create()), @@ -1191,7 +1191,7 @@ EditWidget::shutdown() if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop)) return false; - SPDocument *doc = _desktop->doc(); + Document *doc = _desktop->doc(); if (doc->isModifiedSinceSave()) { gchar *markup; /// \todo FIXME !!! obviously this will have problems if the document @@ -1389,7 +1389,7 @@ EditWidget::updateScrollbars (double scale) _update_s_f = true; /* The desktop region we always show unconditionally */ - SPDocument *doc = _desktop->doc(); + Document *doc = _desktop->doc(); Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)), Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) ); SPObject* root = doc->root; @@ -1548,7 +1548,7 @@ void EditWidget::_namedview_modified (SPObject *obj, guint flags) { } void -EditWidget::initEdit (SPDocument *doc) +EditWidget::initEdit (Document *doc) { _desktop = new SPDesktop(); _desktop->registerEditWidget (this); diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp index 1b498a846..07bb6d2c1 100644 --- a/src/ui/view/view.cpp +++ b/src/ui/view/view.cpp @@ -137,7 +137,7 @@ void View::requestRedraw() * * \param doc The new document to connect the view to. */ -void View::setDocument(SPDocument *doc) { +void View::setDocument(Document *doc) { g_return_if_fail(doc != NULL); if (_doc) { -- cgit v1.2.3 From 51c2905fd3e99955db2d823b79abb763d8097028 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Thu, 6 Aug 2009 14:17:17 +0000 Subject: Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily. (bzr r8422) --- src/ui/view/edit-widget.cpp | 8 ++++---- src/ui/view/edit-widget.h | 6 +++--- src/ui/view/view.cpp | 2 +- src/ui/view/view.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 9619380bb..756f4df73 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -71,7 +71,7 @@ namespace Inkscape { namespace UI { namespace View { -EditWidget::EditWidget (Document *doc) +EditWidget::EditWidget (SPDocument *doc) : _main_window_table(4), _viewport_table(3,3), _act_grp(Gtk::ActionGroup::create()), @@ -1191,7 +1191,7 @@ EditWidget::shutdown() if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop)) return false; - Document *doc = _desktop->doc(); + SPDocument *doc = _desktop->doc(); if (doc->isModifiedSinceSave()) { gchar *markup; /// \todo FIXME !!! obviously this will have problems if the document @@ -1389,7 +1389,7 @@ EditWidget::updateScrollbars (double scale) _update_s_f = true; /* The desktop region we always show unconditionally */ - Document *doc = _desktop->doc(); + SPDocument *doc = _desktop->doc(); Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)), Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) ); SPObject* root = doc->root; @@ -1548,7 +1548,7 @@ void EditWidget::_namedview_modified (SPObject *obj, guint flags) { } void -EditWidget::initEdit (Document *doc) +EditWidget::initEdit (SPDocument *doc) { _desktop = new SPDesktop(); _desktop->registerEditWidget (this); diff --git a/src/ui/view/edit-widget.h b/src/ui/view/edit-widget.h index 28b4b52d2..2bb708305 100644 --- a/src/ui/view/edit-widget.h +++ b/src/ui/view/edit-widget.h @@ -36,7 +36,7 @@ #include "ui/widget/zoom-status.h" struct SPDesktop; -struct Document; +struct SPDocument; struct SPNamedView; namespace Inkscape { @@ -46,14 +46,14 @@ namespace View { class EditWidget : public Gtk::Window, public EditWidgetInterface { public: - EditWidget (Document*); + EditWidget (SPDocument*); ~EditWidget(); // Initialization void initActions(); void initUIManager(); void initLayout(); - void initEdit (Document*); + void initEdit (SPDocument*); void destroyEdit(); // Actions diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp index 07bb6d2c1..1b498a846 100644 --- a/src/ui/view/view.cpp +++ b/src/ui/view/view.cpp @@ -137,7 +137,7 @@ void View::requestRedraw() * * \param doc The new document to connect the view to. */ -void View::setDocument(Document *doc) { +void View::setDocument(SPDocument *doc) { g_return_if_fail(doc != NULL); if (_doc) { diff --git a/src/ui/view/view.h b/src/ui/view/view.h index 6465807d6..882746cea 100644 --- a/src/ui/view/view.h +++ b/src/ui/view/view.h @@ -53,7 +53,7 @@ struct StopOnNonZero { } }; -class Document; +class SPDocument; namespace Inkscape { class MessageContext; @@ -80,7 +80,7 @@ public: void close() { _close(); } /// Returns a pointer to the view's document. - Document *doc() const + SPDocument *doc() const { return _doc; } /// Returns a pointer to the view's message stack. Inkscape::MessageStack *messageStack() const @@ -108,12 +108,12 @@ public: virtual void onDocumentResized (double, double) = 0; protected: - Document *_doc; + SPDocument *_doc; Inkscape::MessageStack *_message_stack; Inkscape::MessageContext *_tips_message_context; virtual void _close(); - virtual void setDocument(Document *doc); + virtual void setDocument(SPDocument *doc); sigc::signal _position_set_signal; sigc::signal _resized_signal; -- cgit v1.2.3 From 606ebb35498c3d750bb2906954195baaa0fbcad6 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 9 Aug 2009 14:23:52 +0000 Subject: Fix remaining glitches in the behaviour of the Save dialogs (w.r.t. remembering the last file type and folder). As part of the cleanup inkscape:output_extension was removed, too. (bzr r8454) --- src/ui/view/edit-widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 756f4df73..1d319f97f 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1247,7 +1247,7 @@ EditWidget::shutdown() _("The file \"%s\" was saved with a format (%s) that may cause data loss!\n\n" "Do you want to save this file as an Inkscape SVG?"), SP_DOCUMENT_NAME(doc), - Inkscape::Extension::db.get(sp_document_repr_root(doc)->attribute("inkscape:output_extension"))->get_name()); + SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE); Gtk::MessageDialog dlg (*this, markup, -- cgit v1.2.3 From 41bb684f180db264ed37af7d58ef12079a582250 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Sun, 25 Oct 2009 02:48:06 +0000 Subject: remove registerEditWidget, move this to SPDesktop::init instead; a noop change but fixes a weird crash on Windows (bzr r8805) --- src/ui/view/edit-widget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ui/view') diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 1d319f97f..770a9bf87 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1551,11 +1551,10 @@ void EditWidget::initEdit (SPDocument *doc) { _desktop = new SPDesktop(); - _desktop->registerEditWidget (this); _namedview = sp_document_namedview (doc, 0); _svg_canvas.init (_desktop); - _desktop->init (_namedview, _svg_canvas.spobj()); + _desktop->init (_namedview, _svg_canvas.spobj(), this); sp_namedview_window_from_document (_desktop); sp_namedview_update_layers_from_document (_desktop); _dt2r = 1.0 / _namedview->doc_units->unittobase; -- cgit v1.2.3