diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/default.ui | 14 | ||||
-rw-r--r-- | src/main.c | 7 |
4 files changed, 31 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 943dfab..d330e1d 100644 --- a/configure.ac +++ b/configure.ac @@ -109,6 +109,14 @@ AC_ARG_WITH(default-ui, # must be expanded by the Makefiles AC_SUBST(DEFAULT_UI) +AC_ARG_WITH(help-uri, + AS_HELP_STRING([--with-help-uri=URI], + [Specify help (manual) URI [default=file://DOCDIR/experiment-player.html]]), + [HELP_URI=$withval], [HELP_URI=file://$docdir/experiment-player.html]) +# NOTE: cannot use AC_DEFINE_UNQUOTED since installation directories +# must be expanded by the Makefiles +AC_SUBST(HELP_URI) + AC_ARG_ENABLE(doxygen-doc, AS_HELP_STRING([--enable-doxygen-doc], [Generate Doxygen documentation [default=no]]), diff --git a/src/Makefile.am b/src/Makefile.am index f69a513..8915af2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,8 @@ bin_PROGRAMS = experiment-player experiment_player_SOURCES = main.c experiment_player_CFLAGS = $(AM_CFLAGS) -experiment_player_CPPFLAGS = -DDEFAULT_UI='"@DEFAULT_UI@"' +experiment_player_CPPFLAGS = -DDEFAULT_UI='"@DEFAULT_UI@"' \ + -DHELP_URI='"@HELP_URI@"' experiment_player_LDFLAGS = experiment_player_LDADD = diff --git a/src/default.ui b/src/default.ui index 85f4be4..7f74228 100644 --- a/src/default.ui +++ b/src/default.ui @@ -112,6 +112,16 @@ <object class="GtkMenu" id="help_menu"> <property name="visible">True</property> <child> + <object class="GtkImageMenuItem" id="help_menu_manual_item"> + <property name="label" translatable="yes">Read _Manual...</property> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="image">image4</property> + <property name="use_stock">False</property> + <signal name="activate" handler="help_menu_manual_item_activate_cb"/> + </object> + </child> + <child> <object class="GtkImageMenuItem" id="help_menu_about_item"> <property name="label">gtk-about</property> <property name="visible">True</property> @@ -236,4 +246,8 @@ audio-volume-medium</property> <property name="visible">True</property> <property name="stock">gtk-directory</property> </object> + <object class="GtkImage" id="image4"> + <property name="visible">True</property> + <property name="stock">gtk-help</property> + </object> </interface> @@ -137,6 +137,13 @@ quickopen_menu_refresh_item_activate_cb(GtkWidget *widget, } void +help_menu_manual_item_activate_cb(GtkWidget *widget __attribute__((unused)), + gpointer data __attribute__((unused))) +{ + gtk_show_uri(NULL, HELP_URI, GDK_CURRENT_TIME, NULL); +} + +void generic_quit_cb(GtkWidget *widget __attribute__((unused)), gpointer data __attribute__((unused))) { |