diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
| commit | 132e83fd6f6124731dc773ae2978d115ca492ef2 (patch) | |
| tree | b561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/extension/dbus | |
| parent | updated to trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.tar.gz inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.zip | |
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/extension/dbus')
| -rw-r--r-- | src/extension/dbus/Makefile_insert | 111 | ||||
| -rw-r--r--[-rwxr-xr-x] | src/extension/dbus/builddocs.sh | 0 | ||||
| -rw-r--r-- | src/extension/dbus/document-interface.cpp | 30 |
3 files changed, 13 insertions, 128 deletions
diff --git a/src/extension/dbus/Makefile_insert b/src/extension/dbus/Makefile_insert deleted file mode 100644 index 192651d87..000000000 --- a/src/extension/dbus/Makefile_insert +++ /dev/null @@ -1,111 +0,0 @@ -## Makefile.am fragment sourced by src/Makefile.am. - -if WITH_DBUS - -############################# -# Sources for DBus interface -############################# - -ink_common_sources += \ - extension/dbus/dbus-init.cpp \ - extension/dbus/dbus-init.h \ - extension/dbus/application-interface.cpp \ - extension/dbus/application-interface.h \ - extension/dbus/document-interface.cpp \ - extension/dbus/document-interface.h \ - extension/dbus/org.inkscape.service.in - -########################### -# Build DBus wrapper files -########################### - -extension/dbus/application-server-glue.h: extension/dbus/application-interface.xml - dbus-binding-tool --mode=glib-server --output=$@ --prefix=application_interface $^ - -extension/dbus/document-server-glue.h: extension/dbus/document-interface.xml - dbus-binding-tool --mode=glib-server --output=$@ --prefix=document_interface $^ - -extension/dbus/document-client-glue.h: extension/dbus/document-interface.xml - dbus-binding-tool --mode=glib-client --output=$@ --prefix=document_interface $^ - -BUILT_SOURCES += \ - extension/dbus/application-server-glue.h \ - extension/dbus/document-server-glue.h \ - extension/dbus/document-client-glue.h - -########################### -# Distribut DBus interface -########################### - -EXTRA_DIST += \ - extension/dbus/application-interface.xml \ - extension/dbus/document-interface.xml - -########################### -# DBus Activation Service -########################### - -# Dbus service file -servicedir = $(DBUSSERVICEDIR) -service_in_files = extension/dbus/org.inkscape.service.in -service_DATA = $(service_in_files:.service.in=.service) - -# Rule to make the service file with bindir expanded -$(service_DATA): $(service_in_files) Makefile - @sed -e "s|bindir|$(prefix)|" $<> $@ - -############################ -# DBus Interface Helper Lib -############################ - -lib_LTLIBRARIES = \ - libinkdbus.la - -libinkdbusincludedir = $(includedir)/libinkdbus-0.48/libinkdbus -libinkdbusinclude_HEADERS = \ - extension/dbus/wrapper/inkscape-dbus-wrapper.h - -libinkdbus_la_SOURCES = \ - extension/dbus/wrapper/inkscape-dbus-wrapper.h \ - extension/dbus/wrapper/inkscape-dbus-wrapper.c - -libinkdbus_la_LDFLAGS = \ - -version-info 0:0:0 \ - -no-undefined \ - -export-symbols-regex "^[^_d].*" - -libinkdbus_la_CFLAGS = \ - $(DBUS_CFLAGS) \ - $(INKSCAPE_CFLAGS) \ - -I$(builddir)/extension/dbus \ - -Wall - -libinkdbus_la_LIBADD = \ - $(DBUS_LIBS) \ - $(INKSCAPE_LIBS) - -############################ -# DBus Pkgconfig file -############################ - -pkgconfig_DATA = extension/dbus/wrapper/inkdbus.pc -pkgconfigdir = $(libdir)/pkgconfig - -else # WITH_DBUS - -EXTRA_DIST += \ - extension/dbus/dbus-init.cpp \ - extension/dbus/dbus-init.h \ - extension/dbus/application-interface.cpp \ - extension/dbus/application-interface.h \ - extension/dbus/document-interface.cpp \ - extension/dbus/document-interface.h \ - extension/dbus/wrapper/inkscape-dbus-wrapper.h \ - extension/dbus/wrapper/inkscape-dbus-wrapper.c \ - extension/dbus/wrapper/inkdbus.pc \ - extension/dbus/org.inkscape.service.in \ - extension/dbus/application-interface.xml \ - extension/dbus/document-interface.xml - -endif - diff --git a/src/extension/dbus/builddocs.sh b/src/extension/dbus/builddocs.sh index 2c16daf41..2c16daf41 100755..100644 --- a/src/extension/dbus/builddocs.sh +++ b/src/extension/dbus/builddocs.sh diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp index d0a2e81aa..435e347d0 100644 --- a/src/extension/dbus/document-interface.cpp +++ b/src/extension/dbus/document-interface.cpp @@ -189,7 +189,7 @@ selection_get_center_y (Inkscape::Selection *sel){ std::vector<SPObject*> selection_swap(Inkscape::Selection *sel, gchar *name, GError **error) { - std::vector<SPObject*> oldsel = sel->list(); + std::vector<SPObject*> oldsel = std::vector<SPObject*>(sel->objects().begin(), sel->objects().end()); sel->set(get_object_by_name(sel->layers()->getDocument(), name, error)); return oldsel; @@ -405,7 +405,7 @@ document_interface_polygon (DocumentInterface *doc_interface, int cx, int cy, int radius, int rotation, int sides, GError **error) { - gdouble rot = ((rotation / 180.0) * 3.14159265) - ( 3.14159265 / 2.0); + gdouble rot = ((rotation / 180.0) * M_PI) - M_PI_2; Inkscape::XML::Node *newNode = dbus_create_node(doc_interface->target.getDocument(), "svg:path"); newNode->setAttribute("inkscape:flatsided", "true"); newNode->setAttribute("sodipodi:type", "star"); @@ -606,11 +606,7 @@ document_interface_document_set_display_area (DocumentInterface *doc_interface, { SPDesktop *desk = doc_interface->target.getDesktop(); g_return_val_if_fail(ensure_desktop_valid(desk, error), FALSE); - desk->set_display_area (x0, - y0, - x1, - y1, - border, false); + desk->set_display_area (Geom::Rect( Geom::Point(x0,y0), Geom::Point(x1,y1)), border, false ); return TRUE; } @@ -713,7 +709,7 @@ document_interface_move (DocumentInterface *doc_interface, gchar *name, gdouble std::vector<SPObject*> oldsel = selection_swap(doc_interface->target.getSelection(), name, error); if (oldsel.empty()) return FALSE; - sp_selection_move (doc_interface->target.getSelection(), x, 0 - y); + doc_interface->target.getSelection()->move(x, 0 - y); selection_restore(doc_interface->target.getSelection(), oldsel); return TRUE; } @@ -726,7 +722,7 @@ document_interface_move_to (DocumentInterface *doc_interface, gchar *name, gdoub if (oldsel.empty()) return FALSE; Inkscape::Selection * sel = doc_interface->target.getSelection(); - sp_selection_move (doc_interface->target.getSelection(), x - selection_get_center_x(sel), + doc_interface->target.getSelection()->move(x - selection_get_center_x(sel), 0 - (y - selection_get_center_y(sel))); selection_restore(doc_interface->target.getSelection(), oldsel); return TRUE; @@ -1087,14 +1083,14 @@ void document_interface_update(DocumentInterface *doc_interface, GError ** error gboolean document_interface_selection_get(DocumentInterface *doc_interface, char ***out, GError ** /*error*/) { Inkscape::Selection * sel = doc_interface->target.getSelection(); - std::vector<SPObject*> oldsel = sel->list(); + auto oldsel = sel->objects(); int size = oldsel.size(); *out = g_new0 (char *, size + 1); int i = 0; - for (std::vector<SPObject*>::iterator iter = oldsel.begin(), e = oldsel.end(); iter != e; ++iter) { + for (auto iter = oldsel.begin(); iter != oldsel.end(); ++iter) { (*out)[i] = g_strdup((*iter)->getId()); i++; } @@ -1150,7 +1146,7 @@ document_interface_selection_set_list (DocumentInterface *doc_interface, gboolean document_interface_selection_rotate(DocumentInterface *doc_interface, int angle, GError ** /*error*/) { Inkscape::Selection *selection = doc_interface->target.getSelection(); - sp_selection_rotate(selection, angle); + selection->rotate(angle); return TRUE; } @@ -1235,13 +1231,13 @@ gboolean document_interface_selection_scale(DocumentInterface *doc_interface, gd { return FALSE; } - sp_selection_scale (selection, grow); + selection->scale(grow); return TRUE; } gboolean document_interface_selection_move(DocumentInterface *doc_interface, gdouble x, gdouble y, GError ** /*error*/) { - sp_selection_move(doc_interface->target.getSelection(), x, 0 - y); //switching coordinate systems. + doc_interface->target.getSelection()->move(x, 0 - y); //switching coordinate systems. return TRUE; } @@ -1252,7 +1248,7 @@ gboolean document_interface_selection_move_to(DocumentInterface *doc_interface, Geom::OptRect sel_bbox = sel->visualBounds(); if (sel_bbox) { Geom::Point m( x - selection_get_center_x(sel) , 0 - (y - selection_get_center_y(sel)) ); - sp_selection_move_relative(sel, m, true); + sel->moveRelative(m, true); } return TRUE; } @@ -1279,8 +1275,8 @@ document_interface_selection_move_to_layer (DocumentInterface *doc_interface, return FALSE; if (strcmp("layer", (next->getRepr())->attribute("inkscape:groupmode")) == 0) { - - sp_selection_cut(dt); + + dt->selection->cut(); doc_interface->target.getSelection()->layers()->setCurrentLayer(next); |
