summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2004-07-18 15:14:05 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-07-18 15:14:05 +0000
commit19523008962b2e7ab6fa3580169241ba034f87e5 (patch)
tree83a13e9513ff2ddfe82831e1dc0ec7adc408c016 /gtk
parent3ef03cd68c385f913c9dba69ed209ce6aeaf3a4f (diff)
downloadgtk+-19523008962b2e7ab6fa3580169241ba034f87e5.tar.gz
Create an empty target list if targets is NULL.
Sun Jul 18 15:28:24 2004 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkdnd.c (gtk_drag_source_set, gtk_drag_dest_set): Create an empty target list if targets is NULL. * configure.in: Add check for X11/extensions/sync.h. (#147416, Morten Welinder)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcombobox.c10
-rw-r--r--gtk/gtkdnd.c11
2 files changed, 9 insertions, 12 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index a98d5145fb..4965731c43 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2692,10 +2692,14 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box)
static void
gtk_combo_box_list_remove_grabs (GtkComboBox *combo_box)
{
- if (GTK_WIDGET_HAS_GRAB (combo_box->priv->tree_view))
- gtk_grab_remove (combo_box->priv->tree_view);
+ if (combo_box->priv->tree_view &&
+ GTK_WIDGET_HAS_GRAB (combo_box->priv->tree_view))
+ {
+ gtk_grab_remove (combo_box->priv->tree_view);
+ }
- if (GTK_WIDGET_HAS_GRAB (combo_box->priv->popup_window))
+ if (combo_box->priv->popup_window &&
+ GTK_WIDGET_HAS_GRAB (combo_box->priv->popup_window))
{
gtk_grab_remove (combo_box->priv->popup_window);
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 786de4c972..2f9862e7c7 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -901,10 +901,7 @@ gtk_drag_dest_set (GtkWidget *widget,
site->flags = flags;
site->have_drag = FALSE;
- if (targets)
- site->target_list = gtk_target_list_new (targets, n_targets);
- else
- site->target_list = NULL;
+ site->target_list = gtk_target_list_new (targets, n_targets);
site->actions = actions;
site->do_proxy = FALSE;
site->proxy_window = NULL;
@@ -2093,13 +2090,9 @@ gtk_drag_source_set (GtkWidget *widget,
site->start_button_mask = start_button_mask;
- if (targets)
- site->target_list = gtk_target_list_new (targets, n_targets);
- else
- site->target_list = NULL;
+ site->target_list = gtk_target_list_new (targets, n_targets);
site->actions = actions;
-
}
/*************************************************************