summaryrefslogtreecommitdiff
path: root/src/file-manager
diff options
context:
space:
mode:
authorChristian Neumair <chris@gnome-de.org>2005-08-12 22:05:23 +0000
committerChristian Neumair <cneumair@src.gnome.org>2005-08-12 22:05:23 +0000
commit6ddf6e6bcdf81b26077e5247d4c4b32605148e19 (patch)
tree1a2b81c8d14188dc45763182228a82d33cb0eae1 /src/file-manager
parent216ea46c3b43447294beb8807d1d6f23d0af0280 (diff)
downloadnautilus-6ddf6e6bcdf81b26077e5247d4c4b32605148e19.tar.gz
Don't make icon drop target for images if should_show_custom_icon_buttons
2005-08-12 Christian Neumair <chris@gnome-de.org> * src/file-manager/fm-properties-window.c: (create_image_widget), (create_basic_page): Don't make icon drop target for images if should_show_custom_icon_buttons is FALSE. Fixes #312967.
Diffstat (limited to 'src/file-manager')
-rw-r--r--src/file-manager/fm-properties-window.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 67b38971c..267149463 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -538,7 +538,8 @@ fm_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext *cont
}
static GtkWidget *
-create_image_widget (FMPropertiesWindow *window)
+create_image_widget (FMPropertiesWindow *window,
+ gboolean is_drag_dest)
{
GtkWidget *image;
GdkPixbuf *pixbuf;
@@ -548,14 +549,16 @@ create_image_widget (FMPropertiesWindow *window)
image = gtk_image_new ();
window->details->icon_image = image;
- /* prepare the image to receive dropped objects to assign custom images */
- gtk_drag_dest_set (GTK_WIDGET (image),
- GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
- target_table, G_N_ELEMENTS (target_table),
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
+ if (is_drag_dest) {
+ /* prepare the image to receive dropped objects to assign custom images */
+ gtk_drag_dest_set (GTK_WIDGET (image),
+ GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP,
+ target_table, G_N_ELEMENTS (target_table),
+ GDK_ACTION_COPY | GDK_ACTION_MOVE);
- g_signal_connect (image, "drag_data_received",
- G_CALLBACK (fm_properties_window_drag_data_received), NULL);
+ g_signal_connect (image, "drag_data_received",
+ G_CALLBACK (fm_properties_window_drag_data_received), NULL);
+ }
gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
@@ -2340,7 +2343,8 @@ create_basic_page (FMPropertiesWindow *window)
0, 0,
0, 0);
- icon_pixmap_widget = create_image_widget (window);
+ icon_pixmap_widget = create_image_widget (
+ window, should_show_custom_icon_buttons (window));
gtk_widget_show (icon_pixmap_widget);
icon_aligner = gtk_alignment_new (1, 0.5, 0, 0);