After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141496 - Spatial window should be created for opening a Keyring
Spatial window should be created for opening a Keyring
Status: RESOLVED WONTFIX
Product: gnome-keyring-manager
Classification: Deprecated
Component: general
0.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: Keyring manager maintainers
Keyring manager maintainers
Depends on:
Blocks:
 
 
Reported: 2004-04-30 14:02 UTC by Patanjali
Modified: 2005-03-26 01:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
edit-keyring screenshot attempt #1 (16.32 KB, image/png)
2004-05-01 02:57 UTC, Craig Keogh
  Details
edit-keyring.glade attempt #1 (5.04 KB, text/plain)
2004-05-01 02:58 UTC, Craig Keogh
  Details
Adds a basic keyring contents editing window (20.47 KB, patch)
2004-05-06 04:41 UTC, James Bowes
none Details | Review
James Bowes edit-keyring screenshot (18.99 KB, image/png)
2004-05-06 11:59 UTC, Craig Keogh
  Details
A patch against the previous, implementing craig's suggestions (6.25 KB, patch)
2004-05-06 14:24 UTC, James Bowes
none Details | Review
python prototype (5.87 KB, application/x-compressed-tar)
2004-05-09 06:48 UTC, Mariano Suárez-Alvarez
  Details
updated edit-keyring patch (27.90 KB, patch)
2004-05-10 15:25 UTC, James Bowes
none Details | Review
keyring window with menubar (35.36 KB, patch)
2004-05-11 21:45 UTC, James Bowes
none Details | Review
next revision of patch (42.34 KB, patch)
2004-05-13 00:15 UTC, James Bowes
committed Details | Review
edit-keyring screenshot attempt #2 (29.40 KB, image/png)
2004-05-13 12:13 UTC, Craig Keogh
  Details
edit-keyring screenshot attempt #3 (28.44 KB, image/png)
2004-05-13 12:17 UTC, Craig Keogh
  Details
edit-keyring screenshot attempt #4 (27.35 KB, image/png)
2004-05-15 03:51 UTC, Craig Keogh
  Details
Various updates, including change to table. (48.34 KB, patch)
2004-05-22 12:58 UTC, James Bowes
none Details | Review
This one should actually apply (50.86 KB, patch)
2004-05-23 22:47 UTC, James Bowes
none Details | Review
Next revision, using Mariano's suggestions (50.27 KB, patch)
2004-05-26 21:45 UTC, James Bowes
none Details | Review
one that actually works (68.47 KB, patch)
2004-05-27 00:06 UTC, James Bowes
none Details | Review
Patch against current cvs (72.69 KB, patch)
2004-05-27 14:18 UTC, James Bowes
committed Details | Review
This patch displays the note item type note in the secret field. (13.87 KB, patch)
2004-06-10 22:42 UTC, James Bowes
committed Details | Review

Description Patanjali 2004-04-30 14:02:36 UTC
The idea is that when a keyring is opened, a new (spatial)window is created.
This window needs to show:
  * Keyring name	
  * A List with items inside the keyring (with id, name, mtime, ctime, type
and secret)	
  * For each item, a list with its attibutes (name type and value)	

We should add an UI for the next functions:	
  * Add add a new item	
  * Remove a item	
  * Edit item		 
    * Change name
    * Change type ( GENERIC_SECRET, NETWORK_PASSWORD, NOTE)
    * Change secret	
  * Add attribute to item (name, and value)	
  * Remove attribute from item	
  * Edit attribute 

This is an example of raw data contained in a keyring:
keyring: default
lock_on_idle: 0
lock timeout: 0
mtime: 1082721683
ctime: 1082721683
locked: 0

Items:  
  id: 1 
  type: 1 
  name: itemtest 
  secret: myfoolpassword 
  mtime: 1082721683 
  ctime: 1082721683 
  Attributes:  
    testattribute1 = 'ATRIBUTE1'  
    testattribute2 = 'ATRIBUTE2'  

id: 2 
type: 2 
name: University proxy 
secret: "teachers" 
mtime: 1082721683 
ctime: 1082721683 
Attributes:  
  server = 'proxy.etsit.upm.es'  
  username = 'user'  
  port = '8080'	

So go, read the HIG at:		http://developer.gnome.org/projects/gup/hig/draft_hig_new/
and try to post a interface desing.
Comment 1 Craig Keogh 2004-05-01 02:57:26 UTC
Created attachment 27253 [details]
edit-keyring screenshot attempt #1

Attached is a proposed UI screenshot for the edit keyring window. It was
created using glade-2.6.0. I have tried to follow the HIG, but I am new at
this.

Users can edit the value by clicking on it. The screenshot shows the user
editing 'Port'. The cursor doesn't appear in the screenshot.

The raw data in a keyring is presented in hierarchy, so I thought I would
capture this in a GtkTreeView. Also the raw data varies, so I thought I would
present this in a 'key-value' GtkListView.

Advantages:
- Extensible. Supports varying number of attributes, and supports future
changes
  to the keyring data.
- Not too much is displayed to the user at once.

However, is it obvious to the user that the values in the list can be edited?
Should a popup dialog be used to edit, gconf-editor style?
I also have a mockup with the GTKTreeView on the left, rather than above.
I thought above was better.

See next message below for the attached glade file.

Criticism welcome.
Comment 2 Craig Keogh 2004-05-01 02:58:37 UTC
Created attachment 27254 [details]
edit-keyring.glade attempt #1
Comment 3 Fernando Herrera 2004-05-05 11:09:15 UTC
Please, take a look at the last screenshot at:
http://developer.apple.com/documentation/Security/Conceptual/keychainServConcepts/02concepts/chapter_2_section_4.html

I like the list view there for items there, with a list below with attributes.
We'd prefer the tipical "+ Add" / "- Remove" buttons for attributes. Also the
show password checkbox and Copy to clipboard buttons are good ideas. 
Comment 4 James Bowes 2004-05-06 04:41:01 UTC
Created attachment 27412 [details] [review]
Adds a basic keyring contents editing window

Here's an implementation of the keyring window. A few things about it:
 -The layout needs work (spacing, button alignment, etc).
 -It only lists items right now, not item attributes.
 -The secret field is grabbed by default right now. This probably shouldn't be.

 -An option to hide columns is needed.
Comment 5 Fernando Herrera 2004-05-06 10:28:11 UTC
Some comments:

* You need next patch, because you are freeing the value returned by
keyring_item_type_text_from_enum:
--- gnome-keyring-manager-edit.c.orig   2004-05-06 12:02:53.001201120 +0200
+++ gnome-keyring-manager-edit.c        2004-05-06 11:59:48.323276432 +0200
@@ -160,7 +160,7 @@
         break;
     }
  
-  return type_text;
+  return g_strdup (type_text);
 }
  
 static void

* When opening a keyring, the locked icon should change, because it will be
unlocked. Maybe the best way to do that is check if it's locked, and if so,
first call to unlock function (that will update the icon) and then create the
window. Also this could benefit of the new password dialog api (waiting to be
applied)

* While reading items, perhaps we need to set the busy cursor, to show that
contents are reading, and show normal cursor after last item has been read (in
update_keyring_items_worker_callback)

* I like the UI idea, but it needs some prettyfication:
   * we need a menu
   * we need hide columns option on it (by default hide id!!!)
   * I'm not sure about showing the secret in a column. (how does the apple
manager in the previous link?)
   * We should create the window inside the main file, and store a pointer to it
in a list (keyring name, window pointer and position), and if the keyring is
already opened and user try to reopen it, just present the window. If it is
closed but was opened before, open the window in the last stored position
(spatial metaphor)
   * Maybe the item type field should be replaced by an icon
   * How are we going to edit items info? (new dialog?) and attributes? (inline?)

So we need to think about this. And maybe mariano will massage the patch to
Gobjetify the window but definitively, great work!!!!
Comment 6 Craig Keogh 2004-05-06 11:59:16 UTC
Created attachment 27424 [details]
James Bowes edit-keyring screenshot

Attached is a screenshot of James Bowes 'Edit Keyring'.

Good work James, I have a few comments, I hope they are helpful.

I agree with Fernando Herrera, it needs some prettyfication.

I think the label at the top that displays the key name should be removed. This
should be displayed in the window title. My suggestion would be 'Edit Session
Keyring', where 'Session' is the name of the keyring.
http://developer.gnome.org/projects/gup/hig/draft_hig_new/windows-primary.html#primary-window-titles


I think the labelled frames should be removed. HIG states the traditional frame
style, using borders is deprecated.
http://developer.gnome.org/projects/gup/hig/draft_hig_new/controls-frames.html

My suggestion is it should be 'New Item' rather than 'Add Item' and it should
have the 'new' icon. The 'Remove Item' button should have a trash can icon.
I don't recommend the buttons 'remove item' and 'add item' above the list.
I don't recommend having 2 add buttons and 2 remove buttons.

There should be a 12 pixel border for the window.
http://developer.gnome.org/projects/gup/hig/draft_hig_new/design-window.html#window-layout-spacing


There should be buttons to quit the window, of course this dialog is just at
early stages.
Comment 7 James Bowes 2004-05-06 14:24:21 UTC
Created attachment 27430 [details] [review]
A patch against the previous, implementing craig's suggestions

This patch is applied against the previous patch. It adds Fernando's patch, as
well as attempting to implement most of Craig's UI change suggestions.
Comment 8 Mariano Suárez-Alvarez 2004-05-07 11:23:52 UTC
Can you post a patch from zero? g-k-m has changed quite a bit now...
Comment 9 James Bowes 2004-05-07 14:37:31 UTC
I'll be away for a few days, so if someone else wants to fix this up while i'm
gone, that would be great.
Comment 10 Mariano Suárez-Alvarez 2004-05-09 06:48:51 UTC
Created attachment 27497 [details]
python prototype

This is a prototype for the Keyring Editor window, in python. To play with it
you need pygtk.

I am not quite in love with the lower pane; it does look very unintuitive...
What is an 'attribute'?
Comment 11 James Bowes 2004-05-10 15:25:44 UTC
Created attachment 27550 [details] [review]
updated edit-keyring patch

This is a gobjectified version of the keyring editing window, fitting in with
the new code structure of g-k-m. It has the same functionality of the previous
patch.
Some of Mariano's UI design was used as well.
Comment 12 James Bowes 2004-05-11 21:45:18 UTC
Created attachment 27627 [details] [review]
keyring window with menubar

This (updated) patch now adds a menubar, and checks to see if the selected
keyring is already unlocked. If not, it will prompt the user for a password to
first unlock the keyring.
Comment 13 Fernando Herrera 2004-05-11 22:18:09 UTC
Cool. This is getting into shape!
After some discussion with Mariano and Alex, we think that propabily we should
show the attributes in a Label : Value form, non-editable. Maybe we should show
only standard attributes for NETWORK_PASSWORD type (username, host, port,
comments, etc... [translated]) and add a button to edit them (edit, add,
remove). If the item contains non-standard attibutes we can show a warning and
the user could see them in the edit window. 
About the secret, I don't think it's a good idea to show it in a column. Think
about an user looking to share a password with a friend also watching the
monitor. Maybe the down panel and only showing it when the item is selected is a
better approach. 
Comment 14 James Bowes 2004-05-13 00:15:24 UTC
Created attachment 27653 [details] [review]
next revision of patch

This version now has:
 -a working view menu. the user can select which columns to display.
 -the rows in the tree view now have hints (ie different colours)
 -the secret now has it's own entry field.
 -the secret is not shown by default, but may be displayed via a checkbox.
 -the secret can be copied to the clipboard by pressing the 'copy secret to
  clipboard' button.
Comment 15 Craig Keogh 2004-05-13 12:13:03 UTC
Created attachment 27666 [details]
edit-keyring screenshot attempt #2

Fernando Herrera wrote:
"we think that propabily we should show the attributes in a Label : Value form,
non-editable"

Is this prototype what you mean by label value form? Should the value be
gtk_label instead of gtk_text_entry as shown in the screenshot?

Fernando Herrera wrote:
"and add a button to edit them (edit, add, remove)"

Is this where the edit button should be located? It prolly should have a
different icon.

Fernando Herrera wrote:
"About the secret, I don't think it's a good idea to show it in a column. Think

about an user looking to share a password with a friend also watching the
monitor. Maybe the down panel and only showing it when the item is selected is
a
better approach."

Is this what you mean by down panel? (gtk_expander). If not, I like the
expander idea. Thoughts?

Any other comments welcome.
Comment 16 Craig Keogh 2004-05-13 12:17:22 UTC
Created attachment 27667 [details]
edit-keyring screenshot attempt #3

Forget my 'edit-keyring screenshot attempt #2' screenshot from comment 15, I
posted the wrong one! Sorry. That was an old version I was working on.
Comment 17 Fernando Herrera 2004-05-13 12:34:29 UTC
I like the way attributtes are shown in screenshot #2, and the way the password
is shown in attribute #3 (maybe using the word "secret" is better).
Your screenshot shows a "Edit" button. Maybe this edit button would bring up a
new window for editing/adding/removing attributes (and change secret type) as
well as the ACLs and the password.  And as we are going to edit in a different
window, forget the Cancel and Save buttons
Comment 18 Craig Keogh 2004-05-15 03:51:42 UTC
Created attachment 27723 [details]
edit-keyring screenshot attempt #4

Incorporated Fernando Herrera comments.
The screenshot shows the 'Show Secret' expanded.

How does the user exit this spartial window/dialog?

Moved 'New' before 'Delete'. I think it should be this order.
I am starting to think the 'edit' button should be moved up in the same button
box, so it is 'New', 'Edit', 'Delete'.

Comments welcome.
Comment 19 Fernando Herrera 2004-05-17 04:29:31 UTC
I've committed to CVS latest Bowes' patch (from
http://torch.cs.dal.ca/~bowes/arch/ ). It follows Craig design, only the big
label for attributes should be changed for a table (like in gconf-editor). And
also the secret is presented on an GtkEntry so it can be edited direcly (the
most usual task for a normal user will be that, changing his remote password so
it's good to do that there). About moving the button... I'm not really sure.


Comment 20 James Bowes 2004-05-19 19:06:09 UTC
I've replaced the single label for showing attributes with a table for nice
formatting. It's now in my arch mirror.
Comment 21 Mariano Suárez-Alvarez 2004-05-22 08:03:15 UTC
Please post context diff patches... 
Comment 22 James Bowes 2004-05-22 12:58:52 UTC
Created attachment 27930 [details] [review]
Various updates, including change to table.

This patch adds:
Comment 23 James Bowes 2004-05-22 13:02:37 UTC
whoops.

The previous patch adds:
 -tables instead of a single label.
 -the ability to change a secret.
 -saving the state of toggled columns in the editor with gconf
Comment 24 James Bowes 2004-05-23 22:47:31 UTC
Created attachment 27946 [details] [review]
This one should actually apply

Same as above, but should now apply cleanly. also, readability of some of the
code is improved.
Comment 25 James Bowes 2004-05-26 21:45:09 UTC
Created attachment 28050 [details] [review]
Next revision, using Mariano's suggestions

This revision adds sortable columns to the edit keyring tree view, a (very
ugly) confirmation dialog to the delete keyring action, a tooltip to the edit
button, improvements to the widget layouts, and many other ideas from Mariano.

Regarding putting the attribute values in a scrolled window, and disallowing
the window to be resized: I have had terrible luck getting this to work.
setting the window to not be resizable seems to ignore whatever dimensions
you've given it, so the window makes itself as small as possible, which becomes
a problem when displaying attributes with long values.
Comment 26 James Bowes 2004-05-27 00:06:47 UTC
Created attachment 28057 [details] [review]
one that actually works

I'm terrible at making patches. this one includes _all_ of the changes
Comment 27 James Bowes 2004-05-27 14:18:01 UTC
Created attachment 28086 [details] [review]
Patch against current cvs 

This is against the current cvs, and adds better alignment of the attribute
values.
Comment 28 Mariano Suárez-Alvarez 2004-06-05 21:27:38 UTC
Ok. I'll commit bowes' latest patch, so that we get moving on this.
We are not yet there, though!
Comment 29 James Bowes 2004-06-10 22:42:52 UTC
Created attachment 28572 [details] [review]
This patch displays the note item type note in the secret field.

The 'Note' attribute type from the attribute display has been removed, since
the note is stored as the keyring item's secret.
When a note item type is selected, a multiline text editor is used to show the
secret, rather than an entry, since notes will, or could, be longer than a
password.

So, since the only item type that really has any kind of standard attribute is
the network password, what do we want to do about attributes for other types,
or the window layout?
Comment 30 Fernando Herrera 2004-06-20 16:01:48 UTC
Comment on attachment 28572 [details] [review]
This patch displays the note item type note in the secret field.

Committed plus update "Secret" / "Text" label
Comment 31 James Bowes 2005-03-26 01:06:32 UTC
This is for the 0.0.x branch of g-k-m, which is no longer under active development.