Re-implemented part of the Compose window, adapted to newer icon themes

This commit is contained in:
Pierre Pronchery 2010-10-24 20:27:20 +00:00
parent fcef7fc1d3
commit 4e40d4ec02
35 changed files with 480 additions and 250 deletions

View File

@ -24,6 +24,20 @@ dist:
$(PACKAGE)-$(VERSION)/data/Makefile \
$(PACKAGE)-$(VERSION)/data/mailer.desktop \
$(PACKAGE)-$(VERSION)/data/project.conf \
$(PACKAGE)-$(VERSION)/data/24x24/Makefile \
$(PACKAGE)-$(VERSION)/data/24x24/mailer.png \
$(PACKAGE)-$(VERSION)/data/24x24/mailer-accounts.png \
$(PACKAGE)-$(VERSION)/data/24x24/mailer-drafts.png \
$(PACKAGE)-$(VERSION)/data/24x24/mailer-inbox.png \
$(PACKAGE)-$(VERSION)/data/24x24/mailer-outbox.png \
$(PACKAGE)-$(VERSION)/data/24x24/mailer-sent.png \
$(PACKAGE)-$(VERSION)/data/24x24/project.conf \
$(PACKAGE)-$(VERSION)/data/48x48/Makefile \
$(PACKAGE)-$(VERSION)/data/48x48/mailer.png \
$(PACKAGE)-$(VERSION)/data/48x48/mailer-inbox.png \
$(PACKAGE)-$(VERSION)/data/48x48/mailer-outbox.png \
$(PACKAGE)-$(VERSION)/data/48x48/mailer-sent.png \
$(PACKAGE)-$(VERSION)/data/48x48/project.conf \
$(PACKAGE)-$(VERSION)/include/Mailer.h \
$(PACKAGE)-$(VERSION)/include/Makefile \
$(PACKAGE)-$(VERSION)/include/project.conf \

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

BIN
data/16x16/mailer-inbox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
data/16x16/mailer-sent.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

BIN
data/16x16/mailer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

19
data/16x16/project.conf Normal file
View File

@ -0,0 +1,19 @@
dist=Makefile,mailer.png,mailer-accounts.png,mailer-drafts.png,mailer-inbox.png,mailer-outbox.png,mailer-sent.png
[mailer.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps
[mailer-accounts.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps
[mailer-drafts.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps
[mailer-inbox.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps
[mailer-outbox.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps
[mailer-sent.png]
install=$(PREFIX)/share/icons/hicolor/16x16/apps

36
data/24x24/Makefile Normal file
View File

@ -0,0 +1,36 @@
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
all:
clean:
distclean: clean
install: all
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer-accounts.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-accounts.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer-drafts.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-drafts.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer-inbox.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-inbox.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer-outbox.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-outbox.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
$(INSTALL) -m 0644 -- mailer-sent.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-sent.png
uninstall:
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-accounts.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-drafts.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-inbox.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-outbox.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/mailer-sent.png
.PHONY: all clean distclean install uninstall

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

BIN
data/24x24/mailer-inbox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 B

BIN
data/24x24/mailer-sent.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
data/24x24/mailer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

19
data/24x24/project.conf Normal file
View File

@ -0,0 +1,19 @@
dist=Makefile,mailer.png,mailer-accounts.png,mailer-drafts.png,mailer-inbox.png,mailer-outbox.png,mailer-sent.png
[mailer.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps
[mailer-accounts.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps
[mailer-drafts.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps
[mailer-inbox.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps
[mailer-outbox.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps
[mailer-sent.png]
install=$(PREFIX)/share/icons/hicolor/24x24/apps

30
data/48x48/Makefile Normal file
View File

@ -0,0 +1,30 @@
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
all:
clean:
distclean: clean
install: all
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
$(INSTALL) -m 0644 -- mailer.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
$(INSTALL) -m 0644 -- mailer-inbox.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-inbox.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
$(INSTALL) -m 0644 -- mailer-outbox.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-outbox.png
$(MKDIR) $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
$(INSTALL) -m 0644 -- mailer-sent.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-sent.png
uninstall:
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-inbox.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-outbox.png
$(RM) -- $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/mailer-sent.png
.PHONY: all clean distclean install uninstall

BIN
data/48x48/mailer-inbox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
data/48x48/mailer-sent.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
data/48x48/mailer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

13
data/48x48/project.conf Normal file
View File

@ -0,0 +1,13 @@
dist=Makefile,mailer.png,mailer-inbox.png,mailer-outbox.png,mailer-sent.png
[mailer.png]
install=$(PREFIX)/share/icons/hicolor/48x48/apps
[mailer-inbox.png]
install=$(PREFIX)/share/icons/hicolor/48x48/apps
[mailer-outbox.png]
install=$(PREFIX)/share/icons/hicolor/48x48/apps
[mailer-sent.png]
install=$(PREFIX)/share/icons/hicolor/48x48/apps

View File

@ -1,3 +1,4 @@
SUBDIRS = 24x24 48x48
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
@ -5,17 +6,24 @@ INSTALL = install
RM = rm -f
all:
all: subdirs
subdirs:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE)) || exit; done
clean:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
distclean: clean
distclean:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
install: all
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) install) || exit; done
$(MKDIR) $(DESTDIR)$(PREFIX)/share/applications
$(INSTALL) -m 0644 -- mailer.desktop $(DESTDIR)$(PREFIX)/share/applications/mailer.desktop
uninstall:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit; done
$(RM) -- $(DESTDIR)$(PREFIX)/share/applications/mailer.desktop
.PHONY: all clean distclean install uninstall
.PHONY: all subdirs clean distclean install uninstall

View File

@ -1,3 +1,4 @@
subdirs=24x24,48x48
dist=Makefile,mailer.desktop
[mailer.desktop]

246
po/fr.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Mailer 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-22 15:22+0200\n"
"POT-Creation-Date: 2010-10-24 22:12+0200\n"
"PO-Revision-Date: 2010-10-02 23:25+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: French\n"
@ -16,256 +16,288 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../src/compose.c:75
#: ../src/compose.c:73
msgid "_New message"
msgstr "_Nouveau message"
#: ../src/compose.c:78
#: ../src/compose.c:76
msgid "_Save"
msgstr "_Enregistrer"
#: ../src/compose.c:79
#: ../src/compose.c:77
msgid "Save _as..."
msgstr "Enregistrer _sous..."
#: ../src/compose.c:81 ../src/mailer.c:97
#: ../src/compose.c:79 ../src/mailer.c:110
msgid "_Print"
msgstr "_Imprimer"
#: ../src/compose.c:82 ../src/mailer.c:98
#: ../src/compose.c:80 ../src/mailer.c:111
msgid "Print pre_view"
msgstr "_Aperçu avant impression"
#: ../src/compose.c:85
#: ../src/compose.c:83
msgid "S_end"
msgstr "En_voyer"
#: ../src/compose.c:88
#: ../src/compose.c:86
msgid "_Close"
msgstr "_Fermer"
#: ../src/compose.c:95
#: ../src/compose.c:93
msgid "_Undo"
msgstr "_Annuler"
#: ../src/compose.c:96
#: ../src/compose.c:94
msgid "_Redo"
msgstr "_Refaire"
#: ../src/compose.c:98 ../src/mailer.c:112
#: ../src/compose.c:96 ../src/mailer.c:125
msgid "_Select all"
msgstr "Sélectionner tout"
#: ../src/compose.c:105 ../src/mailer.c:119
#: ../src/compose.c:103 ../src/mailer.c:132
msgid "_Unselect all"
msgstr "Tout désélectionner"
#: ../src/compose.c:107 ../src/mailer.c:108
#: ../src/compose.c:105 ../src/mailer.c:121
msgid "_Cut"
msgstr "Co_uper"
#: ../src/compose.c:108
#: ../src/compose.c:106
msgid "_Copy"
msgstr "_Copier"
#: ../src/compose.c:109 ../src/mailer.c:110
#: ../src/compose.c:107 ../src/mailer.c:123
msgid "_Paste"
msgstr "C_oller"
#: ../src/compose.c:115
msgid "_CC field"
msgstr "Champ _CC"
#: ../src/compose.c:113
msgid "Add field"
msgstr "Ajouter un champ"
#: ../src/compose.c:116
msgid "_BCC field"
msgstr "Champ _BCC"
#: ../src/compose.c:123 ../src/compose.c:126 ../src/mailer.c:146
#: ../src/mailer.c:148
#: ../src/compose.c:120 ../src/compose.c:123 ../src/mailer.c:159
#: ../src/mailer.c:161
msgid "_About"
msgstr "_A propos"
#: ../src/compose.c:133 ../src/mailer.c:155
#: ../src/compose.c:130 ../src/mailer.c:168
msgid "_File"
msgstr "_Fichier"
#: ../src/compose.c:134 ../src/mailer.c:156
#: ../src/compose.c:131 ../src/mailer.c:169
msgid "_Edit"
msgstr "_Edition"
#: ../src/compose.c:135
#: ../src/compose.c:132
msgid "_View"
msgstr "_Vue"
#: ../src/compose.c:136 ../src/mailer.c:158
#: ../src/compose.c:133 ../src/mailer.c:171
msgid "_Help"
msgstr "_Aide"
#: ../src/compose.c:143
#: ../src/compose.c:140
msgid "Send"
msgstr "Envoyer"
#: ../src/compose.c:146
#: ../src/compose.c:143
msgid "Save"
msgstr "Enregistrer"
#: ../src/compose.c:148
#: ../src/compose.c:145
msgid "Cut"
msgstr "Couper"
#: ../src/compose.c:146
msgid "Copy"
msgstr "Copier"
#: ../src/compose.c:147
msgid "Paste"
msgstr "Coller"
#: ../src/compose.c:149
msgid "Attach"
msgstr "Attacher"
#: ../src/compose.c:177
#: ../src/compose.c:185
msgid " - Compose"
msgstr " - Composer"
#: ../src/compose.c:194 ../src/mailer.c:570
msgid " From: "
msgstr " De: "
#: ../src/compose.c:201
msgid "From: "
msgstr "De: "
#: ../src/compose.c:207 ../src/mailer.c:571
msgid " To: "
msgstr " À: "
#: ../src/compose.c:226
msgid "To:"
msgstr "À:"
#: ../src/compose.c:220
msgid " CC: "
#: ../src/compose.c:229
msgid "Cc:"
msgstr "Cc:"
#: ../src/compose.c:232
msgid "Bcc:"
msgstr "Ccc"
#: ../src/compose.c:236
msgid "Reply-To:"
msgstr "Répondre à:"
#: ../src/compose.c:239
msgid "Newsgroup:"
msgstr ""
#: ../src/compose.c:233
msgid " BCC: "
msgstr ""
#: ../src/compose.c:242
msgid "Followup-To:"
msgstr "Suivre sur:"
#: ../src/compose.c:246 ../src/mailer.c:569
msgid " Subject: "
msgstr " Sujet: "
#: ../src/compose.c:268
msgid "Subject: "
msgstr "Sujet: "
#: ../src/compose.c:408
#: ../src/compose.c:461
msgid "Sending mail..."
msgstr "Envoi du message..."
#: ../src/compose.c:415
#: ../src/compose.c:468
msgid "Progression: "
msgstr ""
msgstr "Progression: "
#: ../src/mailer.c:85
#: ../src/mailer.c:98
msgid "New account"
msgstr "Nouveau compte"
#: ../src/mailer.c:85
#: ../src/mailer.c:98
msgid "Account settings"
msgstr "Paramètres du compte"
#: ../src/mailer.c:85
#: ../src/mailer.c:98
msgid "Account confirmation"
msgstr "Confirmation du compte"
#: ../src/mailer.c:91
#: ../src/mailer.c:104
msgid "_New mail"
msgstr "_Nouveau message"
#: ../src/mailer.c:94 ../src/mailer.c:168
#: ../src/mailer.c:107 ../src/mailer.c:181
msgid "Send / Receive"
msgstr "Envoyer / Recevoir"
#: ../src/mailer.c:101
#: ../src/mailer.c:114
msgid "_Quit"
msgstr "_Quitter"
#: ../src/mailer.c:109
#: ../src/mailer.c:122
msgid "Cop_y"
msgstr "_Copier"
#: ../src/mailer.c:121
#: ../src/mailer.c:134
msgid "_Preferences"
msgstr "_Préférences"
#: ../src/mailer.c:128
#: ../src/mailer.c:141
msgid "_Reply"
msgstr "_Répondre"
#: ../src/mailer.c:130
#: ../src/mailer.c:143
msgid "Reply to _all"
msgstr "Répondre à _tous"
#: ../src/mailer.c:132
#: ../src/mailer.c:145
msgid "_Forward"
msgstr "_Transmettre"
#: ../src/mailer.c:135
#: ../src/mailer.c:148
msgid "_Delete"
msgstr "_Supprimer"
#: ../src/mailer.c:138
#: ../src/mailer.c:151
msgid "_View source"
msgstr "Afficher la _source"
#: ../src/mailer.c:157
#: ../src/mailer.c:170
msgid "_Message"
msgstr "_Message"
#: ../src/mailer.c:165
#: ../src/mailer.c:178
msgid "New mail"
msgstr "Nouveau message"
#: ../src/mailer.c:169
#: ../src/mailer.c:182
msgid "Stop"
msgstr "Stop"
#: ../src/mailer.c:171
#: ../src/mailer.c:184
msgid "Reply"
msgstr "Répondre"
#: ../src/mailer.c:172
#: ../src/mailer.c:185
msgid "Reply to all"
msgstr "Répondre à tous"
#: ../src/mailer.c:174
#: ../src/mailer.c:187
msgid "Forward"
msgstr "Transmettre"
#: ../src/mailer.c:176
#: ../src/mailer.c:189
msgid "Delete"
msgstr "Supprimer"
#: ../src/mailer.c:177
#: ../src/mailer.c:190
msgid "Print"
msgstr "Imprimer"
#: ../src/mailer.c:180
#: ../src/mailer.c:193
msgid "Preferences"
msgstr "Préférences"
#: ../src/mailer.c:260
#: ../src/mailer.c:273
msgid "Mailer"
msgstr "Mailer"
#: ../src/mailer.c:395
#: ../src/mailer.c:408
msgid "Folders"
msgstr "Dossiers"
#: ../src/mailer.c:463
#: ../src/mailer.c:476
msgid "Subject"
msgstr "Sujet"
#: ../src/mailer.c:465
#: ../src/mailer.c:478
msgid "From"
msgstr "De"
#: ../src/mailer.c:467
#: ../src/mailer.c:480
msgid "To"
msgstr "À"
#: ../src/mailer.c:469
#: ../src/mailer.c:482
msgid "Date"
msgstr "Date"
#: ../src/mailer.c:572
#: ../src/mailer.c:582
msgid " Subject: "
msgstr " Sujet: "
#: ../src/mailer.c:583
msgid " From: "
msgstr " De: "
#: ../src/mailer.c:584
msgid " To: "
msgstr " À: "
#: ../src/mailer.c:585
msgid " Date: "
msgstr " Date: "
#: ../src/mailer.c:706 ../src/mailer.c:711
#: ../src/mailer.c:719 ../src/mailer.c:724
msgid "Error"
msgstr "Erreur"
#: ../src/mailer.c:809
#: ../src/mailer.c:823
msgid ""
"The messages selected will be deleted.\n"
"Continue?"
@ -273,112 +305,112 @@ msgstr ""
"Les messages sélectionnés vont être effacés.\n"
"Continuer?"
#: ../src/mailer.c:881
#: ../src/mailer.c:895
msgid "Mailer - View source"
msgstr "Mailer - Source"
#: ../src/mailer.c:925
#: ../src/mailer.c:941
msgid "Re: "
msgstr "Re: "
#: ../src/mailer.c:1064
#: ../src/mailer.c:1080
msgid "Mailer preferences"
msgstr "Préférences de Mailer"
#: ../src/mailer.c:1100
#: ../src/mailer.c:1116
msgid "Enabled"
msgstr "Actif"
#: ../src/mailer.c:1104
#: ../src/mailer.c:1120
msgid "Name"
msgstr "Nom"
#: ../src/mailer.c:1108
#: ../src/mailer.c:1124
msgid "Type"
msgstr "Type"
#: ../src/mailer.c:1132
#: ../src/mailer.c:1148
msgid "Accounts"
msgstr "Comptes"
#: ../src/mailer.c:1139
#: ../src/mailer.c:1155
msgid "Messages font:"
msgstr "Police des messages:"
#: ../src/mailer.c:1149
#: ../src/mailer.c:1165
msgid "Display"
msgstr "Affichage"
#: ../src/mailer.c:1231
#: ../src/mailer.c:1247
msgid "No account plug-in available"
msgstr "Aucun greffon de compte disponible"
#: ../src/mailer.c:1386 ../src/mailer.c:1664
#: ../src/mailer.c:1402 ../src/mailer.c:1680
msgid "Account name"
msgstr "Nom du compte"
#: ../src/mailer.c:1393
#: ../src/mailer.c:1409
msgid "Your name"
msgstr "Votre nom"
#: ../src/mailer.c:1400
#: ../src/mailer.c:1416
msgid "e-mail address"
msgstr "Adresse e-mail"
#: ../src/mailer.c:1407
#: ../src/mailer.c:1423
msgid "Type of account"
msgstr "Type de compte"
#: ../src/mailer.c:1556
#: ../src/mailer.c:1572
msgid "Choose file"
msgstr "Choisir un fichier"
#: ../src/mailer.c:1733
#: ../src/mailer.c:1749
msgid "hidden"
msgstr "masqué"
#: ../src/mailer.c:1767
#: ../src/mailer.c:1783
msgid "Yes"
msgstr "Oui"
#: ../src/mailer.c:1767
#: ../src/mailer.c:1783
msgid "No"
msgstr "Non"
#: ../src/mailer.c:1795
#: ../src/mailer.c:1811
msgid "Account type "
msgstr "Type de compte "
#: ../src/mailer.c:1796
#: ../src/mailer.c:1812
msgid " active\n"
msgstr " actif\n"
#: ../src/mailer.c:1840
#: ../src/mailer.c:1856
msgid "Edit account: "
msgstr "Modification du compte: "
#: ../src/mailer.c:1907
#: ../src/mailer.c:1923
msgid "An error occured while saving preferences"
msgstr "Une erreur est survenue pendant la sauvegarde des préférences"
#: ../src/mailer.c:2041 ../src/mailer.c:2046
#: ../src/mailer.c:2057 ../src/mailer.c:2062
msgid "Question"
msgstr "Question"
#: ../src/mailer.c:2115
#: ../src/mailer.c:2131
#, c-format
msgid "%s/%s: %d %s"
msgstr "%s/%s: %d %s"
#: ../src/mailer.c:2118
#: ../src/mailer.c:2134
msgid "messages"
msgstr "messages"
#: ../src/mailer.c:2118
#: ../src/mailer.c:2134
msgid "message"
msgstr "message"
#: ../src/mailer.c:2121
#: ../src/mailer.c:2137
msgid "Ready"
msgstr "Prêt"

View File

@ -40,7 +40,7 @@ mailer.o: mailer.c account.h callbacks.h compose.h mailer.h ../config.h
$(CC) -D PREFIX=\"$(PREFIX)\" $(mailer_CFLAGS) -c mailer.c
main.o: main.c mailer.h ../config.h
$(CC) $(mailer_CFLAGS) -c main.c
$(CC) -D PREFIX=\"$(PREFIX)\" $(mailer_CFLAGS) -c main.c
clean:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done

View File

@ -23,9 +23,20 @@
#include <dlfcn.h>
#include "mailer.h"
#include "account.h"
#include "../config.h"
/* constants */
#ifndef PREFIX
# define PREFIX "/usr/local"
#endif
#ifndef LIBDIR
# define LIBDIR PREFIX "/lib"
#endif
#ifndef PLUGINDIR
# define PLUGINDIR LIBDIR "/Mailer"
#endif
#define ACCOUNT "account"

View File

@ -88,7 +88,7 @@ static MboxFolder _mbox_inbox =
&_mbox_config[0], NULL, 0, NULL,
0, NULL, -1,
0, PC_FROM, NULL, 0, NULL,
"stock_inbox"
"mailer-inbox"
};
static MboxFolder _mbox_spool =
@ -96,7 +96,7 @@ static MboxFolder _mbox_spool =
&_mbox_config[1], NULL, 0, NULL,
0, NULL, -1,
0, PC_FROM, NULL, 0, NULL,
"stock_inbox"
"mailer-inbox"
};
static MboxFolder _mbox_drafts =
@ -112,7 +112,7 @@ static MboxFolder _mbox_sent =
&_mbox_config[3], NULL, 0, NULL,
0, NULL, -1,
0, PC_FROM, NULL, 0, NULL,
"stock_sent-mail"
"mailer-sent"
};
static MboxFolder _mbox_trash =

View File

@ -238,21 +238,12 @@ void on_compose_file_close(gpointer data)
/* compose view menu */
/* on_compose_view_cc */
void on_compose_view_cc(gpointer data)
/* on_compose_view_add_field */
void on_compose_view_add_field(gpointer data)
{
Compose * compose = data;
compose_toggle_show_cc(compose);
}
/* on_compose_view_bcc */
void on_compose_view_bcc(gpointer data)
{
Compose * compose = data;
compose_toggle_show_bcc(compose);
compose_add_field(compose, NULL, NULL);
}

View File

@ -79,8 +79,7 @@ void on_compose_edit_copy(gpointer data);
void on_compose_edit_paste(gpointer data);
/* view menu */
void on_compose_view_cc(gpointer data);
void on_compose_view_bcc(gpointer data);
void on_compose_view_add_field(gpointer data);
/* help menu */
void on_compose_help_about(gpointer data);

View File

@ -53,11 +53,9 @@ struct _Compose
/* widgets */
GtkWidget * window;
GtkWidget * from;
GtkWidget * to;
GtkWidget * tb_cc;
GtkWidget * cc;
GtkWidget * tb_bcc;
GtkWidget * bcc;
GtkListStore * h_store;
GtkListStore * h_headers;
GtkWidget * h_view;
GtkWidget * subject;
GtkWidget * view;
GtkWidget * statusbar;
@ -112,8 +110,7 @@ static DesktopMenu _menu_edit[] =
static DesktopMenu _menu_view[] =
{
{ N_("_CC field"), G_CALLBACK(on_compose_view_cc), NULL, 0, 0 },
{ N_("_BCC field"), G_CALLBACK(on_compose_view_bcc), NULL, 0, 0 },
{ N_("Add field"), G_CALLBACK(on_compose_view_add_field), NULL, 0, 0 },
{ NULL, NULL, NULL, 0, 0 }
};
@ -145,6 +142,10 @@ static DesktopToolbar _compose_toolbar[] =
{ "", NULL, NULL, 0, 0, NULL },
{ N_("Save"), G_CALLBACK(on_compose_save), GTK_STOCK_SAVE, 0, 0, NULL },
{ "", NULL, NULL, 0, 0, NULL },
{ N_("Cut"), NULL, GTK_STOCK_CUT, 0, 0, NULL },
{ N_("Copy"), NULL, GTK_STOCK_COPY, 0, 0, NULL },
{ N_("Paste"), NULL, GTK_STOCK_PASTE, 0, 0, NULL },
{ "", NULL, NULL, 0, 0, NULL },
{ N_("Attach"), NULL, "stock_attach", 0, 0, NULL },
{ NULL, NULL, NULL, 0, 0, NULL }
};
@ -153,6 +154,10 @@ static DesktopToolbar _compose_toolbar[] =
/* public */
/* compose_new */
static GtkWidget * _new_text_view(Mailer * mailer);
static void _on_header_field_edited(GtkCellRendererText * renderer,
gchar * path, gchar * text, gpointer data);
static void _on_header_edited(GtkCellRendererText * renderer, gchar * path,
gchar * text, gpointer data);
Compose * compose_new(Mailer * mailer)
{
@ -163,6 +168,9 @@ Compose * compose_new(Mailer * mailer)
GtkToolItem * toolitem;
GtkSizeGroup * sizegroup;
GtkWidget * widget;
GtkCellRenderer * renderer;
GtkTreeViewColumn * column;
GtkTreeIter iter;
if((compose = malloc(sizeof(*compose))) == NULL)
{
@ -187,11 +195,12 @@ Compose * compose_new(Mailer * mailer)
/* toolbar */
toolbar = desktop_toolbar_create(_compose_toolbar, compose, group);
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, TRUE, 0);
/* FIXME make these fields a GtkTreeView */
/* from */
sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
toolbar = gtk_toolbar_new();
widget = gtk_label_new(_(" From: "));
widget = gtk_label_new(_("From: "));
gtk_misc_set_alignment(GTK_MISC(widget), 0.1, 0.5);
gtk_widget_set_size_request(widget, 80, -1);
gtk_size_group_add_widget(sizegroup, widget);
toolitem = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(toolitem), widget);
@ -202,48 +211,63 @@ Compose * compose_new(Mailer * mailer)
gtk_container_add(GTK_CONTAINER(toolitem), compose->from);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
/* to */
toolbar = gtk_toolbar_new();
widget = gtk_label_new(_(" To: "));
gtk_size_group_add_widget(sizegroup, widget);
toolitem = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(toolitem), widget);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
compose->to = gtk_entry_new();
toolitem = gtk_tool_item_new();
gtk_tool_item_set_expand(toolitem, TRUE);
gtk_container_add(GTK_CONTAINER(toolitem), compose->to);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
/* cc */
compose->tb_cc = gtk_toolbar_new();
widget = gtk_label_new(_(" CC: "));
gtk_size_group_add_widget(sizegroup, widget);
toolitem = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(toolitem), widget);
gtk_toolbar_insert(GTK_TOOLBAR(compose->tb_cc), toolitem, -1);
compose->cc = gtk_entry_new();
toolitem = gtk_tool_item_new();
gtk_tool_item_set_expand(toolitem, TRUE);
gtk_container_add(GTK_CONTAINER(toolitem), compose->cc);
gtk_toolbar_insert(GTK_TOOLBAR(compose->tb_cc), toolitem, -1);
gtk_box_pack_start(GTK_BOX(vbox), compose->tb_cc, FALSE, FALSE, 0);
/* bcc */
compose->tb_bcc = gtk_toolbar_new();
widget = gtk_label_new(_(" BCC: "));
gtk_size_group_add_widget(sizegroup, widget);
toolitem = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(toolitem), widget);
gtk_toolbar_insert(GTK_TOOLBAR(compose->tb_bcc), toolitem, -1);
compose->bcc = gtk_entry_new();
toolitem = gtk_tool_item_new();
gtk_tool_item_set_expand(toolitem, TRUE);
gtk_container_add(GTK_CONTAINER(toolitem), compose->bcc);
gtk_toolbar_insert(GTK_TOOLBAR(compose->tb_bcc), toolitem, -1);
gtk_box_pack_start(GTK_BOX(vbox), compose->tb_bcc, FALSE, FALSE, 0);
/* headers */
widget = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
compose->h_store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING);
compose->h_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(
compose->h_store));
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(compose->h_view),
FALSE);
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(compose->h_view), TRUE);
compose->h_headers = gtk_list_store_new(2, G_TYPE_STRING,
G_TYPE_STRING);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "To:", 1, _("To:"),
-1);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "Cc:", 1, _("Cc:"),
-1);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "Bcc:", 1, _("Bcc:"),
-1);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "Reply-To:", 1,
_("Reply-To:"), -1);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "Newsgroup:", 1,
_("Newsgroup:"), -1);
gtk_list_store_append(compose->h_headers, &iter);
gtk_list_store_set(compose->h_headers, &iter, 0, "Followup-To:", 1,
_("Followup-To:"), -1);
renderer = gtk_cell_renderer_combo_new();
g_object_set(renderer, "editable", TRUE, "model", compose->h_headers,
"text-column", 1, NULL);
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(
_on_header_field_edited), compose);
column = gtk_tree_view_column_new_with_attributes("", renderer, "text",
0, NULL);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_append_column(GTK_TREE_VIEW(compose->h_view), column);
renderer = gtk_cell_renderer_text_new();
g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL);
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(
_on_header_edited), compose);
column = gtk_tree_view_column_new_with_attributes("", renderer, "text",
1, NULL);
#if GTK_CHECK_VERSION(2, 4, 0)
gtk_tree_view_column_set_expand(column, TRUE);
#endif
gtk_tree_view_append_column(GTK_TREE_VIEW(compose->h_view), column);
gtk_list_store_append(compose->h_store, &iter);
gtk_list_store_set(compose->h_store, &iter, 0, "To:", -1);
gtk_container_add(GTK_CONTAINER(widget), compose->h_view);
gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, TRUE, 0);
/* subject */
toolbar = gtk_toolbar_new();
widget = gtk_label_new(_(" Subject: "));
widget = gtk_label_new(_("Subject: "));
gtk_misc_set_alignment(GTK_MISC(widget), 0.1, 0.5);
gtk_size_group_add_widget(sizegroup, widget);
toolitem = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(toolitem), widget);
@ -269,8 +293,6 @@ Compose * compose_new(Mailer * mailer)
gtk_container_add(GTK_CONTAINER(compose->window), vbox);
compose->ab_window = NULL;
gtk_widget_show_all(vbox);
gtk_widget_hide(compose->tb_cc);
gtk_widget_hide(compose->tb_bcc);
gtk_widget_show(compose->window);
return compose;
}
@ -314,6 +336,30 @@ static GtkWidget * _new_text_view(Mailer * mailer)
return textview;
}
static void _on_header_field_edited(GtkCellRendererText * renderer,
gchar * path, gchar * text, gpointer data)
{
Compose * compose = data;
GtkTreeModel * model = GTK_TREE_MODEL(compose->h_store);
GtkTreeIter iter;
if(gtk_tree_model_get_iter_from_string(model, &iter, path) != TRUE)
return;
gtk_list_store_set(compose->h_store, &iter, 0, text, -1);
}
static void _on_header_edited(GtkCellRendererText * renderer, gchar * path,
gchar * text, gpointer data)
{
Compose * compose = data;
GtkTreeModel * model = GTK_TREE_MODEL(compose->h_store);
GtkTreeIter iter;
if(gtk_tree_model_get_iter_from_string(model, &iter, path) != TRUE)
return;
gtk_list_store_set(compose->h_store, &iter, 1, text, -1);
}
/* compose_delete */
void compose_delete(Compose * compose)
@ -338,14 +384,21 @@ void compose_set_subject(Compose * compose, char const * subject)
}
/* compose_set_to */
void compose_set_to(Compose * compose, char const * to)
/* useful */
/* compose_add_field */
void compose_add_field(Compose * compose, char const * field,
char const * value)
{
gtk_entry_set_text(GTK_ENTRY(compose->to), to);
GtkTreeIter iter;
gtk_list_store_append(compose->h_store, &iter);
if(field != NULL)
gtk_list_store_set(compose->h_store, &iter, 0, field, -1);
if(value != NULL)
gtk_list_store_set(compose->h_store, &iter, 1, value, -1);
}
/* useful */
/* compose_save */
int compose_save(Compose * compose)
{
@ -364,6 +417,7 @@ static gboolean _on_send_write(GIOChannel * source, GIOCondition condition,
void compose_send(Compose * compose)
{
/* FIXME rewrite more efficiently (and tracking process) */
char * msg;
size_t msg_len;
char * body;
@ -449,55 +503,63 @@ static int _mail_child(int fd[2])
static char * _send_headers(Compose * compose)
{
struct {
char * hdr;
GtkWidget * wgt;
} widgets[] =
{
{ "To: ", NULL },
{ "Cc: ", NULL },
{ "Bcc: ", NULL },
{ "Subject: ", NULL },
{ NULL, NULL }
};
int i;
/* FIXME rewrite this function */
char * msg = NULL;
size_t msg_len = 0;
char const * p;
size_t len;
size_t hdr_len;
char * q;
char * p;
GtkTreeModel * model = GTK_TREE_MODEL(compose->h_store);
GtkTreeIter iter;
gboolean valid;
char * field;
size_t field_len;
char * value;
char const * q;
widgets[0].wgt = compose->to;
widgets[1].wgt = compose->cc;
widgets[2].wgt = compose->bcc;
widgets[3].wgt = compose->subject;
q = gtk_combo_box_get_active_text(GTK_COMBO_BOX(compose->from));
if(*q != '\0')
p = gtk_combo_box_get_active_text(GTK_COMBO_BOX(compose->from));
if(*p != '\0')
{
msg_len = strlen(q) + 8;
msg_len = strlen(p) + 8;
if((msg = malloc(msg_len + 1)) == NULL)
return NULL;
snprintf(msg, msg_len + 1, "%s%s\r\n", "From: ", q);
snprintf(msg, msg_len + 1, "%s%s\r\n", "From: ", p);
}
g_free(q);
for(i = 0; widgets[i].hdr != NULL; i++)
g_free(p);
valid = gtk_tree_model_get_iter_first(model, &iter);
for(; valid == TRUE; valid = gtk_tree_model_iter_next(model, &iter))
{
p = gtk_entry_get_text(GTK_ENTRY(widgets[i].wgt));
if((len = strlen(p)) == 0)
continue;
hdr_len = strlen(widgets[i].hdr);
if((q = realloc(msg, msg_len + hdr_len + len + 3)) == NULL)
gtk_tree_model_get(model, &iter, 0, &field, 1, &value, -1);
if((field_len = strlen(field)) == 0
|| field[field_len - 1] != ':'
|| index(field, ':') != field + field_len - 1)
{
free(msg);
mailer_error(compose->mailer, strerror(errno), 0);
return NULL;
g_free(field);
g_free(value);
continue; /* XXX report error */
}
msg = q;
snprintf(&msg[msg_len], hdr_len + len + 3, "%s%s\r\n",
widgets[i].hdr, p);
msg_len += hdr_len + len + 2;
if((p = realloc(msg, msg_len + strlen(field) + strlen(value)
+ 4)) == NULL)
{
g_free(field);
g_free(value);
continue; /* XXX report error */
}
msg = p;
strcat(msg, field);
strcat(msg, " ");
strcat(msg, value);
strcat(msg, "\r\n");
msg_len = strlen(msg); /* XXX ugly */
g_free(field);
g_free(value);
}
q = gtk_entry_get_text(GTK_ENTRY(compose->subject));
msg_len += strlen(q) + 11;
if((p = realloc(msg, msg_len + 1)) == NULL)
return NULL;
msg = p;
strcat(msg, "Subject: ");
strcat(msg, q);
strcat(msg, "\r\n");
if(msg != NULL)
return msg;
if((msg = strdup("")) == NULL)
@ -580,23 +642,7 @@ void compose_show_about(Compose * compose, gboolean show)
desktop_about_dialog_set_version(dialog, VERSION);
desktop_about_dialog_set_authors(dialog, _authors);
desktop_about_dialog_set_copyright(dialog, _copyright);
desktop_about_dialog_set_logo_icon_name(dialog, "stock_mail");
desktop_about_dialog_set_logo_icon_name(dialog, "mailer");
desktop_about_dialog_set_license(dialog, _license);
gtk_widget_show(dialog);
}
/* compose_toggle_show_bcc */
void compose_toggle_show_bcc(Compose * compose)
{
/* FIXME implement correctly */
gtk_widget_show(compose->tb_bcc);
}
/* compose_toggle_show_cc */
void compose_toggle_show_cc(Compose * compose)
{
/* FIXME implement correctly */
gtk_widget_show(compose->tb_cc);
}

View File

@ -32,16 +32,15 @@ void compose_delete(Compose * compose);
/* accessors */
Mailer * compose_get_mailer(Compose * compose);
void compose_set_subject(Compose * compose, char const * subject);
void compose_set_to(Compose * compose, char const * to);
/* useful */
void compose_add_field(Compose * compose, char const * field,
char const * value);
int compose_save(Compose * compose);
void compose_send(Compose * compose);
void compose_send_cancel(Compose * compose);
void compose_show_about(Compose * compose, gboolean show);
void compose_toggle_show_bcc(Compose * compose);
void compose_toggle_show_cc(Compose * compose);
#endif /* !MAILER_COMPOSE_H */

View File

@ -27,11 +27,24 @@
#include "compose.h"
#include "callbacks.h"
#include "mailer.h"
#include "../config.h"
#include "common.c"
#define _(string) gettext(string)
#define N_(string) (string)
/* constants */
#ifndef PREFIX
# define PREFIX "/usr/local"
#endif
#ifndef LIBDIR
# define LIBDIR PREFIX "/lib"
#endif
#ifndef PLUGINDIR
# define PLUGINDIR LIBDIR "/Mailer"
#endif
/* Mailer */
/* private */
/* types */
@ -255,7 +268,7 @@ Mailer * mailer_new(void)
gtk_window_add_accel_group(GTK_WINDOW(mailer->window), group);
gtk_window_set_default_size(GTK_WINDOW(mailer->window), 800, 600);
#if GTK_CHECK_VERSION(2, 6, 0)
gtk_window_set_icon_name(GTK_WINDOW(mailer->window), "stock_mail");
gtk_window_set_icon_name(GTK_WINDOW(mailer->window), "mailer");
#endif
gtk_window_set_title(GTK_WINDOW(mailer->window), _("Mailer"));
g_signal_connect_swapped(G_OBJECT(mailer->window), "delete-event",
@ -739,7 +752,7 @@ int mailer_account_add(Mailer * mailer, Account * account)
model = gtk_tree_view_get_model(GTK_TREE_VIEW(mailer->view_folders));
gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL);
theme = gtk_icon_theme_get_default();
pixbuf = gtk_icon_theme_load_icon(theme, "stock_mail-accounts", 16, 0,
pixbuf = gtk_icon_theme_load_icon(theme, "mailer-accounts", 16, 0,
NULL);
gtk_tree_store_set(GTK_TREE_STORE(model), &iter, MF_COL_ACCOUNT,
account, MF_COL_ENABLED, account_get_enabled(account),
@ -789,6 +802,7 @@ static void _mailer_delete_selected_foreach(GtkTreeRowReference * reference,
void mailer_delete_selected(Mailer * mailer)
{
/* FIXME figure which area is focused first (deleting folders) */
GtkTreeModel * model;
GtkTreeSelection * treesel;
GList * selected;
@ -920,8 +934,10 @@ static void _reply_selected(Mailer * mailer, GtkTreeModel * model,
return; /* XXX error message? */
gtk_tree_model_get(model, iter, MH_COL_FROM, &from, MH_COL_SUBJECT,
&subject, -1);
#if 0 /* FIXME adapt */
if(from != NULL)
compose_set_to(compose, from);
#endif
q = N_("Re: ");
if(subject != NULL
&& strncasecmp(subject, q, strlen(q)) != 0
@ -1004,7 +1020,7 @@ void mailer_show_about(Mailer * mailer, gboolean show)
desktop_about_dialog_set_version(dialog, VERSION);
desktop_about_dialog_set_authors(dialog, _authors);
desktop_about_dialog_set_copyright(dialog, _copyright);
desktop_about_dialog_set_logo_icon_name(dialog, "stock_mail");
desktop_about_dialog_set_logo_icon_name(dialog, "mailer");
desktop_about_dialog_set_license(dialog, _license);
gtk_widget_show(dialog);
}

View File

@ -22,15 +22,10 @@
# include <gtk/gtk.h>
# include "Mailer.h"
# include "account.h"
# include "../config.h"
/* Mailer */
/* constants */
# ifndef PLUGINDIR
# define PLUGINDIR LIBDIR "/Mailer"
# endif
# define MAILER_CONFIG_FILE ".mailer"
# define MAILER_MESSAGES_FONT "Monospace 8"

View File

@ -29,4 +29,5 @@ cppflags=-D PREFIX=\"$(PREFIX)\"
depends=account.h,callbacks.h,compose.h,mailer.h,../config.h
[main.c]
cppflags=-D PREFIX=\"$(PREFIX)\"
depends=mailer.h,../config.h