aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/default.ui42
-rw-r--r--src/experiment-player.h2
-rw-r--r--src/main.c21
3 files changed, 65 insertions, 0 deletions
diff --git a/src/default.ui b/src/default.ui
index 6d49350..e8496d6 100644
--- a/src/default.ui
+++ b/src/default.ui
@@ -129,6 +129,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <signal name="activate" handler="help_menu_about_item_activate_cb" object="about_dialog"/>
</object>
</child>
</object>
@@ -504,4 +505,45 @@ audio-volume-medium</property>
<property name="visible">True</property>
<property name="stock">gtk-directory</property>
</object>
+ <object class="GtkAboutDialog" id="about_dialog">
+ <property name="border_width">5</property>
+ <property name="resizable">False</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <property name="transient_for">player_window</property>
+ <property name="copyright">Copyright (C) 2012 Otto-von-Guericke-Universit&#xE4;t Magdeburg</property>
+ <property name="license">This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</property>
+ <property name="authors">Jens Lammert &lt;jens.lammert@st.ovgu.de&gt;
+Robin Haberkorn &lt;robin.haberkorn@st.ovgu.de&gt;</property>
+ <property name="documenters">Jens Lammert &lt;jens.lammert@st.ovgu.de&gt;
+Robin Haberkorn &lt;robin.haberkorn@st.ovgu.de&gt;</property>
+ <property name="wrap_license">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
</interface>
diff --git a/src/experiment-player.h b/src/experiment-player.h
index e3a2a19..9bbe592 100644
--- a/src/experiment-player.h
+++ b/src/experiment-player.h
@@ -16,6 +16,8 @@ gboolean load_transcript_file(const gchar *file);
void show_message_dialog_gerror(GError *err);
+extern GtkWidget *about_dialog;
+
extern GtkWidget *player_widget,
*controls_hbox,
*scale_widget,
diff --git a/src/main.c b/src/main.c
index 22e7266..6594e24 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,6 +29,8 @@
static inline void button_image_set_from_stock(GtkButton *widget, const gchar *name);
+GtkWidget *about_dialog;
+
GtkWidget *player_widget,
*controls_hbox,
*scale_widget,
@@ -54,6 +56,14 @@ gchar *current_filename = NULL;
*/
void
+help_menu_about_item_activate_cb(GtkWidget *widget,
+ gpointer data __attribute__((unused)))
+{
+ gtk_dialog_run(GTK_DIALOG(widget));
+ gtk_widget_hide(widget);
+}
+
+void
playpause_button_clicked_cb(GtkWidget *widget, gpointer data)
{
gboolean is_playing = gtk_vlc_player_toggle(GTK_VLC_PLAYER(widget));
@@ -276,6 +286,7 @@ main(int argc, char *argv[])
gdk_threads_init();
gtk_init(&argc, &argv);
+ g_set_prgname(PACKAGE_NAME);
config_init_key_file();
@@ -284,6 +295,8 @@ main(int argc, char *argv[])
gtk_builder_add_from_file(builder, DEFAULT_UI, NULL);
gtk_builder_connect_signals(builder, NULL);
+ BUILDER_INIT(builder, about_dialog);
+
BUILDER_INIT(builder, player_widget);
BUILDER_INIT(builder, controls_hbox);
BUILDER_INIT(builder, scale_widget);
@@ -310,6 +323,14 @@ main(int argc, char *argv[])
g_object_unref(G_OBJECT(builder));
+ /* configure about dialog */
+ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about_dialog),
+ PACKAGE_NAME);
+ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog),
+ PACKAGE_VERSION);
+ gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_dialog),
+ PACKAGE_URL);
+
/** @todo most of this could be done in Glade with proper catalog files */
/* connect timeline, volume button and other widgets with player widget */
adj = gtk_vlc_player_get_time_adjustment(GTK_VLC_PLAYER(player_widget));