summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2018-05-11 09:40:48 +0530
committerMohammed Sadiq <sadiq@sadiqpk.org>2018-05-11 16:09:50 +0530
commitb73857faa9a0e03adf9e4ba996d6dbac9bc827f8 (patch)
tree43fb647d325e08750b26ffbbcc7e396f4ea71ada
parent8e0cc8169e4b99439ec98b5591559926be19605f (diff)
downloadgtk+-b73857faa9a0e03adf9e4ba996d6dbac9bc827f8.tar.gz
textview: Reset bubble source id once run
The bubble_timeout_id was reset only on some special case. And so warnings were shown when the source is being tried to be removed with the already removed id. Fix this by unconditionally resetting the id on start of the function.
-rw-r--r--gtk/gtktextview.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 84b054622f..3bdaf4c04d 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -8781,6 +8781,7 @@ gtk_text_view_selection_bubble_popup_show (gpointer user_data)
GtkWidget *box;
GtkWidget *toolbar;
+ priv->selection_bubble_timeout_id = 0;
has_selection = gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
&sel_start, &sel_end);
gtk_text_buffer_get_bounds (get_buffer (text_view), &start, &end);
@@ -8789,10 +8790,7 @@ gtk_text_view_selection_bubble_popup_show (gpointer user_data)
gtk_text_iter_equal (&end, &sel_end);
if (!priv->editable && !has_selection)
- {
- priv->selection_bubble_timeout_id = 0;
- return G_SOURCE_REMOVE;
- }
+ return G_SOURCE_REMOVE;
if (priv->selection_bubble)
gtk_widget_destroy (priv->selection_bubble);