[gnome-system-log] app-menu: move Help to the application menu
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-log] app-menu: move Help to the application menu
- Date: Fri, 29 Jun 2012 00:52:16 +0000 (UTC)
commit b6d4f9fb53ec069bc2bce05f0071b03936c835c9
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jun 28 20:30:18 2012 -0400
app-menu: move Help to the application menu
src/logview-app-menu.ui | 5 +++++
src/logview-app.c | 19 +++++++++++++++++++
src/logview-menubar.xml | 3 ---
src/logview-window.c | 18 ------------------
4 files changed, 24 insertions(+), 21 deletions(-)
---
diff --git a/src/logview-app-menu.ui b/src/logview-app-menu.ui
index 34b7a39..837b7d2 100644
--- a/src/logview-app-menu.ui
+++ b/src/logview-app-menu.ui
@@ -6,6 +6,11 @@
<attribute name="label" translatable="yes">About System Log</attribute>
</item>
<item>
+ <attribute name="action">app.help</attribute>
+ <attribute name="label" translatable="yes">Help</attribute>
+ <attribute name="accel">F1</attribute>
+ </item>
+ <item>
<attribute name="action">app.quit</attribute>
<attribute name="label" translatable="yes">Quit</attribute>
<attribute name="accel"><Primary>q</attribute>
diff --git a/src/logview-app.c b/src/logview-app.c
index 24d7496..d7b6888 100644
--- a/src/logview-app.c
+++ b/src/logview-app.c
@@ -272,6 +272,24 @@ logview_app_activate (GApplication *application)
}
static void
+action_help (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ LogviewApp *app = user_data;
+ GError *error = NULL;
+
+ gtk_show_uri (gtk_widget_get_screen (app->priv->window),
+ "ghelp:gnome-system-log", gtk_get_current_event_time (),
+ &error);
+
+ if (error) {
+ g_warning (_("There was an error displaying help: %s"), error->message);
+ g_error_free (error);
+ }
+}
+
+static void
action_about (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -310,6 +328,7 @@ action_quit (GSimpleAction *action,
static GActionEntry action_entries[] = {
{ "about", action_about, NULL, NULL, NULL },
+ { "help", action_help, NULL, NULL, NULL },
{ "quit", action_quit, NULL, NULL, NULL }
};
diff --git a/src/logview-menubar.xml b/src/logview-menubar.xml
index 90a7422..90a54c7 100644
--- a/src/logview-menubar.xml
+++ b/src/logview-menubar.xml
@@ -26,8 +26,5 @@
<menuitem action="FilterMatchOnly" />
<menuitem action="FilterManage" />
</menu>
- <menu action="HelpMenu">
- <menuitem action="HelpContents"/>
- </menu>
</menubar>
</ui>
diff --git a/src/logview-window.c b/src/logview-window.c
index 0a39813..a3477c9 100644
--- a/src/logview-window.c
+++ b/src/logview-window.c
@@ -344,21 +344,6 @@ logview_close_log (GtkAction *action, LogviewWindow *logview)
}
static void
-logview_help (GtkAction *action, GtkWidget *parent_window)
-{
- GError *error = NULL;
-
- gtk_show_uri (gtk_widget_get_screen (parent_window),
- "ghelp:gnome-system-log", gtk_get_current_event_time (),
- &error);
-
- if (error) {
- g_warning (_("There was an error displaying help: %s"), error->message);
- g_error_free (error);
- }
-}
-
-static void
logview_bigger_text (GtkAction *action, LogviewWindow *logview)
{
logview->priv->fontsize = MIN (logview->priv->fontsize + 1, 24);
@@ -807,9 +792,6 @@ static GtkActionEntry entries[] = {
{ "FilterManage", NULL, N_("Manage Filters"), NULL, N_("Manage filters"),
G_CALLBACK (logview_manage_filters)},
-
- { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Open the help contents for the log viewer"),
- G_CALLBACK (logview_help) },
};
static GtkToggleActionEntry toggle_entries[] = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]