gtk+ r22575 - in trunk: . gtk
- From: csaavedra svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22575 - in trunk: . gtk
- Date: Thu, 19 Mar 2009 07:47:24 +0000 (UTC)
Author: csaavedra
Date: Thu Mar 19 07:47:23 2009
New Revision: 22575
URL: http://svn.gnome.org/viewvc/gtk+?rev=22575&view=rev
Log:
2009-03-19 Claudio Saavedra <csaavedra igalia com>
Bug 574283 â unused assignment and dead code in
gtk_widget_set_tooltip_window()
* gtk/gtkwidget.c: (gtk_widget_set_tooltip_window): Remove
an unused assignment, improving checks, and clean up method.
Modified:
trunk/ChangeLog
trunk/gtk/gtkwidget.c
Modified: trunk/gtk/gtkwidget.c
==============================================================================
--- trunk/gtk/gtkwidget.c (original)
+++ trunk/gtk/gtkwidget.c Thu Mar 19 07:47:23 2009
@@ -10082,28 +10082,24 @@
gtk_widget_set_tooltip_window (GtkWidget *widget,
GtkWindow *custom_window)
{
- gboolean tmp;
+ gboolean has_tooltip;
gchar *tooltip_markup;
- GtkWindow *tooltip_window;
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (custom_window)
- g_return_if_fail (GTK_IS_WINDOW (custom_window));
+ g_return_if_fail (custom_window == NULL || GTK_IS_WINDOW (custom_window));
- tooltip_window = g_object_get_qdata (G_OBJECT (widget), quark_tooltip_window);
tooltip_markup = g_object_get_qdata (G_OBJECT (widget), quark_tooltip_markup);
if (custom_window)
g_object_ref (custom_window);
- tooltip_window = custom_window;
g_object_set_qdata_full (G_OBJECT (widget), quark_tooltip_window,
- tooltip_window, g_object_unref);
+ custom_window, g_object_unref);
- tmp = (tooltip_window != NULL || tooltip_markup != NULL);
- gtk_widget_real_set_has_tooltip (widget, tmp, FALSE);
+ has_tooltip = (custom_window != NULL || tooltip_markup != NULL);
+ gtk_widget_real_set_has_tooltip (widget, has_tooltip, FALSE);
- if (tmp)
+ if (has_tooltip)
gtk_widget_trigger_tooltip_query (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]