Re: Features

2020-08-08 Thread Hans Breuer


> Am 08.08.2020 um 10:33 schrieb Zander Brown :
> 
> Hey Emmanuel
> 
> Some interesting ideas
> 
> Must admit (1) was already something I'd thought of, unfortunately with the 
> current architecture it's not
> actually that simple to do
> 
Did it change already? IIRC Find was working for quite some time:

https://gitlab.gnome.org/search?utf8=✓=Find%26Replace_id=8_id=1788=_code=true=false_ref=master_source=navbar

> If you open some feature request[s] at 
> https://gitlab.gnome.org/GNOME/dia/-/issues/new 
>  I can't promise
> they'll ever happen but at least it won't be lost & forgotten in mailing list 
> archives
> 
> Zander
> 
> -- 
> Zander Brown mailto:zbr...@gnome.org>>
> 
> Maintainer:
>   Dia Diagram Editor
>   King's Cross / KGX
>   GNOME Design Tooling (Icon Preview, Colour Palette)
> 
> Co-Maintainer:
>   GNOME Clocks
> 
> en_GB Translation Team
> 
> Me ≢ GNOME
> 
> 
> 
> On Thu, 2020-08-06 at 09:08 -0600, Emmanuel Bustos via dia-list wrote:
>> Hi! I downloaded Dia a couple of days ago and I'm really glad to see yet 
>> another incredible free tool out there!
>> 
>> There's a couple of features that I'd like to know if are in your plans:
>> 
>> 1 - Search tool for diagram components in the app: This shouldn't be too 
>> hard to implement and it would drastically improve the workflow.
>> 2 - Object relative snapping: It would be great to enable objects snapping 
>> between themselves. This would provide a much easier way of aligning items 
>> like in Visio for example.
>> 3 - Relative object aligning: This would be incredibly useful. I find myself 
>> constantly needing this feature. For example, if I had 3 objects vertically 
>> aligned and distributed and I wanted to align another object with the middle 
>> one, I should have a "vertically/horizontally align object 4 with object 2" 
>> type of option, which would align object for without affecting the other 3 
>> objects alignment and distribution.
>> 
>> Thank you for the awesome program!
>> ___
>> dia-list mailing list
>> dia-list@gnome.org
>>  
>> https://mail.gnome.org/mailman/listinfo/dia-list
>>  
>> FAQ at 
>> http://live.gnome.org/Dia/Faq
>>  
>> Main page at 
>> http://live.gnome.org/Dia
>>  
>> 
> ___
> dia-list mailing list
> dia-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
> 

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Do you have a diagram of DIA itself for me to study

2020-06-07 Thread Hans Breuer

> Am 06.06.2020 um 15:46 schrieb Asad Chaudhry via dia-list 
> :
> 
> Do you have a diagram of DIA itself for me to study

See https://gitlab.gnome.org/GNOME/dia/-/tree/master/samples/Self 


HTH,
Hans___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: GTK difference git and 0.97.3 release

2017-01-09 Thread Hans Breuer

> Am 09.01.2017 um 00:19 schrieb myken :
> 
> Hello List,
> 
> Sorry for the cryptic subject.
> I have been trying to recompile dia from git but I get a real big difference 
> in the dialog/properties windows (e.g table from the database sheet) between 
> the git-compiled and the 0.97.3-compiled executable.
> 
Due to 
https://git.gnome.org/browse/dia/commit/?id=84630526edb8fc915809da07887b761dd3526983
 


> When I recompile from the released 0.97.3 tarball I get a really nice small 
> checkbox [] for the boolean variables.
> But when I recompile from git I get a big ugly on/off button in my properties 
> dialog widget for the same boolean variables.
If you want something much more similar to the 0.97.3 release you should not 
build from master, but build from the dia-0-97 branch instead.

> 
> My impression is that usually the git version has the more advanced options, 
> so I must be doing something wrong.
Much work on Dia master was put into simplifying and reducing the code. There 
are also some more features, and the rendering infrastructure is advanced.
 
> Question: how do I compile from git and still get the nice small checkboxes 
> in the properties widget?
As said above, use the dia-0-97 branch.

> 
> Any help is greatly appreciated.
HTH,
Hans

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia DTD's location? (And some related ramblings.)

2016-02-15 Thread Hans Breuer
Hi Andrey,
> Am 15.02.2016 um 08:13 schrieb Andrey Repin :
> 
> Greetings, All!
> 
> I've been toying around with XML parsing, and I've used Dia shape as a guinea
> pig. This gave me some ideas, but first, a question:
> Where's the Dia DTD's are located nowadays?
https://git.gnome.org/browse/dia/tree/doc/shape.dtd

> http://www.daa.com.au/~james/dia-shape-ns seems to be down, and has been down
> for quite a while.
Yes.

> Now, to the shapes themselves.
> I think, people subscribed to the list had seen this (well, similar) one
> 
> http://www.daa.com.au/~james/dia-shape-ns;
>xmlns:dia="http://www.daa.com.au/~james/dia-shape-ns;
>xmlns:svg="http://www.w3.org/2000/svg;>
>  Custom - Styles mix
>  
>  dia:style="stroke: foreground;"
>  svg:style="fill: yellow; fill-opacity: 255; stroke-width: 0.1; 
> stroke-dasharray: 1 0.75; stroke-dashoffset: .5;"
>  cx="1.5" cy="1.5" r="0.5"/>
>  
> 
> 
> This was posted as a proposed concept to the request about separating
> decoration colors from diagram object properties.
Apparently I missed that discussion or can’t remember it…

> Now, how about this one?
> 
> 
>  "http://www.daa.com.au/~james/dia-shape-ns;>
> xmlns:dia="http://www.daa.com.au/~james/dia-shape-ns;
>xmlns:svg="http://www.w3.org/2000/svg;>
> 
>  Custom - Styles mix
> 
>  
> 
>  
>  dia:style="stroke: foreground;"
>  svg:style="fill: yellow; fill-opacity: 255; stroke-width: 0.1; 
> stroke-dasharray: 1 0.75; stroke-dashoffset: .5;"
>  cx="1.5" cy="1.5" r="0.5"/>
>  
> 
> 
> 
> Advantages are quite many.
> 1. Upfront valid XML.
> 2. Clear separation of object design from object attributes.
> 3. Embedded scripting! Seriously. XML lets you embed parsing instructions!
> 
Sorry, I don’t understand any of your proposed advantages.

Greetings,
Hans

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: DIA extend properties

2015-04-04 Thread Hans Breuer

Am 01.04.2015 um 19:21 schrieb Yosua Alvin Adi Soetrisno:

Let me introduce myself I'm Yosua from Gadjah Mada University, I'm still on
progress working my master thesis. I'd like to develop OpenERP module based
on DIA OpenERP Interface.
After some googling I still don't know what Dia OpenERP interface you are 
referring to. IIRC once upon a time there was some EERP plug-in with Dia, 
but it had to be removed for license reasons.


The other thing I've found is a blog entry talking about a Dia plug-in 
installation _for_ OpenERP [1]. This seems to be interfacing Dia's

UML - CLass (the most complex object with Dia).


My problem is I can't extend default object
properties with custom data type like properties list.

Custom data types are only working for shapes, not for built-in objects
(again IIRC).


I want to ask how to  compile DIA with make, but there is some
customization in dispcallback.c  with include Python.h,

Did compilation work for you before you made your modification?
If so you might need some extra includes and libs in app/Makefile.am
to make your modification compile and link.
See plug-ins/python/Makefile.am for Python inclusion and linking.

A better solution would be to follow the existing design:
 - Python _scripts_ to be registered/invoked by the PyDia plug-in
   (see plug-ins/python/*.py for some working scripts)


i want to extend some right click properties with
custom Python GTK Window, so i linked it with C script

If this is just for your local version: happy hacking ;)

But if you want to contribute your modification back to the community you 
should take a different approach:

 - only the PyDia plug-in shall include Python headers and link Python libs
 - use the existing mechanism to register PyDia plug-ins dynamically
   - call dia.register_action() in your script
   - place the script into one of the python directories created
 during installation (i.e. ~/.dia/python IIRC)


Thanks before, I've referenced by Lars Causen to ask in mailing list
Welcome to Dia development. Don't hesitate to ask for further details if 
the source code or it's documentation are unclear.



Regards Yosua Alvin

HTH,
Hans

[1] 
http://fheopenerp.blogspot.de/2011/09/dia-plug-in-installation-for-openerp-6.html


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: dia-list Digest, Vol 131, Issue 5

2015-04-03 Thread Hans Breuer

Am 25.03.2015 um 00:21 schrieb Elijah Wagers:

Remove from list please.


Done.

Good bye,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Adding a Python dependency to app/* (was: Re: dia-list Digest, Vol 132, Issue 2)

2015-04-03 Thread Hans Breuer
First of all: please try to be specific in the subject line as proposed in 
the digest mail you got and cited:


 On Apr 3, 2015 7:00 PM, dia-list-requ...@gnome.org
 mailto:dia-list-requ...@gnome.org wrote:
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of dia-list digest...

Am 03.04.2015 um 14:59 schrieb Yosua Alvin Adi Soetrisno:

I've installed python2-dev, but i haven't try python3-dev, i use ubuntu
12.04, outside dia folder i have been succeed to compile c file with gcc,
but when code inserted inside commands.c in folder dia/app, make have error
like commands.c:17:20: fatal error: Python.h: No such file or directory,
Must i installed python3-dev?

To me this does not look like a missing package, but just a missing 
include. dia/app/Makefile.am is not prepared to just

#include Python.h

With Dia's source code dependencies are organized: only the PyDia plug-in 
(plug-ins/python/*) should include Python.h so that Dia core can be built 
without Python.


If you still insist to put your modification into app/disp_callbacks.c - 
you have to adpat app/Makefile.am to provide the Python include path. You 
could use the file plug-ins/python/Makefile.am as example.


But please be aware that a direct dependency from app/* to Python will 
disqualify your modification for upstream inclusion.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: svg:transform rotate

2015-03-16 Thread Hans Breuer

Am 16.03.2015 um 03:07 schrieb Andrey Repin:

Greetings, Hans Breuer!

But with master you can load the respective SVG and export it as shape to
get the desired effect (see attachement).


I've got around it by using svg:path. However, the z command is not executed
correctly, leaving a visual gap in place of the joint.

Gap confirmed with dia-0-97 branch and GDK renderer. One benefit of the big 
renderer interface change on master is preserving the close information. 
Formerly only Renderer::fill_bezier() was known to be closed, while 
Renderer::draw_bezier() was used for closed or open stroking. Now there is 
Renderer::draw_beziergon() to stroke and/or fill.


 [...]

However, there's another problem with this shape.
1. I can't seem to make it 3x3, even if I add a background r=1.5 circle, the
resulting shape is a little thinner. Is this, perhaps, because ellipse is a
little taller than 3 units?

Good guess, but it works for me with current master and the r=1.5 circle.


2. How can I override the line colors and styles for certain elements of the
shape?
Again this works for me with master. Setting shape colors is certainly 
possible with dia-0-97 as well, but I can confirm the lack of color with 
the released version and your shape. It is because of a deficiency 
extracting the color name from the style string. Two workarounds:

 1) use numeric color representation
 2) use stand-alone fill/stroke attributes


3. When double-clicking the shape, I'm unable to set default line thickness.
And it always revert to 10mm on each new Dia start. With whole shape being
~30mm... kind of not the visual I'm aiming for. Is this something that can be
worked around?

With master the kludge would be to get rid of the stroke-width by using a 
path with hole. For dia-0-97 I dont know a solution as explained in 
https://mail.gnome.org/archives/dia-list/2008-July/msg00084.html


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: svg:transform rotate

2015-03-15 Thread Hans Breuer

Am 15.03.2015 um 16:13 schrieb Andrey Repin:

Greetings, All!

Remind me please, do Dia support rotate() transformation in shape definitions?
No it does not. And I shall update the documentation [1] and dtd [2] if it 
will do.



What I'm trying to achieve is basically this:

But with master you can load the respective SVG and export it as shape to 
get the desired effect (see attachement).



   svg:svg
 svg:ellipse style=fill: background; fill-opacity: 255; stroke: foreground; 
stroke-width: 1;
   cx=1.5 cy=1.5 rx=1.5 ry=1.0
   svg:transform=rotate(-30)/
 svg:circle style=fill: background; fill-opacity: 255; stroke: foreground; 
stroke-width: 0.1;
   cx=1.5 cy=1.5 r=0.5/
   /svg:svg


HTH,
Hans

[1] https://git.gnome.org/browse/dia/log/doc/custom-shapes
[2] https://git.gnome.org/browse/dia/log/doc/shape.dtd

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
?xml version=1.0 encoding=UTF-8?
shape xmlns=http://www.daa.com.au/~james/dia-shape-ns; xmlns:svg=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink;
  nameSamples - rotated-ellipse/name
  iconrotated-ellipse.png/icon
  connections
point x=1.55096 y=3.25096/
point x=1.55096 y=2.25096/
point x=1.05096 y=2.75096/
point x=2.05096 y=2.75096/
  /connections
  aspectratio type=fixed/
  svg:svg
svg:path style=fill: #ff; fill-opacity: 255; stroke-opacity: 1; stroke-width: 1; stroke: #00 fill-rule=evenodd d=M 1.6 0.933975 C 2.31447,0.521475 3.12404,0.573686 3.39904,1.05 C 3.67404,1.52631 3.31447,2.25353 2.6,2.66603 C 1.88553,3.07853 1.07596,3.02631 0.800962,2.55 C 0.525962,2.07369 0.885529,1.34647 1.6,0.933975z/
svg:ellipse style=fill: #ff; fill-opacity: 1; stroke-opacity: 1; stroke-width: 0.1; stroke: #00 cx=1.55096 cy=2.75096 rx=0.5 ry=0.5/
  /svg:svg
/shape
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Rotation support (was: Re: DIA function)

2015-03-12 Thread Hans Breuer

Am 06.03.2015 um 09:57 schrieb T.Tetzner:

Hello to all,

I work for several weeks with DIA and I pretty much love it. Mainly I
create PID s. There is only one feature I really miss: The possibility to
turn/spin elements and text in angle you need.
Object rotation is a long-time requested feature which made some progress 
in recent years, see:

https://git.gnome.org/browse/dia/log/?qt=grepq=\[transform\]
for the current capabilities.

One of the implemented features is indeed a rotation angle for the 
'Standard - Text' element. But general rotation of all elements still has 
significant constraints, e.g.:

 - objects in rotated groups loose their connectability
 - to preserve connectability (and meaning of connection point directions
   used for autorouting) objects get an angle property on a case-by-case
   basis. Currently only Standard - * objects plus Group have it.
 - only few renderers support native rotation/transformation. For others
   rotated text is automatically converted to outlines with the help of
   (Pango)Cairo
 - text rotation with direct Pango/Freetype is not implemented (yet?)
   To get the best working version use './configure --disable-freetype'.


That means if I construct a
new component I have to create a horizontal and vertical version to my own
database.

Are you asking for something like Flip Diagonal in the context menu of 
shapes (similar to the exisiting Flip Horizontal and Flip Vertical)?



Maybe it is possible to include that feature.


Patches accepted :-)


In general I love your program. I will donate a amount via PayPal to you.
If you want I could send to you an example of my work with DIA.

Interesting diagrams used to illustrate the issue at hand are always 
welcome. Of course they should not be confidential, because this is a 
public mailing list.


Happy diagramming,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia für Yosemite

2015-01-30 Thread Hans Breuer

Am 30.01.2015 um 21:06 schrieb Tomas Pospisek:

Am 29.01.2015 um 06:50 schrieb Erich Cerny:

Benötige DIA für Mac OS 10.10.2


Erster Treffer, wenn ich im Internet (ddg) nach dia drawing mac suche.

In english: first hit when I search the internet (ddg) for dia drawing
mac.
*t

With the keywords you give that's leading to dia-installer.de, but there is 
an often reported problem with Dia on Yosemite, see this list or bugzilla: 
https://bugzilla.gnome.org/show_bug.cgi?id=738657


The much simpler search: Dia Yosemite
gives 
http://navkirats.blogspot.de/2014/10/dia-diagram-mac-osx-yosemite-fix-i-use.html


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-25 Thread Hans Breuer

Am 23.01.2015 um 22:09 schrieb Paul Chavent:

On 01/22/2015 09:19 PM, Hans Breuer wrote:

Am 18.01.2015 um 22:36 schrieb Paul Chavent:
[...]

3) the hardcoded SOZI_PATH wont work with free installation path

I've tested with the configure option --with-sozi-path= pointing to a
 path that contains the sozi player files (sozi.version sozi.js
sozi_extras_media.js and sozi.css). It works as expected. However, i've
changed the messages to be more concise in case of failure.


This is not what I meant. A fixed path at compile time is only working on
Unix. For Windows and OS X the user can install the packages is a
directory of his choice. Plug-in and configutation placement is deduced
at runtime from relative paths, see e.g. usage of dia_get_data_directory().


I'm not sure that the user would like to give a path relative to the Sozi
installation path.
We have to diffferentiate between the compiling user and the installer 
user. The latter does not run configure at all, even the former might not 
try out all those obscure configure options ;)



The sozi-path should be the installation path to the
Sozi player that will probably be independent of the Dia path.

Sure, but that's not the point I was trying to make. IMHO the question is, 
if we want to provide the installer user a way to update the Sozi player 
version to use without getting a new version of Dia.



For instance : ./configure --prefix=/usr/local
--with-sozi-path=/home/work/sozi/build/player

Do you think that we should constrain the user to put the Sozi player files
in a plugin subdirectory of the Dia installation path ?


For the compiling user I'm fine with what there is.


In this case, I remove the configure option, the code checks in the Dia
installation path the player files, and it fallbacks to the internal player
if they are not present.

I think you added the option because it was useful for you. I dont know if 
and how the Sozi files are typically installed.



What is your suggestion ?

Maybe adapt the code to work with and without the definition of SOZI_PATH. 
In the latter case use somethinh like

  path = dia_get_data_directory(Sozi G_DIR_SEPARATOR_S sozi.version);

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-22 Thread Hans Breuer

Am 18.01.2015 um 22:36 schrieb Paul Chavent:
[...]

OK, but the stuff within defined(SOZI_PATH) should be revisited for
three reasons: 1) if all external files would be missing there will
be four message_error()

Not sure. The loop breaks upon first failure.

You are right, I've should have read more than the patch.


2) the external_sozi array is sized wrong, best leave out the size

Thanks, fixed.

3) the hardcoded SOZI_PATH wont work with free installation path

I've tested with the configure option --with-sozi-path= pointing to a
 path that contains the sozi player files (sozi.version sozi.js
sozi_extras_media.js and sozi.css). It works as expected. However, i've
changed the messages to be more concise in case of failure.

This is not what I meant. A fixed path at compile time is only working on 
Unix. For Windows and OS X the user can install the packages is a directory 
of his choice. Plug-in and configutation placement is deduced at runtime 
from relative paths, see e.g. usage of dia_get_data_directory().



I've pushed the changes :
https://gitorious.org/dia_sozi/dia_sozi/commit/75054ca492e854b4744dbecb21a8b667a3253f35


Pushed to master.

Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: [import Network file configurations]

2015-01-22 Thread Hans Breuer

Am 19.01.2015 um 12:18 schrieb Dominique Charny:

HI, everybody
Our aim is(was)  to import Network file configurations  ( nodes  vertices)
to be able to
- draw in Dia the Network
- re-arrange even manually  layout
- add eventual Python scripting to proceed analysis and redrawing

First attempts to import Pajek-analysis-Tool ( free but not open) outputs
to Dia   were realized through  svg, but without connectors it's a mess to
reconnect vertice,node,and Name to be able to move then consistently and
impossible with more than hundred nodes.
So it was investigated Dia Python console to create from Pajek.file(Network
topology Nodes + arcs) the  Network in DIA. Unfortunately if we did get the
way to create Object, no solution was found  in the creation process to
initiate object attribute  with   a minimum of one requested Text property.


Not sure what you are asking for:
 1) a visible text for every object you choose?
   At some point in time I was experimenting with a label property,
   if someone is interested to finish that work I can provide a patch.
 2) an invisible text property (an ID you could manage)?
   Already there with Dia 0.97.x - just no user interface, see e.g.:
   https://mail.gnome.org/archives/dia-list/2014-January/msg5.html


So it was tested to create objects(Texts) manually, group them and  python
write  Text-property from one to another.
Systematically the Dia appli crashed  GDBus .error.ServiceUnkown: The
name org.gnome.SessionManager was not provided by any .service file  
Without the crashing code I wont start debugging. Dia is not using GDBus 
directly, so the reason is elsewhere.



  .Same operations were successful with visible properties.

For the moment the work has been postponed.
2 kinds of questions
- for future would it be possible to initiate object property at python
creation ?
Again I'm not sure if I understand the question. Do you want construction 
time parameters for Dia objects?



Anything foreseen to assign Unique ID at object creation as new
properties?
If you want user defined IDs see above. It is not planned (at least not by 
me) to add some additional unique ID to Dia properties. But given that 
every Dia object has a unique address, maybe you can use that?



- presently and for our Network objective, are there any other ways to go
deeply inside with the current DiA version
Sorry I don't understand your meaning of going deeply inside, but I think 
creating an import filter for network  diagram creation is possible. You 
may want to take a look at existing PyDia plug-ins, e.g.:

https://git.gnome.org/browse/dia/tree/plug-ins/python/dot2dia.py


Thanks a lot for your answers

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-16 Thread Hans Breuer

Am 15.01.2015 um 23:44 schrieb Paul Chavent:

On 01/14/2015 09:40 PM, Hans Breuer wrote:

[...]
Please reconsider the importance of the message first. IMHO dumping
random stuff to the console is almost never a good idea.

The message should be less verbose now.

OK, but the stuff within defined(SOZI_PATH) should be revisited for three 
reasons:

 1) if all external files would be missing there will be
four message_error()
 2) the external_sozi array is sized wrong, best leave out the size
 3) the hardcoded SOZI_PATH wont work with free installation path


[...]
Now I see rotation to be also implemented by move_handle modifiers. I've
experimented with more advanced move_handle functionality with Standard
- Path and basically dropped all these to make it work properly. See:
 git log lib/standard-path.c

I feel very unconfortable with the context menu for controling the
rotation. I feel better with the shift key for smoothly controling the
rotation.
So, i suggest a patch that adds the modifier parameter to the move_handle
undo context.


OK, nice idea by the way ;-)

 [...]

  - together with the fix for move_handle() this makes Sozi object
creation much more natural

yes

I pushed 3 new patches
https://gitorious.org/dia_sozi/dia_sozi/commits/02b2793d14aabf925e81389d9547577e9510253a


Now pushed to master.

Thanks,
Hans
 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-10 Thread Hans Breuer

Hi Paul,
Am 10.01.2015 um 00:09 schrieb Paul Chavent:
 On 01/08/2015 11:24 PM, Hans Breuer wrote:
 Am 05.01.2015 um 15:47 schrieb Paul Chavent:

[...]
The media allows to insert video/audio in a presentation. I haven't
extensively tested this object yet.


Me neither. If it does not work out the single Sozi - Frame might need
to get moved back to the Misc sheet?

Indeed, the initial design (one Sozi - Frame on the Misc sheet) was simpler.

Then, I had the choice between :
  - add an option in the Sozi - Frame to behave like a media object
  - add a new object Sozi - Media to clearly separate the two
functionalities.
I feel better with the second choice.


Fine with me, if ...

The current solution is far from being perfect, but the media frame is a
feature i would like to use in the future.

... that future is going to happen before the next release (whenever that 
comes;)). I'm just a bit reluctant to add source code labeled untested 
and future use ;-)



I join a patch that should fix a bug and you can find an integration of a
video in your example here :
http://paul.chavent.free.fr/sozi/render-test-sozi.svg (frame 12)

Interesting. But how do I interact with the video when all clicks are 
consumed by the sozi player?



If you think that the media frame will never be used, i can revert the
design and move the Sozi - Frame in the Misc sheet.
However i would like to test this feature in the meantime. I only have a
problem with the url of the video when it is a relative path and that the
presentation is pushed on a server (it works on a local filesystem).

Maybe you should use dia_relativize_filename() like 
objects/standard/image.c and lib/diasvgrenderer.c ?



Please tell me if you prefer to totally ignore the media frame.
I'm fine with it in the first version. We can postpone the decision until 
shortly before the next release.



So far I've only found minor issues, so this basically looks
ready to push to master.

Issues found so far:
   - sozi-frame copy does not copy properties like text color

I will fix this issue.

Maybe just an object_copy_props() in the copy methods is missing?


   - apparently bounding box calculation is not completely correct
 with rotation (try to rubber-band selecting sozi-frame #6)

I don't understand how to rubber-band and how to reproduce what you mean.

   - with sozi-frame

?
To select sozi-frame #6 in the file it is not possile to simply click on 
it, because that frame is completly covered by #12 and #7. To select #6 on 
the canvas click outside of all objects on the canvas, left to #6 and drag 
the rubber-band until it completley includes #6, but no other object on 
that layer. When releasing the mouse button #6 should get selected.
If it does not either the rectangle was too small to cover the whole 
bounding box or the bounding box was miscalculated. I assume the later.


[...]

  - automatic sequence number generation [4]
= Same as before, but should be acceptable for the first
   version included.

Yes i prefer to help the user to maintain the sequence consistent. About
the fact that the update is done after, selecting other frames, i would
like to improve this but i don't know how. Perhaps you could suggest me how
to redraw an object (see
https://gitorious.org/dia_sozi/dia_sozi/source/23d6d55818b3754bb345a74e89e94fe00ed2ac52:objects/Sozi/sozi-frame.c#L200)
?
A call to object_add_updates() would trigger the redraw, but it's not 
allowed to do that from outside of app/


Thinking some more about this:
 - what's upposed to happen with the sequence numbers after undo?



Did I miss something?


I will submit a new version when i will be sure to keep the media as is or
not.

As I said I'm fine with pushing what we currently have. It is probably more 
simple to improve from that common base. Any objections?



Thank you very much for your review.


Thanks for your contribution to Dia.

Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: dia-installer.de / Steffen Macke

2015-01-10 Thread Hans Breuer

Am 05.01.2015 um 23:27 schrieb Alejandro Imass:
[...]

If you don't find the sources not to worry. Maybe Steffen maintained in a
git repo somewhere. If you can find them better, If not, that doesn't
matter either. I'm sure I can reproduce the installer image from any recent
DMG file.

The installer scripts for Windows and Mac OS X are in the main repositiory, 
see: https://git.gnome.org/browse/dia/log/installer


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-10 Thread Hans Breuer

Am 10.01.2015 um 22:17 schrieb Paul Chavent:

On 01/10/2015 03:50 PM, Hans Breuer wrote:

As I said I'm fine with pushing what we currently have. It is probably
 more simple to improve from that common base. Any objections?

So, i suggest to submit patches that fix the bounding box issue, the
copy issue, the media issue, and label this new version as first common
base.

Not sure I understand, but it sounds like I will have to reset my local 
version once more. At least if you want to have all of the above in a 
single commit in dia master.
If this should become an almost perfect commit please include the necessary 
changes for objects/makefile.msc and lib/libdia.def, too.


BTW: the bounding box issue seems to be a no-issue. I've checked my 
assumption with environment variable DIA_RENDER_BOUNDIG_BOXES set.
Apparently I was confused by the (of course correct) inclusion of the label 
within the bounding box.


Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
diff --git a/lib/libdia.def b/lib/libdia.def
index 81d19c6..8d9b5b9 100644
--- a/lib/libdia.def
+++ b/lib/libdia.def
@@ -577,6 +577,7 @@ EXPORTS
  object_substitute
  object_toggle_prop
  object_unconnect
+ object_unconnect_all
 
  orthconn_add_segment
  orthconn_can_add_segment
diff --git a/objects/makefile.msc b/objects/makefile.msc
index 0ac96bf..286d846 100644
--- a/objects/makefile.msc
+++ b/objects/makefile.msc
@@ -2,7 +2,7 @@
 
 PLUGINS = aadl chronogram custom er flowchart fs grafcet \
Istar Jackson Kaos misc network sadt standard uml \
-   Database custom_lines
+   Database Sozi custom_lines
 
 #outdated: labels
 
@@ -115,6 +115,16 @@ OBJECTS = \
 PKG_LINK = $(PKG_LINK) 
 !ENDIF
 
+!IFDEF OBJ_Sozi
+OBJECTS = \
+   sozi.obj \
+   sozi-frame.obj \
+   sozi-media.obj \
+   sozi-object.obj
+PKG_LINK = $(PKG_LINK) $(LIBXML2_LIBS) \
+   $(GTK2_LIBS)
+!ENDIF
+
 !IFDEF OBJ_eml
 OBJECTS = \
dbox.obj \
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Sozi integration

2015-01-08 Thread Hans Breuer

Hi Paul,
Am 05.01.2015 um 15:47 schrieb Paul Chavent:

Hi

Following this old thread (http://marc.info/?t=13120999131r=1w=4), I
would like to re-submit a patch that brings Sozi
(http://sozi.baierouge.fr/wiki/en:welcome) to Dia.
[...]

The patch adds a Sozi sheet with Frame and Media objects.


Thanks for the resubmission. I've extracted the latest patch
from [1], reverted the deletion of doc/e?/dia.1 and committed
it to my local master. After small fixes to build on win32,
I've added a Sozi layer to render-test.dia (attached).


[...]
The media allows to insert video/audio in a presentation. I haven't
extensively tested this object yet.

Me neither. If it does not work out the single Sozi - Frame might need to 
get moved back to the Misc sheet?



[...]
Feel free to give any feedback if your are interested.


So far I've only found minor issues, so this basically looks
ready to push to master.

Issues found so far:
  - sozi-frame copy does not copy properties like text color
  - apparently bounding box calculation is not completely correct
with rotation (try to rubber-band selecting sozi-frame #6)
  - with sozi-frame

I've also revisited that old threads loose ends, namely:
 - sozi player as external dependency? [2]
   = OK: now solved as optional in configure.ac)
 - px as font size unit [3]
   = Seems not to be needed anymore?
 - automatic sequence number generation [4]
   = Same as before, but should be acceptable for the first
  version included.

Did I miss something?

Thanks,
Hans

[1] 
https://gitorious.org/dia_sozi/dia_sozi/commit/23d6d55818b3754bb345a74e89e94fe00ed2ac52.patch

[2] https://mail.gnome.org/archives/dia-list/2011-September/msg00044.html
[3] https://mail.gnome.org/archives/dia-list/2011-September/msg00174.html
[4] https://mail.gnome.org/archives/dia-list/2011-November/msg00025.html


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert


render-test-sozi.dia
Description: application/dia
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia will not load on MacOS X yosemite 10.10

2014-12-01 Thread Hans Breuer

Am 01.12.2014 um 19:05 schrieb Alejandro Imass:

On Mon, Nov 24, 2014 at 4:58 PM, Duane King duane.k...@duanefking.com
wrote:


[...]

How do I fix this so I can get some work done today?



Use MacPorts or Home brew and forget about binary distributions of Open
Source in general. Especially if you are using a Mac.


See also: https://bugzilla.gnome.org/show_bug.cgi?id=738657#c6

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia

2014-11-28 Thread Hans Breuer

Hi Edwin,
Am 25.11.2014 um 10:42 schrieb Eelman, Edwin (231439):

hi

I use the program dia for school, most of the time its in the mode for
Grafcet diagrams. i would like to help improve the program.
Welcome to Dia development. The first thing you should do to participate in 
discussions about Dia is subscribing to the mailing list:


https://mail.gnome.org/mailman/listinfo/dia-list


i found some things that can run a bit smoother. or maybe a stand alone program 
for
only grafcet. i hope u response on this mail. the improvements would be
better because lots of my class mates don't understood how it works but
its essential for lesson we follow ''control technology'' so you got a
clear view of the Grafcet diagram that we develop as a student.


Please be more specific with your improvements suggestions for GRAFCET.
Maybe also attach a diagram to check out the issues you describe. With that 
I can probably tell you something about feasibility and give you some 
pointers to the source code.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: background of DIA diagram

2014-11-16 Thread Hans Breuer

Am 16.11.2014 um 11:26 schrieb Vedran Vucic:

Hello,

I found how can I change color of DIA diagram background. But,  how to
make it transparent?

As Michael and Thomas already said transparency kind of depends on the 
context. If you want to look through your diagram window to your desktop 
that's even not possible with the current development version, which 
otherwise has much improved transparency support.


But if you want to export your diagram with a transparent background that's 
already possible with Dia 0.97.x, if you choose the right format. There is 
for example Cairo PNG (with alpha). Also the vector format filters (SVG, 
WMF, WPG, etc. pp.) usually don't draw the background.


If you want something else, please be more specific.
See also https://bugzilla.gnome.org/show_bug.cgi?id=591525#c16 about the 
reason to exclude transparency from the diagram background color.


Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia 0.97 Bug : Dash lenth in prinout.

2014-11-16 Thread Hans Breuer

Am 07.11.2014 um 10:04 schrieb Andreas Möller:


Hello

I don't have an account for BugZillar.
I found a bug similar to bug 172192
https://bugzilla.gnome.org/show_bug.cgi?id=172192


The fix to that bug was released in 2006 with Dia 0.95.


My Software:
Operating System Windows 7 64bit
DIAw.exe 0.97   32bit

My Bug:
Reproduction:
Draw three dashed Lines with different line length
First line: 1.,20 ; second line 0.60 ; third line 0.3

Safe and print the diagram

Expected:
Printout looks like screenshot.

Wrong behavior:
When printing dashed lines with different line length (dash length?)
The Printout interprets the dash length in another way than it is interpreted 
on screen.
Works for me with Dia master and 0.97.3, tested on win7/32. I've tested it 
with a real printer and PDFCreator printer driver



In the printout it seems that
the first line has a line length of 0.80 instead of 1.20 on screen
the second linehas a line length of 1.00 instead of 0.60 on screen
the third linehas a line length of 1.20 instead of 0.30 on screen

the shorter it is on screen the longer it is on printout!
Not according to my tests, so you should check if the concerned components 
are working properly.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: copy diagram

2014-11-16 Thread Hans Breuer

Am 03.11.2014 um 23:41 schrieb Sheehan, John T:

Hi folks, I am using copy diagram feature and only getting about 75%
of my diagram in the resulting clipped image. Is there a way to set
extents to encapsulate the entire diagram when copying diagram to clip
board?
The workaround I was using was adding an extra line to grow the diagram 
boundaries anticipating the clipping. Finally I've added a kludge to the 
export filter:


https://git.gnome.org/browse/dia/commit/?id=7bd505876c12ee6d83c5e7ffb73b4a9b085390ff

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Advanced options for custom shapes

2014-11-04 Thread Hans Breuer

Am 04.11.2014 um 07:42 schrieb Nico Rikken:

On Mon, 2014-11-03 at 23:57 +0100, Hans Breuer wrote:


As I said (or tried to say) neither the specification nor the
implementations is available yet.


But I could still make it work by writing objects in code for upstream
adoption, rather than just using the customs shapes objects. Just
choosing the right licence and offering a 'patch' should do the trick,
right?


Sorry I'm confused. The task at hand - as far as I've understood it - 
requires to write some code. Either with the custom shape module or with a 
new object plug-in. Upstream adaptions is indepndent of that.
As you say the wrong license is a blocker.  Also new objects have to pass 
the unit test, bring something new and desirable to Dia and need to be 
implemented with maintainable code. There is definitely at least one patch 
review before upstream adoption ;)


 This sheet would then be present in the object directory.

'Sheet' in Dia is just the 'index' for the user interface representation.
A sheet references object either implmented in C (in objects/ directory) or 
with XML in the shapes/ directory.


 [...]

Regards,
Hans
 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Group resizing isses

2014-11-03 Thread Hans Breuer

Am 02.11.2014 um 21:28 schrieb George Georgalis:

Hi Hans,

I've not had any additional group resize problems. The build from today
seems just fine too, my patched build script is attached.

Your attachement assume everyone wants to build Dia on Linux to /usr/local 
which for me certainly is not the case. Also it throws away alll the local 
changes, which certainly is not for everyone.
To make patch review more easy please use unified diffs and don't mix that 
with some custom shell code, but ...



I imagine variable re-size handles could be complex to integrate into
preferences, but everyone I've shared my handles/connection point size
increase patch with, has been very receptive. The size of these items does
have a real useability impact.
[... but] I'm not convinced of the real usability impact. For testing 
I've now changed the two sizes with my local version, too. Maybe I just 
need some time to get used to these;) Or I'm using Dia with a lower 
resolution than you.



Bigger connection points can clutter, but I
just un-enable them in the view menu when I'm not using them. Turns out,
not much toggle is required for most drawings. (but a kbd-shortcut would be
handy).

IMO the bigger handles are also cluttering the view. For the connection 
points I've left your background changes alone, because I don't want big 
white squares to disturb the appearance of ususally dark lines.



So, maybe there is a solution? An easier way to integrate the feature into
preferences for release versions might be through a toggle vs variable
option. Would you be open to adding a small, medium, large handle size
option in preferences?
Currently I dont like the visual change you propose and so I dont even 
think it should be user configurable.



If so, I would be willing to write some pseudo code to add the option. 
Interested?

Adding a preference is so easy that pseudo code wont be necessary for me. 
See 
https://git.gnome.org/browse/dia/commit/?id=f9630dab780d947695c048b99fcf1d0678b725e0 
for an example if you want to do it for your version.


Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Advanced options for custom shapes

2014-11-03 Thread Hans Breuer

Am 03.11.2014 um 21:03 schrieb Nico Rikken:

Dear Hans Breuer,

Thanks for your reply.


This would require some extension to the custom shape specification [1] and
the custom shape module [2]. A simple solution could be to define an enum
with the shape and use that for conditional rendering of subshapes. This
wont give an extra dialog, but just another option with the standard
properties.


As I tried to put forward in my email I have experimented with custom
shapes, although I wasn't aware of the enum functionality.
As I said (or tried to say) neither the specification nor the 
implementations is available yet.



Observing the UML objects (especially the class) in the source code has

 shown me the incredible number of possibilities for adding options.
Please be aware that the UML - Class object is the last thing you should 
use as an example. It is the last object implementation which does have 
custom GUI code and a lot of that is using deprecated GTK+ stuff.
All other objects get there user interface through the standard properties 
system.


 [...]


If I understand correctly this is a special case of 1)? But here one might
consider to use the SVG switch element [3], which looks to be too limited
for the generic case. But again some specification and implementation
updated would be involved.


I wasn't able to find any switch statement in the code (grep),
Yes, again I was talking about the design, but one probably to be rejected. 
At least my reading of the SVG specs makes the switch element probably too 
limited for the use case at hand.
BTW: you wont find any of the used SVG tags by greping for e.g. g because 
Dia is passing the 'undecorated' tags to the underlying XML library.



so I
assume this would imply not only an element for each shape, but also the
necessary parsing in the code to properly handle this functionality.
That seems to require to much effort, especially for a questionable
usability feature.


So no switch ;)


This kind of flexibility is IMO out of scope for the custom shape
mechanism. But an an object implementation in C could achieve something
like that. See e.g. Network - Bus for an example [4].


Another good example. The Connection point in Electrical would be a more
simple way of achieving similar drawing capabilities, but the network
bus with some modifications would be a great alternative.


Custom shapes are always scaled so the underlying size does not matter
match. If you are creating your shapes with the help of Dia's shape
exporter typical diagram sizes should be used.


The main reason for asking was the consideration of the relative line
thickness when designing shapes. Then again line thickness can be
defined by the user.

This is a known weakness of the current shape specification. I've tried to 
reverse engineer what's currently implemented some while ago:

https://mail.gnome.org/archives/dia-list/2008-July/msg00084.html

But IIRC nothing was changes due to the huge amount of exisiting shapes.

 [...]

If I've understood your requirments correctly some coding woud be
inevitable. Don't hesitate to discuss the design on this list first ;-)


Great, I'll start by preparing a set of icons I would like to implement
and the various options, to better discuss the way of implementing.

Sketching the desired shapes with an annotated diagram looks like a good 
basis for discussion.


Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Advanced options for custom shapes

2014-11-02 Thread Hans Breuer

Am 01.11.2014 um 09:54 schrieb Nico Rikken:

Dear Dia users and contributors,

I spend some bits of my time working on a sheet of power system symbols.
The supplied electrical sheets ('Electric 2') fall short on this topic,
and since I like using Dia, I thought I should make this contribution
for myself and others.

I started with a regular Dia sheet to get a sense of the task ahead, and
in parallel I've started an attempt to create a UI-design sheet, which
is currently way over ambitious due to the way elements need to respond
to transformation (so maybe in the future).

Having made these baby-steps, I have a couple of questions I'd like to
have sorted out to make sure I'll be doing it the right way:

1) Can I have custom elements with options? Just a transformer can have
several symbols distinguishing between the types. I'd like to just place
a transformer and use a dialogue box for selecting the type, thereby
reducing the complexity of the sheet for the regular user but providing
advanced options for the professional.

This would require some extension to the custom shape specification [1] and 
the custom shape module [2]. A simple solution could be to define an enum 
with the shape and use that for conditional rendering of subshapes. This 
wont give an extra dialog, but just another option with the standard 
properties.



2) There are several drawing standards associated with power systems
symbols. Of course I can just select one, but I was curious if it would
be possible to have a main selector to switch between a symbol standard
which just changes the appearance of all the power system shapes.

If I understand correctly this is a special case of 1)? But here one might 
consider to use the SVG switch element [3], which looks to be too limited 
for the generic case. But again some specification and implementation 
updated would be involved.



3) I have a particular question regarding drawing a busbar, which
connects the main conductor(s) to the conductors for distribution. Often
times the busbar is illustrated by a thick line, but should be drawn
differently depending on the level of abstraction. In the case of a
system with a double busbar round dots, either white or black, indicate
to which of the busbars the conductor is typically connected. But how to
cope with this flexibility?
  I see no issue in having two separate shapes for both 'types' of
busbar, but ideally I would be able to have a thick line element for the
bus bar, which has several connectors for the conductors to connect to,
and in the case of the double busbar indicate the state of the
connection by using dots. But how would I deal with such an element?
Especially since the length can vary and the number of connections can
vary, but of course these elements should be aligned properly in
accordance to other elements in the drawing.
This kind of flexibility is IMO out of scope for the custom shape 
mechanism. But an an object implementation in C could achieve something 
like that. See e.g. Network - Bus for an example [4].



  Another option would be to have elements for the connection nodes of
the busbar, but then the user would have to draw lines to continue the
busbar, which as far as I know would require the user to manually select
the thickness of these lines according to the busbar element, which
would present a hassle and can lead to errors.

4) Lastly I have a more trivial question regarding the normal size of
elements. I've now modelled the size to be 2x2 regular squares (normal
view when opening Dia) but I'm wondering if there are any handles on a
preferred regular size. Ideally I'd like to know beforehand, rather than
changing it afterwards.

Custom shapes are always scaled so the underlying size does not matter 
match. If you are creating your shapes with the help of Dia's shape 
exporter typical diagram sizes should be used.



I've added my initial drawing efforts in Dia to this e-mail for you to
better understand my questions.


That file produces errors on load with master and dia-0-97

 * Unknown types while reading diagram file CMOS - nmos_h
 = expected because of missing shape file

 * Error? trying to connect a non connectable handle.
   'Standard - Ellipse' - 'Standard - Ellipse'
 = This might be a bug with Dia, so I'm curious how the diagram got 
created. Did you already modify the Dia source code? Which version did you 
use to create the file?



I have no problem with a some programming to get this working, although
that would increase the complexity of my effort.

If I've understood your requirments correctly some coding woud be 
inevitable. Don't hesitate to discuss the design on this list first ;-)



Thanks for reading this long explanation if you've come so far and
thanks in advance for replying.


HTH,
Hans

[1] https://git.gnome.org/browse/dia/tree/doc/custom-shapes
[2] https://git.gnome.org/browse/dia/tree/objects/custom
[3] http://www.w3.org/TR/SVG/struct.html#SwitchElement
[4] 

Re: Dia [Mathcad, Copy and Paste]

2014-11-02 Thread Hans Breuer

Hi John,
to discuss matters of Dia it is best to subscribe to the dia mailing list.
Otherwise your message might stay in the moderator queue for quite some while.

Am 27.10.2014 um 23:47 schrieb Sheehan, John T:

Hi folks, my name is John Sheehan and I am a software developer. Tim
(cc'ed here) and I are looking at Dia as a sketch tool to recommend to
our customers. Our product is Mathcad and our clients (engineers of
every discipline)  live on free body diagrams. We're not going to build
a sketcher, and then there is Dia, perfect we tell our customers to use
Dia and all are happy. Except one wrinkle,  getting images from Dia to
Mathcad means exporting as PNG and then loading from disk, repeat
process on every change.

The current development version has improved support for copy and paste, 
see https://bugzilla.gnome.org/show_bug.cgi?id=336304



My idea is I would like to add clip board interoperability to Dia. Then
Dia users could Cntrl-C from Dia and Cntrl-V everywhere else, Like
MS-Word, MS-PowerPoint or Mathcad. I am getting confused trying to find
the source code. Websites say the source code is publicly available but
I have not found it.


See https://wiki.gnome.org/Apps/Dia/Development


So two quick questions : 1.) Is there any reason why clip board
interoperability wouldn't work?
As discussed in bug 336304 the main quest is finding a good common 
interchange format preferably vector based. The best cross-platform choice 
would be SVG, but that's limited with some applications, see e.g.:

https://git.gnome.org/browse/dia/commit/?id=10a3da6272bc91d32d77e4ff7df6ff49d0395002

An issue still open is the handling of layers. Given that Edit/Copy works 
on the current selection this is no good mechanism to exchange a multiple 
layer diagram via clipboard.
Dia 0.97.x on Windows has Edit/Copy Diagram, but that's limited by some 
interpretation differnces on WMF/EMF.



2.) Is the source code publicly available?


Yes. https://git.gnome.org/browse/dia/


I hope we can do something together, Dia looks amazing.


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: I love this tool but want to know if there is going to be another update?

2014-11-02 Thread Hans Breuer

Am 10.10.2014 um 01:23 schrieb Michael Lam:

Hi Dia team!

You guys have done a wonderful job just making it really simple.  The
last version was several years ago updated.

Not really, see:
https://mail.gnome.org/archives/dia-list/2014-September/msg7.html


Do have an update when this will be updated?

If you are asking for a release schedule there is nothing fixed, ecept that 
it takes longer than anticipated ;). If you want to help please reread the 
release announcement.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to create new shapes in Dia?

2014-11-02 Thread Hans Breuer

Am 07.10.2014 um 08:43 schrieb Balázs Tőgyi:

Hi!

This is Bali, from Hungary. I would like to create a diagram about a
heating system with some special item. Could you please explain what
is the process to create new shapes and integrate them into Dia?

See: http://dia-installer.de/howto/create_shape/index.html.en


By downloading and extracting an example.zip from the repository I
noticed that:
- xml is a list of the items
- png is the picture itself
- and there are .shape files with each .png files, does it needed, and
if yes how can I create them?
Where to put the files or how to add them in Dia?

I would be so glad if you could help. In case I can create a new
repository of heating system engineering I would sure share with you.


See also: https://git.gnome.org/browse/dia/tree/doc/custom-shapes

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Text wrapping

2014-11-02 Thread Hans Breuer

Am 23.09.2014 um 10:03 schrieb Walter De Paris:

Hi all, is it possible to avoid an object to change the size when a text
is entered? Thank you for your help! Walter


Yes, if you switch to the current development version and set
Text fitting: Never

There is no automatic wrapping or resizing of the text though.

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Group resizing isses (was: crash with my patch...)

2014-09-26 Thread Hans Breuer

Am 23.09.2014 um 05:44 schrieb George Georgalis:

Hi -

I've been happy with my patch to increase size of object handles and
connection points. However, I discovered if I group two objects then grab a
resize handle, the grouping disappears. If I then select all and zoom to
fit, crash.


Probaly two issues:
 - the Group::move_hande() was seriously flawed (transformation is one
   of the new features after 0.97.x). I've just pushed a better
   implementation to master [1]
 - the transformed group was really small so select all had to work on
   a huge diagram. There was an issue with the GDK renderer trying to
   allocate huge internal pixmaps, which than failed [2]. There might
   be other issues like that.


My patch (attached) changes:


[...]


I think the crash has something to do with float vs int values, but I
cannot find what made me concerned about that before... is there any
compile switches that will help me detect type mismatch?
Dia is generally build with high warning level. But I seriously doubt the 
crash has anything to do with float vs. int.



Could the issue be something else?


Yes, certainly. I don't think it has anything to do with your patch.
But you should try yourself by trying to reproduce the crash without
it. Please build Dia with --enable-debug=yes so that you can provide stack 
traces of your crashes.


Thanks,
Hans

[1] 
https://git.gnome.org/browse/dia/commit/?id=beb381aee1803b3864d7dcef75891655caaacc1d
[2] 
https://git.gnome.org/browse/dia/commit/?id=c68d39779c91c036f304bd2791194cdb35e132ab


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: custom shapes fail to parse

2014-09-26 Thread Hans Breuer

Am 26.09.2014 um 22:20 schrieb Amit Kucheria:

Hi,

I saved the UML class shape with a custome name rtapp-thread in order to
try and customise the shape by adding it to my own sheet. But dia fails to
parse back the shape in question.

Which version? I've tried current master and Dia 0.97.3 branch saving an 
UML class object to shape  and don't get that problem.



 Begin Error messages --

/usr/share/dia/shapes/rtapp/rtapp-thread.shape:35: namespace error : Failed
to parse QName 'fill:'
 svg:text fill: #ff=fill: #00; text-anchor:middle;
font-family: san
^

It should look similar to the following:

svg:text style=fill: #00; fill-opacity: 1; stroke: none; 
text-anchor:startfont-family: monospace; font-style: italic; font-weight: 
700 x=1.15 y=4.86 font-size=0.8 textLength=4.25+op1(): O1*/svg:text


I can't recall any Dia version producing such broken XML. Maybe you edited 
the shape file and accidentially broke it? If not please provide the 
version used and your example file.


Thanks,
Hans


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Provide a python script to dia on the command line

2014-09-22 Thread Hans Breuer

Hi Martin,
Am 16.09.2014 um 11:34 schrieb Martin Metzker:

Hello list!

I think I have a viable patch now, for command line provided python scripts
in dia. Going over the changes:

... moved the definition of struct _PluginInfo from lib/plug-ins.c to
lib/plug-ins.h, because I need this struct in app/app_procs.c.

not ok. To avoid this please use dia_plugin_get_symbol().

Using dia_plugin_get_symbol() and dia_plugin_get_name() now. No changes to
lib/plug.ins.{c,h} anymore.


ok.


... modified app/app_procs.c app_init() to include the -i option and stores
the provided filename in a local variable python_script.

ok, though I would prefer another short option, maybe -r and --run-script
instead of --python?

Done.


ok.


... added a block if(python_script) which checks if the python plug-in is
loaded, and does run_script_oneshot(python_script) when sensible.


Extended functionallity: run_script_oneshot() still exists as described and
is still being used during initialization. For running the script provided
via the command line, there is now run_script_w_context(), which makes the
variables files, export_file_name, export_file_format, input_directory and
output_directory accessible from within python.
This sounds complicated and I'm not sure I like the design to arbitrarily 
push some variables into the python namespace.



To accomplish this, the
code block in app/app_progs.c creates a GHashTable with these variables
(files is collapsed to a ,-separated list), which is passed to
run_script_w_context(), which propagates the information to the python
interpreter before calling run_script_oneshot().

Here I'm very uncertain, starting with the extra function, the huge block 
of code changes in app_init() and the ad hoc API via GHashTable between 
Dia's core and the Python plug-in. Maybe there should be an official PyDia 
API instead, to accomplish the same goal?
While I don's share your big vision of multiple Python threads in Dia, I 
think these additions are moving us away from the goal to allow the 
oneshot script to interact with the GUI.



IMO the patch is not too big to be discussed (and finally be applied) in
one piece.

I would be happy if that is still the case.

Sorry, not quite. The patch providing the initial functionality was closer 
to inclusion, than this one is.



There are minor coding style glitches (tab size, placement of braces) but
I can fix these before commiting.

I modified all the code I touched. There seems to be a little inconsistency
with indentation.
There definitely is - between plug-ins and core, somethimes even with-in 
single files, or even functions. But multiple line reformating should be 
separated from critical content addtions, IMHO.



I kept to the dominant style of app/app_progs.c which is
3 spaces for function bodies and an additional 2 spaces for each {. My code
layout should be at least consitently broken.

For app/app_procs.c and most of the core I'd say it is indendation of 2; 
braces at the same line as 'if' or 'else'. With plug-ins/python/python.c 
it's indent 4 AFAICT.



In addition, at its very beginning, this patch includes

-  ef-export_func(diagdata, ctx, outfname, infname, size);
+  ef-export_func(diagdata, ctx, outfname, infname, (void *) size);

which fixes a compile warning that kept annoying me.

This warning shows a design problem and should not be brushed under the 
carpet with a patch unrelated to that issue. I also like code which 
compiles cleanly, but this is one of at least two warnings I want to keep 
until the underlying problem is solved.


If I would have to commit the patch I'd separte it into two parts:

1) Initial version of running scripts from the commandline
 - Basically what was reviewed before, with the requested changes.
 - Additionally a simple but somehow useful test script for the
   new functionality
2) Extended parameter support for command line scripts
 - As I said I'm uncertain at the moment how to do it. I would
   probably experiment with differnt approaches, like using sys.argv;
   connecting to DiaApplication signals or ...
 - If it is to be done the way you propose it should be at least
   factored into it's own function.

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Provide a python script to dia on the command line

2014-09-11 Thread Hans Breuer

Hi Martin,
Am 11.09.2014 um 12:55 schrieb Martin Metzker:

[...]
I can dia -i foo.py to make dia execute foo.py. The script is executed
_after_ all modules have been loaded, right before handle_all_diagrams() is
called. (This allows using dia's python capabilities to modify diagrams
right before they are exported.)


Overall I like this feature and your patch is not far from inclusion ;-)


I'm having dia_is_interactive = FALSE if the -i option is provided,
however I already have half a mind to remove this limitation, but there are
implications to consider first.

Could elaborate a bit more about the implications? Or is it just that you 
don't have a use case yet?



[...]
To implement this feature, I ...

... split off the part where the python plug-in's dia_plugin_init() runs
'python-startup.py' into its own function run_script_oneshot().

ok.


... made the python plug-in's dia_plugin_init() use run_script_oneshot() to
avoid code redundancy.

ok.


... moved the definition of struct _PluginInfo from lib/plug-ins.c to
lib/plug-ins.h, because I need this struct in app/app_procs.c.

not ok. To avoid this please use dia_plugin_get_symbol().


... modified app/app_procs.c app_init() to include the -i option and stores
the provided filename in a local variable python_script.
ok, though I would prefer another short option, maybe -r and --run-script 
instead of --python?



... appended python_script to the list of variables that triffer
dia_is_interactive=FALSE

ok, but see above implications.


... added a block if(python_script) which checks if the python plug-in is
loaded, and does run_script_oneshot(python_script) when sensible.

ok.


I am not certain how to feel about moving a struct definition into a .h
file and I want to be able to pass the GList files to
run_script_oneshot() and the python interpreter before this is done. Then I
also consider creating patch sets to put as enhancement into the
bugtracker. For now, there is one big patch attached.

IMO the patch is not too big to be discussed (and finally be applied) in 
one piece.



What do you people think about this feature?

Haven't tried it yet. But with the above mentioned changes I'm fine with 
including it with standard Dia, if there are no unforeseen implications.


There are minor coding style glitches (tab size, placement of braces) but I 
can fix these before commiting.


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Building Dia (was: Fwd: little problem)

2014-09-11 Thread Hans Breuer

Am 11.09.2014 um 19:21 schrieb George Georgalis:

resending without strace output... build is successful but the binary
fails...

Reading your log and modification I woudn't say the build was successful. 
The main problem seems to be that you are using an outdated source package 
of Dia. But see below ...



-- Forwarded message --
From: George Georgalis geo...@galis.org

[...]

However, I have some issues with the build, I'm on Ubuntu 14.04.1 LTS
trusty, and it seems I got the deps worked out, but in the end my binary
fails.

First you should get an up-to-date version, for stable use
git clone git://git.gnome.org/dia
and
git checkout -b dia-0-97 -t origin/dia-0-97
or
https://mail.gnome.org/archives/dia-list/2014-September/msg7.html

For the almost as stable development version skip the second step.


Attached is my build script and below is my dependency
resolutions... probably installed more packages than I needed...


With a Debian based distribution it could have been as simple as:
sudo apt-get build-dep dia

 [...]

 error
No package 'gtk+-1.0' found

Dia does not need gtk+-1.0 so this is already questionable.


No package 'libxml-2.0' found
No package 'gdk-pixbuf-2.0' found

install

libgtk-3-dev

superfluous


libxml++2.6-dev

the C++ version is not needed


libgtk2.0-dev


ok.


 error
diapsft2renderer.c:32:30: fatal error: freetype/ftglyph.h: No such file or
directory
  #include freetype/ftglyph.h


https://bugzilla.gnome.org/show_bug.cgi?id=719738
fixed with dia-0.97.3
^

[...]
but that didn't get me there it would seem freetype has changed its
path, so I tried

ln -s /usr/include/freetype2 /usr/include/freetype


Really asking for trouble ...


that leads to successful build/install however the resulting binary fails...


This might indeed participate in the broken build.


$ /usr/local/dia-0.97.2/bin/dia
Gtk-Message: Failed to load module gtk+-2.0 = 2.6.0 glib-2.0 = 2.6.0
libxml-2.0 gdk-pixbuf-2.0 gthread-2.0


Something missing here?


(dia:31192): GLib-GObject-WARNING **: attempting to add an interface
(DiaInteractiveRendererInterface) to class (DiaGdkRenderer) after class_init


https://bugzilla.gnome.org/show_bug.cgi?id=694025
fixed with dia-0.97.3


I cannot make any sense of the strace, but it's attached. Any
recommendations?


Always use the latest version ...


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: how do I set a default line width

2014-09-11 Thread Hans Breuer

Am 10.09.2014 um 16:52 schrieb gottl...@nyu.edu:

On Wed, Sep 10 2014, gottl...@nyu.edu wrote:

I was able to set a default pointsize by double clicking the T button.

When I tried this for the line button, I see that I can only change
the absolute start/end gap.

This is by design. Properties directly accessible from the toolbox are not 
duplicated to the default dialogs.



I would like to change the line width (from .039 to .02 inches)
The default line width can be changed by double-clicking the line width 
selection area. But the dialog is not unit aware, so you have to calculate 
your inches yourself.



and (of lesser importance) size of the start/end arrows to 0.30.


See arrow selection: Details (also w/o units)

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: little problem

2014-09-09 Thread Hans Breuer

Am 09.09.2014 um 22:02 schrieb George Georgalis:

[...]

If a developer could send me a patch or point me to the obvious, I'd be
happy to build my own binary?


https://git.gnome.org/browse/dia/tree/app/handle_ops.c#n24


Aside, the other usability issue I found is inability to copy text. I use
dia for technical designs, would be really convenient to copy vs retype
when it's time to implement. Or, copy the text from another app, after an
export to plain svg.


Works for me (with known limitations).

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to install Dia python plugins on Ubuntu

2014-08-31 Thread Hans Breuer
Firmansyah,
please keep this conversation on the dia-mailing list. I wont answer another 
mail sent to me privately.

Am 31.08.2014 um 01:35 schrieb Firmansyah Nazar firman...@outlook.com:

 Hi Hans,
 
 Thank you for your answer. I will try to be more specific.
 I am running Ubuntu 12.04.5 LTS (Precise). I already install and using Dia.
 I need to use dia_orgchart.py downloaded from dia-installer.de
Probably http://dia-installer.de/doc/organization_chart.html.en which also has 
Installation/Usage instructions.

 I try to put dia_orgchart.py to ~/.dia/python/ but seems I don't have such 
 directory
 I have ~/.dia/ directory but there's no python directory inside.
Are you asking how a directory is created? Would you have followed the 
instructions if it would have told you to create that subdirectory if it does 
not exist?

 I also try to put it on /usr/share/dia/python but I don't know how to load 
 the plugin inside of the application.
Again, please follow the instruction.
 How should I do that ?
The plug-in is loaded automatically if put into the right directory.

 Thank You
 
 Regards,
 Firmansyah
 
  Date: Sat, 30 Aug 2014 15:23:33 +0200
  From: h...@breuer.org
  To: dia-list@gnome.org
  CC: firman...@outlook.com
  Subject: Re: How to install Dia python plugins on Ubuntu
  
  Am 29.08.2014 um 10:25 schrieb Firmansyah Nazar:
   Dear all,
   I am having difficulties on installing Dia python plugin on Ubuntu. Can 
   anyone help ?
  Last time I've checked the Python plug-in was part of the default Dia 
  installation on Ubuntu 14.04. You can verify it's available under 
  File/Plugins... Look for Python scripting support.
  
  If your question is where to place addtional PyDia scripts so that Dia 
  finds them at start-up: put them into ~/.dia/python.
  
  If your question is something else you have to be more specific.
  
  HTH,
  Hans
  
   Hans at Breuer dot Org ---
  Tell me what you need, and I'll tell you how to
  get along without it. -- Dilbert

___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: remove from mailing list.

2014-08-31 Thread Hans Breuer

Am 31.08.2014 um 13:10 schrieb oliver tatlow:

hi there. please can I be taken off the dia mailing list.


Sure, done.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to install Dia python plugins on Ubuntu

2014-08-30 Thread Hans Breuer

Am 29.08.2014 um 10:25 schrieb Firmansyah Nazar:

Dear all,
I am having difficulties on installing Dia python plugin on Ubuntu. Can anyone 
help ?
Last time I've checked the Python plug-in was part of the default Dia 
installation on Ubuntu 14.04. You can verify it's available under 
File/Plugins... Look for Python scripting support.


If your question is where to place addtional PyDia scripts so that Dia 
finds them at start-up: put them into ~/.dia/python.


If your question is something else you have to be more specific.

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Print from command line

2014-08-14 Thread Hans Breuer

Am 14.08.2014 um 00:43 schrieb Martin Metzker:

Hello!

I would like to run dia from the command line and have it print the diagram
provided as command line argument.

I found an old post form 2010 [1], which describes an acceptable method for
having dia run python scripts on startup automatically. Assuming this still
works, what does a python script, that has dia print the one opened
diagram, look like?

Maybe there is a similar hack like the one form [1] but I don't know.


Is printing functionality even exposed to dia's pythonconsole?

The only Dia Python console I know is a GUI. It has nothing to do with 
running Dia from command line.



This is why I want the print-with-python approach:

Apparently, when dia exports (especially) to svg and eps, it converts all
text to paths.
Actually only one of three SVG exporters does this. Also the PostScript 
exporter has a variant keeping text as text.



This is problematic in some ways:
* no embedded fonts (not directly problematic)
* files about 20 times the size they need to be (sometimes problematic,
because diagrams tend to account for 50-80% of the final PDFs sizes)

Huh? You are creating SVG or EPS to create PDF with another program?
Why not go to PDF with Dia directly? Like:

dia ..\samples\render-test.dia -e rt.pdf


* diagrams look ugly on paper (very bad!)

However, when I print my diagrams using the cups pdf-file-printer, I end up
with PDFs I like much better:
* embedded fonts (one can copypaste name/text; i am still hoping I
   will be able to replace all those subsets with just one embedding of
   the entire font ... or at least the superset of all subsets to avoid
   redundancy)
* small files (load/print/mail faster)
* the print out looks as good as the PDF promises (want!)


I think all this is also available with PDF created directly by Dia.

 [1] https://mail.gnome.org/archives/dia-list/2010-June/msg00017.html

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Problem with Ruler

2014-08-10 Thread Hans Breuer

Am 08.08.2014 um 11:20 schrieb Anton Zoettl:

I have set the pagesize to A4 (21 cm x 29,7 cm)
However the ruler does show me a quite different size.

So you have changed the scaling of the diagram. The ruler shows the 
virtual centimeters of the diagram objects.



The size of the printout is different from the indication of the page on the 
canvas

With the page breaks in your screenshot I'd expect two pages of printout. 
If you don't get that it may be either a bug or some additional 
transformation performed within the printer driver.



Unfortunately there is no explanation in the Help about Scale  Fit To

Yes, unfortunately (BTW: patches accepeted). The scaling (to pages) is done 
by a single scaling factor. You can either enter this factor directly or 
get it calculated with Fit to n by m [pages]. Using the latter also 
shifts the top left corner of the diagram to start in the top left corner 
of the first page.



Please give me some help


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Do C Language plugins need to be compiled with Dia?

2014-08-10 Thread Hans Breuer

Am 30.07.2014 um 11:47 schrieb dunn:

I know I'm causing a flurry of messages all at once, but I was wondering if
a user makes a C Language plugin instead of Python, does it have to be
compiled with the program, or does Dia find a library (and perhaps an XML
file) in a folder and use it?

The algorithm for finding plug-ins at runtime is similar for Python and C 
plug-ins. See:

https://git.gnome.org/browse/dia/tree/lib/plug-ins.c?id=eefc0d0b2ff10368def6f6cb463ab3a4381bbbc5#n442

Plug-in related XML files (like sheets and shapes) are found likewise. If 
you want something special you have to code it yourself, best based on 
existing API, see: https://git.gnome.org/browse/dia/tree/lib/dia_dirs.h


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: problem with opening a file

2014-07-14 Thread Hans Breuer

At 07.07.2014 16:56, Ирина Тетеревкова wrote:

Hi!

I have a problem with Dia sofware. When i want to open svg file, Dia
says: PyDia
Error (../../../plug-ins/python/diamodule.c:295):
type 'exceptions.NotImplementedError'NotImplementedError('Unknown unit
Q',)Traceback (most recent call last):

[...]


What should I do with this error?

If you would like throrough analysis attaching the file in question would 
always be a good idea. Also giving the Dia version exhibiting the problem 
could help.


The message indicates to me that your SVG contains pathes with Qubic 
curves. This is not yet supported with a released version of Dia but with 
the development version [1].


Still you could try to load your SVG with the other SVG importer 
(explicetly selecting Scalable Vector Graphics (*.svg) in the file open 
dialog. But of course the result would not be completely correct.


HTH,
Hans

[1] 
https://git.gnome.org/browse/dia/commit/?id=30aab3fcecbb7dc2f79d7e5eb0460a4fbf03369f


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia pdf export problem (windows)

2014-07-14 Thread Hans Breuer

At 03.06.2014 17:42, Bastian Beekes wrote:

Hi everyone,

I have created some flowcharts in Dia (dia 0.97.2 - Windows 7 64 bit).
Now I want to export them to pdf. This is working alright if I use File
 Page Setup  Fit to... Problem is, Diagrams with different sizes all
get zoomed differently. My perfect scale would be 41, but when I use a
fixed scale instead of Fit to, I just get a bunch of empty pages when
I export them to pdf.
Fit to not only adjusts the scale, but also the alignment to the origin 
(0.0, 0.0). So I expect there are not a buch of empty pages, but at maximum 
four pages with minimal content coming from your diagram. You should align 
your content with the origin and the visible page boundaries.



What works is if I draw a rectangle around the
whole page in dia and set the line color to white, so it is not
displayed. Still, the pdfs contain 3 empty pages and on the 4th page is
my flowchart.

The empty might contain text objects without text. If you select your 
flowchart and afterwards use Select/Invert you should be able to delete 
these invisible objects.



What can I do to correct that behaviour? It seems to be just because
of the Page setup...


If it just works with Fit to just align to the origin.

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Margins for A4 sheet

2014-06-12 Thread Hans Breuer

At 10.06.2014 12:35, Dumitru Ursu wrote:

On 06/10/2014 12:29 PM, Dumitru Ursu wrote:

Hello,

I'm having some problems seeing/setting the margins for a A4 page; I've
set up from preferences to color the A4 area with a light blue, but the
whole canvas is painted;
When I export to PDF I get a document of 4 pages, when I really need just
one.
Also, how do I scale the diagrams?


http://i.imgur.com/oRqmrI1.png


http://dia-installer.de/doc/en/quickstart-chapter.html#save-print-diagram


For anyone else having troubles with this, the solution is to go to File 
Page Setup, and fiddle around with the scale setting, until the red grid
encompases your drawing.
The red grid is the one who marks the page border.

Sorry that you apparently only grasped half of the related GUI. Instead of 
fiddling around you could have just selected Fit to and enter 1 in both 
fields.



Also, as a note for developers: can't the infinite canvas be made optional?
Actually I have given some thoughts on an optional, more page oriented view 
but it goes more along the line of multi page programs like Keynote, 
Powerpoint etc.
And your problem at hand would not magically vanish with this, because 
still the user needs to decide how many objects should fit to one page.



Having one A4 sheet by default is the way people are acustomed to work.
If you are not willing to adapt do Dia's approach, it's probably best to 
switch to a program which fits better to you and your needs. Or read and 
understand Michael's response:

  https://mail.gnome.org/archives/dia-list/2014-June/msg00028.html


Or maybe some watermarking at each grid intersection: This is page 1,
600x800px
I dont understand why page size should be reflected in pixels. Almost all 
of Dia's shapes are fully scaleable without any information loss.


BTW: I don't think that further discussion of usability poll or something 
is leading anywhere near to motivating someone to write the code ;)


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Diagram defaults? (was: Re: Margins for A4 sheet)

2014-06-12 Thread Hans Breuer

At 11.06.2014 11:39, Chris Green wrote:

 [...]



But it's *not* seamlessly scalable because the individual components
(of *any* of the types of objects that come with it) don't scale as
well as the diagram as a whole.  They will scale plus/minus a factor
of two or so but beyond that they really don't work too well.
Yes, if you try to scale every single object too much away from their 
defaults you are already fighting a lost cause. Sooner or later you'll 
stumble over object which are not resizable, but stil seamlessly scaleabe 
(e.g. UML - Actor).



Thus you *do* need to start with an appropriate sized 'sheet' if you want
to print your diagram or use it as other than a single huge diagram.

I dont understand this statement. You can draw your complete diagram 
ignoring page breaks and afterwards decide how many pages it should take.



I really like dia but I think it would be a whole lot more 'likeable'
and generally applicable to casual users if it defaulted to something
more tangible.


So if it is just a matter of defaults which defaults do you propose?

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Loses diagram when I zoom in

2014-05-19 Thread Hans Breuer

At 19.05.2014 12:29, Chris Green wrote:
[...]

How odd, it appears to be a quirk of this particular diagram on my
system only.  As I said other previously saved diagrams are fine still.

Yes, but some related information is still saved with the file. Found by 
just opening the file with an editor and searching for 'nan' (not a number) 
and 'inf' (infinite) shows:


dia:object type=Network - Cloud version=1 id=O0
  dia:attribute name=obj_pos
dia:point val=1,1/
  /dia:attribute
  dia:attribute name=obj_bb
dia:rectangle val=-inf,-inf;inf,3.22101/
  /dia:attribute

So the cloud object's bounding box gets calculated to really big numbers on 
your system. If I save you file on one of my systems the bounding box is 
caclculated corrected to:


dia:object type=Network - Cloud version=1 id=O0
  dia:attribute name=obj_pos
dia:point val=1,1/
  /dia:attribute
  dia:attribute name=obj_bb
dia:rectangle val=0.9,0.9;3.1,3.32101/
  /dia:attribute

The bounding box get's recalculated after loading the file so the propblem 
is not reproduceable, if the miscalculation does not happen at runtime.


The issue might be fixed en passant with
https://bugzilla.gnome.org/show_bug.cgi?id=710818

It is explained to some extend here:
https://git.gnome.org/browse/dia/commit/?h=dia-0-97id=335ced1909180f0bc4fb064aaa676a86c740dce0
and depends on the C-runtime library used and maybe also the CPU used

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Embedded Diagrams

2014-05-08 Thread Hans Breuer

At 08.05.2014 05:34, Nick Bright wrote:

Greetings,

I have been searching the documentation, but have not found any indication
if this is possible:

Is there a way to embed futher dia files within a diagram?

Not with a released version. But with the development there is Diagram As 
Object accessible from the Misc sheet. I allows to render a diagram within 
a box in another diagram.
See: 
https://git.gnome.org/browse/dia/commit/?id=fbe3937bb67c0cb450f54f44ed176e8a90bfcd27

for the initial commit.


For example, a cloud object on one diagram could be an embedded link to
another diagram file which would be a diagram of the contents of that cloud.

That would - from my understanding - be a different feature, but it is also 
implemented with the development version:

https://git.gnome.org/browse/dia/commit/?id=9f855a3ee4f0310f2e7f0109a3bc483c450bb0a2

Although current master is not production quality it should be stable 
enough to give it a try. If not, please don't hesitate to report open issues.


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding comments to an object

2014-04-22 Thread Hans Breuer

At 22.04.2014 04:01, Ken Springer wrote:
[...]

So you could use the UML - Class object in Dia as your box with just a
simple string (the class name). Switch off Attributes visible and
Operations visible, to get rid of the two additional areas.


And this is all more than I understand.   LOL


http://dia-installer.de/doc/en/special-objects-chapter.html#N4091C


Your extra window for more information would be just the properties dialog
having a lot of fields you could now fill with additional, invisible
information. You can keep it open while navigating your diagram, but
updating to the selection requires a double click.


Are you saying each rectangular object would have it's own properties box?
If so, it might work.  A problem I'm anticipating is one object might need
50 characters of text, yet another may need 250 characters of text.

There is only one property dialog open at the same time. It just can adapt 
to the selected object. The link above shows it's UML - Class incarnation.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding comments to an object

2014-04-21 Thread Hans Breuer

At 21.04.2014 17:28, Dumitru Ursu wrote:

On 04/21/2014 06:16 PM, Ken Springer wrote:

I'm creating an organizational chart structure of information.  If I
choose to, I want to be able to click on an object, in this case a
rectangle, and have another box, or window, open somewhere that gives me
additional information about the data in the rectangle. The information
the box/window will be the same type of information you would get from a
footnote, endnote, or bibliography.  It will simply tell me where I got
the information from.

So you could use the UML - Class object in Dia as your box with just a 
simple string (the class name). Switch off Attributes visible and 
Operations visible, to get rid of the two additional areas.


Your extra window for more information would be just the properties dialog 
having a lot of fields you could now fill with additional, invisible 
information. You can keep it open while navigating your diagram, but 
updating to the selection requires a double click.



[...]
Dia is definitely not what you are looking for.


That's a matter of opinion ...

Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Diagram tree not showing on Ubuntu 13.10, Dia 0.97.2

2014-04-18 Thread Hans Breuer

At 09.04.2014 19:02, Arne Halvorsen wrote:

I have installed both Dia and Dia-gnome, and the diagram tree is not showing.

I *think* that was the state of affairs on the previous Ubuntu too.

Ubuntu is known to add improvements which make Dia look bad [1]. But I 
don't think this is the main issue here.



Any hints?

I've just checked with Ubuntu 12.04. The diagram tree works as expected 
with some limitations. So the first hint is to be more precise with the 
error description: diagram tree is not showing could be:


a) the diagram tree window does not show?
No idea if that's your issue.

b) the diagram tree window is too small to show something
Just resize it, I think the default sizing is broken by the above mentioned 
improvement.


c) the diagram tree window is empty
Just load the diagram after opening the diagram tree window.

d) the diagram tree windwow only shows the diagram entry
Again probably a Dia bug. IIRC the old diagram tree window needs to be 
active to get populated with elements correctly.


e) something completely different
If so, than what?

HTH,
Hans

[1] https://bugzilla.gnome.org/show_bug.cgi?id=662728

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Developing a Test-taking environment feasibility question

2014-04-18 Thread Hans Breuer

At 17.04.2014 20:27, Ryan Baxter wrote:

Hi,

I am an academic interested in developing a test-taking environment for my
students who are creating process flowcharts. I am wondering if using
Python to develop the appropriate add-ins if it would be feasible to
accomplish this or perhaps some elements. Without going to into excessive
detail, could someone comment on the feasibility of implementing features
such as the following:

1. Restrict access to certain file operations (e.g., save as, export)
2. Restrict opening an existing file (they have to start with a blank sheet)
3. Possibly restrict the copy and paste functionality.
4. Control the save function to save within a particular location unknown
to the user.
The above might be better addressed on the desktop level, see e.g. 
https://help.gnome.org/admin/deployment-guide/


It is not possible with Dia's plug-in facility AFAICT.


5. Add a menu item or button to submit an assignment
6. Export the saved (submitted) item to another application for uploading.


Could be done by a dedicated Dia Python plug-in.


I am obviously not a python programmer or perhaps I might understand if
this is even possible. However, I did recently design a system and paid a
programmer to implement most of these features using Visio and AutoIT.
However, the design is far from elegant and some things are difficult to
control without creating a lot of overhead which slows the system down.

I also realize that this is a solution to curtail the minor few who are
interested in trying to share test answers/solutions to others or somehow
come up with a way to skirt around certain requirements. Still, it is an
interesting puzzle and has been fun trying to come up with a solution.

Some of your restrictions might be possible by just removing menu entries 
from Dia's .ui files. But as you say, this topic is only interesting for a 
minor few, and I'm not one of them ;)


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Inserting data from Word in to Dial Portable

2014-04-18 Thread Hans Breuer

At 03.04.2014 16:03, Vanessa Carli Bones wrote:

Good morning, I recently downloaded Dial Portable and I am now reading
about it and starting to build a decision tree. I would like to know if
and, if yes, how can I create a decision tree from a list of data
hierarchically organized in Word (Microsoft Corporation)? For example,
is there a way I could select all data and past it to Dial to have my
diagram automatically created? Thank you in advance, Vanessa

There are plug-ins with Dia creating diagrams (basically all the import 
plug-ins are in this category). But there is no ready-made plug-in for your 
task at hand that I know of. Also only the development versions has a 
facility to import via clipboard.


So automatic diagram creation requires some programming first.

Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Library and arrows

2014-04-18 Thread Hans Breuer

At 01.04.2014 18:09, Michael Ross wrote:

On Tue, Apr 1, 2014 at 9:46 AM, Subtilt i...@subtilt.be wrote:

[...]

Is it possible to make a personnal library of .png?



You mean for inserting as pictures?  Of course you can curate whatever you
like - so I am probably misunderstanding the question.

Just exposring single images as shape should do the trick. Or I'm 
misunderstanding the question, too;)





Second is to know if I can easily make different arrows as those provide
in the app.



I have often wondered this myself, I hope the answer is yes, and that
instructions follow.


No instructions to follow, adding arrows requires programming.

Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Upcoming Dia 0.97.3 bug-fix-only

2014-03-10 Thread Hans Breuer

At 10.03.2014 09:11, Octavio Alvarez wrote:

On 03/08/2014 05:04 AM, Hans Breuer wrote:

[...]


Just something I noticed: if page scale is set to a small value, like
20, export will be very small, to the point of being pixelized. I
usually set page scale to Fit 1x1. If there is a lot of information,
page scale values automatically reduce to fit the diagram in the page
and triggers this bug without giving me a chance to choose an export size.

Actually that's a feature. The page scale is used as the only way to scale 
pixel based export.



So if you are building Dia from source now would be a good time to pull
the branch dia-0-97. Please try to break it ;)


As far as the kerning bug it's concerned, it didn't break other than
what it was described.


Thanks again for your analysis.


If you are not building Dia from source, please hesitate to drop in with
your favorite feature request you want someone else to develop for you.


It would be great to let objects (or at least texts) have configurable
margins around. This will let me attach text objects to other shapes and
automatically give them some space. Useful for labeling objects in
network diagrams without making them look klunky or having to insert
spaces manually. This could even be a general attribute available to any
object.

Definitely not stuff for bug-fix-only. And an interesting reading of my 
disclaimer ;)
Having - and handling - an extra attribute for every object just to ensure 
text in some distance does not look like the right approach to me.
But having a margin property with the Text object could work and even 
address an old request: https://bugzilla.gnome.org/show_bug.cgi?id=108770


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Upcoming Dia 0.97.3 bug-fix-only

2014-03-10 Thread Hans Breuer

At 08.03.2014 23:44, Dumitru Ursu wrote:

On 03/08/2014 03:04 PM, Hans Breuer wrote:

Some more fixes from master just got cherry-picked to the dia-0-97 branch.
Before I do another bug fix only release from that branch I would like to
get some feedback from you. The list of fixed bugs is relatively short
http://bugzilla.gnome.org/buglist.cgi?product=diatarget_milestone=0.97.3
but e.g. the notorious Pango kerning problem is included.

*651949* https://bugzilla.gnome.org/show_bug.cgi?id=651949

No comment means bugfix confirmed, right?


*667500* https://bugzilla.gnome.org/show_bug.cgi?id=667500 - that windows
only, you should modify the bug report.
The effect of the issue is cross platform AFAICT. But it's only a build 
problem, not runtime.



*711418* https://bugzilla.gnome.org/show_bug.cgi?id=711418 - this one is
fine, but XML is not listed in the supported document formats, I had to
pick All files
Intentionally. The last ressort file importer is Dia's own format, but we 
do not want to advertize this ;)



*710818* https://bugzilla.gnome.org/show_bug.cgi?id=710818 - this one
wasn't fixed on my machine
error code:
 dia: cairo-arc.c:189: _cairo_arc_in_direction: Assertion `angle_max =
angle_min' failed.
cairo  version - 1.12.16-1
I've reopened the issue with some more information. On the other computer I 
even have implemented a fix.



*721851* https://bugzilla.gnome.org/show_bug.cgi?id=721851 - not fixed.

Shoud have changed the title to  Commandline export not working for pixbuf 
(with X11 terminal) because that's the improvement made. From the commit 
message of 
https://git.gnome.org/browse/dia/commit/?id=c3dcf1eec1b4ef57c45c58410048b77c83ea50dd


The pixbuf export requires a diaplay. Use gtk_init_check() to allow command 
line export from an X terminal without sacrificing the command line mode 
without X11.


Do you say it does not work in that margin for you?


These are the bugs that I could test. The rest are Windows/Mac related, and
I haven't used for several years such machine.

E.g. https://bugzilla.gnome.org/show_bug.cgi?id=683700 should be 
reproduceable on Linux as well. The OS field is initialized by the reporter 
(or machine setting). Often I'm setting it during analysis to All if the 
bug is cross platform.
But even if the bug is reproduceable only on one platform the fix for it 
could potentially introcude cross platform bugs;)


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Bug 721851 (was Re: Upcoming Dia 0.97.3 bug-fix-only)

2014-03-10 Thread Hans Breuer

At 10.03.2014 21:28, Dumitru Ursu wrote:

On 03/10/2014 10:17 PM, Hans Breuer wrote:

At 08.03.2014 23:44, Dumitru Ursu wrote:

[...]

*721851* https://bugzilla.gnome.org/show_bug.cgi?id=721851 - not fixed.


Shoud have changed the title to  Commandline export not working for
pixbuf (with X11 terminal) because that's the improvement made. From the
commit message of
https://git.gnome.org/browse/dia/commit/?id=c3dcf1eec1b4ef57c45c58410048b77c83ea50dd

The pixbuf export requires a diaplay. Use gtk_init_check() to allow
command line export from an X terminal without sacrificing the command
line mode without X11.

Do you say it does not work in that margin for you?


Aha. On my computer it didn't work form xterm, on a X11 environment: if
that's the expected behavior, so be it.

If you can start Dia with it's GUI from that xterm the result would indeed 
be unexpected. But not sure if we can do much about that because actually 
finding the display is done within gtk_init_check().


Could you repeat your test with additional command line parameter --verbose 
and report back what's printed on the terminal?


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



VDX Import bug (was Re: Upcoming Dia 0.97.3 bug-fix-only)

2014-03-10 Thread Hans Breuer

At 10.03.2014 21:34, Dumitru Ursu wrote:

On 03/10/2014 10:28 PM, Dumitru Ursu wrote:



Microsoft® Visio® 2010 Step by Step Practice Files
http://examples.oreilly.com/9780735648876-files/  - Visio import
doesn't work with these files. (it complains about a tag)

/home/dimon/HR Process Map_start.vsd:1: parser error : Start tag expected, ''
�ࡱ�
^

This is the error. I guess .vsd is a binary format, while .vsx is a
xml-based one.  Is Dia able to read those?


Indeed Dia only supports the XML dialect of Visio diagram format (VDX).
I've never checked VSX - the Visio Stencil XML. But at least Dia should not 
crash on them ;)


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Events in Dia

2014-03-02 Thread Hans Breuer

At 28.02.2014 20:53, Bernard Cohen wrote:

I wrote an large extension to Visio in VBA in which the code is triggered
by events, such as placing an object or connecting a line to a connector,
and by custom menu items.
I'd like to transport it to Dia/Python but can find no documentation on the
events that Dia generates.

You can generate PyDia documentation by Help/PyDia HTML Docs,
which creates dia.html in the temp directory.


Can you point me to an appropriate URL?
THe list of events (signals) supported by PyDia is rather short, so I#m 
pasting the answer here:


DiagramData::connect_after(...)
connect_after(string: signal_name, Callback: func) - None.
Listen to diagram events in ['object_add', 'object_remove'].
Diagram::connect_after(...)
connect_after(string: signal_name, Callback: func) - None.
Listen to diagram events in ['removed', 'selection_changed'].

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to integrate an image permanently

2014-03-01 Thread Hans Breuer

At 25.02.2014 02:46, Denis Arsenault wrote:

How to integrate an image permanently, not linked to an external file?

I mean, an permanent image, so the image copy will be resident inside the
Dia diagram.

With the development version you get this automatically when pasting the 
image into Dia. Additionally you can set this with the image properties.

This is already described in the manual, see:
http://dia-installer.de/doc/en/basic-objects-chapter.html#image

Before asking for the release date, please check recent mailing-list posts.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: I wanted to know when is the next release? or is this no longer supported

2014-02-28 Thread Hans Breuer

At 26.02.2014 20:22, Michael Lam wrote:

I really enjoy your product.  Is there going to be another release after
0.97.2?
There is a bunch of interesting features already available with the 
development version. See:

https://git.gnome.org/browse/dia/tree/NEWS

What's currently missing are more people building the development version 
from source and reporting back what's working and what's not.



Its been a few years since last release and wanted to know if
this tools is still supported?

Given the activity on this list, bugtracking [1], [2] and git [3] I'd say 
release and support are indepent ;)


Hans

[1] https://bugzilla.gnome.org/buglist.cgi?product=diatarget_milestone=0.97.3
[2] http://bugzilla.gnome.org/buglist.cgi?product=diatarget_milestone=0.98
[3] https://git.gnome.org/browse/dia/

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Linux Redaht error message

2014-02-25 Thread Hans Breuer

At 25.02.2014 12:28, Emanuele Ragnoli wrote:

I get this error message when starting DIA after a Linux Redhat
installation:

Could not find plugin init function in `/usr/local/lib/dia/
libxslt_filter.la'


This error is shown when Dia is compiled without XSLT support.
As such it should be reported to your distributor.


Anybody that found  a solution?
You should be able to deselect the XSLT plugin by unselecting Load at 
Startup from File/Plugins...


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia: Bezierline segment addition?

2014-02-18 Thread Hans Breuer

At 15.02.2014 01:53, Peter Hodges wrote:

Does any way exist to get to the add segment drop down menu on a Mac with a 
single button mouse.
I've tried all combinations of control, option, and command with clicking on 
the bezierline.
I don't find the menu with add segment entry.

Not Dia specific as far as I know. I've asked google the broader question: 
osx x11 right click. First answer found looks like a good one:

http://wiki.winehq.org/MacOSX/FAQs#head-62302cc0f6f1950175cef33d166a8805d27d59c3

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Text rendering bug test (was Re: More features)

2014-02-14 Thread Hans Breuer

At 02.02.2014 02:28, Octavio Alvarez wrote:

On 02/01/2014 02:14 PM, Octavio Alvarez wrote:

* Considering that the only difference between cairo-pdf and
cairo-alpha-png is the cairo_*_surface_create() call and that
cairosimple also renders to a PNG file, I considered cairosimple should
failed too, so I compiled and cairosimple. Text rendered correctly.


I must correct myself. I think I have some useful information.

After reading bug #341481 [1] (pango), I modified cairosimple, the
example from Pango docs, to use a tweakable cairo_scale(). I attach the
resulting code. Here's how to use it:

[1] https://bugzilla.gnome.org/show_bug.cgi?id=341481

Compile it with:

gcc -o cairosimple-scale cairosimple-scale.c \
   `pkg-config --cflags --libs pangocairo` -lm

Run it with:

./cairosimple-scale test-output.png

... and check test-output.png with eog or your favorite visualizer.


The new Pango bug is https://bugzilla.gnome.org/show_bug.cgi?id=700592


[...]



When debugging I changed DIAG_NOTES to fprintf(stderr, ...) because I
didn't know how to enable DIAG_NOTES and added some extras.


Please look into diacairo.h for the intended definition.


I noticed pango_font_description_set_absolute_size() was being called
with a value of 866. Curiously enough, in the default cairosimple, it
must be called with about 27 * PANGO_SCALE * DPI / 72.0 where
PANGO_SCALE == 1024 and DPI == 96, so about 36,000 to get the an
equivalent font size. This means a value of 866 would be the equivalent
of 0.6 points. This results in a big precision loss.

So, even though the Pango team clearly has to fix some calculations to
do, Dia also has to find the way to scale back to better font sizes.

Thanks for the analysis. I tend to agree although I think it could be fixed 
completely on the Pango side. But patching Dia is easier for me ;-)



I'm not sure my interpretation of the tests are correct, but if they
are, the options for fix/workaround for Dia are:

If there is another internal rendering scaling multiplier, it will be
simpler: to adjust cairo_scale() to bring it back to better values and
use the internal multiplier to adjust the actual sizes of the objects to
render.

If there is not, an implementation of it is in order, but this could
horribly require to modify each rendering calculation, like the
TWEAKABLE_SCALE technique.

The attached patch basically does a mix of the two. But only for fonts/text 
to avoid the huge modification otherwise required.



I gave it a shot, modifying renderer-scale at diacairo.c:165 but the
image just increases in DPI. Font size is still called with absolute
size of 866. So, no sucess yet.

Thanks again for the analysis. I'll commit the patch to master as soon as 
I've tested it on Linux with Pango  1.32


Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
diff --git a/plug-ins/cairo/diacairo-renderer.c 
b/plug-ins/cairo/diacairo-renderer.c
index 334a416..c9a0bc6 100644
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -507,6 +507,15 @@ set_fillstyle(DiaRenderer *self, FillStyle mode)
   DIAG_STATE(DIA_CAIRO_RENDERER (self)-cr)
 }
 
+/* There is a recurring bug with pangocairo related to kerning and font 
scaling.
+ * See: https://bugzilla.gnome.org/buglist.cgi?quicksearch=341481+573261+700592
+ * Rather than waiting for another fix let's try to implement the ultimate work
+ * around. With Pango-1.32 and HarfBuzz the kludge in Pango is gone and 
apparently
+ * substituted with a precision problem. If we now use huge fonts when talking
+ * to Pango and downscale these with cairo it should work with all Pango 
versions.
+ */
+#define FONT_SIZE_TWEAK (72.0)
+
 static void
 set_font(DiaRenderer *self, DiaFont *font, real height)
 {
@@ -519,7 +528,7 @@ set_font(DiaRenderer *self, DiaFont *font, real height)
 
 #ifdef HAVE_PANGOCAIRO_H
   /* select font and size */
-  pango_font_description_set_absolute_size (pfd, (int)(size * PANGO_SCALE));
+  pango_font_description_set_absolute_size (pfd, (int)(size * FONT_SIZE_TWEAK 
* PANGO_SCALE));
   pango_layout_set_font_description (renderer-layout, pfd);
   pango_font_description_free (pfd);
 #else
@@ -905,14 +914,17 @@ draw_string(DiaRenderer *self,
 pango_layout_iter_get_line_extents (iter, NULL, extents);
 shift = alignment == ALIGN_CENTER ? PANGO_RBEARING(extents)/2 :
 alignment == ALIGN_RIGHT ? PANGO_RBEARING(extents) : 0;
+shift /= FONT_SIZE_TWEAK;
+bline /= FONT_SIZE_TWEAK;
 cairo_move_to (renderer-cr, pos-x - (double)shift / PANGO_SCALE, pos-y 
- (double)bline / PANGO_SCALE);
 pango_layout_iter_free (iter);
   }
   /* does this hide bug #341481? */
-  pango_cairo_update_context (renderer-cr, pango_layout_get_context 
(renderer-layout));
-  pango_layout_context_changed (renderer-layout);
+  cairo_scale (renderer-cr, 1.0/FONT_SIZE_TWEAK, 1.0/FONT_SIZE_TWEAK);
+  

Re: Dia 0.97.2 for Windows - moved all objects to different layer. saved - ruined my connections!

2014-02-12 Thread Hans Breuer

At 12.02.2014 11:39, Dmitry Sutyagin wrote:

Hi all,

I had objects and linking lines in the same layer. Then I decided to move
objects to another layer and keep lines where they are. I did this,
checking if this breaks connections - it did not (did not yet save). I
moved every object to another layer and saved. After I reopened my diagram
I found that all connections are broken and almost every line has one end
at 0,0 coordinates. An error pops up saying that connection point blabla
does not exist on blah-blah and that there are some 50 similar messages.

As Andrey said, known issue. More specifically:
https://bugzilla.gnome.org/show_bug.cgi?id=600571


How can I fix my diagram without manually reconnecting every line end with
where it is supposed to be?

Unfortunately the code was buggy for save and load. It might be possible to 
restore some connections by manually putting all the objects back to one 
layer, i.e. deleting all:


  /dia:layer
  dia:layer name=Lines visible=true

Please don't delete the first dia:layer and the last /dia:layer because 
there must be at least one layer in the file.


But remember this is an experiment, it may not work at all.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-02-01 Thread Hans Breuer

At 01.02.2014 19:30, Octavio Alvarez wrote:

On 01/31/2014 12:01 PM, Hans Breuer wrote:

[...]  So before considering a release I would be really useful to
get feedback from people building and tesing Dia from master.


Tested in master: Pango text rendering is broken again. I don't know if
it's Dia or Pango's fault. All letters of each word overlap in a single
position.


Works for me, so I'm expecting a Pango problem. What version are you using?


Except that this time switching fonts doesn't make a difference.

Different renderers use different approaches. I have problems on OS X with 
pango-cairo, i.e. Dia's cairo renderer. But the Gdk renderer usually works, 
no matter which OS.



Then again I tested it in 0.97.2 and it's broken too. :-/ This is a show
stopper for those that need exporting with alpha channel.

So it is a bug with Pango or cairo. While it might be possible to work 
around it in Dia I suggest you check your system first.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-02-01 Thread Hans Breuer

At 01.02.2014 20:04, Octavio Alvarez wrote:

On 02/01/2014 10:59 AM, Hans Breuer wrote:

Tested in master: Pango text rendering is broken again. I don't know if
it's Dia or Pango's fault. All letters of each word overlap in a single
position.


Works for me, so I'm expecting a Pango problem. What version are you using?


Debian Sid, libpangocairo-1.0-0:amd64 1.36.0-1+b1

Testing with an unstable version does not really help me with fixing bugs 
on stable Dia versions. Isn't there a way to report issues there?



Except that this time switching fonts doesn't make a difference.


Different renderers use different approaches. I have problems on OS X
with pango-cairo, i.e. Dia's cairo renderer. But the Gdk renderer
usually works, no matter which OS.


Yes, GDK works. I use it as a fallback.


Then again I tested it in 0.97.2 and it's broken too. :-/ This is a show
stopper for those that need exporting with alpha channel.


So it is a bug with Pango or cairo. While it might be possible to work
around it in Dia I suggest you check your system first.


Does it help to know that cairo-pdf works properly?

Is there any relation to Dia? Or is this just another program probaly using 
different API not exhibiting the issue at hand?


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-02-01 Thread Hans Breuer

At 01.02.2014 19:46, Dumitru Ursu wrote:

On 02/01/2014 08:30 PM, Octavio Alvarez wrote:

[...]

Then again I tested it in 0.97.2 and it's broken too. :-/ This is a show
stopper for those that need exporting with alpha channel.


Is is possible to write some kind of integration tests?
For the issue at hand it might be useful to write a minimal but complete 
test program to show the Pango or cairo bug. It would either help the 
library developers to identify their bug or help the application developer 
to find a  work around.



I have experience with writing tests for web applications (Ruby on Rails),
and maybe I can contribute to Dia this way.
Some of the tests I've written for Dia are implemented with PyDia (you'll 
find them in the plug-ins/python directory. But most of the test are 
written in C (see tests/ directory). Or are just manually.



Also, is there a list with easier issues to work on, in order to get to
know the code base?
There are only about 30 open bugs - not counting enhancement requests and 
installer issues. See: 
https://bugzilla.gnome.org/buglist.cgi?query_format=advanced;bug_severity=blocker;bug_severity=critical;bug_severity=major;bug_severity=normal;bug_severity=minor;bug_severity=trivial;bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;component=exports;component=general;component=import;component=objects;component=python;component=shapes;component=win32;product=dia



I searched through Dia's bugzilla, but many are unconfirmed,
Triaging bugs should help, but possibly a bit more than desribed in 
https://wiki.gnome.org/Bugsquad/TriageGuide


For these ~30 bugs the unconfirmed might me be exactly that: no one else 
was yet able to reproduce.



many have  patches (but are not closed for some reason),
These should be experimental or needs-work patches, which are not ready to 
be applied. There should be comments explaining the state.



and is hard for me to pick something.
If you are regular Dia user just check Dia with your typical workflow, try 
reading and saving your files and report if anything breaks. I don't think 
there are any release critical _known_ bugs in bugzilla.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-02-01 Thread Hans Breuer

At 01.02.2014 20:43, Octavio Alvarez wrote:

On 02/01/2014 11:40 AM, Hans Breuer wrote:

[...]

So it is a bug with Pango or cairo. While it might be possible to work
around it in Dia I suggest you check your system first.


Does it help to know that cairo-pdf works properly?


Is there any relation to Dia? Or is this just another program probaly
using different API not exhibiting the issue at hand?


I meant the cairo-pdf Dia export plugin.

This makes it look more like a cairo bug than a pango-cairo bug. IIRC 
neither dia-cairo nor pango-cairo have cairo backend specific code for text 
rendering.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-01-31 Thread Hans Breuer

At 31.01.2014 17:24, Octavio Alvarez wrote:

On 01/30/2014 03:25 PM, Hans Breuer wrote:


Available with Dia master [ ... ]



Most of these issue are adressed in the development version [..]



Implemented on Dia master: [...]



SVG import got vastly improved recently.


I've seen these responses increasingly frequently. This suggests a
release would be useful.


Might be useful or might crash and burn your files ;-) Not that I think
that Dia master is in a bad shape, but recently I found and fixed some huge 
leaks. So before considering a release I would be really useful to get 
feedback from people building and tesing Dia from master.


Bug reports, documentation updates and pathches are also welcome.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: More features

2014-01-31 Thread Hans Breuer

At 31.01.2014 18:44, Slavko wrote:

Hi,

Dňa Fri, 31 Jan 2014 00:25:08 +0100 Hans Breuer h...@breuer.org
napísal:


[...]

Placing actions already available in the menu should be an easy task
given the right selection. Customization would require some deeper
knowledge of GTK. The hardest part would probaly be to put some of
Dia's custom property widgets into the toolbar and en/dis-able them
based on the current object selection.


You are right, the proper selection is terrible part. I see the place
for toolbar buttons for alignment, brink back/forward. Buttons for back
and forward (Ctrl+Z/Y), etc.

Customization can be very basical too.
Basic customization of toolbar actions already is possible. Attached you'll 
find the XML file to add the five buttons from your list above.



Perhaps prepare more toolbars,
which will group properties/items as they are in (sub)menus, and make
simple customization by enable/disable whole toolbar as start point?
(My knowledge about GTK is basic only). Or duplicate all menu items to
these toolbars and allow simple enable/disable for particular buttons.

IMO there must be some type of common properties, e.g. stroke and fill
(in SVG terms), which can be added.


There is, but my toolbar already is almost filled with the five extra buttons.


+ there is not a cursor change, when it is above the object resize
point, the GUI feedback is missing

Available with Dia master by


And for all other implemented parts: thanks :-)

Is the new release on plan in near future?


No really. I try to avoid too much planning for my spare time ;)

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
ui
  toolbar name=Toolbar
	toolitem name=FileNew action=FileNew /
	toolitem name=FileOpen action=FileOpen /
	toolitem name=FileSave action=FileSave /
	toolitem name=FileSaveas action=FileSaveas /
	toolitem name=FileExport action=FileExport /
	toolitem name=FilePrint action=FilePrint /
	separator/
	toolitem name=EditUndo action=EditUndo /
	toolitem name=EditRedo action=EditRedo /
	toolitem name=EditCopy action=EditCopy /
	toolitem name=EditCut action=EditCut /
	toolitem name=EditPaste action=EditPaste /
	separator/
	toolitem name=ObjectsAlignLeft action=ObjectsAlignLeft /
	toolitem name=ObjectsAlignCenter action=ObjectsAlignCenter /
	toolitem name=ObjectsAlignRight action=ObjectsAlignRight /
	toolitem name=ObjectsSendtoback action=ObjectsSendtoback /
	toolitem name=ObjectsBringtofront action=ObjectsBringtofront /
	separator/
	toolitem name=ViewZoomin action=ViewZoomin /
	toolitem name=ViewShowall action=ViewShowall /
	toolitem name=ViewZoomout action=ViewZoomout /
	separator/
  /toolbar
/ui
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Thanks for everything!

2014-01-30 Thread Hans Breuer

At 30.01.2014 19:07, Mark Buteyn wrote:

I've enjoyed getting to know dia.  I'm using it for network documentation
and having fun.


:-)


I use a lot of HP Procurve networking equipment and was hoping to be able
to convert the HP provided visio templates to Dia and haven't been
successful so I started to roll my own.


Was there a common exchange format you tried?


My questions:
1:  When creating shapes it seems to crash if there is text in the shape.
I created a new dia file with just a text attribute and exported it to a
shape and it worked, the shape would import but the text didn't appear.  Am
I doing something wrong or does text not work well with the SVG subset that
the .shape file uses?

Might be https://bugzilla.gnome.org/show_bug.cgi?id=668587 if you are using 
Dia 0.97.2



2:  When creating a diagram of a switch, I used Polygon to create the
network jack so there are 16 connection points per jack. Likewise there are
8 connection points for circles and squares. Is there a way to define /
remove connection points before exporting to a shape or is that something
that can only be done by exporting to a .shape file and removing the
unnecessary connection points.

With the current development version you could use Convert to Path on you 
Polygon to get rid of all it's connection points. I do not know a way to 
get rid of connection points with a released Dia version.



Thanks again for those who contribute.  If I can get my Procurve shapes to
my satisfaction I'll share those back


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Changing styles on selected objects

2014-01-19 Thread Hans Breuer

Hi Dimuitru,
At 18.01.2014 16:05, Dumitru Ursu wrote:

[...]
I've run into a into an issue, and I'm not sure whether is a bug or feature:
Works for me as expected with Dia master and dia-0-97, but maybe you are 
stumbling about it's usability problem.



Steps to reproduce:
1. Open Dia
2. Switch to UML diagrams
3. Add 2 class diagrams on the canvas
3. Change the text color of one of them, from the styles tab
4. Select both diagrams, duble click them
5.  Try to change the color of text. Click Apply or Ok
You have to really change the color - i.e. touch the widget - even if it is 
already shown as you want it. This interaction is necessary to differntiate 
just inconsistent properties shown from the ones the user really wants to 
change.

6.  The new color is not applied to the diagram with the changed styles.

If you modify the text color of both, neither will change the colors when
trying to do a mass color change.
Is this the expected behavior?
If it does not behave like described above you have found a bug I can't 
reproduce.

I'm running Dia complied from git.

As I said: the behavior is consistent between 0.97 and master for me.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Transparency for objects in Dia?

2014-01-19 Thread Hans Breuer

At 16.01.2014 07:41, David O'Shaughnessy wrote:

I’m trying to get transparency on a standard polygon in Dia, but the
colour picker never has the opacity option in it (unlike the screenshot
here http://dia-installer.de/doc/en/objects-chapter.html#color-selector).


Apparently the manual is ahead of it's time (even on the dia-0-97 branch).


I’ve tried Dia 0.97.2 on Mac, Linux, and Windows, and they all have the
opacity slider missing (for all shapes). Is there any way around this?
Yes, build from git. Transpareny is only available with the development 
version yet.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding a user defined attribute to the standard line - or another line-object, that works the same as the regular line object, but with user definable attributes in dia?

2014-01-19 Thread Hans Breuer

At 15.01.2014 15:25, Einar Indridason wrote:

On Wed, Jan 15, 2014 at 2:17 PM, Steffen Macke d...@diagramr.biz wrote:

Hi Einar,

if you have a chance to look at the current development state
of Dia in git master, you'll find that the standard line object
is equipped with a number of meta fields that could be possibly
used for your purpose.


Cool!  Any idea when that will become the next released version?
If you only want programmatical access to the meta info property that 
should be possible with Dia 0.97 already [1]. IIRC it is just the meta info 
GUI which is new with the develpment version [2]


[1] 
https://git.gnome.org/browse/dia/commit/?id=b21e21ddcd6a8970b69a0cf48be0859faa1606bb

[2] https://git.gnome.org/browse/dia/tree/NEWS#n51

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Can you call an export filter from pydia?

2014-01-19 Thread Hans Breuer

At 10.01.2014 19:03, Dan Katz wrote:

Hi -

I’d like to put together an action which would basically do this: 1.
Export current diagram to some format (e.g. SVG) 2. Launch some external
program to operate on the exported diagram 3. Modify the current diagram
based on the output of the external program The net effect is that the
user can run the external program on their diagram by selecting a menu
item, have the result pop up in their current diagram, and continue
working without ever feeling like they left the Dia session.

Most of this is pretty easy with PyDia, but I haven’t found a simple way
to export the current diagram in that API.  The Diagram class has a
save() method that takes an optional name, but nothing I can see that
looks like an “export()” method that would take an export filter name.

Export is indeed a facility not directly available with PyDia. I did some 
experiments regarding that with the 2nd bindings [1], [2] but that's 
slightly bitrotten since than. And it wont help with PyDia.



Am I missing something obvious here?

Not that obivous I think, but anyway you should be able to use the 
exisiting PyDia svg export (diasvg.py) directly from your PyDia plug-in.
Making use of Dia's meta info facility might also be an option, depending 
on the parser of your external program.


[1] https://mail.gnome.org/archives/dia-list/2007-March/msg00092.html
[2] https://git.gnome.org/browse/dia/tree/bindings/test.py#n44


Thanks.

Dan ___ dia-list mailing
list dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list FAQ at
http://live.gnome.org/Dia/Faq Main page at http://live.gnome.org/Dia





--
 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Extending Dia

2013-10-23 Thread Hans Breuer

At 20.10.2013 08:53, naman.iitb wrote:

Hello

As a part of Course Project we need to extend dia by providing some extra
feature, may be a new UML Architecture feature which is not available or
enhancing currently present  features.

There is a long list of feature requests for Dia available via bugzilla, so 
called enhancement bugs, the following link filters them for UML:


https://bugzilla.gnome.org/buglist.cgi?short_desc=UML;bug_severity=enhancement;classification=Other;query_based_on=dia-enh-bugs;query_format=advanced;bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;short_desc_type=substring;component=exports;component=general;component=import;component=objects;component=shapes;component=win32;product=dia;known_name=dia-enh-bugs


Can Someone please help in providing me such list.

There are some features I see missing for the next release, at least one of 
them UML related, i.e. making the UML Class dialog work without any 
handwritten UI code in objects/UML. The main file for this is 
https://git.gnome.org/browse/dia/tree/lib/prop_sdarray_widget.c


But before I put significant time in finding potentially interesting 
features for you, could you elaborate a bit more on the intended scope for 
your course tasks? Is it meant to be only UML related? What about the 
intended time frame? Exisiting experience?


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: [ANN] Dia Python plugin for Postgres

2013-10-21 Thread Hans Breuer

At 16.10.2013 13:18, Chris Daley wrote:

Greetings fellow Diaistas,

I had a need for designing database diagrams in Dia and importing/exporting
them to Postgres. I tried some of the existing solutions and was never
quite satisfied with them so in the end I wrote my own.

It's pretty freshly baked, I only finished the first cut of it last night
and I'm no Python expert but here it is in all its glory:

https://github.com/chebizarro/postdia

Looks interesting and IMHO implementing this as a Dia plug-in is the right 
way to go.



A few points to make before I get around to documenting it properly:

What it does:

- it will import a database from a Postgres server and create a UML diagram
which is, for the most part, based on the tedia2sql format -
http://tedia2sql.tigris.org/usingtedia2sql.html
There is a sample Dia file included which was generated by the plugin.

- it will export a UML diagram based on the above specification to a
Postgres compatible SQL file.

Could you eloborate a bit more why you choose UML to represent the database 
tables? Since Dia 0.97 there are dedicated database objects by 
https://git.gnome.org/browse/dia/commit/?id=b083ef1f0eec15b3f157d256a5a56548c82148e7


Is there some issue with the set of databse objects, which made you avoid 
them in your plug-in?


Thanks,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Adding class to SVG Export

2013-10-21 Thread Hans Breuer

At 21.10.2013 16:48, jul@gmail.com wrote:

Hi

I am trying to use Dia to generate svg diagram for presentations build
using reveal.js, and I need to modify the way the svg is exported.

Context : Reveal.js https://github.com/hakimel/reveal.js/ is a small
framework for creating presentation using HTML. Of course SVG can be
included in the HTML file.
One of the feature of reveal.js is to be able to display the content
of a slide step by step using the class fragment( See
https://github.com/hakimel/reveal.js/#fragments and
http://lab.hakim.se/reveal-js/#/fragments ).
A small test shows that it work for SVG too : I can have a beautiful
diagramm in my page that appears step by step, the problem is I just
need to edit the SVG by hand...I would like to use Dia for that, of
course.

I have actually 2 problems :

- include class and data-fragment-index in the properties :
easy for the shapes thanks to ext_attributes, but I have no idea of
what to modify to add a property to arrow, lines, polygon, etc...

It might be possible to use the objects meta data dicitionary for this, but 
only the current development version has a GUI for it.


Another idea could be to manage you animations by distributing objects to 
layers and encode class and index in the layer name.



- SVG export : it seems to me that 2 exports exists : diasvg.py and an
integrated export.
The python script is called when using export SVG plain or SVG
compressed, the integrated export is called on Scalable Vector
Graphic. Right ?
Mostly. There usually is a third SVG exporter provided by the cairo 
plug-in, but it's availability depends on the buid system configuration.



The 2 exports are not exactly the same, the integrated export
generated g for each element, and that's on this element I want to
add the class. The python script seems not be able to add those tag,
but I am perhaps wrong.

The two exporters are definitely not exactly the same. They are 
intentionally producing different output. With the current development 
version it is possible to handle group creation on the object's rendering 
level. See:

https://git.gnome.org/browse/dia/commit/?id=3cf5a400d9924a7dc6fc5e67cec166a466885887


So my questions are : am I on the right way ? Is it possible to do
what I want without modifying a single line of code ?
How is the behavior of the source code supposed to be changed without 
changing the source code?



is it worth it ?

Not sure I get this question. Shouldn't you be the one to answer it?

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: layer.remove_object() doesn't apply to connection points

2013-10-01 Thread Hans Breuer

At 27.09.2013 13:13, Bao Niu wrote:

Syndrome: If you have a Database -- Table on screen, and then add a
Standard - BezierLine connecting to one of the table's connection point,
you cannot use python's API to disconnect this two objects
programmatically.
To me this sounds like a bug in your code. Isn't it that you just don't 
know how to achieve this?

When using layer.remove(BezierLine),
Apparently you are assuming layer.remove() is also deleting the object, 
which it is not. Object destruction is triggered by the object's destroy() 
method, it includes breaking the remaining object connections. A weak spot 
is, that it's in the resposibility of the API user to not access the object 
after destruction.

and then
update_connections(table), the connection is still there

Are you expecting a display update from update_connections()?

The only way you
can disconnect the two is manually delete the BezierLine from the screen.
There is no way to do this programmatically.

In all you described so far you did not try to disconnect at all. You are 
just assuming that removing an object (from a layer) should also get rid of 
the connection. If you really want to disconnect there is 
Handle.connect(None) to do this. But of course that would not delete the 
object, but just break the connection.



This seems to be a bug. Is there any solution?

As I said, I think the bug is in your code/assumptions. If you want help 
debugging actually providing a minimal, but complete example for the issue 
you have would be helpful.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: What's wrong with comment input box in linux?

2013-09-25 Thread Hans Breuer

At 25.09.2013 00:07, Bao Niu wrote:

There seems a bug in Dia under Ubuntu Linux. When you click attributes, the
comment field should be an input box. Now it is just a collapsed line, and
doesn't allow you to put anything in it.
Is it a bug or it's me missing something here?


https://bugzilla.gnome.org/show_bug.cgi?id=689162

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: how to invoke unselect() method from DiagramData?

2013-09-16 Thread Hans Breuer

At 16.09.2013 13:13, Bao Niu wrote:

I'm using python script and trying to programmatically pass a newly opened
tab DiagramData to the script.
If you would create the diagram from the script you should already have the 
diagram object.

The interface is (DiagramData, flags).
How can I invoke unselect(), which is a method of Diagram class, from
DiagramData instantiation?
You could turn a DiagramData object as got from the callback function into 
a Diagram object by the following function:


def GetAsDiagram (data) :
for d in dia.diagrams () :
if d.data == data :
return d
return None

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: suggestion

2013-09-16 Thread Hans Breuer

At 14.09.2013 12:43, Zsolt Boda wrote:

Hi Guys,

it is hard to grab an item and resize (eg edge of a box or the message on
the UML arrow). Could you make the handler squares double size or maybe the
size could be configurable in preferences?

The handle size is not specific to any object, it is globally defined for 
all objects. IMO it is of the right size especially with thypical montior 
resolutions (you should almost always be able to position your mouse with a 
7 pixel precision). I hesitate to make such things configurable, but if you 
want to experiment yourself, change

https://git.gnome.org/browse/dia/tree/app/handle_ops.c?id=97add178fedc641344cb813edb682c45c8c4817f#n25
and recompile.

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: [PATCH] fix some french translation + fix some compilation warnings

2013-09-13 Thread Hans Breuer

At 08.09.2013 21:13, Thomas Burg wrote:
 Hello

 Find attached 2 patch one complet french translation and the other fix
 several compilation warning.

Thanks for the patches. I've applied 4/6 of your compiler warning fixes.
Some of them I prefer to keep, for different reasons:
 - lib/arrows.c : from my understanding emitting the warning
   is simply wrong (I guess it was about not initialized variable)
 - plug-ins/stress/stress-memory.c : it's a reminder to some posix todo

I'm not applying your translation update because
 - my French is not good enough to really review it
 - the accelerator changes look odd, why did you remove some?
 - some obsolete translations (sissi is gone for a while)

Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Shema for DIA format

2013-08-30 Thread Hans Breuer

At 28.08.2013 16:30, Alejandro Imass wrote:

On Wed, Aug 28, 2013 at 4:33 AM, Tveritinov, Alexey
alexey.tveriti...@sap.com  wrote:

Hello all.

Is there an XSD describing DIA file format ?



Excellent question. I don't know of one

Not an XSD but a DTD is available at
https://git.gnome.org/browse/dia/tree/doc/diagram.dtd


and would probably be hard to
manage because of the different modules (UML, IDEF0, Flochart,etc.)
It should be possible to generate a full XSD from information available at 
runtime. But IMO that would be the only feasible way to maintain it.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia and TeX: PSTricks and PGF export

2013-07-17 Thread Hans Breuer

At 16.07.2013 15:20, ABourgeois@Free wrote:

Hi again,

Update on this topic: it appears there's another issue, this one concerning
the text color.

This issue is already reported as
https://bugzilla.gnome.org/show_bug.cgi?id=688663
The patch there seems to implement the same solution you propose.

Regarding your text escaping issue see:
https://mail.gnome.org/archives/dia-list/2010-August/msg00020.html


Any ideas to generate properly the PGF file from DIA?

Change the source to your needs ;)

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to deal with menupath in dia.register_callback()

2013-06-29 Thread Hans Breuer

At 29.06.2013 13:13, Bao Niu wrote:

I tried this in my code:
dia.register_callback(ModKeys, Display/Database/ModKeys, mod_keys())

There is one obvious bug in your code: you are supposed to pass the 
function as paramter to register_callback, not the return value of your 
function.



I was expecting that there would be a new menu called Database showing up
in the top, but instead it is ModKeys=Activate, what is the logic of
menupath here?

- You are not supposed to create top level menu entries
  just from the plug-in
- If you really need such it has to be added to the corresponding
  ui file first (integrate-ui.xml or display-ui.xml)
- The random text in the menu might be an artifact coming from your script.
  In my experiments I haven't seen such.


I couldn't find documentation on this topic in our forum.

 Could anybody please help explain a bit? Many thanks.
If you want help debugging your source it is generally a good idea to 
provide a minimal working example exhibiting the behavior you don't understand.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: API to Dia's export functionality

2013-06-26 Thread Hans Breuer

At 24.06.2013 17:48, Mirko Vukovic wrote:

Hello,

I am writing some lisp (Common Lisp) code to export dia files to png
files.  Right now, I am using the command line switch (-e).


That's the only supported way ...


But I am wondering if it is possible via one of Dia's libraries using a
foreign function call.
... on Windows it might be possible to use app_init() from dia-app.dll, 
which is basically the old main function taking the command line argument 
count and the string array as parameters. But please remember that Dia is 
an application and not designed as an API for diagram processing.



If so, which library, and what is the function
name, and in what file is it defined.

Every Dia format except the native diagram format is useable via the second 
Dia language bindings [1]. See 
https://git.gnome.org/browse/dia/tree/bindings/test.py for an example 
script in Python.


The language bindings create with SWIG, which list CLISP as one of the 
supported target languages.  See: http://www.swig.org/compare.html


But you would probably need to write some Lisp specific code on your own.

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Dia grid snapping

2013-06-26 Thread Hans Breuer

At 22.06.2013 18:04, Dumitru Ursu wrote:

Hello,
I'm doing some UML diagrams in Dia, and while I'm very satisfied with the
program itself,
I've runned into some issues.
The thing is, it's very hard to draw straight diagrams. I use grid
snapping, but the diagram looks like hell.
To make grid alignment useful every element needs to play well on the grid. 
This is not the case for UML state diagrams given that elements are sized 
by their text content.



Then I disable grid snapping, and I can come pretty close to what I need,
but it's far from perfect.
http://storage8.static.itmages.com/i/13/0622/h_1371917042_8552590_2c8f9d65f8.png


You could use Center and Middle from the Object/Align menu.
The development version additionally has Objects/Align/Connected but it 
needs some debugging for the diagram type at hand.




One more thing is very annoying: object snapping. It doesn't work as
supposed, it's very tricky to make
an arrow to snap in the place I want.


Yeah, I'm usally switching it off for UML diagrams.


[...]


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: What does the flags parameter function?

2013-06-26 Thread Hans Breuer

At 20.06.2013 10:48, Bao Niu wrote:

When defining the following python script:
  def ListConnections(data, flags):

What does the flags parameter function? It doesn't seem to get used in
that particular function. Thanks.

Brief checking of Dia's source shows it is not used aynwhere. IIRC it was 
intended for future extensions, but there apparently was no need.


 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Fwd: API documentation for beginners

2013-06-19 Thread Hans Breuer

At 19.06.2013 21:19, Bao Niu wrote:

Hi there. I'm learning Dia python scripting and very interested in it.
However I found the current documentation for APIs is a little too terse,
only meant for those who are in the knows. For example I couldn't find any
piece of information on the difference between layers[0] vs active_layers.

Just looked up in the current documentation. It has:

active_layer
Layer currently active in the diagram.

layers
Read-only list of the diagrams layers.


Is there any documentation of API that is more detailed, better tailored
for beginners?

I'm not aware of more detailed API documentation. And I'm uncertain what 
would be necessary in this regard. At least I consider explaning the 
difference between a list and a single item to be out of scope for Dia.


Regards,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: [dia] Align Connected: option missing from Align menu

2013-06-04 Thread Hans Breuer

At 23.05.2013 16:45, Matija Kecman wrote:

Hello,

Thanks for developing Dia, it's a very useful tool!

I am having an issue where the Align Connected option is not appearing in
the align menu. HelpAbout says that I am using dia-normal 0.97.2

Given that Align Connected is a feature of the current development 
version this is no surprise to me. See: 
https://git.gnome.org/browse/dia/commit/?id=f705f2d7f



I have tried with a minimal example of a uml diagram with 3 classes
connected with association arrows, A to B to C. The classes are initially
not aligned, if I select everything then ObjectsAlignAlign Connected is
missing, and this also happens when I select A and then use Ctrl+Shift+t
many times to select various connected objects.

Dia's menu items visibility does not depend on the context. AFAICT there is 
no Align Connected in Dia 0.97.x



Can anyone help with this?


Where did you get the information it should be available with your version?

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Hello dia I Wonder hox is align text when we export from dia to dxf

2013-06-04 Thread Hans Breuer

At 28.05.2013 19:46, denis Bertin wrote:


The groupe code 71 is not defined in your convertion for Autocad DXF format 
howunderstand it ?


https://git.gnome.org/browse/dia/tree/plug-ins/dxf/dxf-export.c#n544

A brief check of the Dia's implementation against the specification implies 
there might be a bug with using 72 instead of 71. But I don't have a 
reliable DXF importer available to check.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to add relationship lines?

2013-05-08 Thread Hans Breuer

At 07.05.2013 00:37, Michael Ross wrote:
[...]


I hear that being able to select multiple entities and change their
properties altogether is coming (good when you want all the properties to
be alike among the group).  Do not trust rumors however.

I wouldn't call the Dia 0.97 release announcement a rumor. Changing 
multiple properties at once was one of it's highlights. See:

https://mail.gnome.org/archives/dia-list/2009-May/msg1.html

But maybe I misunderstood the point you tried to make?

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: Custom shape similar to Resizable - Grid

2013-05-08 Thread Hans Breuer

At 08.05.2013 14:15, YaoYuan wrote:

Hello,

I am new to Dia. I want to define a shape similar to Resizable - Grid so
that I can create it with some paramete. Is there a way to do this?

I'm not aware of any object Resizable - Grid in standard Dia, but assume 
you are refering to the object from the Misc sheet with the type name Misc 
- Grid.

The object behavior is defined with C in the file
https://git.gnome.org/browse/dia/tree/objects/Misc/grid_object.c

There is a mechanism to pass one creation paramter from the sheet to 
programmed objects. It is up to the object implementation to interpret that 
creation parameter, so the change you intend almost certainly involves 
writing some code.


HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to change the UML line width attribute ?

2013-05-06 Thread Hans Breuer

At 02.05.2013 21:24, Alejandro Imass wrote:

On Thu, May 2, 2013 at 2:14 PM, Lecoq Maximemaxime.leco...@wanadoo.fr  wrote:

Ok, thanks. So I did git clone and saw that it already has been done
(apparently since 2010-09-18 :
https://git.gnome.org/browse/dia/commit/?id=9ac7c0aa4b2c1edc001fb5f9e2e0ce1803bae103).
It is possible to set the line width attribute on UML lines using the Dia
git version.
Why this feature isn't available in the default Dia package
(I'm under Debian) ?

The explanation is easy: Dia releases are done from a branch. The latest 
release branch is https://git.gnome.org/browse/dia/log/?h=dia-0-97




Debian stable usually ships with very old versions of everything.
Testing is a bit better and unstable is not very useable IMHO. Anyway,
I'm using the binary package 0.97.2 on a Mac and UML lines don't have
that attribute. We have people using the MacPorts version which is
usually more up to date and it doesn't have that either, so I'm
guessing it's not in the 0.97.2 version at all.


No need to guess if you understand the branch strategy of Dia releases.
The high level summary of releases is availbale via:
https://git.gnome.org/browse/dia/tree/NEWS

The issue under discussion is not directly in the NEWS file, but it is the 
first one listed by the referenced query:

https://bugzilla.gnome.org/buglist.cgi?product=diatarget_milestone=0.98

HTH,
Hans

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



Re: How to add relationship lines?

2013-05-05 Thread Hans Breuer

At 05.05.2013 15:39, Genadi Saltikov wrote:

Hello!

I've been trying Dia on Ubuntu 13.04 and it works great!
I am doing ER Diagrams for various uni assignments in few courses.

However, I cant figure out, nor find anything in the documentation about
how to create relationships between objects such as 1:N, 1:* etc?

As seen in this example:
https://live.gnome.org/Dia/Examples?action=AttachFiledo=viewtarget=er-demo.png


If it is in the sample maybe you should look at it's original diagram:
https://git.gnome.org/browse/dia/plain/samples/ER-demo.dia

 Hans at Breuer dot Org ---
Tell me what you need, and I'll tell you how to
get along without it.-- Dilbert
___
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia



  1   2   3   4   5   6   7   >