From afe962a84815833abc914ecac770555717f19751 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 22 Apr 2000 08:47:27 +0000 Subject: [PATCH] r262: Added a check in the dnd code that the requested type is valid (before, an invalid type could crash the filer). --- ROX-Filer/src/dnd.c | 6 +++++- ROX-Filer/src/i18n.c | 2 ++ ROX-Filer/src/rox_gettext.c | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ROX-Filer/src/dnd.c b/ROX-Filer/src/dnd.c index 62ce8bfa..8a6418ed 100644 --- a/ROX-Filer/src/dnd.c +++ b/ROX-Filer/src/dnd.c @@ -420,7 +420,11 @@ void drag_data_get(GtkWidget *widget, { delete_once_sent = TRUE; type = selection_data->type; - break; + if (gdk_atom_name(type)) + break; /* OK */ + delayed_error(PROJECT, _("Invalid type " + "requested (not a valid atom)")); + return; } g_warning("drag_data_get: Can't find selected item\n"); return; diff --git a/ROX-Filer/src/i18n.c b/ROX-Filer/src/i18n.c index 3860bcbc..038fe0d8 100644 --- a/ROX-Filer/src/i18n.c +++ b/ROX-Filer/src/i18n.c @@ -91,10 +91,12 @@ GtkItemFactoryEntry *translate_entries(GtkItemFactoryEntry *entries, gint n) int indent; if (from[0] == '>') + { if (from[1] == '>') indent = 2; else indent = 1; + } else indent = 0; diff --git a/ROX-Filer/src/rox_gettext.c b/ROX-Filer/src/rox_gettext.c index a6217ea0..16310933 100644 --- a/ROX-Filer/src/rox_gettext.c +++ b/ROX-Filer/src/rox_gettext.c @@ -94,8 +94,6 @@ void rox_add_translations(char *path) return; } - g_print("[ swap = %d ]\n", swap); - if (WORD(data + 4) != 0) g_warning("rox_add_translations: expected format revision 0"); -- 2.11.4.GIT