[gnome-panel] Remove help and about from notification area
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] Remove help and about from notification area
- Date: Mon, 21 Feb 2011 00:58:13 +0000 (UTC)
commit 6bef1698cf8f62953c707d0a2168437dd9424a69
Author: William Jon McCann <jmccann redhat com>
Date: Wed Feb 16 14:46:24 2011 -0500
Remove help and about from notification area
https://bugzilla.gnome.org/show_bug.cgi?id=631553
applets/notification_area/main.c | 110 --------------------
.../notification_area/notification-area-menu.xml | 2 -
2 files changed, 0 insertions(+), 112 deletions(-)
---
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 3aa8338..26a72bc 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -63,117 +63,7 @@ get_orientation_from_applet (PanelApplet *applet)
return orientation;
}
-static void
-help_cb (GtkAction *action,
- AppletData *data)
-{
- GError *error = NULL;
- char *uri;
-#define NA_HELP_DOC "user-guide"
-
- uri = g_strdup_printf ("ghelp:%s?%s",
- NA_HELP_DOC, "panels-notification-area");
-
- gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (data->applet)), uri,
- gtk_get_current_event_time (), &error);
-
- g_free (uri);
-
- if (error &&
- g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- {
- g_error_free (error);
- }
- else if (error)
- {
- GtkWidget *dialog;
- char *primary;
-
- primary = g_markup_printf_escaped (
- _("Could not display help document '%s'"),
- NA_HELP_DOC);
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", primary);
-
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- "%s", error->message);
-
- g_error_free (error);
- g_free (primary);
-
- g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
-
- gtk_window_set_icon_name (GTK_WINDOW (dialog), NOTIFICATION_AREA_ICON);
- gtk_window_set_screen (GTK_WINDOW (dialog),
- gtk_widget_get_screen (GTK_WIDGET (data->applet)));
- /* we have no parent window */
- gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), FALSE);
- gtk_window_set_title (GTK_WINDOW (dialog),
- _("Error displaying help document"));
-
- gtk_widget_show (dialog);
- }
-}
-
-static void
-about_cb (GtkAction *action,
- AppletData *data)
-{
- GdkScreen *screen;
-
- const char *authors[] = {
- "Havoc Pennington <hp redhat com>",
- "Anders Carlsson <andersca gnu org>",
- "Vincent Untz <vuntz gnome org>",
- NULL
- };
- const char *documenters [] = {
- "Sun GNOME Documentation Team <gdocteam sun com>",
- NULL
- };
-
- screen = gtk_widget_get_screen (GTK_WIDGET (data->applet));
-
- if (data->about_dialog)
- {
- gtk_window_set_screen (GTK_WINDOW (data->about_dialog), screen);
- gtk_window_present (GTK_WINDOW (data->about_dialog));
- return;
- }
-
- data->about_dialog = gtk_about_dialog_new ();
- g_object_set (data->about_dialog,
- "program-name", _("Notification Area"),
- "version", VERSION,
- "copyright", "Copyright \xc2\xa9 2002 Red Hat, Inc.",
- "authors", (const char **) authors,
- "documenters", (const char **) documenters,
- "translator-credits", _("translator-credits"),
- "logo-icon-name", NOTIFICATION_AREA_ICON,
- NULL);
-
- gtk_window_set_icon_name (GTK_WINDOW (data->about_dialog),
- NOTIFICATION_AREA_ICON);
- gtk_window_set_screen (GTK_WINDOW (data->about_dialog), screen);
-
- g_object_add_weak_pointer (G_OBJECT (data->about_dialog),
- (gpointer) &data->about_dialog);
-
- g_signal_connect (data->about_dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
-
- gtk_window_present (GTK_WINDOW (data->about_dialog));
-}
-
static const GtkActionEntry menu_actions [] = {
- { "SystemTrayHelp", GTK_STOCK_HELP, N_("_Help"),
- NULL, NULL,
- G_CALLBACK (help_cb) },
- { "SystemTrayAbout", GTK_STOCK_ABOUT, N_("_About"),
- NULL, NULL,
- G_CALLBACK (about_cb) }
};
static void
diff --git a/applets/notification_area/notification-area-menu.xml b/applets/notification_area/notification-area-menu.xml
index fdbcc83..8b13789 100644
--- a/applets/notification_area/notification-area-menu.xml
+++ b/applets/notification_area/notification-area-menu.xml
@@ -1,3 +1 @@
-<menuitem name="Notification Area Help Item" action="SystemTrayHelp" />
-<menuitem name="Notification Area About Item" action="SystemTrayAbout" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]