Commit 1d321b22 authored by Simon Steinbeiss's avatar Simon Steinbeiss

Add "Contents"-item to the Help-menu, linking to the online docs

parent 848b523e
......@@ -6,25 +6,18 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkImage" id="image_about">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">gtk-about-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_disc">
<object class="GtkImage" id="image_help_reportbug">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">media-optical-symbolic</property>
<property name="icon_name">face-sad-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_help_reportbug">
<object class="GtkImage" id="image_help_reportbug1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">face-sad-symbolic</property>
<property name="icon_name">help-info-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_media_fullscreen">
......@@ -55,6 +48,20 @@
<property name="icon_name">media-skip-backward-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_about">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">gtk-about-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_disc">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">media-optical-symbolic</property>
<property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_menu_fullscreen">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -670,6 +677,19 @@
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="contents">
<property name="label" translatable="yes">_Contents</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Display Parole user manual</property>
<property name="use_underline">True</property>
<property name="image">image_help_reportbug1</property>
<property name="use_stock">False</property>
<accelerator key="F1" signal="activate"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="about">
<property name="label" translatable="yes">_About</property>
......
......@@ -2635,6 +2635,24 @@ on_bug_report_clicked (GtkWidget *w, ParolePlayer *player)
}
}
static void
on_contents_clicked (GtkWidget *w, ParolePlayer *player)
{
GtkWidget *dialog;
if (!gtk_show_uri(NULL, "http://docs.xfce.org/apps/parole/start", GDK_CURRENT_TIME, NULL))
{
dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Unable to open default web browser"));
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
_("Please go to http://docs.xfce.org/apps/parole/start to read Parole's online documentation."));
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
}
/**
*
* Draw a simple rectangular GtkOverlay
......@@ -2866,7 +2884,7 @@ parole_player_init (ParolePlayer *player)
GtkWidget *clear_recent;
GtkWidget *recent_separator;
GtkWidget *bug_report;
GtkWidget *bug_report, *contents;
GtkCellRenderer *cell, *sub_cell;
......@@ -3104,6 +3122,8 @@ parole_player_init (ParolePlayer *player)
bug_report = GTK_WIDGET (gtk_builder_get_object (builder, "bug-report"));
g_signal_connect (bug_report, "activate", G_CALLBACK(on_bug_report_clicked), player);
contents = GTK_WIDGET (gtk_builder_get_object (builder, "contents"));
g_signal_connect (contents, "activate", G_CALLBACK(on_contents_clicked), player);
/* End Menu Bar */
......
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