Re: [Evolution-hackers] Patch proposal to e-msg-composer and -attachment-bar
- From: Jeffrey Stedfast <fejj novell com>
- To: smurfd <smurfd smurfnet homelinux net>
- Cc: evolution-hackers lists ximian com, Not Zed <notzed ximian com>
- Subject: Re: [Evolution-hackers] Patch proposal to e-msg-composer and -attachment-bar
- Date: Sun, 26 Jun 2005 10:04:13 -0400
please use diff -up next time
On Sun, 2005-06-26 at 16:40 +0200, smurfd wrote:
> Hey!
>
> Using the cvs diff function, was indeed easy.
>
> Im hoping the sewage has atleast turned into a small fork or
> something ;)
>
> I choosed to keep the get_attachment_size_string() function, due to the
> fact that when trying to access a bar->priv->attachments in
> e-msg-composer.c (even though, e-msg-composer-attachment-bar.h is
> included in it) i did get some error complaining that i couldnt do that
> way... dont remember exactly what the errormessage was...
>
> I did a "patch -p0 < file.patch" in my evolution/ source dir, all went
> fine. Updated from anon cvs a couple of hours ago, so it Should apply
> cleanily.
>
> regards
> /Nicklas
>
> ---- patch ----
> ? composer/.e-msg-composer.c.swp
> ? composer/mail-composer.error
> Index: composer/e-msg-composer-attachment-bar.c
> ===================================================================
> RCS
> file: /cvs/gnome/evolution/composer/e-msg-composer-attachment-bar.c,v
> retrieving revision 1.99
> diff -r1.99 e-msg-composer-attachment-bar.c
> 403a404,413
> > gchar* get_attachment_size_string (EMsgComposerAttachmentBar *bar) {
please don't use this style. This should be:
char *
get_attachment_size_string (EMsgComposerAttachmentBar *bar)
{
however, if this is going to be a public function, it needs to be
properly namespaced. However, I don't see why it has to be public - in
fact I'd say with certainty that it should not be.
> > GList *p;
> > gulong size = 0;
> >
> > for (p = bar->priv->attachments; p != NULL; p = p->next)
> > size = size + E_MSG_COMPOSER_ATTACHMENT(p->data)->size;
> >
> > return size_to_string(size);
> > }
> >
> Index: composer/e-msg-composer-attachment-bar.h
> ===================================================================
> RCS
> file: /cvs/gnome/evolution/composer/e-msg-composer-attachment-bar.h,v
> retrieving revision 1.18
> diff -r1.18 e-msg-composer-attachment-bar.h
> 74c74
> <
> ---
> > gchar* get_attachment_size_string (EMsgComposerAttachmentBar *bar);
> Index: composer/e-msg-composer.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
> retrieving revision 1.512
> diff -r1.512 e-msg-composer.c
> 122a123
> > #include "e-msg-composer-attachment.h"
> 2303d2303
> <
> 2305a2306,2307
> > GList *p;
> >
> 2308,2311c2310,2315
> < ngettext ("<b>%d</b> Attachment", "<b>%d</b>
> Attachments", attachment_num),
> < attachment_num);
> < gtk_label_set_markup (GTK_LABEL
> (composer->attachment_expander_num),
> < num_text);
> ---
> > ngettext ("<b>%d</b> Attachment, %s",
> > "<b>%d</b> Attachments, %s total",
> >
> attachment_num),attachment_num,get_attachment_size_string(bar));
> > gtk_label_set_markup (GTK_LABEL(
> > composer->attachment_expander_num),num_text);
why not put the code for get_attachment_size_string() right here? Why is
it even in another source file when it's never used anywhere else but
here?
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]