Commit 7af05afc authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

small cleanup migrate to GtkTooltip

2007-06-14  Vincent Untz  <vuntz@gnome.org>

	* panel-applet.c: (panel_applet_focus): small cleanup
	* test-bonobo-applet.c: (test_applet_fill): migrate to GtkTooltip

svn path=/trunk/; revision=10462
parent eb162408
2007-06-14 Vincent Untz <vuntz@gnome.org>
* panel-applet.c: (panel_applet_focus): small cleanup
* test-bonobo-applet.c: (test_applet_fill): migrate to GtkTooltip
==================== 2.19.3 ====================
2007-05-21 Vincent Untz <vuntz@gnome.org>
......
......@@ -861,10 +861,7 @@ panel_applet_focus (GtkWidget *widget,
previous_focus_child = GTK_CONTAINER (widget)->focus_child;
if (!previous_focus_child && !GTK_WIDGET_HAS_FOCUS (widget)) {
GtkTooltipsData *tooltip;
tooltip = gtk_tooltips_data_get (widget);
if (tooltip) {
if (gtk_tooltips_data_get (widget)) {
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
gtk_widget_grab_focus (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
......
......@@ -11,12 +11,9 @@
#include <string.h>
#include <libbonoboui.h>
#include <gtk/gtktooltips.h>
#include "panel-applet.h"
static GtkTooltips *test_applet_tooltips = NULL;
static void
test_applet_on_do (BonoboUIComponent *uic,
gpointer user_data,
......@@ -65,17 +62,6 @@ test_applet_get_type (void)
return type;
}
static void
test_applet_setup_tooltips (GtkWidget *widget)
{
g_return_if_fail (!GTK_WIDGET_NO_WINDOW (widget));
if (!test_applet_tooltips)
test_applet_tooltips = gtk_tooltips_new ();
gtk_tooltips_set_tip (test_applet_tooltips, widget, "Hello Tip", "");
}
static void
test_applet_handle_orient_change (TestApplet *applet,
PanelAppletOrient orient,
......@@ -173,7 +159,7 @@ test_applet_fill (TestApplet *applet)
panel_applet_setup_menu (
PANEL_APPLET (applet), test_applet_menu_xml, test_applet_menu_verbs, NULL);
test_applet_setup_tooltips (GTK_WIDGET (applet));
g_object_set (applet, "tooltip-markup", "Hello Tip", NULL);
panel_applet_set_flags (PANEL_APPLET (applet), PANEL_APPLET_HAS_HANDLE);
......
Supports Markdown
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