Silently return if a drag is already in progress, rather than asserting.

2006-12-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c (gtk_text_view_start_selection_drag):
        Silently return if a drag is already in progress, rather
        than asserting.  (#335622, Li Yuan, testcase by Erwann Chenede)
This commit is contained in:
Matthias Clasen
2006-12-20 20:55:37 +00:00
committed by Matthias Clasen
parent 754063e465
commit a2f2335b3c
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
2006-12-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_start_selection_drag):
Silently return if a drag is already in progress, rather
than asserting. (#335622, Li Yuan, testcase by Erwann Chenede)
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
Allow any GtkDialog that implements GtkFileChooser as
dialog. (#335473, Tommi Komulainen)

View File

@@ -4116,6 +4116,7 @@ gtk_text_view_focus_out_event (GtkWidget *widget, GdkEventFocus *event)
gtk_widget_queue_draw (widget);
DV(g_print (G_STRLOC": focus_out_event\n"));
g_print (G_STRLOC": focus_out_event\n");
if (text_view->cursor_visible && text_view->layout)
{
@@ -5662,8 +5663,9 @@ gtk_text_view_start_selection_drag (GtkTextView *text_view,
GtkTextBuffer *buffer;
SelectionData *data;
g_assert (text_view->selection_drag_handler == 0);
if (text_view->selection_drag_handler != 0)
return;
data = g_new0 (SelectionData, 1);
if (button->type == GDK_2BUTTON_PRESS)