Re: [evolution-patches] fix for bug #63177




*shrug*  sure.

it just means you always have to check the name and the is_store thing every time you access it, rather than having a safe default that works for other cases.  the store could always be "" and leave null for the placeholders.

but i guess it matters not either way, so commit as is i guess.

On Wed, 2004-08-25 at 10:47 -0400, Jeffrey Stedfast wrote:
it can't ever be "" afaict. in what cases would it be ""? if the node is
a store, the full_name is *always* NULL in the model.

Jeff

On Wed, 2004-08-25 at 22:28 +0800, Not Zed wrote:
> 
> This actually changes the logic.  The path could potentially be ""
> too.
> 
> And watch that error xml diff, i wonder where that came from.
> 
> On Wed, 2004-08-25 at 09:58 -0400, Jeffrey Stedfast wrote: 
> > 
> > text/plain attachment (63177.patch)
> > ? 55303-2.patch
> > ? 55303.patch
> > ? 62377.patch
> > ? 62771-mailer.patch
> > ? 62812.patch
> > ? 63177.patch
> > ? camel-gpg.0.verify.data
> > ? camel-gpg.0.verify.signature
> > ? camel-gpg.1.verify.data
> > ? camel-gpg.1.verify.signature
> > ? camel-gpg.2.verify.data
> > ? camel-gpg.2.verify.signature
> > Index: ChangeLog
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
> > retrieving revision 1.3438
> > diff -u -r1.3438 ChangeLog
> > --- ChangeLog	24 Aug 2004 02:54:03 -0000	1.3438
> > +++ ChangeLog	24 Aug 2004 19:19:55 -0000
> > @@ -1,3 +1,14 @@
> > +2004-08-24  Jeffrey Stedfast  <fejj novell com>
> > +
> > +	Fix for bug #63177
> > +
> > +	* em-folder-tree.c (emft_drop_async_drop): Check full_name == NULL
> > +	rather than full_name[0] since store's have NULL full_names, not
> > +	empty string (like they used to).
> > +	(emft_drop_folder): Same.
> > +	(tree_drag_data_received): Don't abort the drop if the user
> > +	dropped on a store, this is allowed (depending on the store).
> > +
> >  2004-08-23  Not Zed  <NotZed Ximian com>
> >  
> >  	* em-folder-tree.c (em_folder_tree_set_selected): store the
> > Index: em-folder-tree.c
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
> > retrieving revision 1.124
> > diff -u -r1.124 em-folder-tree.c
> > --- em-folder-tree.c	24 Aug 2004 02:54:03 -0000	1.124
> > +++ em-folder-tree.c	24 Aug 2004 19:19:55 -0000
> > @@ -857,7 +857,7 @@
> >  		return;
> >  	
> >  	/* handles dropping to the root properly */
> > -	if (m->full_name[0])
> > +	if (m->full_name)
> >  		new_name = g_strdup_printf("%s/%s", m->full_name, src->name);
> >  	else
> >  		new_name = g_strdup(src->name);
> > @@ -923,7 +923,7 @@
> >  	if (m->info == DND_DROP_TYPE_FOLDER) {
> >  		/* copy or move (aka rename) a folder */
> >  		emft_drop_folder(m);
> > -	} else if (m->full_name[0] == 0) {
> > +	} else if (m->full_name == NULL) {
> >  		camel_exception_set (&mm->ex, CAMEL_EXCEPTION_SYSTEM,
> >  				     _("Cannot drop message(s) into toplevel store"));
> >  	} else if ((folder = camel_store_get_folder (m->store, m->full_name, 0, &mm->ex))) {
> > @@ -1030,6 +1030,7 @@
> >  	GtkTreeViewDropPosition pos;
> >  	GtkTreePath *dest_path;
> >  	struct _DragDataReceivedAsync *m;
> > +	gboolean is_store;
> >  	CamelStore *store;
> >  	GtkTreeIter iter;
> >  	char *full_name;
> > @@ -1051,11 +1052,11 @@
> >  	
> >  	gtk_tree_model_get((GtkTreeModel *)priv->model, &iter,
> >  			   COL_POINTER_CAMEL_STORE, &store,
> > +			   COL_BOOL_IS_STORE, &is_store,
> >  			   COL_STRING_FULL_NAME, &full_name, -1);
> >  	
> >  	/* make sure user isn't try to drop on a placeholder row */
> > -	/* FIXME: must allow drop of folders onto a store */
> > -	if (full_name == NULL) {
> > +	if (full_name == NULL && !is_store) {
> >  		gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
> >  		return;
> >  	}
> > Index: mail-errors.xml.h
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/mail/mail-errors.xml.h,v
> > retrieving revision 1.4
> > diff -u -r1.4 mail-errors.xml.h
> > --- mail-errors.xml.h	2 Aug 2004 21:13:57 -0000	1.4
> > +++ mail-errors.xml.h	24 Aug 2004 19:19:55 -0000
> > @@ -231,4 +231,9 @@
> >  char *s = N_("_Overwrite");
> >  char *s = N_("_Append");
> >  /* mail:gw-accountsetup-error primary */
> > -char *s = N_("Could not connect to {0}. Groupwise account setup is incomplete. You may need to setup  the account again");
> > +char *s = N_("Unable to connect to the GroupWise\n"
> > +	"server.");
> > +/* mail:gw-accountsetup-error secondary */
> > +char *s = N_("\n"
> > +	"Please check your account settings and try again.\n"
> > +	"");
> -- 
> 
> Michael Zucchi <notzed ximian com>
> "born to die, live to work, it's
> all downhill from here"
> Novell's Evolution and Free
> Software Developer
--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]