From: Colin Leroy Date: Fri, 9 Jan 2009 18:55:52 +0000 (+0000) Subject: 2009-01-09 [colin] 3.7.0cvs26 X-Git-Tag: rel_3_7_1~55 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=366ec78abcce623ba8535178d506abbd8322c75d 2009-01-09 [colin] 3.7.0cvs26 * src/compose.c * src/mainwindow.c * src/common/utils.c Win32: Fix bug 1815, 'Drag-n-Drop of files on Compose Window does not attach' --- diff --git a/ChangeLog b/ChangeLog index 871a2d0eb..36a7d2fb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-09 [colin] 3.7.0cvs26 + + * src/compose.c + * src/mainwindow.c + * src/common/utils.c + Win32: Fix bug 1815, 'Drag-n-Drop of files on + Compose Window does not attach' + 2009-01-09 [colin] 3.7.0cvs25 * src/foldersel.c diff --git a/PATCHSETS b/PATCHSETS index 8b7b5bb91..0a674eb2c 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3687,3 +3687,4 @@ ( cvs diff -u -r 1.4.2.72 -r 1.4.2.73 src/gtk/about.c; ) > 3.7.0cvs23.patchset ( cvs diff -u -r 1.115.2.217 -r 1.115.2.218 src/main.c; ) > 3.7.0cvs24.patchset ( cvs diff -u -r 1.26.2.40 -r 1.26.2.41 src/foldersel.c; ) > 3.7.0cvs25.patchset +( cvs diff -u -r 1.382.2.493 -r 1.382.2.494 src/compose.c; cvs diff -u -r 1.274.2.294 -r 1.274.2.295 src/mainwindow.c; cvs diff -u -r 1.36.2.162 -r 1.36.2.163 src/common/utils.c; ) > 3.7.0cvs26.patchset diff --git a/configure.ac b/configure.ac index 4b3f430d4..640de3c61 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=7 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=25 +EXTRA_VERSION=26 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/common/utils.c b/src/common/utils.c index 9c9c1bfb6..6690f6c1c 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -1396,6 +1396,7 @@ GList *uri_list_extract_filenames(const gchar *uri_list) * g_filename_from_uri() rejects escaped/locale encoded uri * string which come from Nautilus. */ +#ifndef G_OS_WIN32 if (g_utf8_validate(file, -1, NULL)) locale_file = conv_codeset_strdup( @@ -1404,6 +1405,9 @@ GList *uri_list_extract_filenames(const gchar *uri_list) conv_get_locale_charset_str()); if (!locale_file) locale_file = g_strdup(file + 5); +#else + locale_file = g_filename_from_uri(file, NULL, NULL); +#endif result = g_list_append(result, locale_file); } } diff --git a/src/compose.c b/src/compose.c index 15c0ef4f8..ead42ff31 100644 --- a/src/compose.c +++ b/src/compose.c @@ -10086,9 +10086,11 @@ static void compose_attach_drag_received_cb (GtkWidget *widget, Compose *compose = (Compose *)user_data; GList *list, *tmp; - if (gdk_atom_name(data->type) && - !strcmp(gdk_atom_name(data->type), "text/uri-list") - && gtk_drag_get_source_widget(context) != + if (((gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "text/uri-list")) +#ifdef G_OS_WIN32 + || (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "DROPFILES_DND")) +#endif + ) && gtk_drag_get_source_widget(context) != summary_get_main_widget(mainwindow_get_mainwindow()->summaryview)) { list = uri_list_extract_filenames((const gchar *)data->data); for (tmp = list; tmp != NULL; tmp = tmp->next) { @@ -10153,11 +10155,18 @@ static void compose_insert_drag_received_cb (GtkWidget *widget, /* strangely, testing data->type == gdk_atom_intern("text/uri-list", TRUE) * does not work */ + debug_print("drop: %s (%s)\n", gdk_atom_name(data->type)?gdk_atom_name(data->type):"nul", + data->data?data->data:"nul"); +#ifndef G_OS_WIN32 if (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "text/uri-list")) { +#else + if (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "DROPFILES_DND")) { +#endif AlertValue val = G_ALERTDEFAULT; list = uri_list_extract_filenames((const gchar *)data->data); - + debug_print("list: %p (%s)\n", list, + data->data?data->data:"nul"); if (list == NULL && strstr((gchar *)(data->data), "://")) { /* Assume a list of no files, and data has ://, is a remote link */ gchar *tmpdata = g_strstrip(g_strdup((const gchar *)data->data)); diff --git a/src/mainwindow.c b/src/mainwindow.c index ff689014e..86d332140 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -2393,6 +2393,7 @@ static gboolean reflect_prefs_timeout_cb(gpointer data) compose_reflect_prefs_pixmap_theme(); folderview_reflect_prefs_pixmap_theme(mainwin->folderview); summary_reflect_prefs_pixmap_theme(mainwin->summaryview); + foldersel_reflect_prefs_pixmap_theme(); #ifndef GENERIC_UMPC pixmap = stock_pixmap_widget(mainwin->hbox_stat, STOCK_PIXMAP_ONLINE); gtk_container_remove(GTK_CONTAINER(mainwin->online_switch),