summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2009-03-19 07:47:23 +0000
committerClaudio Saavedra <csaavedra@src.gnome.org>2009-03-19 07:47:23 +0000
commit584bd9cbc6c38b1599f34b92af5b736b94f760f6 (patch)
tree963574242851fc2ba48b2e02258d57c0128527b1
parent576ef4d6eae5b67f9029a86bfb56e06fb3a87f71 (diff)
downloadgtk+-584bd9cbc6c38b1599f34b92af5b736b94f760f6.tar.gz
Bug 574283 – unused assignment and dead code in
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. svn path=/trunk/; revision=22575
-rw-r--r--ChangeLog8
-rw-r--r--gtk/gtkwidget.c16
2 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b68178da2..c2e064c0ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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 and clean up, improving checks.
+
2009-03-18 Michael Natterer <mitch@gimp.org>
* gtk/gtkscalebutton.c: add static function
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index e85d9f1f7b..76be04fe5b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10082,28 +10082,24 @@ void
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);
}