connector object support for dbus

Bug #787810 reported by joakim@verona.se
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Wishlist
Unassigned

Bug Description

I want to add a dbus function to create connector objects.
I think makeconnector(A, B) where A and B are objects will be sufficient

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Wishlist
tags: added: connectors dbus
removed: wishlist
Revision history for this message
jazzynico (jazzynico) wrote :

Please do ;)

Changed in inkscape:
status: New → Triaged
Revision history for this message
joakim@verona.se (joakim-verona) wrote :

It turns out you can make do with the existing dbus support as exemplified below.
The only non-obvious part was that the defailt style for dbus didnt work for connectors.
Thus, I think this bug can be closed, and maybe a new bug created regarding the default style used
when dbus creates objects. but I dont really know how to describe it better atm.

(defun inkmacs-connector (start-id stop-id)
  "make a connector from object with start-id to stop-id."
  (let* ((path (inkdoc-line (inkscape-desktop) 0 0 100 100))) ;;the coords arent important
    (inkdoc-set-attribute (inkscape-desktop) path "inkscape:connection-start" (concat "#" start-id))
    (inkdoc-set-attribute (inkscape-desktop) path "inkscape:connection-start-point" "d4")
    (inkdoc-set-attribute (inkscape-desktop) path "inkscape:connection-end" (concat "#" stop-id))
    (inkdoc-set-attribute (inkscape-desktop) path "inkscape:connection-end-point" "d4")
    (inkdoc-set-attribute (inkscape-desktop) path "inkscape:connector-type" "polyline")
    (inkdoc-set-attribute (inkscape-desktop) path "style"
                          "fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
                          )
    )
  )

Revision history for this message
joakim@verona.se (joakim-verona) wrote :

I think this can be closed

Revision history for this message
su_v (suv-lp) wrote :

Closing as requested by the reporter. Please reopen if you think this was done in error.

Changed in inkscape:
status: Triaged → Invalid
su_v (suv-lp)
tags: added: dbusapi
removed: dbus
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.