diff options
author | Benjamin Otte <otte@redhat.com> | 2014-12-01 15:38:26 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-12-11 09:18:25 -0500 |
commit | 7833835930467ac82b22084cb139253f9bde60a4 (patch) | |
tree | 481714b432ebbb937dc6b2521fbf0cdc94b0f8ae | |
parent | 1a1c1091da53f8d6245968aa06c19ba8c55e8de8 (diff) | |
download | gtk+-7833835930467ac82b22084cb139253f9bde60a4.tar.gz |
inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the
previous hilight was still flashing.
This is inconvenient while arrowing through the object selection
treeview though where you want the currently selected row to hilight
when arrowing quickly.
-rw-r--r-- | gtk/inspector/inspect-button.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/inspector/inspect-button.c b/gtk/inspector/inspect-button.c index b30b3637fe..63dd15619b 100644 --- a/gtk/inspector/inspect-button.c +++ b/gtk/inspector/inspect-button.c @@ -198,6 +198,8 @@ static void start_flash (GtkInspectorWindow *iw, GtkWidget *widget) { + clear_flash (iw); + iw->flash_count = 1; iw->flash_widget = widget; g_signal_connect_after (widget, "draw", G_CALLBACK (draw_flash), iw); @@ -383,12 +385,15 @@ void gtk_inspector_flash_widget (GtkInspectorWindow *iw, GtkWidget *widget) { - if (iw->flash_cnx != 0) - return; - if (!gtk_widget_get_visible (widget) || !gtk_widget_get_mapped (widget)) return; + if (iw->flash_cnx != 0) + { + g_source_remove (iw->flash_cnx); + iw->flash_cnx = 0; + } + start_flash (iw, widget); iw->flash_cnx = g_timeout_add (150, (GSourceFunc) on_flash_timeout, iw); } |