diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-09-22 16:59:17 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-09-27 10:00:52 +0200 |
commit | d94dd8459298bac84b70190fd8db0ef2b480db49 (patch) | |
tree | 20aac4479b01a8ac0473ac84e9c6f30cb228d143 /docs | |
parent | c1e1f9ebd3e2795a5bf873e157caddd79cc374cb (diff) |
gcr: Complete GcrViewerWidget and GcrImportButton
* Cleanup documentation
* Rework how the GcrViewerWindow works so that it can be used
elsewhere.
* Create GcrImportButton which can import certificates and widgets.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gcr/Makefile.am | 13 | ||||
-rw-r--r-- | docs/reference/gcr/gcr-docs.sgml | 2 | ||||
-rw-r--r-- | docs/reference/gcr/gcr-sections.txt | 46 | ||||
-rw-r--r-- | docs/reference/gcr/gcr-widgets.c | 46 | ||||
-rw-r--r-- | docs/reference/gcr/gcr.types | 23 | ||||
-rw-r--r-- | docs/reference/gcr/images/certificate-widget.png | bin | 15090 -> 16144 bytes | |||
-rw-r--r-- | docs/reference/gcr/images/import-button.png | bin | 0 -> 2925 bytes | |||
-rw-r--r-- | docs/reference/gcr/images/key-widget.png | bin | 10159 -> 10159 bytes | |||
-rw-r--r-- | docs/reference/gcr/images/viewer-widget.png | bin | 0 -> 13167 bytes |
9 files changed, 106 insertions, 24 deletions
diff --git a/docs/reference/gcr/Makefile.am b/docs/reference/gcr/Makefile.am index dc2d717c..aa940d2c 100644 --- a/docs/reference/gcr/Makefile.am +++ b/docs/reference/gcr/Makefile.am @@ -75,6 +75,7 @@ IGNORE_HFILES= \ gcr-pkcs11-renderer.h \ gcr-record.h \ gcr-unlock-renderer.h \ + gcr-viewer-window.h \ gcr-xxx.h \ gcr-zzz.h @@ -82,10 +83,12 @@ IGNORE_HFILES= \ # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= \ $(srcdir)/images/certificate-widget.png \ - $(srcdir)/images/key-widget.png \ $(srcdir)/images/combo-selector.png \ + $(srcdir)/images/import-button.png \ + $(srcdir)/images/list-selector.png \ + $(srcdir)/images/key-widget.png \ $(srcdir)/images/tree-selector.png \ - $(srcdir)/images/list-selector.png + $(srcdir)/images/viewer-widget.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml @@ -127,10 +130,12 @@ DISTCLEANFILES = tmpl/gcr-unused.sgml WIDGETS = \ certificate-widget \ - key-widget \ combo-selector \ + import-button \ + key-widget \ + list-selector \ tree-selector \ - list-selector + viewer-widget shots: gcr-shooter mkdir -p $(builddir)/images diff --git a/docs/reference/gcr/gcr-docs.sgml b/docs/reference/gcr/gcr-docs.sgml index 9e2f64d5..8d0de722 100644 --- a/docs/reference/gcr/gcr-docs.sgml +++ b/docs/reference/gcr/gcr-docs.sgml @@ -35,10 +35,12 @@ <xi:include href="xml/gcr-key-widget.xml"/> <xi:include href="xml/gcr-column.xml"/> <xi:include href="xml/gcr-combo-selector.xml"/> + <xi:include href="xml/gcr-import-button.xml"/> <xi:include href="xml/gcr-list-selector.xml"/> <xi:include href="xml/gcr-tree-selector.xml"/> <xi:include href="xml/gcr-renderer.xml"/> <xi:include href="xml/gcr-viewer.xml"/> + <xi:include href="xml/gcr-viewer-widget.xml"/> <chapter> <title>Widget Gallery</title> <xi:include href="gcr-visual-index.xml" /> diff --git a/docs/reference/gcr/gcr-sections.txt b/docs/reference/gcr/gcr-sections.txt index 22e19b05..6f0fd8bb 100644 --- a/docs/reference/gcr/gcr-sections.txt +++ b/docs/reference/gcr/gcr-sections.txt @@ -117,6 +117,24 @@ GcrPkcs11ImporterPrivate </SECTION> <SECTION> +<FILE>gcr-import-button</FILE> +GcrImportButton +GcrImportButtonClass +gcr_import_button_new +gcr_import_button_add_parsed +<SUBSECTION Standard> +GCR_IMPORT_BUTTON +GCR_IMPORT_BUTTON_CLASS +GCR_IMPORT_BUTTON_GET_CLASS +GCR_IS_IMPORT_BUTTON +GCR_IS_IMPORT_BUTTON_CLASS +gcr_import_button_get_type +GCR_TYPE_IMPORT_BUTTON +<SUBSECTION Private> +GcrImportButtonPrivate +</SECTION> + +<SECTION> <FILE>gcr-simple-certificate</FILE> <TITLE>GcrSimpleCertificate</TITLE> GcrSimpleCertificate @@ -523,20 +541,22 @@ GcrUnlockOptionsWidgetPrivate </SECTION> <SECTION> -<FILE>gcr-viewer-window</FILE> -GcrViewerWindow -GcrViewerWindowClass -gcr_viewer_window_new -gcr_viewer_window_load +<FILE>gcr-viewer-widget</FILE> +GcrViewerWidget +GcrViewerWidgetClass +gcr_viewer_widget_new +gcr_viewer_widget_load_data +gcr_viewer_widget_load_file +<SUBSECTION Standard> +gcr_viewer_widget_get_type +GCR_TYPE_VIEWER_WIDGET +GCR_IS_VIEWER_WIDGET +GCR_IS_VIEWER_WIDGET_CLASS +GCR_VIEWER_WIDGET +GCR_VIEWER_WIDGET_CLASS +GCR_VIEWER_WIDGET_GET_CLASS <SUBSECTION Private> -gcr_viewer_window_get_type -GcrViewerWindowPrivate -GCR_IS_VIEWER_WINDOW -GCR_IS_VIEWER_WINDOW_CLASS -GCR_TYPE_VIEWER_WINDOW -GCR_VIEWER_WINDOW -GCR_VIEWER_WINDOW_CLASS -GCR_VIEWER_WINDOW_GET_CLASS +GcrViewerWidgetPrivate </SECTION> <SECTION> diff --git a/docs/reference/gcr/gcr-widgets.c b/docs/reference/gcr/gcr-widgets.c index 3f23bc51..d8458eda 100644 --- a/docs/reference/gcr/gcr-widgets.c +++ b/docs/reference/gcr/gcr-widgets.c @@ -177,6 +177,38 @@ create_list_selector (const gchar *name) return gcr_shooter_info_new (name, align, GCR_SHOOTER_MEDIUM); } +static GcrShooterInfo * +create_import_button (const gchar *name) +{ + GcrImportButton *import; + GtkWidget *align; + + import = gcr_import_button_new ("Import"); + + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (import)); + + return gcr_shooter_info_new (name, align, GCR_SHOOTER_MEDIUM); +} + +static GcrShooterInfo * +create_viewer_widget (const gchar *name) +{ + GcrViewerWidget *viewer; + GtkWidget *align; + gchar *contents; + gsize length; + + contents = load_gcr_test_file ("email.p12", &length); + viewer = gcr_viewer_widget_new (); + gcr_viewer_widget_load_data (viewer, "Email certificate", (gpointer)contents, length); + g_free (contents); + + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (viewer)); + + return gcr_shooter_info_new (name, align, GCR_SHOOTER_LARGE); +} GcrShooterInfo* gcr_widgets_create (const gchar *name) @@ -185,14 +217,20 @@ gcr_widgets_create (const gchar *name) if (g_str_equal (name, "certificate-widget")) return create_certificate_widget (name); - else if (g_str_equal (name, "key-widget")) - return create_key_widget (name); else if (g_str_equal (name, "combo-selector")) return create_combo_selector (name); - else if (g_str_equal (name, "tree-selector")) - return create_tree_selector (name); + else if (g_str_equal (name, "import-button")) + return create_import_button (name); + else if (g_str_equal (name, "key-widget")) + return create_key_widget (name); else if (g_str_equal (name, "list-selector")) return create_list_selector (name); + else if (g_str_equal (name, "tree-selector")) + return create_tree_selector (name); + else if (g_str_equal (name, "viewer-widget")) + return create_viewer_widget (name); + else + g_assert_not_reached (); return NULL; } diff --git a/docs/reference/gcr/gcr.types b/docs/reference/gcr/gcr.types index a54679cb..78389068 100644 --- a/docs/reference/gcr/gcr.types +++ b/docs/reference/gcr/gcr.types @@ -1,6 +1,23 @@ -gcr_parser_get_type +gcr_certificate_chain_get_type gcr_certificate_get_type +gcr_certificate_renderer_get_type +gcr_certificate_widget_get_type +gcr_collection_get_type +gcr_collection_model_get_type +gcr_combo_selector_get_type +gcr_comparable_get_type +gcr_import_button_get_type gcr_importer_get_type -gcr_simple_certificate_get_type +gcr_key_renderer_get_type +gcr_key_widget_get_type +gcr_list_selector_get_type +gcr_parser_get_type gcr_pkcs11_certificate_get_type -gcr_certificate_chain_get_type
\ No newline at end of file +gcr_renderer_get_type +gcr_simple_certificate_get_type +gcr_simple_collection_get_type +gcr_tree_selector_get_type +gcr_union_collection_get_type +gcr_unlock_options_widget_get_type +gcr_viewer_get_type +gcr_viewer_widget_get_type diff --git a/docs/reference/gcr/images/certificate-widget.png b/docs/reference/gcr/images/certificate-widget.png Binary files differindex 1a826267..e3c91582 100644 --- a/docs/reference/gcr/images/certificate-widget.png +++ b/docs/reference/gcr/images/certificate-widget.png diff --git a/docs/reference/gcr/images/import-button.png b/docs/reference/gcr/images/import-button.png Binary files differnew file mode 100644 index 00000000..9166bb88 --- /dev/null +++ b/docs/reference/gcr/images/import-button.png diff --git a/docs/reference/gcr/images/key-widget.png b/docs/reference/gcr/images/key-widget.png Binary files differindex 938dbbff..db3a371d 100644 --- a/docs/reference/gcr/images/key-widget.png +++ b/docs/reference/gcr/images/key-widget.png diff --git a/docs/reference/gcr/images/viewer-widget.png b/docs/reference/gcr/images/viewer-widget.png Binary files differnew file mode 100644 index 00000000..1933e043 --- /dev/null +++ b/docs/reference/gcr/images/viewer-widget.png |