Re: gEDA-user: This patch is breaking compile

2011-08-25 Thread Felix Ruoff

Hello Markus and all,

(English text starts after this paragraph. Nothing important here in 
German said.)
danke für die Antwort (auf Deutsch! Viel einfacher für mich zu lesen ;-) 
). Ich habe ein gewisses Interesse daran, dass die Patches eingepflegt 
werden, da ich PCB evtl. als GCode generator für meine CNC Fräse 
benutzen möchte, die zur Zeit mit der reprap-Software läuft (wenn ich 
das richtig rausgefunden habe, bist du/sie (blöde deutsche Sprache) bei 
dem Projekt auch aktiv, oder?). Werd jetzt trotzdem in englischer 
Sprache weiterschreiben, damit sich niemand ausgegrezt fühlt.


Thank you for the 'tutorial'. I have much other things to do, so I think 
it will need some days for me to review all your patches.


There has been some discussion already about Markus' patch-set which I 
will summarise here and add some own comments. Please everybody, give 
your comments.


- 0001 let the system library allocate the temporyary file: Alberto 
Maccioni wrote in his mail of 1. May 2011 that the temporary file is 
sometimes needed for checking the result. He suggested to add a switch 
weather the file should be removed or not. My suggestion: Don't use 
tmpfile(), but use the new function gcode_get_filename() from patch 0004 
with an additional suffix for the filename '.png'.


- 0004 create better file names: Why should the default file-suffix be 
changed to '.cnc'? I suggest to apply this patch but let the default 
file-suffix as it is ('.gcode') for compatibility with probably existing 
scripts using this function.


- 0005 add a flag wether to procude advanced G-code: I will suggest to 
set the switch 'produce advanced G-code' to ON by default (backwards 
compatibility).


- 0007 switch from tool-radius to tool-diameter in the user interface: 
This patch breaks backwards compatibility, so have a little headache 
with it. I think, there is a possibility to mark the tool-radius setting 
as deprecated and support both options (for using the gcode-export with 
scripts). I have not done something like this - perhaps anyone have a 
hint? I would also prefer to have the tool-diameter in the user 
interface (as Markus' patch would do).


I have not reviewed the other patches completely (have stopped at 0010). 
I will write again, when I have new questions/suggestions.


If there are no negative comments in the next days I will do the changes 
I suggested and start to apply this patches step by step.


Kind regards,
Felix

By the way: Has anyone started to review the commandline-docu patches I 
have posted last Thursday (gEDA-user: PCB Docu: Patch for command-line 
options)?


@Kai-Martin: I did not forget about your patch for 'Select all connected 
items'



Am 25.08.2011 17:28, schrieb Markus Hitter:


Am 23.08.2011 um 07:50 schrieb Felix Ruoff:

as you can see, some of the patches failed to get applied. The reason 
for this are some changes in git head (the nanometer-conversion). I 
have worked to get this fixed yesterday but did not fully complete.


Ganz unerwartete Unterstützung, vielen Dank. :-)

Das letzte Mal hat es gut funktioniert, ein Rebase für jeden einzelnen 
neuen Schritt aus master zu machen. Also erst die Version auschecken, 
zu der der Patchset passt, dann die Zahl der neuen Schritte zählen, dann


git rebase master~38
autogen.sh  make clean  make
git rebase master~37
autogen.sh  make clean  make
git rebase master~36
autogen.sh  make clean  make
git rebase master~35
autogen.sh  make clean  make
...

bis man wieder bei master ist. Dann fallen die manuellen Korrekturen 
entweder ganz weg oder bleiben zumindest übersichtlich.



Wenn ich da lese, dass ein Patch für nicht durchgehende Vias schon 
seit mehreren Jahren existiert, aber immer noch nicht eingebracht ist, 
dann bekomme ich das Gefühl, dass gEDA so eine Art Aufstand der 
Nicht-Developer braucht. Diese konsequente Verweigerung neuer Features 
ist zu nichts zu gebrauchen, gEDA könnte bereits sehr viel weiter sein.



Gruss,
Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/







___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: This patch is breaking compile

2011-08-25 Thread Felix Ruoff

I forgot to mention, that I refer to the latest patch-set available at
https://bugs.launchpad.net/pcb/+bug/699497 (Patch set of 2011-08-13.


Am 25.08.2011 21:57, schrieb Felix Ruoff:

Hello Markus and all,

(English text starts after this paragraph. Nothing important here in 
German said.)
danke für die Antwort (auf Deutsch! Viel einfacher für mich zu lesen 
;-) ). Ich habe ein gewisses Interesse daran, dass die Patches 
eingepflegt werden, da ich PCB evtl. als GCode generator für meine CNC 
Fräse benutzen möchte, die zur Zeit mit der reprap-Software läuft 
(wenn ich das richtig rausgefunden habe, bist du/sie (blöde deutsche 
Sprache) bei dem Projekt auch aktiv, oder?). Werd jetzt trotzdem in 
englischer Sprache weiterschreiben, damit sich niemand ausgegrezt fühlt.


Thank you for the 'tutorial'. I have much other things to do, so I 
think it will need some days for me to review all your patches.


There has been some discussion already about Markus' patch-set which I 
will summarise here and add some own comments. Please everybody, give 
your comments.


- 0001 let the system library allocate the temporyary file: Alberto 
Maccioni wrote in his mail of 1. May 2011 that the temporary file is 
sometimes needed for checking the result. He suggested to add a switch 
weather the file should be removed or not. My suggestion: Don't use 
tmpfile(), but use the new function gcode_get_filename() from patch 
0004 with an additional suffix for the filename '.png'.


- 0004 create better file names: Why should the default file-suffix be 
changed to '.cnc'? I suggest to apply this patch but let the default 
file-suffix as it is ('.gcode') for compatibility with probably 
existing scripts using this function.


- 0005 add a flag wether to procude advanced G-code: I will suggest to 
set the switch 'produce advanced G-code' to ON by default (backwards 
compatibility).


- 0007 switch from tool-radius to tool-diameter in the user interface: 
This patch breaks backwards compatibility, so have a little headache 
with it. I think, there is a possibility to mark the tool-radius 
setting as deprecated and support both options (for using the 
gcode-export with scripts). I have not done something like this - 
perhaps anyone have a hint? I would also prefer to have the 
tool-diameter in the user interface (as Markus' patch would do).


I have not reviewed the other patches completely (have stopped at 
0010). I will write again, when I have new questions/suggestions.


If there are no negative comments in the next days I will do the 
changes I suggested and start to apply this patches step by step.


Kind regards,
Felix

By the way: Has anyone started to review the commandline-docu patches 
I have posted last Thursday (gEDA-user: PCB Docu: Patch for 
command-line options)?


@Kai-Martin: I did not forget about your patch for 'Select all 
connected items'



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Layer button backgrounds - Keyboard shortcuts

2011-08-19 Thread Felix Ruoff

Hello all,

Am 19.08.2011 02:47, schrieb Andrew Poelstra:

On Thu, Aug 18, 2011 at 01:13:37PM -0400, DJ Delorie wrote:
Ctrl-n  doesn't toggle visibility?  That's what the lesstif HID uses.

No. There is code in there to do this, but (to the best of my
knowledge) it has never worked. The current accelerator code is
very tangled and I wasn't able to fix it last I tried, a few
years ago.

This is another motivation for pulling the layer-selector into
its own widget.
I would not like to use ctrl+n for this because for GTK+ (and propably 
other GUI frameworks) this is the default action for 'New...'. (as 
actually set in gpcb-menu.res).




Am 19.08.2011 02:24, schrieb Andrew Poelstra:

My plan is that you can still toggle visibility byShift-num,
without changing the active layer.
I dislike this shortcut, too, because with the default GTK Key-binding 
it seems to be impossible to bind this shortcuts to the keys. Hmmm, bad 
formulation. What I want do say is, that the Characters you get when you 
hit shift+num are diffrent for several keyboard layouts.


But - having shortcuts is very welcome to me, too :-).

Kind regards, Felix



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Layer button backgrounds

2011-08-17 Thread Felix Ruoff
I personally like the new style you created. Its very nice! I think the 
reason for adding this small rectangles is, that its easier to see, if 
the button is pressed.



Am 18.08.2011 04:00, schrieb Andrew Poelstra:

Hey all,

I am working on moving the Gtk layer-selector into its
own widget (see bug 699482, for example), and cleaning
up the code.

A question I have for the group is: why are the backgrounds
of the layer buttons in little rectangles? Is there
opposition to making the background fill the whole buttons,
like so?:

http://wpsoftware.net/andrew/dump/buttons.png

It would simplify the code a bit and IMHO looks more modern.
There is a bit of an optical illusion making the new buttons
seem bigger, but I checked in gimp and there is no change in
size.




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Layer button backgrounds

2011-08-17 Thread Felix Ruoff

Am 18.08.2011 09:52, schrieb Andrew Poelstra:

Kai (and others), what do you think of this mockup?:

http://wpsoftware.net/andrew/dump/mockup.png

Very good!


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Commandline option --menu-file

2011-08-15 Thread Felix Ruoff

Hello Kai-Martin,

Am 14.08.2011 21:16, schrieb Kai-Martin Knaak:

Felix Ruoff wrote:

By the way: Improving the menu-structure of pcb was the second task,
where I started to code for pcb. But then I found so many other things
to improve, that this will still need a lot of time :-).

I might chime in and start working toward a better menu. The current menu
deviates significantly from what has become standard in other applications.
You are refering to a discussion on the list in autumn 2010, do you? I'd
be happy to see these changes in the default menu.

Yes, this is the discussion, I was refering to. I did some more steps at 
this but not much.
I came to the point, where I think, a 'mixed menu generation' would be 
nice. A lot of fixed menu-items, hard coded, for all this items like 
'Open', 'Copy', ..., and some menu-items generated by (g)pcb-menu.res. 
The advantage would be, that menu-items like 'Paste' can get grayed-out 
(disabled) when there is no data in the buffer. Or the 'Copy' item is 
only enabled, when something is selected (this could avoid the 'select 
an Item to continue' state where the whole menu gets grayed out).


Ok, this are just my actual thoughts. I think, they need a lot of 
discussion and implementation, so it will need some time since I will 
have a working version.
Perhaps I will post my thoughts about the menu-reordering (and 
-renaming) which I have done so far in the next days. Not now, because I 
have to go to work.

BTW, did anyone review the menu patch I sent to the list lately?
Yes, it is the post with [PATCH] in the subject line.
Any chance, it gets applied?

Yes, I have read your patch. Since I have never used this functions, I 
don't know much about them. The task I am actually working on, is to 
check/rebase your patch for commandline options from April 2010. For 
this reason I did not spend more time to figure out, if your patch is 
correct. By the way... I could see nothing in your patch, that could 
break any functionality with PCB ;-). Perhaps, one of the other devs 
have the time to review your patch, else, I will do it when the 
commandline-option-patch has applied.


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Nanometer conversion pushed to git head

2011-08-15 Thread Felix Ruoff
   Congratulations! Really an impressive work!
   I found an 'incomplete function' (or bug) with the new coord-entry in
   the gtk gui:
   The spinning-arrows just work with mil unit set. Even, when changed to
   mm and back to mil, they don't work at my short test.
   And: the line
   /* FIXME: need to write a coord-entry widget for this */
   in gtk/gui-dialog-print.c seems to be 'outdated' ;).
   I am now going to rebase my (Kai-Martin's) patches for the
   documentation...
   Kind regards,
   Felix
   Am 16.08.2011 03:34, schrieb Andrew Poelstra:

Exciting news everyone!

I have just pushed the nanometer conversion patches to git HEAD.


Please test and let me know how things are working. I have
compiled all 56 commits (by script) to confirm that they can
compile so git bisect will work.

I have done a few save/load tests. There does not appear to
be any breaks in the file format.


Thank you all for your support and testing as I have worked
on this over the last month or two.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Commandline option --menu-file

2011-08-14 Thread Felix Ruoff

Hello,

I found a commandline option '--menu-file' in the sources (main.c) which 
seems to be broken. (The expected functionality is given with the option 
--pcb-menu).


Do you think the same like me that this code can be removed?
I appended two patches:
0055: Removes this commandline option
0056: Removes a variable from the SettingTypePtr which seems to be unused.

Please give me some feedback, if I can check this patches in (or do it 
yourself) or if you see problems this patches introduce.


Kind regards,
Felix

From 55435ca6a6e12da07d35da2755fae2c7e7dc1556 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sun, 14 Aug 2011 17:59:53 +0200
Subject: [PATCH] Remove broken --menu-file option

The expected functionality is given by the option --pcb-menu for the GTK+ GUI
and lesstif GUI.
---
 src/global.h |2 +-
 src/main.c   |1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/global.h b/src/global.h
index 2a5ae93..7a09d46 100644
--- a/src/global.h
+++ b/src/global.h
@@ -659,7 +659,7 @@ typedef struct			/* some resources... */
*Groups,			/* string with layergroups */
*Routes,			/* string with route styles */
*FilePath, *RatPath, *RatCommand, *FontPath, *PinoutFont, *ElementPath, *LibraryPath, *Size,	/* geometry string for size */
-   *Media, *MenuFile,		/* file containing menu definitions */
+   *Media,
*BackgroundImage,		/* PPM file for board background */
*ScriptFilename,		/* PCB Actions script to execute on startup */
*ActionString,		/* PCB Actions string to execute on startup */
diff --git a/src/main.c b/src/main.c
index 04b7c2f..8b51609 100644
--- a/src/main.c
+++ b/src/main.c
@@ -550,7 +550,6 @@ HID_Attribute main_attribute_list[] = {
   SSET (FontPath, PCBLIBPATH, font-path, 0),
   SSET (ElementPath, PCBLIBPATH, element-path, 0),
   SSET (LibraryPath, PCBLIBPATH, lib-path, 0),
-  SSET (MenuFile, pcb-menu.res, menu-file, 0),
   SSET (ScriptFilename, 0, action-script,
 	If set, this file is executed at startup.),
   SSET (ActionString, 0, action-string,
-- 
1.7.4.1

From 03cd882da2667416f3b5a5de4148ee4da0bf866d Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sun, 14 Aug 2011 18:17:52 +0200
Subject: [PATCH] Remove unused variable

---
 src/global.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/global.h b/src/global.h
index 7a09d46..0ae5d22 100644
--- a/src/global.h
+++ b/src/global.h
@@ -659,7 +659,6 @@ typedef struct			/* some resources... */
*Groups,			/* string with layergroups */
*Routes,			/* string with route styles */
*FilePath, *RatPath, *RatCommand, *FontPath, *PinoutFont, *ElementPath, *LibraryPath, *Size,	/* geometry string for size */
-   *Media,
*BackgroundImage,		/* PPM file for board background */
*ScriptFilename,		/* PCB Actions script to execute on startup */
*ActionString,		/* PCB Actions string to execute on startup */
-- 
1.7.4.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Commandline option --menu-file

2011-08-14 Thread Felix Ruoff



Am 14.08.2011 18:45, schrieb Andrew Poelstra:

I agree with this. The Media variable isn't used, it should be gone.
Ditto for the --menu-file option. Honestly, we should probably get rid
of --pcb-menu as well, unless someone wants to put in the effort to:

   1. Unify lesstif/gtk handling of it.
   2. Make it take precedence over the hardcoded pcb-menu/gpcb-menu.res


Thanks for the quick reply, I will push this patches immediattely.

By the way: Improving the menu-structure of pcb was the second task, 
where I started to code for pcb. But then I found so many other things 
to improve, that this will still need a lot of time :-).



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: PCB: Documentation for command-line options (unit-changes)

2011-07-24 Thread Felix Ruoff

Hello everybody,

I am actually working on Kai-Martins patch for the command-ine options 
he suggested in


http://thread.gmane.org/gmane.comp.cad.geda.user/29944/focus=30083

Its from April 2010, so there is some work to be done to fit it to the present 
code-base. While doing this, I got two questions:
- What is the actual unit for size-options like '--via-thickness', 
'--line-thickness'? Is the unit for this setting still 1/100 mil? Or is it 
possible to give this option with an unit like '--via-thickness 3 mm'? I have 
in mind, that there were some changes during the last weeks, but I didn't 
figure out the actual situation.
- I realised that the default-value for '--via-thickness' is MIL_TO_COORD(60), 
(line 487 of main.c) but in line 616 it will be set to MIL_TO_COORD(40) if the 
given value is over or under a given limit. Is the difference in this sizes 
done on purpose?

Kind regards,
Felix



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Documentation for command-line options (unit-changes)

2011-07-24 Thread Felix Ruoff


Am 25.07.2011 08:03, schrieb Andrew Poelstra:

(...)

As for units, there shouldn't really be a default unit. If no
unit is given, we will probably go with cmils for the sake of
backward compatibility. But we support giving units like

   --via-thickness 3mm

(no space) and that is what should be done.

Thanks, I will add this to the documentation.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: option dumpmenu missing

2011-05-31 Thread Felix Ruoff

Thanks for your reply!

Am 01.06.2011 00:51, schrieb Kai-Martin Knaak:

Second thing: In the list of HIDs (line 311-323 of your patch) is the
gcode-HID missing.

The gcode HID is pretty new. First time I see it mentioned in the mailing
list is november 2009. Seems like it had not made it to the repo when I
did the command line option patch.

Oh! I did not know, that this is such a new feature! (Used pcb the first 
time in summer 2010)

Third thing: I have started to include the first items of your patch by
hand to my code. The documentation-generation stops with the message
/home/felix/Downloads/geda-git-source/pcb/doc//options.texi:6: `BOM
Creation' has no Up field (perhaps incorrect sectioning?).

IIRC, this means, that there is a section command missing in the texi
code.



Thanks for the hint, I will try to figure out my mistake.

Last thing: I think the same about the numbering and table-formatting as
DJ said in his message
http://thread.gmane.org/gmane.comp.cad.geda.user/29944/focus=30083. I
think, I would prefer the last solution he suggests (extracting to
multiple files), but this are just my 2 cent.

I agree, that this may be better. But it escapes me, why my patch has
to be perfect to be considered for application. Command line documentation
in the manual is as broken as can be. Anything would be better than the
current list of bogus options.

Yes!


  [snip]

  ---)kaimartin(---
If you don't mind, I will rebase your patch and modify it to extract the 
docu-source to several files. Hope, this will get applied in the near 
future.


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: option dumpmenu missing

2011-05-27 Thread Felix Ruoff

Hello Kai-Martin,

I have had a first look at your patch. You are right - nearly the whole 
documentation for the command-line actions is not up to date. So I 
think, the contend of your patch would improve the documentation a lot.


First thing: The patch does not apply to my git repository :-(. Do you 
have an actualized version of this patch, that fit to actual git head? 
Otherwise, I would hand-edit everything. No problem, but this will take 
some time.


Second thing: In the list of HIDs (line 311-323 of your patch) is the 
gcode-HID missing.


Third thing: I have started to include the first items of your patch by 
hand to my code. The documentation-generation stops with the message
/home/felix/Downloads/geda-git-source/pcb/doc//options.texi:6: `BOM 
Creation' has no Up field (perhaps incorrect sectioning?).


I have searched the internet for some time to fix this, but I didn't 
find a solution. Do you (or someone else here) have a hint for fixing this?


Last thing: I think the same about the numbering and table-formatting as 
DJ said in his message 
http://thread.gmane.org/gmane.comp.cad.geda.user/29944/focus=30083. I 
think, I would prefer the last solution he suggests (extracting to 
multiple files), but this are just my 2 cent.


Kind regards,
Felix

Am 26.05.2011 02:43, schrieb Kai-Martin Knaak:

Felix Ruoff wrote:


Later in that thread
(http://www.seul.org/pipermail/geda-user/2010-April/046781.html) you
said, that you will send the patches, but I can't find an attachment

I forgot to attach in that post and sent another one a few minutes
later:
   http://thread.gmane.org/gmane.comp.cad.geda.user/29944/focus=30083

The resulting section of the compiled manual is still available at
   http://lilalaser.de/tmp/pcb_commandline_options.pdf

---)kaimartin(---



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: PCB: option dumpmenu missing

2011-05-25 Thread Felix Ruoff

Hello,

in the pcb-documentation B.3 Menu Files and Defaults is the 
command-line option -dumpmenu described, but it did not work at my 
system. I have searched the source-code and just one boolean variable 
'DumpMenuFile' in global.h can be found. Did I miss something?


If someone of you confirms that this option is not avaiable, I will do a 
patch to remove this from docu and sourcecode.


Regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: file format documentation formatting in the wiki

2011-05-25 Thread Felix Ruoff

I like this idea!

Am 25.05.2011 16:46, schrieb Kai-Martin Knaak:

While looking into ways to beautify my symbols, I just looked at the file
format documentation in
http://geda.seul.org/wiki/geda:file_format_spec
The meaning of fields is given in tables. I find myself counting lines in
the table to identify which item to change in my symbols. How about a column
with numerals that explicitly give the position of the parameter. Essentially,
these are line numbers in the tables like this:
 http://geda.seul.org/wiki/geda:file_format_spec?#circle

Any objections against this change?
I just want to be sure, before I jump into changing them all.

---)kaimartin(---



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: option dumpmenu missing

2011-05-25 Thread Felix Ruoff

Hello Kai-Martin,

Am 25.05.2011 16:32, schrieb Kai-Martin Knaak:
Last year, I wrote a set patches to correct this and while at it, move 
the

source of the information into the source. I introduced an additional
parameter in the comment syntax to allow for arbitrary sequence in the
compiled manual. The only developer who commented, did not like this.
So the set of patches was not applied and the manual is still misleading
when it comes to command line options.

---)kaimartin(---
I have no commit-access, so I can't commit your patches. But - I 
searched the mailing-archive and found this thread:


http://www.seul.org/pipermail/geda-user/2010-April/046634.html

with your first patch to expand the syntax. This was committed on 18 
April 2010 by DJ Delorie. Is this the mailing-thread you refer to?


Later in that thread 
(http://www.seul.org/pipermail/geda-user/2010-April/046781.html) you 
said, that you will send the patches, but I can't find an attachment 
(Perhaps, I am to blind...). I would really like to see this patches! 
For me, a good documentation is important :-). Perhaps you can point me 
to the patches or you can re-upload them to a new bug-report on launchpad?


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: option dumpmenu missing

2011-05-25 Thread Felix Ruoff
A patch to remove this from documentation (and one variable from the 
source) is appended.

Kind regards,
Felix

Am 25.05.2011 19:11, schrieb DJ Delorie:

I think that option is a leftover from my initial HID conversion.

It would have been lesstif-specific anyway, the gtk hid has its own
menu file (gpcb-menu.res, same locations)


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

From 94458c63ae97135964c41f4966b9cdf65ee4ec27 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Wed, 25 May 2011 14:36:34 +0200
Subject: [PATCH 50/50] Remove commandline-option 'dumpmenu' from docu and source

---
 doc/pcb.texi |7 ---
 src/global.h |1 -
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/doc/pcb.texi b/doc/pcb.texi
index ab02382..01d2687 100644
--- a/doc/pcb.texi
+++ b/doc/pcb.texi
@@ -5732,13 +5732,6 @@ application itself.  The master file for all this is the file
 used to create the internal menu definition as well as being installed
 in @file{$pcblibdir}.
 
-You can view the internal menu definition (the default) by running
-@file{pcb} with the @code{-dumpmenu} option, like this:
-
-@example
-pcb -dumpmenu
-@end example
-
 @c --- Appendix C ---
 @node Regular Expressions
 @appendix Element Search/Regular Expressions
diff --git a/src/global.h b/src/global.h
index 9ad5331..498e3f8 100644
--- a/src/global.h
+++ b/src/global.h
@@ -651,7 +651,6 @@ typedef struct			/* some resources... */
*GnetlistProgram,		/* gnetlist program name */
*MakeProgram,		/* make program name */
*InitialLayerStack;		/* If set, the initial layer stack is set to this */
-  bool DumpMenuFile;		/* dump internal menu definitions */
   LocationType PinoutOffsetX,	/* offset of origin */
 PinoutOffsetY;
   int PinoutTextOffsetX,	/* offset of text from pin center */
-- 
1.7.4.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: option dumpmenu missing

2011-05-25 Thread Felix Ruoff

Thank you!

Am 25.05.2011 19:21, schrieb DJ Delorie:

A patch to remove this from documentation (and one variable from the
source) is appended.

Pushed.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Bugtracker-cleanup

2011-05-23 Thread Felix Ruoff

Thanks a lot for reviewing and committing!
Kind regards, Felix

Am 23.05.2011 00:49, schrieb Krzysztof Kościuszkiewicz:

Thanks for taking the time to report the list - status update below.

On Sun, May 22, 2011 at 06:01:49PM +0200, Felix Ruoff wrote:


Here is the list:
 a) Patches for documentation
 - 699306 elements color in manual

Committed.

 - 699391 refcard updates

Committed.

 - 699476 G-CODE export GUI

Commented on the tracker - we need eps files  updated Makefile.am

 aa) Patches for the Webside
 - 704086 download page links to sourceforge

Commented - Peter wanted to run some tests with robot on this bug

 b) Patches for GTK-gui
 - 769815 Fix warnings 'gray50 ignored' for gtk menu

Committed.

 - 699496 Detect case-different accelerators as unique
 - 699510 Cleanup conditional code because GTK 2.12 is required now

Committed.

 - 699493 Add plus and minus to possible keyboard-shortcuts
 c) New features/modifications
 - 699508 Use GTK dialog for confirming file-overwrite (replaces
pcb-dialog-implementation with a dialog given by gtk+)
 d) Patches to the core
 - 699478 refdes labels in new layout can't be moved without restart

Cheers,



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Bugtracker-cleanup

2011-05-22 Thread Felix Ruoff

Hello,

I spend some time with the pcb-bugtracker on launchpad. So, I made a 
list of things, where I think, they can be done without adding new 
problems. Perhaps, someone of the developer with commit-access can have 
a look for them. There also are several patches which looks fine to me, 
but my programming-skills are not enough good to check them (today there 
are 45 bugs with non-commited patches).


Here is the list:
a) Patches for documentation
- 699306 elements color in manual
- 699391 refcard updates
- 699476 G-CODE export GUI
aa) Patches for the Webside
- 704086 download page links to sourceforge
b) Patches for GTK-gui
- 769815 Fix warnings 'gray50 ignored' for gtk menu
- 699496 Detect case-different accelerators as unique
- 699510 Cleanup conditional code because GTK 2.12 is required now
- 699493 Add plus and minus to possible keyboard-shortcuts
c) New features/modifications
- 699508 Use GTK dialog for confirming file-overwrite (replaces 
pcb-dialog-implementation with a dialog given by gtk+)

d) Patches to the core
- 699478 refdes labels in new layout can't be moved without restart

Thank you for taking the time, kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Pressing = key causes PCB to freeze for a few minutes

2011-05-14 Thread Felix Ruoff
   In the default-konfiguration, the '='-Key is for 'Simple optimization'
   from the 'Connects' menu. I can imagine, that this needs some time, but
   I have not tested it now.
   You can disable/modify this by editing the file 'gpcb-menu.res'. There
   is a line
   {Simple optimization djopt(simple)  a={= Key=}}
   . The Values in the braces after 'a=' are the key-bindings for the
   action 'djopt(auto)'. Just the second value (Key=) is relevant, if
   you are using the gtk-gui. If you use the lesstiff-gui, there is a
   special file 'pcb-menu.res'. You can set anoter (unused) key instead of
   the two '=' or remove the whole part 'a={= Key=}', what will
   remove this key-binding for this menu-item.
   Kind regards,
   Felix
   Am 14.05.2011 16:25, schrieb Thomas Oldbury:

   I have not yet figured out what the = key does in PCB, but whenever
   it gets pressed, the program freezes for a few minutes. Unfortunately,
   on my laptop keyboard it is very close to the delete key, so this leads
   to a lot of frustration. How do I turn it off?





___
geda-user mailing list
[1]geda-user@moria.seul.org
[2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Bug: Screenupdate on moving selected objects

2011-05-02 Thread Felix Ruoff
   Thank you, it's fixed at my system, now!
   Am 02.05.2011 00:54, schrieb Peter Clifton:

On Sun, 2011-05-01 at 22:16 +0100, Peter Clifton wrote:

On Sun, 2011-05-01 at 22:55 +0200, Felix Ruoff wrote:

Hello!
   Since commit e323e4636ef7b7239003a41ba305221bc6d9bab1 'hid/gtk:
   Invalidate the damaged region, not the whole view' there is an error on
   moving selected objects. If you select an element (footprint, line,
   ...) and move it with a second klick+drag, just a small part of the
   view is rendered during moving/dragging. The remain of the screen is
   rendered white.

Yep, I can reproduce it here.. I realised it was broken last night but
haven't had a chance to fix the issue yet.

...


Chances are that the underlying problem was existing, but our rather
conservative policy of redrawing the whole screen every frame may have
masked it.


Should be fixed in git HEAD now. There were two bugs (I counted so far),
both were my doing, and specific to the GTK/GDK rendering. One was
failing to clear the clip-region of a graphics context we then went on
to use in the expose handler (the cause of the non-painting you saw
where the majority of the screen was rendered in the default widget
colour).

The second was more subtle, and I'd swapped the X and Y coordinate
conversion macros (not their inputs) when calculating the region to
update on screen - so it was wrong for any case where the board was
flipped, or panned away from the (0,0) origin unequally in the X and Y
directions.






___
geda-user mailing list
[1]geda-user@moria.seul.org
[2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Bug: Screenupdate on moving selected objects

2011-05-01 Thread Felix Ruoff
   Hello!
   Since commit e323e4636ef7b7239003a41ba305221bc6d9bab1 'hid/gtk:
   Invalidate the damaged region, not the whole view' there is an error on
   moving selected objects. If you select an element (footprint, line,
   ...) and move it with a second klick+drag, just a small part of the
   view is rendered during moving/dragging. The remain of the screen is
   rendered white.
   I am really looking forward to have the gl features in the default-pcb!
   The amount of work on committing patches is really impressive during
   the last days, thank you! Hope, to find some time in the next days to
   do some coding for pcb, too :-).
   Kind regards,
   Felix
   I did not open a bug-report for this. I will do it, if it is not fixed
   in the next days 'as a reminder'.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: pcb-20100929 released

2011-04-19 Thread Felix Ruoff

Sorry for jumping into this topic without having read all posts.

I just want to mention, that Cesar Strauss has written a new 
build-script last year, which he has posted to the launchpad bug 699494 
(https://bugs.launchpad.net/pcb/+bug/699494). Perhaps (I did not have a 
test) this patch can help to fix your problems?


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: default pcb stackup change?

2011-04-19 Thread Felix Ruoff

Hello,

I just realized, that the 'view'-label in the status bar is still 
displaying the 'old' boardsize-names.


The appended patch replaces them with 'top' and 'bottom'.

Should I do a separate bug-report for this?

Kind regards,
Felix

Am 11.04.2011 01:42, schrieb DJ Delorie:

I'm pondering a minor change in pcb's defaults to give us a more
useful default stackup.  How's this?

   LAYERNAME (1, top),
   LAYERNAME (2, ground),
   LAYERNAME (3, signal2),
   LAYERNAME (4, signal3),
   LAYERNAME (5, power),
   LAYERNAME (6, bottom),
   LAYERNAME (7, outline),
   LAYERNAME (8, spare),

This encompasses a few changes:

1. Default to six-layer stackup.  You can ignore the signalN or
power/ground layers for smaller boards.  This covers nearly all PCB
users (2/4/6 layers), and the rest can edit the stackup as usual.

2. Always include an outline layer.  Handling an empty outline layer
will need to be tweaked.

3. Rename outer layers to top/bottom, which seems to be what other
packages (specifically, eagle and kicad) use.  Component/solder
isn't as obvious with SMT.  We've used front/back elsewhere before,
too, but that seems to be even less common.

4. Make the default layers in the right order to reflect a physical
stackup.

Note that this would be an interim change until we get around to
either a new-board-wizard or new-means-load-template.

So, geda/pcb users - would such a layout be a better default for you?
Or worse?  Or would something else make more sense?


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

From dfee0f07d5ad0c7da01b10dd948e98fb8ded5b35 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Tue, 19 Apr 2011 16:04:40 +0200
Subject: [PATCH] Change 'view' lable in status bar to top/bottom

Since 11 April 2011 the default layer names are called 'top' and 'bottom'
instead of 'component' and 'solder'.
---
 src/hid/gtk/gui-misc.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hid/gtk/gui-misc.c b/src/hid/gtk/gui-misc.c
index 8bda96d..d4aa4e4 100644
--- a/src/hid/gtk/gui-misc.c
+++ b/src/hid/gtk/gui-misc.c
@@ -508,7 +508,7 @@ ghid_set_status_line_label (void)
 		bclearance/b=%.1f  
 		btext/b=%i%%  
 		bbuffer/b=#%i),
-	  Settings.ShowSolderSide ? _(solder) : _(component),
+	  Settings.ShowSolderSide ? _(bottom) : _(top),
 	  PCB-Grid / 100.0,
 	  (int) Settings.GridFactor,
 	  TEST_FLAG (ALLDIRECTIONFLAG, PCB) ? all :
@@ -531,7 +531,7 @@ ghid_set_status_line_label (void)
 		bclearance/b=%5.3f  
 		btext/b=%i%%  
 		bbuffer/b=#%i),
-	  Settings.ShowSolderSide ? _(solder) : _(component),
+	  Settings.ShowSolderSide ? _(bottom) : _(top),
 	  PCB-Grid * COOR_TO_MM, (int) Settings.GridFactor,
 	  TEST_FLAG (ALLDIRECTIONFLAG, PCB) ? all :
 	  (PCB-Clipping == 0 ? 45 :
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem usability: expand the component tree after filtering

2011-04-07 Thread Felix Ruoff

Hello,

I very like the feature Krzysztof introduced with his patch and would 
like to have this feature in PCB, too.
The appended patch does exactly the same for pcb. The only modification 
is, that the struct 'compselect' is called 'library_window' in pcb.


I have also done a feature request for this patch at 
https://bugs.launchpad.net/pcb/+bug/753643.


Hope, some of you like this feature, too and hope to get it accepted.

Best regards,
Felix


Am 03.01.2011 00:52, schrieb Krzysztof Kościuszkiewicz:

All,

I found it annoying that I need to click through the whole component
tree after filtering the symbol file names.  For some time I've been
running my copy with the change that expands the tree after the
filtering by name is done. This saves 1+ clicks in the most common
use-case: add a known symbol to the diagram.

The patch is here:
https://sourceforge.net/tracker/?func=detailaid=3149995group_id=161080atid=818428

Best regards,
From 9c552a71aaf457d648ad824af4101afffc960509 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Thu, 7 Apr 2011 16:38:51 +0200
Subject: [PATCH] expand library tree after filtering

This patch changes the behavior of the library selection dialog.
After filtering by name is applied the tree view of matching components
is automatically expanded so that all leafs are immediately selectable.
The tree view is collapsed when the filter is cleared.

Patch is adapted from Krzysztof Kosciuszkiewicz's patch for gschem.

Closes-bug: lp-753643
---
 src/hid/gtk/gui-library-window.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index b101576..8c8ae17 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -432,7 +432,16 @@ library_window_filter_timeout (gpointer data)
 
   if (model != NULL)
 {
+  const gchar *text = gtk_entry_get_text (library_window-entry_filter);
   gtk_tree_model_filter_refilter ((GtkTreeModelFilter *) model);
+  if (strcmp (text, ) != 0)
+{
+  /* filter text not-empty */
+  gtk_tree_view_expand_all (library_window-libtreeview);
+} else {
+  /* filter text is empty, collapse expanded tree */
+  gtk_tree_view_collapse_all (library_window-libtreeview);
+}
 }
 
   /* return FALSE to remove the source */
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem usability: expand the component tree after filtering

2011-04-07 Thread Felix Ruoff

Am 07.04.2011 21:35, schrieb Krzysztof Kościuszkiewicz:

On Thu, Apr 07, 2011 at 04:59:12PM +0200, Felix Ruoff wrote:


I have also done a feature request for this patch at
https://bugs.launchpad.net/pcb/+bug/753643.

Hope, some of you like this feature, too and hope to get it accepted.

Pushed with changed patch title (added gtk/hid).  Thanks!

Thank you very much! This was really fast!


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Request for patch-review (and commiting to git head)

2011-03-28 Thread Felix Ruoff

Hello!

I have uploaded some patches for pcb during the last weeks/months to 
launchpad. I am very proud to have three of them applied to git head now 
:-). Thanks for pushing!


The following list contains those patches I have done or modified, which 
seems save to me. I mean save in that way, that they won't break any 
functionality of pcb. I don't want to be impatient, but I would very 
welcome, if someone of the developers with commit-access would have a 
look at these patches to get them applied or to get some (more) feedback :-)


- 699261 footprint library list includes *.pcb files (one-liner)
- 699290 Segfault in png.c lin 204 by empty strcmp()
- 699491 Select adequate folder in file-save-dialog
- 699496 Detect case-different accelerators as unique
- 699476 G-CODE export GUI (just documentation-changes, patch by albmcc, 
git-formatted by me)
- 699391 refcard updates (patch by mhabets, modified and git-formatted 
by me)

- 699508 Use GTK dialog for confirming file-overwrite
- 699510 Cleanup conditional code because GTK 2.12 is required now
- 710145 Add shortcuts for 'Save' and 'New'
- 717294 Remove unused 'DrawVText()' from draw.c
- 740526 GTK-warning on start-up of png export gui

Kind regards,
Felix

P.S.: What is the prefered way I can help you to get patches applied? 
Doing such lists like this at the mailing list? Or assigning the bugs at 
launchpad to someone special? 
http://geda.seul.org/wiki/geda:bug_triage_guide gives some very useful 
hints, but it is not said, what to do if I think a patch is ready for 
committing.



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Request for patch-review (and commiting to git head)

2011-03-28 Thread Felix Ruoff

Am 29.03.2011 01:57, schrieb Markus Hitter:


Am 28.03.2011 um 21:58 schrieb Felix Ruoff:

- 699476 G-CODE export GUI (just documentation-changes, patch by 
albmcc, git-formatted by me)


Does that take the substantial set of new features in the G-Code 
exporter into account?


https://bugs.launchpad.net/pcb/+bug/699497


No, it does not contain documentation for this new features. It just 
documents features already available in git head. (As far as i can see, 
the features of bug 699497 are not committed since now)


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB Shortcut Keys

2011-03-04 Thread Felix Ruoff
   If you compile pcb by yourself, you will find a file 'refcard.pdf' in
   Install-Path/share/doc/pcb. This file gives most of the
   default-accelerators/shortcuts.
   If you are using pcb from a repository of your distro, this file will
   be at /usr/share/doc/pcb/refcard.dvi.gz.
   There are a very few mistakes in it as you can see in Bug LP:699506
   (perhaps someone can push the given patch there???).
   Kind regards,
   Felix
   Am 04.03.2011 19:11, schrieb Rob Butts:

   I hate to ask and bug people but where can I find a list of shortcut
   keys for PCB?
   I'm trying to get a board done to go to fab.
   Thanks





___
geda-user mailing list
[1]geda-user@moria.seul.org
[2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Please test new grids for GTK PCB

2011-03-02 Thread Felix Ruoff

Am 28.02.2011 11:48, schrieb jpka:

* the Yes is not updated also when grid changes via keypress while
 preferences dialog is active
  
  * maybe Yes as string column can be replaced with gboolean and a

  GtkCellRendererToggle?
 Or a custom renderer if really needed. Or a selection could be updated
 on change of grid.

*Please help me with it.* GTK docs is not helpful for me (it's for guru?),
so only complete code examples i can use, but there is total lack of
useful
examples on internet.:(

Hello jpka!
I don't know how to fix the probem with updating the 'Yes'. But as a 
starting point I have changed the string 'Yes' to these radio-buttons. 
It is done by the following changes in src/gui-config.c: 
create_grid_treeview():


in the for-loop:
...
COL_GRIDSTEP, PCB-GridStep[i],
COL_GRIDCURRENT, (i == PCB-CurrentGrid) ? TRUE:FALSE,
-1);
...

Replace the last text-renderer (line 1478) by this code:
renderer = gtk_cell_renderer_toggle_new();
  gtk_cell_renderer_toggle_set_radio(renderer, true);
  gtk_cell_renderer_toggle_set_activatable(renderer, true);
  gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 
(treeview), -1, Current?, renderer, active, COL_GRIDCURRENT, NULL);


Hope, this code is helpful for you.
Kind regards!
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Advanced grids in GTK Pcb

2011-02-28 Thread Felix Ruoff

Am 28.02.2011 17:24, schrieb Kai-Martin Knaak:

Felix Ruoff wrote:

Ctrl+- and Ctr++ are the suggested accelerators for this action by the
GNOME Hid-guidelines

With the vast majority of gnome applications zoom is rarely used,
or not at all. Scroll is much more common. It pays in terms of usability
to have the most common actions accessible with as little hassle as
possible. That's why binding the wheel without modifier to vertical scroll
makes sense in the context of Gnome HID.

By contrast, zoom is one of the most common GUI actions in gschem and pcb.
There is a down side to the bindings suggested by the Gnome HID: You
always need both hands to navigate the layout or circuit. IMHO, this
downside outweighs the benefit of bindings compatible to other
applications.

BTW, Peter Clifton has this defined in his localized branch of pcb+gl.

---)kaimartin(---
I am sorry, but I don't know what you mean with your answer. (This might 
be caused by my poor english...)


I like the current behaviour using the wheel for zooming in and out. 
What I tried to suggest is adding the accelerators Ctrl and the 
Plus/minus - Keys for this. The behaviour of the scroll wheel can stay 
at it is for me.




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Advanced grids in GTK Pcb

2011-02-28 Thread Felix Ruoff

Am 28.02.2011 19:57, schrieb Peter Clifton:

On Mon, 2011-02-28 at 18:06 +0100, Felix Ruoff wrote:

I like the current behaviour using the wheel for zooming in and out.
What I tried to suggest is adding the accelerators Ctrl and the
Plus/minus - Keys for this.

Ok, I think we misunderstood you. Your proposed short-cuts would match
most web-browsers where the font size can be changed.

Ctrl+0 will restore those to a nominal size too - but I don't think
this is relevant for gEDA. I don't think zoom to fit quite matches.


Thanks for the answer! Now it's clear to me!


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Please test new grids for GTK PCB

2011-02-24 Thread Felix Ruoff

Am 24.02.2011 08:17, schrieb jpka:

I prepare patch for new grid management, if you're interested please test it:
https://bugs.launchpad.net/pcb/+bug/724154
Thanks

Hi,

I have had a short test of your powerfull patch. I am not sure, if I 
shoud post my comments to the bug or the mailing list - I chose the list.


Some comments (most of them for usability):
- You often mention in the tooltips the shortcut '^M'. At my system this 
should be 'Ctrl+M'. I didn't know, that '^' is a short-cut for the 
Control key.
- At the menu-item 'Realign Grid by Mark' the b../b does not work. 
The 'b' and '/b' is printed as text.
- You introduces accelerators for 'Zoom In 20%' and '.. OUT .. '. The 
keyname for plus and minus on the numpad are 'KP_Add' and 'KP_Substract' 
(see: http://git.gnome.org/browse/gtk+/plain/gdk/gdkkeysyms.h). I would 
suggest to use the 'normal' plus and minus-signs because: a) I don't 
have a keypad on my laptop, b) In the menu there is no distinguish 
between the signs on the keypad and the normal buttons (at the right of 
the menu-item is printed: 'Ctrl++' and 'Ctrl+-'). The Keynames for + and 
- are 'plus' and 'minus'. (If the patch of LP:699493 will be applied, 
you also can use '+' and '-' in the gpcb-menu.res file.)
- You are modifying the file 'src/hid/common/hidlist.h' with your patch. 
For this reason, the patch did not apply to my newly checked out 
repository. This file is not avaiable if you have just cloned git. I 
think, it will be created by autogen.sh or configure, I don't know.
- Is there a possibility to draw the dots of the grid, that are aligned 
with the dots of the next grid in the colors of the next grid or a bit 
larger?
- The new default grid colors are difficult to see on my displays. I 
would suggest to use other colours by default.


I have not had a complete code review. But since now, everything works 
like expected. Thank you for your work!


Kind regards, Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: pcb GTK tear-off menus don't respond to mouse clicks

2011-02-23 Thread Felix Ruoff

Am 23.02.2011 18:24, schrieb Colin D Bennett:

On Wed, 23 Feb 2011 01:33:17 +
Peter Cliftonpc...@cam.ac.uk  wrote:

Strange - it could be a GTK bug, as it is well known the GTK
developers don't like the tear-off menu feature. I believe it is (or
was intended to be) removed in GTK 3.0.
Tear-off menus are still avaiable in gtk 3.0, see 
http://library.gnome.org/devel/gtk/unstable/GtkTearoffMenuItem.html.


The bug is valid at my system, too. Seems to be a gtk+ - bug, see e.g. 
https://bugzilla.gnome.org/show_bug.cgi?id=620984.



Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Modifying pcb-menu.res

2011-02-19 Thread Felix Ruoff
   If you are using the gtk gui, you have to modify the gpcb-menu.res
   file. The pcb-menu.res file is for lesstif gui. This might be the
   reason for the missing function. The syntax looks right to me.
   Felix
   Am 19.02.2011 23:20, schrieb Oliver King-Smith:

   I am trying to add a keyboard shortcut for Select by Name - All
   Objects.
   I located my pcb-menu.res file and tried adding
  {All objects Select(ObjectByName) active=have_regex a={Ctrl-N
   CtrlKeyn}}
   but it doesn't seem to do anything.  Does anyone have any suggestions
   as to what I might be doing wrong?  It would be handy to have this for
   doing placement on large designs.
   Oliver





___
geda-user mailing list
[1]geda-user@moria.seul.org
[2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Advanced grids in GTK Pcb

2011-02-13 Thread Felix Ruoff
   Am 14.02.2011 07:37, schrieb jpka:

3. Make g (and maybe shift-g) keys to change active grid. Sorry, it's
interfere with current keybinding.

   I would like to suggest using '#' for enable/disable grid, perhaps '%'
   for grid-realign (or your new version of this) and Ctrl+- / Ctrl++ for
   zooming in/out.
   Ctrl+- and Ctr++ are the suggested accelerators for this action by the
   GNOME Hid-guidelines (see
   [1]http://library.gnome.org/devel/hig-book/nightly/menus-standard.html.
   de#menu-standard-view), # and % are used in some other graphic-software
   like Inkscape.
   To use this keys, you need to add them to the KeyTable (key_table[]) in
   src/hid/gtk/gui-top-window.c as shown in the patch of LP:699493.
   Kind regards,
   Felix

References

   1. 
http://library.gnome.org/devel/hig-book/nightly/menus-standard.html.de#menu-standard-view


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB bug: only names, draw a line, undo: segfault

2011-01-30 Thread Felix Ruoff
Can't confirm that. Tried with git HEAD and 20091103 from ubuntu 10.10 
repository (both just with GTK-gui).

Kind regards,
Felix

Am 30.01.2011 14:48, schrieb Stephan Boettcher:

PCB version 20100929
Compiled on Nov  8 2010 at 05:46:11
Debian sid.
gtk.

- Settings-Only Names
- draw a line
- hit 'u' for undo.

-  segfault.




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Where to PCB patchs get submitted now?

2011-01-16 Thread Felix Ruoff



Am 17.01.2011 01:10, schrieb Bob Paddock:

Is there a page on the wiki about how to use git specific to gEDA/PCB,
Like how to format patches etc.?


I think, http://geda.seul.org/wiki/geda:scm has the informations about that.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Reacquainting to geda and pcb

2011-01-04 Thread Felix Ruoff
   Hi,
   press the i - key or use the menu 'Window'-'Library'.
   Kind regards,
   Felix
   Am 04.01.2011 22:09, schrieb Rob Butts:

   Hi Guys,
   I started working on another project where I'm back using gaf.  I
   started new by installing Fedora 14, gschem and PCB.  When I started
   PCB I remember three windows coming up where one was component
   footprints.  That is how I use to see what is available to use.  Now,
   when I start PCB Designer only one window comes up.  How can I see the
   components and their footprints?
   Thanks





___
geda-user mailing list
[1]geda-u...@moria.seul.org
[2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:geda-user@moria.seul.org
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: [Patches] GTK Recent-file-manager

2011-01-02 Thread Felix Ruoff

Am 01.01.2011 23:10, schrieb Felix Ruoff:

Am 01.01.2011 21:35, schrieb Felix Ruoff:

Am 01.01.2011 20:30, schrieb kai-martin knaak:

Hmm. Isolated patches make testing a bit awkward. What might be ok
for simple additions gets progressively less fun for more complicated
changes.

Can you set up a git repository of pcb with your patches applied?
(The way Peter Clifton makes his GL-enabled version of pcb available to
potential testers)

---)kaimartin(---

(...)


I have figured out myself how to set up a git repository on github. 
The page, where you can browse it online is 
https://github.com/fruoff/pcb-fruoff .


If you like, you can get the branch with the following command:

git clone git://github.com/fruoff/pcb-fruoff.git


And now, the same for gaf/gschem (I forgot to create this yesterday 
evening):


git clone git://github.com/fruoff/gaf-fruoff.git

This repository has applied the gschem-patch for the GTK recent-manager 
and the appended patch. The appended patch fixes a warning, if there are 
menu-items without action (e.g. the recent-files - topitem (labeled 
'Recent Files' (Zuletzt geöffnet))). I have also send all these Patches 
to the sourceforge-tracker. Thanks to Bert, who has already leaved a 
comment there!


Kind regards,
Felix
From 71b8a5a3e8e2831065291bd1f6f629cb78b67f18 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 9 Oct 2010 18:35:33 +0200
Subject: [PATCH] Fix warning on moving over menu-item without action

Fix a warning at the info-dialog if the mouse moves over a menu-item which has no action defined, e.g. the top item of a submenu.
---
 gschem/src/x_menus.c |   30 ++
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 6ea77ed..5a7e9ba 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -105,7 +105,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
   char **raw_menu_name = g_malloc (sizeof(char *));
   char *menu_item_name;
   char *raw_menu_item_name;
-  char *menu_item_func;
   char *menu_item_hotkey_func;
   char *menu_item_stock;
   char *menu_item_keys;
@@ -149,11 +148,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
 
   raw_menu_item_name = SCM_STRING_CHARS (scm_item_name);
 
-  if (scm_is_false (scm_item_func))
-menu_item_func = no-action;
-  else
-menu_item_func = SCM_SYMBOL_CHARS (scm_item_func);
-
   if (scm_is_false (scm_item_hotkey_func))
 menu_item_hotkey_func = NULL;
   else
@@ -187,17 +181,21 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
   menu_item_keys = ;
 }
 
-action = gschem_action_new (menu_item_func,  /* Action name */
-menu_item_name,  /* Text */
-menu_item_name,  /* Tooltip */
-menu_item_stock, /* Icon stock ID */
-menu_item_keys); /* Accelerator string */
-menu_item = gtk_action_create_menu_item (GTK_ACTION (action));
-gtk_menu_append (GTK_MENU (menu), menu_item);
+if(scm_is_false (scm_item_func)) {
+  menu_item = gtk_menu_item_new_with_mnemonic(menu_item_name);
+} else {
+  action = gschem_action_new (SCM_SYMBOL_CHARS (scm_item_func),  /* Action name */
+  menu_item_name,  /* Text */
+  menu_item_name,  /* Tooltip */
+  menu_item_stock, /* Icon stock ID */
+  menu_item_keys); /* Accelerator string */
+  menu_item = gtk_action_create_menu_item (GTK_ACTION (action));
+  g_signal_connect (G_OBJECT(action), activate,
+G_CALLBACK(g_menu_execute),
+w_current);
+}
 
-g_signal_connect (G_OBJECT(action), activate,
-  G_CALLBACK(g_menu_execute),
-  w_current);
+gtk_menu_append (GTK_MENU (menu), menu_item);
   }
 
   gtk_widget_show (menu_item);
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: [Patches] GTK Recent-file-manager

2011-01-02 Thread Felix Ruoff

Am 02.01.2011 16:03, schrieb kai-martin knaak:

Just gave it a test run.
The source compiles fine and recent files appears in the menu :-)
A minor complaint: Currently, the list is only populated when I use
the load action from the file menu. IMHO, it should be appended to
by files on the command line and by the save-as action.
You are right, this were fine! I usually don't use the command line 
input, so I didn't think about it. Have just have a look into the code 
and I see no chance to put files loaded by the command line to the 
recent file list if no file-select-window is used (e.g. action: 
'SaveTo()' or 'Save(Layout)', but 'Save(LayoutAs)' is no problem). To 
append files used by the 'save-as'-Dialog is no problem, I appended a 
patch to this mail and will also push it to SF and my github-branch. 
Perhaps someone else has an idea to fix the issue with the command-line 
and the recent list? I will think about it, too.

Some kind of README with a list of changes would be nice. So I know
what great features to look for.

---)kaimartin(---
Good idea. Have just added a file 'README.fruoff' which lists the new 
features/changes. But you can also have a look at the commit-messages of 
the patches.


Kind regards,
Felix
From aca0a21a61fc2265b06d444c0f37a5a89f866756 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sun, 2 Jan 2011 18:47:08 +0100
Subject: [PATCH] Add files to recent-list on saving

Adds files to the recent-file-list on saving, but only, if the file-save-dialog
is used.
---
 src/hid/gtk/gtkhid-main.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 2ec7737..1558f3a 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1329,6 +1329,7 @@ Save (int argc, char **argv, int x, int y)
 	  else
 	hid_actionl (SaveTo, function, name, NULL);
 	}
+  gtk_recent_manager_add_item (ghidgui-recent_manager, g_filename_to_uri(name, NULL, NULL));
   g_free (name);
 }
   else
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: [Patches] GTK Recent-file-manager

2011-01-01 Thread Felix Ruoff

Am 01.01.2011 20:30, schrieb kai-martin knaak:

Felix Ruoff wrote:


I wish you much fun with testing this new features (if you like) and
would be very glad to hear/read some comments!

Hmm. Isolated patches make testing a bit awkward. What might be ok
for simple additions gets progressively less fun for more complicated
changes.

Can you set up a git repository of pcb with your patches applied?
(The way Peter Clifton makes his GL-enabled version of pcb available to
potential testers)

---)kaimartin(---
Hmmm, I have never done something like this, but I will try. Does anyone 
of you have a hint for a documentation how to do this and a link to a 
webpage, where I can host this repository?


Thanks,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: [Patches] GTK Recent-file-manager

2011-01-01 Thread Felix Ruoff

Am 01.01.2011 21:35, schrieb Felix Ruoff:

Am 01.01.2011 20:30, schrieb kai-martin knaak:

Felix Ruoff wrote:


I wish you much fun with testing this new features (if you like) and
would be very glad to hear/read some comments!

Hmm. Isolated patches make testing a bit awkward. What might be ok
for simple additions gets progressively less fun for more complicated
changes.

Can you set up a git repository of pcb with your patches applied?
(The way Peter Clifton makes his GL-enabled version of pcb available to
potential testers)

---)kaimartin(---
Hmmm, I have never done something like this, but I will try. Does 
anyone of you have a hint for a documentation how to do this and a 
link to a webpage, where I can host this repository?


I have figured out myself how to set up a git repository on github. The 
page, where you can browse it online is 
https://github.com/fruoff/pcb-fruoff .


If you like, you can get the branch with the following command:

git clone git://github.com/fruoff/pcb-fruoff.git

I will push some of my other modifications to this repository, too. 
Hope, this will make testing easier.


Am 01.01.2011 22:57, schrieb Matthew Wilkins:
I'd be interested to know how you do this; I'm preparing a patch to 
gschem's

multi-attribute editor to allow it to operate on multiple objects at once,
rather than going blank when multiple objects are selected.  It's getting close
to the point where it could be released for testing and feedback.

mw.
I have used the service at github.com. It took me one hour since I had 
created it like I want. I will have to test some other possibilities, 
but I am really glad with this page until now.
For me it was unexpected, that I have to fork and push everything with 
the normal terminal, not via the web-browser as I expected. But now it's 
really easy! Like working locally on my machine.


Wish you all the best for the project!

Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: [PCB Patches] GTK 2.12 required now!

2010-12-28 Thread Felix Ruoff

Hello,

I saw this afternoon, that Peter Clifton has pushed a patch to the 
official PCB-branch witch increases the required GTK version to 2.12.
This made me happy (a bit), because I have done some patches wich needs 
GTK  2.4.


I have attached three of them and also send them to the patch-tracker at 
sourceforge (the experimental tracker at launchpad seems to be 
incomplete today??). It would be very welcome, if someone of you will 
have comments or even push the patches to the official branch :-).


- 0012: Cleans some lines from code, where the GTK-version is tested. 
This test was covering the tooltips
- 0014: GTK offers a dialog for confirming overwriting files. This patch 
introduces this official dialog and removes the actual implementation 
for this behaviour
- 0013: This patch is NOT in cause of the version-dump! It modifies the 
main-window title in a kind, that is more like suggested by the gnome 
human-interface-device-guidelines 
(http://library.gnome.org/devel/hig-book/nightly/windows-primary.html). 
I personally like this new window-titles, too ;-).


I am also working at a patch for a recent-file-list. But it is not 
complete now. Will send it, if it is more ready.


Kind regards,
Felix
From 48cd5f9d5fbdec41c80e43b3e05044785af7fec8 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Tue, 28 Dec 2010 20:04:58 +0100
Subject: [PATCH] Cleanup conditional code because GTK 2.12 is required now

---
 src/hid/gtk/gui-output-events.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 6164415..9e7889e 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -754,13 +754,6 @@ ghid_port_drawing_area_expose_event_cb (GtkWidget * widget,
   return FALSE;
 }
 
-#if GTK_CHECK_VERSION(2,12,0)
-# define ENABLE_TOOLTIPS 1
-#else
-# define ENABLE_TOOLTIPS 0
-#endif
-
-#if ENABLE_TOOLTIPS
 static char *
 describe_location (LocationType X, LocationType Y)
 {
@@ -874,7 +867,6 @@ queue_tooltip_update (GHidPort *out)
  (GSourceFunc) check_object_tooltips,
  out);
 }
-#endif
 
 gint
 ghid_port_window_motion_cb (GtkWidget * widget,
-- 
1.7.1

From f40c6bd3b5e35e7f9e4cf89d08054a866f47e565 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Tue, 28 Dec 2010 21:46:30 +0100
Subject: [PATCH] Modify window title (see Gnome HID-Guidelines)

This patch modifies the title of the main window. As suggested in the gnome HID-Guidelines
(http://library.gnome.org/devel/hig-book/nightly/windows-primary.html)
The following will be shown there:
 * A star (*) if the layout has unsaved changes (this patch also removes this sign from
   the statusbar, where it actually is)
 * The name of the layout, if set in the config-dialog ('Put layout name on the window title bar')
 * The filename (in braces, if layout name is shown)
 * The string  - PCB
---
 src/hid/gtk/gui-command-window.c |1 +
 src/hid/gtk/gui-dialog-size.c|1 +
 src/hid/gtk/gui-misc.c   |6 ++
 src/hid/gtk/gui-output-events.c  |2 ++
 src/hid/gtk/gui-top-window.c |   28 
 5 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/src/hid/gtk/gui-command-window.c b/src/hid/gtk/gui-command-window.c
index ef2f637..b97ec0b 100644
--- a/src/hid/gtk/gui-command-window.c
+++ b/src/hid/gtk/gui-command-window.c
@@ -481,5 +481,6 @@ ghid_handle_user_command (gboolean raise)
 	}
   RestoreCrosshair (true);
 }
+  ghid_window_set_name_label (PCB-Name);
   ghid_set_status_line_label ();
 }
diff --git a/src/hid/gtk/gui-dialog-size.c b/src/hid/gtk/gui-dialog-size.c
index 16caff3..8409ba5 100644
--- a/src/hid/gtk/gui-dialog-size.c
+++ b/src/hid/gtk/gui-dialog-size.c
@@ -334,5 +334,6 @@ ghid_route_style_dialog (gint index, RouteStyleType * temp_rst)
 }
 
   gtk_widget_destroy (dialog);
+  ghid_window_set_name_label (PCB-Name);
   ghid_set_status_line_label ();
 }
diff --git a/src/hid/gtk/gui-misc.c b/src/hid/gtk/gui-misc.c
index a607a69..e3316aa 100644
--- a/src/hid/gtk/gui-misc.c
+++ b/src/hid/gtk/gui-misc.c
@@ -500,7 +500,7 @@ ghid_set_status_line_label (void)
 
   if (!Settings.grid_units_mm)
 snprintf (text, sizeof (text),
-	  _(b%c  view/b=%s  
+	  _(bview/b=%s  
 		bgrid/b=%.1f:%i  
 		%s%s  
 		bline/b=%.1f  
@@ -508,7 +508,6 @@ ghid_set_status_line_label (void)
 		bclearance/b=%.1f  
 		btext/b=%i%%  
 		bbuffer/b=#%i),
-	  PCB-Changed ? '*' : ' ',
 	  Settings.ShowSolderSide ? _(solder) : _(component),
 	  PCB-Grid / 100.0,
 	  (int) Settings.GridFactor,
@@ -524,7 +523,7 @@ ghid_set_status_line_label (void)
 	  Settings.TextScale, Settings.BufferNumber + 1);
   else
 snprintf (text, sizeof (text),
-	  _(b%c  view/b=%s  
+	  _(bview/b=%s  
 		bgrid/b=%5.3f:%i  
 		%s%s  
 		bline/b=%5.3f  
@@ -532,7 +531,6 @@ ghid_set_status_line_label (void

Re: gEDA-user: [PCB-Patches] Action-documentation

2010-11-15 Thread Felix Ruoff



What do you think of the following descriptions:
@item ToggleLockNames
If set, text will ignore left mouse clicks and actions that work on
objects under the mouse.

@item ToggleOnlyNames
If set, only text will be sensitive for mouse clicks and actions that
work on objects under the mouse.

I'd prefer more verbose descriptions. I'd add the ability to select with the
lasso -- no need for every user to discover this detail by himself. But this
is a matter of taste.

---)kaimartin(---
I first thought the same way, but I found no formulation. Now, I see, 
that you have given a good one :-).


A new suggestion:

@item ToggleLockNames
If set, text will ignore left mouse clicks and actions that work on
objects under the mouse. You can still select text with a lasso (left
mouse drag) and perform actions on the selection.

@item ToggleOnlyNames
If set, only text will be sensitive for mouse clicks and actions that
work on objects under the mouse. You can still select other objects
with a lasso (left mouse drag) and perform actions on the selection.



Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: [PCB-Patches] Action-documentation

2010-11-14 Thread Felix Ruoff

Thanks for all your answers!

Am 14.11.2010 03:35, schrieb kai-martin knaak:

/--
+...@item ToggleLockNames
+If set, the positions of all element-labels are locked relative to
+the element-position.
\---
a) The action is not confined to element(*)-labels. Free floating text
is also affected.

b) Technically, it does not really lock the position but makes the
labels insensitive to various user induced actions. Most importantly,
text will ignore left mouse click and actions that work on objects
under the mouse. You can still select the text with a lasso (left
mouse drag) and perform actions on the selection. some of these
actions may change the position of the text. E.g, move-to-other-side

[snip]

What do you think of the following descriptions:
@item ToggleLockNames
If set, text will ignore left mouse clicks and actions that work on 
objects under the mouse.


@item ToggleOnlyNames
If set, only text will be sensitive for mouse clicks and actions that 
work on objects under the mouse.

PS: (*) Would a general switch of element to footprint receive a
warm welcome by the developers? This would provide more consistency
between geda and pcb wording.

I also needed some time to find-out the meaning of footprint and 
element in pcb. First, I thought, that an element is just everything 
(rat-lines, lines, vias, ... AND footprints) and footprints the 
'elements' I can load from the library.


Kind regards,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: [PCB-Patches] Action-documentation

2010-11-13 Thread Felix Ruoff

Hello,

I found some inconsistency in the action-documentation.
Perhaps, someone of you (who is more familiar with the English language 
and perhaps with the pcb-actions) can have a review of the atached 
patches bevore I will send them to the patch-tracker.


Patch 0007 and 0010 introduces some new documentation. I am not really 
sure, if my description really fits to the action. Please feel free to 
give me feedback or to do a patch by your own.


I am very unsure about the last patch (0011...). This patch removes the 
translation-marks from the documentation-code. At my system (Ubuntu 
10.10, German) this markers (like N_(TEXTTEXT) ) produces errors in 
the generated pdf-file. For this reason, I removed them, but I can also 
imagine, that there also is a function for documentation-translation 
which will become broken with this patch? I don't know


Patch 0008 removes some parts of functions from the documentation, which 
did not work for me (and I couldn't find anything about this in the 
code). Perhaps I am to stupid.


Finaly, Patch 0009 does some cosmetic modifications like adding missing 
points (dots?) at the end of some sentences and removing of this curious 
signs ('') at the beginning of some syntax-lines (like the 
documentation for 'ChangeFlag()').


Kind regards,
Felix

From 01d2ac533789a4340f2bf56b9337fa0c3ec2ac65 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Wed, 10 Nov 2010 22:21:55 +0100
Subject: [PATCH 07/11] Add missing documentation

Adds documentation for the following actions:
* Display(ToggleLockNames)
* Display(ToggleOnlyNames)
---
 src/action.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/action.c b/src/action.c
index f52fcf4..923d162 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2587,6 +2587,15 @@ you need to be.
 @item ToggleLiveRoute
 If set, the progress of the autorouter will be visible on the screen.
 
+...@item ToggleLockNames
+If set, the positions of all element-labels are locked relative to
+the element-position.
+
+...@item ToggleOnlyNames
+If set, only the position of element-labels can be changed. Every
+other PCB-elements (lines, polygons, pins, pads, footprints, ...)
+are locked at their position.
+
 @item ToggleAutoDRC
 If set, you will not be permitted to make connections which violate
 the current DRC and netlist settings.
-- 
1.7.1

From c1407ad1740df5568d401ea4f90b0a533b07d06a Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Fri, 12 Nov 2010 23:08:29 +0100
Subject: [PATCH 08/11] Remove invalid documentation

Remove some lines from documentation which seems to be invalid.
---
 src/action.c |   11 +--
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/action.c b/src/action.c
index 923d162..b0d9018 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2338,10 +2338,6 @@ Any ``found'' pins and vias are marked ``not found''.
 @item Reset
 All ``found'' objects are marked ``not found''.
 
-...@item Measure
-The net under the cursor is found and measured (the lengths of all
-line segments are added together)
-
 @end table
 
 %end-doc */
@@ -2522,7 +2518,7 @@ static const char display_syntax[] =
   Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)\n
   Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)\n
   Display(ToggleLiveRoute|LockNames|OnlyNames)\n
-  Display(Pinout|PinOrPadName)\n Display(Scroll, Direction);
+  Display(Pinout|PinOrPadName);
 
 static const char display_help[] = Several display-related actions.;
 
@@ -2644,11 +2640,6 @@ Toggles whether the names of pins, pads, or (yes) vias will be
 displayed.  If the cursor is over an element, all of its pins and pads
 are affected.
 
-...@item Step direction amount units
-Steps the crosshair in the given direction, with 1=down/left, 2=down,
-etc, according to the numeric keypad layout.  If amount is not given,
-the crosshair steps along the grid.
-
 @end table
 
 %end-doc */
-- 
1.7.1

From 368c20b4f534ecf59f225367e26ca60a21338c3c Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 13 Nov 2010 23:05:10 +0100
Subject: [PATCH 09/11] Cosmetic modifications to the action-documentation

This patch does some cosmetic modifications to the action-documentation (core-/common- and gtk-actions) like
* dots at end of sentences
* capital letter at start of sentenc
* remove some curious signs at the beginning of some lines.
---
 src/action.c |   46 -
 src/buffer.c |2 +-
 src/djopt.c  |5 ++-
 src/fontmode.c   |4 +-
 src/hid/gtk/gui-top-window.c |4 +-
 src/move.c   |2 +-
 6 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/action.c b/src/action.c
index b0d9018..d1672e0 100644
--- a/src/action.c
+++ b/src/action.c
@@ -3262,7 +3262,8 @@ ActionRemoveSelected (int argc, char **argv, int x, int y

Re: gEDA-user: More OpenGL ideas

2010-10-29 Thread Felix Ruoff

Am 29.10.2010 02:44, schrieb kai-martin knaak:

How about some low hanging fruit in the mean time?
* Always highlight the object a left mouse click would refer to.
This is done by many CAD applications. It would make many GUI
actions more predictable to newbies (and evveryone else, too).
I always have to tell newbies more than once, that they don't
have to select before move, or delete.

As written before some weeks, I am thinking about some changings to the 
pcb-menu (adaption to HID-Guidelines, resorting, renaming, ...). I came 
across the same point as you mentioned here: For me it seems to be 
unusual to do actions on an element, which is not selected, especially 
for new users (like me). I think, for menu-items it doesn't make sense 
to do the actions on the elements, where the mouse is over, because the 
mouse is over the menu-item and not at the desired element while 
clicking. The 'GetXY()'-function is a workaround for this (I think).


Therefore I am thinking about changing the behaviour of some (many) 
menu-items that they will act on selected items instead. I think, this 
would be more familliar to new users. What do you think?


Some more thoughts about this:
- The keyboard-shortcuts will also just work on selected objects. It 
might be possible that they will also work on the elements where the 
mouse is over (for power-user), but what should be the behaviour, if one 
or more elements are selected and the mouse is over another element?
- At some functions this new behaviour needs some coding in the 
core-functions, not just the gui-related files.
- This behaviour might be nice for new users. But is it also comfortable 
for long-time and power-user?


I have started to introduce/implement this behaviour to some functions 
but really just some of them. If you like this, I will go on with this 
and send some patches later.


Regards, Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: pcb: Some code-cleanup-patches

2010-10-16 Thread Felix Ruoff



Am 10.10.2010 10:03, schrieb Felix Ruoff:

 Am 10.10.2010 02:55, schrieb Peter Clifton:

On Sat, 2010-10-09 at 23:29 +0200, Felix Ruoff wrote:

(...)
The first one (0002...) removes some unused functions from the 
gtk-gui-code.

How is removing APIs required by the HID interface and replacing them
with NULL pointers removing unused functions?
I am sure, you are right, but I found no situation in the code, where 
this functions are called. For this reason, I removed them and had no 
problems with compiling. I also discovered no problems with using pcb, 
but sure, I have not tested ALL functions.


Can you give me a hint, where my faults are?
I just discovered the error myself. Sorry for sending such a 
'destructive' patch!

Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: pcb: Some code-cleanup-patches

2010-10-10 Thread Felix Ruoff

 Am 10.10.2010 02:55, schrieb Peter Clifton:

On Sat, 2010-10-09 at 23:29 +0200, Felix Ruoff wrote:

Hello,

today I am trying to make patches from my recent days work. I am new to
git, so it takes much more time than I expected...
But, here are two more patches.

The first one (0002...) removes some unused functions from the gtk-gui-code.

How is removing APIs required by the HID interface and replacing them
with NULL pointers removing unused functions?
I am sure, you are right, but I found no situation in the code, where 
this functions are called. For this reason, I removed them and had no 
problems with compiling. I also discovered no problems with using pcb, 
but sure, I have not tested ALL functions.


Can you give me a hint, where my faults are?

Thank you,
Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: gschem-patch: Fix warning on mouse-over menu-item without action

2010-10-09 Thread Felix Ruoff

 Hello,

I found a small bug on moving over a menu-item in gschem which has 
submenu-items. This is, e.g., the recent-file-menu. The log-window gives 
some warnings because this menu-items have no action defined. The 
appended patch fixes this.


It would be nice, if one ore more of you can test this patch and give 
some feedback! Thank you :-)


Felix
From 71b8a5a3e8e2831065291bd1f6f629cb78b67f18 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 9 Oct 2010 18:35:33 +0200
Subject: [PATCH] Fix warning on moving over menu-item without action

Fix a warning at the info-dialog if the mouse moves over a menu-item which has no action definet, e.g. the top item of a submenu.
---
 gschem/src/x_menus.c |   30 ++
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 6ea77ed..5a7e9ba 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -105,7 +105,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
   char **raw_menu_name = g_malloc (sizeof(char *));
   char *menu_item_name;
   char *raw_menu_item_name;
-  char *menu_item_func;
   char *menu_item_hotkey_func;
   char *menu_item_stock;
   char *menu_item_keys;
@@ -149,11 +148,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
 
   raw_menu_item_name = SCM_STRING_CHARS (scm_item_name);
 
-  if (scm_is_false (scm_item_func))
-menu_item_func = no-action;
-  else
-menu_item_func = SCM_SYMBOL_CHARS (scm_item_func);
-
   if (scm_is_false (scm_item_hotkey_func))
 menu_item_hotkey_func = NULL;
   else
@@ -187,17 +181,21 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current)
   menu_item_keys = ;
 }
 
-action = gschem_action_new (menu_item_func,  /* Action name */
-menu_item_name,  /* Text */
-menu_item_name,  /* Tooltip */
-menu_item_stock, /* Icon stock ID */
-menu_item_keys); /* Accelerator string */
-menu_item = gtk_action_create_menu_item (GTK_ACTION (action));
-gtk_menu_append (GTK_MENU (menu), menu_item);
+if(scm_is_false (scm_item_func)) {
+  menu_item = gtk_menu_item_new_with_mnemonic(menu_item_name); 
+} else {
+  action = gschem_action_new (SCM_SYMBOL_CHARS (scm_item_func),  /* Action name */
+  menu_item_name,  /* Text */
+  menu_item_name,  /* Tooltip */
+  menu_item_stock, /* Icon stock ID */
+  menu_item_keys); /* Accelerator string */
+  menu_item = gtk_action_create_menu_item (GTK_ACTION (action));
+  g_signal_connect (G_OBJECT(action), activate,
+G_CALLBACK(g_menu_execute),
+w_current);
+}
 
-g_signal_connect (G_OBJECT(action), activate,
-  G_CALLBACK(g_menu_execute),
-  w_current);
+gtk_menu_append (GTK_MENU (menu), menu_item);
   }
 
   gtk_widget_show (menu_item);
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: gschem: Replace recent-file-list by gtk-type

2010-10-09 Thread Felix Ruoff

 Hello,

attached is a patch, witch will replace the implemented recent-file-list 
of gschem by a recent-file-list, which used gtk-default-functions.


Why do I think this patch is useful?
- This patch reduces the code-size of about 200 lines (smaller code, 
easier to read  debug).

- No external file to store the list
- There is more documentation and examples available for gtk-functions 
than for own functions


It has some differences to the actual version:
- No 'free recent list' option (is this function really needed?)
- Shows just filename (not full path) as menu-label
- Full file-path available as tooltip
- Shows filetype-icons

Potential drawbacks:
- This patch needs GTK 2.10 or newer. I am not sure, which is the actual 
minimum gtk-version of gschem


Perhaps, some of you can test this patch and give some feedback (did I 
introduce some new bugs?). Thank you :-)!


I am also working at a similar patch for pcb, but I have problems to 
migrate it to the menu in a smooth way. And another problem: As far as I 
know, pcb's minimum GTK-Version is 2.8. Can anybody tell me, if this is 
actually true?


Kind regards,
Felix
From a997981178276b3fd932dd2ade685fce5ccb4090 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 9 Oct 2010 21:22:14 +0200
Subject: [PATCH] Replace recent-file-list by gtk_recent_manager

This patch replaces the implemented recent-file - list by the recent-manager provided by GTK since version 2.10.
Known differences to previous version:
* No 'free recent list' option
* Shows just filename (not full path) as menu-label
* Full file-path avaiable as tooltip
* Shows filetype-icons
---
 gschem/include/globals.h   |3 +
 gschem/include/prototype.h |3 -
 gschem/src/gschem.c|5 -
 gschem/src/x_menus.c   |  318 ++--
 gschem/src/x_window.c  |6 +-
 5 files changed, 48 insertions(+), 287 deletions(-)

diff --git a/gschem/include/globals.h b/gschem/include/globals.h
index 8fbeb75..cb1fdb8 100644
--- a/gschem/include/globals.h
+++ b/gschem/include/globals.h
@@ -27,6 +27,9 @@ extern GSCHEM_TOPLEVEL *global_window_current;
 /* window list */
 extern GList *global_window_list;
 
+/* Manager for recently used files */
+GtkRecentManager *recent_manager;
+
 /* colors */
 extern GdkColor white;
 extern GdkColor black;
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 5948c74..d0439a3 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -828,9 +828,6 @@ gint do_popup(GSCHEM_TOPLEVEL *w_current, GdkEventButton *event);
 void x_menus_sensitivity(GSCHEM_TOPLEVEL *w_current, const char *buf, int flag);
 void x_menus_popup_sensitivity(GSCHEM_TOPLEVEL *w_current, const char *buf, int flag);
 void x_menu_attach_recent_files_submenu(GSCHEM_TOPLEVEL *w_current);
-void recent_files_load();
-void recent_files_save(gpointer user_data);
-void recent_files_add(const char *filename);
 /* x_multiattrib.c */
 void x_multiattrib_open (GSCHEM_TOPLEVEL *w_current);
 void x_multiattrib_close (GSCHEM_TOPLEVEL *w_current);
diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c
index b47d503..1b96a12 100644
--- a/gschem/src/gschem.c
+++ b/gschem/src/gschem.c
@@ -259,11 +259,6 @@ void main_prog(void *closure, int argc, char *argv[])
   free (input_str); /* M'allocated by scm_to_locale_string() */
   scm_remember_upto_here_1 (scm_tmp);
 
-  /* Load recent files list. This must be done
-   * before calling x_window_setup(). */
-  recent_files_load();
-  gschem_atexit(recent_files_save, NULL);
-
   /* Set default icon */
   x_window_set_default_icon();
 
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 63fe5a6..8b729f5 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -26,8 +26,6 @@
 
 #include gschem.h
 
-#include glib/gstdio.h
-
 #ifdef HAVE_LIBDMALLOC
 #include dmalloc.h
 #endif
@@ -359,91 +357,31 @@ void x_menus_popup_sensitivity (GSCHEM_TOPLEVEL *w_current, const char *buf, int
   }
 }
 
-/* The list of recently loaded files. */
-static GList *recent_files = NULL;
 
-#define RECENT_FILES_STORE gschem-recent-files
 #define MAX_RECENT_FILES 10
-
-struct recent_file_menu_data {
-  GSCHEM_TOPLEVEL *w_current;
-  gchar *filename;
-};
-
-/*! \brief Make all toplevels reflect changes to the
- * recent files list.
- */
-static void update_recent_files_menus()
-{
-   GSCHEM_TOPLEVEL *w_current;
-   GtkWidget *submenu, *recent_menu_item;
-   GList *iter;
-
-   for (iter = global_window_list;
-iter != NULL;
-iter = g_list_next (iter)) {
-  w_current = (GSCHEM_TOPLEVEL *)iter-data;
-
-  if (w_current-menubar == NULL)
-continue;
-
-  recent_menu_item =
-(GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current-menubar),
-  _File/Open Recen_t);
-  if(recent_menu_item == NULL)
- return;
-
-  submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(recent_menu_item

gEDA-user: pcb: Some code-cleanup-patches

2010-10-09 Thread Felix Ruoff

 Hello,

today I am trying to make patches from my recent days work. I am new to 
git, so it takes much more time than I expected...

But, here are two more patches.

The first one (0002...) removes some unused functions from the gtk-gui-code.
The second one (0004...) introduces the gtk-default-dialog for 
'overwrite-existing-file - confirmation'. For this reason, the 
pcb-dialog 'ghid_dialog_confirm()' is not needed any more and will be 
removed by this patch, too. This patch also does some other 
modifications to the file open/save dialogs:

- replace OK-button by OPEN/SAVE
- remove 'gtk_dialog_set_default_response()', because the OK/OPEN/SAVE - 
Button will be the default button even without this declaration



It is needed, that you apply patch 0002... before 0004.

Perhaps, someone of you can check this patches before they are sent to 
the patch-tracker.


Thanks and good bye,
Felix
From b66809056891c138ceec8a5a4963b7e5263a7dfd Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 9 Oct 2010 23:09:25 +0200
Subject: [PATCH] gtk-gui code-cleanup

Removes some unused functions
---
 src/hid/gtk/gtkhid-main.c |   27 +
 src/hid/gtk/gui-dialog.c  |  268 -
 src/hid/gtk/gui.h |4 -
 3 files changed, 2 insertions(+), 297 deletions(-)

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 7d59672..6b7c6ab 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -866,29 +866,6 @@ ghid_report_dialog (char *title, char *msg)
   ghid_dialog_report (title, msg);
 }
 
-char *
-ghid_prompt_for (char *msg, char *default_string)
-{
-  char *rv;
-
-  rv = ghid_dialog_input (msg, default_string);
-  return rv;
-}
-
-/* FIXME -- implement a proper file select dialog */
-#ifdef FIXME
-char *
-ghid_fileselect (const char *title, const char *descr,
-		 char *default_file, char *default_ext,
-		 const char *history_tag, int flags)
-{
-  char *rv;
-
-  rv = ghid_dialog_input (title, default_file);
-  return rv;
-}
-#endif
-
 void
 ghid_show_item (void *item)
 {
@@ -1187,8 +1164,8 @@ HID ghid_hid = {
   ghid_confirm_dialog,
   ghid_close_confirm_dialog,
   ghid_report_dialog,
-  ghid_prompt_for,
-  ghid_fileselect,
+  0,
+  0,
   ghid_attribute_dialog,
   ghid_show_item,
   ghid_beep,
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index ec91233..f4a2674 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -45,50 +45,6 @@
 RCSID ($Id$);
 
 /* -- */
-gchar *
-ghid_dialog_input (gchar * prompt, gchar * initial)
-{
-  GtkWidget *dialog, *vbox, *label, *entry;
-  gchar *string;
-  gboolean response;
-  GHidPort *out = ghid_port;
-
-  dialog = gtk_dialog_new_with_buttons (PCB User Input,
-	GTK_WINDOW (out-top_window),
-	GTK_DIALOG_MODAL,
-	GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-	GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
-
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-  vbox = gtk_vbox_new (FALSE, 4);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
-  label = gtk_label_new ();
-  gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
-
-  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-  gtk_label_set_markup (GTK_LABEL (label),
-			prompt ? prompt : Enter something);
-
-  entry = gtk_entry_new ();
-  if (initial)
-gtk_entry_set_text (GTK_ENTRY (entry), initial);
-
-  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  gtk_box_pack_start_defaults (GTK_BOX (vbox), entry);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), vbox);
-  gtk_widget_show_all (dialog);
-
-  response = gtk_dialog_run (GTK_DIALOG (dialog));
-  if (response != GTK_RESPONSE_OK)
-string = g_strdup (initial ? initial : );
-  else
-string = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
-
-  gtk_widget_destroy (dialog);
-  return string;
-}
-
-/* -- */
 void
 ghid_dialog_about (void)
 {
@@ -106,35 +62,6 @@ ghid_dialog_about (void)
 }
 
 /* -- */
-gint
-ghid_dialog_confirm_all (gchar * all_message)
-{
-  GtkWidget *dialog, *label, *vbox;
-  gint response;
-  GHidPort *out = ghid_port;
-
-  dialog = gtk_dialog_new_with_buttons (Confirm,
-	GTK_WINDOW (out-top_window),
-	GTK_DIALOG_MODAL |
-	GTK_DIALOG_DESTROY_WITH_PARENT,
-	GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-	GTK_STOCK_OK, GTK_RESPONSE_OK,
-	Sequence OK,
-	GUI_DIALOG_RESPONSE_ALL, NULL);
-
-  vbox = ghid_framed_vbox (GTK_DIALOG (dialog)-vbox, NULL, 6, FALSE, 4, 6);
-
-  label = gtk_label_new (all_message);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 3);
-  gtk_widget_show_all (dialog);
-
-  response = gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_destroy (dialog);
-
-  return response;
-}
-
-/* -- */
 void
 ghid_dialog_message (gchar

Re: gEDA-user: PCB: Change default file-filter in open-dialog

2010-10-02 Thread Felix Ruoff

 Hello,

here is (a first version) of my patch to store the last used file-filter 
of the file-open-dialog. It recovers the last used filter-setting on 
start-up of the file-open-dialog.
It uses GKeyFiles to store this information. I am not sure if this is a 
good choice, because there already is something implemented to store 
settings. But - I did not completely understand it. For this reason I 
introduce this (new) g(tk)-type of setting-handling.


If the main-developer like this GKeyFiles, perhaps the actual 
setting-handling can be migrated to use this functions. Perhaps - as 
written, I have not understand the code completely - this will reduce 
some code size (especially for the parser) and makes it easier for new 
developer to understand the code. Perhaps, they had already used this 
functions in other projects. If we will migrate to this GKeyFiles we 
have to pay attention to storing double-values. This is only available 
since GTK 2.12 :-(.


If the main-developer don't like this GKeyFiles, perhaps you can give me 
a hint to a documentation of the actual system or a point where I can 
easily start to learn it?



It would be very welcome to me, if some of you 'out there' can test my 
patch and give some feedback!


Kind regards,
Felix
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index 36277eb..ab71072 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -176,6 +176,83 @@ static ConfigAttribute config_attributes[] = {
   {layer-name-8, CONFIG_Unused, NULL},
 };
 
+/*
+ * Get path for key-file
+ */
+const gchar*
+key_file_path() 
+{
+  gchar *homedir;
+
+  homedir = (gchar *) g_get_home_dir ();
+  if (!homedir)
+{
+  g_message (key_file_path: Can't get home directory!);
+  return NULL;
+}
+
+  if (!config_dir)
+{
+  config_dir =
+g_build_path (G_DIR_SEPARATOR_S, homedir, PCB_CONFIG_DIR, NULL);
+  if (!g_file_test (config_dir, G_FILE_TEST_IS_DIR)
+	   mkdir (config_dir, 0755)  0)
+{
+  g_message(key_file_path: Can't make \%s\ directory!,
+	config_dir);
+  g_free (config_dir);
+  config_dir = NULL;
+  return NULL;
+}
+}
+
+  return g_build_path (G_DIR_SEPARATOR_S, config_dir, gpcb_gui.conf, NULL);
+}
+
+/*
+ * Initialize GKeyFile-Stucture.
+ */
+void
+key_file_open() {
+  GKeyFileFlags flags;
+  GError *error = NULL;
+  const gchar *filepath;
+  
+  /* Create a new GKeyFile object */
+  key_file = g_key_file_new ();
+  flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS;
+  g_key_file_set_list_separator (key_file, ';');
+  
+  filepath = key_file_path();
+  if ((filepath == NULL
+  || g_key_file_load_from_file (key_file, filepath, flags, error) == FALSE))
+{
+  // If file not found, create a new file when saving.
+  // Therefore add comments at the beginning of the file here.
+  const gchar *comment;
+  comment = This file contains (gtk-gui-related) settings for pcb.\nYou can reset each setting to the default by removing the propreate key\nor delete the whole file to reset all values.;
+  g_key_file_set_comment(key_file, NULL, NULL, comment, NULL);
+}
+}
+
+/*
+ * Save keys to file.
+ */
+void 
+key_file_save() 
+{ 
+  GString *output;
+  const gchar* file = key_file_path();
+  
+  if(file != NULL)
+{
+  output = g_string_new(g_key_file_to_data(key_file, NULL, NULL));
+  g_file_set_contents(file, output-str, output-len, NULL);
+  g_string_free(output, TRUE);
+}
+  g_key_file_free(key_file);
+}
+
 
 static FILE *
 config_file_open (gchar * mode)
@@ -697,6 +774,7 @@ ghid_config_files_read (gint * argc, gchar *** argv)
 
   ghidgui = _ghidgui;
 
+  key_file_open();
   ghid_config_init ();
   load_rc_files ();
   config_file_read ();
@@ -731,6 +809,8 @@ ghid_config_files_write (void)
   FILE *f;
   ConfigAttribute *ca;
 
+  key_file_save();
+
   if (!ghidgui-config_modified || (f = config_file_open (w)) == NULL)
 return;
 
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index ec91233..9c3d64e 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -270,6 +270,7 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
   gchar *result = NULL, *folder, *seed;
   GHidPort *out = ghid_port;
   GtkFileFilter *no_filter;
+  gint last_filter_index = 0;
 
   dialog = gtk_file_chooser_dialog_new (title,
 	GTK_WINDOW (out-top_window),
@@ -298,6 +299,9 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
 gtk_file_filter_add_pattern (fp_filter, *.fp);
 gtk_file_filter_add_pattern (fp_filter, *.FP);
 gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), fp_filter);
+if(g_key_file_get_integer(key_file, OpenDialog, FilterIndexLoadFootprint, NULL) == 1) {
+  gtk_file_chooser_set_filter(GTK_FILE_CHOOSER (dialog), fp_filter);
+}
   }
 
   /* in case we have a dialog for loading a layout file */
@@ 

gEDA-user: Modifications to the main-menu of PCB

2010-10-02 Thread Felix Ruoff

 Hello,

there was/is a discussion about modifying the main-menu of pcb at the 
thread PCB: Change default file-filter in open-dialog. I think it will 
be more clearly arranged if we continue this discussion at an extra 
thread which I like to start with this mail :-).


I am currently spending some time with thinking about the 
menu-structure. Therefor my first question: Is anybody else working at 
this point?


One of the reasons for me to modify the menu is, to adapt it to the 
human-interface-guidelines (hid-guidelines) of GNOME 
(http://library.gnome.org/devel/hig-book/). Anywhere on the geda-webside 
I found the hint, that the geda (and pcb???)-GUI should be adopted to 
the rules described there. This does some problems with the 
keyboard-shortcuts. E.g. Ctrl+P is actually used for 'Auto place 
selected elements' and should be for 'Print' in the guidelines.

I will prefere using the shortcuts suggested in the document given above.
In some cases it might be nice to support some new and the old shortcuts 
the same time. Does anyone of you know if it is possible in the actual 
implementation to define two shortcuts for the same action?


The hid-guidelines suggesting Ctrl++ and Ctrl+- as shortcuts for zooming 
in and out. Using the plus and minus-sign for keyboard shortcuts is not 
possible in the actual implementation. The appended patch fixes this.



In the old thread there was some discussion about the menu-entries. 
Thank you all for your suggestions! I tried to merge them to a new 
discussion-basis here. First, it's just about the File-menu.


File
  New   Ctrl+N
  Open Layout...Ctrl+O
  Load
Element Data to Paste Buffer... // perhaps, this two entries 
can be merged at a later stage.
Layout Data to Paste Buffer...  // needs some coding (am 
working at this). Perhaps, moving this two to the 'Buffer'-menu?

Netlist File...
Vendor Resource...
  -
  Save Layout   Ctrl+S
  Save Layout As... Shift+Ctrl+S
  Save Connection Data of
a Single Element
All Elements
Unused Pins
  Save Buffer to Footprint   // Don't know if this should 
be added here. Perhaps this should stay at the 'Buffer'-menu.

  -
  Update from Schematic...
  Revert
To Saved
To Backup// Don't know the action to 
fill in here. Is this implemented in the core already?

  -
  Calibrate Printer...  (or perhaps 'Page Setup' when there will be a 
new page-setup-dialog)

  Print Layout...Ctrl+P
  Export Layout...
  -
List of recent files // I did some work on this. It 
works but it is not well integrated jet. Will send a patch when ready 
(or I gave up)

  -
  // Here was the 'Preferences'-entry. I think we can move it to 'Edit' 
(as also suggested in the ghi-guidelines) to make this menu shorter
  Close layout   Ctrl-W  // if and when multiple 
layouts are supported ;-)
  Close all layouts  // if and when multiple 
layouts are supported ;-)

  Quit   Ctrl+Q


These are my thoughts about the file-menu. Perhaps, you have some more 
comments or other hints?


Kind regards,
Felix


From 6863d938a06a5a1e425d61f2bdae5a3ebe257725 Mon Sep 17 00:00:00 2001
From: Felix Ruoff fe...@posaunenmission.de
Date: Sat, 2 Oct 2010 22:58:31 +0200
Subject: [PATCH] Add plus and minus to possible keyboard-shortcuts

Adds the possibility to use plus- and minus-keys for keyboard-shortcuts.
---
 src/hid/gtk/gui-top-window.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 9c30a93..e02bd03 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -3079,7 +3079,9 @@ static KeyTable key_table[] =
 {'[', bracketleft},
 {']', bracketright},
 {'.', period},
-{'|', bar}
+{'|', bar},
+{'+', plus},
+{'-', minus}
   };
 static int n_key_table = sizeof (key_table) / sizeof (key_table[0]);
 
-- 
1.7.1



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Change default file-filter in open-dialog

2010-10-01 Thread Felix Ruoff

 kai-martin knaak wrote:

I'd say, the default should be *.pcb + *.fp . These are by far the most
likely files you'd want to load.

Thanks to all for your replys!
I found a way to store the last-used folder at a GKeyFile. But it is not 
well integrated yet, so it will need some days until I will make a patch 
public.


I would like to introduce a menue-change for loading and saving and like 
to know what you are thinking about it:


New menue-structure:

File
  New
Layout
Import Schematics...
  Open... (loads *.pcb, *.fp and eventually *.sch-files)
  Load Netlist...
  Load Vendor Resource...
  -
  Save...
  ...

Buffer
  Load from File... (loads *.pcb and *.fp)
  Save to File (replaces Save buffer-elements to file. What should here 
be the default-filetype? Or the only filetype? *.fp?)

  -
  ...

The idea is, that pcb decides dependend on the filetype which kind of 
load-function should be used (Martin's suggestion above brought me to 
this idea).
I am very unsure about Import Schematics. I did never used it, so I 
don't know if it is more related to 'New' or to 'Open' or even nothing 
of them.l


I hope, my programming-skills are enough to implement something like 
this and am very interesting in your opinions.


Felix



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Change default file-filter in open-dialog

2010-09-29 Thread Felix Ruoff

 Hi Bert,

Bert Timmerman wrote:

Commit message says it all:
 Apply filters to load filechooser dialogs. [1988982] [2686963]

 Applies filters to the filechooser dialogs when loading layouts,
 layouts (to buffer), elements (to buffer) and netlists.

 Default behaviour is to not filter in the filechooser dialog.
 Choosing a predefined filefilter in the filechooser dialog filters
 on registered mime types, lowercase and uppercase file extensions.
 Predefined filters are selected upon the action chosen in the File
 pulldown menu.


IMHO, being able to see *all* available files in a directory listed at
startup of the dialog, and not have been restricted in my view by the GUI,
still is a good thing.

In making GUI design decisions it is difficult to please all possible users.

Maybe make this configurable ?

you are right, this behaviour might not fit for all users. Make it 
configureable seems a very good choice to me. So I deleted this patch 
from sourceforge-tracker and will work at a new patch which will 
hopefully be more comfortable.
My idea is to store the filter from last using of the dialog and use 
this filter again. The filter at the first launch of pcb after the 
installation should be 'show all files' as you suggested.


I am relatively new to the pcb-sourcecode. Can anybody give me a hint 
where to store informations like this? I would prefer to use functions 
from other (gtk-)libs like g_key_file_*, but I did not found any using 
of them in the pcb-sourcecode.


Kind regards,

Felix



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: PCB: Change default file-filter in open-dialog

2010-09-28 Thread Felix Ruoff

 Hello,

I wondered, why the file-filter at the open-dialogs of pcb is not 
selected by default. For me, it is more comfortable if there are just 
the files shown, which can be loaded by this programm/function. I have 
also looked at other software and most of them do this this way (the 
only one I found which shows all files by default is OpenOffice.org).


I appended a patch which changes this behaviour.

Any comments are welcome!

Felix

@The main developers: I do not send this patch to the 
sourceforge-patch-tracker now because I think, this Patch is not really 
essential. If it is easier for you if I send all my patches to the 
tracker, please send me a message and I will add this one (and all later 
patches)!
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index ec91233..6671758 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -280,13 +280,6 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
-  /* add a default filter for not filtering files */
-  no_filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (no_filter, all);
-  gtk_file_filter_add_pattern (no_filter, *.*);
-  gtk_file_filter_add_pattern (no_filter, *);
-  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), no_filter);
-
   /* in case we have a dialog for loading a footprint file */
   if (strcmp (title, _(Load element to buffer)) == 0)
   {
@@ -326,6 +319,13 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
 gtk_file_filter_add_pattern (net_filter, *.NET);
 gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), net_filter);
   }
+  
+  /* add a default filter for not filtering files */
+  no_filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (no_filter, all);
+  gtk_file_filter_add_pattern (no_filter, *.*);
+  gtk_file_filter_add_pattern (no_filter, *);
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), no_filter);
 
   if (path  *path)
 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Change default file-filter in open-dialog

2010-09-28 Thread Felix Ruoff

 Done.
Thanks for the message!

Am 28.09.2010 22:43, schrieb DJ Delorie:

Please send all patches to the tracker even if you post them online,
so that there's less chance of them getting lost and forgotten.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: PCB: Default Saving-path

2010-09-26 Thread Felix Ruoff



Hello, everybody!

This is my first post at this mailing-list, so I would like to introduce myself 
very short. The main part of this mail starts after the double-line.

My name is Felix and I am studying electrical engineering in Germany. I am 
sorry for my bad English, I hope, you will understand me and I will not offend 
someone by using wrong words. I am using gschem and pcb since some weeks and 
like it very much.

For me, some things could be modified to improve user-comfort, especially for 
new users (like me). So I looked through some parts of the code and tried to 
changed them by myself. Here is my first patch:

=

I realized that the 'Save layou as' - dialog gives full path and filename in 
name-line, but did not switched to given path in folder-list (lower part of the 
dialog). For me, this is unkomfortable, e.g. if I just want to switch to 
another near-by - folder.

The following patch changes this behaviour. If a filename is given to this 
dialog, the folder-list will jump to its path. Otherwise there are two 
possibilities: If a path is given (from a previous run of this dialog), this 
path will be used, otherwise the $HOME-directory of the user.

Any feedback is very welcome!

diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c

index ec91233..c45d970 100644

--- a/src/hid/gtk/gui-dialog.c

+++ b/src/hid/gtk/gui-dialog.c

@@ -367,7 +367,7 @@ ghid_dialog_file_select_save (gchar * title, gchar ** path, 
gchar * file,

   gchar * shortcuts)

 {

   GtkWidget *dialog;

-  gchar *result = NULL, *folder, *seed;

+  gchar *result = NULL, *folder, *seed, *filename;

   GHidPort *out =ghid_port;

 


   dialog = gtk_file_chooser_dialog_new (title,

@@ -379,11 +379,25 @@ ghid_dialog_file_select_save (gchar * title, gchar ** 
path, gchar * file,

 


   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);

 


-  if (path  *path  **path)

-gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);

-

-  if (file  *file)

-gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), file);

+  if (file  *file)

+{

+  filename = g_path_get_basename(file);

+  gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), filename);

+  g_free(filename);

+

+  *path = g_path_get_dirname(file);

+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);

+}

+  else

+{

+  if(path  *path  **path)

+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);

+  else

+{

+  *path = (gchar*) g_get_home_dir();

+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);

+}

+}

 


   if (shortcuts  *shortcuts)

 {



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Default Saving-path (patch attached)

2010-09-26 Thread Felix Ruoff

 Thank you, kaimartin, for your reply!

IMHO, it would be better to put the patch file in a regular attachment
rather than copy paste it to the main body of the mail. Mail servers do
quite a bit of space, tab and new line munging on the main body and
render the patch unusable. By contrast, they leave attachments alone.

I have attached the patch to this mail. Hope, it will be easy to apply.

An additional advice:
Go on nagging on the list until a developer either explicitly rejected
your patch, or applied it to the source. Else, your effort will just be
ignored like many others in the past. The official bug tracker may be
an option. But note, that patches tend to be ignored there, too.


Thanks for the hint. I have also done a patch-report at sourceforge.

Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB: Default Saving-path (patch attached)

2010-09-26 Thread Felix Ruoff

 Sorry, i forgot the attachement :-(.
Here it is.

Felix

Am 26.09.2010 21:38, schrieb Felix Ruoff:

 Thank you, kaimartin, for your reply!

IMHO, it would be better to put the patch file in a regular attachment
rather than copy paste it to the main body of the mail. Mail servers do
quite a bit of space, tab and new line munging on the main body and
render the patch unusable. By contrast, they leave attachments alone.

I have attached the patch to this mail. Hope, it will be easy to apply.

An additional advice:
Go on nagging on the list until a developer either explicitly rejected
your patch, or applied it to the source. Else, your effort will just be
ignored like many others in the past. The official bug tracker may be
an option. But note, that patches tend to be ignored there, too.


Thanks for the hint. I have also done a patch-report at sourceforge.

Felix


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index ec91233..c45d970 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -367,7 +367,7 @@ ghid_dialog_file_select_save (gchar * title, gchar ** path, gchar * file,
 			  gchar * shortcuts)
 {
   GtkWidget *dialog;
-  gchar *result = NULL, *folder, *seed;
+  gchar *result = NULL, *folder, *seed, *filename;
   GHidPort *out = ghid_port;
 
   dialog = gtk_file_chooser_dialog_new (title,
@@ -379,11 +379,25 @@ ghid_dialog_file_select_save (gchar * title, gchar ** path, gchar * file,
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
-  if (path  *path  **path)
-gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
-
-  if (file  *file)
-gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), file);
+  if (file  *file) 
+{
+  filename = g_path_get_basename(file);
+  gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), filename);
+  g_free(filename);
+  
+  *path = g_path_get_dirname(file);
+  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+}
+  else 
+{
+  if(path  *path  **path)
+	  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+  else 
+	{
+	  *path = (gchar*) g_get_home_dir();
+	  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+	}
+}
 
   if (shortcuts  *shortcuts)
 {


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user