Re: Design help requested: Certificate Chooser UI.



On Fri, 2016-06-10 at 11:47 +0100, David Woodhouse wrote:

If the GtkFileChooser would just allow us to use it *without* its own
GtkPlacesSidebar, that would probably suffice...

Ahem...

gtk_widget_hide(
  /* GtkPlacesSidebar */ gtk_container_get_children(
    /* GtkHPaned */ gtk_container_get_children(
      /* GtkBox */ gtk_container_get_children(my_file_chooser) -> data
    ) -> data
  ) -> data
);

(Yeah, I know. Nasty proof-of-concept hack. Really nasty.)

This actually kind of works — we can place our own GtkPlacesSidebar
*next* to the 'hacked' GtkFileChooser, and we could theoretically sync
the settings of that one into the 'hidden' one in the GtkFileChooser,
to make it look like the real one.

However, the plan falls down we can't actually add our own non-file
locations to a GtkPlacesSidebar. This just doesn't do anything:

 gtk_places_sidebar_add_shortcut(self->page1_visible_sidebar, 
                 g_file_new_for_uri("pkcs11:..."));

If we do want to show the 'foreign' locations like PKCS#11 tokens in
the GtkPlacesSidebar — whether it's "properly" with the co-operation of
the GtkFileChooser, or whether it's done externally — we'd want to
resolve that.

For the time being I suspect unless anyone comes up with any bright
ideas, we might just stick with a separate list on the left-hand side
with all the tokens and 'File system', as the ASCII art in my previous
email showed. We'll leave fixing that as an exercise for a later date.

-- 
dwmw2

Attachment: smime.p7s
Description: S/MIME cryptographic signature



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