[gnome-panel] Don't use tooltips on the main menu bar
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] Don't use tooltips on the main menu bar
- Date: Mon, 21 Feb 2011 00:58:59 +0000 (UTC)
commit 0d164d88cbc281c8856863bc4a6db96ee18d5c44
Author: William Jon McCann <jmccann redhat com>
Date: Fri Feb 18 15:47:31 2011 -0500
Don't use tooltips on the main menu bar
gnome-panel/panel-menu-bar.c | 62 ------------------------------------------
1 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index 5674fb3..0c101b1 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -71,66 +71,6 @@ enum {
static void panel_menu_bar_update_text_gravity (PanelMenuBar *menubar);
-static gboolean
-panel_menu_bar_reinit_tooltip (GtkWidget *widget,
- PanelMenuBar *menubar)
-{
- g_object_set (menubar->priv->applications_item,
- "has-tooltip", TRUE, NULL);
- g_object_set (menubar->priv->places_item,
- "has-tooltip", TRUE, NULL);
- g_object_set (menubar->priv->desktop_item,
- "has-tooltip", TRUE, NULL);
-
- return FALSE;
-}
-
-static gboolean
-panel_menu_bar_hide_tooltip_and_focus (GtkWidget *widget,
- PanelMenuBar *menubar)
-{
- /* remove focus that would be drawn on the currently focused child of
- * the toplevel. See bug#308632. */
- gtk_window_set_focus (GTK_WINDOW (menubar->priv->panel->toplevel),
- NULL);
-
- g_object_set (widget, "has-tooltip", FALSE, NULL);
-
- return FALSE;
-}
-
-static void
-panel_menu_bar_setup_tooltip (PanelMenuBar *menubar)
-{
- panel_util_set_tooltip_text (menubar->priv->applications_item,
- _("Browse and run installed applications"));
- panel_util_set_tooltip_text (menubar->priv->places_item,
- _("Access documents, folders and network places"));
- panel_util_set_tooltip_text (menubar->priv->desktop_item,
- _("Change desktop appearance and behavior, get help, or log out"));
-
- //FIXME: this doesn't handle the right-click case. Sigh.
- /* Hide tooltip if a menu is activated */
- g_signal_connect (menubar->priv->applications_item,
- "activate",
- G_CALLBACK (panel_menu_bar_hide_tooltip_and_focus),
- menubar);
- g_signal_connect (menubar->priv->places_item,
- "activate",
- G_CALLBACK (panel_menu_bar_hide_tooltip_and_focus),
- menubar);
- g_signal_connect (menubar->priv->desktop_item,
- "activate",
- G_CALLBACK (panel_menu_bar_hide_tooltip_and_focus),
- menubar);
-
- /* Reset tooltip when the menu bar is not used */
- g_signal_connect (GTK_MENU_SHELL (menubar),
- "deactivate",
- G_CALLBACK (panel_menu_bar_reinit_tooltip),
- menubar);
-}
-
static void
_gtk_label_make_bold (GtkLabel *label)
{
@@ -193,8 +133,6 @@ panel_menu_bar_init (PanelMenuBar *menubar)
menubar->priv->desktop_item);
_gtk_label_make_bold (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menubar->priv->desktop_item))));
- panel_menu_bar_setup_tooltip (menubar);
-
panel_menu_bar_update_text_gravity (menubar);
g_signal_connect (menubar, "screen-changed",
G_CALLBACK (panel_menu_bar_update_text_gravity),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]