Re: GtkAction, Plugins and PyGtk

2006-05-14 Thread Hans Breuer

Hi Robert,
it seems as if again I wont find the time this weekend to apply your
patch to my local tree. So here is some feedback from reading your patch.

On 07.05.2006 23:07, Robert Staudinger wrote:

On 5/4/06, Robert Staudinger <[EMAIL PROTECTED]> wrote:

On 5/3/06, Hans Breuer <[EMAIL PROTECTED]> wrote:
> On 03.05.2006 21:22, Robert Staudinger wrote:

[...]
> So IMO the way to go would be to change the 
filter_register_callback() to

> something more appropriate to action based menus and change some few
> plug-ins. One of the problems action based menus are supposed to fix
> cleanly is http://bugzilla.gnome.org/show_bug.cgi?id=171397
>
> Having a proxy action seems to be a small price to pay ...

Ok, i will look into that.


A new patch is available now [1] which fixes the plugin issue by
introducing a new call:
dia.register_action (
   action, # string
   label, # string
   path, # string
   callback) # callable

which is an enhanced version of dia.register_callback.


Looks fine. Probably we should just drop the old signature
and thus break the (few?) plug-ins not living in Dia's tree.


If you could look at the patch that'd be great. Some feedback before
tearing things apart when moving the diagram window to use
GtkUIManager would be nice.


Some general remarks, more detailed patch review following.

- Apparently you are using a tab width of 4 while 8 is commonly used
- Maybe you could do the new development in some new files like
  app/dia-actions.[hc] to improve the readability of the patches
  and finally have better separation of functionalities than before?

RCS file: /cvs/gnome/dia/app/dia_embedd.c,v
retrieving revision 1.14
diff -a -u -p -r1.14 dia_embedd.c
--- dia/app/dia_embedd.c17 Nov 2003 21:41:24 -  1.14
+++ dia/app/dia_embedd.c7 May 2006 20:54:11 -

...

+/* TODO is this needed, what for?
   The hiding of some of our menu entries is necessary to
   adapt to the 'run-embeded' case, e.g. no File/(New|Open|Exit)
   because these would conflict with the embedder's menu entries.

But maybe we should just remove app/dia_embed.c

--- dia/lib/filter.h4 Dec 2004 23:53:21 -   1.10
+++ dia/lib/filter.h7 May 2006 20:54:15 -
[...]

If you change the API between plug-ins and core you should also
increase DIA_PLUGIN_API_VERSION in lib/plug-ins.h to avoid
crashing on older plug-ins possibly laying around.


--- dia-orig/data/dia-ui.xml1970-01-01 01:00:00.0 +0100
+++ dia/data/dia-ui.xml 2006-05-07 19:10:25.0 +0200

To me a different naming conventions for actions looks more
natural, e.g. similar to what's done in The GIMP.
Instead of CamelCase ("FileNew") could we use all lower
as in "file-new" ? [Note: I don't know exactly the difference
between 'action' and 'name'. The GIMP people - who usually do
give good examples to follow - are using camel case for 'name'
but as described for 'action'.]


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
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Dia ChangeLog report for 2006-05-15 03:00:00 UTC (Mon 15 May)

2006-05-14 Thread Dia ChangeLog Daemon
Snapshots available at http://www.raeder.dk/~larsrc/Dia/snapshots

*** Recent ChangeLog entries:

--- ChangeLog.previous  2006-04-21 05:00:15.0 +0200
+++ dia-cvs-snapshot/ChangeLog  2006-05-15 05:00:12.737281312 +0200
@@ -1,3 +1,42 @@
+2006-05-14  Hans Breuer  <[EMAIL PROTECTED]>
+
+   * plug-ins/python/python.c : protect the plug-in against
+   initializing if Python already is initialized. This PyDia extensions
+   is designed for embedding Python.
+
+   * plug-ins/python/pydia-property.c : LineStyle.dash may be either
+   Float or Integer.
+
+   * plug-ins/python/diasvg_import.py : remove FontSize debug spew
+
+   * lib/font.c : GDK_WINDOWING_WIN32: if called with a display already
+   setup use the pango context matching the display. Otherwise fallback
+   to a context from PangoWin32 (matches only for gtk+-2-6, not the one
+   used since gtk+-2-8 using cairo.
+
+2006-05-13  Hans Breuer  <[EMAIL PROTECTED]>
+
+   [ also applied to branch dia-0-95 ]
+   * objects/UML/umloperationc: add "query" to umloperation_offsets.
+   Patch from Peter Allin, fixes bug #338336
+
+   [ also applied to branch dia-0-95 ]
+   * app/diagram.c(diagram_ungroup_selected) : operate on a copy
+   of data-Selected cause the original is modified during use.
+   Patch from Victor Stinner, fixes bug #334771
+
+   * configure.in config.h.win32 : development started again so 095+cvs.
+   Critical bugfixes may go on the dia-0-95 branch (may lead to 0.95.1
+   if necessary)
+
+   * app/diagram.c : removed long-time outcommented code
+
+   * lib/diagramdata.h lib/filter.h lib/geometry.h lib/plug-ins.h
+ lib/properties.h : C++ aware by G_BEGIN_DECLS, G_END_DECLS
+
+   * objects/UML/class.c : don't dia_assert_true(attr->comment != NULL)
+   it is handled everywhere else just fine.
+
 2006-04-19  Lars Clausen  <[EMAIL PROTECTED]>

* installer/win32/dia.nsi:
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia



Re: GtkAction, Plugins and PyGtk

2006-05-14 Thread Robert Staudinger

On 5/14/06, Hans Breuer <[EMAIL PROTECTED]> wrote:
[...]

Some general remarks, more detailed patch review following.

- Apparently you are using a tab width of 4 while 8 is commonly used


If anyone could point me to a description of dia's coding style i'd
happily adhere to that ("gtk", "gnome", ...?). The most recent patch
uses a width of 8 in some places but it was almost done when your mail
arrived.


- Maybe you could do the new development in some new files like
   app/dia-actions.[hc] to improve the readability of the patches
   and finally have better separation of functionalities than before?


Thought i'd only change the code structure where it made sense to make
the patch more readable. Most of the changes are only replacing the
deprecated GtkItemFactoryEntry stuff with its GtkUIManager/GtkAction
counterparts.
Maybe some refactoring of the relevant parts could be done when
implementing toolbars on top of the GtkAction framework.

Best,
Rob
___
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia