aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-27 06:31:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-27 06:31:54 +0800
commiteede44087fa2db8812d2408df800ea17febe76b3 (patch)
tree45fd03c2a1f04569e4e4941f35432de48931ffb8 /mail
parentd5f77c20a8fac411744b8f444693010f28c9aeb4 (diff)
downloadgsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar.gz
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar.bz2
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar.lz
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar.xz
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.tar.zst
gsoc2013-evolution-eede44087fa2db8812d2408df800ea17febe76b3.zip
If we don't have any messages selected, break out. This fixes bug #5612.
2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * folder-browser.c (message_list_drag_data_get): If we don't have any messages selected, break out. This fixes bug #5612. * component-factory.c (xfer_folder): Fixed a strstr (url, "noselect=yes") brokenness. (destination_folder_handle_motion): Same. (destination_folder_handle_drop): And again here. * mail-format.c (handle_application_pgp): Implemented. (setup_mime_tables): Setup the application/pgp handler to use handle_application_pgp instead of handle_text_plain. (handle_text_plain): Remove special-case hacks for application/pgp types. svn path=/trunk/; revision=11438
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/component-factory.c39
-rw-r--r--mail/folder-browser.c4
3 files changed, 43 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9af5e3ad20..b1c0dccf50 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
+ * folder-browser.c (message_list_drag_data_get): If we don't have
+ any messages selected, break out. This fixes bug #5612.
+
+ * component-factory.c (xfer_folder): Fixed a strstr (url,
+ "noselect=yes") brokenness.
+ (destination_folder_handle_motion): Same.
+ (destination_folder_handle_drop): And again here.
+
* mail-format.c (handle_application_pgp): Implemented.
(setup_mime_tables): Setup the application/pgp handler to use
handle_application_pgp instead of handle_text_plain.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index f64985e6b4..b9b9fa698d 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -132,12 +132,13 @@ create_view (EvolutionShellComponent *shell_component,
CamelURL *url;
url = camel_url_new (physical_uri, NULL);
- noselect = camel_url_get_param (url, "noselect");
- if (url && noselect && !g_strcasecmp (noselect, "yes"))
+ noselect = url ? camel_url_get_param (url, "noselect") : NULL;
+ if (noselect && !g_strcasecmp (noselect, "yes"))
control = create_noselect_control ();
else
control = folder_browser_factory_new_control (physical_uri,
corba_shell);
+ camel_url_free (url);
} else if (g_strcasecmp (folder_type, "mailstorage") == 0) {
CamelService *store;
EvolutionStorage *storage;
@@ -282,16 +283,24 @@ xfer_folder (EvolutionShellComponent *shell_component,
void *closure)
{
CORBA_Environment ev;
+ const char *noselect;
CamelFolder *source;
CamelException ex;
GPtrArray *uids;
+ CamelURL *url;
- if (strstr (destination_physical_uri, "noselect=yes")) {
+ url = camel_url_new (destination_physical_uri, NULL);
+ noselect = url ? camel_url_get_param (url, "noselect") : NULL;
+
+ if (noselect && !g_strcasecmp (noselect, "yes")) {
+ camel_url_free (url);
GNOME_Evolution_ShellComponentListener_notifyResult (listener,
GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, &ev);
return;
}
-
+
+ camel_url_free (url);
+
if (strcmp (type, "mail") != 0) {
GNOME_Evolution_ShellComponentListener_notifyResult (listener,
GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
@@ -358,14 +367,22 @@ destination_folder_handle_motion (EvolutionShellComponentDndDestinationFolder *f
GNOME_Evolution_ShellComponentDnd_Action *suggested_action_return,
gpointer user_data)
{
+ const char *noselect;
+ CamelURL *url;
+
g_print ("in destination_folder_handle_motion (%s)\n", physical_uri);
-
- if (strstr (physical_uri, "noselect=yes"))
+
+ url = camel_url_new (physical_uri, NULL);
+ noselect = camel_url_get_param (url, "noselect");
+
+ if (noselect && !g_strcasecmp (noselect, "yes"))
/* uh, no way to say "illegal" */
*suggested_action_return = GNOME_Evolution_ShellComponentDnd_ACTION_DEFAULT;
else
*suggested_action_return = GNOME_Evolution_ShellComponentDnd_ACTION_MOVE;
+ camel_url_free (url);
+
return TRUE;
}
@@ -413,6 +430,7 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des
{
char *tmp, *url, **urls, *in, *inptr, *inend;
gboolean retval = FALSE;
+ const char *noselect;
CamelFolder *folder;
CamelStream *stream;
CamelException ex;
@@ -423,9 +441,14 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *des
if (action == GNOME_Evolution_ShellComponentDnd_ACTION_LINK)
return FALSE; /* we can't create links */
- if (strstr (physical_uri, "noselect=yes"))
+ uri = camel_url_new (physical_uri, NULL);
+ noselect = uri ? camel_url_get_param (uri, "noselect") : NULL;
+ if (noselect && !g_strcasecmp (noselect, "yes")) {
+ camel_url_free (uri);
return FALSE;
-
+ }
+ camel_url_free (uri);
+
g_print ("in destination_folder_handle_drop (%s)\n", physical_uri);
for (type = 0; accepted_dnd_types[type]; type++)
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 76983955dd..3d6b763265 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -203,6 +203,10 @@ message_list_drag_data_get (ETree *tree, int row, ETreePath path, int col,
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, add_uid, uids);
+ if (uids->len == 0) {
+ g_ptr_array_free (uids, TRUE);
+ return;
+ }
switch (info) {
case DND_TARGET_TYPE_TEXT_URI_LIST: