aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-05-08 05:13:53 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-05-08 05:13:53 +0200
commita6f821ff833171da62a25ad24fd85bc7834f1961 (patch)
treeb9210fe6c9c9e4eea397026d3fa38d38e01d5ecf /src
parent8f2799acdbc3049b88758205bd921c7f8697a0ee (diff)
downloadgtk-vlc-player-a6f821ff833171da62a25ad24fd85bc7834f1961.tar.gz
support for opening the HTML manual from the experiment player help menu
URI is configurable (--with-help-uri)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/default.ui14
-rw-r--r--src/main.c7
3 files changed, 23 insertions, 1 deletions
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>
diff --git a/src/main.c b/src/main.c
index e71914b..af75dfb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)))
{