[polari/wip/kunaljain/polari-search: 9/18] help: Initialize the documentation infrastructure
- From: Kunal Jain <kunaljain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/kunaljain/polari-search: 9/18] help: Initialize the documentation infrastructure
- Date: Wed, 8 Jun 2016 20:33:43 +0000 (UTC)
commit e94ad879538680367a7e5e2c95854cee8b5498b7
Author: Baptiste Mille-Mathias <baptiste millemathias gmail com>
Date: Sat Jan 18 19:38:15 2014 +0100
help: Initialize the documentation infrastructure
https://bugzilla.gnome.org/show_bug.cgi?id=723024
Makefile.am | 2 +-
configure.ac | 3 +++
data/resources/menus.ui | 4 ++++
help/C/index.page | 14 ++++++++++++++
help/C/legal.xml | 12 ++++++++++++
help/Makefile.am | 7 +++++++
src/application.js | 7 +++++++
7 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 45dd146..a296758 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src data po
+SUBDIRS = src data po help
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.ac b/configure.ac
index eb91bbd..87af940 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,8 @@ AC_PROG_LN_S
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
+YELP_HELP_INIT
+
AC_PATH_PROG(DESKTOP_FILE_VALIDATE, desktop-file-validate)
AX_REQUIRE_DEFINED([APPSTREAM_XML])
@@ -61,6 +63,7 @@ AC_CONFIG_FILES([
data/Makefile
data/appdata/Makefile
data/icons/Makefile
+ help/Makefile
po/Makefile.in
src/Makefile
])
diff --git a/data/resources/menus.ui b/data/resources/menus.ui
index ccc3cbf..22f20e5 100644
--- a/data/resources/menus.ui
+++ b/data/resources/menus.ui
@@ -6,6 +6,10 @@
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
</item>
<item>
+ <attribute name="action">app.help</attribute>
+ <attribute name="label" translatable="yes">Help</attribute>
+ </item>
+ <item>
<attribute name="action">app.about</attribute>
<attribute name="label" translatable="yes">About</attribute>
</item>
diff --git a/help/C/index.page b/help/C/index.page
new file mode 100644
index 0000000..76dde4f
--- /dev/null
+++ b/help/C/index.page
@@ -0,0 +1,14 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ xmlns:its="http://www.w3.org/2005/11/its"
+ type="guide"
+ id="index">
+
+ <info>
+ <revision pkgversion="3.20" date="2016-05-06" status="stub" />
+
+ <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
+ </info>
+
+ <title>Polari</title>
+
+</page>
diff --git a/help/C/legal.xml b/help/C/legal.xml
new file mode 100644
index 0000000..42fd3db
--- /dev/null
+++ b/help/C/legal.xml
@@ -0,0 +1,12 @@
+<license xmlns="http://projectmallard.org/1.0/"
+ href="http://creativecommons.org/licenses/by-sa/4.0/">
+
+ <p>This work is licensed under a
+ <link href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
+ Attribution-ShareAlike 4.0 International</link> license.</p>
+
+ <p>As a special exception, the copyright holders give you permission to copy,
+ modify, and distribute the example code contained in this documentation under
+ the terms of your choosing, without restriction.</p>
+
+</license>
diff --git a/help/Makefile.am b/help/Makefile.am
new file mode 100644
index 0000000..c376341
--- /dev/null
+++ b/help/Makefile.am
@@ -0,0 +1,7 @@
+ YELP_HELP_RULES@
+
+HELP_ID=$(APP_ID)
+
+HELP_FILES = \
+ index.page \
+ legal.xml
diff --git a/src/application.js b/src/application.js
index 40cdd85..a7dbd0d 100644
--- a/src/application.js
+++ b/src/application.js
@@ -92,6 +92,9 @@ const Application = new Lang.Class({
{ name: 'edit-connection',
activate: Lang.bind(this, this._onEditConnection),
parameter_type: GLib.VariantType.new('o') },
+ { name: 'help',
+ activate: Lang.bind(this, this._onShowHelp),
+ accels: ['F1'] },
{ name: 'about',
activate: Lang.bind(this, this._onShowAbout) },
{ name: 'quit',
@@ -592,6 +595,10 @@ const Application = new Lang.Class({
dialog.show();
},
+ _onShowHelp: function() {
+ Utils.openURL('help:org.gnome.Polari', Gtk.get_current_event_time());
+ },
+
_onShowAbout: function() {
if (this._aboutDialog) {
this._aboutDialog.present();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]