Re: [Evolution-hackers] Patch proposal to e-msg-composer and -attachment-bar
- From: Srinivasa Ragavan <sragavan novell com>
- To: smurfd <smurfd smurfnet homelinux net>
- Cc: evolution-hackers lists ximian com
- Subject: Re: [Evolution-hackers] Patch proposal to e-msg-composer and -attachment-bar
- Date: Thu, 23 Jun 2005 09:06:53 +0530
On Wed, 2005-06-22 at 22:24 +0200, smurfd wrote:
> Hey!
>
> I have created a small addition to the attachment bar in the mail
> composer.
> What it does, is create a additional string to the "1 Attachment" / "2
> Attachments" lable in the mail composer attachment bar.
> Now it says, "1 Attachment, size of 5k" / "2 Attachments, total size of
> 100k"
Hmm, the code looks ok. I guess, it would be nice, if we just show 1
Attachment (100k) or 3 Attachments (1.2MB), instead of the huge string.
Check with notzed as well.
>
> I Personally think its a very handy thing to have, seeing how some SMTP
> servers has a limit on how large your mails can be (i was tought
> recently). If you have N attached files, it can be messy to know how
> much you have attached to the mail.
>
> was unsure how to create a patch for the 3 of the different files, into
> 1 patch, and since you cant put files on the list, i'll try to describe
> where the things are supposed to be ;)
>
> Best regards
> /Nicklas
>
> --evolution/composer/e-msg-composer-attachment-bar.h--
> line 74: gchar* get_attachment_size_string (EMsgComposerAttachmentBar
> *bar);
> -----
>
> --evolution/composer/e-msg-composer-attachment-bar.c--
> line 404: gchar* get_attachment_size_string (EMsgComposerAttachmentBar
> *bar) {
> EMsgComposerAttachmentBarPrivate *priv;
> GList *p;
> gulong size=(gulong)0;
>
> priv = bar->priv;
>
> for (p = priv->attachments; p != NULL; p = p->next) {
> EMsgComposerAttachment *attachment;
>
> attachment = E_MSG_COMPOSER_ATTACHMENT (p->data);
>
> size = size + (gulong)attachment->size;
> }
> return size_to_string(size);
> }
>
> ----
>
> --evolution/composer/e-msg-composer.c--
> line 2308: if (attachment_num) {
> gchar *num_text =
> g_strdup_printf ( ngettext( (gchar *)g_strdup_printf
> ("<b>%d</b> Attachment, size of %s",(int)attachment_num,
> get_attachment_size_string((EMsgComposerAttachmentBar *)
> composer->attachment_bar)),
>
> (gchar *)g_strdup_printf
> ("<b>%d</b> Attachments, total size of %s",
> (int)attachment_num, get_attachment_size_string(
> (EMsgComposerAttachmentBar *)composer->attachment_bar))
> ,attachment_num));
>
> gtk_label_set_markup (GTK_LABEL(
> composer->attachment_expander_num),num_text);
>
> g_free (num_text);
>
> gtk_widget_show (composer->attachment_expander_icon);
>
> } else {
> ... (same as the old stuff)
> ----
>
> _______________________________________________
> evolution-hackers maillist - evolution-hackers lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]