From f3756ff85a32f4b2a0771d0ac3bd78a69535395f Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 3 Jun 2011 11:44:52 +0100 Subject: Use generic headers in preparation for GTK+ 3 transition Fixed bugs: - https://launchpad.net/bugs/792263 (bzr r10252.1.1) --- src/text-context.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 5af2c5ebc..a7c6772e5 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -18,11 +18,10 @@ #endif #include -#include +#include #include #include #include -#include #include #include "macros.h" -- cgit v1.2.3 From 2402528197627887e374dd2a4269dfdeb19acc58 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Wed, 15 Jun 2011 01:13:10 +0100 Subject: Clean up deprecated GTK_WIDGET API (bzr r10302.1.2) --- src/text-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index a7c6772e5..b709d4d24 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -234,7 +234,7 @@ sp_text_context_setup(SPEventContext *ec) g_signal_connect(G_OBJECT(canvas), "focus_out_event", G_CALLBACK(sptc_focus_out), tc); g_signal_connect(G_OBJECT(tc->imc), "commit", G_CALLBACK(sptc_commit), tc); - if (GTK_WIDGET_HAS_FOCUS(canvas)) { + if (gtk_widget_has_focus(canvas)) { sptc_focus_in(canvas, NULL, tc); } } -- cgit v1.2.3 From bdf703831ff93438d49324ab842052ccaf390a5d Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 26 Jun 2011 22:00:36 +0200 Subject: =?UTF-8?q?-=20Add=20a=20third=20group=20of=20snap=20sources/targe?= =?UTF-8?q?ts,=20called=20=C2=A8others=C2=A8=20(before=20we=20had=20only?= =?UTF-8?q?=20=C2=A8bounding=20box=C2=A8=20and=20nodes=20(see=20bug=20#788?= =?UTF-8?q?178)=20-=20Fix=20the=20display=20of=20the=20snap=20source=20-?= =?UTF-8?q?=20Fix=20snapping=20of=20guides=20to=20other=20guides=20&=20gri?= =?UTF-8?q?ds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r10372) --- src/text-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index b709d4d24..3ef346ebe 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -675,7 +675,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons Geom::Point const motion_w(event->motion.x, event->motion.y); Geom::Point motion_dt(desktop->w2d(motion_w)); - m.preSnap(Inkscape::SnapCandidatePoint(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE)); + m.preSnap(Inkscape::SnapCandidatePoint(motion_dt, Inkscape::SNAPSOURCE_OTHER_HANDLE)); m.unSetup(); } break; -- cgit v1.2.3 From f7c10de0c22d6bc367d6791e98aa12065b797a56 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 3 Jul 2011 13:07:22 +0100 Subject: GTK+ cleanup: gtk_timeout_add (bzr r10412) --- src/text-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 3ef346ebe..89944a602 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -215,7 +215,7 @@ sp_text_context_setup(SPEventContext *ec) SP_CTRLRECT(tc->frame)->setColor(0x0000ff7f, false, 0); sp_canvas_item_hide(tc->frame); - tc->timeout = gtk_timeout_add(timeout, (GtkFunction) sp_text_context_timeout, ec); + tc->timeout = g_timeout_add(timeout, (GSourceFunc) sp_text_context_timeout, ec); tc->imc = gtk_im_multicontext_new(); if (tc->imc) { -- cgit v1.2.3 From 1e42fa6eb9150761c2f089a0650afcc96f21b992 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 3 Jul 2011 13:35:29 +0100 Subject: GTK+ cleanup: gtk_timeout_remove (bzr r10413) --- src/text-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 89944a602..a27ad3ee4 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -297,7 +297,7 @@ sp_text_context_finish(SPEventContext *ec) } if (tc->timeout) { - gtk_timeout_remove(tc->timeout); + g_source_remove(tc->timeout); tc->timeout = 0; } -- cgit v1.2.3 From 2be2cf32db0668dc64512a98f6c2394152bd10cc Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 16 Jul 2011 00:42:39 -0700 Subject: Cleanup of oudated/redundant SP_ITEM() macro use. (bzr r10461) --- src/text-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index a27ad3ee4..9edf96b26 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1593,8 +1593,8 @@ sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) if (tc->text) { Geom::Point p0, p1; sp_te_get_cursor_coords(tc->text, tc->text_sel_end, p0, p1); - Geom::Point const d0 = p0 * SP_ITEM(tc->text)->i2d_affine(); - Geom::Point const d1 = p1 * SP_ITEM(tc->text)->i2d_affine(); + Geom::Point const d0 = p0 * tc->text->i2d_affine(); + Geom::Point const d1 = p1 * tc->text->i2d_affine(); // scroll to show cursor if (scroll_to_see) { -- cgit v1.2.3 From eed6e9c2c229b10911a23976c47da79fc70a5b87 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 17 Jul 2011 21:47:09 +0200 Subject: - rename SPItem::i2d_affine to i2dt_affine, to clarify that it is item-to-desktop, not item-to-document. This should make it easier to spot bugs. - tag some instances where the document-to-desktop transform has been hardcoded (bzr r10466) --- src/text-context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 9edf96b26..1468984a1 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1593,8 +1593,8 @@ sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) if (tc->text) { Geom::Point p0, p1; sp_te_get_cursor_coords(tc->text, tc->text_sel_end, p0, p1); - Geom::Point const d0 = p0 * tc->text->i2d_affine(); - Geom::Point const d1 = p1 * tc->text->i2d_affine(); + Geom::Point const d0 = p0 * tc->text->i2dt_affine(); + Geom::Point const d1 = p1 * tc->text->i2dt_affine(); // scroll to show cursor if (scroll_to_see) { @@ -1675,7 +1675,7 @@ static void sp_text_context_update_text_selection(SPTextContext *tc) std::vector quads; if (tc->text != NULL) - quads = sp_te_create_selection_quads(tc->text, tc->text_sel_start, tc->text_sel_end, (tc->text)->i2d_affine()); + quads = sp_te_create_selection_quads(tc->text, tc->text_sel_start, tc->text_sel_end, (tc->text)->i2dt_affine()); for (unsigned i = 0 ; i < quads.size() ; i += 4) { SPCanvasItem *quad_canvasitem; quad_canvasitem = sp_canvas_item_new(sp_desktop_controls(tc->desktop), SP_TYPE_CTRLQUADR, NULL); -- cgit v1.2.3 From 72cc39b9f0b340548f395c7f61ca9662b34aea09 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 11:04:37 +0200 Subject: Refactor SPItem bounding box methods: remove NRRect usage and make code using them more obvious. Fix filter region computation. (bzr r10582.1.1) --- src/text-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 1468984a1..d2bf8c5f5 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -432,7 +432,7 @@ sp_text_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve } else { SP_CTRLRECT(tc->indicator)->setColor(0x0000ff7f, false, 0); } - Geom::OptRect ibbox = item_ungrouped->getBboxDesktop(); + Geom::OptRect ibbox = item_ungrouped->desktopVisualBounds(); if (ibbox) { SP_CTRLRECT(tc->indicator)->setRectangle(*ibbox); } @@ -1635,7 +1635,7 @@ sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) SP_CTRLRECT(tc->frame)->setColor(0x0000ff7f, false, 0); } sp_canvas_item_show(tc->frame); - Geom::OptRect frame_bbox = frame->getBboxDesktop(); + Geom::OptRect frame_bbox = frame->desktopVisualBounds(); if (frame_bbox) { SP_CTRLRECT(tc->frame)->setRectangle(*frame_bbox); } -- cgit v1.2.3