Commit 5859b336 authored by Aruna Sankaranarayanan's avatar Aruna Sankaranarayanan Committed by Ekaterina Gerasimova

Build and integrate the user help, bug 727084

Integrate the help with the rest of the application.
parent ec5e9f81
ACLOCAL_AMFLAGS = -I m4 -I libgd ${ACLOCAL_FLAGS}
SUBDIRS = . data libgd src po tests
SUBDIRS = . data help libgd src po tests
INTLTOOL_FILES = \
intltool-extract.in \
......
......@@ -136,11 +136,18 @@ if test -z "$DESKTOP_FILE_VALIDATE"; then
AC_MSG_ERROR([desktop-file-validate not found])
fi
#############################################
#Documentation
#############################################
YELP_HELP_INIT
AC_CONFIG_FILES([
Makefile
data/Makefile
data/org.gnome.Photos.desktop.in
data/icons/Makefile
help/Makefile
libgd/Makefile
src/Makefile
tests/Makefile
......
@YELP_HELP_RULES@
HELP_ID = gnome-photos
HELP_FILES =
HELP_MEDIA =
HELP_LINGUAS =
......@@ -7,6 +7,10 @@
</item>
</section>
<section>
<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>
......
......@@ -133,6 +133,15 @@ photos_application_refresh_data_free (PhotosApplicationRefreshData *data)
g_slice_free (PhotosApplicationRefreshData, data);
}
static void
photos_application_help (PhotosApplication *self, GVariant *parameter)
{
GtkWindow *parent;
parent = gtk_application_get_active_window (GTK_APPLICATION (self));
gtk_show_uri (gtk_window_get_screen (parent), "help:gnome-photos",
GDK_CURRENT_TIME, NULL);
}
static void
photos_application_about (PhotosApplication *self, GVariant *parameter)
......@@ -693,6 +702,7 @@ photos_application_startup (GApplication *application)
priv->mode_cntrlr = photos_mode_controller_dup_singleton ();
action = g_simple_action_new ("about", NULL);
g_signal_connect_swapped (action, "activate", G_CALLBACK (photos_application_about), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
......@@ -754,6 +764,11 @@ photos_application_startup (GApplication *application)
photos_application_init_app_menu (self);
action = g_simple_action_new ("help", NULL);
g_signal_connect_swapped (action, "activate", G_CALLBACK (photos_application_help), self);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
gtk_application_add_accelerator (GTK_APPLICATION (self), "<Primary>q", "app.quit", NULL);
gtk_application_add_accelerator (GTK_APPLICATION (self), "F11", "app.fullscreen", NULL);
gtk_application_add_accelerator (GTK_APPLICATION (self), "F10", "app.gear-menu", NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment