summaryrefslogtreecommitdiff
path: root/tests/testnotebookdnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-06-01 16:41:40 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-06-01 16:41:40 +0000
commitb900778ffd31aa5632d86851ccfdb9bc26e61805 (patch)
tree8e965467ee250deab9061172ac2cf53ba37ded80 /tests/testnotebookdnd.c
parent9095bd257b8cd7881cff22537d1e16d2a844b70e (diff)
downloadgtk+-b900778ffd31aa5632d86851ccfdb9bc26e61805.tar.gz
Small tweaks
Diffstat (limited to 'tests/testnotebookdnd.c')
-rw-r--r--tests/testnotebookdnd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c
index f47d93a6f2..39d72b8227 100644
--- a/tests/testnotebookdnd.c
+++ b/tests/testnotebookdnd.c
@@ -109,12 +109,15 @@ on_notebook_drag_begin (GtkWidget *widget,
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (widget));
- pixbuf = gtk_widget_render_icon (widget,
- (page_num % 2) ? GTK_STOCK_HELP : GTK_STOCK_STOP,
+ if (page_num > 2)
+ {
+ pixbuf = gtk_widget_render_icon (widget,
+ (page_num % 2) ? GTK_STOCK_HELP : GTK_STOCK_STOP,
GTK_ICON_SIZE_DND, NULL);
- gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
- g_object_unref (pixbuf);
+ gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
+ g_object_unref (pixbuf);
+ }
}
static void