commit 366ec78abcce623ba8535178d506abbd8322c75d
parent c8adc6344f11e2b46c2538dddee5b37caa810140
Author: Colin Leroy <colin@colino.net>
Date: Fri, 9 Jan 2009 18:55:52 +0000
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'
Diffstat:
6 files changed, 28 insertions(+), 5 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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),