sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for layers panel


From: Ralf Engels
Subject: Re: Patch for layers panel
Date: Thu, 16 Jan 2003 21:25:16 +0100

Hi,


<Mail truncated stark>

Ok, seems like there are some errors still in. You are right, dragging can not 
work.
Three words: evolutional software development. The better code will survive. 

> Some general comments:
>
>  - Some lines are indented with tabs. New code should be indented with
>    spaces only.
>

Already changed. The next bugs.

>  - Some of the methods in layerpanel.py are preceeded by comments that
>    describe what the methods do. These comments should be doc-strings.

Yes. It seems like I have to learn about these doc-strings. By the way, is 
there a way to generate documentation like in java?

>
>  - Do we really need the PreviewColorFactory in its current form? ISTM a
>    method of the LayerList that produces a pixmap with the right color
>    is enough. That shouldn't take more than a few lines of code that
>    only uses gdk.
>

Don't know. I just wanted to get it running. If you have a better idea, feel 
free to change it.

> And one more fundamental thing: The tree view was intended to be a
> replacement for the layer dialog eventually. Implementing that would
> probably be easier if we move to GTK 2 which has a model/view
> architecture for trees.

YES!. I want GTK for another cause. To get stock-menu items with pictures.
Here a little patch for setup. Other changes have to be made in 
Modules/Setup.in.
This is how far I managed to get this. There seems to be some issues in the 
Modules.

--- sketch.layers/setup.py      Fri Jan 10 17:55:14 2003
+++ sketch/setup.py     Wed Jan 15 23:55:25 2003
@@ -34,6 +34,9 @@
     'gtk': {'cflags': '',
             'libs': '',
             },
+    'pygtk': {'cflags': '',
+            'libs': '',
+            },
     'libart': {'cflags': '',
                'libs': '',
                'defs': '-DNO_LIBART',
@@ -150,6 +153,13 @@
     flags['gtk']['cflags'] = cflags
     print 'done'
 
+    # get pygtk config
+    print 'determine pygtk-2.0 configuration...',
+    libs, cflags = run_config_script('pkg-config pygtk-2.0')
+    flags['pygtk']['libs'] = libs
+    flags['pygtk']['cflags'] = cflags
+    print 'done'
+
     if '_libart' in flags['ignore_targets']:
         print 'configuring without libart',
     else:




>
> So, I'm not sure we need a special layer dialog in 0.8. OTOH, the tree
> view doesn't yet do what the layer dialog did so having a working layer
> dialog would be better than having a non-working (as far as the layers
> are concerned) tree dialog. So we might just as well add a layer dialog
> for now. For that your dialog is alredy a good start.
>

I don't know how easy it is to manage the layers by the tree view.
I have played around with a project called GILT (see my homepage). It had a 
tree view for all object. 
This did not work as well as I thought it should. The problem is that drawing 
is two dimensional. 
Any type of list-representation is only one dimensional and thus does not 
match. It confuses a lot.

Maybe it could be better to show object relations on the drawing area with 
colored lines.

> > updating of the active layer not working
>
> How are going to handle this? As you probably have seen the active layer
> is still managed by the document object while it should really be
> maintained by the editor.

No real clue.
I wanted the following mechanism:
If at least one object is selected, the layer is selected in the layer panel 
as well.
If you select another layer, the selected object are moved to this layer.

This is how it works in Freehand.

>
>    Bernhard

-- 

________________________
Ralf Engels
Software design engineer
www.rengels.de






reply via email to

[Prev in Thread] Current Thread [Next in Thread]