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

2011-01-05 Thread Peter Clifton
On Tue, 2011-01-04 at 16:22 -0800, Matthew Wilkins wrote:

[snip]

 I have added a combo box to 
 the name column, so you you can choose attribute names there from the same 
 list 
 as in the Add Attribute portion of the dialog.

[snip]

 While I was at it, I added a help button to the dialog, which brings up the 
 'Master Attributes List' of the wiki with definitions of all the typical 
 attribute names.

I really hope all these changes are in separate commits, rather than a
mega-patch ;)

If possible, we prefer to commit separable feature changes individually,
as it really helps the code review process, and lets us bisect / revert
parts of changes which cause problems.

If you already have the code in one big patch which is difficult to
split up, we could probably just commit it all as a single commit:
Improvements to the Multi-attribute editor (THIS TIME!)

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
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-04 Thread Peter Clifton
On Sat, 2011-01-01 at 13:57 -0800, Matthew Wilkins wrote:
  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
 
 
 
 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.


Excellent!

I'd be interested to know how you're tackling the user interface (and
editing behaviour) with multiple objects selected.

When I last worked on the multi-attribute editor code, it was not at all
clear to me just what the expected behaviour for a multiple-selection
would be. (That is why I copped out and made it go blank).


There are various cases:

1. Attribute exists in all objects, same value
2. Attribute exists in all objects, different values
3. Attribute does NOT exist in all objects. (Same value in those which it does)
4. Attribute does NOT exist in all objects. (Different values in those which it 
does)

When we have multiple same-named attributes in a symbol, there might be
more than one possibly way to classify existing attributes by the above
scheme.

I seem to recall multiple similarly named attributes were a potential
pain in the backside for editing, as you need to preserve the idea /
mapping of which specific attribute from which symbols correspond to a
particular row in the editing box.


Views:

For the different values cases, I would imagine (say), showing the
value in grey as [Various], or some other place-holder. (Perhaps even
providing a drop-down list of existing values?).

The attribute does not exist in all objects case might, for example be
represented by listing the attribute name in grey - or perhaps the whole
row in grey.

I'm presuming the action of editing an existing attribute will propagate
it to all symbols. We could even add a little copy to all icon in the
list for attributes which are not present in all symbols (if we wanted).

For the different values case, selecting one of the existing values
from a drop-down list would I imagine, force all selected objects to get
that value.

User edit an existing attribute, status 2. - status 1.
 status 3. - status 1. (I THINK!)
 status 4. - status 1. (I THINK!)

I would just let the user rely on the normal undo mech. if they screw
something up in a way they didn't intend.


Good luck!


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
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-04 Thread Matthew Wilkins




Excellent!

I'd be interested to know how you're tackling the user interface (and
editing behaviour) with multiple objects selected.

There are various cases:

1. Attribute exists in all objects, same value
2. Attribute exists in all objects, different values
3. Attribute does NOT exist in all objects. (Same value in those which it does)
4. Attribute does NOT exist in all objects. (Different values in those which 
it 
does)



Right; so as it is, my version of the multi-attribute editor shows one row for 
each attribute name that occurs in any of the selected symbols.  Just like 
before, inherited attributes get a separate line from attached attributes, and 
they're displayed in a lighter text style and are not editable.

If there are multiple values existing for the same attribute, the dialog shows 
'*** Varies ***' in that row.  There is no indication if the attribute doesn't 
exist in all selected symbols; since inherited attributes are already displayed 
in a different text style, I think adding a third text style will be too 
confusing.

When editing an attribute that is not present on all selected attributes, I 
plan 
to show a dialog box warning that some symbols are missing the attribute.  
Check 
a box to add the missing attributes, OK to proceed, Cancel to cancel the 
operation altogether. That's one of the details left to finish up.


When we have multiple same-named attributes in a symbol, there might be
more than one possibly way to classify existing attributes by the above
scheme.

I seem to recall multiple similarly named attributes were a potential
pain in the backside for editing, as you need to preserve the idea /
mapping of which specific attribute from which symbols correspond to a
particular row in the editing box.



To be honest, I hadn't thought much about the case of having multiple 
same-named 
attributes in the same symbol.  I my current implementation, editing the value 
of that attribute would set the value for all occurrences of the attribute.  
The 
attributes could still be edited individually using the single attribute 
editor. 
 What are typical use cases for having multiple same-named attributes in a 
symbol?


For the different values cases, I would imagine (say), showing the
value in grey as [Various], or some other place-holder. (Perhaps even
providing a drop-down list of existing values?).

I think it's a great idea to have a combo box to select from the current 
values... the complication is that the cell renderer for the value column is a 
custom class.  We'll need a new custom class in order to change it to a combo 
box.  I think I'd save this for a later update.   I have added a combo box to 
the name column, so you you can choose attribute names there from the same list 
as in the Add Attribute portion of the dialog.


While I was at it, I added a help button to the dialog, which brings up the 
'Master Attributes List' of the wiki with definitions of all the typical 
attribute names.

Once I get a few details sorted out, I think it'll be good to let people play 
with it a bit and see if it does what they want/expect.  It's definitely easy 
to 
do something very wrong if you're not careful, but the undo feature is good for 
that.  I was playing with it in conjunction with a little scheme script to do a 
search-select, i.e. (search device RESISTOR), and then edit the footprint 
for all resistors in the schematic at once; seemed to work great.




___
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-04 Thread John Doty

On Jan 4, 2011, at 5:22 PM, Matthew Wilkins wrote:

 What are typical use cases for having multiple same-named attributes in a 
 symbol?

A slotted symbol generally needs multiple slotdef attributes.

A hierarchical symbol will have multiple source attributes if its underlying 
schematic has multiple pages.

And nobody knows what other use cases there are, or may be in the future. You 
should make as few assumptions about how people will use attributes as 
practical.

---
John Doty  Noqsi Aerospace, Ltd.

This message contains technical discussion involving difficult issues. No 
personal disrespect or malice is intended. If you perceive such, your 
perception is simply wrong. I'm a busy person, and in my business go along to 
get along causes mission failures and sometimes kills people, so I tend to be 
a bit blunt.



___
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-04 Thread Kai-Martin Knaak
Matthew Wilkins wrote:

  What are typical use cases for having multiple same-named attributes in a 
 symbol?

Same-named attributes in my symbols:
* slotdef -- this is pretty generic
* comment -- sometimes, more than one note needs to be delivered
* documentation -- sometimes, more than one datasheet is available

More use cases I can think of:
* author -- in case there is more than one.
* vendor -- where to buy


 While I was at it, I added a help button to the dialog, which brings up the 
 'Master Attributes List' of the wiki with definitions of all the typical 
 attribute names.

Great. Is the list downloaded on the fly, or is it from a local copy?



 Once I get a few details sorted out, I think it'll be good to let people play 
 with it a bit and see if it does what they want/expect.  It's definitely easy 
 to 
 do something very wrong if you're not careful, but the undo feature is good 
 for 
 that.  I was playing with it in conjunction with a little scheme script to do 
 a 
 search-select, i.e. (search device RESISTOR), and then edit the footprint 
 for all resistors in the schematic at once; seemed to work great.

Yay! A more powerful search and replace is one of my favorite
feature requests. This is one of the areas where protel99 excels.
Their searchreplace can look for specific properties and change 
other properties of the found objects according to replacement
rules. That is, you could do things like:
Take all resistors with a value greater than 10k and add 
a s to the name of their footprint.
The scope would be the current selection, the current sheet, or 
include all sub sheets.

---)kaimartin(---
-- 
Kai-Martin Knaak
Email: k...@familieknaak.de
Öffentlicher PGP-Schlüssel:
http://pool.sks-keyservers.net:11371/pks/lookup?search=0x6C0B9F53



___
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 Peter TB Brett
 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)

This patch is on my list of things to look at when I get home in a couple of 
hours -- it seems like a good idea in principle, so hopefully we can get it 
merged sooner rather than later.

FWIW I think the existing code has been broken for a while, unfortunately, so 
to have someone looking at this is quite welcome!

 Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


___
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 kai-martin knaak
Felix Ruoff wrote:

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

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. 


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

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

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
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 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(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
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 Matthew Wilkins
 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



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.




___
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


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

2011-01-01 Thread kai-martin knaak
Felix Ruoff wrote:

 Can you set up a git repository of pcb with your patches applied?

 Does anyone 
 of you have a hint for a documentation how to do this

A few weeks ago, when I set up git repositories for my day job 
projects, I found the official documentation helpful:
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html


 and a link to a 
 webpage, where I can host this repository?

Peter Clifton uses http://repo.or.cz:

I have been recommended github:
https://github.com/plans

Many more here:
https://git.wiki.kernel.org/index.php/GitHosting

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



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