From 1512a076f4d28bd3f9b5eec084707b386ff964e6 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 9 May 2010 21:02:14 +0200 Subject: Fix small snapping regression (reported in LP #562205, comment #11) (bzr r9405) --- src/ui/tool/node.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index e9fa79fb3..56e0ecff8 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -1039,9 +1039,7 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) fp = bp; } fp.getPoint(new_pos); - if (fp.getTarget() != SNAPTARGET_CONSTRAINT) { - _desktop->snapindicator->set_new_snaptarget(fp); - } + _desktop->snapindicator->set_new_snaptarget(fp); } else { Geom::Point origin = _last_drag_origin(); Geom::Point delta = new_pos - origin; -- cgit v1.2.3 From 4118824234670a01ef4caad683817567ea84e6ae Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 18 May 2010 21:17:03 +0200 Subject: better fix for lpe stack forking Fixed bugs: - https://launchpad.net/bugs/578969 (bzr r9431) --- src/ui/clipboard.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index dd1f981b5..9ce2ac5ba 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1057,6 +1057,8 @@ void ClipboardManagerImpl::_applyPathEffect(SPItem *item, gchar const *effectsta { SPLPEItem *lpeitem = SP_LPE_ITEM(item); // for each effect in the stack, check if we need to fork it before adding it to the item + sp_lpe_item_fork_path_effects_if_necessary(lpeitem, 1); + std::istringstream iss(effectstack); std::string href; while (std::getline(iss, href, ';')) @@ -1065,8 +1067,7 @@ void ClipboardManagerImpl::_applyPathEffect(SPItem *item, gchar const *effectsta if (!obj) { return; } - // if the effectstack is not used by anyone, we might as well take it - LivePathEffectObject *lpeobj = LIVEPATHEFFECT(obj)->fork_private_if_necessary(1); + LivePathEffectObject *lpeobj = LIVEPATHEFFECT(obj); sp_lpe_item_add_path_effect(lpeitem, lpeobj); } } -- cgit v1.2.3 From 0af139d84f4620c7b57988084f3145532db9d30b Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 18 May 2010 23:49:29 +0200 Subject: fix lpe dialog updating Fixed bugs: - https://launchpad.net/bugs/516940 (bzr r9433) --- src/ui/dialog/livepatheffect-editor.cpp | 5 ++++- src/ui/dialog/livepatheffect-editor.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index dec437be9..62ed4e639 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -51,9 +51,10 @@ namespace Dialog { /*#################### * Callback functions */ -static void lpeeditor_selection_changed (Inkscape::Selection * selection, gpointer data) +void lpeeditor_selection_changed (Inkscape::Selection * selection, gpointer data) { LivePathEffectEditor *lpeeditor = static_cast(data); + lpeeditor->lpe_list_locked = false; lpeeditor->onSelectionChanged(selection); } @@ -327,6 +328,7 @@ LivePathEffectEditor::setDesktop(SPDesktop *desktop) selection_modified_connection.disconnect(); } + lpe_list_locked = false; current_desktop = desktop; if (desktop) { Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -373,6 +375,7 @@ LivePathEffectEditor::onApply() sp_document_done(doc, SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Create and apply path effect")); + lpe_list_locked = false; onSelectionChanged(sel); } } diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h index 1152e8bb8..50e948644 100644 --- a/src/ui/dialog/livepatheffect-editor.h +++ b/src/ui/dialog/livepatheffect-editor.h @@ -123,6 +123,8 @@ private: SPLPEItem * current_lpeitem; + friend void lpeeditor_selection_changed (Inkscape::Selection * selection, gpointer data); + LivePathEffectEditor(LivePathEffectEditor const &d); LivePathEffectEditor& operator=(LivePathEffectEditor const &d); }; -- cgit v1.2.3 From 4c99f48a83a1a74ab46bfeaa841e88196165447a Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Wed, 26 May 2010 22:28:09 +0200 Subject: Consistency fix in the tools strings (badly places :). (bzr r9453) --- src/ui/tool/curve-drag-point.cpp | 8 ++++---- src/ui/tool/node-tool.cpp | 4 ++-- src/ui/tool/node.cpp | 28 ++++++++++++++-------------- src/ui/tool/transform-handle-set.cpp | 28 ++++++++++++++-------------- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tool/curve-drag-point.cpp b/src/ui/tool/curve-drag-point.cpp index e761daf20..0e5805dda 100644 --- a/src/ui/tool/curve-drag-point.cpp +++ b/src/ui/tool/curve-drag-point.cpp @@ -164,19 +164,19 @@ Glib::ustring CurveDragPoint::_getTip(unsigned state) bool linear = first->front()->isDegenerate() && first.next()->back()->isDegenerate(); if (state_held_shift(state)) { return C_("Path segment tip", - "Shift: click to toggle segment selection"); + "Shift: click to toggle segment selection"); } if (state_held_control(state) && state_held_alt(state)) { return C_("Path segment tip", - "Ctrl+Alt: click to insert a node"); + "Ctrl+Alt: click to insert a node"); } if (linear) { return C_("Path segment tip", - "Linear segment: drag to convert to a Bezier segment, " + "Linear segment: drag to convert to a Bezier segment, " "doubleclick to insert node, click to select (more: Shift, Ctrl+Alt)"); } else { return C_("Path segment tip", - "Bezier segment: drag to shape the segment, doubleclick to insert node, " + "Bezier segment: drag to shape the segment, doubleclick to insert node, " "click to select (more: Shift, Ctrl+Alt)"); } } diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp index b5f420597..450ca96f0 100644 --- a/src/ui/tool/node-tool.cpp +++ b/src/ui/tool/node-tool.cpp @@ -534,11 +534,11 @@ void ink_node_tool_update_tip(InkNodeTool *nt, GdkEvent *event) if (state_held_shift(new_state)) { if (nt->_last_over) { nt->_node_message_context->set(Inkscape::NORMAL_MESSAGE, - C_("Node tool tip", "Shift: drag to add nodes to the selection, " + C_("Node tool tip", "Shift: drag to add nodes to the selection, " "click to toggle object selection")); } else { nt->_node_message_context->set(Inkscape::NORMAL_MESSAGE, - C_("Node tool tip", "Shift: drag to add nodes to the selection")); + C_("Node tool tip", "Shift: drag to add nodes to the selection")); } return; } diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 56e0ecff8..9c9c58ff1 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -357,21 +357,21 @@ Glib::ustring Handle::_getTip(unsigned state) } else { if (state_held_shift(state) && can_shift_rotate) { return C_("Path handle tip", - "Shift+Alt: preserve handle length and rotate both handles"); + "Shift+Alt: preserve handle length and rotate both handles"); } else { return C_("Path handle tip", - "Alt: preserve handle length while dragging"); + "Alt: preserve handle length while dragging"); } } } else { if (state_held_control(state)) { if (state_held_shift(state) && can_shift_rotate) { return format_tip(C_("Path handle tip", - "Shift+Ctrl: snap rotation angle to %g° increments and rotate both handles"), + "Shift+Ctrl: snap rotation angle to %g° increments and rotate both handles"), snap_increment_degrees()); } else { return format_tip(C_("Path handle tip", - "Ctrl: snap rotation angle to %g° increments, click to retract"), + "Ctrl: snap rotation angle to %g° increments, click to retract"), snap_increment_degrees()); } } else if (state_held_shift(state) && can_shift_rotate) { @@ -383,10 +383,10 @@ Glib::ustring Handle::_getTip(unsigned state) switch (_parent->type()) { case NODE_AUTO: return format_tip(C_("Path handle tip", - "Auto node handle: drag to convert to smooth node (%s)"), more); + "Auto node handle: drag to convert to smooth node (%s)"), more); default: return format_tip(C_("Path handle tip", - "%s: drag to shape the segment (%s)"), + "%s: drag to shape the segment (%s)"), handle_type_to_localized_string(_parent->type()), more); } } @@ -1141,21 +1141,21 @@ Glib::ustring Node::_getTip(unsigned state) "to %f° increments"), snap_increment_degrees()); }*/ return C_("Path node tip", - "Shift: drag out a handle, click to toggle selection"); + "Shift: drag out a handle, click to toggle selection"); } - return C_("Path node tip", "Shift: click to toggle selection"); + return C_("Path node tip", "Shift: click to toggle selection"); } if (state_held_control(state)) { if (state_held_alt(state)) { - return C_("Path node tip", "Ctrl+Alt: move along handle lines, click to delete node"); + return C_("Path node tip", "Ctrl+Alt: move along handle lines, click to delete node"); } return C_("Path node tip", - "Ctrl: move along axes, click to change node type"); + "Ctrl: move along axes, click to change node type"); } if (state_held_alt(state)) { - return C_("Path node tip", "Alt: sculpt nodes"); + return C_("Path node tip", "Alt: sculpt nodes"); } // No modifiers: assemble tip from node type @@ -1163,13 +1163,13 @@ Glib::ustring Node::_getTip(unsigned state) if (_selection.transformHandlesEnabled() && selected()) { if (_selection.size() == 1) { return format_tip(C_("Path node tip", - "%s: drag to shape the path (more: Shift, Ctrl, Alt)"), nodetype); + "%s: drag to shape the path (more: Shift, Ctrl, Alt)"), nodetype); } return format_tip(C_("Path node tip", - "%s: drag to shape the path, click to toggle scale/rotation handles (more: Shift, Ctrl, Alt)"), nodetype); + "%s: drag to shape the path, click to toggle scale/rotation handles (more: Shift, Ctrl, Alt)"), nodetype); } return format_tip(C_("Path node tip", - "%s: drag to shape the path, click to select only this node (more: Shift, Ctrl, Alt)"), nodetype); + "%s: drag to shape the path, click to select only this node (more: Shift, Ctrl, Alt)"), nodetype); } Glib::ustring Node::_getDragTip(GdkEventMotion */*event*/) diff --git a/src/ui/tool/transform-handle-set.cpp b/src/ui/tool/transform-handle-set.cpp index 1af848b96..6b8fb4c11 100644 --- a/src/ui/tool/transform-handle-set.cpp +++ b/src/ui/tool/transform-handle-set.cpp @@ -134,21 +134,21 @@ protected: if (state_held_control(state)) { if (state_held_shift(state)) { return C_("Transform handle tip", - "Shift+Ctrl: scale uniformly about the rotation center"); + "Shift+Ctrl: scale uniformly about the rotation center"); } return C_("Transform handle tip", "Ctrl: scale uniformly"); } if (state_held_shift(state)) { if (state_held_alt(state)) { return C_("Transform handle tip", - "Shift+Alt: scale using an integer ratio about the rotation center"); + "Shift+Alt: scale using an integer ratio about the rotation center"); } - return C_("Transform handle tip", "Shift: scale from the rotation center"); + return C_("Transform handle tip", "Shift: scale from the rotation center"); } if (state_held_alt(state)) { - return C_("Transform handle tip", "Alt: scale using an integer ratio"); + return C_("Transform handle tip", "Alt: scale using an integer ratio"); } - return C_("Transform handle tip", "Scale handle: drag to scale the selection"); + return C_("Transform handle tip", "Scale handle: drag to scale the selection"); } virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) { @@ -308,16 +308,16 @@ protected: if (state_held_shift(state)) { if (state_held_control(state)) { return format_tip(C_("Transform handle tip", - "Shift+Ctrl: rotate around the opposite corner and snap " + "Shift+Ctrl: rotate around the opposite corner and snap " "angle to %f° increments"), snap_increment_degrees()); } - return C_("Transform handle tip", "Shift: rotate around the opposite corner"); + return C_("Transform handle tip", "Shift: rotate around the opposite corner"); } if (state_held_control(state)) { return format_tip(C_("Transform handle tip", - "Ctrl: snap angle to %f° increments"), snap_increment_degrees()); + "Ctrl: snap angle to %f° increments"), snap_increment_degrees()); } - return C_("Transform handle tip", "Rotation handle: drag to rotate " + return C_("Transform handle tip", "Rotation handle: drag to rotate " "the selection around the rotation center"); } @@ -416,17 +416,17 @@ protected: if (state_held_shift(state)) { if (state_held_control(state)) { return format_tip(C_("Transform handle tip", - "Shift+Ctrl: skew about the rotation center with snapping " + "Shift+Ctrl: skew about the rotation center with snapping " "to %f° increments"), snap_increment_degrees()); } - return C_("Transform handle tip", "Shift: skew about the rotation center"); + return C_("Transform handle tip", "Shift: skew about the rotation center"); } if (state_held_control(state)) { return format_tip(C_("Transform handle tip", - "Ctrl: snap skew angle to %f° increments"), snap_increment_degrees()); + "Ctrl: snap skew angle to %f° increments"), snap_increment_degrees()); } return C_("Transform handle tip", - "Skew handle: drag to skew (shear) selection about " + "Skew handle: drag to skew (shear) selection about " "the opposite handle"); } @@ -476,7 +476,7 @@ protected: virtual Glib::ustring _getTip(unsigned /*state*/) { return C_("Transform handle tip", - "Rotation center: drag to change the origin of transforms"); + "Rotation center: drag to change the origin of transforms"); } private: -- cgit v1.2.3 From 3c402d24e7fdce198befa42833574e802bfcd0e5 Mon Sep 17 00:00:00 2001 From: Alex Leone Date: Mon, 31 May 2010 17:06:11 -0700 Subject: Makes the "Fit Page to Selection" margin options load from the opened file. (Bug #499942) Fixed bugs: - https://launchpad.net/bugs/499942 (bzr r9462) --- src/ui/dialog/document-properties.cpp | 1 + src/ui/widget/page-sizer.cpp | 69 ++++++++++++++++++++++++++--------- src/ui/widget/page-sizer.h | 11 +++++- 3 files changed, 62 insertions(+), 19 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 86baa85cd..33fdf8327 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -825,6 +825,7 @@ DocumentProperties::update() double const doc_w_px = sp_document_width(sp_desktop_document(dt)); double const doc_h_px = sp_document_height(sp_desktop_document(dt)); _page_sizer.setDim (doc_w_px, doc_h_px); + _page_sizer.updateFitMarginsUI(SP_OBJECT_REPR(nv)); //-----------------------------------------------------------guide page diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index e604a24ec..05de86308 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -18,25 +18,26 @@ # include #endif -#include -#include -#include - #include #include -#include "ui/widget/button.h" - -#include "ui/widget/scalar-unit.h" +#include +#include +#include -#include "helper/units.h" -#include "inkscape.h" -#include "verbs.h" #include "desktop-handles.h" #include "document.h" #include "desktop.h" -#include "page-sizer.h" #include "helper/action.h" +#include "helper/units.h" +#include "inkscape.h" +#include "page-sizer.h" +#include "sp-namedview.h" #include "sp-root.h" +#include "ui/widget/button.h" +#include "ui/widget/scalar-unit.h" +#include "verbs.h" +#include "xml/node.h" +#include "xml/repr.h" using std::pair; @@ -320,11 +321,11 @@ PageSizer::PageSizer(Registry & _wr) _marginTable.set_border_width(4); _marginTable.set_row_spacings(4); _marginTable.set_col_spacings(4); - _marginTable.attach(_fitPageButtonAlign, 0,2, 0,1); - _marginTable.attach(_marginTopAlign, 0,2, 1,2); - _marginTable.attach(_marginLeftAlign, 0,1, 2,3); - _marginTable.attach(_marginRightAlign, 1,2, 2,3); - _marginTable.attach(_marginBottomAlign, 0,2, 3,4); + _marginTable.attach(_marginTopAlign, 0,2, 0,1); + _marginTable.attach(_marginLeftAlign, 0,1, 1,2); + _marginTable.attach(_marginRightAlign, 1,2, 1,2); + _marginTable.attach(_marginBottomAlign, 0,2, 2,3); + _marginTable.attach(_fitPageButtonAlign, 0,2, 3,4); _marginTopAlign.set(0.5, 0.5, 0.0, 1.0); _marginTopAlign.add(_marginTop); @@ -437,6 +438,28 @@ PageSizer::setDim (double w, double h, bool changeList) _called = false; } +/** + * Updates the scalar widgets for the fit margins. (Just changes the value + * of the ui widgets to match the xml). + */ +void +PageSizer::updateFitMarginsUI(Inkscape::XML::Node *nv_repr) +{ + double value = 0.0; + if (sp_repr_get_double(nv_repr, "fit-margin-top", &value)) { + _marginTop.setValue(value); + } + if (sp_repr_get_double(nv_repr, "fit-margin-left", &value)) { + _marginLeft.setValue(value); + } + if (sp_repr_get_double(nv_repr, "fit-margin-right", &value)) { + _marginRight.setValue(value); + } + if (sp_repr_get_double(nv_repr, "fit-margin-bottom", &value)) { + _marginBottom.setValue(value); + } +} + /** * Returns an iterator pointing to a row in paperSizeListStore which @@ -492,11 +515,23 @@ PageSizer::fire_fit_canvas_to_selection_or_drawing() if (!dt) { return; } + SPDocument *doc; + SPNamedView *nv; + Inkscape::XML::Node *nv_repr; + if ((doc = sp_desktop_document(SP_ACTIVE_DESKTOP)) + && (nv = sp_document_namedview(doc, 0)) + && (nv_repr = SP_OBJECT_REPR(nv))) { + sp_repr_set_svg_double(nv_repr, "fit-margin-top", _marginTop.getValue()); + sp_repr_set_svg_double(nv_repr, "fit-margin-left", _marginLeft.getValue()); + sp_repr_set_svg_double(nv_repr, "fit-margin-right", _marginRight.getValue()); + sp_repr_set_svg_double(nv_repr, "fit-margin-bottom", _marginBottom.getValue()); + } Verb *verb = Verb::get( SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING ); if (verb) { SPAction *action = verb->get_action(dt); - if (action) + if (action) { sp_action_perform(action, NULL); + } } } diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index 718eb95b5..7c2048534 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -14,10 +14,11 @@ #include #include + +#include "helper/units.h" #include "ui/widget/registry.h" #include "ui/widget/registered-widget.h" -#include "helper/units.h" - +#include "xml/node.h" namespace Inkscape { namespace UI { @@ -141,6 +142,12 @@ public: * true, then reset the paper size list to the closest match */ void setDim (double w, double h, bool changeList=true); + + /** + * Updates the scalar widgets for the fit margins. (Just changes the value + * of the ui widgets to match the xml). + */ + void updateFitMarginsUI(Inkscape::XML::Node *nv_repr); protected: -- cgit v1.2.3 From bbf79eb5d0fe066c51c819cd5f8a46b0defa5d01 Mon Sep 17 00:00:00 2001 From: Alex Leone Date: Mon, 31 May 2010 20:30:52 -0700 Subject: In the document properties dialog, changes tab order to units, width, height. (Bug #587874) Fixed bugs: - https://launchpad.net/bugs/587874 (bzr r9463) --- src/ui/widget/page-sizer.cpp | 11 ++++++++++- src/ui/widget/page-sizer.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 05de86308..e2be98664 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -311,9 +311,17 @@ PageSizer::PageSizer(Registry & _wr) _customDimTable.attach(_dimensionHeight, 0,1, 1,2); _customDimTable.attach(_fitPageMarginExpander, 0,2, 2,3); + _dimTabOrderGList = NULL; + _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionUnits.gobj()); + _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionWidth.gobj()); + _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionHeight.gobj()); + _dimTabOrderGList = g_list_append(_dimTabOrderGList, _fitPageMarginExpander.gobj()); + Glib::ListHandle dimFocusChain(_dimTabOrderGList, Glib::OWNERSHIP_NONE); + _customDimTable.set_focus_chain(dimFocusChain); + //## Set up fit page expander - _fitPageMarginExpander.set_label(_("Resi_ze page to content...")); _fitPageMarginExpander.set_use_underline(); + _fitPageMarginExpander.set_label(_("Resi_ze page to content...")); _fitPageMarginExpander.add(_marginTable); //## Set up margin settings @@ -350,6 +358,7 @@ PageSizer::PageSizer(Registry & _wr) */ PageSizer::~PageSizer() { + g_list_free(_dimTabOrderGList); } diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index 7c2048534..ba6c8dd13 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -203,6 +203,7 @@ protected: RegisteredUnitMenu _dimensionUnits; RegisteredScalarUnit _dimensionWidth; RegisteredScalarUnit _dimensionHeight; + GList * _dimTabOrderGList; //### Fit Page options Gtk::Expander _fitPageMarginExpander; -- cgit v1.2.3 From b316bf5f8184db03b5e68468e429967e847e1058 Mon Sep 17 00:00:00 2001 From: Alex Leone Date: Mon, 31 May 2010 20:34:51 -0700 Subject: Fixing order from r9463, correct order is Width -> Height -> Units. (Bug #587874) Fixed bugs: - https://launchpad.net/bugs/587874 (bzr r9464) --- src/ui/widget/page-sizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index e2be98664..26763cc77 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -312,9 +312,9 @@ PageSizer::PageSizer(Registry & _wr) _customDimTable.attach(_fitPageMarginExpander, 0,2, 2,3); _dimTabOrderGList = NULL; - _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionUnits.gobj()); _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionWidth.gobj()); _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionHeight.gobj()); + _dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionUnits.gobj()); _dimTabOrderGList = g_list_append(_dimTabOrderGList, _fitPageMarginExpander.gobj()); Glib::ListHandle dimFocusChain(_dimTabOrderGList, Glib::OWNERSHIP_NONE); _customDimTable.set_focus_chain(dimFocusChain); -- cgit v1.2.3 From 3d643742b6eec017bb6a07daa625f1bd60f8e4e2 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 1 Jun 2010 01:26:40 -0700 Subject: Cleanup on encapsulation. Addition of initial widescreen detection. (bzr r9465) --- src/ui/uxmanager.cpp | 70 ++++++++++++++++++++++++++++++++++++++++++---------- src/ui/uxmanager.h | 17 +++++++------ 2 files changed, 67 insertions(+), 20 deletions(-) (limited to 'src/ui') diff --git a/src/ui/uxmanager.cpp b/src/ui/uxmanager.cpp index 3c6f85b91..ae4de62e3 100644 --- a/src/ui/uxmanager.cpp +++ b/src/ui/uxmanager.cpp @@ -20,6 +20,7 @@ #include "widgets/toolbox.h" #include "widgets/desktop-widget.h" #include "preferences.h" +#include "gdkmm/screen.h" #ifdef GDK_WINDOWING_X11 #include @@ -44,17 +45,45 @@ namespace UI { UXManager* instance = 0; +class UXManagerImpl : public UXManager +{ +public: + UXManagerImpl(); + virtual ~UXManagerImpl(); + + virtual void setTask(SPDesktop* dt, gint val); + virtual void addTrack( SPDesktopWidget* dtw ); + virtual void delTrack( SPDesktopWidget* dtw ); + virtual void connectToDesktop( vector const & toolboxes, SPDesktop *desktop ); + + virtual bool isFloatWindowProblem() const; + virtual bool isWidescreen() const; + +private: + bool _floatwindowIssues; + bool _widescreen; +}; + UXManager* UXManager::getInstance() { if (!instance) { - instance = new UXManager(); + instance = new UXManagerImpl(); } return instance; } -UXManager::UXManager() : - floatwindowIssues(false) +UXManager::UXManager() +{ +} + +UXManager::~UXManager() +{ +} + +UXManagerImpl::UXManagerImpl() : + _floatwindowIssues(false), + _widescreen(false) { ege::TagSet tags; tags.setLang("en"); @@ -68,24 +97,39 @@ UXManager::UXManager() : //if (g_ascii_strcasecmp( wmName, UNKOWN_WINDOW_MANAGER_NAME ) == 0) { if (g_ascii_strcasecmp( wmName, KDE_WINDOW_MANAGER_NAME ) == 0) { - floatwindowIssues = true; + _floatwindowIssues = true; } #elif defined(GDK_WINDOWING_WIN32) - floatwindowIssues = true; + _floatwindowIssues = true; #endif // GDK_WINDOWING_WIN32 + + + Glib::RefPtr defaultScreen = Gdk::Screen::get_default(); + if (defaultScreen) { + int width = defaultScreen->get_width(); + int height = defaultScreen->get_height(); + gdouble aspect = static_cast(width) / static_cast(height); + if (aspect > 1.4) { + _widescreen = true; + } + } } -UXManager::~UXManager() +UXManagerImpl::~UXManagerImpl() { } +bool UXManagerImpl::isFloatWindowProblem() const +{ + return _floatwindowIssues; +} -bool UXManager::isFloatWindowProblem() const +bool UXManagerImpl::isWidescreen() const { - return floatwindowIssues; + return _widescreen; } -void UXManager::setTask(SPDesktop* dt, gint val) +void UXManagerImpl::setTask(SPDesktop* dt, gint val) { for (vector::iterator it = dtws.begin(); it != dtws.end(); ++it) { SPDesktopWidget* dtw = *it; @@ -124,14 +168,14 @@ void UXManager::setTask(SPDesktop* dt, gint val) } -void UXManager::addTrack( SPDesktopWidget* dtw ) +void UXManagerImpl::addTrack( SPDesktopWidget* dtw ) { if (std::find(dtws.begin(), dtws.end(), dtw) == dtws.end()) { dtws.push_back(dtw); } } -void UXManager::delTrack( SPDesktopWidget* dtw ) +void UXManagerImpl::delTrack( SPDesktopWidget* dtw ) { vector::iterator iter = std::find(dtws.begin(), dtws.end(), dtw); if (iter != dtws.end()) { @@ -139,9 +183,9 @@ void UXManager::delTrack( SPDesktopWidget* dtw ) } } -void UXManager::connectToDesktop( vector const & toolboxes, SPDesktop *desktop ) +void UXManagerImpl::connectToDesktop( vector const & toolboxes, SPDesktop *desktop ) { -//static map > trackedBoxes; + //static map > trackedBoxes; for (vector::const_iterator it = toolboxes.begin(); it != toolboxes.end(); ++it ) { GtkWidget* toolbox = *it; diff --git a/src/ui/uxmanager.h b/src/ui/uxmanager.h index aecda2b5e..7f7cc6ecb 100644 --- a/src/ui/uxmanager.h +++ b/src/ui/uxmanager.h @@ -34,19 +34,22 @@ public: static UXManager* getInstance(); virtual ~UXManager(); - void addTrack( SPDesktopWidget* dtw ); - void delTrack( SPDesktopWidget* dtw ); + virtual void addTrack( SPDesktopWidget* dtw ) = 0; + virtual void delTrack( SPDesktopWidget* dtw ) = 0; - void connectToDesktop( std::vector const & toolboxes, SPDesktop *desktop ); + virtual void connectToDesktop( std::vector const & toolboxes, SPDesktop *desktop ) = 0; - void setTask(SPDesktop* dt, gint val); + virtual void setTask(SPDesktop* dt, gint val) = 0; - bool isFloatWindowProblem() const; + virtual bool isFloatWindowProblem() const = 0; + virtual bool isWidescreen() const = 0; -private: +protected: UXManager(); - bool floatwindowIssues; +private: + UXManager( UXManager const & ); + UXManager & operator=( UXManager const & ); }; } // namespace UI -- cgit v1.2.3 From 2a0861f419f601b2eadfa0b8a6ed7cfce66760b0 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Thu, 3 Jun 2010 20:46:28 +0200 Subject: Authors and translators lists update. (bzr r9472) --- src/ui/dialog/aboutbox.cpp | 327 +++++++++++++++++++++++++-------------------- 1 file changed, 181 insertions(+), 146 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index bbd02fa5d..09174de27 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -224,140 +224,151 @@ void AboutBox::initStrings() { * and paste the result from the combo box here. */ authors_text = - "Maximilian Albert\n" - "Josh Andler\n" - "Jean-François Barraud\n" - "Bill Baxter\n" - "John Bintz\n" - "Arpad Biro\n" - "Nicholas Bishop\n" - "Joshua L. Blocher\n" - "Henrik Bohre\n" - "Boldewyn\n" - "Daniel Borgmann\n" - "Bastien Bouclet\n" - "Hans Breuer\n" - "Gustav Broberg\n" - "Christopher Brown\n" - "Marcus Brubaker\n" - "Luca Bruno\n" - "Nicu Buculei\n" - "Bulia Byak\n" - "Ian Caldwell\n" - "Gail Carmichael\n" - "Ed Catmur\n" - "Chema Celorio\n" - "Johan Ceuppens\n" - "Zbigniew Chyla\n" - "Alexander Clausen\n" - "John Cliff\n" - "Kees Cook\n" - "Ben Cromwell\n" - "Robert Crosbie\n" - "Jon Cruz\n" - "Aurélie De-Cooman\n" - "Milosz Derezynski\n" - "Daniel Díaz\n" - "Bruno Dilly\n" - "Larry Doolittle\n" - "Tim Dwyer\n" - "Maxim V. Dziumanenko\n" - "Johan Engelen\n" - "Miklos Erdelyi\n" - "Ulf Erikson\n" - "Noé Falzon\n" - "Frank Felfe\n" - "Andrew Fitzsimon\n" - "Edward Flick\n" - "Marcin Floryan\n" - "Ben Fowler\n" - "Fred\n" - "Cedric Gemy\n" - "Steren Giannini\n" - "Olivier Gondouin\n" - "Ted Gould\n" - "Toine de Greef\n" - "Michael Grosberg\n" - "Bryce Harrington\n" - "Dale Harvey\n" - "Aurélio Heckert\n" - "Carl Hetherington\n" - "Jos Hirth\n" - "Thomas Holder\n" - "Joel Holdsworth\n" - "Alan Horkan\n" - "Karl Ove Hufthammer\n" - "Richard Hughes\n" - "Nathan Hurst\n" - "inductiveload\n" - "Thomas Ingham\n" - "Jean-Olivier Irisson\n" - "Bob Jamison\n" - "jEsuSdA\n" - "Lauris Kaplinski\n" - "Lynn Kerby\n" - "Niko Kiirala\n" - "James Kilfiger\n" - "Jason Kivlighn\n" - "Adrian Knoth\n" - "Krzysztof Kosiński\n" - "Petr Kovar\n" - "Raph Levien\n" - "Diederik van Lierop\n" - "Nicklas Lindgren\n" - "Vitaly Lipatov\n" - "Ivan Louette\n" - "Colin Marquardt\n" - "Dmitry G. Mastrukov\n" - "Matiphas\n" - "Michael Meeks\n" - "Federico Mena\n" - "MenTaLguY\n" - "Aubanel Monnier\n" - "Tim Mooney\n" - "Derek P. Moore\n" - "Peter Moulder\n" - "Jörg Müller\n" - "Yukihiro Nakai\n" - "Victor Navez\n" - "Christian Neumair\n" - "Andreas Nilsson\n" - "Mitsuru Oka\n" - "Marten Owens\n" - "Alvin Penner\n" - "Jon Phillips\n" - "Zdenko Podobny\n" - "Alexandre Prokoudine\n" - "Jean-René Reinhard\n" - "Alexey Remizov\n" - "Frederic Rodrigo\n" - "Hugo Rodrigues\n" - "Juarez Rudsatz\n" - "Xavier Conde Rueda\n" - "Felipe Corrêa da Silva Sanches\n" - "Christian Schaller\n" - "Marco Scholten\n" - "Tom von Schwerdtner\n" - "Danilo Šegan\n" - "Shivaken\n" - "Michael Sloan\n" - "Boštjan Špetič\n" - "Aaron Spike\n" - "Kaushik Sridharan\n" - "Ralf Stephan\n" - "Dariusz Stojek\n" - "Pat Suwalski\n" - "Adib Taraben\n" - "Hugh Tebby\n" - "Jonas Termeau\n" - "David Turner\n" - "Andre Twupack\n" - "Aleksandar Urošević\n" - "Lucas Vieites\n" - "Michael Wybrow\n" - "Daniel Yacob\n" - "Masatake Yamato\n" - "David Yip"; + "Maximilian Albert\n" + "Josh Andler\n" + "Tavmjong Bah\n" + "Pierre Barbry-Blot\n" + "Jean-François Barraud\n" + "Bill Baxter\n" + "John Beard\n" + "John Bintz\n" + "Arpad Biro\n" + "Nicholas Bishop\n" + "Joshua L. Blocher\n" + "Henrik Bohre\n" + "Boldewyn\n" + "Daniel Borgmann\n" + "Bastien Bouclet\n" + "Hans Breuer\n" + "Gustav Broberg\n" + "Christopher Brown\n" + "Marcus Brubaker\n" + "Luca Bruno\n" + "Nicu Buculei\n" + "Bulia Byak\n" + "Pierre Caclin\n" + "Ian Caldwell\n" + "Gail Carmichael\n" + "Ed Catmur\n" + "Chema Celorio\n" + "Johan Ceuppens\n" + "Zbigniew Chyla\n" + "Alexander Clausen\n" + "John Cliff\n" + "Kees Cook\n" + "Ben Cromwell\n" + "Robert Crosbie\n" + "Jon Cruz\n" + "Aurélie De-Cooman\n" + "Milosz Derezynski\n" + "Daniel Díaz\n" + "Bruno Dilly\n" + "Larry Doolittle\n" + "Tim Dwyer\n" + "Maxim V. Dziumanenko\n" + "Johan Engelen\n" + "Miklos Erdelyi\n" + "Ulf Erikson\n" + "Noé Falzon\n" + "Frank Felfe\n" + "Andrew Fitzsimon\n" + "Edward Flick\n" + "Marcin Floryan\n" + "Ben Fowler\n" + "Fred\n" + "Cedric Gemy\n" + "Steren Giannini\n" + "Olivier Gondouin\n" + "Ted Gould\n" + "Toine de Greef\n" + "Michael Grosberg\n" + "Bryce Harrington\n" + "Dale Harvey\n" + "Aurélio A. Heckert\n" + "Carl Hetherington\n" + "Jos Hirth\n" + "Thomas Holder\n" + "Joel Holdsworth\n" + "Alan Horkan\n" + "Karl Ove Hufthammer\n" + "Richard Hughes\n" + "Nathan Hurst\n" + "inductiveload\n" + "Thomas Ingham\n" + "Jean-Olivier Irisson\n" + "Bob Jamison\n" + "jEsuSdA\n" + "Lauris Kaplinski\n" + "Lynn Kerby\n" + "Niko Kiirala\n" + "James Kilfiger\n" + "Jason Kivlighn\n" + "Adrian Knoth\n" + "Krzysztof Kosiński\n" + "Petr Kovar\n" + "Benoît Lavorata\n" + "Alex Leone\n" + "Julien Leray\n" + "Raph Levien\n" + "Diederik van Lierop\n" + "Nicklas Lindgren\n" + "Vitaly Lipatov\n" + "Ivan Louette\n" + "Pierre-Antoine Marc\n" + "Aurel-Aimé Marmion\n" + "Colin Marquardt\n" + "Dmitry G. Mastrukov\n" + "Matiphas\n" + "Michael Meeks\n" + "Federico Mena\n" + "MenTaLguY\n" + "Aubanel Monnier\n" + "Vincent Montagne\n" + "Tim Mooney\n" + "Derek P. Moore\n" + "Peter Moulder\n" + "Jörg Müller\n" + "Yukihiro Nakai\n" + "Victor Navez\n" + "Christian Neumair\n" + "Andreas Nilsson\n" + "Mitsuru Oka\n" + "Marten Owens\n" + "Alvin Penner\n" + "Jon Phillips\n" + "Zdenko Podobny\n" + "Alexandre Prokoudine\n" + "Jean-René Reinhard\n" + "Alexey Remizov\n" + "Frederic Rodrigo\n" + "Hugo Rodrigues\n" + "Juarez Rudsatz\n" + "Xavier Conde Rueda\n" + "Felipe Corrêa da Silva Sanches\n" + "Christian Schaller\n" + "Marco Scholten\n" + "Tom von Schwerdtner\n" + "Danilo Šegan\n" + "Shivaken\n" + "Michael Sloan\n" + "Boštjan Špetič\n" + "Aaron Spike\n" + "Kaushik Sridharan\n" + "Ralf Stephan\n" + "Dariusz Stojek\n" + "Martin Sucha\n" + "Pat Suwalski\n" + "Adib Taraben\n" + "Hugh Tebby\n" + "Jonas Termeau\n" + "David Turner\n" + "Andre Twupack\n" + "Aleksandar Urošević\n" + "Lucas Vieites\n" + "Michael Wybrow\n" + "Daniel Yacob\n" + "Masatake Yamato\n" + "David Yip"; //############################## //# T R A N S L A T O R S @@ -391,13 +402,15 @@ void AboutBox::initStrings() { */ gchar const *allTranslators = "3ARRANO.com <3arrano@3arrano.com>, 2005.\n" - "Adib Taraben , 2004.\n" + "Adib Taraben , 2004.\n" + "Alan Monfort , 2009.\n" "Alastair McKinstry , 2000.\n" "Aleksandar Urošević , 2004, 2005, 2006.\n" "Alessio Frusciante , 2002, 2003.\n" "Alexander Shopov , 2006.\n" "Alexandre Prokoudine , 2005.\n" "Alexey Remizov , 2004.\n" + "Ali Ghanavatian , 2010.\n" "Álvaro Lopes , 2001, 2002.\n" "Andreas Hyden , 2000.\n" "Andrius Ramanauskas , 2006.\n" @@ -407,6 +420,7 @@ void AboutBox::initStrings() { "Arman Aksoy , 2003.\n" "Arpad Biro , 2004, 2005.\n" "Benedikt Roth , 2000.\n" + "Benno Schulenberg , 2008.\n" "Boštjan Špetič , 2004, 2005.\n" "Brisa Francesco , 2000.\n" "bulia byak , 2004.\n" @@ -415,24 +429,31 @@ void AboutBox::initStrings() { "Christian Neumair , 2002, 2003.\n" "Christian Rose , 2000, 2001, 2002, 2003.\n" "Christophe Merlet (RedFox) , 2000-2002.\n" + "Clytie Siddall , 2004-2008.\n" "Colin Marquardt , 2004-2006.\n" "Cédric Gemy , 2006.\n" "Daniel Díaz , 2004.\n" "Didier Conchaudron , 2003.\n" "Dorji Tashi , 2006.\n" "Duarte Loreto 2002, 2003 (Maintainer).\n" + "Equipe de Tradução Inkscape Brasil , 2007.\n" "Fatih Demir , 2000.\n" + "Foppe Benedictus , 2007-2009.\n" "Francesc Dorca , 2003. Traducció sodipodi.\n" "Francisco Javier F. Serrador , 2003.\n" "Francisco Xosé Vázquez Grandal , 2001.\n" "Frederic Rodrigo , 2004-2005.\n" "Ge'ez Frontier Foundation , 2002.\n" + "Hleb Valoshka <375gnu@gmail.com>, 2008-2009.\n" "Hizkuntza Politikarako Sailburuordetza , 2005.\n" "Ilia Penev , 2006.\n" + "Ivan Masár , 2006, 2007, 2008. \n" "Iñaki Larrañaga , 2006.\n" - "Jin-Hwan Jeong , 2009.\n" + "Jeffrey Steve Borbón Sanabria , 2005.\n" + "Joaquim Perez i Noguer , 2008-2009.\n" "Jörg Müller , 2005.\n" - "Jeroen van der Vegt , 2003, 2005.\n" + "Jeroen van der Vegt , 2003, 2005, 2008.\n" + "Jin-Hwan Jeong , 2009.\n" "Jonathan Ernst , 2006.\n" "Jose Antonio Salgueiro Aquino , 2003.\n" "Josef Vybiral , 2005-2006.\n" @@ -441,29 +462,40 @@ void AboutBox::initStrings() { "Jurmey Rabgay , 2006.\n" "Kai Lahmann , 2000.\n" "Karl Ove Hufthammer , 2004, 2005.\n" - "Keld Simonsen , 2000-2001.\n" + "KATSURAGAWA Naoki , 2006.\n" + "Keld Simonsen , 2000, 2001.\n" + "Kenji Inoue , 2006-2007.\n" + "Khandakar Mujahidul Islam , 2006.\n" "Kitae , 2006.\n" "Kjartan Maraas , 2000-2002.\n" + "Kris De Gussem , 2008-2010.\n" "Lauris Kaplinski , 2000.\n" + "Leandro Regueiro , 2007-2010.\n" + "Liu Xiaoqin , 2008.\n" "Luca Bruno , 2005.\n" - "Lucas Vieites Fariña, 2003-2005.\n" + "Lucas Vieites Fariña, 2003-2010.\n" "Mahesh subedi , 2006.\n" - "Marcin Floryan , 2008.\n" - "Martin Srebotnjak, , 2005.\n" + "Martin Srebotnjak, , 2005, 2010.\n" "Masatake YAMATO , 2002.\n" + "Masato Hashimoto , 2009-2010.\n" "Matiphas , 2004-2006.\n" "Mattias Hultgren , 2005.\n" "Maxim Dziumanenko , 2004.\n" + "Mətin Əmirov , 2003.\n" "Mitsuru Oka , 2002.\n" "Morphix User , 2006.\n" "Mufit Eribol , 2000.\n" - "Nicolas Dufour , 2008-2009.\n" + "Muhammad Bashir Al-Noimi , 2008.\n" + "Myckel Habets , 2008.\n" + "Nguyen Dinh Trung , 2007, 2008.\n" + "Nicolas Dufour , 2008-2010.\n" "Pawan Chitrakar , 2006.\n" "Przemysław Loesch , 2005.\n" "Quico Llach , 2000. Traducció sodipodi.\n" - "Raymond Ostertag , 2002-2003.\n" + "Raymond Ostertag , 2002, 2003.\n" "Riku Leino , 2006.\n" "Rune Rønde Laursen , 2006.\n" + "Ruud Steltenpool , 2006.\n" "Serdar Soytetir , 2005.\n" "shivaken , 2004.\n" "Shyam Krishna Bal , 2006.\n" @@ -471,8 +503,11 @@ void AboutBox::initStrings() { "Spyros Blanas , 2006.\n" "Stefan Graubner , 2005.\n" "Supranee Thirawatthanasuk , 2006.\n" - "Takeshi Aihana , 2000-2001.\n" + "Takeshi Aihana , 2000, 2001.\n" + "Tim Sheridan , 2007-2009.\n" "Theppitak Karoonboonyanan , 2006.\n" + "Thiago Pimentel , 2006.\n" + "Toshifumi Sato , 2005.\n" "Jon South , 2006. \n" "Uwe Schöler , 2006.\n" "Valek Filippov , 2000, 2003.\n" @@ -484,12 +519,12 @@ void AboutBox::initStrings() { "Wang Li , 2002.\n" "Wei-Lun Chao , 2006.\n" "Wolfram Strempfer , 2006.\n" - "Xavier Conde Rueda , 2004, 2005.\n" + "Xavier Conde Rueda , 2004-2008.\n" "Yukihiro Nakai , 2000, 2003.\n" "Yuri Beznos , 2006.\n" "Yuri Syrota , 2000.\n" "Yves Guillou , 2004.\n" - "Zdenko Podobný , 2003, 2004.\n" + "Zdenko Podobný , 2003, 2004." ; translators_text.append(allTranslators); -- cgit v1.2.3 From 90abb7ed1e7e1f41d994c5f5d31d1016a9ff6d90 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sat, 5 Jun 2010 00:00:04 +0200 Subject: Translator credits update (bzr r9477) --- src/ui/dialog/aboutbox.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 09174de27..dd8fb7b51 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -470,10 +470,10 @@ void AboutBox::initStrings() { "Kjartan Maraas , 2000-2002.\n" "Kris De Gussem , 2008-2010.\n" "Lauris Kaplinski , 2000.\n" - "Leandro Regueiro , 2007-2010.\n" + "Leandro Regueiro , 2006-2008,2010.\n" "Liu Xiaoqin , 2008.\n" "Luca Bruno , 2005.\n" - "Lucas Vieites Fariña, 2003-2010.\n" + "Lucas Vieites Fariña, 2003-2010.\n" "Mahesh subedi , 2006.\n" "Martin Srebotnjak, , 2005, 2010.\n" "Masatake YAMATO , 2002.\n" @@ -509,7 +509,7 @@ void AboutBox::initStrings() { "Thiago Pimentel , 2006.\n" "Toshifumi Sato , 2005.\n" "Jon South , 2006. \n" - "Uwe Schöler , 2006.\n" + "Uwe Schöler , 2006.\n" "Valek Filippov , 2000, 2003.\n" "Victor Dachev , 2006.\n" "Vincent van Adrighem , 2003.\n" @@ -520,8 +520,10 @@ void AboutBox::initStrings() { "Wei-Lun Chao , 2006.\n" "Wolfram Strempfer , 2006.\n" "Xavier Conde Rueda , 2004-2008.\n" + "Yaron Shahrabani , 2009.\n" "Yukihiro Nakai , 2000, 2003.\n" "Yuri Beznos , 2006.\n" + "Yuri Chornoivan , 2007-2010.\n" "Yuri Syrota , 2000.\n" "Yves Guillou , 2004.\n" "Zdenko Podobný , 2003, 2004." -- cgit v1.2.3 From 6ec39706fb6d7aa09267c11a90d8953c9f714fc2 Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Fri, 4 Jun 2010 15:18:31 -0700 Subject: Adding JessyInk 1.5.1 extension set by Hannes Hochreiner (bzr r9478) --- src/ui/dialog/aboutbox.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index dd8fb7b51..fb2023737 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -287,6 +287,7 @@ void AboutBox::initStrings() { "Aurélio A. Heckert\n" "Carl Hetherington\n" "Jos Hirth\n" + "Hannes Hochreiner\n" "Thomas Holder\n" "Joel Holdsworth\n" "Alan Horkan\n" -- cgit v1.2.3 From f58719e20a5993eff9f86d8c1c0f2f3a4a53607b Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sat, 5 Jun 2010 10:33:43 +0200 Subject: Translator credits update (now all files are updated) (bzr r9480) --- src/ui/dialog/aboutbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index fb2023737..441c8ed75 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -521,10 +521,10 @@ void AboutBox::initStrings() { "Wei-Lun Chao , 2006.\n" "Wolfram Strempfer , 2006.\n" "Xavier Conde Rueda , 2004-2008.\n" - "Yaron Shahrabani , 2009.\n" + "Yaron Shahrabani , 2009.\n" "Yukihiro Nakai , 2000, 2003.\n" "Yuri Beznos , 2006.\n" - "Yuri Chornoivan , 2007-2010.\n" + "Yuri Chornoivan , 2007-2010.\n" "Yuri Syrota , 2000.\n" "Yves Guillou , 2004.\n" "Zdenko Podobný , 2003, 2004." -- cgit v1.2.3 From de8267eb91e267549a12bc25a5d96ecd4d268a0a Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 13 Jun 2010 17:46:06 +0200 Subject: Translations: * en_GB translation update by Tim Sheridan * br translation update by Alan Monfort * translators list update (bzr r9499) --- src/ui/dialog/aboutbox.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 441c8ed75..2d40ebb9a 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -216,7 +216,7 @@ void AboutBox::initStrings() { * To update it, execute this snippet of sed magic in the toplevel * source directory: * - * sed -e 's/^\(.*\) \([^ ]*\)*$/\2_ \1/' ../../../AUTHORS + * sed -e 's/^\(.*\) \([^ ]*\)*$/\2_ \1/' AUTHORS | sort | sed -e 's/^\([^_]*\)_ \(.*\)$/\2 \1/;s/^.*$/"\0\\n"/;$s/\\n//' | zenity --text-info @@ -397,14 +397,20 @@ void AboutBox::initStrings() { translators_text.append("\n\n\n"); } - /** - * This list is copied from the TRANSLATORS file. It should - * be periodically updated. - */ + /* This text is copied from the TRANSLATORS file. + * To update it, execute this snippet of sed magic in the toplevel + * source directory: + * + * sed -e 's/^\(.*\) \([^ ]*\)*$/\2_ \1/' TRANSLATORS + | sed -e 's/^\([^_]*\)_ \(.*\)$/\2 \1/;s/^.*$/"\0\\n"/;$s/\\n//' + | zenity --text-info + * + * and paste the result from the combo box here. + */ gchar const *allTranslators = "3ARRANO.com <3arrano@3arrano.com>, 2005.\n" "Adib Taraben , 2004.\n" - "Alan Monfort , 2009.\n" + "Alan Monfort , 2009-2010.\n" "Alastair McKinstry , 2000.\n" "Aleksandar Urošević , 2004, 2005, 2006.\n" "Alessio Frusciante , 2002, 2003.\n" @@ -505,7 +511,7 @@ void AboutBox::initStrings() { "Stefan Graubner , 2005.\n" "Supranee Thirawatthanasuk , 2006.\n" "Takeshi Aihana , 2000, 2001.\n" - "Tim Sheridan , 2007-2009.\n" + "Tim Sheridan , 2007-2010.\n" "Theppitak Karoonboonyanan , 2006.\n" "Thiago Pimentel , 2006.\n" "Toshifumi Sato , 2005.\n" -- cgit v1.2.3 From de71f527765af3f177bfab6cbf74d26746ad7b32 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 15 Jun 2010 23:35:11 -0700 Subject: Move the task view changing to the "View" menu. Fixes bugs #170781 and #171663. Fixed bugs: - https://launchpad.net/bugs/170781 - https://launchpad.net/bugs/171663 (bzr r9503) --- src/ui/uxmanager.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- src/ui/uxmanager.h | 3 ++- 2 files changed, 49 insertions(+), 6 deletions(-) (limited to 'src/ui') diff --git a/src/ui/uxmanager.cpp b/src/ui/uxmanager.cpp index ae4de62e3..fbe000de9 100644 --- a/src/ui/uxmanager.cpp +++ b/src/ui/uxmanager.cpp @@ -16,6 +16,7 @@ #include #include "uxmanager.h" +#include "desktop.h" #include "util/ege-tags.h" #include "widgets/toolbox.h" #include "widgets/desktop-widget.h" @@ -39,6 +40,24 @@ static vector dtws; static map > trackedBoxes; +namespace { +// TODO unify this later: +static Glib::ustring getLayoutPrefPath( Inkscape::UI::View::View *view ) +{ + Glib::ustring prefPath; + + if (reinterpret_cast(view)->is_focusMode()) { + prefPath = "/focus/"; + } else if (reinterpret_cast(view)->is_fullscreen()) { + prefPath = "/fullscreen/"; + } else { + prefPath = "/window/"; + } + + return prefPath; +} + +} namespace Inkscape { namespace UI { @@ -51,11 +70,14 @@ public: UXManagerImpl(); virtual ~UXManagerImpl(); - virtual void setTask(SPDesktop* dt, gint val); virtual void addTrack( SPDesktopWidget* dtw ); virtual void delTrack( SPDesktopWidget* dtw ); + virtual void connectToDesktop( vector const & toolboxes, SPDesktop *desktop ); + virtual gint getDefaultTask( SPDesktop *desktop ); + virtual void setTask(SPDesktop* dt, gint val); + virtual bool isFloatWindowProblem() const; virtual bool isWidescreen() const; @@ -129,6 +151,17 @@ bool UXManagerImpl::isWidescreen() const return _widescreen; } +gint UXManagerImpl::getDefaultTask( SPDesktop *desktop ) +{ + gint taskNum = isWidescreen() ? 2 : 0; + + Glib::ustring prefPath = getLayoutPrefPath( desktop ); + taskNum = Inkscape::Preferences::get()->getInt( prefPath + "task/taskset", taskNum ); + taskNum = (taskNum < 0) ? 0 : (taskNum > 2) ? 2 : taskNum; + + return taskNum; +} + void UXManagerImpl::setTask(SPDesktop* dt, gint val) { for (vector::iterator it = dtws.begin(); it != dtws.end(); ++it) { @@ -137,6 +170,7 @@ void UXManagerImpl::setTask(SPDesktop* dt, gint val) gboolean notDone = Inkscape::Preferences::get()->getBool("/options/workarounds/dynamicnotdone", false); if (dtw->desktop == dt) { + int taskNum = val; switch (val) { default: case 0: @@ -145,15 +179,16 @@ void UXManagerImpl::setTask(SPDesktop* dt, gint val) if (notDone) { dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); } - dtw->setToolboxPosition("SnapToolbar", GTK_POS_TOP); + dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT); + taskNum = val; // in case it was out of range break; case 1: - dtw->setToolboxPosition("ToolToolbar", GTK_POS_TOP); - dtw->setToolboxPosition("CommandsToolbar", GTK_POS_LEFT); + dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT); + dtw->setToolboxPosition("CommandsToolbar", GTK_POS_TOP); if (notDone) { dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP); } - dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT); + dtw->setToolboxPosition("SnapToolbar", GTK_POS_TOP); break; case 2: dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT); @@ -163,6 +198,8 @@ void UXManagerImpl::setTask(SPDesktop* dt, gint val) dtw->setToolboxPosition("AuxToolbar", GTK_POS_RIGHT); } } + Glib::ustring prefPath = getLayoutPrefPath( dtw->desktop ); + Inkscape::Preferences::get()->setInt( prefPath + "task/taskset", taskNum ); } } } @@ -200,6 +237,11 @@ void UXManagerImpl::connectToDesktop( vector const & toolboxes, SPD if (std::find(desktops.begin(), desktops.end(), desktop) == desktops.end()) { desktops.push_back(desktop); } + + gint taskNum = getDefaultTask( desktop ); + + // note: this will change once more options are in the task set support: + Inkscape::UI::UXManager::getInstance()->setTask( desktop, taskNum ); } diff --git a/src/ui/uxmanager.h b/src/ui/uxmanager.h index 7f7cc6ecb..5fef08f11 100644 --- a/src/ui/uxmanager.h +++ b/src/ui/uxmanager.h @@ -39,7 +39,8 @@ public: virtual void connectToDesktop( std::vector const & toolboxes, SPDesktop *desktop ) = 0; - virtual void setTask(SPDesktop* dt, gint val) = 0; + virtual gint getDefaultTask( SPDesktop *desktop ) = 0; + virtual void setTask( SPDesktop* dt, gint val ) = 0; virtual bool isFloatWindowProblem() const = 0; virtual bool isWidescreen() const = 0; -- cgit v1.2.3 From eb1279e4ae264f4f720f280461d26a1bcd8d020e Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 21 Jun 2010 08:04:11 +0200 Subject: =?UTF-8?q?Romanian=20translation=20update=20by=20Cristian=20Secar?= =?UTF-8?q?=C4=83=20(Bug=20#596689)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r9515) --- src/ui/dialog/aboutbox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 2d40ebb9a..8d467d53f 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -435,6 +435,7 @@ void AboutBox::initStrings() { "Christian Meyer , 2000-2002.\n" "Christian Neumair , 2002, 2003.\n" "Christian Rose , 2000, 2001, 2002, 2003.\n" + "Cristian Secară , 2010.\n" "Christophe Merlet (RedFox) , 2000-2002.\n" "Clytie Siddall , 2004-2008.\n" "Colin Marquardt , 2004-2006.\n" @@ -454,7 +455,7 @@ void AboutBox::initStrings() { "Hleb Valoshka <375gnu@gmail.com>, 2008-2009.\n" "Hizkuntza Politikarako Sailburuordetza , 2005.\n" "Ilia Penev , 2006.\n" - "Ivan Masár , 2006, 2007, 2008. \n" + "Ivan Masár , 2006, 2007, 2008, 2009, 2010. \n" "Iñaki Larrañaga , 2006.\n" "Jeffrey Steve Borbón Sanabria , 2005.\n" "Joaquim Perez i Noguer , 2008-2009.\n" -- cgit v1.2.3 From 1c5c6e9027b036185394728c6687a58adee530aa Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 26 Jun 2010 16:29:36 -0700 Subject: Implementing the "Convert" popup menu item for gradients/swatches. Part of bug #59441. Fixed bugs: - https://launchpad.net/bugs/594441 (bzr r9541) --- src/ui/dialog/swatches.cpp | 82 ++++++++++++++++++++++++++++++++++++++++++++-- src/ui/dialog/swatches.h | 3 +- 2 files changed, 82 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 6f013f4f3..b0d027ae9 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -44,6 +44,7 @@ #include "swatches.h" #include "style.h" #include "ui/previewholder.h" +#include "widgets/desktop-widget.h" #include "widgets/gradient-vector.h" #include "widgets/eek-preview.h" #include "display/nr-plain-stuff.h" @@ -68,6 +69,11 @@ static std::vector docTrackings; static std::map docPerPanel; +class SwatchesPanelHook : public SwatchesPanel +{ +public: + static void convertGradient( GtkMenuItem * menuitem, gpointer userData ); +}; static void handleClick( GtkWidget* /*widget*/, gpointer callback_data ) { ColorItem* item = reinterpret_cast(callback_data); @@ -84,6 +90,9 @@ static void handleSecondaryClick( GtkWidget* /*widget*/, gint /*arg1*/, gpointer } static GtkWidget* popupMenu = 0; +static GtkWidget *popupSubHolder = 0; +static GtkWidget *popupSub = 0; +static std::vector popupItems; static std::vector popupExtras; static ColorItem* bounceTarget = 0; static SwatchesPanel* bouncePanel = 0; @@ -159,6 +168,33 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) } } +void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer userData ) +{ + if ( bounceTarget ) { + SwatchesPanel* swp = bouncePanel; + SPDesktop* desktop = swp ? swp->getDesktop() : 0; + SPDocument *doc = desktop ? desktop->doc() : 0; + gint index = GPOINTER_TO_INT(userData); + if ( doc && (index >= 0) && (static_cast(index) < popupItems.size()) ) { + Glib::ustring targetName = popupItems[index]; + + const GSList *gradients = sp_document_get_resource_list(doc, "gradient"); + for (const GSList *item = gradients; item; item = item->next) { + SPGradient* grad = SP_GRADIENT(item->data); + if ( targetName == grad->getId() ) { + grad->repr->setAttribute("osb:paint", "solid"); + + sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, + _("Add gradient stop")); + + handleGradientsChange(doc); // work-around for signal not being emmitted + break; + } + } + } + } +} + static SwatchesPanel* findContainingPanel( GtkWidget *widget ) { SwatchesPanel *swp = 0; @@ -177,7 +213,12 @@ static SwatchesPanel* findContainingPanel( GtkWidget *widget ) return swp; } -gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, gpointer user_data) +static void removeit( GtkWidget *widget, gpointer data ) +{ + gtk_container_remove( GTK_CONTAINER(data), widget ); +} + +gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, gpointer user_data ) { gboolean handled = FALSE; @@ -237,7 +278,12 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g child = gtk_menu_item_new_with_label(_("Convert")); gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child); //popupExtras.push_back(child); - gtk_widget_set_sensitive( child, FALSE ); + //gtk_widget_set_sensitive( child, FALSE ); + { + popupSubHolder = child; + popupSub = gtk_menu_new(); + gtk_menu_item_set_submenu( GTK_MENU_ITEM(child), popupSub ); + } gtk_widget_show_all(popupMenu); } @@ -251,7 +297,39 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g bounceTarget = item; bouncePanel = swp; + popupItems.clear(); if ( popupMenu ) { + gtk_container_foreach(GTK_CONTAINER(popupSub), removeit, popupSub); + bool processed = false; + GtkWidget *wdgt = gtk_widget_get_ancestor(widget, SP_TYPE_DESKTOP_WIDGET); + if ( wdgt ) { + SPDesktopWidget *dtw = SP_DESKTOP_WIDGET(wdgt); + if ( dtw && dtw->desktop ) { + // Pick up all gradients with vectors + const GSList *gradients = sp_document_get_resource_list(dtw->desktop->doc(), "gradient"); + gint index = 0; + for (const GSList *curr = gradients; curr; curr = curr->next) { + SPGradient* grad = SP_GRADIENT(curr->data); + if (SP_GRADIENT_HAS_STOPS(grad) && !grad->isSwatch()) { + //gl = g_slist_prepend(gl, curr->data); + processed = true; + GtkWidget *child = gtk_menu_item_new_with_label(grad->getId()); + gtk_menu_shell_append(GTK_MENU_SHELL(popupSub), child); + + popupItems.push_back(grad->getId()); + g_signal_connect( G_OBJECT(child), + "activate", + G_CALLBACK(SwatchesPanelHook::convertGradient), + GINT_TO_POINTER(index) ); + index++; + } + } + + gtk_widget_show_all(popupSub); + } + } + gtk_widget_set_sensitive( popupSubHolder, processed ); + gtk_menu_popup(GTK_MENU(popupMenu), NULL, NULL, NULL, NULL, event->button, event->time); handled = TRUE; } diff --git a/src/ui/dialog/swatches.h b/src/ui/dialog/swatches.h index b18fd6cad..93bbe81d8 100644 --- a/src/ui/dialog/swatches.h +++ b/src/ui/dialog/swatches.h @@ -43,6 +43,8 @@ public: virtual int getSelectedIndex() {return _currentIndex;} // temporary protected: + static void handleGradientsChange(SPDocument *document); + virtual void _updateFromSelection(); virtual void _handleAction( int setId, int itemId ); virtual void _setDocument( SPDocument *document ); @@ -55,7 +57,6 @@ private: SwatchesPanel &operator=(SwatchesPanel const &); // no assign static void _trackDocument( SwatchesPanel *panel, SPDocument *document ); - static void handleGradientsChange(SPDocument *document); static void handleDefsModified(SPDocument *document); PreviewHolder* _holder; -- cgit v1.2.3 From 7e8ffe9fb3b42470802ed080dc827fdda32165b3 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 27 Jun 2010 20:16:09 -0700 Subject: Partial C++-ification of SPGradient (bzr r9542) --- src/ui/dialog/swatches.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index b0d027ae9..90e9e5f7b 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -182,12 +182,12 @@ void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer us for (const GSList *item = gradients; item; item = item->next) { SPGradient* grad = SP_GRADIENT(item->data); if ( targetName == grad->getId() ) { - grad->repr->setAttribute("osb:paint", "solid"); + grad->repr->setAttribute("osb:paint", "solid"); // TODO make conditional sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, _("Add gradient stop")); - handleGradientsChange(doc); // work-around for signal not being emmitted + handleGradientsChange(doc); // work-around for signal not being emitted break; } } @@ -310,7 +310,7 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g gint index = 0; for (const GSList *curr = gradients; curr; curr = curr->next) { SPGradient* grad = SP_GRADIENT(curr->data); - if (SP_GRADIENT_HAS_STOPS(grad) && !grad->isSwatch()) { + if ( grad->hasStops() && !grad->isSwatch() ) { //gl = g_slist_prepend(gl, curr->data); processed = true; GtkWidget *child = gtk_menu_item_new_with_label(grad->getId()); @@ -809,7 +809,7 @@ static void recalcSwatchContents(SPDocument* doc, for ( std::vector::iterator it = newList.begin(); it != newList.end(); ++it ) { SPGradient* grad = *it; - sp_gradient_ensure_vector( grad ); + grad->ensureVector(); SPGradientStop first = grad->vector.stops[0]; SPColor color = first.color; guint32 together = color.toRGBA32(first.opacity); @@ -938,11 +938,12 @@ void SwatchesPanel::_updateFromSelection() if ( SP_IS_GRADIENT(server) ) { SPGradient* target = 0; SPGradient* grad = SP_GRADIENT(server); - if (grad->repr->attribute("osb:paint")) { + + if ( grad->isSwatch() ) { target = grad; } else if ( grad->ref ) { SPGradient *tmp = grad->ref->getObject(); - if ( tmp && tmp->repr->attribute("osb:paint") ) { + if ( tmp && tmp->isSwatch() ) { target = tmp; } } @@ -969,11 +970,11 @@ void SwatchesPanel::_updateFromSelection() if ( SP_IS_GRADIENT(server) ) { SPGradient* target = 0; SPGradient* grad = SP_GRADIENT(server); - if (grad->repr->attribute("osb:paint")) { + if ( grad->isSwatch() ) { target = grad; } else if ( grad->ref ) { SPGradient *tmp = grad->ref->getObject(); - if ( tmp && tmp->repr->attribute("osb:paint") ) { + if ( tmp && tmp->isSwatch() ) { target = tmp; } } -- cgit v1.2.3 From 43519ed46697c28f90abe47d3b480f9bc9372c6e Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 2 Jul 2010 01:18:10 -0700 Subject: Rough pass of Fill-n-Stroke swatch conversion. (bzr r9553) --- src/ui/dialog/swatches.cpp | 71 ++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 34 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 90e9e5f7b..755a10519 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -72,7 +72,8 @@ static std::map docPerPanel; class SwatchesPanelHook : public SwatchesPanel { public: - static void convertGradient( GtkMenuItem * menuitem, gpointer userData ); + static void convertGradient( GtkMenuItem *menuitem, gpointer userData ); + static void addNewGradient( GtkMenuItem *menuitem, gpointer user_data ); }; static void handleClick( GtkWidget* /*widget*/, gpointer callback_data ) { @@ -139,7 +140,7 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) } } -static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) +void SwatchesPanelHook::addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) { if ( bounceTarget ) { SwatchesPanel* swp = bouncePanel; @@ -147,21 +148,22 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) SPDocument *doc = desktop ? desktop->doc() : 0; if (doc) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); + SPGradient * gr = 0; + { + Inkscape::XML::Node *repr = xml_doc->createElement("svg:linearGradient"); + Inkscape::XML::Node *stop = xml_doc->createElement("svg:stop"); + stop->setAttribute("offset", "0"); + stop->setAttribute("style", "stop-color:#000;stop-opacity:1;"); + repr->appendChild(stop); + Inkscape::GC::release(stop); - Inkscape::XML::Node *repr = xml_doc->createElement("svg:linearGradient"); - repr->setAttribute("osb:paint", "solid"); - Inkscape::XML::Node *stop = xml_doc->createElement("svg:stop"); - stop->setAttribute("offset", "0"); - stop->setAttribute("style", "stop-color:#000;stop-opacity:1;"); - repr->appendChild(stop); - Inkscape::GC::release(stop); - - SP_OBJECT_REPR( SP_DOCUMENT_DEFS(doc) )->addChild(repr, NULL); - - SPGradient * gr = static_cast(doc->getObjectByRepr(repr)); + SP_OBJECT_REPR( SP_DOCUMENT_DEFS(doc) )->addChild(repr, NULL); - Inkscape::GC::release(repr); + gr = static_cast(doc->getObjectByRepr(repr)); + Inkscape::GC::release(repr); + } + gr->setSwatch(); editGradientImpl( gr ); } @@ -182,12 +184,9 @@ void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer us for (const GSList *item = gradients; item; item = item->next) { SPGradient* grad = SP_GRADIENT(item->data); if ( targetName == grad->getId() ) { - grad->repr->setAttribute("osb:paint", "solid"); // TODO make conditional - + grad->setSwatch(); sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, _("Add gradient stop")); - - handleGradientsChange(doc); // work-around for signal not being emitted break; } } @@ -253,7 +252,7 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g child = gtk_menu_item_new_with_label(_("Add")); g_signal_connect( G_OBJECT(child), "activate", - G_CALLBACK(addNewGradient), + G_CALLBACK(SwatchesPanelHook::addNewGradient), user_data ); gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child); popupExtras.push_back(child); @@ -887,21 +886,25 @@ void SwatchesPanel::handleDefsModified(SPDocument *document) std::map tmpGrads; recalcSwatchContents(document, tmpColors, tmpPrevs, tmpGrads); - int cap = std::min(docPalette->_colors.size(), tmpColors.size()); - for (int i = 0; i < cap; i++) { - ColorItem* newColor = tmpColors[i]; - ColorItem* oldColor = docPalette->_colors[i]; - if ( (newColor->def.getType() != oldColor->def.getType()) || - (newColor->def.getR() != oldColor->def.getR()) || - (newColor->def.getG() != oldColor->def.getG()) || - (newColor->def.getB() != oldColor->def.getB()) ) { - oldColor->def.setRGB(newColor->def.getR(), newColor->def.getG(), newColor->def.getB()); - } - if (tmpGrads.find(newColor) != tmpGrads.end()) { - oldColor->setGradient(tmpGrads[newColor]); - } - if ( tmpPrevs.find(newColor) != tmpPrevs.end() ) { - oldColor->setPixData(tmpPrevs[newColor], PREVIEW_PIXBUF_WIDTH, VBLOCK); + if ( tmpColors.size() != docPalette->_colors.size() ) { + handleGradientsChange(document); + } else { + int cap = std::min(docPalette->_colors.size(), tmpColors.size()); + for (int i = 0; i < cap; i++) { + ColorItem* newColor = tmpColors[i]; + ColorItem* oldColor = docPalette->_colors[i]; + if ( (newColor->def.getType() != oldColor->def.getType()) || + (newColor->def.getR() != oldColor->def.getR()) || + (newColor->def.getG() != oldColor->def.getG()) || + (newColor->def.getB() != oldColor->def.getB()) ) { + oldColor->def.setRGB(newColor->def.getR(), newColor->def.getG(), newColor->def.getB()); + } + if (tmpGrads.find(newColor) != tmpGrads.end()) { + oldColor->setGradient(tmpGrads[newColor]); + } + if ( tmpPrevs.find(newColor) != tmpPrevs.end() ) { + oldColor->setPixData(tmpPrevs[newColor], PREVIEW_PIXBUF_WIDTH, VBLOCK); + } } } } -- cgit v1.2.3 From ffd8f7ee3d1b69848b62ad51725751f9a14186d9 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 2 Jul 2010 01:33:56 -0700 Subject: Bump default for "widescreen" to target netbook sizes. (bzr r9554) --- src/ui/uxmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/uxmanager.cpp b/src/ui/uxmanager.cpp index fbe000de9..a3ccb3471 100644 --- a/src/ui/uxmanager.cpp +++ b/src/ui/uxmanager.cpp @@ -131,7 +131,7 @@ UXManagerImpl::UXManagerImpl() : int width = defaultScreen->get_width(); int height = defaultScreen->get_height(); gdouble aspect = static_cast(width) / static_cast(height); - if (aspect > 1.4) { + if (aspect > 1.65) { _widescreen = true; } } -- cgit v1.2.3 From e1439ba12c16c3564b6b2801481f14f907b119cb Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 3 Jul 2010 16:02:57 -0700 Subject: Make order of 'auto' swatches match order in document. (bzr r9563) --- src/ui/dialog/swatches.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 755a10519..70e3800a0 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -14,6 +14,7 @@ #include #include +#include #include //for GTK_RESPONSE* types #include @@ -805,6 +806,7 @@ static void recalcSwatchContents(SPDocument* doc, } if ( !newList.empty() ) { + std::reverse(newList.begin(), newList.end()); for ( std::vector::iterator it = newList.begin(); it != newList.end(); ++it ) { SPGradient* grad = *it; -- cgit v1.2.3 From 5e0463d97c2a56fd7008750d8a897d3772bae946 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 3 Jul 2010 20:15:58 -0700 Subject: Suppress gradient direction line for 'solid' gradients. Removed unneeded and outdated macro use. (bzr r9564) --- src/ui/clipboard.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 9ce2ac5ba..0a64e7fa7 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -653,23 +653,23 @@ void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection) void ClipboardManagerImpl::_copyUsedDefs(SPItem *item) { // copy fill and stroke styles (patterns and gradients) - SPStyle *style = SP_OBJECT_STYLE(item); + SPStyle *style = item->style; if (style && (style->fill.isPaintserver())) { - SPObject *server = SP_OBJECT_STYLE_FILL_SERVER(item); - if (SP_IS_LINEARGRADIENT(server) || SP_IS_RADIALGRADIENT(server)) { + SPPaintServer *server = item->style->getFillPaintServer(); + if ( SP_IS_LINEARGRADIENT(server) || SP_IS_RADIALGRADIENT(server) ) { _copyGradient(SP_GRADIENT(server)); } - if (SP_IS_PATTERN(server)) { + if ( SP_IS_PATTERN(server) ) { _copyPattern(SP_PATTERN(server)); } } if (style && (style->stroke.isPaintserver())) { - SPObject *server = SP_OBJECT_STYLE_STROKE_SERVER(item); - if (SP_IS_LINEARGRADIENT(server) || SP_IS_RADIALGRADIENT(server)) { + SPPaintServer *server = item->style->getStrokePaintServer(); + if ( SP_IS_LINEARGRADIENT(server) || SP_IS_RADIALGRADIENT(server) ) { _copyGradient(SP_GRADIENT(server)); } - if (SP_IS_PATTERN(server)) { + if ( SP_IS_PATTERN(server) ) { _copyPattern(SP_PATTERN(server)); } } -- cgit v1.2.3 From 5f7ed483da0360e83ac618dcab6c20731394dbfe Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Tue, 6 Jul 2010 07:13:17 +0200 Subject: =?UTF-8?q?Translations.=20New=20Telugu=20translation=20by=20?= =?UTF-8?q?=E0=B0=B5=E0=B1=80=E0=B0=B5=E0=B1=86=E0=B0=A8=E0=B1=8D=20(Veeve?= =?UTF-8?q?n).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r9581) --- src/ui/dialog/inkscape-preferences.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 3c48a7972..866ae01e5 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1116,11 +1116,11 @@ void InkscapePreferences::initPageUI() _("Mongolian (mn)"), _("Nepali (ne)"), _("Norwegian Bokmål (nb)"), _("Norwegian Nynorsk (nn)"), _("Panjabi (pa)"), _("Polish (pl)"), _("Portuguese (pt)"), _("Portuguese/Brazil (pt_BR)"), _("Romanian (ro)"), _("Russian (ru)"), _("Serbian (sr)"), _("Serbian in Latin script (sr@latin)"), _("Slovak (sk)"), _("Slovenian (sl)"), _("Spanish (es)"), _("Spanish/Mexico (es_MX)"), - _("Swedish (sv)"), _("Thai (th)"), _("Turkish (tr)"), _("Ukrainian (uk)"), _("Vietnamese (vi)")}; + _("Swedish (sv)"),_("Telugu (te_IN)"), _("Thai (th)"), _("Turkish (tr)"), _("Ukrainian (uk)"), _("Vietnamese (vi)")}; Glib::ustring langValues[] = {"", "sq", "am", "ar", "hy", "az", "eu", "be", "bg", "bn", "br", "ca", "ca@valencia", "zh_CN", "zh_TW", "hr", "cs", "da", "nl", "dz", "de", "el", "en", "en_AU", "en_CA", "en_GB", "en_US@piglatin", "eo", "et", "fa", "fi", "fr", "ga", "gl", "he", "hu", "id", "it", "ja", "km", "rw", "ko", "lt", "mk", "mn", "ne", "nb", "nn", "pa", - "pl", "pt", "pt_BR", "ro", "ru", "sr", "sr@latin", "sk", "sl", "es", "es_MX", "sv", "th", "tr", "uk", "vi" }; + "pl", "pt", "pt_BR", "ro", "ru", "sr", "sr@latin", "sk", "sl", "es", "es_MX", "sv", "te_IN", "th", "tr", "uk", "vi" }; _ui_languages.init( "/ui/language", languages, langValues, G_N_ELEMENTS(languages), languages[0]); _page_ui.add_line( false, _("Language (requires restart):"), _ui_languages, "", -- cgit v1.2.3 From 8f6879f2ede34a0783f72b2276d4318f5b112900 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 6 Jul 2010 01:28:56 -0700 Subject: Removed "Add" and enabled "Delete" for swatch context menu. Updated swatch marker string. (bzr r9582) --- src/ui/dialog/swatches.cpp | 55 +++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 70e3800a0..e70cdaccf 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -74,7 +74,7 @@ class SwatchesPanelHook : public SwatchesPanel { public: static void convertGradient( GtkMenuItem *menuitem, gpointer userData ); - static void addNewGradient( GtkMenuItem *menuitem, gpointer user_data ); + static void deleteGradient( GtkMenuItem *menuitem, gpointer userData ); }; static void handleClick( GtkWidget* /*widget*/, gpointer callback_data ) { @@ -141,53 +141,46 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) } } -void SwatchesPanelHook::addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) +void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer userData ) { if ( bounceTarget ) { SwatchesPanel* swp = bouncePanel; SPDesktop* desktop = swp ? swp->getDesktop() : 0; SPDocument *doc = desktop ? desktop->doc() : 0; - if (doc) { - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); - SPGradient * gr = 0; - { - Inkscape::XML::Node *repr = xml_doc->createElement("svg:linearGradient"); - Inkscape::XML::Node *stop = xml_doc->createElement("svg:stop"); - stop->setAttribute("offset", "0"); - stop->setAttribute("style", "stop-color:#000;stop-opacity:1;"); - repr->appendChild(stop); - Inkscape::GC::release(stop); - - SP_OBJECT_REPR( SP_DOCUMENT_DEFS(doc) )->addChild(repr, NULL); + gint index = GPOINTER_TO_INT(userData); + if ( doc && (index >= 0) && (static_cast(index) < popupItems.size()) ) { + Glib::ustring targetName = popupItems[index]; - gr = static_cast(doc->getObjectByRepr(repr)); - Inkscape::GC::release(repr); + const GSList *gradients = sp_document_get_resource_list(doc, "gradient"); + for (const GSList *item = gradients; item; item = item->next) { + SPGradient* grad = SP_GRADIENT(item->data); + if ( targetName == grad->getId() ) { + grad->setSwatch(); + sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, + _("Add gradient stop")); + break; + } } - - gr->setSwatch(); - - editGradientImpl( gr ); } } } -void SwatchesPanelHook::convertGradient( GtkMenuItem * /*menuitem*/, gpointer userData ) +void SwatchesPanelHook::deleteGradient( GtkMenuItem */*menuitem*/, gpointer /*userData*/ ) { if ( bounceTarget ) { SwatchesPanel* swp = bouncePanel; SPDesktop* desktop = swp ? swp->getDesktop() : 0; SPDocument *doc = desktop ? desktop->doc() : 0; - gint index = GPOINTER_TO_INT(userData); - if ( doc && (index >= 0) && (static_cast(index) < popupItems.size()) ) { - Glib::ustring targetName = popupItems[index]; - + if (doc) { + std::string targetName(bounceTarget->def.descr); const GSList *gradients = sp_document_get_resource_list(doc, "gradient"); for (const GSList *item = gradients; item; item = item->next) { SPGradient* grad = SP_GRADIENT(item->data); if ( targetName == grad->getId() ) { - grad->setSwatch(); + //editGradientImpl( grad ); + grad->setSwatch(false); sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, - _("Add gradient stop")); + _("Delete")); break; } } @@ -250,17 +243,13 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child); popupExtras.push_back(child); - child = gtk_menu_item_new_with_label(_("Add")); + child = gtk_menu_item_new_with_label(_("Delete")); g_signal_connect( G_OBJECT(child), "activate", - G_CALLBACK(SwatchesPanelHook::addNewGradient), + G_CALLBACK(SwatchesPanelHook::deleteGradient), user_data ); gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child); popupExtras.push_back(child); - - child = gtk_menu_item_new_with_label(_("Delete")); - gtk_menu_shell_append(GTK_MENU_SHELL(popupMenu), child); - //popupExtras.push_back(child); gtk_widget_set_sensitive( child, FALSE ); child = gtk_menu_item_new_with_label(_("Edit...")); -- cgit v1.2.3 From 35189a0c69d1607643ea58e725979aa6ec28223c Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 6 Jul 2010 01:31:47 -0700 Subject: Minor cruft cleanup. (bzr r9583) --- src/ui/dialog/swatches.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index e70cdaccf..2f24fe2c4 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -177,7 +177,6 @@ void SwatchesPanelHook::deleteGradient( GtkMenuItem */*menuitem*/, gpointer /*us for (const GSList *item = gradients; item; item = item->next) { SPGradient* grad = SP_GRADIENT(item->data); if ( targetName == grad->getId() ) { - //editGradientImpl( grad ); grad->setSwatch(false); sp_document_done(doc, SP_VERB_CONTEXT_GRADIENT, _("Delete")); -- cgit v1.2.3 From c08d3bc95f873450ce0f31b3c920b1b8fd8412f9 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 6 Jul 2010 02:15:40 -0700 Subject: If 'Edit' on a swatch matches the current selection, invoke Fill-and-Stroke instead of gradient dialog. (bzr r9584) --- src/ui/dialog/swatches.cpp | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index 2f24fe2c4..29e480e24 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -50,7 +50,7 @@ #include "widgets/eek-preview.h" #include "display/nr-plain-stuff.h" #include "sp-gradient-reference.h" - +#include "dialog-manager.h" namespace Inkscape { namespace UI { @@ -113,11 +113,37 @@ static void redirSecondaryClick( GtkMenuItem *menuitem, gpointer /*user_data*/ ) } } -static void editGradientImpl( SPGradient* gr ) +static void editGradientImpl( SPDesktop* desktop, SPGradient* gr ) { if ( gr ) { - GtkWidget *dialog = sp_gradient_vector_editor_new( gr ); - gtk_widget_show( dialog ); + bool shown = false; + if ( desktop && desktop->doc() ) { + Inkscape::Selection *selection = sp_desktop_selection( desktop ); + GSList const *items = selection->itemList(); + if (items) { + SPStyle *query = sp_style_new( desktop->doc() ); + int result = objects_query_fillstroke(const_cast(items), query, true); + if ( (result == QUERY_STYLE_MULTIPLE_SAME) || (result == QUERY_STYLE_SINGLE) ) { + // could be pertinent + if (query->fill.isPaintserver()) { + SPPaintServer* server = query->getFillPaintServer(); + if ( SP_IS_GRADIENT(server) ) { + SPGradient* grad = SP_GRADIENT(server); + if ( grad->isSwatch() && grad->getId() == gr->getId()) { + desktop->_dlg_mgr->showDialog("FillAndStroke"); + shown = true; + } + } + } + } + sp_style_unref(query); + } + } + + if (!shown) { + GtkWidget *dialog = sp_gradient_vector_editor_new( gr ); + gtk_widget_show( dialog ); + } } } @@ -133,7 +159,7 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) for (const GSList *item = gradients; item; item = item->next) { SPGradient* grad = SP_GRADIENT(item->data); if ( targetName == grad->getId() ) { - editGradientImpl( grad ); + editGradientImpl( desktop, grad ); break; } } -- cgit v1.2.3 From ac41ce79eb1cc54e2628aa0bdbf12e40a896064a Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Tue, 6 Jul 2010 18:50:10 -0700 Subject: Patch by Johan for LPE Tool prefs page (bzr r9585) --- src/ui/dialog/inkscape-preferences.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 866ae01e5..8f5194eda 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -540,8 +540,9 @@ void InkscapePreferences::initPageTools() this->AddNewObjectsStyle(_page_eraser, "/tools/eraser"); //LPETool - this->AddPage(_page_lpetool, _("LPE Tool"), iter_tools, PREFS_PAGE_TOOLS_LPETOOL); - this->AddNewObjectsStyle(_page_lpetool, "/tools/lpetool"); + // commented out, because the LPETool is not finished yet. + //this->AddPage(_page_lpetool, _("LPE Tool"), iter_tools, PREFS_PAGE_TOOLS_LPETOOL); + //this->AddNewObjectsStyle(_page_lpetool, "/tools/lpetool"); //Text this->AddPage(_page_text, _("Text"), iter_tools, PREFS_PAGE_TOOLS_TEXT); -- cgit v1.2.3 From 6a1c87bf0c06c67532e63a5fb2271210f4c16650 Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Wed, 7 Jul 2010 16:33:52 -0700 Subject: Disabling Print Colors dialog due to lack of resolution from mailing list thread and no response by author (bzr r9593) --- src/ui/dialog/dialog-manager.cpp | 6 +++--- src/ui/dialog/print-colors-preview-dialog.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 6d3bc817e..aab9d89d7 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -41,7 +41,7 @@ #include "ui/dialog/icon-preview.h" #include "ui/dialog/floating-behavior.h" #include "ui/dialog/dock-behavior.h" -#include "ui/dialog/print-colors-preview-dialog.h" +//#include "ui/dialog/print-colors-preview-dialog.h" #include "preferences.h" #ifdef ENABLE_SVG_FONTS @@ -104,7 +104,7 @@ DialogManager::DialogManager() { registerFactory("LivePathEffect", &create); registerFactory("Memory", &create); registerFactory("Messages", &create); - registerFactory("PrintColorsPreviewDialog", &create); +// registerFactory("PrintColorsPreviewDialog", &create); registerFactory("Script", &create); #ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create); @@ -132,7 +132,7 @@ DialogManager::DialogManager() { registerFactory("LivePathEffect", &create); registerFactory("Memory", &create); registerFactory("Messages", &create); - registerFactory("PrintColorsPreviewDialog", &create); +// registerFactory("PrintColorsPreviewDialog", &create); registerFactory("Script", &create); #ifdef ENABLE_SVG_FONTS registerFactory("SvgFontsDialog", &create); diff --git a/src/ui/dialog/print-colors-preview-dialog.cpp b/src/ui/dialog/print-colors-preview-dialog.cpp index f4d83c271..1f999f692 100644 --- a/src/ui/dialog/print-colors-preview-dialog.cpp +++ b/src/ui/dialog/print-colors-preview-dialog.cpp @@ -7,7 +7,7 @@ * Copyright (C) 2009 Authors * Released under GNU GPLv2 (or later). Read the file 'COPYING' for more information. */ - +/* #include "desktop.h" #include "print-colors-preview-dialog.h" #include "preferences.h" @@ -98,3 +98,4 @@ PrintColorsPreviewDialog::~PrintColorsPreviewDialog(){} } // namespace Dialog } // namespace UI } // namespace Inkscape +*/ -- cgit v1.2.3 From 35300c9822f9f84c8a011913235fd4e5dc2c5ac8 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 12 Jul 2010 07:51:13 +0200 Subject: - Snap while rotating an object using the selector tool - Rename the ConstraintLine class to SnapConstraint - Move some duplicated code to 2geom (bzr r9607) --- src/ui/tool/node.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 9c9c58ff1..886ddd1be 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -266,7 +266,7 @@ void Handle::dragged(Geom::Point &new_pos, GdkEventMotion *event) Node *node_away = (this == &_parent->_front ? _parent->_prev() : _parent->_next()); if (_parent->type() == NODE_SMOOTH && Node::_is_line_segment(_parent, node_away)) { - Inkscape::Snapper::ConstraintLine cl(_parent->position(), + Inkscape::Snapper::SnapConstraint cl(_parent->position(), _parent->position() - node_away->position()); Inkscape::SnappedPoint p; p = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, SNAPSOURCE_NODE_HANDLE), cl); @@ -974,7 +974,7 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) // with Ctrl+Alt, constrain to handle lines // project the new position onto a handle line that is closer boost::optional front_point, back_point; - boost::optional line_front, line_back; + boost::optional line_front, line_back; if (_front.isDegenerate()) { if (_is_line_segment(this, _next())) front_point = _next()->position() - origin; @@ -988,9 +988,9 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) back_point = _back.relativePos(); } if (front_point) - line_front = Inkscape::Snapper::ConstraintLine(origin, *front_point); + line_front = Inkscape::Snapper::SnapConstraint(origin, *front_point); if (back_point) - line_back = Inkscape::Snapper::ConstraintLine(origin, *back_point); + line_back = Inkscape::Snapper::SnapConstraint(origin, *back_point); // TODO: combine the snap and non-snap branches by modifying snap.h / snap.cpp if (snap) { @@ -1029,8 +1029,8 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) // with Ctrl, constrain to axes // TODO combine the two branches if (snap) { - Inkscape::Snapper::ConstraintLine line_x(origin, Geom::Point(1, 0)); - Inkscape::Snapper::ConstraintLine line_y(origin, Geom::Point(0, 1)); + Inkscape::Snapper::SnapConstraint line_x(origin, Geom::Point(1, 0)); + Inkscape::Snapper::SnapConstraint line_y(origin, Geom::Point(0, 1)); fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_x); bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_y); } -- cgit v1.2.3