From noreply at thewildbeast.co.uk Mon Jan 2 10:37:08 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 02 Jan 2017 09:37:08 +0000 Subject: [Users] [Bug 3751] program crashes when scrolling quickly thru messages In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3751 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Paul --- this bug report is invalidated by the conversation continuing elsewhere. -- You are receiving this mail because: You are the assignee for the bug. From andrzej.filip at gmail.com Tue Jan 3 09:22:17 2017 From: andrzej.filip at gmail.com (Andrzej A. Filip) Date: Tue, 03 Jan 2017 09:22:17 +0100 Subject: [Users] linux: cron/at based fetch Message-ID: Is it possible to use claws-mail for cron/at scheduled fetches? "claws-mail --receive" executed by "at" produced "cannot open display" error. -- A. Filip From subscript at free.fr Tue Jan 3 09:56:51 2017 From: subscript at free.fr (wwp) Date: Tue, 3 Jan 2017 09:56:51 +0100 Subject: [Users] linux: cron/at based fetch In-Reply-To: References: Message-ID: <20170103095651.0cdc970b@anthra> Hello Andrzej, On Tue, 03 Jan 2017 09:22:17 +0100 "Andrzej A. Filip" wrote: > Is it possible to use claws-mail for cron/at scheduled fetches? > > "claws-mail --receive" executed by "at" produced "cannot open display" error. Not sure this is a good idea. Are you using the users' crontab or the system one? Anyway, you need to know that processes launched by cron run in a minimalist environment set. You'd need to set DISPLAY at least, possibly more. Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From colin at colino.net Tue Jan 3 10:04:44 2017 From: colin at colino.net (Colin Leroy) Date: Tue, 3 Jan 2017 10:04:44 +0100 Subject: [Users] linux: cron/at based fetch In-Reply-To: References: Message-ID: <20170103100444.5d11c7aa@colin.i-run.lau> On Tue, 03 Jan 2017 09:22:17 +0100, "Andrzej A. Filip" wrote: > Is it possible to use claws-mail for cron/at scheduled fetches? > > "claws-mail --receive" executed by "at" produced "cannot open > display" error. It should not need $DISPLAY if it is already running. If it is not, running claws-mail --receive would start it. What you could do is something like pidof claws-mail > /dev/null && claws-mail --receive -- Colin From andrzej.filip at gmail.com Tue Jan 3 10:53:05 2017 From: andrzej.filip at gmail.com (Andrzej A. Filip) Date: Tue, 03 Jan 2017 10:53:05 +0100 Subject: [Users] linux: cron/at based fetch In-Reply-To: <20170103100444.5d11c7aa@colin.i-run.lau> (Colin Leroy's message of "Tue, 3 Jan 2017 10:04:44 +0100") References: <20170103100444.5d11c7aa@colin.i-run.lau> Message-ID: Colin Leroy wrote: > On Tue, 03 Jan 2017 09:22:17 +0100, "Andrzej A. Filip" > wrote: > >> Is it possible to use claws-mail for cron/at scheduled fetches? >> >> "claws-mail --receive" executed by "at" produced "cannot open >> display" error. > > It should not need $DISPLAY if it is already running. If it is not, > running claws-mail --receive would start it. > > What you could do is something like > > pidof claws-mail > /dev/null && claws-mail --receive I need to download new mail even if claws-mail is not started. I _would like_ it to work even if user isn't logged-in (X/graphic session). As the last resort the solutions may start claws-mail in existing X-windows session of the user. -- A. Filip From renaud at olgiati-in-paraguay.org Tue Jan 3 11:09:54 2017 From: renaud at olgiati-in-paraguay.org (Renaud OLGIATI (Ron)) Date: Tue, 3 Jan 2017 07:09:54 -0300 Subject: [Users] linux: cron/at based fetch In-Reply-To: References: Message-ID: <20170103070954.7c75abdc@ron.cerrocora.org> On Tue, 03 Jan 2017 09:22:17 +0100 "Andrzej A. Filip" wrote: > Is it possible to use claws-mail for cron/at scheduled fetches? > "claws-mail --receive" executed by "at" produced "cannot open display" error. Have you tried crontab ? I have in my crontab a line: 30 * * * * /usr/bin/claws-mail --send to flush once an hour any queued mail that failed to send, due to Claws being already busy sending. Works quite well, so claws-mail --receive should work too. Of course I have claws-mail open on the desktop at the time. Cheers, Ron. -- Aliquid melius quam pessimum optimum non est. -- http://www.olgiati-in-paraguay.org -- From nick_koretsky at ukr.net Tue Jan 3 18:38:48 2017 From: nick_koretsky at ukr.net (Nick Koretsky) Date: Tue, 3 Jan 2017 19:38:48 +0200 Subject: [Users] linux: cron/at based fetch In-Reply-To: References: <20170103100444.5d11c7aa@colin.i-run.lau> Message-ID: <20170103193848.2a5c2274@nikita> On Tue, 03 Jan 2017 10:53:05 +0100 "Andrzej A. Filip" wrote: > >> Is it possible to use claws-mail for cron/at scheduled fetches? > >> > >> "claws-mail --receive" executed by "at" produced "cannot open > >> display" error. > > > > It should not need $DISPLAY if it is already running. If it is not, > > running claws-mail --receive would start it. > > > > What you could do is something like > > > > pidof claws-mail > /dev/null && claws-mail --receive > > I need to download new mail even if claws-mail is not started. > I _would like_ it to work even if user isn't logged-in (X/graphic > session). Why? It seems you are trying to use the wrong tool... 99.9% chance that a correct tool you should use is fetchmail. > > As the last resort the solutions may start claws-mail in existing > X-windows session of the user. > -- Nick Koretsky (nick.koretsky at gmail.com) From noreply at thewildbeast.co.uk Tue Jan 3 18:40:32 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 17:40:32 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #3 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #2) > It's not a workaround, it's a solution. Nope. > You get to choose where you want the cursor to be on opening a folder. I do not get to chose to have the list scrolled down all the way without selecting a specific message. Scrolling down in the list and selecting a message are two different things. > The program can't presume to read your mind. I am not asking for it to do that. If one configures the newest messages to be at the bottom of the list, the default scrolling state should be all the way down in the list so that the newest messages are shown when opening a folder. The standard selection of messages is a different thing. It should be possible to chose "none" and to still open the folder with the list scrolled down, so that one can see the newest messages immediately without selecting (opening, marking as read, ...) any of them. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 18:59:45 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 17:59:45 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #4 from wwp --- Please define what is ascending or descending? Here, entering a folder scrolls to the top or to the bottom, following the sort order. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 19:04:36 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 18:04:36 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #5 from wwp --- (make sure "last email in the list" is set, or if your conception of ascending/descending differs from mine, "first email in the list", see Preferences/Summaries/Message list/Set default selection when entering a folder). With this and the per-column sort method, you can do what you want. And BTW, since a message is always selected in a folder (caution: "select" does not mandatorily mean "open", this depends on preferences), you cannot say that scrolling up/down in the list and selecting a message are different things. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 19:07:57 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 18:07:57 +0000 Subject: [Users] [Bug 3381] MacOS: integration with native OSX GTK In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3381 --- Comment #8 from alt.rw-9o6f8p42 at yopmail.com --- > It makes possible to build claws-mail with native OSX GTK build > which is provided by gtk-mac-intergration project. It allows to > make a distributable OSX application bundle which doesn't depend > on any external libraries. Is this still on the radar? A readily available official MacOS bundle that does not depend on external libraries would be really cool. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 19:27:19 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 18:27:19 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #6 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #5) > (make sure "last email in the list" is set, or if your conception of > ascending/descending differs from mine, "first email in the list", see > Preferences/Summaries/Message list/Set default selection when entering a > folder). I have already described and done that as a workaround. > With this and the per-column sort method, you can do what you want. Unfortunately I cannot. What I would like to see is that the list is scrolled down, but no message is selected. When a message gets selected, my preference is to have it marked as read immediately. The workaround is bad because it will always lead to the last message in the list being marked as read. > And BTW, since a message is always selected in a folder (caution: "select" > does not mandatorily mean "open", this depends on preferences), you cannot > say that scrolling up/down in the list and selecting a message are different > things. I can choose "None" as the default selection for opening a folder from the settings. No message is then selected. I can scroll down in the list without a message being selected. The scrolling state of the list can be changed independently from making a selection and in my opinion it should be all the way down in the list by default if newer messages are set to be sorted at the bottom of the list. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 19:36:52 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 18:36:52 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #7 from Paul --- (In reply to comment #6) > in my opinion it should be all the > way down in the list by default if newer messages are set to be sorted at > the bottom of the list. Yes, it's an opinion. Even if you sort with newer messages at the bottom that doesn't necessarily mean that all new messages are at the bottom. For example, with threading turned on, new messages could be anywhere in the tree. -- You are receiving this mail because: You are the assignee for the bug. From andrzej.filip at gmail.com Tue Jan 3 19:50:28 2017 From: andrzej.filip at gmail.com (Andrzej A. Filip) Date: Tue, 03 Jan 2017 19:50:28 +0100 Subject: [Users] linux: cron/at based fetch In-Reply-To: <20170103193848.2a5c2274@nikita> (Nick Koretsky's message of "Tue, 3 Jan 2017 19:38:48 +0200") References: <20170103100444.5d11c7aa@colin.i-run.lau> <20170103193848.2a5c2274@nikita> Message-ID: Nick Koretsky wrote: > On Tue, 03 Jan 2017 10:53:05 +0100 > "Andrzej A. Filip" wrote: > >> >> Is it possible to use claws-mail for cron/at scheduled fetches? >> >> >> >> "claws-mail --receive" executed by "at" produced "cannot open >> >> display" error. >> > >> > It should not need $DISPLAY if it is already running. If it is not, >> > running claws-mail --receive would start it. >> > >> > What you could do is something like >> > >> > pidof claws-mail > /dev/null && claws-mail --receive >> >> I need to download new mail even if claws-mail is not started. >> I _would like_ it to work even if user isn't logged-in (X/graphic >> session). > > Why? It seems you are trying to use the wrong tool... 99.9% chance that a > correct tool you should use is fetchmail. I use IMAP based email accounts. fetchmail is very good for POP3 accounts. >> As the last resort the solutions may start claws-mail in existing >> X-windows session of the user. -- A. Filip From noreply at thewildbeast.co.uk Tue Jan 3 20:08:27 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 19:08:27 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #8 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #7) > (In reply to comment #6) > > > in my opinion it should be all the > > way down in the list by default if newer messages are set to be sorted > > at the bottom of the list. > > Yes, it's an opinion. No, it is not. If you chose no message to be selected by default when opening a folder, which is an available option, then the list will always be scrolled up and you will see the very top of the list, regardless of whether the newest messages are set to be at the top or bottom of the list. There is no option to have the newest messages at the bottom, no message selected and the list scrolled down to the bottom when entering a folder. It should be possible to have the list scrolled down by default without having to select a message to achieve that. > Even if you sort with newer messages at the bottom > that doesn't necessarily mean that all new messages are at the bottom. For > example, with threading turned on, new messages could be anywhere in the > tree. Even if you use threading, messages are more likely to appear closer to the bottom of the list than to the top when the list is sorted by date and set to show newer messages at the bottom. If in doubt, make it an option in the settings. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 3 23:59:30 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 03 Jan 2017 22:59:30 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #9 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #8) > (In reply to comment #7) > > Yes, it's an opinion. > > No, it is not. I just noticed that for some reason I read "It's an option" and responded accordingly. Awkward... You are absolutely right. It is an opinion, of course. Not everyone will want to have the newest messages at the bottom, not everyone will want to have no messages selected by default, not everyone will want the list to be scrolled to the bottom, etc. That's what user settings are for; to meet different preferences. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 4 08:38:15 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 04 Jan 2017 07:38:15 +0000 Subject: [Users] [Bug 3752] New: Fancy does not render
d content without   Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3752 Bug ID: 3752 Summary: Fancy does not render
d content without   Classification: Unclassified Product: Claws Mail (Windows) Version: 3.14.1 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P3 Component: default Assignee: users at lists.claws-mail.org Reporter: clawsmail at kushwaha.com If an email comes back with
content in HTML part (example: Thunderbird often does this when responding), Fancy on Windows does not render content within the
unless it contains   at least once. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 4 10:05:47 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 04 Jan 2017 09:05:47 +0000 Subject: [Users] [Bug 3752] Fancy does not render
d content without   In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3752 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Paul --- it's a webkit bug, not our bug -- You are receiving this mail because: You are the assignee for the bug. From abrolag at users.sourceforge.net Wed Jan 4 20:41:25 2017 From: abrolag at users.sourceforge.net (Abrolag) Date: Wed, 4 Jan 2017 19:41:25 +0000 Subject: [Users] Unintended addresses Message-ID: <20170104194039.47e072aa@debian> I send and receive a lot of emails and frequently dodge between accounts when sending/replying. I really REALLY need a pre-send warning if there is more than one address picked up. It must be possible to do this otherwise how would Claws know to send the individual emails? This is getting to be a real nuisance. -- W J G From subscript at free.fr Wed Jan 4 20:47:29 2017 From: subscript at free.fr (wwp) Date: Wed, 4 Jan 2017 20:47:29 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170104194039.47e072aa@debian> References: <20170104194039.47e072aa@debian> Message-ID: <20170104204729.79af40f5@anthra> Hello Abrolag, On Wed, 4 Jan 2017 19:41:25 +0000 Abrolag wrote: > I send and receive a lot of emails and frequently dodge between accounts when > sending/replying. I really REALLY need a pre-send warning if there is more than > one address picked up. > > This is getting to be a real nuisance. Picked up by who or when doing what? I'm afraid there's no email agent that offers the feature you require, isn't there? At least in Claws Mail, it is not possible. My feeling here is that *you* need to change your work flow or acquire a different habit. > It must be possible to do this otherwise how would Claws > know to send the individual emails? That question makes me wondering what's the point? Claws Mail send one email with several recipients, the SMTP server handles this. What else? Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From silver.bullet at zoho.com Wed Jan 4 20:58:40 2017 From: silver.bullet at zoho.com (Ralf Mardorf) Date: Wed, 4 Jan 2017 20:58:40 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170104194039.47e072aa@debian> References: <20170104194039.47e072aa@debian> Message-ID: <20170104205840.3fef33ed@utnubu> On Wed, 4 Jan 2017 19:41:25 +0000, Abrolag wrote: >I send and receive a lot of emails and frequently dodge between >accounts when sending/replying. I really REALLY need a pre-send >warning if there is more than one address picked up. It must be >possible to do this otherwise how would Claws know to send the >individual emails? Hi, one workaround would be a right click on the folder(s) > Properties > Compose > [x] Default To: for replies x at y.foo If you now push reply, the default address is x at y.foo, so you need to add the wanted address from the address book. I didn't test Cc for you, but there is an option for Cc, too. JFTR if there are several recipients in the header, Claws just sends one mail and not several individual mails. Regards, Ralf From abrolag at users.sourceforge.net Wed Jan 4 21:18:25 2017 From: abrolag at users.sourceforge.net (Abrolag) Date: Wed, 4 Jan 2017 20:18:25 +0000 Subject: [Users] Unintended addresses In-Reply-To: <20170104204729.79af40f5@anthra> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> Message-ID: <20170104201825.72d603e7@debian> On Wed, 4 Jan 2017 20:47:29 +0100 wwp wrote: > Hello Abrolag, > > > On Wed, 4 Jan 2017 19:41:25 +0000 Abrolag wrote: > > > I send and receive a lot of emails and frequently dodge between accounts when > > sending/replying. I really REALLY need a pre-send warning if there is more than > > one address picked up. > > > > This is getting to be a real nuisance. > > Picked up by who or when doing what? > > I'm afraid there's no email agent that offers the feature you require, > isn't there? At least in Claws Mail, it is not possible. > > My feeling here is that *you* need to change your work flow or acquire > a different habit. > > > It must be possible to do this otherwise how would Claws > > know to send the individual emails? > > That question makes me wondering what's the point? Claws Mail send one > email with several recipients, the SMTP server handles this. What else? > > > Regards, > Although I've been using Claws for a long time, I still have a lot of almost unbreakable muscle-memory type habits from the software I first started with on the Acorn Archimedes in the late 1980s. Not only did this have such warnings, but you could even set how many addresses it would accept before giving such a warning. This was mostly directed at preventing accidental cross-posting on newsgroups but was very useful anyway. I know that only one actual email is sent, but Claws shows these on individual lines (maintaining a spare) therefore number of lines -1 = number of recipients. None of my personal email folders have a default address so they *don't* add this. It only happens if the last folder I looked at is a list one which does have a default address - for obvious reasons. It is incredibly easy to forget which was the last folder when working fast, and keeping several different projects in your head at the same time. -- W J G From subscript at free.fr Wed Jan 4 21:27:51 2017 From: subscript at free.fr (wwp) Date: Wed, 4 Jan 2017 21:27:51 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170104201825.72d603e7@debian> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> Message-ID: <20170104212751.22138a6a@anthra> Hello Abrolag, On Wed, 4 Jan 2017 20:18:25 +0000 Abrolag wrote: > On Wed, 4 Jan 2017 20:47:29 +0100 > wwp wrote: > > > Hello Abrolag, > > > > > > On Wed, 4 Jan 2017 19:41:25 +0000 Abrolag wrote: > > > > > I send and receive a lot of emails and frequently dodge between accounts when > > > sending/replying. I really REALLY need a pre-send warning if there is more than > > > one address picked up. > > > > > > This is getting to be a real nuisance. > > > > Picked up by who or when doing what? > > > > I'm afraid there's no email agent that offers the feature you require, > > isn't there? At least in Claws Mail, it is not possible. > > > > My feeling here is that *you* need to change your work flow or acquire > > a different habit. > > > > > It must be possible to do this otherwise how would Claws > > > know to send the individual emails? > > > > That question makes me wondering what's the point? Claws Mail send one > > email with several recipients, the SMTP server handles this. What else? > > > > > > Regards, > > > > Although I've been using Claws for a long time, I still have a lot of almost > unbreakable muscle-memory type habits from the software I first started with on > the Acorn Archimedes in the late 1980s. Not only did this have such warnings, > but you could even set how many addresses it would accept before giving such a > warning. This was mostly directed at preventing accidental cross-posting on > newsgroups but was very useful anyway. > > I know that only one actual email is sent, but Claws shows these on individual > lines (maintaining a spare) therefore number of lines -1 = number of recipients. > > None of my personal email folders have a default address so they *don't* add > this. It only happens if the last folder I looked at is a list one which does > have a default address - for obvious reasons. It is incredibly easy to forget > which was the last folder when working fast, and keeping several different > projects in your head at the same time. Is this when you reply to a mailing list (or an alias or..), that you would like to get warned of sending to several recipients? Or is it more general? Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From codejodler at gmx.ch Wed Jan 4 21:41:23 2017 From: codejodler at gmx.ch (Michael) Date: Wed, 4 Jan 2017 21:41:23 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170104212751.22138a6a@anthra> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> Message-ID: <20170104213904.7c896b3b.michael.wordehoff@posteo.de> wwp, In the a mail next door you said: "Easier to queue it before sending and look at it there" and i think this is something WLG shoud give a try. From abrolag at users.sourceforge.net Wed Jan 4 22:29:21 2017 From: abrolag at users.sourceforge.net (Abrolag) Date: Wed, 4 Jan 2017 21:29:21 +0000 Subject: [Users] Unintended addresses In-Reply-To: <20170104212751.22138a6a@anthra> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> Message-ID: <20170104212921.068b7c9b@debian> On Wed, 4 Jan 2017 21:27:51 +0100 wwp wrote: > Hello Abrolag, > > > On Wed, 4 Jan 2017 20:18:25 +0000 Abrolag wrote: > > > On Wed, 4 Jan 2017 20:47:29 +0100 > > wwp wrote: > > > > > Hello Abrolag, > > > > > > > > > On Wed, 4 Jan 2017 19:41:25 +0000 Abrolag wrote: > > > > > > > I send and receive a lot of emails and frequently dodge between accounts when > > > > sending/replying. I really REALLY need a pre-send warning if there is more than > > > > one address picked up. > > > > > > > > This is getting to be a real nuisance. > > > > > > Picked up by who or when doing what? > > > > > > I'm afraid there's no email agent that offers the feature you require, > > > isn't there? At least in Claws Mail, it is not possible. > > > > > > My feeling here is that *you* need to change your work flow or acquire > > > a different habit. > > > > > > > It must be possible to do this otherwise how would Claws > > > > know to send the individual emails? > > > > > > That question makes me wondering what's the point? Claws Mail send one > > > email with several recipients, the SMTP server handles this. What else? > > > > > > > > > Regards, > > > > > > > Although I've been using Claws for a long time, I still have a lot of almost > > unbreakable muscle-memory type habits from the software I first started with on > > the Acorn Archimedes in the late 1980s. Not only did this have such warnings, > > but you could even set how many addresses it would accept before giving such a > > warning. This was mostly directed at preventing accidental cross-posting on > > newsgroups but was very useful anyway. > > > > I know that only one actual email is sent, but Claws shows these on individual > > lines (maintaining a spare) therefore number of lines -1 = number of recipients. > > > > None of my personal email folders have a default address so they *don't* add > > this. It only happens if the last folder I looked at is a list one which does > > have a default address - for obvious reasons. It is incredibly easy to forget > > which was the last folder when working fast, and keeping several different > > projects in your head at the same time. > > Is this when you reply to a mailing list (or an alias or..), that you > would like to get warned of sending to several recipients? Or is it > more general? > > > Regards, It is when *inadvertently* replying to a mailing list. Such a check would also be useful when replying on a newsgroup (I still post to a few). -- W J G From andrej at kacian.sk Wed Jan 4 23:24:27 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Wed, 4 Jan 2017 23:24:27 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170104212921.068b7c9b@debian> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> <20170104212921.068b7c9b@debian> Message-ID: <20170104232427.69c55c19@penny> On Wed, 4 Jan 2017 21:29:21 +0000 Abrolag wrote: > It is when *inadvertently* replying to a mailing list. Such a check would also > be useful when replying on a newsgroup (I still post to a few). How about just looking at list of addressees before hitting send? You can make it taller to show more of them at one time, if it helps you. Claws Mail can't read your mind (yet), it doesn't know which of your actions are inadverdent and which are not. -- Andrej From noreply at thewildbeast.co.uk Thu Jan 5 09:12:01 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 05 Jan 2017 08:12:01 +0000 Subject: [Users] [Bug 3753] New: Account Auto-Selection on Replying Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3753 Bug ID: 3753 Summary: Account Auto-Selection on Replying Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P3 Component: UI/Compose Window Assignee: users at lists.claws-mail.org Reporter: clawsmail at kushwaha.com When replying to your own email, account auto-selection does not work. Or in other words, please auto-select the right account when replying to your own email. To replicate: Preferences -> Compose -> Writing -> Automatic account selection [x] when replying At least 2 accounts configured: 1. a at example.com 2. b at example.com (Default) Email comes in: From: c at gmail.com To: a at example.com When replying, compose window picks the right account to reply: From: a at example.com Say you BCC yourself, or the email is to a mailing list and you receive a copy. This email: From: a at example.com To: c at gmail.com Now, when you hit reply to this email, the account selected is the "Default" account, not the right account. From: b at example.com To: c at gmail.com Aside: The To is picked so (rightly IMHO) due to a previously made enhancement. The enh-request/bug is that when responding to one's own email, the right account should be identified and picked up. It should be: From: a at example.com To: c at gmail.com -- You are receiving this mail because: You are the assignee for the bug. From claws-mail_user at thehugheslogcabin.net Thu Jan 5 13:59:01 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 06:59:01 -0600 Subject: [Users] Firefox change causes problems with opening links Message-ID: <20170105065901.039ea6a9@thehugheslogcabin.net> I just updated my Firefox to 45.6.0 and when clicking on links in emails the link wouldn't open. Did a little Googling and found that they have removed the -remote option. I'm sure most of you know this by now, I'm a little behind on updating Firefox. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Thu Jan 5 14:06:03 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 05 Jan 2017 13:06:03 +0000 Subject: [Users] [Bug 3748] IMAP errors prevent mails from being sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3748 --- Comment #2 from johannes at selfnet.de --- The problem seems to be that only the last 500 lines are shown. Copying the content of the log window will only work by chance when regular messages mixed with errors are rushing through the log window. -- You are receiving this mail because: You are the assignee for the bug. From rol at witbe.net Thu Jan 5 14:08:39 2017 From: rol at witbe.net (Paul Rolland (=?UTF-8?B?44Od44O844Or44O744Ot44Op44Oz?=)) Date: Thu, 5 Jan 2017 14:08:39 +0100 Subject: [Users] Firefox change causes problems with opening links In-Reply-To: <20170105065901.039ea6a9@thehugheslogcabin.net> References: <20170105065901.039ea6a9@thehugheslogcabin.net> Message-ID: <20170105140839.38ea8432@riri.DEF.witbe.net> Hello Michael, On Thu, 5 Jan 2017 06:59:01 -0600 Michael Hughes wrote: > I just updated my Firefox to 45.6.0 and when clicking on links in > emails the link wouldn't open. Did a little Googling and found that > they have removed the -remote option. I'm sure most of you know this > by now, I'm a little behind on updating Firefox. I'm using Firefox 50.1.0 and I have no problem opening links by clicking them... Settings are : Preferences > Message view > External program Don't select "Use system default..." and set Web browser to: firefox '%' Regards, Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From claws-mail_user at thehugheslogcabin.net Thu Jan 5 15:18:29 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 08:18:29 -0600 Subject: [Users] Firefox change causes problems with opening links In-Reply-To: <20170105140839.38ea8432@riri.DEF.witbe.net> References: <20170105065901.039ea6a9@thehugheslogcabin.net> <20170105140839.38ea8432@riri.DEF.witbe.net> Message-ID: <20170105081829.66a3863d@thehugheslogcabin.net> On Thu, 5 Jan 2017 14:08:39 +0100 "Paul Rolland (ポール・ロラン)" wrote: > Hello Michael, > > On Thu, 5 Jan 2017 06:59:01 -0600 > Michael Hughes wrote: > > > I just updated my Firefox to 45.6.0 and when clicking on links in > > emails the link wouldn't open. Did a little Googling and found that > > they have removed the -remote option. I'm sure most of you know > > this by now, I'm a little behind on updating Firefox. > > I'm using Firefox 50.1.0 and I have no problem opening links by > clicking them... > > Settings are : > > Preferences > Message view > External program > Don't select "Use system default..." > and set Web browser to: firefox '%' > > Regards, > Paul Paul, I was able to get it to work by removing the -remote command line option and removing the openurl that was used with it. This was more or less a FYI for people that might still have the -remote option in the command line for opening URLs with Firefox. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From abrolag at users.sourceforge.net Thu Jan 5 16:03:46 2017 From: abrolag at users.sourceforge.net (Abrolag) Date: Thu, 5 Jan 2017 15:03:46 +0000 Subject: [Users] Unintended addresses In-Reply-To: <20170104232427.69c55c19@penny> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> <20170104212921.068b7c9b@debian> <20170104232427.69c55c19@penny> Message-ID: <20170105150346.633fe85f@debian> On Wed, 4 Jan 2017 23:24:27 +0100 Andrej Kacian wrote: > On Wed, 4 Jan 2017 21:29:21 +0000 > Abrolag wrote: > > > It is when *inadvertently* replying to a mailing list. Such a check would also > > be useful when replying on a newsgroup (I still post to a few). > > How about just looking at list of addressees before hitting send? You > can make it taller to show more of them at one time, if it helps you. > > Claws Mail can't read your mind (yet), it doesn't know which of your > actions are inadverdent and which are not. What a totally useless snide comment. It says a lot about you and nothing at all about me. -- W J G From subscript at free.fr Thu Jan 5 16:19:11 2017 From: subscript at free.fr (wwp) Date: Thu, 5 Jan 2017 16:19:11 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170105150346.633fe85f@debian> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> <20170104212921.068b7c9b@debian> <20170104232427.69c55c19@penny> <20170105150346.633fe85f@debian> Message-ID: <20170105161911.0f5a0081@anthra> Hello Abrolag, On Thu, 5 Jan 2017 15:03:46 +0000 Abrolag wrote: > On Wed, 4 Jan 2017 23:24:27 +0100 > Andrej Kacian wrote: > > > On Wed, 4 Jan 2017 21:29:21 +0000 > > Abrolag wrote: > > > > > It is when *inadvertently* replying to a mailing list. Such a check would also > > > be useful when replying on a newsgroup (I still post to a few). > > > > How about just looking at list of addressees before hitting send? You > > can make it taller to show more of them at one time, if it helps you. > > > > Claws Mail can't read your mind (yet), it doesn't know which of your > > actions are inadverdent and which are not. > > What a totally useless snide comment. > It says a lot about you and nothing at all about me. I don't think Andrej commented w/ a nasty intention :-). On the other side, when I was suggesting the possibility to change some habit, I was emitting the possibility that you're doing something perfectible in your workflow. You, me (oh yes, me), we all do perfectible things and resist, as it's hard to educate ourselves, or at least adapt a bit to change something. First because we don't even know/realize we have to, then because as you said it yourself, we (all?) have "a lot of almost unbreakable muscle-memory type habits". To change these, we first have to admit that we have to, and then agree that the software is right. Surely, don't adapt to a software that does things wrong! If you think Claws Mail is doing things right or wrong, feel free to tell us your opinion (the risk is an opinion clash, we're used to this, aren't we?). The good risk is for we - user - to improve our workflow, and for the software to big fixed or enhanced. So, what's next on this topic? Do you think you would have to change something in your habits? I'm not sure there's a massive willing in implementing a warning when sending to more than N recipients here. Any thought? Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Thu Jan 5 18:02:19 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 05 Jan 2017 17:02:19 +0000 Subject: [Users] [Bug 3748] IMAP errors prevent mails from being sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3748 --- Comment #3 from Paul --- see ~/.claws-mail/claws.log -- You are receiving this mail because: You are the assignee for the bug. From claws-mail_user at thehugheslogcabin.net Thu Jan 5 20:31:33 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 13:31:33 -0600 Subject: [Users] Latest git email display problem Message-ID: <20170105133054.4e4e5d99@thehugheslogcabin.net> I did a git pull --all around 9:00 CST and now when I changed folders no mail is display. It does highlight the last email in the list. If I click on a different email that email will display and then if I click on the last email it will display. This is with 3.14.1-100. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From subscript at free.fr Thu Jan 5 20:40:27 2017 From: subscript at free.fr (wwp) Date: Thu, 5 Jan 2017 20:40:27 +0100 Subject: [Users] Latest git email display problem In-Reply-To: <20170105133054.4e4e5d99@thehugheslogcabin.net> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> Message-ID: <20170105204027.142f847e@anthra> Hello Michael, On Thu, 5 Jan 2017 13:31:33 -0600 Michael Hughes wrote: > I did a git pull --all around 9:00 CST and now when I changed folders > no mail is display. It does highlight the last email in the list. If > I click on a different email that email will display and then if I > click on the last email it will display. This is with 3.14.1-100. What previous version were you using? You may need to set the "Open the selected message checkbox" at Configuration/Preferences/Summaries/Set default selection when entering a folder/. Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From andrej at kacian.sk Thu Jan 5 20:40:32 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Thu, 5 Jan 2017 20:40:32 +0100 Subject: [Users] Latest git email display problem In-Reply-To: <20170105133054.4e4e5d99@thehugheslogcabin.net> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> Message-ID: <20170105204032.2416603d@penny> On Thu, 5 Jan 2017 13:31:33 -0600 Michael Hughes wrote: > I did a git pull --all around 9:00 CST and now when I changed folders > no mail is display. It does highlight the last email in the list. If > I click on a different email that email will display and then if I > click on the last email it will display. This is with 3.14.1-100. > Look in Preferences, Summaries page. Inside the "Set default selection when entering a folder" dialog, there is a "Open the selected message" checkbox. You want to enable that. Regards, -- Andrej -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From claws-mail_user at thehugheslogcabin.net Thu Jan 5 21:17:09 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 14:17:09 -0600 Subject: [Users] Latest git email display problem In-Reply-To: <20170105204032.2416603d@penny> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> Message-ID: <20170105141709.3b0ad7ee@thehugheslogcabin.net> On Thu, 5 Jan 2017 20:40:32 +0100 Andrej Kacian wrote: > On Thu, 5 Jan 2017 13:31:33 -0600 > Michael Hughes wrote: > > > I did a git pull --all around 9:00 CST and now when I changed > > folders no mail is display. It does highlight the last email in > > the list. If I click on a different email that email will display > > and then if I click on the last email it will display. This is > > with 3.14.1-100. > > Look in Preferences, Summaries page. Inside the "Set default selection > when entering a folder" dialog, there is a "Open the selected message" > checkbox. You want to enable that. > > Regards, > -- > Andrej Andrej, I have attached an image of that dialog box to show what is selected. I haven't changed anything for as long as I can remember. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: selection_when_entering_a_folder.jpg Type: image/jpeg Size: 15692 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From claws-mail_user at thehugheslogcabin.net Fri Jan 6 00:08:40 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 17:08:40 -0600 Subject: [Users] Latest git email display problem In-Reply-To: <20170105204027.142f847e@anthra> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204027.142f847e@anthra> Message-ID: <20170105170840.15cfc4c0@thehugheslogcabin.net> On Thu, 5 Jan 2017 20:40:27 +0100 wwp wrote: > Hello Michael, > > > On Thu, 5 Jan 2017 13:31:33 -0600 Michael Hughes > wrote: > > > I did a git pull --all around 9:00 CST and now when I changed > > folders no mail is display. It does highlight the last email in > > the list. If I click on a different email that email will display > > and then if I click on the last email it will display. This is > > with 3.14.1-100. > > What previous version were you using? > > You may need to set the "Open the selected message checkbox" at > Configuration/Preferences/Summaries/Set default selection when > entering a folder/. > > > Regards, > > -- > wwp wwp, The version I was running before was 3.14.0-6-gdd7568-dirty. I still had a copy of it and when I run it, it does show the highlighted email when I change folders. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From myetto1 at nycap.rr.com Fri Jan 6 00:40:25 2017 From: myetto1 at nycap.rr.com (Michael A. Yetto) Date: Thu, 5 Jan 2017 18:40:25 -0500 Subject: [Users] Latest git email display problem In-Reply-To: <20170105141709.3b0ad7ee@thehugheslogcabin.net> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> <20170105141709.3b0ad7ee@thehugheslogcabin.net> Message-ID: <20170105184025.1070c3e4@braetac.lighthouse.yetnet> On Thu, 5 Jan 2017 14:17:09 -0600 Michael Hughes wrote: >On Thu, 5 Jan 2017 20:40:32 +0100 >Andrej Kacian wrote: > >> On Thu, 5 Jan 2017 13:31:33 -0600 >> Michael Hughes wrote: >> >> > I did a git pull --all around 9:00 CST and now when I changed >> > folders no mail is display. It does highlight the last email in >> > the list. If I click on a different email that email will display >> > and then if I click on the last email it will display. This is >> > with 3.14.1-100. >> >> Look in Preferences, Summaries page. Inside the "Set default >> selection when entering a folder" dialog, there is a "Open the >> selected message" checkbox. You want to enable that. >> >> Regards, >> -- >> Andrej > >Andrej, >I have attached an image of that dialog box to show what is selected. >I haven't changed anything for as long as I can remember. > I won't resend the image, but it shows your selection priority and als shows that the selection will not be displayed. Check the appropriate box to change this. Mike Yetto -- "Science should always be impartial in its application and it is vital for administrators to affirm they believe in the scientific process and in transparency and accountability." - Kirsty Duncan, science minister of Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From claws-mail_user at thehugheslogcabin.net Fri Jan 6 01:48:02 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Thu, 5 Jan 2017 18:48:02 -0600 Subject: [Users] Latest git email display problem In-Reply-To: <20170105184025.1070c3e4@braetac.lighthouse.yetnet> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> <20170105141709.3b0ad7ee@thehugheslogcabin.net> <20170105184025.1070c3e4@braetac.lighthouse.yetnet> Message-ID: <20170105184802.4d7593ce@thehugheslogcabin.net> On Thu, 5 Jan 2017 18:40:25 -0500 "Michael A. Yetto" wrote: > On Thu, 5 Jan 2017 14:17:09 -0600 > Michael Hughes wrote: > > >On Thu, 5 Jan 2017 20:40:32 +0100 > >Andrej Kacian wrote: > > > >> On Thu, 5 Jan 2017 13:31:33 -0600 > >> Michael Hughes wrote: > >> > >> > I did a git pull --all around 9:00 CST and now when I changed > >> > folders no mail is display. It does highlight the last email in > >> > the list. If I click on a different email that email will > >> > display and then if I click on the last email it will display. > >> > This is with 3.14.1-100. > >> > >> Look in Preferences, Summaries page. Inside the "Set default > >> selection when entering a folder" dialog, there is a "Open the > >> selected message" checkbox. You want to enable that. > >> > >> Regards, > >> -- > >> Andrej > > > >Andrej, > >I have attached an image of that dialog box to show what is selected. > >I haven't changed anything for as long as I can remember. > > > > I won't resend the image, but it shows your selection priority and als > shows that the selection will not be displayed. > > Check the appropriate box to change this. > > Mike Yetto > -- > "Science should always be impartial in its application and it is vital > for administrators to affirm they believe in the scientific process > and in transparency and accountability." > - Kirsty Duncan, science minister of Canada Mike, I don't understand your comment, this is how I have had it setup for as long as I can remember and it works with version 3.14.0-6. I tried it just before I responded to wwp's question about what version I was using before. Can you explain why you don't think this list and order won't work? -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From codejodler at gmx.ch Fri Jan 6 02:18:27 2017 From: codejodler at gmx.ch (Michael) Date: Fri, 6 Jan 2017 02:18:27 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170105161911.0f5a0081@anthra> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170104212751.22138a6a@anthra> <20170104212921.068b7c9b@debian> <20170104232427.69c55c19@penny> <20170105150346.633fe85f@debian> <20170105161911.0f5a0081@anthra> Message-ID: <20170106021827.3807ede6@gandalf.lan2> Normally replying or sending to a mailing list is just one address. But then Abrolag said the umber of addresses is the problem. I'm still not clear about what exactly is his problem. Perhaps he can give an example. From clawsmail at kushwaha.com Fri Jan 6 07:56:53 2017 From: clawsmail at kushwaha.com (Abhay S. Kushwaha) Date: Fri, 6 Jan 2017 12:26:53 +0530 Subject: [Users] Latest git email display problem In-Reply-To: <20170105184802.4d7593ce@thehugheslogcabin.net> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> <20170105141709.3b0ad7ee@thehugheslogcabin.net> <20170105184025.1070c3e4@braetac.lighthouse.yetnet> <20170105184802.4d7593ce@thehugheslogcabin.net> Message-ID: <20170106122653.00002591@kushwaha.com> On Thu, 5 Jan 2017 18:48:02 -0600, Michael wrote: > > >> > I did a git pull --all around 9:00 CST and now when I changed > > >> > folders no mail is display. It does highlight the last > > >> > email in the list. If I click on a different email that > > >> > email will display and then if I click on the last email it > > >> > will display. This is with 3.14.1-100. > > >> > > >> Look in Preferences, Summaries page. Inside the "Set default > > >> selection when entering a folder" dialog, there is a "Open the > > >> selected message" checkbox. You want to enable that. > I don't understand your comment, this is how I have had it setup > for as long as I can remember and it works with version 3.14.0-6. > I tried it just before I responded to wwp's question about what > version I was using before. If you're going to use git, you need to follow along on the git commits text as well. The checkbox wasn't there in the previous version for example. In essence: * The functionality has changed. * The checkbox has been introduced for message selection on entering a folder. * Enable checkbox for the old-like (not same) behaviour. If you find anything else working differently, report back so people here can either confirm it is how it is, or the devs can identify unintended bugs of behaviour and make further changes to fine-tune the changed functionality. From edodd55 at gmail.com Fri Jan 6 11:25:22 2017 From: edodd55 at gmail.com (Liz) Date: Fri, 6 Jan 2017 21:25:22 +1100 Subject: [Users] Unintended addresses In-Reply-To: <20170104201825.72d603e7@debian> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> Message-ID: <20170106212522.55802b9a.edodd55@gmail.com> On Wed, 4 Jan 2017 20:18:25 +0000 Abrolag wrote: > I still have a lot of almost > unbreakable muscle-memory type habits I'd like to point out that the concept of "muscle memory" has only arrived this century. These memory pathways are built in the cerebellum, and they are difficult to remake. Practice makes permanent. If you have to learn new habits, make good decisions about what you are changing and deliberate efforts to change. Liz From claws-mail_user at thehugheslogcabin.net Fri Jan 6 12:49:41 2017 From: claws-mail_user at thehugheslogcabin.net (Michael Hughes) Date: Fri, 6 Jan 2017 05:49:41 -0600 Subject: [Users] Latest git email display problem In-Reply-To: <20170106122653.00002591@kushwaha.com> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> <20170105141709.3b0ad7ee@thehugheslogcabin.net> <20170105184025.1070c3e4@braetac.lighthouse.yetnet> <20170105184802.4d7593ce@thehugheslogcabin.net> <20170106122653.00002591@kushwaha.com> Message-ID: <20170106054941.4319ca8e@thehugheslogcabin.net> On Fri, 6 Jan 2017 12:26:53 +0530 "Abhay S. Kushwaha" wrote: > On Thu, 5 Jan 2017 18:48:02 -0600, Michael wrote: > > > > >> > I did a git pull --all around 9:00 CST and now when I changed > > > >> > folders no mail is display. It does highlight the last > > > >> > email in the list. If I click on a different email that > > > >> > email will display and then if I click on the last email it > > > >> > will display. This is with 3.14.1-100. > > > >> > > > >> Look in Preferences, Summaries page. Inside the "Set default > > > >> selection when entering a folder" dialog, there is a "Open the > > > >> selected message" checkbox. You want to enable that. > > > I don't understand your comment, this is how I have had it setup > > for as long as I can remember and it works with version 3.14.0-6. > > I tried it just before I responded to wwp's question about what > > version I was using before. > > If you're going to use git, you need to follow along on the git > commits text as well. The checkbox wasn't there in the previous > version for example. > > In essence: > * The functionality has changed. > * The checkbox has been introduced for message selection on > entering a folder. > * Enable checkbox for the old-like (not same) behaviour. > > If you find anything else working differently, report back so people > here can either confirm it is how it is, or the devs can identify > unintended bugs of behaviour and make further changes to fine-tune > the changed functionality. > _______________________________________________ > Users mailing list > Users at lists.claws-mail.org > http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users > Abhay, I missed the part in Michael's email about the check box, it was late and all I saw was that it wasn't going to work with the selection I had. I do follow the RSS feed for the updates and I didn't see anything on the change to the dialog box that there was a check box added. This is why I asked about it on the mailing list. -- Michael Hughes Log Home living is the best -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From claws at thewildbeast.co.uk Fri Jan 6 12:53:56 2017 From: claws at thewildbeast.co.uk (Paul) Date: Fri, 6 Jan 2017 11:53:56 +0000 Subject: [Users] Latest git email display problem In-Reply-To: <20170106054941.4319ca8e@thehugheslogcabin.net> References: <20170105133054.4e4e5d99@thehugheslogcabin.net> <20170105204032.2416603d@penny> <20170105141709.3b0ad7ee@thehugheslogcabin.net> <20170105184025.1070c3e4@braetac.lighthouse.yetnet> <20170105184802.4d7593ce@thehugheslogcabin.net> <20170106122653.00002591@kushwaha.com> <20170106054941.4319ca8e@thehugheslogcabin.net> Message-ID: <20170106115356.4f98a32d@kujata> On Fri, 6 Jan 2017 05:49:41 -0600 Michael Hughes wrote: > I do follow the RSS feed for the updates and I didn't see anything > on the change to the dialog box that there was a check box added. > This is why I asked about it on the mailing list. http://git.claws-mail.org/?p=claws.git;a=commit;h=75fcc188b633803a6279e278a14a5be1e237c9d3 with regards Paul From abrolag at users.sourceforge.net Fri Jan 6 22:15:52 2017 From: abrolag at users.sourceforge.net (Abrolag) Date: Fri, 6 Jan 2017 21:15:52 +0000 Subject: [Users] Unintended addresses In-Reply-To: <20170106212522.55802b9a.edodd55@gmail.com> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170106212522.55802b9a.edodd55@gmail.com> Message-ID: <20170106211122.6f25d56f@debian> I think I've now worked out the sequence of events for this occasion. I am a developer for a rather complex piece of audio software, and was about to notify the users list of an update. However, having just opened the compose window I saw two emails had arrived, one from a user congratulating us on another improvement, and one from the developer who did most of the work on it. I immediately started to write to pass the message on, forgetting that it had been opened from the mail list window. Typed in the address (which I know so well it's much faster than using the address book) and sent it off, then returned my attention to the list. Checking back through my mail history *every* occasion when this has happened I've been writing to one of the other developers, so it's very likely the same or similar situation. Quite frankly I see no possibility of preventing that from happening *unless* I can get a warning that I'm sending to two recipients. As I said before I still use a number or newsgroups too (all technically orientated) and such a warning would be a great help preventing propagation of cross-posts. Now if nobody at Claws thinks this is of any importance the obvious solution would be for me to switch to another mail program. However, this presents me with a dilemma. I have many years worth of stored emails so although not exactly locked in, the idea of switching is far from attractive. -- W J G From dave at howorth.org.uk Fri Jan 6 23:39:46 2017 From: dave at howorth.org.uk (Dave Howorth) Date: Fri, 6 Jan 2017 22:39:46 +0000 Subject: [Users] Firefox change causes problems with opening links In-Reply-To: <20170105081829.66a3863d@thehugheslogcabin.net> References: <20170105065901.039ea6a9@thehugheslogcabin.net> <20170105140839.38ea8432@riri.DEF.witbe.net> <20170105081829.66a3863d@thehugheslogcabin.net> Message-ID: <20170106223946.2c37f2cd@acer-suse.lan> On Thu, 5 Jan 2017 08:18:29 -0600 Michael Hughes wrote: > On Thu, 5 Jan 2017 14:08:39 +0100 > "Paul Rolland (ポール・ロラン)" wrote: > > > Hello Michael, > > > > On Thu, 5 Jan 2017 06:59:01 -0600 > > Michael Hughes wrote: > > > > > I just updated my Firefox to 45.6.0 and when clicking on links in > > > emails the link wouldn't open. Did a little Googling and found > > > that they have removed the -remote option. I'm sure most of you > > > know this by now, I'm a little behind on updating Firefox. > > > > I'm using Firefox 50.1.0 and I have no problem opening links by > > clicking them... > > > > Settings are : > > > > Preferences > Message view > External program > > Don't select "Use system default..." > > and set Web browser to: firefox '%' > > > > Regards, > > Paul > > Paul, > I was able to get it to work by removing the -remote command line > option and removing the openurl that was used with it. This was more > or less a FYI for people that might still have the -remote option in > the command line for opening URLs with Firefox. Sorry, I haven't checked recently but I use -no-remote all the time without problem (FF 50.1.0) and I believe the reason I do that is that -remote is the default, so no reason to use it? It's been like that for years AFAIK. From berndth at gmx.de Sat Jan 7 16:00:15 2017 From: berndth at gmx.de (Holger Berndt) Date: Sat, 7 Jan 2017 16:00:15 +0100 Subject: [Users] Unintended addresses In-Reply-To: <20170106211122.6f25d56f@debian> References: <20170104194039.47e072aa@debian> <20170104204729.79af40f5@anthra> <20170104201825.72d603e7@debian> <20170106212522.55802b9a.edodd55@gmail.com> <20170106211122.6f25d56f@debian> Message-ID: <20170107160015.2f9fa372@wodan> Hallo Abrolag, On Fr, 06.01.2017 21:15, Abrolag wrote: >Checking back through my mail history *every* occasion when this has happened >I've been writing to one of the other developers, so it's very likely the same >or similar situation. Quite frankly I see no possibility of preventing that >from happening *unless* I can get a warning that I'm sending to two recipients. If you really feel hard about it, you can script such a warning yourself using the Python plugin. One option would be to create a visual indicator when a newly created compose window has certain headers pre-set. For example, you could use this snipped in the compose_any script to make the text body have a yellow background color in this case: #=========================================================================================== # Make body colored if there is a recipient pre-set headers = clawsmail.compose_window.get_header_list() num_recipients = 0 for field, value in headers: if field.strip().lower() in ("to:", "cc:", "bcc:"): num_recipients += 1 if num_recipients > 0: clawsmail.compose_window.text.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FFF0AA")) #=========================================================================================== Another option would be to use a python script instead of Claws Mail's own actions when sending a message. That script would do the sanity checking according to your needs, and then either invoke Claws Mail's actions for sending or ignore the request. I attached an example for replacing "Send later". Note that these scripts can be assigned keyboard shortcuts and put into the toolbar at will. >As I said before I still use a number or newsgroups too (all technically >orientated) and such a warning would be a great help preventing propagation of >cross-posts. The examples I gave don't cover newgroup headers, but should be easy to extend. Holger -------------- next part -------------- A non-text attachment was scrubbed... Name: Send with check for multiple recipients Type: application/octet-stream Size: 1189 bytes Desc: not available URL: From noreply at thewildbeast.co.uk Sat Jan 7 19:22:10 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 07 Jan 2017 18:22:10 +0000 Subject: [Users] [Bug 3754] New: interactive auth dialogs pops endlessly Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3754 Bug ID: 3754 Summary: interactive auth dialogs pops endlessly Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: Plugins/GData Assignee: users at lists.claws-mail.org Reporter: viacheslavg at gmail.com I would identify two different (but related) issues here: 1. Interactive auth dialog can pop endlessly if user doesn't react on them. i.e. when first dialog opens and user doesn't not provide auth token and doesn't cancel/close it in time, then in some time (polling interval) second dialog pops, and so on. 2. Interactive auth dialog initiated after any network error which can occur when trying to refresh auth token. Consider the case: 1) I got auth token from google 2) provided it to GData plugin. Now it is able to work fine. 3) in ~1 hour I faced with network issue. -- at this point GData tries to refresh token and it is not able to do this due to network issue. As result I again got interactive auth dialog (however my token is valid). I think this is really annoying for user and asks for actually unnecessary actions (there is really no reason for token regeneration). I would propose to initiate auth dialog only in case when GData explicitly got FORBIDDEN response from google, in other cases (usually just network issues) ignore the error and retry token refresh again until succeeded. I'm attaching patch which solves these two issues for me. I'm not sure that it is done in a good way, but it could be as a starting point. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 7 19:23:08 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 07 Jan 2017 18:23:08 +0000 Subject: [Users] [Bug 3754] interactive auth dialogs pops endlessly In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3754 --- Comment #1 from Viacheslav Gagara --- Created attachment 1706 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1706&action=edit interactive auth dialog patch -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 9 17:20:42 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 09 Jan 2017 16:20:42 +0000 Subject: [Users] [Bug 3755] New: verification of signatures successful despite non-matching sender addres Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3755 Bug ID: 3755 Summary: verification of signatures successful despite non-matching sender addres Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: major Priority: P3 Component: Plugins/Privacy Assignee: users at lists.claws-mail.org Reporter: claws-mail-bugzilla at deaktualisierung.org Created attachment 1707 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1707&action=edit gpg signed mail from wrong sender verifying correctly without warning claws-mail does correctly verify the signature status for emails, so it shows "Good Signature from ". it does not, however, verify the actual from/sender address is one of the addresses in the signature key. i have attached two email messages (one GPG, one S/MIME) that verify as correctly signed messages, but each have a From: address that is not one of the addresses in the smime certificate/gpg key. expected behaviour: the signature status should include a warning that the from address is none of the addresses in the signature key. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 9 17:22:11 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 09 Jan 2017 16:22:11 +0000 Subject: [Users] [Bug 3755] verification of signatures successful despite non-matching sender addres In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3755 --- Comment #1 from johannes schilling --- Created attachment 1708 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1708&action=edit smime email from wrong sender verifying correctly without warning (there doesn't seem to be an option to upload more than one attachment when creating a bug, so this one separate) -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 9 17:41:33 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 09 Jan 2017 16:41:33 +0000 Subject: [Users] [Bug 3755] verification of signatures successful despite non-matching sender addres In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3755 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Paul --- It is irrelevant. A key doesn't even need to have an email address associated with it. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 9 18:17:32 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 09 Jan 2017 17:17:32 +0000 Subject: [Users] [Bug 3381] MacOS: integration with native OSX GTK In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3381 --- Comment #9 from Igor Mammedov --- (In reply to comment #8) > > It makes possible to build claws-mail with native OSX GTK build > > which is provided by gtk-mac-intergration project. It allows to > > make a distributable OSX application bundle which doesn't depend > > on any external libraries. > > Is this still on the radar? A readily available official MacOS bundle that > does not depend on external libraries would be really cool. Currently, I don't have free time to rebase it so feel free to pick project up. It could be cloned from my git repo: https://github.com/imammedo/claws use "osx_integration_v1" branch -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 15:00:27 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 14:00:27 +0000 Subject: [Users] [Bug 3381] MacOS: integration with native OSX GTK In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3381 --- Comment #10 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #9) Unfortunately I am not a programmer and this seems to surpass my skills. I am currently at the point where I am trying to understand what is missing to make a native claws mail built for MacOS happen. You seem to have run into issues in 2015 while trying to make it possible: >Current patchset breaks build on other systems, It's on my TODO list, but I don't have spare time to fix it right now. I have troubles understanding how severe these issues were/are. On the one hand it sounds like not much was missing, on the other hand I see indications that it may be pretty difficult. > it's trivial missing non MacOS stub >It might be not so simple, since it depends on gtkosx project, which has it's own build system where I was planning to integrate claws-mail into, to make building it trivial. In addition to your comments I have seen bugs #3664 and #3665, of which bug #3664 sounds rather discouraging ("impossible"). Ricardo Mones wrote in 2015: >> The support problem is to triage and fix the bugs reported against such binaries because of that testing, specially if they're platform specific. I understand that. No binary and no gathering of bug reports unless someone can actually take care of if. I was happy to see Perry Metzger's comment in May 2015 but realize that it does not solve the problem. Would it help to maybe approach other developers, e.g. from the gtkosx project? -- You are receiving this mail because: You are the assignee for the bug. From jjhung88 at hotmail.com Tue Jan 10 15:41:38 2017 From: jjhung88 at hotmail.com (Jackie Hung) Date: Tue, 10 Jan 2017 14:41:38 +0000 Subject: [Users] pre-process not updated until I click another folder Message-ID: I have the windows version. When I downloaded emails, I still see the ones that should have be pre-processed to go to particular folders. I have to manually click another folder and then click inbox so those emails will disappear. There might be some setting I am not aware of that the rules are not automatically applied. I right click the folder property and have "run processing rules when open" checked. -------------- next part -------------- An HTML attachment was scrubbed... URL: From claws at thewildbeast.co.uk Tue Jan 10 16:14:58 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 10 Jan 2017 15:14:58 +0000 Subject: [Users] pre-process not updated until I click another folder In-Reply-To: References: Message-ID: <20170110151458.12170bd2@kujata> On Tue, 10 Jan 2017 14:41:38 +0000 Jackie Hung wrote: > I have the windows version. When I downloaded emails, I still see > the ones that should have be pre-processed to go to particular > folders. I have to manually click another folder and then click > inbox so those emails will disappear. There might be some setting I > am not aware of that the rules are not automatically applied. I > right click the folder property and have "run processing rules when > open" checked. See http://www.claws-mail.org/manual/claws-mail-manual.html#adv_processing "Processing rules ... are applied when entering a folder or when manually applied from a folder's context menu and apply only to this folder." "Processing rules are accompanied by Pre-processing and Post-processing rules. ... Pre-processing rules are executed before the folder's specific Processing rules, while Post-processing rules are executed afterwards." Perhaps what you really want is Filtering (/Configuration/Filtering) and for your filtering rules to be run when receiving mail. (Account prefs, Receive page, 'filter on receiving'.) with regards Paul From jjhung88 at hotmail.com Tue Jan 10 16:59:26 2017 From: jjhung88 at hotmail.com (Jackie Hung) Date: Tue, 10 Jan 2017 15:59:26 +0000 Subject: [Users] pre-process not updated until I click another folder In-Reply-To: <20170110151458.12170bd2@kujata> References: , <20170110151458.12170bd2@kujata> Message-ID: Thanks Paul. Is there a way to export the pre-processing rules and import into filter? I have 20+ rules now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at thewildbeast.co.uk Tue Jan 10 18:27:52 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:27:52 +0000 Subject: [Users] [Bug 3756] New: Let the user remove added recipients Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 Bug ID: 3756 Summary: Let the user remove added recipients Classification: Unclassified Product: Claws Mail Version: other Hardware: PC OS: Linux Status: NEW Severity: minor Priority: P3 Component: UI/Compose Window Assignee: users at lists.claws-mail.org Reporter: larivact at chello.at While the compose window allows you to easily add recipients you can't remove them once added. Probably the "Delete entry contents" buttons should be replaced by "Remove recipient" buttons? I don't think that the "Delete entry buttons" should be there in the first place since selecting everything and hitting backspace is pretty straightforward. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 18:34:07 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:34:07 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Paul --- The user can remove added recipients using the delete entry button which you mention. -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Tue Jan 10 18:41:22 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 10 Jan 2017 17:41:22 +0000 Subject: [Users] pre-process not updated until I click another folder In-Reply-To: References: <20170110151458.12170bd2@kujata> Message-ID: <20170110174122.4e86521c@kujata> On Tue, 10 Jan 2017 15:59:26 +0000 Jackie Hung wrote: > Thanks Paul. Is there a way to export the pre-processing rules and > import into filter? I have 20+ rules now. Quit Claws Mail. Open the config file 'matcherrc' in a text editor and move the rules from the folder items to under the general '[filtering]' heading. with regards Paul From noreply at thewildbeast.co.uk Tue Jan 10 18:44:02 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:44:02 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #2 from larivact at chello.at --- Since when? I am using 3.14.1 and it doesn't work for me. Is it fixed in the repo? -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 18:45:14 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:45:14 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #3 from Paul --- What exactly doesn't work for you? -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 18:49:56 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:49:56 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #4 from larivact at chello.at --- When I hit the "Delete entry contents" button it only clears the field but the recipient row is still there. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 18:57:22 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 17:57:22 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #5 from Paul --- Yes, that's how it works. Is an empty row a problem for you? -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 19:05:48 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 18:05:48 +0000 Subject: [Users] [Bug 3756] Let the user remove added recipients In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #6 from larivact at chello.at --- >From a user experience perspective you should be able to. A row represents a recipient, to add a recipient you add a row, now what do you do to remove a recipient? The delete button only clears the field it isn't obvious that claws ignores empty recipient fields. However if the button removed the row it would be obvious that the recipient is removed. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 19:09:25 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 18:09:25 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 larivact at chello.at changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Let the user remove added |Remove a recipient row when |recipients |the delete button is | |clicked -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 19:15:12 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 18:15:12 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #7 from Paul --- re-opened because it's now an enhancement request, even though I am in total disagreement with comment #6. (For instance, there is always an empty row.) -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 19:25:24 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 18:25:24 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #8 from larivact at chello.at --- Thanks for reopening I appreciate it. >For instance, there is always an empty row. Which is why the first row shouldn't have a delete button. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 10 19:28:24 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 18:28:24 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #9 from larivact at chello.at --- I apologize that would be bad design, instead the delete button should be disabled when it's the only row. -- You are receiving this mail because: You are the assignee for the bug. From aasalem10 at gmail.com Tue Jan 10 23:47:24 2017 From: aasalem10 at gmail.com (Alaa Salem) Date: Wed, 11 Jan 2017 00:47:24 +0200 Subject: [Users] Any known issues when using Fruho and SecurityKiss Message-ID: Hi: Is there are some issues when using Claws mail version 3.13.2 while connecting via a VPN such as Fruho using SecurityKiss if so is there a workaround. Error message: "An error happened during SMTP session. Use "Send queued messages" from the main window to retry." Network log ---------------------------------------------------------------------------------------/ * Account 'xxxx xxxx': Connecting to IMAP4 server: imap.gmx.com:993... [00:11:05] IMAP4< * OK [CAPABILITY IMAP4rev1 CHILDREN ENABLE ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ MOVE NAMESPACE SASL-IR SORT SPECIAL-USE THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN AUTH=LOGIN AUTH=PLAIN] IMAP server ready H migmx015 2651323638 IMAP-0MTnoT-1c0ddx0LXE-00QPcl * IMAP connection is un-authenticated [00:11:06] IMAP4> 1 CAPABILITY [00:11:06] IMAP4< * CAPABILITY IMAP4rev1 CHILDREN ENABLE ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ MOVE NAMESPACE SASL-IR SORT SPECIAL-USE THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN AUTH=LOGIN AUTH=PLAIN [00:11:06] IMAP4< 1 OK CAPABILITY completed [00:11:06] IMAP4> Logging aasalem10 at gmx.com to imap.gmx.com using LOGIN [00:11:07] IMAP4< LOGIN completed [00:11:07] IMAP4< Login to imap.gmx.com successful [00:11:07] IMAP4> 3 LIST "" "" [00:11:07] IMAP4< * LIST (\Noselect) "/" "" [00:11:07] IMAP4< 3 OK LIST completed [00:11:07] IMAP4> 4 SELECT Queue [00:11:07] IMAP4< * 0 EXISTS [00:11:07] IMAP4< * 0 RECENT [00:11:07] IMAP4< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) [00:11:07] IMAP4< * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Unlimited [00:11:07] IMAP4< * OK [UIDNEXT 22] Predicted next UID [00:11:07] IMAP4< * OK [UIDVALIDITY 1475260720] UIDs valid [00:11:07] IMAP4< 4 OK [READ-WRITE] SELECT completed [00:11:07] IMAP4- [fetching UIDs...] [00:11:07] IMAP4> 5 UID FETCH 1:* (UID) [00:11:07] IMAP4< 5 OK UID FETCH completed [00:11:07] IMAP4> 6 APPEND Queue (\Seen) {629} [00:11:08] IMAP4< + Ready for literal data [00:11:08] IMAP4> [data - 631 bytes] [00:11:08] IMAP4< [APPEND data - 73 bytes] [00:11:08] IMAP4> 7 NOOP [00:11:08] IMAP4< 7 OK NOOP completed [00:11:08] IMAP4> 8 UID STORE 22 +FLAGS.SILENT (\Seen) [00:11:08] IMAP4< 8 OK UID STORE completed * Account 'Alaa Salem': Connecting to SMTP server: smtp.gmx.com:465... [00:12:06] IMAP4> 9 NOOP [00:12:06] IMAP4< 9 OK NOOP completed *** Session timed out. You may be able to recover by increasing the timeout value in Preferences/Other/Miscellaneous. [00:12:09] IMAP4> 10 UID STORE 22 +FLAGS.SILENT (\Deleted) [00:12:10] IMAP4< 10 OK UID STORE completed [00:12:10] IMAP4> 11 EXPUNGE [00:12:10] IMAP4< * 1 EXPUNGE [00:12:10] IMAP4< * 0 EXISTS [00:12:10] IMAP4< * 0 RECENT [00:12:10] IMAP4< 11 OK EXPUNGE completed [00:12:10] IMAP4- [fetching UIDs...] [00:12:10] IMAP4> 12 UID FETCH 1:* (UID) [00:12:10] IMAP4< 12 OK UID FETCH completed [00:13:06] IMAP4> 13 NOOP [00:13:06] IMAP4< 13 OK NOOP completed [00:14:06] IMAP4> 14 NOOP [00:14:06] IMAP4< 14 OK NOOP completed [00:15:07] IMAP4> 15 NOOP [00:15:07] IMAP4< 15 OK NOOP completed [00:16:08] IMAP4> 16 NOOP [00:16:08] IMAP4< 16 OK NOOP completed [00:17:09] IMAP4> 17 NOOP [00:17:09] IMAP4< 17 OK NOOP completed [00:18:10] IMAP4> 18 NOOP [00:18:10] IMAP4< 18 OK NOOP completed Regards, Alaa A. Salem -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at thewildbeast.co.uk Wed Jan 11 00:42:53 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 23:42:53 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #10 from wwp --- Not exactly that simple: row 1 should get a greyed-out delete button IF it's the only recipient. If you have To: foo Cc: bar To: another You must be able to remove the 1st To:. Moreover, I wonder if a sweep is the best icon for 'delete' action, to me it's more clean than delete. But since it doesn't really delete the repicient but cleans the recipient field up, it's fine. Then don't call this a delete button. <> :-D -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 11 00:46:30 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 23:46:30 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #11 from Ricardo Mones --- (In reply to comment #6) > From a user experience perspective you should be able to. > A row represents a recipient, to add a recipient you add a row, > now what do you do to remove a recipient? A row is a space to enter recipients, can be zero, one or more than one. That association of one-row is one-recipient is completely imagined by you :) > The delete button only clears the field it isn't obvious that claws ignores > empty recipient fields. It isn't? Do you expect it to send a mail to a blank string "address"? I've heard a lot of absurd things, but this one is a real finisher :) > However if the button removed the row it would be > obvious that the recipient is removed. Could be *more* obvious, yes. Would also made replacement of addresses harder, because you have to go the end of upper field, and press enter, and select again the address header if incorrect, and then start typing. I guess the entry could be removed if the user clicks the delete button and the entry is already empty. That way current behaviour is preserved and doesn't disturb existing work-flows for address replacement, and you should be able to remove entries with a second click, as requested. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 11 00:49:24 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 23:49:24 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #12 from Ricardo Mones --- (In reply to comment #10) [...] > Moreover, I wonder if a sweep is the best icon for 'delete' action, to me > it's more clean than delete. But since it doesn't really delete the > repicient but cleans the recipient field up, it's fine. Then don't call this > a delete button. > <> :-D It's default GTK stock icon, not ours. And yeah, you're reaching some kind of icon-caused insanity ;-) -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 11 00:59:55 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 10 Jan 2017 23:59:55 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #13 from Ricardo Mones --- (In reply to comment #11) [...] > I guess the entry could be removed if the user clicks the delete button and > the entry is already empty. That way current behaviour is preserved and > doesn't disturb existing work-flows for address replacement, and you should > be able to remove entries with a second click, as requested. And while at it: after first click the brush icon on the button should be changed to a minus or delete red icon, to indicate that second click is going to remove the row completely. -- You are receiving this mail because: You are the assignee for the bug. From rsv869 at runbox.com Wed Jan 11 01:21:46 2017 From: rsv869 at runbox.com (Reid Vail) Date: Tue, 10 Jan 2017 19:21:46 -0500 Subject: [Users] spamassassin config advice Message-ID: <20170110192146.42bf0f59@rsv2-Serval-Pro> Hello Claws group - I'm running version 3.13.2 on Linuxmint 18 KDE and have a question about the best way to get it up and running. I'm getting the error shown below: "The SpamAssassin plugin couldn't filter a message. The probable cause of the error is an unreachable spamd daemon. Please make sure spamd is running and accessible." I have the plugin loaded and turned on via Preferences. I also loaded various spamassassin elements via Synaptic, including spamassassin 3.4.1-3, claws-mail-spamassassin, spamc , spamass-milter. I am pretty sure I don't know how this is supposed to be configured and have probably got it completely confused. help welcome. RSV869 From noreply at thewildbeast.co.uk Wed Jan 11 06:36:54 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 11 Jan 2017 05:36:54 +0000 Subject: [Users] [Bug 3756] Remove a recipient row when the delete button is clicked In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3756 --- Comment #14 from larivact at chello.at --- @wpp >Not exactly that simple: row 1 should get a greyed-out delete button IF it's the only recipient. That's exactly what I said in comment #9. >Then don't call this a delete button. Currently it isn't a delete button, this enhancement request is about making them delete buttons. @Ricardo >A row is a space to enter recipients, can be zero, one or more than one. Thanks, I didn't know that a row can contain multiple recipients. >Would also made replacement of addresses harder, because you have to go the end of upper field, and press enter, and select again the address header if incorrect, and then start typing. You can just: select the field, hit Ctrl+A followed by backspace. >I guess the entry could be removed if the user clicks the delete button and the entry is already empty. Buttons changing their functions is unintuitive. I still think these buttons should be delete buttons, but you Paul had a good argument that I didn't get yesterday. When you type into the field of the last row it immediately adds a new row below it. I think that instead there should be an add recipient button, with a simple plus as the icon. To make this system keyboard friendly backspace in an empty field could remove the row and enter in a field could create a new row below the current one. -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Wed Jan 11 09:48:57 2017 From: claws at thewildbeast.co.uk (Paul) Date: Wed, 11 Jan 2017 08:48:57 +0000 Subject: [Users] spamassassin config advice In-Reply-To: <20170110192146.42bf0f59@rsv2-Serval-Pro> References: <20170110192146.42bf0f59@rsv2-Serval-Pro> Message-ID: <20170111084857.32b285c1@kujata> On Tue, 10 Jan 2017 19:21:46 -0500 Reid Vail wrote: > I am pretty sure I don't know how this is supposed to be configured > and have probably got it completely confused. Is spamd running? What is your spamassassin plugin config? with regards Paul From ricardo at mones.org Wed Jan 11 10:27:03 2017 From: ricardo at mones.org (Ricardo Mones) Date: Wed, 11 Jan 2017 10:27:03 +0100 Subject: [Users] Any known issues when using Fruho and SecurityKiss In-Reply-To: References: Message-ID: <20170111092702.GF32094@busgosu.mones.org> Hi, On Wed, Jan 11, 2017 at 12:47:24AM +0200, Alaa Salem wrote: > Hi: > > Is there are some issues when using Claws mail version 3.13.2 while > connecting via a VPN such as Fruho using SecurityKiss if so is there a > workaround. > > Error message: > "An error happened during SMTP session. > Use "Send queued messages" from the main window to retry." > > Network log > ---------------------------------------------------------------------------------------/ [...] > * Account 'Alaa Salem': Connecting to SMTP server: smtp.gmx.com:465... [...] > *** Session timed out. You may be able to recover by increasing the timeout > value in Preferences/Other/Miscellaneous. Does it connect when you try command "telnet smtp.gmx.com 465"? >From the outside world that port works: $ telnet smtp.gmx.com 465 Trying 212.227.17.174... Connected to mail.gmx.com. Escape character is '^]'. So your VPN (or another network device) is probably blocking that port. regards, -- Ricardo Mones ~ 00:45 < hammar> cool.. have you used rssyl? 00:46 <@Ticho> um, yes Seen on #sylpheed From noreply at thewildbeast.co.uk Wed Jan 11 10:46:42 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 11 Jan 2017 09:46:42 +0000 Subject: [Users] [Bug 3755] verification of signatures successful despite non-matching sender addres In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3755 --- Comment #3 from johannes schilling --- you're right, keys/certs don't neccessarily have addresses associated with them, but many certificate authorities only sign S/MIME certs that have mail addresses included and validate the email addresses. so what i'm trying to say is: i know that it's not given that each certificate has email addresses attached, but it's a use case many organisations i've been to have and they require that i can't send an email in your name, signed as me and have it get a green verification badge. or, put another way: the way you see it, it's the S/MIME certificate alone that verifies someones identity, and possible mismatches between mail addresses (that i as a user see, but that are irrelevant to the protocol?) are to be ignored; is that right? -- You are receiving this mail because: You are the assignee for the bug. From clauman at gwdg.de Wed Jan 11 13:50:51 2017 From: clauman at gwdg.de (Claudius Laumanns) Date: Wed, 11 Jan 2017 13:50:51 +0100 Subject: [Users] vcalendar and davmail Message-ID: <20170111135051.19346170@host.localdomain> Hi folks, i want to use Claws's with MS Exchange, that is, vcalendar with davmail. The URL should be like https://clauman at gwdg.de:password:davmail.gwdg.de:1080/users/clauman%40gwdg.de/calendar or https://gwdg\clauman:password:davmail.gwdg.de:1080/users/clauman%40gwdg.de/calendar i tried to percent encode charakters like @ \ : It did not work anyway. Claws always complained about a malformed URL or a missing auth. Any Ideas? Thank you for your attention. Claudius From noreply at thewildbeast.co.uk Wed Jan 11 19:49:09 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 11 Jan 2017 18:49:09 +0000 Subject: [Users] [Bug 3630] Ubuntu PPA very much out of date In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3630 --- Comment #6 from Michael Tunnell --- > I am going to try to get a sync/merge from Debian into Ubuntu 16.04 but no promises! If the merge goes smoothly, it'll still have to go through the Ubuntu archive admins due to being past beta freeze. Then may I ask what is the point of even having a PPA? PPAs are typically used to bypass the wait period between Ubuntu releases but the PPA has not been updated in over 2 years and therefore it is completely outdated by a lot. http://packages.ubuntu.com/search?keywords=claws-mail&searchon=names&suite=all§ion=all Ubuntu 16.04 = claws-mail 3.13.2 Ubuntu 16.10 = claws-mail 3.14.0 Ubuntu 17.04 = claws-mail 3.14.1 Your PPA maxes out at 3.11.1 yet your website tells Ubuntu users to use the PPA on the downloads page. If you do not want to maintain your PPA then alright but at least update your website to stop directing people to it and maybe just remove the PPA entirely. At the moment, the website is telling people to use something that is no longer worth using. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:03:21 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:03:21 +0000 Subject: [Users] [Bug 3755] verification of signatures successful despite non-matching sender addres In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3755 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME Resolution|INVALID |--- --- Comment #4 from Paul --- Re-opened and re-categorised under Plugins/Privacy/SMIME because this may be an issue with S/MIME. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:04:05 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:04:05 +0000 Subject: [Users] [Bug 3449] When replying to an S/Mime encrypted mail To: and Subject: are empty In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3449 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:04:25 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:04:25 +0000 Subject: [Users] [Bug 3088] Decrypting of S/MIME email causes client to lose sender information In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3088 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:06:44 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:06:44 +0000 Subject: [Users] [Bug 3451] Allow selection of the encryption algorithm for S/Mime In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3451 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:06:56 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:06:56 +0000 Subject: [Users] [Bug 3450] Show encryption algorithm used with S/Mime encryption In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3450 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:07:53 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:07:53 +0000 Subject: [Users] [Bug 3230] Error message "Secret key specification is ambiguous" during signing with s/mime In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3230 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 10:08:18 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 09:08:18 +0000 Subject: [Users] [Bug 2747] smime can not find key first time In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2747 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 13:56:28 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 12:56:28 +0000 Subject: [Users] [Bug 3757] New: Status not save before restart OS Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3757 Bug ID: 3757 Summary: Status not save before restart OS Classification: Unclassified Product: Claws Mail (Windows) Version: 3.14.1 Hardware: PC OS: Windows 10 Status: NEW Severity: minor Priority: P3 Component: default Assignee: users at lists.claws-mail.org Reporter: mystara at me.com When I start Claws Mail after restart OS, the messages those I have read before restart are back to Unread status. If I close Claws Mail before restart OS, app saves each status correctly. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 15:32:33 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 14:32:33 +0000 Subject: [Users] [Bug 3707] Impossible to type @ in the Italian version In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3707 Andrej Kacian changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Andrej Kacian --- Closing due to lack of feedback. Feel free to reopen once you respond to my question. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 12 16:42:44 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 15:42:44 +0000 Subject: [Users] [Bug 3692] Scrollbar should be at bottom if messages are sorted by date in ascending order In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3692 --- Comment #10 from alt.rw-9o6f8p42 at yopmail.com --- (In reply to comment #3) > The standard selection of messages is a different thing. Addendum regarding the selection of messages: The MacOS mail.app, for example, remembers your last selection in a folder and will reselect that message the next time you open that folder. If a message is removed by another IMAP client and mail.app thus cannot reselect it, it simply does not select a message at all. If message selection is handled like that, it makes sense to have the maill program scroll to the position of the reselected message. If no message is selected, it should scroll all the way up or down in the list, depending on whether newest messages are set to be shown at the bottom or the top. -- You are receiving this mail because: You are the assignee for the bug. From rsv869 at runbox.com Thu Jan 12 17:07:18 2017 From: rsv869 at runbox.com (Reid Vail) Date: Thu, 12 Jan 2017 11:07:18 -0500 Subject: [Users] Spamassassin - config help Message-ID: <20170112110718.00a0206f@rsv2-Serval-Pro> Hello Claws-mail team - Somehow or other I lost the thread of this config issue. Sorry. This was my earlier message: ---- I'm running version 3.13.2 on Linuxmint 18 KDE and have a question about the best way to get it up and running. I'm getting the error shown below: "The SpamAssassin plugin couldn't filter a message. The probable cause of the error is an unreachable spamd daemon. Please make sure spamd is running and accessible." I have the plugin loaded and turned on via Preferences. I also loaded various spamassassin elements via Synaptic, including spamassassin 3.4.1-3, claws-mail-spamassassin, spamc , spamass-milter. ---------- I believe the respondent asked if Spamd was loaded, and how I had it configured. I don't believe it is loaded because I don't see a process by that name when I look in Ksysguard. Should I look somewhere else? If I should have done something to make sure it loads, I didn't know that. Here's /etc/default/spamassassin.. I made only one change, to set ENABLED to 1. # /etc/default/spamassassin # Duncan Findlay # WARNING: please read README.spamd before using. # There may be security risks. # If you're using systemd (default for jessie), the ENABLED setting is # not used. Instead, enable spamd by issuing: # systemctl enable spamassassin.service # Change to "1" to enable spamd on systems using sysvinit: ENABLED=1 # Options # See man spamd for possible options. The -d option is automatically added. # SpamAssassin uses a preforking model, so be careful! You need to # make sure --max-children is not set to anything higher than 5, # unless you know what you're doing. OPTIONS="--create-prefs --max-children 5 --helper-home-dir" # Pid file # Where should spamd write its PID to file? If you use the -u or # --username option above, this needs to be writable by that user. # Otherwise, the init script will not be able to shut spamd down. PIDFILE="/var/run/spamd.pid" # Set nice level of spamd #NICE="--nicelevel 15" # Cronjob # Set to anything but 0 to enable the cron job to automatically update # spamassassin's rules on a nightly basis CRON=0 ---------------------- As for the config of the plugin, it is enabled, type of transport is set to Localhost, user is correct and spamd is set to localhost. It is really possible I missed steps. Open to advice. Reid From noreply at thewildbeast.co.uk Thu Jan 12 17:38:45 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 12 Jan 2017 16:38:45 +0000 Subject: [Users] [Bug 3630] Ubuntu PPA very much out of date In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3630 --- Comment #7 from Barry Warsaw --- Note that the PPA is not mine so I can't do anything about that, but I will point out that as of Ubuntu 17.04 (Zesty Zapus), currently in development, I have resync'd Ubuntu's claws-mail with Debian's. This means as soon as Debian gets a new version, it should be straight-up imported into Ubuntu. Things that can block this include freeze periods and autopkgtest promotion failures. (Aside: I see that 3.14.1-2 is still in zesty-proposed; It's probably a build failure and I will investigate.) The PPA may still be useful for folks on older Ubuntu releases, including 16.04 LTS. But as I say, it's not my PPA. -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Thu Jan 12 17:46:10 2017 From: claws at thewildbeast.co.uk (Paul) Date: Thu, 12 Jan 2017 16:46:10 +0000 Subject: [Users] Spamassassin - config help In-Reply-To: <20170112110718.00a0206f@rsv2-Serval-Pro> References: <20170112110718.00a0206f@rsv2-Serval-Pro> Message-ID: <20170112164610.7a0d6b0e@kujata> On Thu, 12 Jan 2017 11:07:18 -0500 Reid Vail wrote: > # If you're using systemd (default for jessie), the ENABLED setting > is # not used. Instead, enable spamd by issuing: > # systemctl enable spamassassin.service > # Change to "1" to enable spamd on systems using sysvinit: > ENABLED=1 Is that pertinent to your system, and, if it is, did you run sudo systemctl enable spamassassin.service ? with regards Paul From noreply at thewildbeast.co.uk Fri Jan 13 09:27:24 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 08:27:24 +0000 Subject: [Users] [Bug 3571] recipient list lost and truncated In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3571 --- Comment #3 from wwp --- Even displaying the draft message w/o opening it for edition shows truncated recipients list. Investigating.. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 13 10:02:38 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 09:02:38 +0000 Subject: [Users] [Bug 3758] New: program crash if delay with pop response Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3758 Bug ID: 3758 Summary: program crash if delay with pop response Classification: Unclassified Product: Claws Mail (Windows) Version: 3.14.1 Hardware: PC OS: Windows 10 Status: NEW Severity: normal Priority: P3 Component: default Assignee: users at lists.claws-mail.org Reporter: bugreport at vodafone.co.nz I connect to a company mail server that sometimes is very slow to respond or often down. If I decide not to wait (say 20 seconds or so after clicking get mail) and try to close / stop the receive message box that appears on screen, the program terminates. Unfortunately I can't repeat the error at the moment as the mail server is up right now otherwise I would document this better, my apologies. I was able to repeat this every time I tried to connect to the mail server when it was down. A graceful disconnect from the mail server would be preferred? Using 3.14.1-2newcairo release -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 13 11:05:46 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 10:05:46 +0000 Subject: [Users] [Bug 3758] program crash if delay with pop response In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3758 --- Comment #1 from Andrej Kacian --- Please try if the crash also happens with the official, 32-bit release. Also, can you simulate the server being down by configuring your account to use a different (dead) port, or hostname? -- You are receiving this mail because: You are the assignee for the bug. From kieakl at ihug.co.nz Fri Jan 13 11:25:29 2017 From: kieakl at ihug.co.nz (kangaroo) Date: Fri, 13 Jan 2017 23:25:29 +1300 Subject: [Users] [Bug 3758] program crash if delay with pop response In-Reply-To: References: Message-ID: <20170113232529.00005684@ihug.co.nz> I have tried a different port and host name and the exit is stable, error message then window closes as expected. It seems I can only get the crash to happen when the mail server is down (and asking IT to set this up sadly isn't going to happen). Next time I will keep the logs and post them. I will also try with the official release when it happens and see if that fails also. On Fri, 13 Jan 2017 10:05:46 +0000 noreply at thewildbeast.co.uk wrote: > http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3758 > > --- Comment #1 from Andrej Kacian --- > Please try if the crash also happens with the official, 32-bit release. > > Also, can you simulate the server being down by configuring your account to use > a different (dead) port, or hostname? > From claws at thewildbeast.co.uk Fri Jan 13 11:31:14 2017 From: claws at thewildbeast.co.uk (Paul) Date: Fri, 13 Jan 2017 10:31:14 +0000 Subject: [Users] [Bug 3758] program crash if delay with pop response In-Reply-To: <20170113232529.00005684@ihug.co.nz> References: <20170113232529.00005684@ihug.co.nz> Message-ID: <20170113103114.111967ce@kujata> On Fri, 13 Jan 2017 23:25:29 +1300 kangaroo wrote: > I have tried a different port and host name and the exit is stable, > error message then window closes as expected. It seems I can only > get the crash to happen when the mail server is down (and asking IT > to set this up sadly isn't going to happen). Next time I will keep > the logs and post them. I will also try with the official release > when it happens and see if that fails also. Please reply to bug items on the bug tracker. That way all pertinent information is stored in one place. with regards Paul From perry at piermont.com Fri Jan 13 15:34:31 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 09:34:31 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20161208085256.4f3e8d01@anthra> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161208085256.4f3e8d01@anthra> Message-ID: <20170113093431.2cfa9a03@jabberwock.cb.piermont.com> Replying very late (as I was not paying attention to the issue for some weeks...) On Thu, 8 Dec 2016 08:52:56 +0100 wwp wrote: > Hello Perry, > On Wed, 7 Dec 2016 16:50:31 -0500 "Perry E. Metzger" > wrote: > > > On Wed, 7 Dec 2016 09:45:48 +0000 Paul > > wrote: > > > Hi Perry, > > > > > > Then it must be this commit: > > > > > > http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=abbf2f8a104fcb5e72226a2edf0ecd1cd5d29b93 > > > > > > Try reverting that. > > > > It still failed. I expected it would, as this is OS X, not > > FreeBSD, and that line should only alter things if we're running > > FreeBSD. > > > > On a hunch, though, I added |*darwin* to the case statement, and > > it got past the encrypt error only to blow up when it claimed that > > libetpan isn't present. (It is present, and everything worked fine > > under 3.14.0...) > > > > Ideas here? Is adding "|*darwin*" to the case the right thing? (I > > have no idea what this library call it is looking for is even > > for.) Ideas on how to fix the libetpan failure? The errors are > > here. > > > > ] checking whether to use libetpan... yes > > ] checking for libetpan-config... /opt/local/bin/libetpan-config > > ] checking libetpan/libetpan.h usability... yes > > ] checking libetpan/libetpan.h presence... yes > > ] checking for libetpan/libetpan.h... yes > > ] checking whether libetpan-config hints compiles and links > > fine... no ] *** Claws Mail requires libetpan 0.57 or newer. See > > http://www.etpan.org/ ] *** You can use --disable-libetpan if you > > don't need IMAP4 and/or NNTP support. ] configure: error: > > libetpan 0.57 not found > > I'd be curious to know if 3.14.0 still builds fine on your system! It builds just fine. Remember, this isn't just my system, but all MacPorts users -- I'm the MacPorts maintainer for claws. And I still have no idea why 3.14.1 won't build under MacPorts (or on the Mac). It makes no sense to me. Perry -- Perry E. Metzger perry at piermont.com From perry at piermont.com Fri Jan 13 16:04:51 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 10:04:51 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20161207232009.65bdf2de@sleipner.datanom.net> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> Message-ID: <20170113100451.06b685d2@jabberwock.cb.piermont.com> On Wed, 7 Dec 2016 23:20:09 +0100 Michael Rasmussen wrote: > On Wed, 7 Dec 2016 16:50:31 -0500 > "Perry E. Metzger" wrote: > > > > > ] checking whether to use libetpan... yes > > ] checking for libetpan-config... /opt/local/bin/libetpan-config > > ] checking libetpan/libetpan.h usability... yes > > ] checking libetpan/libetpan.h presence... yes > > ] checking for libetpan/libetpan.h... yes > > ] checking whether libetpan-config hints compiles and links > > fine... no ] *** Claws Mail requires libetpan 0.57 or newer. See > > http://www.etpan.org/ ] *** You can use --disable-libetpan if you > > don't need IMAP4 and/or NNTP support. ] configure: error: > > libetpan 0.57 not found > Above means that your version of etpan is not >= 0.57. etpan is the > library providing support for imap. > Replying a month late: the MacPorts version of etpan IS over 0.57 (and hasn't changed, and this configures and works fine for 3.14.0 on OS X.) The question is why it can't find it but it could before. The only difference is quite literally the user of 3.14.1 vs. 3.14.0. :( I will have to dig in to this more deeply it seems. Perry -- Perry E. Metzger perry at piermont.com From andrej at kacian.sk Fri Jan 13 16:28:37 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Fri, 13 Jan 2017 16:28:37 +0100 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113100451.06b685d2@jabberwock.cb.piermont.com> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> Message-ID: <20170113162837.5efb54d5@penny> On Fri, 13 Jan 2017 10:04:51 -0500 "Perry E. Metzger" wrote: > Replying a month late: the MacPorts version of etpan IS over 0.57 (and > hasn't changed, and this configures and works fine for 3.14.0 on OS > X.) > > The question is why it can't find it but it could before. The only > difference is quite literally the user of 3.14.1 vs. 3.14.0. :( > > I will have to dig in to this more deeply it seems. Can you post complete config.log file from the build attempt somewhere? That is probably the only place where clues can be found as to why configure fails. Regards, -- Andrej From perry at piermont.com Fri Jan 13 17:00:28 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 11:00:28 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113162837.5efb54d5@penny> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> Message-ID: <20170113110028.3dcbd2a8@jabberwock.cb.piermont.com> On Fri, 13 Jan 2017 16:28:37 +0100 Andrej Kacian wrote: > On Fri, 13 Jan 2017 10:04:51 -0500 > "Perry E. Metzger" wrote: > > > Replying a month late: the MacPorts version of etpan IS over 0.57 > > (and hasn't changed, and this configures and works fine for > > 3.14.0 on OS X.) > > > > The question is why it can't find it but it could before. The only > > difference is quite literally the user of 3.14.1 vs. 3.14.0. :( > > > > I will have to dig in to this more deeply it seems. > > Can you post complete config.log file from the build attempt > somewhere? That is probably the only place where clues can be found > as to why configure fails. > > Regards, Would you like that for only 3.14.1 or also for 3.14.0 (which works)? And any ideas where to post them? Perry -- Perry E. Metzger perry at piermont.com From dick at therucks.me.uk Fri Jan 13 17:53:24 2017 From: dick at therucks.me.uk (Dick Ruck) Date: Fri, 13 Jan 2017 16:53:24 +0000 Subject: [Users] New user etiquette Message-ID: <20170113165324.39dbd2a1@gandalf> Hi, I have just started using Claws and think it is an excellent client. However, I have several questions to which I cannot find the answers. Could someone kindly explain the correct etiquette for posting on this list? Presumably one question per post? The question in the Subject? (I'm new to lists, too!) Thanks, Dick From subscript at free.fr Fri Jan 13 18:05:51 2017 From: subscript at free.fr (wwp) Date: Fri, 13 Jan 2017 18:05:51 +0100 Subject: [Users] New user etiquette In-Reply-To: <20170113165324.39dbd2a1@gandalf> References: <20170113165324.39dbd2a1@gandalf> Message-ID: <20170113180551.4099bced@anthra> Hello Dick, On Fri, 13 Jan 2017 16:53:24 +0000 Dick Ruck wrote: > Hi, > I have just started using Claws and think it is an excellent client. > However, I have several questions to which I cannot find the answers. > Could someone kindly explain the correct etiquette for posting on this > list? Presumably one question per post? The question in the Subject? > (I'm new to lists, too!) Welcome aboard! :-) Preferably one topic per email, yes. Otherwise some always get lost or unreplied or not easily searchable. The subject has to be smart, pertinent, meaning explicit enough and concise enough, colourful but still relative to what's in the body, and it's not always a question. Good luck with that! Also, don't continue here a discussion that started on the bug tracker, unless you're invited to. Virus-safe attachments are allowed unless they're "big". Other than that, nothing special I can think of. Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From charlescurley at charlescurley.com Fri Jan 13 18:27:46 2017 From: charlescurley at charlescurley.com (Charles Curley) Date: Fri, 13 Jan 2017 10:27:46 -0700 Subject: [Users] New user etiquette In-Reply-To: <20170113165324.39dbd2a1@gandalf> References: <20170113165324.39dbd2a1@gandalf> Message-ID: <20170113102746.13aca6d2@hawk.localdomain> On Fri, 13 Jan 2017 16:53:24 +0000 Dick Ruck wrote: > Could someone kindly explain the correct etiquette for posting on this > list? I am not aware of any netiquette specific to this list. A good start, and possibly more than you wanted to know, is Eric Raymond and Rick Moen, How To Ask Questions The Smart Way. http://catb.org/~esr/faqs/smart-questions.html Key is to do some research before you ask. Search engines are your friend. For information on managing mailing list subscriptions, examine the headers of most list traffic (CTL-h in the body of the email in most mail readers, including Claws). Look for headers like List-Unsubscribe: for information. -- The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. -- U.S. Const. Amendment IV Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB From dick at therucks.me.uk Fri Jan 13 18:37:27 2017 From: dick at therucks.me.uk (Dick Ruck) Date: Fri, 13 Jan 2017 17:37:27 +0000 Subject: [Users] How to obtain the plugins? Message-ID: <20170113173727.7848b1aa@gandalf> I am using Linux Mint 18.1 Serena. I initially installed Claws using the software manager and successfully added the archiver plugin. However I could not install the spamassassin plugin. I then downloaded Claws 3.14.1 and complied/installed it. I then discovered that, although it had the spamassassin plugin, it did not have the archiver plugin. When I access the plugins page: (http://www.claws-mail.org/plugins.php?section=downloads) I cannot find any way to download the plugins, either with Firefox or Chromium. Are there other methods of obtaining the plugins? TIA Dick From perry at piermont.com Fri Jan 13 18:46:25 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 12:46:25 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113162837.5efb54d5@penny> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> Message-ID: <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> On Fri, 13 Jan 2017 16:28:37 +0100 Andrej Kacian wrote: > On Fri, 13 Jan 2017 10:04:51 -0500 > "Perry E. Metzger" wrote: > > > Replying a month late: the MacPorts version of etpan IS over 0.57 > > (and hasn't changed, and this configures and works fine for > > 3.14.0 on OS X.) > > > > The question is why it can't find it but it could before. The only > > difference is quite literally the user of 3.14.1 vs. 3.14.0. :( > > > > I will have to dig in to this more deeply it seems. > > Can you post complete config.log file from the build attempt > somewhere? That is probably the only place where clues can be found > as to why configure fails. I created a pair of github gists. config.log for 3.14.0 (which works) https://gist.github.com/pmetzger/628dd39f41568fb46bfd344321a3ca2b config.log for 3.14.1 (which does not work) https://gist.github.com/pmetzger/003c73d74927e0f213d7f637d7a4ea87 Perry -- Perry E. Metzger perry at piermont.com From rezso at rezso.net Fri Jan 13 19:02:37 2017 From: rezso at rezso.net (=?UTF-8?B?UMOhZGVyIFJlenPFkQ==?=) Date: Fri, 13 Jan 2017 19:02:37 +0100 Subject: [Users] How to obtain the plugins? In-Reply-To: <20170113173727.7848b1aa@gandalf> References: <20170113173727.7848b1aa@gandalf> Message-ID: <20170113190237.4d8c7834@papi.home> Fri, 13 Jan 2017 17:37:27 +0000 -n Dick Ruck írta: >I am using Linux Mint 18.1 Serena. I initially installed Claws using >the software manager and successfully added the archiver plugin. >However I could not install the spamassassin plugin. I then downloaded >Claws 3.14.1 and complied/installed it. >I then discovered that, although it had the spamassassin plugin, it did >not have the archiver plugin. >When I access the plugins page: >(http://www.claws-mail.org/plugins.php?section=downloads) I cannot find >any way to download the plugins, either with Firefox or Chromium. I think, this page is outdated a bit... >Are there other methods of obtaining the plugins? Many plugins included in the claws mail source: http://git.claws-mail.org/?p=claws.git;a=tree;f=src/plugins -- R. From jerry at seibercom.net Fri Jan 13 19:13:54 2017 From: jerry at seibercom.net (Jerry) Date: Fri, 13 Jan 2017 13:13:54 -0500 Subject: [Users] Synchronizing Folders Message-ID: <20170113131354.00004b30@seibercom.net> I am using a postfix/dovecot setup on a FreeBSD machine. Claws-Mail is running on a Windows-10 PC. I am going to have to rebuild the FreeBSD machine from scratch. Now, if I use and then rebuild the FreeBSD machine, will running that same command, after I have configured Dovecot obviously, restore the files to the mail server? I cannot find any definitive information on this. Thanks! -- Jerry From mir at miras.org Fri Jan 13 19:29:09 2017 From: mir at miras.org (Michael Rasmussen) Date: Fri, 13 Jan 2017 19:29:09 +0100 Subject: [Users] Synchronizing Folders In-Reply-To: <20170113131354.00004b30@seibercom.net> References: <20170113131354.00004b30@seibercom.net> Message-ID: <20170113192909.6c24f5e2@sleipner.datanom.net> On Fri, 13 Jan 2017 13:13:54 -0500 Jerry wrote: > > Now, if I use and then rebuild the FreeBSD > machine, will running that same command, after I have configured > Dovecot obviously, restore the files to the mail server? I cannot find > any definitive information on this. > You will need imapsync or something similar. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael rasmussen cc http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E mir datanom net http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C mir miras org http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 -------------------------------------------------------------- /usr/games/fortune -es says: Sex dumps core (Sex is a Simple editor for X11) -- Seen on debian bugtracking -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From mir at miras.org Fri Jan 13 19:38:47 2017 From: mir at miras.org (Michael Rasmussen) Date: Fri, 13 Jan 2017 19:38:47 +0100 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> Message-ID: <20170113193847.7e1c87e4@sleipner.datanom.net> On Fri, 13 Jan 2017 12:46:25 -0500 "Perry E. Metzger" wrote: > > config.log for 3.14.1 (which does not work) > > https://gist.github.com/pmetzger/003c73d74927e0f213d7f637d7a4ea87 > It shows that libetpan is not found while running configure. Try running: 1) make maintainer-clean 2) ./autogen.sh 2>&1 | tee /tmp/autogen.dump Make the file autogen.dump avialable somewhere for anyone to inspect. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael rasmussen cc http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E mir datanom net http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C mir miras org http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 -------------------------------------------------------------- /usr/games/fortune -es says: THE DAILY PLANET SUPERMAN SAVES DESSERT! Plans to "Eat it later" -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From andrej at kacian.sk Fri Jan 13 19:49:56 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Fri, 13 Jan 2017 19:49:56 +0100 Subject: [Users] Synchronizing Folders In-Reply-To: <20170113131354.00004b30@seibercom.net> References: <20170113131354.00004b30@seibercom.net> Message-ID: <20170113194956.61cd9f24@penny> On Fri, 13 Jan 2017 13:13:54 -0500 Jerry wrote: > I am using a postfix/dovecot setup on a FreeBSD machine. Claws-Mail is > running on a Windows-10 PC. I am going to have to rebuild the FreeBSD > machine from scratch. > > Now, if I use and then rebuild the FreeBSD > machine, will running that same command, after I have configured > Dovecot obviously, restore the files to the mail server? I cannot find > any definitive information on this. In theory, it is possible, if your Claws Mail's imapcache contains *all* of the messages (normally, it only keeps the ones you have opened on that particular Claws Mail account), and if you are willing to convert the contents of this imapcache back to whatever format your Dovecot uses as a backend to store your messages and folders. A much better solution would be to just back up the data directly from your FreeBSD server before reinstallation, and put them back after you set up Dovecot again afterwards. If done properly, Claws Mail will never notice that anything has changed. Regards, -- Andrej From andrej at kacian.sk Fri Jan 13 20:03:04 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Fri, 13 Jan 2017 20:03:04 +0100 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> Message-ID: <20170113200304.71e5b150@penny> On Fri, 13 Jan 2017 12:46:25 -0500 "Perry E. Metzger" wrote: > On Fri, 13 Jan 2017 16:28:37 +0100 Andrej Kacian > wrote: > > On Fri, 13 Jan 2017 10:04:51 -0500 > > "Perry E. Metzger" wrote: > > > > > Replying a month late: the MacPorts version of etpan IS over 0.57 > > > (and hasn't changed, and this configures and works fine for > > > 3.14.0 on OS X.) > > > > > > The question is why it can't find it but it could before. The only > > > difference is quite literally the user of 3.14.1 vs. 3.14.0. :( > > > > > > I will have to dig in to this more deeply it seems. > > > > Can you post complete config.log file from the build attempt > > somewhere? That is probably the only place where clues can be found > > as to why configure fails. > > I created a pair of github gists. > > config.log for 3.14.0 (which works) > > https://gist.github.com/pmetzger/628dd39f41568fb46bfd344321a3ca2b > > config.log for 3.14.1 (which does not work) > > https://gist.github.com/pmetzger/003c73d74927e0f213d7f637d7a4ea87 > > Perry These two lines are telling: ld: unknown option: -export-dynamic clang: error: linker command failed with exit code 1 (use -v tosee invocation) Looks like the recent patch from bug 3665, which was supposed to fix building on OS X broke your Macports build, as it changed LDFLAGS to use -export-dynamic, instead of --export-dynamic (one leading dash instead of two). (http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3665) I guess this is an issue of correctly detecting the environment we are in. I am not familiar with Apple Unix flavours, but my guess is that the reporter of bug 3665 uses some native Apple build toolchain, which has linker program that uses -export-dynamic, whereas Macports use either GNU gcc toolchain, or perhaps clang, and linker program which understands --export-dynamic. We test for Apple OS simply by matching host triplet against pattern "*-apple-*", but perhaps something more fine-grained is needed. I see from your config.log that your build system shows host triplet "x86_64-apple-darwin16.3.0", so perhaps we need to treat "*-apple-darwin*" differently from just "*-apple-*"? This could really use someone familiar with MacOS/OSX, as I'm just blindly guessing. As a quick&dirty workaround, you should be able to fix the Macports build with a simple change: --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,7 @@ case "$host" in ;; *-apple-*) platform_osx=yes - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" ;; *) platform_win32=no Regards, -- Andrej From perry at piermont.com Fri Jan 13 22:10:12 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 16:10:12 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113193847.7e1c87e4@sleipner.datanom.net> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> <20170113193847.7e1c87e4@sleipner.datanom.net> Message-ID: <20170113161012.7b2aa2ef@jabberwock.cb.piermont.com> On Fri, 13 Jan 2017 19:38:47 +0100 Michael Rasmussen wrote: > On Fri, 13 Jan 2017 12:46:25 -0500 > "Perry E. Metzger" wrote: > > > > > config.log for 3.14.1 (which does not work) > > > > https://gist.github.com/pmetzger/003c73d74927e0f213d7f637d7a4ea87 > > > It shows that libetpan is not found while running configure. Try > running: > 1) make maintainer-clean > 2) ./autogen.sh 2>&1 | tee /tmp/autogen.dump > > Make the file autogen.dump avialable somewhere for anyone to > inspect. > Unfortunately, there's no makefile to run make maintainer-clean off of at this point. Hoping that the autogen step does something useful without that step, I created this: https://gist.github.com/pmetzger/6f98a4f2242507c9ab364e33263dc044 -- Perry E. Metzger perry at piermont.com From noreply at thewildbeast.co.uk Fri Jan 13 22:11:46 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 21:11:46 +0000 Subject: [Users] [Bug 3734] undefined symbol error with flex-2.6.2 In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3734 --- Comment #3 from Ashish Gupta --- Created attachment 1709 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1709&action=edit Drop the #undef yywrap line -- You are receiving this mail because: You are the assignee for the bug. From perry at piermont.com Fri Jan 13 22:19:19 2017 From: perry at piermont.com (Perry E. Metzger) Date: Fri, 13 Jan 2017 16:19:19 -0500 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113200304.71e5b150@penny> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> <20170113200304.71e5b150@penny> Message-ID: <20170113161919.321c60a3@jabberwock.cb.piermont.com> On Fri, 13 Jan 2017 20:03:04 +0100 Andrej Kacian wrote: > Looks like the recent patch from bug 3665, which was supposed to fix > building on OS X broke your Macports build, as it changed LDFLAGS to > use -export-dynamic, instead of --export-dynamic (one leading dash > instead of two). > (http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3665) So that's quite weird, because the native Mac ld uses one dash, but an _underscore_ in the option name: -export_dynamic. The patch was wrong -- the change was needed but it was not quite right. Not sure how this ended up in the tree! Fixing this fixed everything. The correct patch is this, and please apply it to the trunk for 3.14.2 or whatever: --- configure.ac.~1~ 2016-11-06 07:01:27.000000000 -0500 +++ configure.ac 2017-01-13 16:12:50.000000000 -0500 @@ -118,7 +118,7 @@ ;; *-apple-*) platform_osx=yes - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + LDFLAGS="$LDFLAGS -Wl,-export_dynamic" ;; *) platform_win32=no Note what you suggested doesn't work: > --- a/configure.ac > +++ b/configure.ac > @@ -118,7 +118,7 @@ case "$host" in > ;; > *-apple-*) > platform_osx=yes > - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" > + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" > ;; > *) > platform_win32=no Perry -- Perry E. Metzger perry at piermont.com From noreply at thewildbeast.co.uk Fri Jan 13 22:30:37 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 21:30:37 +0000 Subject: [Users] [Bug 3734] undefined symbol error with flex-2.6.2 In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3734 --- Comment #4 from Charles A Edwards --- Comment on attachment 1709 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1709 Drop the #undef yywrap line I have tested and can confirm. With the patch applied when building claws-mail the vcalendar-plugin loads without error. Thanks Bug can mow be closed. -- You are receiving this mail because: You are the assignee for the bug. From mir at miras.org Fri Jan 13 22:42:12 2017 From: mir at miras.org (Michael Rasmussen) Date: Fri, 13 Jan 2017 22:42:12 +0100 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: <20170113161919.321c60a3@jabberwock.cb.piermont.com> References: <20161204143349.5d5a7e6e@jabberwock.cb.piermont.com> <20161206073844.424cf5ca@kujata> <20161206135016.77e4e7b7@jabberwock.cb.piermont.com> <20161207094548.0aa78644@kujata> <20161207165031.1fa362a1@jabberwock.cb.piermont.com> <20161207232009.65bdf2de@sleipner.datanom.net> <20170113100451.06b685d2@jabberwock.cb.piermont.com> <20170113162837.5efb54d5@penny> <20170113124625.5e5d2c63@jabberwock.cb.piermont.com> <20170113200304.71e5b150@penny> <20170113161919.321c60a3@jabberwock.cb.piermont.com> Message-ID: <20170113224212.5f24ddad@sleipner.datanom.net> On Fri, 13 Jan 2017 16:19:19 -0500 "Perry E. Metzger" wrote: > > So that's quite weird, because the native Mac ld uses one dash, but > an _underscore_ in the option name: -export_dynamic. The patch was > wrong -- the change was needed but it was not quite right. Not sure > how this ended up in the tree! > > Fixing this fixed everything. The correct patch is this, and please > apply it to the trunk for 3.14.2 or whatever: > > --- configure.ac.~1~ 2016-11-06 07:01:27.000000000 -0500 > +++ configure.ac 2017-01-13 16:12:50.000000000 -0500 > @@ -118,7 +118,7 @@ > ;; > *-apple-*) > platform_osx=yes > - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" > + LDFLAGS="$LDFLAGS -Wl,-export_dynamic" > ;; > *) > platform_win32=no > > Note what you suggested doesn't work: > Patch is committed to git. Thanks for the patch. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael rasmussen cc http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E mir datanom net http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C mir miras org http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 -------------------------------------------------------------- /usr/games/fortune -es says: HUMAN REPLICAS are inserted into VATS of NUTRITIONAL YEAST ... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Fri Jan 13 22:47:43 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 13 Jan 2017 21:47:43 +0000 Subject: [Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found." In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3673 Michael Rasmussen changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|PATCHESWELCOME |FIXED --- Comment #2 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-13 22:42:02.660346423 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=f1afaa675b83b4889de0db03ef4094c72af69e1b Merge: c06b562 650e162 Author: Colin Leroy Date: Fri Jan 13 22:42:02 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=650e162f0f6995a1cd6782fcf2ce9fa65410701a Merge: 8ab8e46 980b3eb Author: Michael Rasmussen Date: Fri Jan 13 22:41:08 2017 +0100 Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=8ab8e461d5669405dcc9a38521e5b29d34ba4675 Author: Michael Rasmussen Date: Fri Jan 13 22:39:10 2017 +0100 Fix bug #3673. Patch provided by Perry E. Metzger -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Fri Jan 13 22:59:08 2017 From: claws at thewildbeast.co.uk (Paul) Date: Fri, 13 Jan 2017 21:59:08 +0000 Subject: [Users] How to obtain the plugins? In-Reply-To: <20170113173727.7848b1aa@gandalf> References: <20170113173727.7848b1aa@gandalf> Message-ID: <20170113215908.52a24b18@kujata> On Fri, 13 Jan 2017 17:37:27 +0000 Dick Ruck wrote: > However I could not install the spamassassin plugin. I then > downloaded Claws 3.14.1 and complied/installed it. > I then discovered that, although it had the spamassassin plugin, it > did not have the archiver plugin. See the ./configure output. Probably you are missing the archiver plugin's dependency: libarchive. with regards Paul From andrej at kacian.sk Fri Jan 13 23:06:44 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Fri, 13 Jan 2017 23:06:44 +0100 Subject: [Users] How to obtain the plugins? In-Reply-To: <20170113190237.4d8c7834@papi.home> References: <20170113173727.7848b1aa@gandalf> <20170113190237.4d8c7834@papi.home> Message-ID: <20170113230644.5ce91f17@penny> On Fri, 13 Jan 2017 19:02:37 +0100 Páder Rezső wrote: > Fri, 13 Jan 2017 17:37:27 +0000 -n > Dick Ruck írta: > > >I am using Linux Mint 18.1 Serena. I initially installed Claws using > >the software manager and successfully added the archiver plugin. > >However I could not install the spamassassin plugin. I then downloaded > >Claws 3.14.1 and complied/installed it. > >I then discovered that, although it had the spamassassin plugin, it did > >not have the archiver plugin. > >When I access the plugins page: > >(http://www.claws-mail.org/plugins.php?section=downloads) I cannot find > >any way to download the plugins, either with Firefox or Chromium. > > I think, this page is outdated a bit... > > >Are there other methods of obtaining the plugins? > > Many plugins included in the claws mail source: > http://git.claws-mail.org/?p=claws.git;a=tree;f=src/plugins > All the plugins, really. I am not aware of any plugins that are maintained outside of the main project, although it's technically possible. However, you should probably look around your distribution's package repositories, it is likely that they provide these extra plugins in a separate package, or several packages. Then there would be no need for you to maintain a self-compiled version. Regards, -- Andrej From psychonaut at nothingisreal.com Fri Jan 13 23:48:19 2017 From: psychonaut at nothingisreal.com (Tristan Miller) Date: Fri, 13 Jan 2017 23:48:19 +0100 Subject: [Users] Keyboard shortcuts not working in address book Message-ID: <20170113234819.6f76893a.psychonaut@nothingisreal.com> Dear all, I'm using Claws Mail 3.14.1. In the address book (and only in the address book), none of the control-key keyboard shortcuts listed in the pull-down menus work for me. For example, Ctrl+Return doesn't edit the selected address, Ctrl+N doesn't create a new address, and Ctrl+W doesn't close the window. Instead, the key combinations do nothing. Is anyone else experiencing this problem? Regards, Tristan -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tristan Miller Free Software developer, ferret herder, logologist https://logological.org/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From kieakl at ihug.co.nz Sat Jan 14 00:28:46 2017 From: kieakl at ihug.co.nz (kangaroo) Date: Sat, 14 Jan 2017 12:28:46 +1300 Subject: [Users] Keyboard shortcuts not working in address book In-Reply-To: <20170113234819.6f76893a.psychonaut@nothingisreal.com> References: <20170113234819.6f76893a.psychonaut@nothingisreal.com> Message-ID: <20170114122846.000041bc@ihug.co.nz> I have the same issue, those shortcuts do not work for me. Using 3.14.1-2newcairo release On Fri, 13 Jan 2017 23:48:19 +0100 Tristan Miller wrote: > Dear all, > > I'm using Claws Mail 3.14.1. In the address book (and only in the > address book), none of the control-key keyboard shortcuts listed in > the pull-down menus work for me. For example, Ctrl+Return doesn't edit > the selected address, Ctrl+N doesn't create a new address, and Ctrl+W > doesn't close the window. Instead, the key combinations do nothing. Is > anyone else experiencing this problem? > > Regards, > Tristan > From ricardo at mones.org Sat Jan 14 15:05:25 2017 From: ricardo at mones.org (Ricardo Mones) Date: Sat, 14 Jan 2017 15:05:25 +0100 Subject: [Users] How to obtain the plugins? In-Reply-To: <20170113230644.5ce91f17@penny> References: <20170113173727.7848b1aa@gandalf> <20170113190237.4d8c7834@papi.home> <20170113230644.5ce91f17@penny> Message-ID: <20170114150525.7c9659c9@busgosu> On Fri, 13 Jan 2017 23:06:44 +0100 Andrej Kacian wrote: > On Fri, 13 Jan 2017 19:02:37 +0100 > Páder Rezső wrote: […] > > Many plugins included in the claws mail source: > > http://git.claws-mail.org/?p=claws.git;a=tree;f=src/plugins > > > > All the plugins, really. I am not aware of any plugins that are > maintained outside of the main project, although it's technically > possible. If it were a dog you would be already bitten ;-) http://git.claws-mail.org/?p=claws-mail-plugin-reloader.git;a=summary And also the gnome-keyring plugin: https://bitbucket.org/mgorny/claws-mail-with-gkr/branch/gkr2 And an old one, whose features are also in notification plugin: https://github.com/grendello/claws-mail-indicator And there's some more on Holger's github (https://github.com/hb) but not sure if those count as 'maintained'… regards, -- Ricardo Mones ~ Don't take the name of root in vain. /usr/src/linux/README -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From edodd55 at gmail.com Sun Jan 15 02:58:38 2017 From: edodd55 at gmail.com (Liz) Date: Sun, 15 Jan 2017 12:58:38 +1100 Subject: [Users] New install claws-mail Message-ID: <20170115125838.26df47d1.edodd55@gmail.com> This is a new install of claws-mail for my significant other. He has used KDE for years and Kmail with Akonadi appears to be totally broken on his newly setup computer. So I thought that claws-mail should be the way to go. I can't get it to get past the start screen (for new user) The actual claws-mail version is probably what is in Debian Jessie. Running claws-mail --debug shows the problem relates to mail server certificate (this is my mail server) ** Message: Account 'XXXXX at mail.XXXXX.net': Connecting to IMAP4 server: mail.XXXXX.net:993... imap-thread.c:393:found imap 0x2c59ab0 [12:50:19] IMAP4< * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready. imap-thread.c:409:generic_cb ssl_certificate.c:260:got 173 certs in crt_list! 0x7ffd37e35358 ssl_certificate.c:429:didn't get /home/bigbaddad/.claws-mail/certs/mail.XXXXX.net.993.cert Segmentation fault at first there wasn't even a ~/claws-mail/certs/ directory, so I created one. Still I get segmentation fault. Now... Can I copy the relevant certificates from another ~/claws-mail/certs/ directory?? Liz From bleketux at gmail.com Sun Jan 15 04:43:28 2017 From: bleketux at gmail.com (M. Sulchan Darmawan) Date: Sun, 15 Jan 2017 10:43:28 +0700 Subject: [Users] mark all read recursively Message-ID: <20170115104328.030533a6@zetta> Dear all, Is it possible to mark all message as read recursively? For example, when I'm on inbox folder I'd like to mark all message in inbox and all its sub folder at once. How to do that? Thanks, Sulchan From cjk at teamcharliesangels.com Sun Jan 15 05:02:03 2017 From: cjk at teamcharliesangels.com (Charlie Kravetz) Date: Sat, 14 Jan 2017 20:02:03 -0800 Subject: [Users] mark all read recursively In-Reply-To: <20170115104328.030533a6@zetta> References: <20170115104328.030533a6@zetta> Message-ID: <20170114200150.7f93dfb0@whynot.keepingdreams.org> On Sun, 15 Jan 2017 10:43:28 +0700 "M. Sulchan Darmawan" wrote: >Dear all, > >Is it possible to mark all message as read recursively? > >For example, when I'm on inbox folder I'd like to mark all message in >inbox and all its sub folder at once. > >How to do that? > >Thanks, >Sulchan >_______________________________________________ >Users mailing list >Users at lists.claws-mail.org >http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users I do exactly that by right-clicking on the inbox, then left-clicking on "Mark all folders read recursively" about three-quarters down the column. -- Charlie Kravetz Linux Registered User Number 425914 [http://linuxcounter.net/user/425914.html] Never let anyone steal your DREAM. [http://keepingdreams.com] From charlescurley at charlescurley.com Sun Jan 15 05:13:17 2017 From: charlescurley at charlescurley.com (Charles Curley) Date: Sat, 14 Jan 2017 21:13:17 -0700 Subject: [Users] New install claws-mail In-Reply-To: <20170115125838.26df47d1.edodd55@gmail.com> References: <20170115125838.26df47d1.edodd55@gmail.com> Message-ID: <20170114211317.54a826e8@jhegaala.localdomain> On Sun, 15 Jan 2017 12:58:38 +1100 Liz wrote: > at first there wasn't even a ~/claws-mail/certs/ directory, so I > created one. > Still I get segmentation fault. You want ~/.claws-mail/certs/ Note the leading period ("dot"). ^ But doesn't Claws create all the directories it needs on first run for a user? > > Now... Can I copy the relevant certificates from another > ~/claws-mail/certs/ directory?? Try it and see. -- The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. -- U.S. Const. Amendment IV Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB From edodd55 at gmail.com Sun Jan 15 05:30:27 2017 From: edodd55 at gmail.com (Liz) Date: Sun, 15 Jan 2017 15:30:27 +1100 Subject: [Users] New install claws-mail In-Reply-To: <20170114211317.54a826e8@jhegaala.localdomain> References: <20170115125838.26df47d1.edodd55@gmail.com> <20170114211317.54a826e8@jhegaala.localdomain> Message-ID: <20170115153027.640532fa.edodd55@gmail.com> On Sat, 14 Jan 2017 21:13:17 -0700 Charles Curley wrote: > On Sun, 15 Jan 2017 12:58:38 +1100 > Liz wrote: > > > at first there wasn't even a ~/claws-mail/certs/ directory, so I > > created one. > > Still I get segmentation fault. > > You want ~/.claws-mail/certs/ Note the leading period ("dot"). > ^ > typo. ;) > But doesn't Claws create all the directories it needs on first run for > a user? Not on this occasion - but this turned out to be 3.11.1 when it started. > > > > > Now... Can I copy the relevant certificates from another > > ~/claws-mail/certs/ directory?? > > Try it and see. > I did, and I still didn't win, but after that I let the first start interactive feature create the account it wanted to make, which was of fantasy origins, but then the first start dialogue was happy... I deleted the fantasy account, and claws-mail happily connected to the local mail server. I imported the mail from kmail with a perl script from the website. Now he is busy making all his required filters. Liz From bleketux at gmail.com Sun Jan 15 08:13:06 2017 From: bleketux at gmail.com (M. Sulchan Darmawan) Date: Sun, 15 Jan 2017 14:13:06 +0700 Subject: [Users] mark all read recursively In-Reply-To: <20170114200150.7f93dfb0@whynot.keepingdreams.org> References: <20170115104328.030533a6@zetta> <20170114200150.7f93dfb0@whynot.keepingdreams.org> Message-ID: <20170115141306.2ce091c3@zetta> On Sat, 14 Jan 2017 20:02:03 -0800 Charlie Kravetz wrote: > I do exactly that by right-clicking on the inbox, then left-clicking > on "Mark all folders read recursively" about three-quarters down the > column. Sigh! I didn't realize it was there all these long... Thanks a bunch! Sulchan From ricardo at mones.org Sun Jan 15 13:30:55 2017 From: ricardo at mones.org (Ricardo Mones) Date: Sun, 15 Jan 2017 13:30:55 +0100 Subject: [Users] New install claws-mail In-Reply-To: <20170115125838.26df47d1.edodd55@gmail.com> References: <20170115125838.26df47d1.edodd55@gmail.com> Message-ID: <20170115133055.30d1f091@busgosu> On Sun, 15 Jan 2017 12:58:38 +1100 Liz wrote: > I can't get it to get past the start screen (for new user) > The actual claws-mail version is probably what is in Debian Jessie. You can get current latest version¹ from Debian backports², as root: echo 'deb http://ftp.debian.org/debian jessie-backports main' > /apt/sources.list.d/backports.list apt-get update apt-get -t jessie-backports install claws-mail regards, ¹ https://packages.debian.org/jessie-backports/claws-mail ² https://backports.debian.org/ -- Ricardo Mones ~ Physics is like sex: sure, it may give some practical results, but that's not why we do it. Richard Feynman -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From epodata at gmail.com Sun Jan 15 17:34:13 2017 From: epodata at gmail.com (Erik P. Olsen) Date: Sun, 15 Jan 2017 17:34:13 +0100 Subject: [Users] SMTP issue. Message-ID: <20170115173413.687e4569@Erik-PC.epolan.dk> I am getting lots of following messages which apparently do not affect receiving mail: Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 Does anybody know what this means? The network log has no error messages. -- Erik From claws at thewildbeast.co.uk Sun Jan 15 17:58:00 2017 From: claws at thewildbeast.co.uk (Paul) Date: Sun, 15 Jan 2017 16:58:00 +0000 Subject: [Users] SMTP issue. In-Reply-To: <20170115173413.687e4569@Erik-PC.epolan.dk> References: <20170115173413.687e4569@Erik-PC.epolan.dk> Message-ID: <20170115165800.49092e59@kujata> On Sun, 15 Jan 2017 17:34:13 +0100 "Erik P. Olsen" wrote: > I am getting lots of following messages which apparently do not > affect receiving mail: > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 > > Does anybody know what this means? The network log has no error > messages. It means that you've mis-configured your account. with regards Paul From noreply at thewildbeast.co.uk Sun Jan 15 18:21:54 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sun, 15 Jan 2017 17:21:54 +0000 Subject: [Users] [Bug 1491] add option to change sort order within threads In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=1491 Olivier Brunel changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1648|0 |1 is obsolete| | --- Comment #2 from Olivier Brunel --- Created attachment 1710 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1710&action=edit Always sort by date ASC within a thread when by thread date v2: Only when threaded (i.e. using "Thread View" mode) Also a bump: any reviews/comments on this? -- You are receiving this mail because: You are the assignee for the bug. From andrej at kacian.sk Sun Jan 15 19:13:20 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Sun, 15 Jan 2017 19:13:20 +0100 Subject: [Users] SMTP issue. In-Reply-To: <20170115173413.687e4569@Erik-PC.epolan.dk> References: <20170115173413.687e4569@Erik-PC.epolan.dk> Message-ID: <20170115191320.6a7d43e7@penny> On Sun, 15 Jan 2017 17:34:13 +0100 "Erik P. Olsen" wrote: > I am getting lots of following messages which apparently do not affect > receiving mail: > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 > > Does anybody know what this means? The network log has no error > messages. > Perhaps this might help: http://unix.stackexchange.com/questions/135009/ssmtp-cannot-open-mail25 It is nothing Claws Mail related, though. Regards, -- Andrej From jjk at jjacky.com Sun Jan 15 19:09:04 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Sun, 15 Jan 2017 19:09:04 +0100 Subject: [Users] Virtual folders Message-ID: <20170115190904.404843df@jjacky.com> Hi, First of all, let me say that I've been using claws for some time now, and I like it a lot. It's a great software, and having looked around in the source code lately, I've also liked it from the inside; Congratulations everyone, and thanks for all the great work you do on this project. As I said, I've looked in the source code, because lately I had been thinking (again) about some things, basically boiling down to either having a way to trigger custom/saved searches, or have virtual folders that would be search results. And I've ended up going with the later. I've seen some previous work in that regard, notably on the bug tracker[1] as well as a branch vfolder in the official git repo. However, neither of those "worked" for me so I've decided to start from scratch, using a plugin approach as well. (And, to be fair, I kept the name "vfolder" for it, because, well, it fits very well. :) Hopefully that's not an issue.) So after looking around the code and working on this, I find myself having a couple questions : * procmsg_msginfo_copy() doesn't copy tags, I originally assumed this was a bug and was gonna see to send a patch, but then I wondered: is this actually normal/expected behavior, or indeed a bug? * There are no callbacks for sensitivity of e.g. FolderViewPopup or toolbar buttons (for plugins), or did I miss something? * Again in the intended or a bug departement, I noticed that mh_remove_msg() doesn't check for MSG_IS_MOVE_DONE; But I'm not sure this is a bug, as in I assume that's for the same reason there's an implementation instead of making an MsgInfoList and calling mh_remove_msgs() on it: to work with the msgnum only w/out actually getting the MsgInfo. So this is on purpose/not to be fixed? * I also noticed a couple minor things, for which I'll send patches. * Lastly, but this falls under wishes I guess, I feel the toolbar options are a bit limited. For one, that for plugin actions one cannot set the text of the button; But also the number of icons available isn't great, and (unless I'm missing something) there's no way to use custom icons (e.g. select an external file, like one of the many pngs found in /usr/share/icons)? And back on virtual folders, I'll also send the patch of course. I've been using it for a little while and it seems to work fine, at least over here. :) I should mention that I don't have hundreds of thousands of mails, and also use pretty much only MH mailboxes, so I'm not sure what it'll be like on (very) large (IMAP) mailboxes, hopefully not awful. I'm not sure what's the rule when it comes to merging new plugins, but as that was easiest (for me) the patch simply adds it to the src/plugins folder and updates configure/Makefile accordingly. Cheers, [1] http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2250 From jjk at jjacky.com Sun Jan 15 19:14:19 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Sun, 15 Jan 2017 19:14:19 +0100 Subject: [Users] [PATCH 2/4] prefs_filtering: Add missing shadow on the list In-Reply-To: <20170115181421.7816-1-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> Message-ID: <20170115181421.7816-2-jjk@jjacky.com> Looks better. Also more consistent, since such shadow is used on about every other window (conditions, actions...) Signed-off-by: Olivier Brunel --- src/prefs_filtering.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c index ea2d195a1..3a57c24a9 100644 --- a/src/prefs_filtering.c +++ b/src/prefs_filtering.c @@ -508,6 +508,8 @@ static void prefs_filtering_create(void) cond_scrolledwin = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (cond_scrolledwin); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(cond_scrolledwin), + GTK_SHADOW_ETCHED_IN); gtk_widget_set_size_request (cond_scrolledwin, -1, 150); gtk_box_pack_start (GTK_BOX (cond_hbox), cond_scrolledwin, TRUE, TRUE, 0); -- 2.11.0 From jjk at jjacky.com Sun Jan 15 19:14:20 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Sun, 15 Jan 2017 19:14:20 +0100 Subject: [Users] [PATCH 3/4] plugins/notification: Update more tray's items sensitivity In-Reply-To: <20170115181421.7816-1-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> Message-ID: <20170115181421.7816-3-jjk@jjacky.com> Only the "Get Mail" menu item of the tray's popup was disabled when Claws is locked, but the per-account get mail & Exit also should be. Signed-off-by: Olivier Brunel --- src/plugins/notification/notification_trayicon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/notification/notification_trayicon.c b/src/plugins/notification/notification_trayicon.c index 720183722..fff19e72d 100644 --- a/src/plugins/notification/notification_trayicon.c +++ b/src/plugins/notification/notification_trayicon.c @@ -469,6 +469,8 @@ static void notification_trayicon_on_popup_menu(GtkStatusIcon *status_icon, cm_toggle_menu_set_active("SysTrayiconPopup/ShowBubbles", notify_config.trayicon_popup_enabled); #endif cm_menu_set_sensitive("SysTrayiconPopup/GetMail", mainwin->lock_count == 0); + cm_menu_set_sensitive("SysTrayiconPopup/GetMailAcc", mainwin->lock_count == 0); + cm_menu_set_sensitive("SysTrayiconPopup/Exit", mainwin->lock_count == 0); updating_menu = FALSE; -- 2.11.0 From jjk at jjacky.com Sun Jan 15 19:14:18 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Sun, 15 Jan 2017 19:14:18 +0100 Subject: [Users] [PATCH 1/4] summaryview: Minor fix In-Reply-To: <20170115190904.404843df@jjacky.com> References: <20170115190904.404843df@jjacky.com> Message-ID: <20170115181421.7816-1-jjk@jjacky.com> Update current folder name only if the renamed folder is the current one Signed-off-by: Olivier Brunel --- src/summaryview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/summaryview.c b/src/summaryview.c index ff511add1..9d88202a0 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -8082,7 +8082,8 @@ static gboolean summary_update_folder_item_hook(gpointer source, gpointer data) cm_return_val_if_fail(hookdata->item != NULL, FALSE); cm_return_val_if_fail(summaryview != NULL, FALSE); - if (hookdata->update_flags & F_ITEM_UPDATE_NAME) { + if (hookdata->item == summaryview->folder_item + && hookdata->update_flags & F_ITEM_UPDATE_NAME) { gchar *name = folder_item_get_name(hookdata->item); gtk_label_set_text(GTK_LABEL(summaryview->statlabel_folder), name); g_free(name); -- 2.11.0 From jjk at jjacky.com Sun Jan 15 19:14:21 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Sun, 15 Jan 2017 19:14:21 +0100 Subject: [Users] [PATCH 4/4] Add vfolder plugin In-Reply-To: <20170115181421.7816-1-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> Message-ID: <20170115181421.7816-4-jjk@jjacky.com> This adds support for "Virtual folders" aka folders that show search results. Unlike elsewhere in Claws, such folders can include messages from different folders. In fact, they can show combined results of multiple searches (useful to do same search in multiple (non related, i.e. can't be done simply via recursive search) folders). What is done to "virtual messages" is relayed to the source ones: flags, tags, etc (Re)moving such messages will also be done on the source ones, obviously. Searches are set under a folder's properties, new page "Content" Some general options are also available under Preferences/Plugins/VFolder, to add some VFolder-version of known features: - Move to trash: so that it is applied as if from the source folder, so messages are moved to their respective correct trashes. - Reply: so that used folder properties are of the source folders (and not the virtual one) A new menu "Find in source folder" will also be available from virtual folders. Lastly, a 'search results' feature is provided, which is really just a quick way to edit the "Content" properties of a given virtual folder and go there. So it does feel somewhat like a "classic" search feature. Signed-off-by: Olivier Brunel --- configure.ac | 15 + src/plugins/Makefile.am | 3 +- src/plugins/vfolder/Makefile.am | 37 + src/plugins/vfolder/plugin.c | 158 ++++ src/plugins/vfolder/plugin.h | 52 ++ src/plugins/vfolder/plugin_gtk.c | 879 +++++++++++++++++++ src/plugins/vfolder/plugin_gtk.h | 31 + src/plugins/vfolder/vfolder.c | 1370 ++++++++++++++++++++++++++++++ src/plugins/vfolder/vfolder.h | 59 ++ src/plugins/vfolder/vfolder_item_prefs.c | 1101 ++++++++++++++++++++++++ src/plugins/vfolder/vfolder_item_prefs.h | 33 + src/plugins/vfolder/vfolder_prefs.c | 223 +++++ src/plugins/vfolder/vfolder_prefs.h | 29 + 13 files changed, 3989 insertions(+), 1 deletion(-) create mode 100644 src/plugins/vfolder/Makefile.am create mode 100644 src/plugins/vfolder/plugin.c create mode 100644 src/plugins/vfolder/plugin.h create mode 100644 src/plugins/vfolder/plugin_gtk.c create mode 100644 src/plugins/vfolder/plugin_gtk.h create mode 100644 src/plugins/vfolder/vfolder.c create mode 100644 src/plugins/vfolder/vfolder.h create mode 100644 src/plugins/vfolder/vfolder_item_prefs.c create mode 100644 src/plugins/vfolder/vfolder_item_prefs.h create mode 100644 src/plugins/vfolder/vfolder_prefs.c create mode 100644 src/plugins/vfolder/vfolder_prefs.h diff --git a/configure.ac b/configure.ac index 9e031c81f..38240591f 100644 --- a/configure.ac +++ b/configure.ac @@ -1068,6 +1068,10 @@ AC_ARG_ENABLE(vcalendar-plugin, [ --disable-vcalendar-plugin Do not build vcalendar plugin], [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto]) +AC_ARG_ENABLE(vfolder-plugin, + [ --disable-vfolder-plugin Do not build vfolder plugin], + [enable_vfolder_plugin=$enableval], [enable_vfolder_plugin=auto]) + dnl disabled by default AC_ARG_ENABLE(demo-plugin, [ --enable-demo-plugin Build demo plugin], @@ -1849,6 +1853,15 @@ else AC_MSG_RESULT(no) fi +AC_MSG_CHECKING([whether to build vfolder plugin]) +if test x"$enable_vfolder_plugin" != xno; then + PLUGINS="$PLUGINS vfolder" + AC_MSG_RESULT(yes) +else + DISABLED_PLUGINS="$DISABLED_PLUGINS vfolder" + AC_MSG_RESULT(no) +fi + dnl And finally the automake conditionals. AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno) @@ -1881,6 +1894,7 @@ AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" != AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno) AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno) AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno) +AM_CONDITIONAL(BUILD_VFOLDER_PLUGIN, test x"$enable_vfolder_plugin" != xno) dnl **************************** @@ -1937,6 +1951,7 @@ src/plugins/vcalendar/libical/libical/icalversion.h src/plugins/vcalendar/libical/libical/Makefile src/plugins/vcalendar/libical/design-data/Makefile src/plugins/vcalendar/libical/scripts/Makefile +src/plugins/vfolder/Makefile doc/Makefile doc/man/Makefile tools/Makefile diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index 6acc1fb36..e42d066e8 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -32,4 +32,5 @@ SUBDIRS = \ spamassassin \ spam_report \ tnef_parse \ - vcalendar + vcalendar \ + vfolder diff --git a/src/plugins/vfolder/Makefile.am b/src/plugins/vfolder/Makefile.am new file mode 100644 index 000000000..67f01a8c3 --- /dev/null +++ b/src/plugins/vfolder/Makefile.am @@ -0,0 +1,37 @@ +# Copyright 1999-2014 the Claws Mail team. +# This file is part of Claws Mail package, and distributed under the +# terms of the General Public License version 3 (or later). +# See COPYING file for license details. + +plugindir = $(pkglibdir)/plugins + +if BUILD_VFOLDER_PLUGIN +plugin_LTLIBRARIES = vfolder.la +endif + +vfolder_la_SOURCES = \ + plugin.c plugin.h \ + vfolder.c vfolder.h \ + vfolder_item_prefs.c vfolder_item_prefs.h \ + vfolder_prefs.c vfolder_prefs.h \ + plugin_gtk.c plugin_gtk.h + +vfolder_la_LDFLAGS = \ + -avoid-version -module + +if CYGWIN +cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail +else +cygwin_export_lib = +endif + +vfolder_la_LIBADD = $(cygwin_export_lib) \ + $(GTK_LIBS) + +vfolder_la_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) diff --git a/src/plugins/vfolder/plugin.c b/src/plugins/vfolder/plugin.c new file mode 100644 index 000000000..beb90bdd9 --- /dev/null +++ b/src/plugins/vfolder/plugin.c @@ -0,0 +1,158 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + + +#include "version.h" +#include "claws.h" +#include "plugin.h" +#include "utils.h" +#include "hooks.h" +#include "main.h" +#include "common/plugin.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_gtk.h" + +#include "vfolder.h" +#include "plugin_gtk.h" + + +static VFolderConfig vconfig; +static PrefParam param[] = +{ + { "add_trash", "TRUE", &vconfig.add_trash, P_BOOL, + NULL, NULL, NULL }, + { "hide_trash_org", "TRUE", &vconfig.hide_trash_org, P_BOOL, + NULL, NULL, NULL }, + + { "add_reply", "TRUE", &vconfig.add_reply, P_BOOL, + NULL, NULL, NULL }, + { "hide_reply_org", "FALSE", &vconfig.hide_reply_org, P_BOOL, + NULL, NULL, NULL }, + + { "enable_search", "FALSE", &vconfig.enable_search, P_BOOL, + NULL, NULL, NULL }, + { "id_search_folder", "", &vconfig.id_search_folder, P_STRING, + NULL, NULL, NULL }, + + { NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL } +}; + +VFolderConfig *vfolder_get_config(void) +{ + return &vconfig; +} + +gboolean vfolder_save_config(void) +{ + PrefFile *pfile; + gchar *file; + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); + pfile = prefs_write_open(file); + g_free(file); + + if (!pfile) + return FALSE; + if (prefs_set_block_label(pfile, "VFolder") < 0) + return FALSE; + + if (prefs_write_param(param, pfile->fp) < 0) + { + g_warning("Failed to write VFolder configuration to file"); + prefs_file_close_revert(pfile); + return FALSE; + } + + if (prefs_file_close(pfile) < 0) + { + g_warning("Failed to write configuration to file"); + return FALSE; + } + + return TRUE; +} + +gint plugin_init(gchar **error) +{ + gchar *file; + gint r; + + r = check_plugin_version(MAKE_NUMERIC_VERSION(3,8,1,46), + VERSION_NUMERIC, PLUGIN_NAME, error); + if (r < 0) + return r; + + folder_register_class(vfolder_get_class()); + + prefs_set_default(param); + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); + prefs_read_config(param, "VFolder", file, NULL); + g_free(file); + + r = vfolder_gtk_init(error); + if (r < 0) + return r; + + return 0; +} + +gboolean plugin_done(void) +{ + vfolder_gtk_done(); + if (!claws_is_exiting()) + folder_unregister_class(vfolder_get_class()); + return TRUE; +} + +const gchar *plugin_name(void) +{ + return PLUGIN_NAME; +} + +const gchar *plugin_desc(void) +{ + return _("This Plugin adds virtual folders."); +} + +const gchar *plugin_type(void) +{ + return "GTK2"; +} + +const gchar *plugin_licence(void) +{ + return "GPL3+"; +} + +const gchar *plugin_version(void) +{ + return VERSION; +} + +struct PluginFeature *plugin_provides(void) +{ + static struct PluginFeature features[] = { + { PLUGIN_FOLDERCLASS, N_("VFolder") }, + { PLUGIN_NOTHING, NULL } + }; + return features; +} diff --git a/src/plugins/vfolder/plugin.h b/src/plugins/vfolder/plugin.h new file mode 100644 index 000000000..9ef20708d --- /dev/null +++ b/src/plugins/vfolder/plugin.h @@ -0,0 +1,52 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PLUGIN_H__ +#define __VFOLDER_PLUGIN_H__ + +#include + +#define PLUGIN_NAME (_("VFolder")) + +#if 0 +#define dbg(...) g_printf(__VA_ARGS__) +#else +#define dbg(...) debug_print(__VA_ARGS__) +#endif + +#include "vfolder.h" + +typedef struct _VFolderConfig VFolderConfig; + + +struct _VFolderConfig +{ + gboolean add_reply; + gboolean hide_reply_org; + + gboolean add_trash; + gboolean hide_trash_org; + + gboolean enable_search; + gchar *id_search_folder; +}; + +VFolderConfig *vfolder_get_config(void); +gboolean vfolder_save_config(void); + +#endif /* __VFOLDER_PLUGIN_H__ */ diff --git a/src/plugins/vfolder/plugin_gtk.c b/src/plugins/vfolder/plugin_gtk.c new file mode 100644 index 000000000..7c28d2581 --- /dev/null +++ b/src/plugins/vfolder/plugin_gtk.c @@ -0,0 +1,879 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include + +#include "plugin.h" +#include "folder.h" +#include "mainwindow.h" +#include "folderview.h" +#include "inputdialog.h" +#include "foldersel.h" +#include "alertpanel.h" +#include "main.h" +#include "menu.h" +#include "account.h" +#include "prefs_actions.h" +#include "summaryview.h" +#include "folder_item_prefs.h" +#include "toolbar.h" +#include "prefs_toolbar.h" +#include "manage_window.h" + + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_item_prefs.h" +#include "vfolder_prefs.h" + + +static void add_mailbox(GtkAction *action, gpointer data); +static void refresh_content(GtkAction *action, gpointer data); +static void remove_mailbox(GtkAction *action, gpointer data); +static void new_folder(GtkAction *action, gpointer data); +static void rename_folder(GtkAction *action, gpointer data); +static void move_folder(GtkAction *action, gpointer data); +static void delete_folder(GtkAction *action, gpointer data); +static void move_to_trash(GtkAction *action, gpointer data); +static void move_thread_to_trash(GtkAction *action, gpointer data); +static void find_in_src_folder(GtkAction *action, gpointer data); +static void reply(GtkAction *action, gpointer data); +static void search(GtkAction *action, gpointer data); + + +static GtkActionEntry mainwindow_actions[] = { + { "File/AddMailbox/VFolder", NULL, "VFolder...", + NULL, NULL, G_CALLBACK(add_mailbox) }, + { "Message/TrashVF", NULL, N_("Move to _trash [VFolder]"), + NULL, NULL, G_CALLBACK(move_to_trash) }, + { "Message/TrashThreadVF", NULL, N_("Move thread to tr_ash [VFolder]"), + NULL, NULL, G_CALLBACK(move_thread_to_trash) }, + { "Message/FindInSrcFolder", NULL, N_("Find in source folder [VFolder]"), + NULL, NULL, G_CALLBACK(find_in_src_folder) }, + { "Message/ReplyVF", NULL, N_("_Reply [VFolder]"), + NULL, NULL, G_CALLBACK(reply) }, + { "Edit/SearchVF", NULL, N_("_Search... [VFolder]"), + NULL, NULL, G_CALLBACK(search) } +}; + +static GtkActionEntry vfolder_popup_entries[] = { + { "FolderViewPopup/CreateNewFolder", NULL, N_("Create _new folder..."), + NULL, NULL, G_CALLBACK(new_folder) }, + { "FolderViewPopup/RenameFolder", NULL, N_("_Rename folder..."), + NULL, NULL, G_CALLBACK(rename_folder) }, + { "FolderViewPopup/MoveFolder", NULL, N_("M_ove folder..."), + NULL, NULL, G_CALLBACK(move_folder) }, + { "FolderViewPopup/DeleteFolder", NULL, N_("_Delete folder..."), + NULL, NULL, G_CALLBACK(delete_folder) }, + { "FolderViewPopup/RefreshContent", NULL, N_("Re_fresh content"), + NULL, NULL, G_CALLBACK(refresh_content) }, + { "FolderViewPopup/RemoveMailbox", NULL, N_("Remove _mailbox..."), + NULL, NULL, G_CALLBACK(remove_mailbox) } +}; +static void add_menuitems(GtkUIManager *ui_mngr, FolderItem *item); +static void set_sensitivity(GtkUIManager *ui_mngr, FolderItem *item); +static FolderViewPopup vfolder_popup = { + "vfolder", "", + vfolder_popup_entries, G_N_ELEMENTS(vfolder_popup_entries), + NULL, 0, + NULL, 0, 0, NULL, + add_menuitems, + set_sensitivity +}; + + +static guint id_add_mailbox = 0; +static guint id_move_to_trash = 0; +static guint id_move_to_trash_popup = 0; +static guint id_move_thread_to_trash = 0; +static guint id_reply = 0; +static guint id_reply_popup = 0; +static guint id_find_in_src_folder = 0; +static guint id_find_in_src_folder_popup = 0; +static guint id_search = 0; + +gint vfolder_gtk_init(gchar **error) +{ + MainWindow *mainwin = mainwindow_get_mainwindow(); + + gtk_action_group_add_actions(mainwin->action_group, mainwindow_actions, + G_N_ELEMENTS(mainwindow_actions), (gpointer)mainwin); + + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/File/AddMailbox", + "AddVF", "File/AddMailbox/VFolder", + GTK_UI_MANAGER_MENUITEM, + id_add_mailbox); + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/View/Goto/ParentMessage", + "FindInSrcFolder", "Message/FindInSrcFolder", + GTK_UI_MANAGER_MENUITEM, + id_find_in_src_folder); + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup/Separator5", + "FindInSrcFolder", "Message/FindInSrcFolder", + GTK_UI_MANAGER_MENUITEM, + id_find_in_src_folder_popup); + + vfolder_gtk_set_menus(FALSE); + + folderview_register_popup(&vfolder_popup); + + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", FALSE); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", FALSE); + + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Trash"), + (ToolbarPluginCallback) move_to_trash, NULL); + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Reply"), + (ToolbarPluginCallback) reply, NULL); + + + vfolder_prefs_register(); + vfolder_item_prefs_register(); + + return 0; +} + +void vfolder_gtk_done(void) +{ + MainWindow *mainwin = mainwindow_get_mainwindow(); + + if (mainwin == NULL || claws_is_exiting()) + return; + + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "File/AddMailbox/VFolder", id_add_mailbox); + id_add_mailbox = 0; + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "Message/FindInSrcFolder", id_find_in_src_folder); + id_find_in_src_folder = 0; + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "Message/FindInSrcFolder", id_find_in_src_folder_popup); + id_find_in_src_folder_popup = 0; + + vfolder_gtk_set_menus(TRUE); + + folderview_unregister_popup(&vfolder_popup); + + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Trash")); + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Reply")); + + + vfolder_prefs_unregister(); + vfolder_item_prefs_unregister(); +} + +void vfolder_gtk_set_menus(gboolean unloading) +{ + VFolderConfig *vconfig = vfolder_get_config(); + MainWindow *mainwin = mainwindow_get_mainwindow(); + + if (!unloading && vconfig->add_trash) + { + if (id_move_to_trash == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/Trash", + "TrashVF", "Message/TrashVF", + GTK_UI_MANAGER_MENUITEM, + id_move_to_trash); + } + if (id_move_thread_to_trash == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/TrashThread", + "TrashThreadVF", "Message/TrashThreadVF", + GTK_UI_MANAGER_MENUITEM, + id_move_thread_to_trash); + } + if (id_move_to_trash_popup == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menus/SummaryViewPopup/Trash", + "TrashVF", "Message/TrashVF", + GTK_UI_MANAGER_MENUITEM, + id_move_to_trash_popup); + } + } + else + { + if (id_move_to_trash > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/TrashVF", + id_move_to_trash); + id_move_to_trash = 0; + } + if (id_move_to_trash_popup > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menus/SummaryViewPopup/TrashVF", + id_move_to_trash_popup); + id_move_to_trash_popup = 0; + } + if (id_move_thread_to_trash > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/TrashThreadVF", + id_move_thread_to_trash); + id_move_thread_to_trash = 0; + } + } + vfolder_gtk_set_visible("/Menu/Message/Trash", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + vfolder_gtk_set_visible("/Menu/Message/TrashThread", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/Trash", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + + if (!unloading && vconfig->add_reply) + { + if (id_reply == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/Reply", + "ReplyVF", "Message/ReplyVF", + GTK_UI_MANAGER_MENUITEM, + id_reply); + } + if (id_reply_popup == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menus/SummaryViewPopup/Reply", + "ReplyVF", "Message/ReplyVF", + GTK_UI_MANAGER_MENUITEM, + id_reply_popup); + } + } + else + { + if (id_reply > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/ReplyVF", id_reply); + id_reply = 0; + } + if (id_reply_popup > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menus/SummaryViewPopup/ReplyVF", id_reply_popup); + id_reply_popup = 0; + } + } + vfolder_gtk_set_visible("/Menu/Message/Reply", + unloading || !vconfig->add_reply || !vconfig->hide_reply_org); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/Reply", + unloading || !vconfig->add_reply || !vconfig->hide_reply_org); + + if (!unloading && vconfig->enable_search) + { + if (id_search == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/Edit", + "SearchVF", "Edit/SearchVF", + GTK_UI_MANAGER_MENUITEM, + id_search); + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, + _("Search"), (ToolbarPluginCallback) search, NULL); + } + } + else + { + if (id_search > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Edit/SearchVF", id_search); + id_search = 0; + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, + _("Search")); + } + } +} + +void vfolder_gtk_set_visible(const gchar *path, gboolean visible) +{ + GtkWidget *w; + + w = gtk_ui_manager_get_widget(mainwindow_get_mainwindow()->ui_manager, path); + if (!w) + return; + gtk_widget_set_visible(w, visible); +} + +void vfolder_gtk_set_sensitive(const gchar *path, gboolean sensitive) +{ + GtkWidget *w; + + w = gtk_ui_manager_get_widget(mainwindow_get_mainwindow()->ui_manager, path); + if (!w) + return; + gtk_widget_set_sensitive(w, sensitive); +} + +static void add_menuitems(GtkUIManager *ui_mngr, FolderItem *item) +{ + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "CreateNewFolder", + "FolderViewPopup/CreateNewFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator1", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RenameFolder", + "FolderViewPopup/RenameFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "MoveFolder", + "FolderViewPopup/MoveFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator2", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "DeleteFolder", + "FolderViewPopup/DeleteFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator3", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RefreshContent", + "FolderViewPopup/RefreshContent", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator4", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RemoveMailbox", + "FolderViewPopup/RemoveMailbox", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator5", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); +} + +static void set_sensitivity(GtkUIManager *ui_mngr, FolderItem *item) +{ + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/CreateNewFolder", TRUE); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RenameFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/MoveFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/DeleteFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RefreshContent", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RemoveMailbox", folder_item_parent(item) == NULL); +} + +/* for vfolder.c */ +gchar *vfolder_gtk_get_current_msgid(void) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + MsgInfo *mi = summary_get_selected_msg(sv); + + if (!mi) + return NULL; + + return g_strdup(mi->msgid); +} + +static guint id_refresh_summary = 0; +static gint new_msgnum = 0; +static gboolean refresh_summary(gpointer data) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + FolderItem *item = data; + dbg("refresh_summary lock=%d %d\n",summary_is_locked(sv), item->opened); + + if (summary_is_locked(sv)) + return TRUE; + if (item->opened) + { + summary_show(sv, item); + if (new_msgnum > 0) + summary_select_by_msgnum(sv, new_msgnum); + } + id_refresh_summary = 0; + new_msgnum = 0; + + return FALSE; +} +/* for vfolder.c */ +void vfolder_gtk_refresh_summary(FolderItem *item, gint msgnum) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + dbg("vfolder_gtk_refresh_summary lock=%d %d\n",summary_is_locked(sv), item->opened); + if (!item->opened) + return; + new_msgnum = msgnum; + if (summary_is_locked(sv)) + { + if (id_refresh_summary == 0) + id_refresh_summary = g_timeout_add(10, refresh_summary, item); + } + else + refresh_summary(item); +} + +static void add_mailbox(GtkAction *action, gpointer data) +{ + MainWindow *mainwin = (MainWindow *) data; + gchar *name; + FolderClass *klass; + Folder *folder; + + name = input_dialog(_("Add mailbox"), _("Input name of the mailbox"), "Virtual"); + if (!name) + return; + + klass = folder_get_class_from_string("vfolder"); + if (folder_find_from_name(name, klass)) + { + alertpanel_error(_("Virtual mailbox '%s' already exists."), name); + g_free(name); + return; + } + + folder = folder_new(klass, name, NULL); + g_free(name); + + folder_add(folder); + folderview_set(mainwin->folderview); + + return; +} + +static void refresh_content(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + vfolder_refresh_content((VFolderItem *) item); +} + +static void remove_mailbox(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + AlertValue av; + gchar *s; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + s = g_strdup_printf(_("Really remove the mailbox '%s'?\n" + "(The messages are NOT deleted from the disk)"), + item->name); + av = alertpanel_full(_("Remove mailbox"), s, + GTK_STOCK_CANCEL, _("_Remove"), NULL, FALSE, + NULL, ALERT_WARNING, G_ALERTDEFAULT); + g_free(s); + if (av != G_ALERTALTERNATE) + return; + + folderview_unselect(fv); + summary_clear_all(fv->summaryview); + + folder_destroy(item->folder); +} + +static void new_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item, *new_item; + gchar *name; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + name = input_dialog(_("New folder"), _("Input name of new folder"), _("NewFolder")); + if (!name) + return; + AUTORELEASE_STR(name, { g_free(name); return; }); + + if (folder_find_child_item_by_name(item, name)) + { + alertpanel_error(_("Virtual folder '%s' already exists in '%s'."), + name, item->name); + return; + } + + new_item = folder_create_folder(item, name); + if (!new_item) + { + alertpanel_error(_("Can't create the folder '%s'."), name); + return; + } + + folder_write_list(); +} + +static void rename_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + gchar *s, *name; + gchar *oldid, *newid; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + s = g_strdup_printf(_("Input new name for '%s':"), item->name); + name = input_dialog(_("Rename folder"), s, item->name); + g_free(s); + if (!name) + return; + AUTORELEASE_STR(name, { g_free(name); return; }); + + { + FolderItem *parent = folder_item_parent(item); + + if (parent && folder_find_child_item_by_name(parent, name)) + { + alertpanel_error(_("Virtual folder '%s' already exists in '%s'."), + name, parent->name); + return; + } + } + + oldid = folder_item_get_identifier(item); + + if (folder_item_rename(item, name) < 0) + { + alertpanel_error(_("The folder could not be renamed.")); + g_free(oldid); + return; + } + + newid = folder_item_get_identifier(item); + prefs_filtering_rename_path(oldid, newid); + account_rename_path(oldid, newid); + prefs_actions_rename_path(oldid, newid); + + g_free(oldid); + g_free(newid); + + folder_item_prefs_save_config_recursive(item); + folder_write_list(); +} + +static void move_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *from_folder, *to_folder; + + from_folder = folderview_get_selected_item(fv); + if (!from_folder || from_folder->folder->klass != vfolder_get_class()) + return; + + to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE); + if (!to_folder) + return; + + folderview_move_folder(fv, from_folder, to_folder, 0); +} + +static void delete_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item, *opened; + AlertValue av; + gchar *s; + gchar *oldid; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + opened = folderview_get_opened_item(fv); + + s = g_strdup_printf(_("Do you really want to delete '%s'?"), item->name); + av = alertpanel_full(_("Delete folder"), s, + GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE, + NULL, ALERT_NOTICE, G_ALERTDEFAULT); + g_free(s); + if (av != G_ALERTALTERNATE) + return; + + if (item == opened || + folder_is_child_of(item, opened)) + { + summary_clear_all(fv->summaryview); + folderview_close_opened(fv, TRUE); + } + + oldid = folder_item_get_identifier(item); + + if (item->folder->klass->remove_folder(item->folder, item) < 0) + { + alertpanel_error(_("Can't remove the folder '%s'."), item->name); + if (item == opened) + summary_show(fv->summaryview, fv->summaryview->folder_item); + g_free(oldid); + return; + } + + folder_write_list(); + + prefs_filtering_delete_path(oldid); + g_free(oldid); +} + +static void move_to_trash_perfolder(MsgInfoList *msglist, gpointer data) +{ + GSList **to_delete = (GSList **) data; + MsgInfo *mi = (MsgInfo *) msglist->data; + PrefsAccount *ac; + FolderItem *item = mi->folder; + FolderItem *to_folder = NULL; + + vfolder_get_src_folder_msgnum(mi, &item, NULL); + + ac = account_find_from_item(item); + if (ac) + to_folder = account_get_special_folder(ac, F_TRASH); + if (!to_folder) + to_folder = item->folder->trash; + + if (!to_folder || to_folder == item || + folder_has_parent_of_type(item, F_TRASH)) + { + if (*to_delete) + g_slist_last(*to_delete)->next = g_slist_copy(msglist); + else + *to_delete = g_slist_copy(msglist); + } + else + { + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + + summary_unselect_all(sv); + summary_select_by_msg_list(sv, msglist); + summary_move_selected_to(sv, to_folder); + } +} + +static void move_to_trash(GtkAction *action, gpointer data) +{ + SummaryView *sv; + GSList *msglist; + GSList *to_delete = NULL; + + sv = mainwindow_get_mainwindow()->summaryview; + if (summary_is_locked(sv)) + return; + + msglist = summary_get_selected_msg_list(sv); + if (!msglist) + return; + + folder_item_update_freeze(); + + vfolder_workon_msginfo_perfolder(msglist, TRUE, + move_to_trash_perfolder, &to_delete); + + if (to_delete) + { + summary_unselect_all(sv); + summary_select_by_msg_list(sv, to_delete); + summary_delete(sv); + g_slist_free(to_delete); + } + + folder_item_update_thaw(); +} + +static void move_thread_to_trash(GtkAction *action, gpointer data) +{ + summary_select_thread(mainwindow_get_mainwindow()->summaryview, FALSE, FALSE); + move_to_trash(NULL, NULL); +} + +static void find_in_src_folder(GtkAction *action, gpointer data) +{ + SummaryView *sv; + MsgInfo *mi; + FolderItem *item; + gint num; + + sv = mainwindow_get_mainwindow()->summaryview; + mi = summary_get_selected_msg(sv); + + if (summary_is_locked(sv) || !mi) + return; + + if (vfolder_get_src_folder_msgnum(mi, &item, &num) < 0) + return; + + folderview_select(sv->mainwin->folderview, item); + summary_select_by_msgnum(sv, num); +} + +/* from vfolder.c */ +void _free_msglist_data(gpointer data); + +static void reply(GtkAction *action, gpointer data) +{ + SummaryView *sv; + GSList *msglist; + GSList *msglist_src = NULL; + GSList *prev, *cur; + + sv = mainwindow_get_mainwindow()->summaryview; + if (summary_is_locked(sv)) + return; + + msglist = summary_get_selected_msg_list(sv); + if (!msglist) + return; + + for (prev = NULL, cur = msglist; !!cur; ) + { + MsgInfo *mi = (MsgInfo *) cur->data; + MsgInfo *mi_src; + gint r; + + r = vfolder_get_src_msginfo(mi, &mi_src); + if (r == VFOLDER_ERR_NOT_VIRTUAL) + { + prev = cur; + cur = cur->next; + } + else + { + if (r == 0) + msglist_src = g_slist_prepend(msglist_src, mi_src); + + if (prev) + prev->next = cur->next; + else + msglist = cur->next; + + cur->next = NULL; + g_slist_free(cur); + + cur = (prev) ? prev->next : msglist; + } + } + + if (msglist) + { + compose_reply_from_messageview(sv->messageview, msglist, COMPOSE_REPLY); + g_slist_free(msglist); + } + + if (msglist_src) + { + compose_reply_from_messageview(sv->messageview, msglist_src, COMPOSE_REPLY); + g_slist_free_full(msglist_src, _free_msglist_data); + } +} + +/* from vfolder_item_prefs.c */ +void _vfolder_search_create(VFolderItem *vitem, GtkWindow *window, GtkContainer *box); +void _vfolder_search_save(void); + +static void run_search(GtkWidget *window) +{ + FolderView *fv = mainwindow_get_mainwindow()->folderview; + FolderItem *item = g_object_get_data(G_OBJECT(window), "_vf_item"); + + _vfolder_search_save(); + gtk_widget_destroy(window); + folderview_select(fv, item); +} + +static gboolean key_pressed(GtkWidget *w, GdkEventKey *event, GtkWidget *window) +{ + if (event && event->keyval == GDK_KEY_Escape) + gtk_widget_destroy(window); + return FALSE; +} + +static void search(GtkAction *action, gpointer data) +{ + VFolderConfig *vconfig = vfolder_get_config(); + GdkGeometry geometry = { .min_width = 500, .min_height = 460 }; + GtkWidget *window; + GtkWidget *box; + GtkWidget *btn_ok; + GtkWidget *btn_cancel; + GtkWidget *w; + FolderItem *item; + + if (!vconfig->enable_search) + { + alertpanel_error(_("You need to enable 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + if (!vconfig->id_search_folder) + { + alertpanel_error(_("You need to configure 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + item = folder_find_item_from_identifier(vconfig->id_search_folder); + if (!item || item->folder->klass != vfolder_get_class()) + { + alertpanel_error(_("Configuration error: Check the configuration " + "of the 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + + window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "search"); + gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW (window), TRUE); + gtk_window_set_title (GTK_WINDOW(window), _("Search... [VFolder]")); + gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry, + GDK_HINT_MIN_SIZE); + MANAGE_WINDOW_SIGNALS_CONNECT (window); + manage_window_set_transient(GTK_WINDOW(window)); + + box = gtk_vbox_new (FALSE, 4); + gtk_widget_show (box); + gtk_container_set_border_width(GTK_CONTAINER (box), 2); + gtk_container_add(GTK_CONTAINER(window), box); + + _vfolder_search_create((VFolderItem *) item, GTK_WINDOW(window), GTK_CONTAINER(box)); + + gtkut_stock_button_set_create(&w, + &btn_cancel, GTK_STOCK_CANCEL, + &btn_ok, GTK_STOCK_FIND, + NULL, NULL); + gtk_box_pack_end (GTK_BOX(box), w, FALSE, FALSE, 0); + gtk_widget_grab_default (btn_ok); + gtk_widget_grab_focus (btn_ok); + + g_signal_connect(G_OBJECT(window), "key_press_event", + G_CALLBACK(key_pressed), window); + g_signal_connect_swapped(G_OBJECT(btn_cancel), "clicked", + G_CALLBACK(gtk_widget_destroy), window); + g_signal_connect_swapped(G_OBJECT(btn_ok), "clicked", + G_CALLBACK(run_search), window); + g_object_set_data(G_OBJECT(window), "_vf_item", item); + + gtk_widget_show_all(window); + gtk_window_set_modal(GTK_WINDOW(window), TRUE); +} diff --git a/src/plugins/vfolder/plugin_gtk.h b/src/plugins/vfolder/plugin_gtk.h new file mode 100644 index 000000000..260f67ed9 --- /dev/null +++ b/src/plugins/vfolder/plugin_gtk.h @@ -0,0 +1,31 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PLUGIN_GTK_H__ +#define __VFOLDER_PLUGIN_GTK_H__ + +#include + +gint vfolder_gtk_init(gchar **error); +void vfolder_gtk_done(void); +void vfolder_gtk_set_menus(gboolean unloading); + +void vfolder_gtk_set_visible(const gchar *path, gboolean visible); +void vfolder_gtk_set_sensitive(const gchar *path, gboolean sensitive); + +#endif /* __VFOLDER_PLUGIN_GTK_H__ */ diff --git a/src/plugins/vfolder/vfolder.c b/src/plugins/vfolder/vfolder.c new file mode 100644 index 000000000..460db231c --- /dev/null +++ b/src/plugins/vfolder/vfolder.c @@ -0,0 +1,1370 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "defs.h" + +#include +#include + +#include "folder.h" +#include "procmsg.h" +#include "statusbar.h" +#include "utils.h" +#include "gtkutils.h" +#include "advsearch.h" +#include "common/prefs.h" +#include "common/hooks.h" +#include "msgcache.h" + + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_item_prefs.h" + +#define GET_VMI(vitem,num) (&g_array_index(vitem->vmi, struct vmi, num - 1)) +#define GET_MSGINFO(vitem,num) GET_VMI(vitem, num)->msginfo + +struct _VFolder +{ + Folder folder; +}; + +static FolderClass vfolder_class; + +struct vmi +{ + MsgInfo *msginfo; + FolderItem *src_folder; + guint src_msgnum; +}; +struct search +{ + gchar *folder_id; + gboolean recursive; + gchar *cond; + + /* keep VFolderSearch from vfolder.h in sync */ + AdvancedSearch *as; + FolderItem *folder; +}; + +struct _VFolderItem +{ + FolderItem item; + GArray *search; + GArray *vmi; + GHashTable *ht; + guint hook_msginfo; + guint hook_folder_item; + guint hook_folder; + GSList *ignore_folder_update; + + /* properties */ + guint is_autorefresh :1; + /* internal flags */ + guint has_content :1; + guint is_building :1; + guint flags_from_src :1; + guint update_on_close :1; +}; + +static void free_search_internals(struct search *search); +static void free_vmi_internals(struct vmi *vmi); +static void clear_content(VFolderItem *vitem); +static gint build_content(VFolderItem *vitem, const gchar *msgid, gint *msgnum); +static void refresh_content(VFolderItem *vitem, gboolean manual); +static void trigger_item_update(VFolderItem *vitem); + +/* Folder */ +static Folder *_vfolder_new_folder(const gchar *name, const gchar *path); +static void _vfolder_destroy_folder(Folder *folder); +static void _vfolder_set_xml(Folder *folder, XMLTag *tag); +static XMLTag *_vfolder_get_xml(Folder *folder); + +/* FolderItem */ +static FolderItem *_vfolder_item_new(Folder *folder); +static void _vfolder_item_destroy(Folder *folder, FolderItem *item); +static void _vfolder_item_set_xml(Folder *folder, FolderItem *item, XMLTag *tag); +static XMLTag *_vfolder_item_get_xml(Folder *folder, FolderItem *item); +static gchar *_vfolder_item_get_path(Folder *folder, FolderItem *item); +static FolderItem *_vfolder_create_folder(Folder *folder, FolderItem *parent, + const gchar *name); +static gint _vfolder_rename_folder(Folder *folder, FolderItem *item, const gchar *name); +static gint _vfolder_remove_folder(Folder *folder, FolderItem *item); +static gint _vfolder_get_num_list(Folder *folder, FolderItem *item, + GSList **list, gboolean *old_uids_valid); +static gboolean _vfolder_scan_required(Folder *folder, FolderItem *item); + +/* Message */ +static MsgInfo *_vfolder_get_msginfo(Folder *folder, FolderItem *item, gint num); +static GSList *_vfolder_get_msginfos(Folder *folder, FolderItem *item, GSList *msgnum_list); +static gchar *_vfolder_fetch_msg(Folder *folder, FolderItem *item, gint num); +static gint _vfolder_add_msg(Folder *folder, FolderItem *dest, const gchar *file, + MsgFlags *flags); +static gint _vfolder_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo); +static gint _vfolder_remove_msg(Folder *folder, FolderItem *item, gint num); +static gint _vfolder_remove_msgs(Folder *folder, FolderItem *item, + MsgInfoList *msglist, GHashTable *relation); +static gint _vfolder_remove_all_msg(Folder *folder, FolderItem *item); +static void _vfolder_copy_private_data(Folder *folder, FolderItem *src, FolderItem *dst); +static void _vfolder_commit_tags(FolderItem *item, MsgInfo *msginfo, + GSList *tags_set, GSList *tags_unset); +static void _vfolder_item_opened(FolderItem *item); +static void _vfolder_item_closed(FolderItem *item); + +FolderClass *vfolder_get_class(void) +{ + if (vfolder_class.idstr == NULL) { + vfolder_class.type = F_UNKNOWN; + vfolder_class.idstr = "vfolder"; + vfolder_class.uistr = "VFolder"; + + /* Folder functions */ + vfolder_class.new_folder = _vfolder_new_folder; + vfolder_class.destroy_folder = _vfolder_destroy_folder; + vfolder_class.set_xml = NULL;//_vfolder_set_xml; + vfolder_class.get_xml = NULL;//_vfolder_get_xml; + + /* FolderItem functions */ + vfolder_class.item_new = _vfolder_item_new; + vfolder_class.item_destroy = _vfolder_item_destroy; + vfolder_class.item_set_xml = _vfolder_item_set_xml; + vfolder_class.item_get_xml = _vfolder_item_get_xml; + vfolder_class.item_get_path = _vfolder_item_get_path; + vfolder_class.create_folder = _vfolder_create_folder; + vfolder_class.rename_folder = _vfolder_rename_folder; + vfolder_class.remove_folder = _vfolder_remove_folder; + vfolder_class.get_num_list = _vfolder_get_num_list; + vfolder_class.scan_required = _vfolder_scan_required; + + /* Message functions */ + vfolder_class.get_msginfo = _vfolder_get_msginfo; + vfolder_class.get_msginfos = _vfolder_get_msginfos; + vfolder_class.fetch_msg = _vfolder_fetch_msg; + vfolder_class.add_msg = _vfolder_add_msg; + vfolder_class.copy_msg = _vfolder_copy_msg; + vfolder_class.remove_msg = _vfolder_remove_msg; + vfolder_class.remove_msgs = _vfolder_remove_msgs; + vfolder_class.remove_all_msg = _vfolder_remove_all_msg; + vfolder_class.copy_private_data = _vfolder_copy_private_data; + vfolder_class.commit_tags = _vfolder_commit_tags; + vfolder_class.item_opened = _vfolder_item_opened; + vfolder_class.item_closed = _vfolder_item_closed; + } + return &vfolder_class; +} + + +/* Folder */ + +static Folder *_vfolder_new_folder(const gchar *name, const gchar *path) +{ + Folder *folder; + + folder = (Folder *) g_new0(VFolder, 1); + folder->klass = &vfolder_class; + folder_init(folder, name); + + + return folder; +} + +static void _vfolder_destroy_folder(Folder *folder) +{ +} + +static void _vfolder_set_xml(Folder *folder, XMLTag *tag) +{ + + folder_set_xml(folder, tag); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + GList *cur; + for (cur = tag->attr; cur != NULL; cur = g_list_next(cur)) + { + XMLAttr *attr = (XMLAttr *) cur->data; + + if (!attr || !attr->name || !attr->value) + continue; + if (!strcmp(attr->name, "path")) + { + g_free(vfolder->path); + vfolder->path = g_strdup(attr->value); + } + } +#endif +} + +static XMLTag *_vfolder_get_xml(Folder *folder) +{ + XMLTag *tag; + + tag = folder_get_xml(folder); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + xml_tag_add_attr(tag, xml_attr_new("path", vfolder->path)); +#endif + + return tag; +} + + +/* FolderItem */ + +static gboolean on_msginfo_update(gpointer source, gpointer data) +{ + dbg("on_msginfo_update\n"); + MsgInfoUpdate *update = (MsgInfoUpdate *) source; + VFolderItem *vitem = (VFolderItem *) data; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!vitem->vmi) /* || !vitem->ht, they go together */ + return FALSE; + + if (update->flags & MSGINFO_UPDATE_FLAGS) + { + MsgInfo *mi = update->msginfo; + MsgPermFlags perm_add, perm_del; + MsgTmpFlags tmp_add, tmp_del; + gchar *s; + gchar *id; + gint i; + + /* our of ours? then relay to the source */ + if (mi->folder == (FolderItem *) vitem) + { + MsgInfo *src_mi; + + if (vitem->flags_from_src) + return FALSE; + + if (vfolder_get_src_msginfo(mi, &src_mi) == VFOLDER_ERR_DELETED) + return FALSE; + cm_return_val_if_fail(src_mi != NULL, FALSE); + + perm_add = mi->flags.perm_flags & ~src_mi->flags.perm_flags; + perm_del = src_mi->flags.perm_flags & ~mi->flags.perm_flags; + tmp_add = mi->flags.tmp_flags & ~src_mi->flags.tmp_flags; + tmp_del = src_mi->flags.tmp_flags & ~mi->flags.tmp_flags; + + src_mi->to_folder = mi->to_folder; + procmsg_msginfo_change_flags(src_mi, + perm_add, tmp_add, perm_del, tmp_del); + procmsg_msginfo_free(&src_mi); + return FALSE; + } + + /* another virtual one, we don't care */ + if (mi->folder->folder->klass == &vfolder_class) + return FALSE; + + id = folder_item_get_identifier(mi->folder); + s = g_strdup_printf("%d%s", mi->msgnum, id); + g_free(id); + + i = GPOINTER_TO_INT(g_hash_table_lookup(vitem->ht, s)); + g_free(s); + + /* we have this msg in our content, import flags */ + if (i > 0) + { + MsgInfo *our_mi; + + our_mi = GET_MSGINFO(vitem, i); + if (!our_mi) + return FALSE; + + perm_add = mi->flags.perm_flags & ~our_mi->flags.perm_flags; + perm_del = our_mi->flags.perm_flags & ~mi->flags.perm_flags; + tmp_add = mi->flags.tmp_flags & ~our_mi->flags.tmp_flags; + tmp_del = our_mi->flags.tmp_flags & ~mi->flags.tmp_flags; + + if (perm_add || perm_del || tmp_add || tmp_del) + { + vitem->flags_from_src = 1; + our_mi->to_folder = mi->to_folder; + procmsg_msginfo_change_flags(our_mi, + perm_add, tmp_add, perm_del, tmp_del); + vitem->flags_from_src = 0; + } + } + } + + return FALSE; +} + +static gboolean on_folder_item_update(gpointer source, gpointer data) +{ + dbg("on_folder_item_update\n"); + FolderItemUpdateData *update = (FolderItemUpdateData *) source; + VFolderItem *vitem = (VFolderItem *) data; + GSList *cur; + gint i; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!vitem->has_content + || update->item == (FolderItem *) vitem + || !(update->update_flags & F_ITEM_UPDATE_CONTENT)) + return FALSE; + + for (cur = vitem->ignore_folder_update; !!cur; cur = cur->next) + { + if ((FolderItem *) cur->data == update->item) + { + vitem->ignore_folder_update = g_slist_delete_link( + vitem->ignore_folder_update, cur); + return FALSE; + } + } + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, struct search, i); + + if (!search->folder) + { + search->folder = folder_find_item_from_identifier(search->folder_id); + if (!search->folder) + continue; + } + + if (search->folder == update->item + || (search->recursive && folder_is_child_of(update->item, + search->folder))) + break; + } + + if (i < vitem->search->len) + refresh_content(vitem, FALSE); + + return FALSE; +} + +static gboolean on_folder_update(gpointer source, gpointer data) +{ + dbg("on_folder_update\n"); + FolderUpdateData *update = (FolderUpdateData *) source; + VFolderItem *vitem = (VFolderItem *) data; + gboolean save = FALSE; + gint i; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!(update->update_flags & (FOLDER_RENAME_FOLDERITEM + | FOLDER_MOVE_FOLDERITEM | FOLDER_REMOVE_FOLDERITEM)) + || update->item == (FolderItem *) vitem + || !vitem->item.path) + return FALSE; + + vfolder_load_config(vitem, FALSE); + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, + struct search, i); + + if (search->folder == update->item) + { + if (update->update_flags & FOLDER_REMOVE_FOLDERITEM) + search->folder = NULL; + else + { + if (update->update_flags & FOLDER_MOVE_FOLDERITEM) + search->folder = update->item2; + g_free(search->folder_id); + search->folder_id = folder_item_get_identifier(search->folder); + save = TRUE; + } + } + } + + if (save) + vfolder_item_prefs_save(vitem, + vitem->is_autorefresh, + vitem->search->len, + (VFolderSearch *) vitem->search->data); + + return FALSE; +} + +static FolderItem *_vfolder_item_new(Folder *folder) +{ + VFolderItem *vitem; + + vitem = g_new0(VFolderItem, 1); + vitem->hook_msginfo = hooks_register_hook(MSGINFO_UPDATE_HOOKLIST, + on_msginfo_update, (gpointer) vitem); + vitem->hook_folder_item = hooks_register_hook(FOLDER_ITEM_UPDATE_HOOKLIST, + on_folder_item_update, (gpointer) vitem); + vitem->hook_folder = hooks_register_hook(FOLDER_UPDATE_HOOKLIST, + on_folder_update, (gpointer) vitem); + + return (FolderItem *) vitem; +} + +static void _vfolder_item_destroy(Folder *folder, FolderItem *item) +{ + VFolderItem *vitem = (VFolderItem *) item; + + cm_return_if_fail(vitem != NULL); + + if (vitem->search) + g_array_free(vitem->search, TRUE); + if (vitem->vmi) + g_array_free(vitem->vmi, TRUE); + if (vitem->ht) + g_hash_table_destroy(vitem->ht); + + hooks_unregister_hook(MSGINFO_UPDATE_HOOKLIST, vitem->hook_msginfo); + hooks_unregister_hook(FOLDER_ITEM_UPDATE_HOOKLIST, vitem->hook_folder_item); + hooks_unregister_hook(FOLDER_UPDATE_HOOKLIST, vitem->hook_folder); + + g_free(item); +} + +static void _vfolder_item_set_xml(Folder *folder, FolderItem *item, XMLTag *tag) +{ + folder_item_set_xml(folder, item, tag); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + GList *cur; + for (cur = tag->attr; cur != NULL; cur = g_list_next(cur)) + { + XMLAttr *attr = (XMLAttr *) cur->data; + + if (!attr || !attr->name || !attr->value) + continue; + if (!strcmp(attr->name, "path")) + { + g_free(vfolder->path); + vfolder->path = g_strdup(attr->value); + } + } +#endif +} + +static XMLTag *_vfolder_item_get_xml(Folder *folder, FolderItem *item) +{ + XMLTag *tag; + + tag = folder_item_get_xml(folder, item); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + xml_tag_add_attr(tag, xml_attr_new("path", vfolder->path)); +#endif + + return tag; +} + +static gchar *_vfolder_item_get_path(Folder *folder, FolderItem *item) +{ + return g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "VFoldercache", + G_DIR_SEPARATOR_S, folder->name, G_DIR_SEPARATOR_S, item->path, + NULL); +} + +static FolderItem *_vfolder_create_folder(Folder *folder, FolderItem *parent, + const gchar *name) +{ + FolderItem *item; + gchar *path; + + cm_return_val_if_fail(folder != NULL, NULL); + cm_return_val_if_fail(parent != NULL, NULL); + cm_return_val_if_fail(name != NULL, NULL); + + if (folder_find_child_item_by_name(parent, name)) + return NULL; + + if (parent->path) + path = g_strconcat(parent->path, "/", name, NULL); + else + path = (gchar *) name; + + item = folder_item_new(folder, name, path); + + if (path != name) + g_free(path); + + if (item) + folder_item_append(parent, item); + + return item; +} + +static gint _vfolder_rename_folder(Folder *folder, FolderItem *item, const gchar *name) +{ + FolderItem *parent; + gchar *path; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(name != NULL, -1); + + parent = folder_item_parent(item); + if (!parent) + return -1; + + if (folder_find_child_item_by_name(parent, name)) + return -1; + + if (parent->path) + path = g_strconcat(parent->path, "/", name, NULL); + else + path = g_strdup(name); + + g_free(item->path); + item->path = path; + + g_free(item->name); + item->name = g_strdup(name); + + return 0; +} + +static gint _vfolder_remove_folder(Folder *folder, FolderItem *item) +{ + cm_return_val_if_fail(item != NULL, -1); + + folder_item_remove(item); + return 0; +} + +static gint _vfolder_get_num_list(Folder *folder, FolderItem *item, + GSList **list, gboolean *old_uids_valid) +{ + dbg("get_num_list\n"); + VFolderItem *vitem = (VFolderItem *) item; + gint i; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(list != NULL, -1); + cm_return_val_if_fail(old_uids_valid != NULL, -1); + + *old_uids_valid = FALSE; + + if (!vitem->has_content && build_content(vitem, NULL, NULL) < 0) + return -1; + + for (i = 1; i <= vitem->vmi->len; ++i) + *list = g_slist_prepend(*list, GINT_TO_POINTER(i)); + + return vitem->vmi->len; +} + +static gboolean _vfolder_scan_required(Folder *folder, FolderItem *item) +{ + return TRUE; +} + + +/* Message */ + +static MsgInfo *_vfolder_get_msginfo(Folder *folder, FolderItem *item, gint num) +{ + VFolderItem *vitem = (VFolderItem *) item; + MsgInfo *mi; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + cm_return_val_if_fail(num > 0, NULL); + cm_return_val_if_fail(num <= vitem->vmi->len, NULL); + + mi = GET_MSGINFO(vitem, num); + if (mi) + return procmsg_msginfo_new_ref(mi); + else + return NULL; +} + +static GSList *_vfolder_get_msginfos(Folder *folder, FolderItem *item, GSList *msgnum_list) +{ + VFolderItem *vitem = (VFolderItem *) item; + MsgInfoList *ret = NULL; + MsgInfoList *wnt; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(msgnum_list != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + + for (wnt = msgnum_list; wnt != NULL; wnt = wnt->next) + { + gint num = GPOINTER_TO_INT(wnt->data); + + if (num > 0 && num <= vitem->vmi->len) + { + MsgInfo *mi = GET_MSGINFO(vitem, num); + if (mi) + ret = g_slist_prepend(ret, procmsg_msginfo_new_ref(mi)); + } + } + + return ret; +} + +static gchar *_vfolder_fetch_msg(Folder *folder, FolderItem *item, gint num) +{ + VFolderItem *vitem = (VFolderItem *) item; + struct vmi *vmi; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + cm_return_val_if_fail(num > 0, NULL); + cm_return_val_if_fail(num <= vitem->vmi->len, NULL); + + vmi = GET_VMI(vitem, num); + if (vmi->msginfo) + return folder_item_fetch_msg(vmi->src_folder, vmi->src_msgnum); + else + return NULL; +} + +static gint _vfolder_add_msg(Folder *folder, FolderItem *dest, const gchar *file, + MsgFlags *flags) +{ + return -1; +} + +static gint _vfolder_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) +{ + return -1; +} + +static void remove_msgs_perfolder(MsgInfoList *msglist, gpointer _data); +static gint _vfolder_remove_msg(Folder *folder, FolderItem *item, gint num) +{ + dbg("remove_msg(%d)\n",num); + VFolderItem *vitem = (VFolderItem *) item; + struct vmi *vmi; + gint r = 0; + gpointer data[2] = { item, &r }; + MsgInfoList msglist; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(vitem->vmi != NULL, -1); + cm_return_val_if_fail(num > 0, -1); + cm_return_val_if_fail(num <= vitem->vmi->len, -1); + + vmi = GET_VMI(vitem, num); + if (!vmi->msginfo) + return -1; + + msglist.data = vmi->msginfo; + msglist.next = NULL; + + vfolder_workon_msginfo_perfolder(&msglist, FALSE, + remove_msgs_perfolder, &data); + + return r; +} + +/* used in plugin_gtk.c */ +void _free_msglist_data(gpointer data) +{ + MsgInfo *mi = data; + procmsg_msginfo_free(&mi); +} + +static void remove_msgs_perfolder(MsgInfoList *msglist, gpointer _data) +{ + dbg("remove_msgs_perfolder\n"); + gpointer *data = _data; + VFolderItem *vitem = data[0]; + gint *r = data[1]; + FolderItem *src_folder = NULL; + MsgInfoList *src_msglist = NULL; + GSList *cur; + + if (*r != 0) + return; + + for (cur = msglist; !!cur; cur = cur->next) + { + MsgInfo *src_msginfo = NULL; + struct vmi *vmi; + + vmi = GET_VMI(vitem, ((MsgInfo *) cur->data)->msgnum); + if (!vmi->msginfo) + continue; + + if (!src_folder) + src_folder = vmi->src_folder; + + vfolder_get_src_msginfo(vmi->msginfo, &src_msginfo); + cm_return_if_fail(src_msginfo != NULL); + + /* if the file was moved, let's relay that to the src msginfo */ + if (MSG_IS_MOVE(vmi->msginfo->flags) + && MSG_IS_MOVE_DONE(vmi->msginfo->flags)) + src_msginfo->flags.tmp_flags = vmi->msginfo->flags.tmp_flags; + + src_msglist = g_slist_prepend(src_msglist, src_msginfo); + + /* free memory & "mark" deleted */ + free_vmi_internals(vmi); + vmi->msginfo = NULL; + vmi->src_folder = NULL; + vmi->src_msgnum = 0; + } + + if (vitem->item.opened) + { + vitem->update_on_close = 1; + vitem->ignore_folder_update = g_slist_prepend(vitem->ignore_folder_update, + src_folder); + } + + *r = folder_item_remove_msgs(src_folder, src_msglist); + + g_slist_free_full(src_msglist, _free_msglist_data); +} + +static gint _vfolder_remove_msgs(Folder *folder, FolderItem *item, + MsgInfoList *msglist, GHashTable *relation) +{ + dbg("remove_msgs\n"); + gint r = 0; + gpointer data[2] = { item, &r }; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(msglist != NULL, -1); + + folder_item_update_freeze(); + + vfolder_workon_msginfo_perfolder(msglist, FALSE, + remove_msgs_perfolder, &data); + + folder_item_update_thaw(); + + return r; +} + +static gint _vfolder_remove_all_msg(Folder *folder, FolderItem *item) +{ + return -1; +} + +static void _vfolder_copy_private_data(Folder *folder, FolderItem *_src, FolderItem *_dst) +{ + VFolderItem *src = (VFolderItem *) _src; + VFolderItem *dst = (VFolderItem *) _dst; + + cm_return_if_fail(_src != NULL); + cm_return_if_fail(_src->folder != NULL); + cm_return_if_fail(_src->folder->klass == &vfolder_class); + cm_return_if_fail(_dst != NULL); + cm_return_if_fail(_dst->folder != NULL); + cm_return_if_fail(_dst->folder->klass == &vfolder_class); + + dst->is_autorefresh = src->is_autorefresh; + + if (src->search && src->search->len > 0) + { + gint i; + + dst->search = g_array_new(FALSE, FALSE, sizeof(struct search)); + g_array_set_clear_func(dst->search, + (GDestroyNotify) free_search_internals); + + for (i = 0; i < src->search->len; ++i) + { + struct search *src_search = &g_array_index(src->search, + struct search, i); + struct search dst_search; + + dst_search.folder_id = g_strdup(src_search->folder_id); + dst_search.recursive = src_search->recursive; + dst_search.cond = g_strdup(src_search->cond); + dst_search.as = NULL; + dst_search.folder = src_search->folder; + + g_array_append_val(dst->search, dst_search); + } + + vfolder_item_prefs_save(dst, + dst->is_autorefresh, + dst->search->len, + (VFolderSearch *) dst->search->data); + } +} + +static void _vfolder_commit_tags(FolderItem *item, MsgInfo *msginfo, + GSList *tags_set, GSList *tags_unset) +{ + MsgInfo *src_msginfo; + GSList *cur; + + cm_return_if_fail(item != NULL); + cm_return_if_fail(msginfo != NULL); + cm_return_if_fail(tags_set != NULL || tags_unset != NULL); + + if (vfolder_get_src_msginfo(msginfo, &src_msginfo) < 0) + return; + + for (cur = tags_set; !!cur; cur = cur->next) + procmsg_msginfo_update_tags(src_msginfo, TRUE, GPOINTER_TO_INT(cur->data)); + for (cur = tags_unset; !!cur; cur = cur->next) + procmsg_msginfo_update_tags(src_msginfo, FALSE, GPOINTER_TO_INT(cur->data)); + procmsg_msginfo_free(&src_msginfo); +} + +static void _vfolder_item_opened(FolderItem *item) +{ + if (folder_item_parent(item)) + { + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", TRUE); + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", TRUE); + } +} + +static void _vfolder_item_closed(FolderItem *item) +{ + VFolderItem *vitem = (VFolderItem *) item; + + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", FALSE); + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", FALSE); + + cm_return_if_fail(vitem != NULL); + + if (vitem->update_on_close) + { + clear_content(vitem); + if (vitem->is_autorefresh) + build_content(vitem, NULL, NULL); + else + trigger_item_update(vitem); + } +} + + +/* Misc */ + +gboolean vfolder_is_item_autorefresh(VFolderItem *vitem) +{ + cm_return_val_if_fail(vitem != NULL, FALSE); + return vitem->is_autorefresh; +} + +static void free_search_internals(struct search *search) +{ + cm_return_if_fail(search != NULL); + g_free(search->folder_id); + g_free(search->cond); + if (search->as) + advsearch_free(search->as); +} + +static void free_vmi_internals(struct vmi *vmi) +{ + cm_return_if_fail(vmi != NULL); + procmsg_msginfo_free(&vmi->msginfo); +} + +static void clear_content(VFolderItem *vitem) +{ + dbg("clear_content\n"); + if (vitem->vmi) + g_array_remove_range(vitem->vmi, 0, vitem->vmi->len); + else + { + vitem->vmi = g_array_new(FALSE, FALSE, sizeof(struct vmi)); + g_array_set_clear_func(vitem->vmi, (GDestroyNotify) free_vmi_internals); + } + + if (vitem->ht) + g_hash_table_remove_all(vitem->ht); + else + vitem->ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + + vitem->has_content = 0; + vitem->update_on_close = 0; + if (vitem->ignore_folder_update) + { + g_slist_free(vitem->ignore_folder_update); + vitem->ignore_folder_update = NULL; + } + + /* else after an autorefresh (from on_folder_item_update) the summaryview + * would keep an old list with wrong msgnums... */ + { + FolderItem *item = (FolderItem *) vitem; + + if (item->cache) + msgcache_destroy(item->cache); + item->cache = msgcache_new(); + item->cache_dirty = TRUE; + item->mark_dirty = TRUE; + item->tags_dirty = TRUE; + } +} + +/* from plugin_gtk.c */ +gchar *vfolder_gtk_get_current_msgid(void); +void vfolder_gtk_refresh_summary(FolderItem *item, gint msgnum); +static void refresh_content(VFolderItem *vitem, gboolean manual) +{ + gchar *msgid = NULL; + gint msgnum = 0; + + if (vitem->item.opened) + msgid = vfolder_gtk_get_current_msgid(); + + clear_content(vitem); + if (manual || vitem->is_autorefresh || vitem->item.opened) + build_content(vitem, msgid, &msgnum); + else + trigger_item_update(vitem); + + if (vitem->item.opened) + vfolder_gtk_refresh_summary((FolderItem *) vitem, msgnum); +} + +void vfolder_refresh_content(VFolderItem *vitem) +{ + cm_return_if_fail(vitem != NULL); + refresh_content(vitem, TRUE); +} + +void vfolder_load_config(VFolderItem *vitem, gboolean force) +{ + PrefFile *pfile; + gchar *file; + gchar *id; + gchar *block; + gchar buf[BUFFSIZE]; + gint r; + + if (!vitem->search) + { + vitem->search = g_array_new(FALSE, FALSE, sizeof(struct search)); + g_array_set_clear_func(vitem->search, + (GDestroyNotify) free_search_internals); + } + else if (force) + g_array_remove_range(vitem->search, 0, vitem->search->len); + else + return; + + clear_content(vitem); + vitem->is_autorefresh = 0; + + id = folder_item_get_identifier((FolderItem *) vitem); + if (!id) + { + g_warning("Failed to read configuration from file"); + return; + } + block = g_strdup_printf("VFolder:%s", id); + g_free(id); + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDERITEM_RC, NULL); + pfile = prefs_read_open(file); + g_free(file); + if (!pfile) + { + g_warning("Failed to read configuration from file"); + return; + } + + r = prefs_set_block_label(pfile, block); + g_free(block); + if (r < 0) + return; + + while (fgets(buf, sizeof(buf), pfile->fp) != NULL) + { + struct search search; + gchar *s = buf; + gint esc = 0; + + if (*s == '[') + break; + + if (*s == '!') + { + if (!strcmp(s + 1, "autorefresh\n")) + vitem->is_autorefresh = 1; + else + g_warning("VFolder: unknown option: %s", s + 1); + + continue; + } + + search.recursive = *s == '+'; + if (*s == '+') + ++s; + + for ( ; *s != ' '; ++s) + { + if (*s == '\\') + { + ++esc; + ++s; + } + else if (*s == '\0') + { + g_warning("VFolder: Invalid configuration"); + esc = -1; + break; + } + + if (esc > 0) + s[-esc] = *s; + } + if (esc < 0) + break; + s -= esc; + *s = '\0'; + search.folder_id = g_strdup(buf + ((search.recursive) ? 1 : 0)); + *strchr(s + esc + 1, '\n') = '\0'; + search.cond = g_strdup(s + esc + 1); + search.as = NULL; + search.folder = folder_find_item_from_identifier(search.folder_id); + g_array_append_val(vitem->search, search); + } + + prefs_file_close(pfile); +} + +struct tmp +{ + MsgInfo *msginfo; + gchar *key; +}; + +static gint cmp_tmp(gconstpointer a, gconstpointer b) +{ + const struct tmp *t1 = a; + const struct tmp *t2 = b; + + return t1->msginfo->date_t - t2->msginfo->date_t; +} + +static gint build_content(VFolderItem *vitem, const gchar *msgid, gint *msgnum) +{ + dbg("build_content\n"); + GArray *arr; + guint i; + guint nb = 0; + + cm_return_val_if_fail(vitem != NULL, -1); + cm_return_val_if_fail(!msgid || msgnum, -1); + + if (vitem->is_building) + return -1; + dbg("building...\n"); + vitem->is_building = 1; + + if (!vitem->search) + vfolder_load_config(vitem, FALSE); + + clear_content(vitem); + + if (vitem->search->len == 0) + { + dbg("building done:%d\n",vitem->vmi->len); + vitem->is_building = 0; + vitem->has_content = 1; + trigger_item_update(vitem); + return 0; + } + + arr = g_array_new(FALSE, FALSE, sizeof(struct tmp)); + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, struct search, i); + MsgInfoList *msgs = NULL; + MsgInfoList *cur; + + if (!search->folder) + { + search->folder = folder_find_item_from_identifier(search->folder_id); + if (!search->folder) + goto fail; + } + + if (!search->as) + { + search->as = advsearch_new(); + advsearch_set(search->as, ADVANCED_SEARCH_EXTENDED, search->cond); + } + + if (!advsearch_search_msgs_in_folders(search->as, + &msgs, search->folder, search->recursive)) + goto fail; + + for (cur = msgs; cur != NULL; cur = cur->next) + { + MsgInfo *mi = (MsgInfo *) cur->data; + struct tmp tmp; + gchar *id, *s; + + id = folder_item_get_identifier(mi->folder); + s = g_strdup_printf("%d%s", mi->msgnum, id); + g_free(id); + + if (i > 0 && g_hash_table_contains(vitem->ht, s)) + { + g_free(s); + continue; + } + + tmp.msginfo = mi; + tmp.key = s; + g_array_append_val(arr, tmp); + g_hash_table_insert(vitem->ht, s, GINT_TO_POINTER(0)); + } + g_slist_free(msgs); + } + + g_array_sort(arr, cmp_tmp); + for (i = 0; i < arr->len; ++i) + { + struct tmp *tmp = &g_array_index(arr, struct tmp, i); + struct vmi vmi; + + vmi.msginfo = procmsg_msginfo_copy(tmp->msginfo); + vmi.msginfo->tags = g_slist_copy(tmp->msginfo->tags); + vmi.src_folder = tmp->msginfo->folder; + vmi.src_msgnum = tmp->msginfo->msgnum; + vmi.msginfo->folder = (FolderItem *) vitem; + vmi.msginfo->msgnum = ++nb; + + g_array_append_val(vitem->vmi, vmi); + g_hash_table_insert(vitem->ht, g_strdup(tmp->key), GINT_TO_POINTER(nb)); + + if (msgid && !strcmp(msgid, vmi.msginfo->msgid)) + { + msgid = NULL; + *msgnum = nb; + } + } + g_array_free(arr, TRUE); + + dbg("building done:%d\n",vitem->vmi->len); + vitem->is_building = 0; + vitem->has_content = 1; + trigger_item_update(vitem); + return nb; + +fail: + g_array_free(arr, TRUE); + g_hash_table_remove_all(vitem->ht); + dbg("building failed:%d\n",vitem->vmi->len); + vitem->is_building = 0; + return -1; +} + +static void trigger_item_update(VFolderItem *vitem) +{ + dbg("trigger_item_update\n"); + FolderItem *item = (FolderItem *) vitem; + FolderItemUpdateData source; + gint i; + + cm_return_if_fail(vitem != NULL); + + item->new_msgs = 0; + item->unread_msgs = 0; + item->total_msgs = 0; + item->unreadmarked_msgs = 0; + item->marked_msgs = 0; + item->replied_msgs = 0; + item->forwarded_msgs = 0; + item->locked_msgs = 0; + item->ignored_msgs = 0; + item->watched_msgs = 0; + + if (vitem->vmi && vitem->vmi->len > 0) + { + item->total_msgs = vitem->vmi->len; + + for (i = 1; i <= vitem->vmi->len; ++i) + { + MsgInfo *mi = GET_MSGINFO(vitem, i); + if (!mi) + continue; + + if (MSG_IS_NEW(mi->flags)) + ++item->new_msgs; + if (MSG_IS_UNREAD(mi->flags)) + ++item->unread_msgs; + if (MSG_IS_UNREAD(mi->flags) && procmsg_msg_has_marked_parent(mi)) + ++item->unreadmarked_msgs; + if (MSG_IS_MARKED(mi->flags)) + ++item->marked_msgs; + if (MSG_IS_REPLIED(mi->flags)) + ++item->replied_msgs; + if (MSG_IS_FORWARDED(mi->flags)) + ++item->forwarded_msgs; + if (MSG_IS_LOCKED(mi->flags)) + ++item->locked_msgs; + if (MSG_IS_IGNORE_THREAD(mi->flags)) + ++item->ignored_msgs; + if (MSG_IS_WATCH_THREAD(mi->flags)) + ++item->watched_msgs; + } + } + + source.item = (FolderItem *) vitem; + source.update_flags = F_ITEM_UPDATE_MSGCNT | F_ITEM_UPDATE_CONTENT; + source.msg = NULL; + hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &source); +} + +/* for vfolder_item_prefs.c */ +void _vfolder_item_get_searches(VFolderItem *vitem, gint *len, VFolderSearch **searches) +{ + cm_return_if_fail(vitem != NULL); + cm_return_if_fail(len != NULL); + cm_return_if_fail(searches != NULL); + + if (!vitem->search) + *len = 0; + else + { + *len = vitem->search->len; + *searches = (VFolderSearch *) vitem->search->data; + } +} + +gint vfolder_get_src_folder_msgnum(MsgInfo *msginfo, + FolderItem **src_item, guint *src_msgnum) +{ + VFolderItem *vitem; + struct vmi *vmi; + + cm_return_val_if_fail(msginfo != NULL, FALSE); + cm_return_val_if_fail(msginfo->folder != NULL, FALSE); + cm_return_val_if_fail(msginfo->folder->folder != NULL, FALSE); + + if (msginfo->folder->folder->klass != &vfolder_class) + return VFOLDER_ERR_NOT_VIRTUAL; + + vitem = (VFolderItem *) msginfo->folder; + + cm_return_val_if_fail(vitem->vmi != NULL, FALSE); + cm_return_val_if_fail(msginfo->msgnum > 0, FALSE); + cm_return_val_if_fail(msginfo->msgnum <= vitem->vmi->len, FALSE); + + vmi = GET_VMI(vitem, msginfo->msgnum); + if (!vmi->msginfo) + return VFOLDER_ERR_DELETED; + if (src_item) + *src_item = vmi->src_folder; + if (src_msgnum) + *src_msgnum = vmi->src_msgnum; + return 0; +} + +gint vfolder_get_src_msginfo(MsgInfo *msginfo, MsgInfo **src_msginfo) +{ + FolderItem *item; + gint num; + gboolean r; + + r = vfolder_get_src_folder_msgnum(msginfo, &item, &num); + if (r == 0 && src_msginfo) + *src_msginfo = folder_item_get_msginfo(item, num); + return r; +} + +void vfolder_workon_msginfo_perfolder(MsgInfoList *_msglist, gboolean free_msglist, + vfolder_worker_fn worker, gpointer data) +{ + MsgInfoList *msglist; + + if (free_msglist) + msglist = _msglist; + else + msglist = g_slist_copy(_msglist); + + for ( ; !!msglist; ) + { + FolderItem *cur_item = NULL; + GSList *msglist_last = NULL; + GSList *list = NULL; + GSList *list_last = NULL; + GSList *cur; + + for (cur = msglist; !!cur; ) + { + MsgInfo *mi = (MsgInfo *) cur->data; + FolderItem *item = mi->folder; + + if (vfolder_get_src_folder_msgnum(mi, + &item, NULL) == VFOLDER_ERR_DELETED) + { + cur = cur->next; + cur->next = NULL; + if (cur == msglist) + msglist = NULL; + g_slist_free(cur); + continue; + } + + if (!cur_item) + cur_item = item; + + if (item == cur_item) + { + if (msglist_last) + msglist_last->next = cur; + msglist_last = cur; + } + else + { + if (!list) + list = cur; + if (list_last) + list_last->next = cur; + list_last = cur; + } + + cur = cur->next; + } + if (msglist_last) + msglist_last->next = NULL; + if (list_last) + list_last->next = NULL; + + if (msglist) + { + worker(msglist, data); + g_slist_free(msglist); + } + msglist = list; + } +} diff --git a/src/plugins/vfolder/vfolder.h b/src/plugins/vfolder/vfolder.h new file mode 100644 index 000000000..05d5d1571 --- /dev/null +++ b/src/plugins/vfolder/vfolder.h @@ -0,0 +1,59 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_FOLDER_H__ +#define __VFOLDER_FOLDER_H__ + + +#include + +#include "folder.h" + +typedef struct _VFolder VFolder; +typedef struct _VFolderItem VFolderItem; + +typedef struct _VFolderSearch VFolderSearch; +struct _VFolderSearch +{ + gchar *folder_id; + gboolean recursive; + gchar *cond; + + gpointer *reserved[2]; +}; + +typedef void (*vfolder_worker_fn) (MsgInfoList *msglist, gpointer data); + + +FolderClass *vfolder_get_class (void); + +gboolean vfolder_is_item_autorefresh(VFolderItem *vitem); + +void vfolder_load_config(VFolderItem *vitem, gboolean force); +void vfolder_refresh_content(VFolderItem *vitem); + +#define VFOLDER_ERR_NOT_VIRTUAL -1 +#define VFOLDER_ERR_DELETED -2 +gint vfolder_get_src_folder_msgnum(MsgInfo *msginfo, + FolderItem **src_item, guint *src_msgnum); +gint vfolder_get_src_msginfo(MsgInfo *msginfo, MsgInfo **src_msginfo); + +void vfolder_workon_msginfo_perfolder(MsgInfoList *msglist, gboolean free_msglist, + vfolder_worker_fn worker, gpointer data); + +#endif /* __VFOLDER_FOLDER_H__ */ diff --git a/src/plugins/vfolder/vfolder_item_prefs.c b/src/plugins/vfolder/vfolder_item_prefs.c new file mode 100644 index 000000000..c32a9e336 --- /dev/null +++ b/src/plugins/vfolder/vfolder_item_prefs.c @@ -0,0 +1,1101 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "gtk/menu.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_common.h" +#include "prefs_gtk.h" +#include "prefs_folder_item.h" +#include "prefs_matcher.h" +#include "matcher_parser.h" +#include "alertpanel.h" +#include "foldersel.h" + +#include "plugin.h" +#include "vfolder_item_prefs.h" + + +struct _VFolderItemPrefsPage +{ + PrefsPage page; + + VFolderItem *vitem; + +}; + +static void prefs_cond_define(gpointer action, gpointer data); +static void prefs_register_cb(gpointer action, gpointer data); +static void prefs_substitute_cb(gpointer action, gpointer data); +static void prefs_delete_cb(gpointer action, gpointer data); +static void prefs_delete_all_cb(gpointer action, gpointer data); +static void prefs_duplicate_cb(gpointer action, gpointer data); +static void prefs_clear_cb(gpointer action, gpointer data); +static void prefs_page_up(gpointer action, gpointer data); +static void prefs_page_down(gpointer action, gpointer data); +static void prefs_top(gpointer action, gpointer data); +static void prefs_up(gpointer action, gpointer data); +static void prefs_down(gpointer action, gpointer data); +static void prefs_bottom(gpointer action, gpointer data); + +enum +{ + PREFS_COL_FOLDER, + PREFS_COL_RECURSIVE, + PREFS_COL_COND, + NB_PREFS_COL +}; + +static GtkActionGroup *prefs_popup_action = NULL; +static GtkWidget *prefs_popup_menu = NULL; + +static GtkActionEntry prefs_popup_entries[] = +{ + { "PrefsVfolderPopup", NULL, "PrefsVfolderPopup" }, + { "PrefsVfolderPopup/Delete", NULL, N_("_Delete"), + NULL, NULL, G_CALLBACK(prefs_delete_cb) }, + { "PrefsVfolderPopup/DeleteAll", NULL, N_("Delete _all"), + NULL, NULL, G_CALLBACK(prefs_delete_all_cb) }, + { "PrefsVfolderPopup/Duplicate", NULL, N_("D_uplicate"), + NULL, NULL, G_CALLBACK(prefs_duplicate_cb) }, +#ifdef GENERIC_UMPC + { "PrefsVfolderPopup/---", NULL, "---", NULL, NULL, NULL }, + { "PrefsVfolderPopup/PageUp", NULL, N_("Move one page up"), + NULL, NULL, G_CALLBACK(prefs_page_up) }, + { "PrefsVfolderPopup/PageDown", NULL, N_("Move one page down"), + NULL, NULL, G_CALLBACK(prefs_page_down) }, +#endif +}; + +static GtkWidget *cond_entry; +static GtkWidget *folder_entry; +static GtkWidget *recursive_btn; +static GtkWidget *cond_list_view; +static GtkWidget *autorefresh_btn; + +static void prefs_select_row(GtkTreeView *list_view, GtkTreePath *path) +{ + GtkTreeModel *model = gtk_tree_view_get_model(list_view); + + if (path && model) { + GtkTreeSelection *selection; + GtkTreeIter iter; + gchar *folder, *cond; + gboolean recursive; + + if (gtk_tree_path_get_depth(path) == 1 + && gtk_tree_path_get_indices(path)[0] == 0) + return; + + /* select row */ + selection = gtk_tree_view_get_selection(list_view); + gtk_tree_selection_select_path(selection, path); + + gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get(model, &iter, + PREFS_COL_FOLDER, &folder, + PREFS_COL_RECURSIVE, &recursive, + PREFS_COL_COND, &cond, + -1); + + gtk_entry_set_text(GTK_ENTRY(folder_entry), folder); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(recursive_btn), recursive); + gtk_entry_set_text(GTK_ENTRY(cond_entry), cond); + + g_free(folder); + g_free(cond); + } +} + +static gint prefs_list_btn_pressed(GtkWidget *widget, GdkEventButton *event, + GtkTreeView *list_view) +{ + if (event) { + /* left- or right-button click */ + if (event->button == 1 || event->button == 3) { + GtkTreePath *path = NULL; + + if (gtk_tree_view_get_path_at_pos( list_view, event->x, event->y, + &path, NULL, NULL, NULL)) { + prefs_select_row(list_view, path); + } + if (path) + gtk_tree_path_free(path); + } + + /* right-button click */ + if (event->button == 3) { + GtkTreeModel *model = gtk_tree_view_get_model(list_view); + GtkTreeIter iter; + gboolean non_empty; + gint row; + + if (!prefs_popup_menu) { + prefs_popup_action = cm_menu_create_action_group( + "PrefsVfolderPopup", + prefs_popup_entries, + G_N_ELEMENTS(prefs_popup_entries), + (gpointer) list_view); + MENUITEM_ADDUI("/Menus", + "PrefsVfolderPopup", + "PrefsVfolderPopup", + GTK_UI_MANAGER_MENU); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Delete", + "PrefsVfolderPopup/Delete", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "DeleteAll", + "PrefsVfolderPopup/DeleteAll", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Duplicate", + "PrefsVfolderPopup/Duplicate", + GTK_UI_MANAGER_MENUITEM); +#ifdef GENERIC_UMPC + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Separator1", + "PrefsVfolderPopup/---", + GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "PageUp", + "PrefsVfolderPopup/PageUp", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "PageDown", + "PrefsVfolderPopup/PageDown", + GTK_UI_MANAGER_MENUITEM); +#endif + prefs_popup_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM( + gtk_ui_manager_get_widget( + gtkut_ui_manager(), + "/Menus/PrefsVfolderPopup")) + ); + } + + /* grey out some popup menu items if there is no selected row */ + row = gtkut_list_view_get_selected_row(GTK_WIDGET(list_view)); + cm_menu_set_sensitive("PrefsVfolderPopup/Delete", (row > 0)); + cm_menu_set_sensitive("PrefsVfolderPopup/Duplicate", (row > 0)); + + /* grey out seom popup menu items if there is no row + (not counting the (New) one at row 0) */ + non_empty = gtk_tree_model_get_iter_first(model, &iter); + if (non_empty) + non_empty = gtk_tree_model_iter_next(model, &iter); + cm_menu_set_sensitive("PrefsVfolderPopup/DeleteAll", non_empty); + + gtk_menu_popup(GTK_MENU(prefs_popup_menu), + NULL, NULL, NULL, NULL, event->button, event->time); + } + } + return FALSE; +} + +static gboolean prefs_list_popup_menu(GtkWidget *widget, gpointer data) +{ + GtkTreeView *list_view = (GtkTreeView *)data; + GdkEventButton event; + + event.button = 3; + event.time = gtk_get_current_event_time(); + + prefs_list_btn_pressed(NULL, &event, list_view); + + return TRUE; +} + +static void prefs_create_list_view_columns(GtkWidget *list_view) +{ + GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes + (_("Folder"), + renderer, + "text", PREFS_COL_FOLDER, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + gtk_tree_view_column_set_resizable(column, TRUE); + + renderer = gtk_cell_renderer_toggle_new(); + g_object_set(renderer, + "radio", FALSE, + "activatable", FALSE, + NULL); + column = gtk_tree_view_column_new_with_attributes + (_("Recursive"), + renderer, + "active", PREFS_COL_RECURSIVE, + NULL); + gtk_tree_view_column_set_alignment (column, 0.5); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes + (_("Condition"), + renderer, + "text", PREFS_COL_COND, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + gtk_tree_view_column_set_resizable(column, TRUE); +} + +static void prefs_row_selected(GtkTreeSelection *selection, + GtkTreeView *list_view) +{ + GtkTreePath *path; + GtkTreeIter iter; + GtkTreeModel *model; + + if (!gtk_tree_selection_get_selected(selection, &model, &iter)) + return; + + path = gtk_tree_model_get_path(model, &iter); + prefs_select_row(list_view, path); + gtk_tree_path_free(path); +} + +static GtkWidget *prefs_list_view_create(void) +{ + GtkTreeView *list_view; + GtkTreeSelection *selector; + + list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model( + GTK_TREE_MODEL(gtk_list_store_new(NB_PREFS_COL, + G_TYPE_STRING, + G_TYPE_BOOLEAN, + G_TYPE_STRING, + -1)))); +#ifdef GENERIC_UMPC + g_object_set(list_view, "allow-checkbox-mode", FALSE, NULL); +#endif + + g_signal_connect(G_OBJECT(list_view), "popup-menu", + G_CALLBACK(prefs_list_popup_menu), list_view); + g_signal_connect(G_OBJECT(list_view), "button-press-event", + G_CALLBACK(prefs_list_btn_pressed), list_view); + + gtk_tree_view_set_rules_hint(list_view, prefs_common.use_stripes_everywhere); + gtk_tree_view_set_reorderable(list_view, TRUE); + + selector = gtk_tree_view_get_selection(list_view); + gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE); + g_signal_connect(G_OBJECT(selector), "changed", + G_CALLBACK(prefs_row_selected), list_view); + + /* create the columns */ + prefs_create_list_view_columns(GTK_WIDGET(list_view)); + + return GTK_WIDGET(list_view); +} + +static void prefs_select_folder_cb(GtkWidget *widget, gpointer data) +{ + FolderItem *item; + gchar *id; + + item = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL, FALSE); + if (item && item->path) { + id = folder_item_get_identifier(item); + if (id) { + gtk_entry_set_text(GTK_ENTRY(data), id); + g_free(id); + } + } +} + +static void prefs_clear_list_store(void) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + + gtk_list_store_clear(list_store); + + /* add the place holder (New) at row 0 */ + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, _("(New)"), + PREFS_COL_RECURSIVE, FALSE, + PREFS_COL_COND, _("(New)"), + -1); +} + +/* from vfolder.c */ +void _vfolder_item_get_searches(VFolderItem *vitem, gint *len, VFolderSearch **searches); +static void prefs_fill_list_store(VFolderItem *vitem) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + VFolderSearch *searches; + gint len; + gint i; + + _vfolder_item_get_searches(vitem, &len, &searches); + + for (i = 0; i < len; ++i) + { + VFolderSearch *search = &searches[i]; + + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, search->folder_id, + PREFS_COL_RECURSIVE, search->recursive, + PREFS_COL_COND, search->cond, + -1); + } +} + +static void prefs_page_create_widget(PrefsPage *page, GtkWindow *window, gpointer data) +{ + VFolderItemPrefsPage *vpage = (VFolderItemPrefsPage *) page; + VFolderItem *vitem = (VFolderItem *) data; + GtkWidget *vbox1; + GtkWidget *w; + + vpage->vitem = vitem; + + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width(GTK_CONTAINER (vbox1), VBOX_BORDER); + page->widget = vbox1; + + if (!folder_item_parent((FolderItem *) vitem)) + { + w = gtk_label_new(g_strconcat("", + _("There are no Content preferences for top-level folder."), + "", NULL)); + gtk_widget_show(w); + gtk_label_set_use_markup(GTK_LABEL(w), TRUE); + gtk_misc_set_alignment(GTK_MISC(w), 0.5, 0.01); + gtk_box_pack_start (GTK_BOX(vbox1), w, FALSE, TRUE, 0); + + return; + } + + vfolder_load_config(vitem, FALSE); + + GtkWidget *vbox2; + GtkWidget *table; + GtkWidget *folder_label; + GtkWidget *folder_btn; + GtkWidget *cond_label; + GtkWidget *cond_btn; + GtkWidget *reg_hbox; + GtkWidget *arrow; + GtkWidget *btn_hbox; + GtkWidget *reg_btn; + GtkWidget *subst_btn; + GtkWidget *del_btn; + GtkWidget *clear_btn; + GtkWidget *cond_hbox; + GtkWidget *cond_scrolledwin; + GtkWidget *btn_vbox; + GtkWidget *top_btn; + GtkWidget *page_up_btn; + GtkWidget *up_btn; + GtkWidget *down_btn; + GtkWidget *page_down_btn; + GtkWidget *bottom_btn; + + vbox2 = gtk_vbox_new (FALSE, 4); + gtk_widget_show (vbox2); + gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8); + + table = gtk_table_new(4, 3, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_widget_show(table); + gtk_box_pack_start (GTK_BOX (vbox2), table, TRUE, TRUE, 0); + + folder_label = gtk_label_new (_("Folder")); + gtk_widget_show (folder_label); + gtk_misc_set_alignment (GTK_MISC (folder_label), 1, 0.5); + gtk_table_attach (GTK_TABLE (table), folder_label, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + folder_entry = gtk_entry_new (); + gtk_widget_show (folder_entry); + gtk_table_attach (GTK_TABLE (table), folder_entry, 1, 2, 2, 3, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0); + + folder_btn = gtkut_get_browse_file_btn(_("Browse")); + gtk_widget_show (folder_btn); + gtk_table_attach (GTK_TABLE (table), folder_btn, 2, 3, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 2, 2); + g_signal_connect + (G_OBJECT (folder_btn), "clicked", + G_CALLBACK (prefs_select_folder_cb), + folder_entry); + + recursive_btn = gtk_check_button_new_with_label (_("Recursive")); + gtk_widget_show (recursive_btn); + gtk_table_attach (GTK_TABLE (table), recursive_btn, 1, 3, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + cond_label = gtk_label_new (_("Condition")); + gtk_widget_show (cond_label); + gtk_misc_set_alignment (GTK_MISC (cond_label), 1, 0.5); + gtk_table_attach (GTK_TABLE (table), cond_label, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + cond_entry = gtk_entry_new (); + gtk_widget_show (cond_entry); + gtk_table_attach (GTK_TABLE (table), cond_entry, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_FILL|GTK_EXPAND), + (GtkAttachOptions) (0), 0, 0); + + cond_btn = gtk_button_new_with_mnemonic (_(" Def_ine... ")); + gtk_widget_show (cond_btn); + gtk_table_attach (GTK_TABLE (table), cond_btn, 2, 3, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 2, 2); + g_signal_connect(G_OBJECT (cond_btn), "clicked", + G_CALLBACK(prefs_cond_define), + NULL); + + + /* register / substitute / delete */ + reg_hbox = gtk_hbox_new (FALSE, 4); + gtk_widget_show (reg_hbox); + gtk_box_pack_start (GTK_BOX (vbox2), reg_hbox, FALSE, FALSE, 0); + + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); + gtk_widget_show (arrow); + gtk_box_pack_start (GTK_BOX (reg_hbox), arrow, FALSE, FALSE, 0); + gtk_widget_set_size_request (arrow, -1, 16); + + btn_hbox = gtk_hbox_new (TRUE, 4); + gtk_widget_show (btn_hbox); + gtk_box_pack_start (GTK_BOX (reg_hbox), btn_hbox, FALSE, FALSE, 0); + + reg_btn = gtk_button_new_from_stock (GTK_STOCK_ADD); + gtk_widget_show (reg_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), reg_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (reg_btn), "clicked", + G_CALLBACK(prefs_register_cb), NULL); + CLAWS_SET_TIP(reg_btn, + _("Append the new search above to the list")); + + subst_btn = gtkut_get_replace_btn (_("_Replace")); + gtk_widget_show (subst_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), subst_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (subst_btn), "clicked", + G_CALLBACK(prefs_substitute_cb), + NULL); + CLAWS_SET_TIP(subst_btn, + _("Replace the selected search in list with the search above")); + + del_btn = gtk_button_new_with_mnemonic (_("D_elete")); + gtk_button_set_image(GTK_BUTTON(del_btn), + gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON)); + gtk_box_pack_start (GTK_BOX (btn_hbox), del_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (del_btn), "clicked", + G_CALLBACK(prefs_delete_cb), NULL); + CLAWS_SET_TIP(del_btn, + _("Delete the selected search from the list")); + + clear_btn = gtk_button_new_with_mnemonic (_("C_lear")); + gtk_button_set_image(GTK_BUTTON(clear_btn), + gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (clear_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (clear_btn), "clicked", + G_CALLBACK(prefs_clear_cb), NULL); + CLAWS_SET_TIP(clear_btn, + _("Clear all the input fields in the dialog")); + + cond_hbox = gtk_hbox_new (FALSE, 8); + gtk_widget_show (cond_hbox); + gtk_box_pack_start (GTK_BOX (vbox2), cond_hbox, TRUE, TRUE, 0); + + cond_scrolledwin = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (cond_scrolledwin); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(cond_scrolledwin), + GTK_SHADOW_ETCHED_IN); + gtk_widget_set_size_request (cond_scrolledwin, -1, 150); + gtk_box_pack_start (GTK_BOX (cond_hbox), cond_scrolledwin, + TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (cond_scrolledwin), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_container_set_border_width(GTK_CONTAINER (cond_scrolledwin), 4); + + cond_list_view = prefs_list_view_create(); + gtk_widget_show (cond_list_view); + gtk_container_add (GTK_CONTAINER (cond_scrolledwin), cond_list_view); + prefs_clear_list_store(); + prefs_fill_list_store(vitem); + + btn_vbox = gtk_vbox_new (FALSE, 8); + gtk_widget_show (btn_vbox); + gtk_box_pack_start (GTK_BOX (cond_hbox), btn_vbox, FALSE, FALSE, 0); + + top_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_TOP); + gtk_widget_show (top_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), top_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (top_btn), "clicked", + G_CALLBACK(prefs_top), NULL); + CLAWS_SET_TIP(top_btn, + _("Move the selected search to the top")); + +#ifndef GENERIC_UMPC + page_up_btn = gtk_button_new_with_mnemonic (_("Page u_p")); + gtk_button_set_image(GTK_BUTTON(page_up_btn), + gtk_image_new_from_stock(GTK_STOCK_GO_UP,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (page_up_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), page_up_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (page_up_btn), "clicked", + G_CALLBACK(prefs_page_up), NULL); + CLAWS_SET_TIP(page_up_btn, + _("Move the selected search one page up")); +#endif + + up_btn = gtk_button_new_from_stock (GTK_STOCK_GO_UP); + gtk_widget_show (up_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), up_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (up_btn), "clicked", + G_CALLBACK(prefs_up), NULL); + CLAWS_SET_TIP(up_btn, + _("Move the selected search up")); + + down_btn = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN); + gtk_widget_show (down_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), down_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (down_btn), "clicked", + G_CALLBACK(prefs_down), NULL); + CLAWS_SET_TIP(down_btn, + _("Move the selected search down")); + +#ifndef GENERIC_UMPC + page_down_btn = gtk_button_new_with_mnemonic (_("Page dow_n")); + gtk_button_set_image(GTK_BUTTON(page_down_btn), + gtk_image_new_from_stock(GTK_STOCK_GO_DOWN,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (page_down_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), page_down_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (page_down_btn), "clicked", + G_CALLBACK(prefs_page_down), NULL); + CLAWS_SET_TIP(page_down_btn, + _("Move the selected search one page down")); +#endif + + bottom_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_BOTTOM); + gtk_widget_show (bottom_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), bottom_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (bottom_btn), "clicked", + G_CALLBACK(prefs_bottom), NULL); + CLAWS_SET_TIP(bottom_btn, + _("Move the selected search to the bottom")); + + + autorefresh_btn = gtk_check_button_new_with_label (_("Autorefresh on changes")); + gtk_widget_show (autorefresh_btn); + gtk_box_pack_end (GTK_BOX (vbox2), autorefresh_btn, FALSE, FALSE, 4); + CLAWS_SET_TIP(autorefresh_btn, + _("Automatically re-run searches when changes on source folders are detected")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autorefresh_btn), + vfolder_is_item_autorefresh(vitem)); +} + +static void prefs_condition_define_done(MatcherList *matchers) +{ + gchar *str; + + if (matchers == NULL) + return; + + str = matcherlist_to_string(matchers); + + if (str != NULL) { + gtk_entry_set_text(GTK_ENTRY(cond_entry), str); + g_free(str); + } +} + +static void prefs_cond_define(gpointer action, gpointer data) +{ + gchar *cond_str; + MatcherList *matchers = NULL; + + cond_str = gtk_editable_get_chars(GTK_EDITABLE(cond_entry), 0, -1); + + if (*cond_str != '\0') { + matchers = matcher_parser_get_cond(cond_str, NULL); + if (matchers == NULL) + alertpanel_error(_("Condition string is not valid.")); + } + + g_free(cond_str); + + prefs_matcher_open(matchers, prefs_condition_define_done); + + if (matchers != NULL) + matcherlist_free(matchers); +} + +static gint prefs_list_view_insert_search(gint row) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + GtkTreeIter sibling; + const gchar *folder; + gboolean recursive; + const gchar *cond; + + folder = gtk_entry_get_text(GTK_ENTRY(folder_entry)); + recursive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(recursive_btn)); + cond = gtk_entry_get_text(GTK_ENTRY(cond_entry)); + + /* validate values */ + { + FolderItem *item; + + item = folder_find_item_from_identifier(folder); + if (!item) + { + alertpanel_error(_("Invalid folder")); + return -1; + } + else if (item->folder->klass == vfolder_get_class()) + { + alertpanel_error(_("Cannot use virtual folder as source.")); + return -1; + } + + if (!matcher_parser_get_cond((gchar *) cond, NULL)) + { + alertpanel_error(_("Condition string is not valid.")); + return -1; + } + } + + /* check if valid row at all */ + if (row >= 0) { + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), + &iter, NULL, row)) + row = -1; + } else if (row < -1) { + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), + &sibling, NULL, -row-2)) + row = -1; + } + + if (row == -1 ) { + /* append new */ + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL) - 1; + } else if (row < -1) { + /* duplicate */ + gtk_list_store_insert_after(list_store, &iter, &sibling); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL) - 1; + } else { + /* change existing */ + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return row; + } +} + +static void prefs_register_cb(gpointer action, gpointer data) +{ + prefs_list_view_insert_search(-1); +} + +static void prefs_substitute_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + prefs_list_view_insert_search(row); +} + +static void prefs_delete_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + + if (row <= 0) + return; + + if (alertpanel(_("Delete search"), + _("Do you really want to delete this search?"), + GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT) + return; + + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), &iter, NULL, row)) + return; + + gtk_list_store_remove(list_store, &iter); +} + +static void prefs_delete_all_cb(gpointer action, gpointer data) +{ + if (alertpanel(_("Delete all searches"), + _("Do you really want to delete all the searches?"), + GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT) + return; + + prefs_clear_list_store(); +} + +static void prefs_duplicate_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + prefs_list_view_insert_search(-row-2); +} + +static void prefs_clear_cb(gpointer action, gpointer data) +{ + gtk_entry_set_text(GTK_ENTRY(folder_entry), ""); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(recursive_btn), FALSE); + gtk_entry_set_text(GTK_ENTRY(cond_entry), ""); +} + +static void prefs_page_up(gpointer action, gpointer data) +{ + gint row, target_row; + GtkTreeIter selected, target; + GtkTreeModel *model; + GtkTreePath *path; + GdkRectangle cell_rect, view_rect; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &selected, NULL, row)) + return; + + /* compute number of rows per page (approximation) */ + path = gtk_tree_model_get_path(model, &selected); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(cond_list_view), path, NULL, &cell_rect); + gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(cond_list_view), &view_rect); + gtk_tree_path_free(path); + target_row = row - (view_rect.height/cell_rect.height); + if (target_row < 1) + target_row = 1; + + if (!gtk_tree_model_iter_nth_child(model, &target, NULL, target_row)) + return; + gtk_list_store_move_before(GTK_LIST_STORE(model), &selected, &target); + gtkut_list_view_select_row(cond_list_view, target_row); +} + +static void prefs_page_down(gpointer action, gpointer data) +{ + gint row, target_row, n_rows; + GtkTreeIter selected, target; + GtkTreeModel *model; + GtkTreePath *path; + GdkRectangle cell_rect, view_rect; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows -1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &selected, NULL, row)) + return; + + /* compute number of rows per page (approximation) */ + path = gtk_tree_model_get_path(model, &selected); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(cond_list_view), path, NULL, &cell_rect); + gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(cond_list_view), &view_rect); + gtk_tree_path_free(path); + target_row = row + (view_rect.height/cell_rect.height); + if (target_row > n_rows-1) + target_row = n_rows-1; + + if (!gtk_tree_model_iter_nth_child(model, &target, NULL, target_row)) + return; + gtk_list_store_move_after(GTK_LIST_STORE(model), &selected, &target); + gtkut_list_view_select_row(cond_list_view, target_row); +} + +static void prefs_top(gpointer action, gpointer data) +{ + gint row; + GtkTreeIter top, sel; + GtkTreeModel *model; + + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, 0) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row)) + return; + + gtk_list_store_move_after(GTK_LIST_STORE(model), &sel, &top); + gtkut_list_view_select_row(cond_list_view, 1); +} + +static void prefs_up(gpointer action, gpointer data) +{ + gint row; + GtkTreeIter top, sel; + GtkTreeModel *model; + + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row - 1) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row)) + return; + + gtk_list_store_swap(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, row - 1); +} + +static void prefs_down(gpointer action, gpointer data) +{ + gint row, n_rows; + GtkTreeIter top, sel; + GtkTreeModel *model; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows - 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row + 1)) + return; + + gtk_list_store_swap(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, row + 1); +} + +static void prefs_bottom(gpointer action, gpointer data) +{ + gint row, n_rows; + GtkTreeIter top, sel; + GtkTreeModel *model; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows - 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, n_rows - 1)) + return; + + gtk_list_store_move_after(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, n_rows - 1); +} + + +static void prefs_page_destroy_widget(PrefsPage *page) +{ + /* void */ +} + +gboolean vfolder_item_prefs_save(VFolderItem *vitem, gboolean autorefresh, + gint len, VFolderSearch *searches) +{ + gchar *id; + gchar *block; + PrefFile *pfile; + gchar *file; + gint r; + + if (!folder_item_parent((FolderItem *) vitem)) + return FALSE; + + id = folder_item_get_identifier((FolderItem *) vitem); + if (!id) + return FALSE; + block = g_strdup_printf("VFolder:%s", id); + g_free(id); + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDERITEM_RC, NULL); + pfile = prefs_write_open(file); + g_free(file); + if (!pfile) + { + g_warning("Failed to write VFolderItem configuration to file"); + return FALSE; + } + + r = prefs_set_block_label(pfile, block); + g_free(block); + if (r < 0) + return FALSE; + + if (autorefresh && fputs("!autorefresh\n", pfile->fp) == EOF) + goto fail; + + for (r = 0; r < len; ++r) + { + VFolderSearch *search = &searches[r]; + gchar *s; + + if (search->recursive && fputc('+', pfile->fp) == EOF) + goto fail; + + for (s = search->folder_id; s && *s != '\0'; ++s) + { + if ((*s == ' ' || *s == '\\') && fputc('\\', pfile->fp) == EOF) + goto fail; + if (fputc(*s, pfile->fp) == EOF) + goto fail; + } + + if (fputc(' ', pfile->fp) == EOF) + goto fail; + + if (fputs(search->cond, pfile->fp) == EOF) + goto fail; + + if (fputc('\n', pfile->fp) == EOF) + goto fail; + + continue; + +fail: + g_warning("Failed to write VFolderItem configuration to file"); + prefs_file_close_revert(pfile); + return FALSE; + } + + if (prefs_file_close(pfile) < 0) + { + g_warning("Failed to write VFolderItem configuration to file"); + return FALSE; + } + + return TRUE; +} + +static void prefs_page_save(PrefsPage *page) +{ + VFolderItemPrefsPage *vpage = (VFolderItemPrefsPage *) page; + VFolderItem *vitem = vpage->vitem; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + GtkTreeIter iter; + gint len = gtk_tree_model_iter_n_children(model, NULL) - 1 /* "New" placeholder*/; + gint i = 0; + VFolderSearch searches[len]; + + gtk_tree_model_get_iter_first(model, &iter); + while (gtk_tree_model_iter_next(model, &iter)) + { + VFolderSearch *search = &searches[i++]; + + gtk_tree_model_get(model, &iter, + PREFS_COL_FOLDER, &search->folder_id, + PREFS_COL_RECURSIVE, &search->recursive, + PREFS_COL_COND, &search->cond, + -1); + } + + if (vfolder_item_prefs_save(vitem, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autorefresh_btn)), + len, searches)) + { + vfolder_load_config(vitem, TRUE); + vfolder_refresh_content(vitem); + } + + for (i = 0; i < len; ++i) + { + VFolderSearch *search = &searches[i]; + g_free(search->folder_id); + g_free(search->cond); + } +} + +#undef _set_pref +#undef set_pref + +static VFolderItemPrefsPage vfolder_item_prefs_page; + +void vfolder_item_prefs_register(void) +{ + static gchar *pfi_path[2]; + + pfi_path[0] = _("Content"); + pfi_path[1] = NULL; + + vfolder_item_prefs_page.page.path = pfi_path; + vfolder_item_prefs_page.page.create_widget = prefs_page_create_widget; + vfolder_item_prefs_page.page.destroy_widget = prefs_page_destroy_widget; + vfolder_item_prefs_page.page.save_page = prefs_page_save; + + prefs_folder_item_register_page((PrefsPage *) &vfolder_item_prefs_page, + vfolder_get_class()); +} + +void vfolder_item_prefs_unregister(void) +{ + prefs_folder_item_register_page((PrefsPage *) &vfolder_item_prefs_page, + vfolder_get_class()); +} + +/* for plugin_gtk.c */ +void _vfolder_search_create(VFolderItem *vitem, GtkWindow *window, + GtkContainer *container) +{ + prefs_page_create_widget((PrefsPage *) &vfolder_item_prefs_page, window, vitem); + gtk_container_add(container, vfolder_item_prefs_page.page.widget); +} +void _vfolder_search_save(void) +{ + prefs_page_save((PrefsPage *) &vfolder_item_prefs_page); +} diff --git a/src/plugins/vfolder/vfolder_item_prefs.h b/src/plugins/vfolder/vfolder_item_prefs.h new file mode 100644 index 000000000..df56f60b4 --- /dev/null +++ b/src/plugins/vfolder/vfolder_item_prefs.h @@ -0,0 +1,33 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_ITEM_PREFS_H__ +#define __VFOLDER_ITEM_PREFS_H__ + +#include + +#include "vfolder.h" + +typedef struct _VFolderItemPrefsPage VFolderItemPrefsPage; + +void vfolder_item_prefs_register(void); +void vfolder_item_prefs_unregister(void); +gboolean vfolder_item_prefs_save(VFolderItem *vitem, gboolean autorefresh, + gint len, VFolderSearch *searches); + +#endif /* __VFOLDER_ITEM_PREFS_H__ */ diff --git a/src/plugins/vfolder/vfolder_prefs.c b/src/plugins/vfolder/vfolder_prefs.c new file mode 100644 index 000000000..5c2bb0a3e --- /dev/null +++ b/src/plugins/vfolder/vfolder_prefs.c @@ -0,0 +1,223 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "gtk/menu.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_common.h" +#include "prefs_gtk.h" +#include "alertpanel.h" +#include "foldersel.h" + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_prefs.h" + + +struct _VFolderPrefsPage +{ + PrefsPage page; +}; + +static GtkWidget *trash_btn; +static GtkWidget *trash_hide_btn; +static GtkWidget *reply_btn; +static GtkWidget *reply_hide_btn; +static GtkWidget *search_btn; +static GtkWidget *folder_entry; + +static void prefs_select_folder_cb(GtkWidget *widget, gpointer data) +{ + FolderItem *item; + + item = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL, FALSE); + if (item && item->path) + { + gchar *id = folder_item_get_identifier(item); + + if (id) + { + if (item->folder->klass != vfolder_get_class()) + alertpanel_error(_("'%s' is not a virtual folder."), id); + else + gtk_entry_set_text(GTK_ENTRY(data), id); + g_free(id); + } + } +} + +static void prefs_page_create_widget(PrefsPage *page, GtkWindow *window, gpointer data) +{ + VFolderConfig *vconfig = vfolder_get_config(); + + GtkWidget *vbox1; + GtkWidget *vbox2; + GtkWidget *box; + GtkWidget *w; + + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width(GTK_CONTAINER (vbox1), VBOX_BORDER); + + vbox2 = gtkut_get_options_frame (vbox1, NULL, _("Additional menu items")); + + w = gtk_label_new (_("Move (thread) to trash: " + "Perform as if from each message's source folder")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (vbox2, trash_btn, + _("Add 'Move (thread) to trash [VFolder]' menu items")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trash_btn), vconfig->add_trash); + + box = gtk_hbox_new (FALSE, 0); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + + w = gtk_label_new (" "); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (box, trash_hide_btn, + _("...and hide original menu items")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trash_hide_btn), + vconfig->hide_trash_org); + SET_TOGGLE_SENSITIVITY (trash_btn, trash_hide_btn); + + w = gtk_label_new (""); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + w = gtk_label_new (_("Reply: " + "Use folder properties from each message's source folder " + "(instead of virtual folder's)")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (vbox2, reply_btn, + _("Add 'Reply [VFolder]' menu item")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reply_btn), + vconfig->add_reply); + + box = gtk_hbox_new (FALSE, 0); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + + w = gtk_label_new (" "); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (box, reply_hide_btn, + _("...and hide original menu item")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reply_hide_btn), + vconfig->hide_reply_org); + SET_TOGGLE_SENSITIVITY (reply_btn, reply_hide_btn); + + + vbox2 = gtkut_get_options_frame (vbox1, NULL, _("Search results")); + + PACK_CHECK_BUTTON (vbox2, search_btn, + _("Enable 'search results' feature")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(search_btn), + vconfig->enable_search); + + box = gtk_hbox_new (FALSE, 2); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + SET_TOGGLE_SENSITIVITY(search_btn, box); + + w = gtk_label_new (_("Virtual folder to use:")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 1, 0.5); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + folder_entry = gtk_entry_new (); + gtk_widget_show (folder_entry); + gtk_box_pack_start (GTK_BOX (box), folder_entry, TRUE, TRUE, 0); + gtk_entry_set_text(GTK_ENTRY(folder_entry), vconfig->id_search_folder); + + w = gtkut_get_browse_file_btn(_("Browse")); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + g_signal_connect (G_OBJECT (w), "clicked", + G_CALLBACK (prefs_select_folder_cb), + folder_entry); + + page->widget = vbox1; +} + +static void prefs_page_destroy_widget(PrefsPage *page) +{ + /* void */ +} + +static void prefs_page_save(PrefsPage *page) +{ + VFolderConfig *vconfig = vfolder_get_config(); + + vconfig->add_trash = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(trash_btn)); + vconfig->hide_trash_org = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(trash_hide_btn)); + vconfig->add_reply = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(reply_btn)); + vconfig->hide_reply_org = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(reply_hide_btn)); + vconfig->enable_search = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(search_btn)); + g_free(vconfig->id_search_folder); + vconfig->id_search_folder = g_strdup( + gtk_entry_get_text(GTK_ENTRY(folder_entry))); + + if (vfolder_save_config()) + vfolder_gtk_set_menus(FALSE); +} + + +static VFolderPrefsPage vfolder_prefs_page; + +void vfolder_prefs_register(void) +{ + static gchar *pfi_path[3]; + + pfi_path[0] = _("Plugins"); + pfi_path[1] = _("VFolder"); + pfi_path[2] = NULL; + + vfolder_prefs_page.page.path = pfi_path; + vfolder_prefs_page.page.create_widget = prefs_page_create_widget; + vfolder_prefs_page.page.destroy_widget = prefs_page_destroy_widget; + vfolder_prefs_page.page.save_page = prefs_page_save; + + prefs_gtk_register_page((PrefsPage *) &vfolder_prefs_page); +} + +void vfolder_prefs_unregister(void) +{ + prefs_gtk_unregister_page((PrefsPage *) &vfolder_prefs_page); +} diff --git a/src/plugins/vfolder/vfolder_prefs.h b/src/plugins/vfolder/vfolder_prefs.h new file mode 100644 index 000000000..eb87f63f6 --- /dev/null +++ b/src/plugins/vfolder/vfolder_prefs.h @@ -0,0 +1,29 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PREFS_H__ +#define __VFOLDER_PREFS_H__ + +#include + +typedef struct _VFolderPrefsPage VFolderPrefsPage; + +void vfolder_prefs_register(void); +void vfolder_prefs_unregister(void); + +#endif /* __VFOLDER_PREFS_H__ */ -- 2.11.0 From epodata at gmail.com Sun Jan 15 21:22:26 2017 From: epodata at gmail.com (Erik P. Olsen) Date: Sun, 15 Jan 2017 21:22:26 +0100 Subject: [Users] SMTP issue. In-Reply-To: <20170115165800.49092e59@kujata> References: <20170115173413.687e4569@Erik-PC.epolan.dk> <20170115165800.49092e59@kujata> Message-ID: <20170115212226.1e4a16ed@Erik-PC.epolan.dk> On 2017-01-15 at 16:58:00 Paul wrote: > On Sun, 15 Jan 2017 17:34:13 +0100 > "Erik P. Olsen" wrote: > > > I am getting lots of following messages which apparently do not > > affect receiving mail: > > > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 > > > > Does anybody know what this means? The network log has no error > > messages. > > It means that you've mis-configured your account. Thanks. I think I now know what was wrong. Hopefully the messages won't pop up again. -- Erik From lists at lazygranch.com Sun Jan 15 21:31:48 2017 From: lists at lazygranch.com (lists at lazygranch.com) Date: Sun, 15 Jan 2017 12:31:48 -0800 Subject: [Users] SMTP issue. In-Reply-To: <20170115212226.1e4a16ed@Erik-PC.epolan.dk> References: <20170115173413.687e4569@Erik-PC.epolan.dk> <20170115165800.49092e59@kujata> <20170115212226.1e4a16ed@Erik-PC.epolan.dk> Message-ID: <20170115203148.5501012.23856.19982@lazygranch.com> Just curious. Was the solution a mix up between ports 587 and 25?   Original Message   From: Erik P. Olsen Sent: Sunday, January 15, 2017 12:22 PM To: users at lists.claws-mail.org Subject: Re: [Users] SMTP issue. On 2017-01-15 at 16:58:00 Paul wrote: > On Sun, 15 Jan 2017 17:34:13 +0100 > "Erik P. Olsen" wrote: > > > I am getting lots of following messages which apparently do not > > affect receiving mail: > > > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 > > > > Does anybody know what this means? The network log has no error > > messages. > > It means that you've mis-configured your account. Thanks. I think I now know what was wrong. Hopefully the messages won't pop up again. -- Erik _______________________________________________ Users mailing list Users at lists.claws-mail.org http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users From john at wexfordpress.com Sun Jan 15 21:56:55 2017 From: john at wexfordpress.com (John Culleton) Date: Sun, 15 Jan 2017 15:56:55 -0500 Subject: [Users] How to fire up bogofilter. Message-ID: <20170115155655.4fbc6987@acer3.locall.com> Slackware Linux 14.2 I installed bogofilter. I added directories Mailbox/Inbox/spam and Mailbox/Inbox/ham. I copied items to each of these directories.Now how do I make it work? I tried various scripts. Here is my latest: ------------------------------------------------------------- bogofilter -s #spam bogofilter -n #ham ----------------------------------------------------- The spam icon remains inoperative. What am I missing? -- John Culleton Wexfordpress Book design and indexing. From gour at atmarama.com Sun Jan 15 22:13:22 2017 From: gour at atmarama.com (Gour) Date: Sun, 15 Jan 2017 22:13:22 +0100 Subject: [Users] How to fire up bogofilter. References: <20170115155655.4fbc6987@acer3.locall.com> Message-ID: <20170115221322.0efad436@atmarama.dtdns.net> On Sun, 15 Jan 2017 15:56:55 -0500 John Culleton wrote: > I installed bogofilter. Have you installed Claws' bogofilter plugin? What about Configuration --> Preferences --> Bogfilter settings? > I tried various scripts. Here is my latest: No scripts are required to use Bogofilter with Claws - Claws does it all alone. ;) Sincerely, Gour > What am I missing? Do you have ~/bogofilter/wordlist.db ? What are its permissions? Sincerely, Gour -- The intricacies of action are very hard to understand. Therefore one should know properly what action is, what forbidden action is, and what inaction is. From silver.bullet at zoho.com Sun Jan 15 22:25:06 2017 From: silver.bullet at zoho.com (Ralf Mardorf) Date: Sun, 15 Jan 2017 22:25:06 +0100 Subject: [Users] How to fire up bogofilter. In-Reply-To: <20170115155655.4fbc6987@acer3.locall.com> References: <20170115155655.4fbc6987@acer3.locall.com> Message-ID: <20170115222506.13c64571@utnubu> On Sun, 15 Jan 2017 15:56:55 -0500, John Culleton wrote: >Slackware Linux 14.2 > >I installed bogofilter. I added directories Mailbox/Inbox/spam and >Mailbox/Inbox/ham. I copied items to each of these directories.Now how >do I make it work? I tried various scripts. Here is my latest: >------------------------------------------------------------- >bogofilter -s #spam >bogofilter -n #ham >----------------------------------------------------- >The spam icon remains inoperative. > >What am I missing? You could use scripts, but if you want to use Claws' toolbar icons use the plugin. Configure > Plugins... > Load ... "bogofilter.so" Configure > Preferences > Plugins > Bogofilter [x] Process messages on receiving Bogofilter call "bogofilter" From noreply at thewildbeast.co.uk Mon Jan 16 00:19:05 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sun, 15 Jan 2017 23:19:05 +0000 Subject: [Users] [Bug 3759] New: Keyboard shortcuts don't work in address book Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3759 Bug ID: 3759 Summary: Keyboard shortcuts don't work in address book Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: UI/Address Book Assignee: users at lists.claws-mail.org Reporter: psychonaut at nothingisreal.com In the address book (and only in the address book), none of the control-key keyboard shortcuts listed in the pull-down menus work for me. Most of the shortcuts do nothing at all, but some of them have an entirely different effect. For example: * Instead of editing the selected address, Ctrl+Return does nothing. * Instead of closing the window, Ctrl+W does nothing. * Instead of creating a new address, Ctrl+N selects the next address. -- You are receiving this mail because: You are the assignee for the bug. From psychonaut at nothingisreal.com Mon Jan 16 00:19:57 2017 From: psychonaut at nothingisreal.com (Tristan Miller) Date: Mon, 16 Jan 2017 00:19:57 +0100 Subject: [Users] Keyboard shortcuts not working in address book In-Reply-To: <20170114122846.000041bc@ihug.co.nz> References: <20170113234819.6f76893a.psychonaut@nothingisreal.com> <20170114122846.000041bc@ihug.co.nz> Message-ID: <20170116001957.36dbbf37.psychonaut@nothingisreal.com> Greetings. On Sat, 14 Jan 2017 12:28:46 +1300, kangaroo wrote: > I have the same issue, those shortcuts do not work for me. > Using 3.14.1-2newcairo release I've raised this on the issue tracker: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3759 Regards, Tristan -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tristan Miller Free Software developer, ferret herder, logologist https://logological.org/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Mon Jan 16 00:30:48 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sun, 15 Jan 2017 23:30:48 +0000 Subject: [Users] [Bug 3760] New: Can't change folder type more than once Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 Bug ID: 3760 Summary: Can't change folder type more than once Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: Folders Assignee: users at lists.claws-mail.org Reporter: psychonaut at nothingisreal.com Once a folder type has been changed to "Outbox" (and maybe also to other types – I didn't check) there doesn't seem to be any way of changing it, or any of its children, back again. Steps to reproduce: 1. Right-click on a regular IMAP folder that has child folders. 2. Select "Properties…". 3. Select "Outbox" from the "Folder type" drop-down list. 4. Press "OK". The folder and its children change type, as evidenced by the folder icons. 5. Right-click on the same folder, or any of its children. 6. Select "Properties…". 7. The "Folder type" drop-down box is now inactive. It is not possible to select a new value. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 01:38:54 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 00:38:54 +0000 Subject: [Users] [Bug 3760] Can't change folder type more than once In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 --- Comment #1 from Michael Schwendt --- > 7. The "Folder type" drop-down box is now inactive. > It is not possible to select a new value. That is because you need to make another folder the new "Outbox" first. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 09:45:58 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 08:45:58 +0000 Subject: [Users] [Bug 3760] Can't change folder type more than once In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Paul --- The MUST be an Outbox. You can set another folder as Outbox, but you can't change the only Outbox. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:45:15 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:45:15 +0000 Subject: [Users] [Bug 3734] undefined symbol error with flex-2.6.2 In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3734 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-16 11:31:02.847826699 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=13564846e2996c785f14d97d28c90c4b0a1b1acc Merge: 2bb1d3f 93c6983 Author: Colin Leroy Date: Mon Jan 16 11:31:02 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=93c6983e1c2f58c2ff0e580a1bf1942cf8f0f5d6 Author: Paul Date: Mon Jan 16 10:30:17 2017 +0000 fix bug 3734, 'undefined symbol error with flex-2.6.2' Patch by Ashish Gupta -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:48:21 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:48:21 +0000 Subject: [Users] [Bug 3716] Segmentation fault when trying to remove MH. In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3716 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:50:11 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:50:11 +0000 Subject: [Users] [Bug 3745] Incomplete version of mail remains in Queue folder after sending In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3745 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Paul --- no response, no useful information -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:52:52 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:52:52 +0000 Subject: [Users] [Bug 3575] "Reply to all" with some emails may have wrong TO:, but "reply" works fine In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3575 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:55:39 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:55:39 +0000 Subject: [Users] [Bug 3448] Show certificate expiry when selecting certificates In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3448 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins/Privacy/PGP |Plugins/Privacy/SMIME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Mon Jan 16 11:57:44 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 10:57:44 +0000 Subject: [Users] [Bug 3402] Claws Mail randomly segfaults with invalid pointer free() in slist_free_strings_full at utils.c:261 In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3402 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |WORKSFORME --- Comment #7 from Paul --- no response for 10 months or so... -- You are receiving this mail because: You are the assignee for the bug. From epodata at gmail.com Mon Jan 16 14:34:24 2017 From: epodata at gmail.com (Erik P. Olsen) Date: Mon, 16 Jan 2017 14:34:24 +0100 Subject: [Users] SMTP issue. SOLVED. In-Reply-To: <20170115165800.49092e59@kujata> References: <20170115173413.687e4569@Erik-PC.epolan.dk> <20170115165800.49092e59@kujata> Message-ID: <20170116143424.0fe3db69@Erik-PC.epolan.dk> On 2017-01-15 at 16:58:00 Paul wrote: > On Sun, 15 Jan 2017 17:34:13 +0100 > "Erik P. Olsen" wrote: > > > I am getting lots of following messages which apparently do not > > affect receiving mail: > > > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[17999]: Cannot open mail:25 > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Unable to locate mail > > Jan 15 07:42:04 Erik-PC sSMTP[18391]: Cannot open mail:25 > > > > Does anybody know what this means? The network log has no error > > messages. > > It means that you've mis-configured your account. Well, thanks. However, changing a wrong smtp port in one of my accounts only solved half the problem. The remainder was due to running the bacula back-up package. It sends messages through a hardcoded mail system called bsmtp and it uses smtp port 25 as default. The command is now changed to using port 2525 and the messages have disappeared. -- Erik From david.burleigh at gmx.com Mon Jan 16 14:43:51 2017 From: david.burleigh at gmx.com (David Burleigh) Date: Mon, 16 Jan 2017 08:43:51 -0500 Subject: [Users] Mail Merge? Message-ID: <20170116084351.404ba10e@DZ> Is there any way to do a mail-merge with Claws? I need to send a similar message to a long list of addresses, each with one word that is unique for that recipient. -- David Burleigh 828-475-5126 From clawsmail at kushwaha.com Mon Jan 16 15:09:33 2017 From: clawsmail at kushwaha.com (Abhay S. Kushwaha) Date: Mon, 16 Jan 2017 19:39:33 +0530 Subject: [Users] Mail Merge? In-Reply-To: <20170116084351.404ba10e@DZ> References: <20170116084351.404ba10e@DZ> Message-ID: <20170116193933.20304474@woody.netsolutions.in> Not natively from within Claws. You have multiple options otherwise. Two options are: 1. Use Python plug-in to code mail-merge functionality for yourself if you do it often enough. Maybe explore using templates to make things easier. 2. Use external scripts to do the mail-merge and invoke mail sending through Claws by using command-line. On Mon, 16 Jan 2017 08:43:51 -0500, David wrote: > Is there any way to do a mail-merge with Claws? I need to send a > similar message to a long list of addresses, each with one word > that is unique for that recipient. From david.burleigh at gmx.com Mon Jan 16 15:20:31 2017 From: david.burleigh at gmx.com (David Burleigh) Date: Mon, 16 Jan 2017 09:20:31 -0500 Subject: [Users] Mail Merge? In-Reply-To: <20170116193933.20304474@woody.netsolutions.in> References: <20170116084351.404ba10e@DZ> <20170116193933.20304474@woody.netsolutions.in> Message-ID: <20170116092017.1b71fc45@DZ> Ok, thank you. On Mon, 16 Jan 2017 19:39:33 +0530 "Abhay S. Kushwaha" wrote: > Not natively from within Claws. > > You have multiple options otherwise. Two options are: > 1. Use Python plug-in to code mail-merge functionality for yourself > if you do it often enough. Maybe explore using templates to make > things easier. > 2. Use external scripts to do the mail-merge and invoke mail sending > through Claws by using command-line. > > > On Mon, 16 Jan 2017 08:43:51 -0500, David wrote: > > [...] > _______________________________________________ > Users mailing list > Users at lists.claws-mail.org > http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users From noreply at thewildbeast.co.uk Mon Jan 16 17:07:30 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Mon, 16 Jan 2017 16:07:30 +0000 Subject: [Users] [Bug 2260] quicksearch: allow filtering expressions be part of logical expressions In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2260 Ricardo Mones changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Other |QuickSearch -- You are receiving this mail because: You are the assignee for the bug. From slitt at troubleshooters.com Mon Jan 16 19:31:16 2017 From: slitt at troubleshooters.com (Steve Litt) Date: Mon, 16 Jan 2017 13:31:16 -0500 Subject: [Users] New install claws-mail In-Reply-To: <20170115153027.640532fa.edodd55@gmail.com> References: <20170115125838.26df47d1.edodd55@gmail.com> <20170114211317.54a826e8@jhegaala.localdomain> <20170115153027.640532fa.edodd55@gmail.com> Message-ID: <20170115223444.3dbecdad@mydesk.domain.cxm> On Sun, 15 Jan 2017 15:30:27 +1100 Liz wrote: > I imported the mail from kmail with a perl script from the website. > > Now he is busy making all his required filters. > > Liz I tried a perl script when I converted from Kmail to Claws 5 years ago, but the script made a bunch of huge files unreadable by any import. What I finally did is IMAP copied all my folders to a different tree, then from Claws made an account that got its folders from that different tree. From there, you can copy to a local tree. If you don't want your business on gmail, you can install Dovecot locally and do it that way. The local Dovecot route is also MUCH faster. I liked my Dovecot local IMAP server so much that it still holds all my email, and I use Claws just as a window into my IMAP server. SteveT From john at wexfordpress.com Mon Jan 16 21:25:56 2017 From: john at wexfordpress.com (John Culleton) Date: Mon, 16 Jan 2017 15:25:56 -0500 Subject: [Users] Routing mail by source to directory. Message-ID: <20170116152556.01daa183@acer3.locall.com> I set this function up years ago but forgot how. I receive mail from many sources addressed to my above address. I want to set up things so that claws-mail will split incoming mail up by the source into separate directories. How do I do this? -- John Culleton Wexfordpress Book design and indexing. From john at wexfordpress.com Mon Jan 16 21:34:04 2017 From: john at wexfordpress.com (John Culleton) Date: Mon, 16 Jan 2017 15:34:04 -0500 Subject: [Users] Getting bogofilter to work. Message-ID: <20170116153404.418ff86b@acer3.locall.com> Forgot how. Here is my script. Doesn't work. bogofilter -s #spam bogofilter -n #ham spam and ham folders are subordinate to Inbox which is subordinate to Mailbox(MH) John Culleton Wexfordpress Book design and indexing. From noreply at thewildbeast.co.uk Tue Jan 17 01:05:08 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 00:05:08 +0000 Subject: [Users] [Bug 2260] quicksearch: allow filtering expressions be part of logical expressions In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2260 Ricardo Mones changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |LATER --- Comment #2 from Ricardo Mones --- Updated info to inform about this limitation: http://git.claws-mail.org/?p=claws.git;a=commit;h=518c0b205ef4cf95b2ef284c42fff72468edaac2 -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Tue Jan 17 11:05:28 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 17 Jan 2017 10:05:28 +0000 Subject: [Users] Routing mail by source to directory. In-Reply-To: <20170116152556.01daa183@acer3.locall.com> References: <20170116152556.01daa183@acer3.locall.com> Message-ID: <20170117100528.36e93f8f@kujata> On Mon, 16 Jan 2017 15:25:56 -0500 John Culleton wrote: > I set this function up years ago but forgot how. I receive mail from > many sources addressed to my above address. I want to set up things > so that claws-mail will split incoming mail up by the source into > separate directories. How do I do this? /Configuration/Filtering with regards Paul From claws at thewildbeast.co.uk Tue Jan 17 11:05:55 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 17 Jan 2017 10:05:55 +0000 Subject: [Users] Getting bogofilter to work. In-Reply-To: <20170116153404.418ff86b@acer3.locall.com> References: <20170116153404.418ff86b@acer3.locall.com> Message-ID: <20170117100555.49703456@kujata> On Mon, 16 Jan 2017 15:34:04 -0500 John Culleton wrote: > bogofilter -s #spam > bogofilter -n #ham > spam and ham folders are subordinate to Inbox which is subordinate > to Mailbox(MH) Try the Bogofilter plugin. with regards Paul From noreply at thewildbeast.co.uk Tue Jan 17 11:54:42 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 10:54:42 +0000 Subject: [Users] [Bug 3761] New: drafts should be deleted after a mail has been sent Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 Bug ID: 3761 Summary: drafts should be deleted after a mail has been sent Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: Folders/IMAP Assignee: users at lists.claws-mail.org Reporter: johannes at selfnet.de Claws Mail frequently saves a draft of a new mail in the IMAP drafts folder while it is being created. Once the mail has been sent, the draft remains in the draft folder and appears as unfinished in other clients although it can be considered finished when sent. Claws Mail should delete a draft when the corresponding mail is sent. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 12:08:20 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 11:08:20 +0000 Subject: [Users] [Bug 3761] drafts should be deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Paul --- They are. Unless you use gmail and its 'irregular' version of imap. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 12:09:10 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 11:09:10 +0000 Subject: [Users] [Bug 3571] recipient list lost and truncated In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3571 Ricardo Mones changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-16 16:45:03.254801283 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=1e61dd9a91481b33bceaf39cda057dfb2ffa8a30 Merge: 087e046 989b3a3 Author: Colin Leroy Date: Mon Jan 16 16:45:02 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=989b3a3f51c691b0bb0fd48521063a8c76d269ce Author: wwp Date: Mon Jan 16 16:35:13 2017 +0100 Fix bug 3571, 'recipient list lost and truncated' by replacing lots of fixed-size buffers with dynamically allocated ones. Also enforce checks by adding or fixing few sanity tests, fix returned value of some functions in some tricky cases. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 13:56:16 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 12:56:16 +0000 Subject: [Users] [Bug 3251] A translated In-Reply-To header is sent translated In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3251 wwp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-17 13:44:02.576403989 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=64a91c27cbdc90ca6f5c9bad8eecc121ece389de Merge: 28214f6 c0505b8 Author: Colin Leroy Date: Tue Jan 17 13:44:01 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=c0505b80f173768b393ba6f21f99889144f293f1 Author: wwp Date: Tue Jan 17 13:41:52 2017 +0100 Fix bug 3251, 'A translated In-Reply-To header is sent translated' by making sure we're always storing untranslated headers. Optimize and sanitize a bit the code around it, too. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 13:56:29 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 12:56:29 +0000 Subject: [Users] [Bug 3251] A translated In-Reply-To header is sent translated In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3251 wwp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 16:09:16 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 15:09:16 +0000 Subject: [Users] [Bug 3761] drafts should be deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 johannes at selfnet.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #2 from johannes at selfnet.de --- It's not gmail. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 16:19:39 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 15:19:39 +0000 Subject: [Users] [Bug 3761] drafts should be deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #3 from Paul --- You need to provide more information, because this WORKSFORME -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 17 23:46:06 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 22:46:06 +0000 Subject: [Users] [Bug 3761] drafts should be deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #4 from johannes at selfnet.de --- What do you need? I have 3 accounts configured. It happens regularly with one of them -- which is not Gmail. When sending mail through Gmail, I have never experienced that bug so far. I rarely use the third one for sending, so I don't know if it would happen there too. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 00:00:21 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 23:00:21 +0000 Subject: [Users] [Bug 3761] drafts should be deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #5 from Paul --- The network log or --debug output is a good starting place. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 00:01:28 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 17 Jan 2017 23:01:28 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|drafts should be deleted |drafts msgs are sometimes |after a mail has been sent |not deleted after a mail | |has been sent -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 05:27:37 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 04:27:37 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #6 from Jonathan Corbet --- FWIW, I see this too, have for some time. I've never had a chance to try to figure out what circumstances cause a draft to stay around. Not gmail here either; it's a dovecot IMAP server. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 08:57:07 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 07:57:07 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #7 from johannes at selfnet.de --- Created attachment 1711 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1711&action=edit log -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 08:57:39 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 07:57:39 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #8 from johannes at selfnet.de --- It just happened to happen again, so I could cut out the relevant parts from the log. >From line 405 to 441 the mail is being sent. In line 899 you can see that there is a mail in the drafts folder - the one I just sent. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 09:49:16 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 08:49:16 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #9 from daniel --- I've seen this behavior with dovecot mail server with pretty much default config. In my case during email composing several drafts showed in drafts folder and after send they remained there for minutes or hours before their deletion. Client was always TB. But I did not considered it to be too big issue to report it. -- You are receiving this mail because: You are the assignee for the bug. From subscript at free.fr Wed Jan 18 13:50:43 2017 From: subscript at free.fr (wwp) Date: Wed, 18 Jan 2017 13:50:43 +0100 Subject: [Users] [PATCH 1/4] summaryview: Minor fix In-Reply-To: <20170115181421.7816-1-jjk@jjacky.com> References: <20170115190904.404843df@jjacky.com> <20170115181421.7816-1-jjk@jjacky.com> Message-ID: <20170118135043.3548fd4f@anthra> Hello Olivier, On Sun, 15 Jan 2017 19:14:18 +0100 Olivier Brunel wrote: > Update current folder name only if the renamed folder is the current one > > Signed-off-by: Olivier Brunel > --- > src/summaryview.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/summaryview.c b/src/summaryview.c > index ff511add1..9d88202a0 100644 > --- a/src/summaryview.c > +++ b/src/summaryview.c > @@ -8082,7 +8082,8 @@ static gboolean summary_update_folder_item_hook(gpointer source, gpointer data) > cm_return_val_if_fail(hookdata->item != NULL, FALSE); > cm_return_val_if_fail(summaryview != NULL, FALSE); > > - if (hookdata->update_flags & F_ITEM_UPDATE_NAME) { > + if (hookdata->item == summaryview->folder_item > + && hookdata->update_flags & F_ITEM_UPDATE_NAME) { > gchar *name = folder_item_get_name(hookdata->item); > gtk_label_set_text(GTK_LABEL(summaryview->statlabel_folder), name); > g_free(name); That sounds correct to me, but could you elaborate a bit about the possible problematic conditions, how did you end up w/ that patch? Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From subscript at free.fr Wed Jan 18 13:50:56 2017 From: subscript at free.fr (wwp) Date: Wed, 18 Jan 2017 13:50:56 +0100 Subject: [Users] [PATCH 2/4] prefs_filtering: Add missing shadow on the list In-Reply-To: <20170115181421.7816-2-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> <20170115181421.7816-2-jjk@jjacky.com> Message-ID: <20170118135056.7af2e4da@anthra> Hello Olivier, On Sun, 15 Jan 2017 19:14:19 +0100 Olivier Brunel wrote: > Looks better. Also more consistent, since such shadow is used on about > every other window (conditions, actions...) > > Signed-off-by: Olivier Brunel > --- > src/prefs_filtering.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c > index ea2d195a1..3a57c24a9 100644 > --- a/src/prefs_filtering.c > +++ b/src/prefs_filtering.c > @@ -508,6 +508,8 @@ static void prefs_filtering_create(void) > > cond_scrolledwin = gtk_scrolled_window_new (NULL, NULL); > gtk_widget_show (cond_scrolledwin); > + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(cond_scrolledwin), > + GTK_SHADOW_ETCHED_IN); > gtk_widget_set_size_request (cond_scrolledwin, -1, 150); > gtk_box_pack_start (GTK_BOX (cond_hbox), cond_scrolledwin, > TRUE, TRUE, 0); Yes, indeed! Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From subscript at free.fr Wed Jan 18 13:51:36 2017 From: subscript at free.fr (wwp) Date: Wed, 18 Jan 2017 13:51:36 +0100 Subject: [Users] [PATCH 3/4] plugins/notification: Update more tray's items sensitivity In-Reply-To: <20170115181421.7816-3-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> <20170115181421.7816-3-jjk@jjacky.com> Message-ID: <20170118135136.18cda958@anthra> Hello Olivier, On Sun, 15 Jan 2017 19:14:20 +0100 Olivier Brunel wrote: > Only the "Get Mail" menu item of the tray's popup was disabled when > Claws is locked, but the per-account get mail & Exit also should be. > > Signed-off-by: Olivier Brunel > --- > src/plugins/notification/notification_trayicon.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/plugins/notification/notification_trayicon.c b/src/plugins/notification/notification_trayicon.c > index 720183722..fff19e72d 100644 > --- a/src/plugins/notification/notification_trayicon.c > +++ b/src/plugins/notification/notification_trayicon.c > @@ -469,6 +469,8 @@ static void notification_trayicon_on_popup_menu(GtkStatusIcon *status_icon, > cm_toggle_menu_set_active("SysTrayiconPopup/ShowBubbles", notify_config.trayicon_popup_enabled); > #endif > cm_menu_set_sensitive("SysTrayiconPopup/GetMail", mainwin->lock_count == 0); > + cm_menu_set_sensitive("SysTrayiconPopup/GetMailAcc", mainwin->lock_count == 0); > + cm_menu_set_sensitive("SysTrayiconPopup/Exit", mainwin->lock_count == 0); > > updating_menu = FALSE; And yes to that one too, my mistake when I added GetMailAcc. Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From subscript at free.fr Wed Jan 18 14:11:22 2017 From: subscript at free.fr (wwp) Date: Wed, 18 Jan 2017 14:11:22 +0100 Subject: [Users] [PATCH 4/4] Add vfolder plugin In-Reply-To: <20170115181421.7816-4-jjk@jjacky.com> References: <20170115181421.7816-1-jjk@jjacky.com> <20170115181421.7816-4-jjk@jjacky.com> Message-ID: <20170118141122.01d568af@anthra> Hello Olivier, On Sun, 15 Jan 2017 19:14:21 +0100 Olivier Brunel wrote: > This adds support for "Virtual folders" aka folders that show search > results. Unlike elsewhere in Claws, such folders can include messages > from different folders. In fact, they can show combined results of > multiple searches (useful to do same search in multiple (non related, > i.e. can't be done simply via recursive search) folders). [snip] Interesting, promising and appetizing.. but it cannot run on CentOS6 (GTK+ 2.2x) at least: vfolder.c:797: warning: implicit declaration of function 'g_array_set_clear_func' (and fails at runtime, missing that symbol) Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From subscript at free.fr Wed Jan 18 15:06:44 2017 From: subscript at free.fr (wwp) Date: Wed, 18 Jan 2017 15:06:44 +0100 Subject: [Users] [PATCH 4/4] Add vfolder plugin In-Reply-To: <20170118141122.01d568af@anthra> References: <20170115181421.7816-1-jjk@jjacky.com> <20170115181421.7816-4-jjk@jjacky.com> <20170118141122.01d568af@anthra> Message-ID: <20170118150644.47f01747@anthra> On Wed, 18 Jan 2017 14:11:22 +0100 wwp wrote: > Hello Olivier, > > > On Sun, 15 Jan 2017 19:14:21 +0100 Olivier Brunel wrote: > > > This adds support for "Virtual folders" aka folders that show search > > results. Unlike elsewhere in Claws, such folders can include messages > > from different folders. In fact, they can show combined results of > > multiple searches (useful to do same search in multiple (non related, > > i.e. can't be done simply via recursive search) folders). > [snip] > > Interesting, promising and appetizing.. but it cannot run on CentOS6 > (GTK+ 2.2x) at least: > > vfolder.c:797: warning: implicit declaration of function 'g_array_set_clear_func' > > (and fails at runtime, missing that symbol) Er.. I meant GLIB 2.2x. BTW, the requirements for building CM are: glib-2.0 >= 2.20 gmodule-2.0 >= 2.20 gobject-2.0 >= 2.20 gthread-2.0 >= 2.20 gtk+-2.0 >= 2.16 Regards, -- wwp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Wed Jan 18 18:17:08 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 17:17:08 +0000 Subject: [Users] [Bug 3762] New: Testing latest patch level fails queueing on redirects Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 Bug ID: 3762 Summary: Testing latest patch level fails queueing on redirects Classification: Unclassified Product: Claws Mail Version: other Hardware: PC OS: Linux Status: NEW Severity: major Priority: P3 Component: Other Assignee: users at lists.claws-mail.org Reporter: lbickley at bickleywest.com Tested Claws version 3.14.1-148-gff51ee. No errors in compilation. After startup produced the message "Cannot queue" on every "redirect" from matches in my filters. My system is: GTK+ 2.24.31 / GLib 2.48.2 Locale: en_US.UTF-8 (charset: UTF-8) Operating System: Linux 4.4.36-8-default (x86_64) OpenSUSE Leap 42-2 KDE Plasma 5.8.3 KDE Framworks 5.26.0 QT Version 5.6.1 Hardware: 6 x AMD FX-6100 Six-Core Memory: 16GB RAM -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 18:38:26 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 17:38:26 +0000 Subject: [Users] [Bug 3762] Filter Action 'redirect' fails In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Version|other |GIT Summary|Testing latest patch level |Filter Action 'redirect' |fails queueing on redirects |fails -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 18:40:49 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 17:40:49 +0000 Subject: [Users] [Bug 3762] Filter Action 'redirect' fails In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 wwp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from wwp --- We reproduce this, even on performing a redirection manually. Thanks for reporting! -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Wed Jan 18 18:49:25 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 17:49:25 +0000 Subject: [Users] [Bug 3762] 'redirect' fails In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Filter Action 'redirect' |'redirect' fails |fails | -- You are receiving this mail because: You are the assignee for the bug. From jjk at jjacky.com Wed Jan 18 18:51:08 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Wed, 18 Jan 2017 18:51:08 +0100 Subject: [Users] [PATCH 1/4] summaryview: Minor fix In-Reply-To: <20170118135043.3548fd4f@anthra> References: <20170115190904.404843df@jjacky.com> <20170115181421.7816-1-jjk@jjacky.com> <20170118135043.3548fd4f@anthra> Message-ID: <20170118185046.574f782d@jjacky.com> On Wed, 18 Jan 2017 13:50:43 +0100 wwp wrote: > Hello Olivier, > > > On Sun, 15 Jan 2017 19:14:18 +0100 Olivier Brunel > wrote: > > > Update current folder name only if the renamed folder is the > > current one > > > > Signed-off-by: Olivier Brunel > > --- > > src/summaryview.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/src/summaryview.c b/src/summaryview.c > > index ff511add1..9d88202a0 100644 > > --- a/src/summaryview.c > > +++ b/src/summaryview.c > > @@ -8082,7 +8082,8 @@ static gboolean > > summary_update_folder_item_hook(gpointer source, gpointer data) > > cm_return_val_if_fail(hookdata->item != NULL, FALSE); > > cm_return_val_if_fail(summaryview != NULL, FALSE); > > - if (hookdata->update_flags & F_ITEM_UPDATE_NAME) { > > + if (hookdata->item == summaryview->folder_item > > + && hookdata->update_flags & F_ITEM_UPDATE_NAME) { > > gchar *name = folder_item_get_name(hookdata->item); > > gtk_label_set_text(GTK_LABEL(summaryview->statlabel_folder), > > name); g_free(name); > > That sounds correct to me, but could you elaborate a bit about the > possible problematic conditions, how did you end up w/ that patch? Well, that label is meant to show the name of the currently opened folder, but one can rename any folder. I did notice this looking at the code, but you can reproduce it simply by renaming any folder other than the current one, and see that the name of the currently open folder in summaryview is updated to the new name of the renamed folder, which is obviously wrong. > Regards, > From jjk at jjacky.com Wed Jan 18 19:08:45 2017 From: jjk at jjacky.com (Olivier Brunel) Date: Wed, 18 Jan 2017 19:08:45 +0100 Subject: [Users] [PATCH v2] Add vfolder plugin In-Reply-To: <20170115190904.404843df@jjacky.com> References: <20170115190904.404843df@jjacky.com> Message-ID: <20170118180845.17452-1-jjk@jjacky.com> This adds support for "Virtual folders" aka folders that show search results. Unlike elsewhere in Claws, such folders can include messages from different folders. In fact, they can show combined results of multiple searches (useful to do same search in multiple (non related, i.e. can't be done simply via recursive search) folders). What is done to "virtual messages" is relayed to the source ones: flags, tags, etc (Re)moving such messages will also be done on the source ones, obviously. Searches are set under a folder's properties, new page "Content" Some general options are also available under Preferences/Plugins/VFolder, to add some VFolder-version of known features: - Move to trash: so that it is applied as if from the source folder, so messages are moved to their respective correct trashes. - Reply: so that used folder properties are of the source folders (and not the virtual one) A new menu "Find in source folder" will also be available from virtual folders. Lastly, a 'search results' feature is provided, which is really just a quick way to edit the "Content" properties of a given virtual folder and go there. So it does feel somewhat like a "classic" search feature. Signed-off-by: Olivier Brunel --- v2: Fix minimum requirement of glib being 2.20 configure.ac | 15 + src/plugins/Makefile.am | 3 +- src/plugins/vfolder/Makefile.am | 37 + src/plugins/vfolder/plugin.c | 158 ++++ src/plugins/vfolder/plugin.h | 52 ++ src/plugins/vfolder/plugin_gtk.c | 879 +++++++++++++++++++ src/plugins/vfolder/plugin_gtk.h | 31 + src/plugins/vfolder/vfolder.c | 1389 ++++++++++++++++++++++++++++++ src/plugins/vfolder/vfolder.h | 59 ++ src/plugins/vfolder/vfolder_item_prefs.c | 1101 +++++++++++++++++++++++ src/plugins/vfolder/vfolder_item_prefs.h | 33 + src/plugins/vfolder/vfolder_prefs.c | 223 +++++ src/plugins/vfolder/vfolder_prefs.h | 29 + 13 files changed, 4008 insertions(+), 1 deletion(-) create mode 100644 src/plugins/vfolder/Makefile.am create mode 100644 src/plugins/vfolder/plugin.c create mode 100644 src/plugins/vfolder/plugin.h create mode 100644 src/plugins/vfolder/plugin_gtk.c create mode 100644 src/plugins/vfolder/plugin_gtk.h create mode 100644 src/plugins/vfolder/vfolder.c create mode 100644 src/plugins/vfolder/vfolder.h create mode 100644 src/plugins/vfolder/vfolder_item_prefs.c create mode 100644 src/plugins/vfolder/vfolder_item_prefs.h create mode 100644 src/plugins/vfolder/vfolder_prefs.c create mode 100644 src/plugins/vfolder/vfolder_prefs.h diff --git a/configure.ac b/configure.ac index 9e031c81f..38240591f 100644 --- a/configure.ac +++ b/configure.ac @@ -1068,6 +1068,10 @@ AC_ARG_ENABLE(vcalendar-plugin, [ --disable-vcalendar-plugin Do not build vcalendar plugin], [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto]) +AC_ARG_ENABLE(vfolder-plugin, + [ --disable-vfolder-plugin Do not build vfolder plugin], + [enable_vfolder_plugin=$enableval], [enable_vfolder_plugin=auto]) + dnl disabled by default AC_ARG_ENABLE(demo-plugin, [ --enable-demo-plugin Build demo plugin], @@ -1849,6 +1853,15 @@ else AC_MSG_RESULT(no) fi +AC_MSG_CHECKING([whether to build vfolder plugin]) +if test x"$enable_vfolder_plugin" != xno; then + PLUGINS="$PLUGINS vfolder" + AC_MSG_RESULT(yes) +else + DISABLED_PLUGINS="$DISABLED_PLUGINS vfolder" + AC_MSG_RESULT(no) +fi + dnl And finally the automake conditionals. AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno) @@ -1881,6 +1894,7 @@ AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" != AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno) AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno) AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno) +AM_CONDITIONAL(BUILD_VFOLDER_PLUGIN, test x"$enable_vfolder_plugin" != xno) dnl **************************** @@ -1937,6 +1951,7 @@ src/plugins/vcalendar/libical/libical/icalversion.h src/plugins/vcalendar/libical/libical/Makefile src/plugins/vcalendar/libical/design-data/Makefile src/plugins/vcalendar/libical/scripts/Makefile +src/plugins/vfolder/Makefile doc/Makefile doc/man/Makefile tools/Makefile diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index 6acc1fb36..e42d066e8 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -32,4 +32,5 @@ SUBDIRS = \ spamassassin \ spam_report \ tnef_parse \ - vcalendar + vcalendar \ + vfolder diff --git a/src/plugins/vfolder/Makefile.am b/src/plugins/vfolder/Makefile.am new file mode 100644 index 000000000..67f01a8c3 --- /dev/null +++ b/src/plugins/vfolder/Makefile.am @@ -0,0 +1,37 @@ +# Copyright 1999-2014 the Claws Mail team. +# This file is part of Claws Mail package, and distributed under the +# terms of the General Public License version 3 (or later). +# See COPYING file for license details. + +plugindir = $(pkglibdir)/plugins + +if BUILD_VFOLDER_PLUGIN +plugin_LTLIBRARIES = vfolder.la +endif + +vfolder_la_SOURCES = \ + plugin.c plugin.h \ + vfolder.c vfolder.h \ + vfolder_item_prefs.c vfolder_item_prefs.h \ + vfolder_prefs.c vfolder_prefs.h \ + plugin_gtk.c plugin_gtk.h + +vfolder_la_LDFLAGS = \ + -avoid-version -module + +if CYGWIN +cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail +else +cygwin_export_lib = +endif + +vfolder_la_LIBADD = $(cygwin_export_lib) \ + $(GTK_LIBS) + +vfolder_la_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) diff --git a/src/plugins/vfolder/plugin.c b/src/plugins/vfolder/plugin.c new file mode 100644 index 000000000..beb90bdd9 --- /dev/null +++ b/src/plugins/vfolder/plugin.c @@ -0,0 +1,158 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + + +#include "version.h" +#include "claws.h" +#include "plugin.h" +#include "utils.h" +#include "hooks.h" +#include "main.h" +#include "common/plugin.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_gtk.h" + +#include "vfolder.h" +#include "plugin_gtk.h" + + +static VFolderConfig vconfig; +static PrefParam param[] = +{ + { "add_trash", "TRUE", &vconfig.add_trash, P_BOOL, + NULL, NULL, NULL }, + { "hide_trash_org", "TRUE", &vconfig.hide_trash_org, P_BOOL, + NULL, NULL, NULL }, + + { "add_reply", "TRUE", &vconfig.add_reply, P_BOOL, + NULL, NULL, NULL }, + { "hide_reply_org", "FALSE", &vconfig.hide_reply_org, P_BOOL, + NULL, NULL, NULL }, + + { "enable_search", "FALSE", &vconfig.enable_search, P_BOOL, + NULL, NULL, NULL }, + { "id_search_folder", "", &vconfig.id_search_folder, P_STRING, + NULL, NULL, NULL }, + + { NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL } +}; + +VFolderConfig *vfolder_get_config(void) +{ + return &vconfig; +} + +gboolean vfolder_save_config(void) +{ + PrefFile *pfile; + gchar *file; + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); + pfile = prefs_write_open(file); + g_free(file); + + if (!pfile) + return FALSE; + if (prefs_set_block_label(pfile, "VFolder") < 0) + return FALSE; + + if (prefs_write_param(param, pfile->fp) < 0) + { + g_warning("Failed to write VFolder configuration to file"); + prefs_file_close_revert(pfile); + return FALSE; + } + + if (prefs_file_close(pfile) < 0) + { + g_warning("Failed to write configuration to file"); + return FALSE; + } + + return TRUE; +} + +gint plugin_init(gchar **error) +{ + gchar *file; + gint r; + + r = check_plugin_version(MAKE_NUMERIC_VERSION(3,8,1,46), + VERSION_NUMERIC, PLUGIN_NAME, error); + if (r < 0) + return r; + + folder_register_class(vfolder_get_class()); + + prefs_set_default(param); + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); + prefs_read_config(param, "VFolder", file, NULL); + g_free(file); + + r = vfolder_gtk_init(error); + if (r < 0) + return r; + + return 0; +} + +gboolean plugin_done(void) +{ + vfolder_gtk_done(); + if (!claws_is_exiting()) + folder_unregister_class(vfolder_get_class()); + return TRUE; +} + +const gchar *plugin_name(void) +{ + return PLUGIN_NAME; +} + +const gchar *plugin_desc(void) +{ + return _("This Plugin adds virtual folders."); +} + +const gchar *plugin_type(void) +{ + return "GTK2"; +} + +const gchar *plugin_licence(void) +{ + return "GPL3+"; +} + +const gchar *plugin_version(void) +{ + return VERSION; +} + +struct PluginFeature *plugin_provides(void) +{ + static struct PluginFeature features[] = { + { PLUGIN_FOLDERCLASS, N_("VFolder") }, + { PLUGIN_NOTHING, NULL } + }; + return features; +} diff --git a/src/plugins/vfolder/plugin.h b/src/plugins/vfolder/plugin.h new file mode 100644 index 000000000..9ef20708d --- /dev/null +++ b/src/plugins/vfolder/plugin.h @@ -0,0 +1,52 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PLUGIN_H__ +#define __VFOLDER_PLUGIN_H__ + +#include + +#define PLUGIN_NAME (_("VFolder")) + +#if 0 +#define dbg(...) g_printf(__VA_ARGS__) +#else +#define dbg(...) debug_print(__VA_ARGS__) +#endif + +#include "vfolder.h" + +typedef struct _VFolderConfig VFolderConfig; + + +struct _VFolderConfig +{ + gboolean add_reply; + gboolean hide_reply_org; + + gboolean add_trash; + gboolean hide_trash_org; + + gboolean enable_search; + gchar *id_search_folder; +}; + +VFolderConfig *vfolder_get_config(void); +gboolean vfolder_save_config(void); + +#endif /* __VFOLDER_PLUGIN_H__ */ diff --git a/src/plugins/vfolder/plugin_gtk.c b/src/plugins/vfolder/plugin_gtk.c new file mode 100644 index 000000000..7c28d2581 --- /dev/null +++ b/src/plugins/vfolder/plugin_gtk.c @@ -0,0 +1,879 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include + +#include "plugin.h" +#include "folder.h" +#include "mainwindow.h" +#include "folderview.h" +#include "inputdialog.h" +#include "foldersel.h" +#include "alertpanel.h" +#include "main.h" +#include "menu.h" +#include "account.h" +#include "prefs_actions.h" +#include "summaryview.h" +#include "folder_item_prefs.h" +#include "toolbar.h" +#include "prefs_toolbar.h" +#include "manage_window.h" + + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_item_prefs.h" +#include "vfolder_prefs.h" + + +static void add_mailbox(GtkAction *action, gpointer data); +static void refresh_content(GtkAction *action, gpointer data); +static void remove_mailbox(GtkAction *action, gpointer data); +static void new_folder(GtkAction *action, gpointer data); +static void rename_folder(GtkAction *action, gpointer data); +static void move_folder(GtkAction *action, gpointer data); +static void delete_folder(GtkAction *action, gpointer data); +static void move_to_trash(GtkAction *action, gpointer data); +static void move_thread_to_trash(GtkAction *action, gpointer data); +static void find_in_src_folder(GtkAction *action, gpointer data); +static void reply(GtkAction *action, gpointer data); +static void search(GtkAction *action, gpointer data); + + +static GtkActionEntry mainwindow_actions[] = { + { "File/AddMailbox/VFolder", NULL, "VFolder...", + NULL, NULL, G_CALLBACK(add_mailbox) }, + { "Message/TrashVF", NULL, N_("Move to _trash [VFolder]"), + NULL, NULL, G_CALLBACK(move_to_trash) }, + { "Message/TrashThreadVF", NULL, N_("Move thread to tr_ash [VFolder]"), + NULL, NULL, G_CALLBACK(move_thread_to_trash) }, + { "Message/FindInSrcFolder", NULL, N_("Find in source folder [VFolder]"), + NULL, NULL, G_CALLBACK(find_in_src_folder) }, + { "Message/ReplyVF", NULL, N_("_Reply [VFolder]"), + NULL, NULL, G_CALLBACK(reply) }, + { "Edit/SearchVF", NULL, N_("_Search... [VFolder]"), + NULL, NULL, G_CALLBACK(search) } +}; + +static GtkActionEntry vfolder_popup_entries[] = { + { "FolderViewPopup/CreateNewFolder", NULL, N_("Create _new folder..."), + NULL, NULL, G_CALLBACK(new_folder) }, + { "FolderViewPopup/RenameFolder", NULL, N_("_Rename folder..."), + NULL, NULL, G_CALLBACK(rename_folder) }, + { "FolderViewPopup/MoveFolder", NULL, N_("M_ove folder..."), + NULL, NULL, G_CALLBACK(move_folder) }, + { "FolderViewPopup/DeleteFolder", NULL, N_("_Delete folder..."), + NULL, NULL, G_CALLBACK(delete_folder) }, + { "FolderViewPopup/RefreshContent", NULL, N_("Re_fresh content"), + NULL, NULL, G_CALLBACK(refresh_content) }, + { "FolderViewPopup/RemoveMailbox", NULL, N_("Remove _mailbox..."), + NULL, NULL, G_CALLBACK(remove_mailbox) } +}; +static void add_menuitems(GtkUIManager *ui_mngr, FolderItem *item); +static void set_sensitivity(GtkUIManager *ui_mngr, FolderItem *item); +static FolderViewPopup vfolder_popup = { + "vfolder", "", + vfolder_popup_entries, G_N_ELEMENTS(vfolder_popup_entries), + NULL, 0, + NULL, 0, 0, NULL, + add_menuitems, + set_sensitivity +}; + + +static guint id_add_mailbox = 0; +static guint id_move_to_trash = 0; +static guint id_move_to_trash_popup = 0; +static guint id_move_thread_to_trash = 0; +static guint id_reply = 0; +static guint id_reply_popup = 0; +static guint id_find_in_src_folder = 0; +static guint id_find_in_src_folder_popup = 0; +static guint id_search = 0; + +gint vfolder_gtk_init(gchar **error) +{ + MainWindow *mainwin = mainwindow_get_mainwindow(); + + gtk_action_group_add_actions(mainwin->action_group, mainwindow_actions, + G_N_ELEMENTS(mainwindow_actions), (gpointer)mainwin); + + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/File/AddMailbox", + "AddVF", "File/AddMailbox/VFolder", + GTK_UI_MANAGER_MENUITEM, + id_add_mailbox); + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/View/Goto/ParentMessage", + "FindInSrcFolder", "Message/FindInSrcFolder", + GTK_UI_MANAGER_MENUITEM, + id_find_in_src_folder); + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup/Separator5", + "FindInSrcFolder", "Message/FindInSrcFolder", + GTK_UI_MANAGER_MENUITEM, + id_find_in_src_folder_popup); + + vfolder_gtk_set_menus(FALSE); + + folderview_register_popup(&vfolder_popup); + + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", FALSE); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", FALSE); + + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Trash"), + (ToolbarPluginCallback) move_to_trash, NULL); + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Reply"), + (ToolbarPluginCallback) reply, NULL); + + + vfolder_prefs_register(); + vfolder_item_prefs_register(); + + return 0; +} + +void vfolder_gtk_done(void) +{ + MainWindow *mainwin = mainwindow_get_mainwindow(); + + if (mainwin == NULL || claws_is_exiting()) + return; + + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "File/AddMailbox/VFolder", id_add_mailbox); + id_add_mailbox = 0; + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "Message/FindInSrcFolder", id_find_in_src_folder); + id_find_in_src_folder = 0; + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "Message/FindInSrcFolder", id_find_in_src_folder_popup); + id_find_in_src_folder_popup = 0; + + vfolder_gtk_set_menus(TRUE); + + folderview_unregister_popup(&vfolder_popup); + + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Trash")); + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, _("Reply")); + + + vfolder_prefs_unregister(); + vfolder_item_prefs_unregister(); +} + +void vfolder_gtk_set_menus(gboolean unloading) +{ + VFolderConfig *vconfig = vfolder_get_config(); + MainWindow *mainwin = mainwindow_get_mainwindow(); + + if (!unloading && vconfig->add_trash) + { + if (id_move_to_trash == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/Trash", + "TrashVF", "Message/TrashVF", + GTK_UI_MANAGER_MENUITEM, + id_move_to_trash); + } + if (id_move_thread_to_trash == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/TrashThread", + "TrashThreadVF", "Message/TrashThreadVF", + GTK_UI_MANAGER_MENUITEM, + id_move_thread_to_trash); + } + if (id_move_to_trash_popup == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menus/SummaryViewPopup/Trash", + "TrashVF", "Message/TrashVF", + GTK_UI_MANAGER_MENUITEM, + id_move_to_trash_popup); + } + } + else + { + if (id_move_to_trash > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/TrashVF", + id_move_to_trash); + id_move_to_trash = 0; + } + if (id_move_to_trash_popup > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menus/SummaryViewPopup/TrashVF", + id_move_to_trash_popup); + id_move_to_trash_popup = 0; + } + if (id_move_thread_to_trash > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/TrashThreadVF", + id_move_thread_to_trash); + id_move_thread_to_trash = 0; + } + } + vfolder_gtk_set_visible("/Menu/Message/Trash", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + vfolder_gtk_set_visible("/Menu/Message/TrashThread", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/Trash", + unloading || !vconfig->add_trash || !vconfig->hide_trash_org); + + if (!unloading && vconfig->add_reply) + { + if (id_reply == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menu/Message/Reply", + "ReplyVF", "Message/ReplyVF", + GTK_UI_MANAGER_MENUITEM, + id_reply); + } + if (id_reply_popup == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, + "/Menus/SummaryViewPopup/Reply", + "ReplyVF", "Message/ReplyVF", + GTK_UI_MANAGER_MENUITEM, + id_reply_popup); + } + } + else + { + if (id_reply > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Message/ReplyVF", id_reply); + id_reply = 0; + } + if (id_reply_popup > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menus/SummaryViewPopup/ReplyVF", id_reply_popup); + id_reply_popup = 0; + } + } + vfolder_gtk_set_visible("/Menu/Message/Reply", + unloading || !vconfig->add_reply || !vconfig->hide_reply_org); + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/Reply", + unloading || !vconfig->add_reply || !vconfig->hide_reply_org); + + if (!unloading && vconfig->enable_search) + { + if (id_search == 0) + { + MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/Edit", + "SearchVF", "Edit/SearchVF", + GTK_UI_MANAGER_MENUITEM, + id_search); + prefs_toolbar_register_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, + _("Search"), (ToolbarPluginCallback) search, NULL); + } + } + else + { + if (id_search > 0) + { + MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, + "/Menu/Edit/SearchVF", id_search); + id_search = 0; + prefs_toolbar_unregister_plugin_item(TOOLBAR_MAIN, PLUGIN_NAME, + _("Search")); + } + } +} + +void vfolder_gtk_set_visible(const gchar *path, gboolean visible) +{ + GtkWidget *w; + + w = gtk_ui_manager_get_widget(mainwindow_get_mainwindow()->ui_manager, path); + if (!w) + return; + gtk_widget_set_visible(w, visible); +} + +void vfolder_gtk_set_sensitive(const gchar *path, gboolean sensitive) +{ + GtkWidget *w; + + w = gtk_ui_manager_get_widget(mainwindow_get_mainwindow()->ui_manager, path); + if (!w) + return; + gtk_widget_set_sensitive(w, sensitive); +} + +static void add_menuitems(GtkUIManager *ui_mngr, FolderItem *item) +{ + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "CreateNewFolder", + "FolderViewPopup/CreateNewFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator1", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RenameFolder", + "FolderViewPopup/RenameFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "MoveFolder", + "FolderViewPopup/MoveFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator2", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "DeleteFolder", + "FolderViewPopup/DeleteFolder", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator3", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RefreshContent", + "FolderViewPopup/RefreshContent", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator4", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "RemoveMailbox", + "FolderViewPopup/RemoveMailbox", GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI_MANAGER(ui_mngr, "/Popup/FolderViewPopup", "Separator5", + "FolderViewPopup/---", GTK_UI_MANAGER_SEPARATOR); +} + +static void set_sensitivity(GtkUIManager *ui_mngr, FolderItem *item) +{ + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/CreateNewFolder", TRUE); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RenameFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/MoveFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/DeleteFolder", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RefreshContent", folder_item_parent(item) != NULL); + cm_menu_set_sensitive_full(ui_mngr, "Popup/FolderViewPopup/RemoveMailbox", folder_item_parent(item) == NULL); +} + +/* for vfolder.c */ +gchar *vfolder_gtk_get_current_msgid(void) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + MsgInfo *mi = summary_get_selected_msg(sv); + + if (!mi) + return NULL; + + return g_strdup(mi->msgid); +} + +static guint id_refresh_summary = 0; +static gint new_msgnum = 0; +static gboolean refresh_summary(gpointer data) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + FolderItem *item = data; + dbg("refresh_summary lock=%d %d\n",summary_is_locked(sv), item->opened); + + if (summary_is_locked(sv)) + return TRUE; + if (item->opened) + { + summary_show(sv, item); + if (new_msgnum > 0) + summary_select_by_msgnum(sv, new_msgnum); + } + id_refresh_summary = 0; + new_msgnum = 0; + + return FALSE; +} +/* for vfolder.c */ +void vfolder_gtk_refresh_summary(FolderItem *item, gint msgnum) +{ + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + dbg("vfolder_gtk_refresh_summary lock=%d %d\n",summary_is_locked(sv), item->opened); + if (!item->opened) + return; + new_msgnum = msgnum; + if (summary_is_locked(sv)) + { + if (id_refresh_summary == 0) + id_refresh_summary = g_timeout_add(10, refresh_summary, item); + } + else + refresh_summary(item); +} + +static void add_mailbox(GtkAction *action, gpointer data) +{ + MainWindow *mainwin = (MainWindow *) data; + gchar *name; + FolderClass *klass; + Folder *folder; + + name = input_dialog(_("Add mailbox"), _("Input name of the mailbox"), "Virtual"); + if (!name) + return; + + klass = folder_get_class_from_string("vfolder"); + if (folder_find_from_name(name, klass)) + { + alertpanel_error(_("Virtual mailbox '%s' already exists."), name); + g_free(name); + return; + } + + folder = folder_new(klass, name, NULL); + g_free(name); + + folder_add(folder); + folderview_set(mainwin->folderview); + + return; +} + +static void refresh_content(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + vfolder_refresh_content((VFolderItem *) item); +} + +static void remove_mailbox(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + AlertValue av; + gchar *s; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + s = g_strdup_printf(_("Really remove the mailbox '%s'?\n" + "(The messages are NOT deleted from the disk)"), + item->name); + av = alertpanel_full(_("Remove mailbox"), s, + GTK_STOCK_CANCEL, _("_Remove"), NULL, FALSE, + NULL, ALERT_WARNING, G_ALERTDEFAULT); + g_free(s); + if (av != G_ALERTALTERNATE) + return; + + folderview_unselect(fv); + summary_clear_all(fv->summaryview); + + folder_destroy(item->folder); +} + +static void new_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item, *new_item; + gchar *name; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + name = input_dialog(_("New folder"), _("Input name of new folder"), _("NewFolder")); + if (!name) + return; + AUTORELEASE_STR(name, { g_free(name); return; }); + + if (folder_find_child_item_by_name(item, name)) + { + alertpanel_error(_("Virtual folder '%s' already exists in '%s'."), + name, item->name); + return; + } + + new_item = folder_create_folder(item, name); + if (!new_item) + { + alertpanel_error(_("Can't create the folder '%s'."), name); + return; + } + + folder_write_list(); +} + +static void rename_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item; + gchar *s, *name; + gchar *oldid, *newid; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + s = g_strdup_printf(_("Input new name for '%s':"), item->name); + name = input_dialog(_("Rename folder"), s, item->name); + g_free(s); + if (!name) + return; + AUTORELEASE_STR(name, { g_free(name); return; }); + + { + FolderItem *parent = folder_item_parent(item); + + if (parent && folder_find_child_item_by_name(parent, name)) + { + alertpanel_error(_("Virtual folder '%s' already exists in '%s'."), + name, parent->name); + return; + } + } + + oldid = folder_item_get_identifier(item); + + if (folder_item_rename(item, name) < 0) + { + alertpanel_error(_("The folder could not be renamed.")); + g_free(oldid); + return; + } + + newid = folder_item_get_identifier(item); + prefs_filtering_rename_path(oldid, newid); + account_rename_path(oldid, newid); + prefs_actions_rename_path(oldid, newid); + + g_free(oldid); + g_free(newid); + + folder_item_prefs_save_config_recursive(item); + folder_write_list(); +} + +static void move_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *from_folder, *to_folder; + + from_folder = folderview_get_selected_item(fv); + if (!from_folder || from_folder->folder->klass != vfolder_get_class()) + return; + + to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE); + if (!to_folder) + return; + + folderview_move_folder(fv, from_folder, to_folder, 0); +} + +static void delete_folder(GtkAction *action, gpointer data) +{ + FolderView *fv = (FolderView *) data; + FolderItem *item, *opened; + AlertValue av; + gchar *s; + gchar *oldid; + + if (!fv->selected) + return; + + item = folderview_get_selected_item(fv); + cm_return_if_fail(item != NULL); + cm_return_if_fail(item->folder != NULL); + + opened = folderview_get_opened_item(fv); + + s = g_strdup_printf(_("Do you really want to delete '%s'?"), item->name); + av = alertpanel_full(_("Delete folder"), s, + GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE, + NULL, ALERT_NOTICE, G_ALERTDEFAULT); + g_free(s); + if (av != G_ALERTALTERNATE) + return; + + if (item == opened || + folder_is_child_of(item, opened)) + { + summary_clear_all(fv->summaryview); + folderview_close_opened(fv, TRUE); + } + + oldid = folder_item_get_identifier(item); + + if (item->folder->klass->remove_folder(item->folder, item) < 0) + { + alertpanel_error(_("Can't remove the folder '%s'."), item->name); + if (item == opened) + summary_show(fv->summaryview, fv->summaryview->folder_item); + g_free(oldid); + return; + } + + folder_write_list(); + + prefs_filtering_delete_path(oldid); + g_free(oldid); +} + +static void move_to_trash_perfolder(MsgInfoList *msglist, gpointer data) +{ + GSList **to_delete = (GSList **) data; + MsgInfo *mi = (MsgInfo *) msglist->data; + PrefsAccount *ac; + FolderItem *item = mi->folder; + FolderItem *to_folder = NULL; + + vfolder_get_src_folder_msgnum(mi, &item, NULL); + + ac = account_find_from_item(item); + if (ac) + to_folder = account_get_special_folder(ac, F_TRASH); + if (!to_folder) + to_folder = item->folder->trash; + + if (!to_folder || to_folder == item || + folder_has_parent_of_type(item, F_TRASH)) + { + if (*to_delete) + g_slist_last(*to_delete)->next = g_slist_copy(msglist); + else + *to_delete = g_slist_copy(msglist); + } + else + { + SummaryView *sv = mainwindow_get_mainwindow()->summaryview; + + summary_unselect_all(sv); + summary_select_by_msg_list(sv, msglist); + summary_move_selected_to(sv, to_folder); + } +} + +static void move_to_trash(GtkAction *action, gpointer data) +{ + SummaryView *sv; + GSList *msglist; + GSList *to_delete = NULL; + + sv = mainwindow_get_mainwindow()->summaryview; + if (summary_is_locked(sv)) + return; + + msglist = summary_get_selected_msg_list(sv); + if (!msglist) + return; + + folder_item_update_freeze(); + + vfolder_workon_msginfo_perfolder(msglist, TRUE, + move_to_trash_perfolder, &to_delete); + + if (to_delete) + { + summary_unselect_all(sv); + summary_select_by_msg_list(sv, to_delete); + summary_delete(sv); + g_slist_free(to_delete); + } + + folder_item_update_thaw(); +} + +static void move_thread_to_trash(GtkAction *action, gpointer data) +{ + summary_select_thread(mainwindow_get_mainwindow()->summaryview, FALSE, FALSE); + move_to_trash(NULL, NULL); +} + +static void find_in_src_folder(GtkAction *action, gpointer data) +{ + SummaryView *sv; + MsgInfo *mi; + FolderItem *item; + gint num; + + sv = mainwindow_get_mainwindow()->summaryview; + mi = summary_get_selected_msg(sv); + + if (summary_is_locked(sv) || !mi) + return; + + if (vfolder_get_src_folder_msgnum(mi, &item, &num) < 0) + return; + + folderview_select(sv->mainwin->folderview, item); + summary_select_by_msgnum(sv, num); +} + +/* from vfolder.c */ +void _free_msglist_data(gpointer data); + +static void reply(GtkAction *action, gpointer data) +{ + SummaryView *sv; + GSList *msglist; + GSList *msglist_src = NULL; + GSList *prev, *cur; + + sv = mainwindow_get_mainwindow()->summaryview; + if (summary_is_locked(sv)) + return; + + msglist = summary_get_selected_msg_list(sv); + if (!msglist) + return; + + for (prev = NULL, cur = msglist; !!cur; ) + { + MsgInfo *mi = (MsgInfo *) cur->data; + MsgInfo *mi_src; + gint r; + + r = vfolder_get_src_msginfo(mi, &mi_src); + if (r == VFOLDER_ERR_NOT_VIRTUAL) + { + prev = cur; + cur = cur->next; + } + else + { + if (r == 0) + msglist_src = g_slist_prepend(msglist_src, mi_src); + + if (prev) + prev->next = cur->next; + else + msglist = cur->next; + + cur->next = NULL; + g_slist_free(cur); + + cur = (prev) ? prev->next : msglist; + } + } + + if (msglist) + { + compose_reply_from_messageview(sv->messageview, msglist, COMPOSE_REPLY); + g_slist_free(msglist); + } + + if (msglist_src) + { + compose_reply_from_messageview(sv->messageview, msglist_src, COMPOSE_REPLY); + g_slist_free_full(msglist_src, _free_msglist_data); + } +} + +/* from vfolder_item_prefs.c */ +void _vfolder_search_create(VFolderItem *vitem, GtkWindow *window, GtkContainer *box); +void _vfolder_search_save(void); + +static void run_search(GtkWidget *window) +{ + FolderView *fv = mainwindow_get_mainwindow()->folderview; + FolderItem *item = g_object_get_data(G_OBJECT(window), "_vf_item"); + + _vfolder_search_save(); + gtk_widget_destroy(window); + folderview_select(fv, item); +} + +static gboolean key_pressed(GtkWidget *w, GdkEventKey *event, GtkWidget *window) +{ + if (event && event->keyval == GDK_KEY_Escape) + gtk_widget_destroy(window); + return FALSE; +} + +static void search(GtkAction *action, gpointer data) +{ + VFolderConfig *vconfig = vfolder_get_config(); + GdkGeometry geometry = { .min_width = 500, .min_height = 460 }; + GtkWidget *window; + GtkWidget *box; + GtkWidget *btn_ok; + GtkWidget *btn_cancel; + GtkWidget *w; + FolderItem *item; + + if (!vconfig->enable_search) + { + alertpanel_error(_("You need to enable 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + if (!vconfig->id_search_folder) + { + alertpanel_error(_("You need to configure 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + item = folder_find_item_from_identifier(vconfig->id_search_folder); + if (!item || item->folder->klass != vfolder_get_class()) + { + alertpanel_error(_("Configuration error: Check the configuration " + "of the 'Search results' feature " + "in Preferences/Plugins/VFolder")); + return; + } + + window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "search"); + gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW (window), TRUE); + gtk_window_set_title (GTK_WINDOW(window), _("Search... [VFolder]")); + gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry, + GDK_HINT_MIN_SIZE); + MANAGE_WINDOW_SIGNALS_CONNECT (window); + manage_window_set_transient(GTK_WINDOW(window)); + + box = gtk_vbox_new (FALSE, 4); + gtk_widget_show (box); + gtk_container_set_border_width(GTK_CONTAINER (box), 2); + gtk_container_add(GTK_CONTAINER(window), box); + + _vfolder_search_create((VFolderItem *) item, GTK_WINDOW(window), GTK_CONTAINER(box)); + + gtkut_stock_button_set_create(&w, + &btn_cancel, GTK_STOCK_CANCEL, + &btn_ok, GTK_STOCK_FIND, + NULL, NULL); + gtk_box_pack_end (GTK_BOX(box), w, FALSE, FALSE, 0); + gtk_widget_grab_default (btn_ok); + gtk_widget_grab_focus (btn_ok); + + g_signal_connect(G_OBJECT(window), "key_press_event", + G_CALLBACK(key_pressed), window); + g_signal_connect_swapped(G_OBJECT(btn_cancel), "clicked", + G_CALLBACK(gtk_widget_destroy), window); + g_signal_connect_swapped(G_OBJECT(btn_ok), "clicked", + G_CALLBACK(run_search), window); + g_object_set_data(G_OBJECT(window), "_vf_item", item); + + gtk_widget_show_all(window); + gtk_window_set_modal(GTK_WINDOW(window), TRUE); +} diff --git a/src/plugins/vfolder/plugin_gtk.h b/src/plugins/vfolder/plugin_gtk.h new file mode 100644 index 000000000..260f67ed9 --- /dev/null +++ b/src/plugins/vfolder/plugin_gtk.h @@ -0,0 +1,31 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PLUGIN_GTK_H__ +#define __VFOLDER_PLUGIN_GTK_H__ + +#include + +gint vfolder_gtk_init(gchar **error); +void vfolder_gtk_done(void); +void vfolder_gtk_set_menus(gboolean unloading); + +void vfolder_gtk_set_visible(const gchar *path, gboolean visible); +void vfolder_gtk_set_sensitive(const gchar *path, gboolean sensitive); + +#endif /* __VFOLDER_PLUGIN_GTK_H__ */ diff --git a/src/plugins/vfolder/vfolder.c b/src/plugins/vfolder/vfolder.c new file mode 100644 index 000000000..89cadae82 --- /dev/null +++ b/src/plugins/vfolder/vfolder.c @@ -0,0 +1,1389 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "defs.h" + +#include +#include + +#include "folder.h" +#include "procmsg.h" +#include "statusbar.h" +#include "utils.h" +#include "gtkutils.h" +#include "advsearch.h" +#include "common/prefs.h" +#include "common/hooks.h" +#include "msgcache.h" + + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_item_prefs.h" + +#define GET_VMI(vitem,num) (&g_array_index(vitem->vmi, struct vmi, num - 1)) +#define GET_MSGINFO(vitem,num) GET_VMI(vitem, num)->msginfo + +struct _VFolder +{ + Folder folder; +}; + +static FolderClass vfolder_class; + +struct vmi +{ + MsgInfo *msginfo; + FolderItem *src_folder; + guint src_msgnum; +}; +struct search +{ + gchar *folder_id; + gboolean recursive; + gchar *cond; + + /* keep VFolderSearch from vfolder.h in sync */ + AdvancedSearch *as; + FolderItem *folder; +}; + +struct _VFolderItem +{ + FolderItem item; + GArray *search; + GArray *vmi; + GHashTable *ht; + guint hook_msginfo; + guint hook_folder_item; + guint hook_folder; + GSList *ignore_folder_update; + + /* properties */ + guint is_autorefresh :1; + /* internal flags */ + guint has_content :1; + guint is_building :1; + guint flags_from_src :1; + guint update_on_close :1; +}; + +static void free_search_internals(struct search *search); +static void free_vmi_internals(struct vmi *vmi); +static void clear_content(VFolderItem *vitem); +static gint build_content(VFolderItem *vitem, const gchar *msgid, gint *msgnum); +static void refresh_content(VFolderItem *vitem, gboolean manual); +static void trigger_item_update(VFolderItem *vitem); + +/* Folder */ +static Folder *_vfolder_new_folder(const gchar *name, const gchar *path); +static void _vfolder_destroy_folder(Folder *folder); +static void _vfolder_set_xml(Folder *folder, XMLTag *tag); +static XMLTag *_vfolder_get_xml(Folder *folder); + +/* FolderItem */ +static FolderItem *_vfolder_item_new(Folder *folder); +static void _vfolder_item_destroy(Folder *folder, FolderItem *item); +static void _vfolder_item_set_xml(Folder *folder, FolderItem *item, XMLTag *tag); +static XMLTag *_vfolder_item_get_xml(Folder *folder, FolderItem *item); +static gchar *_vfolder_item_get_path(Folder *folder, FolderItem *item); +static FolderItem *_vfolder_create_folder(Folder *folder, FolderItem *parent, + const gchar *name); +static gint _vfolder_rename_folder(Folder *folder, FolderItem *item, const gchar *name); +static gint _vfolder_remove_folder(Folder *folder, FolderItem *item); +static gint _vfolder_get_num_list(Folder *folder, FolderItem *item, + GSList **list, gboolean *old_uids_valid); +static gboolean _vfolder_scan_required(Folder *folder, FolderItem *item); + +/* Message */ +static MsgInfo *_vfolder_get_msginfo(Folder *folder, FolderItem *item, gint num); +static GSList *_vfolder_get_msginfos(Folder *folder, FolderItem *item, GSList *msgnum_list); +static gchar *_vfolder_fetch_msg(Folder *folder, FolderItem *item, gint num); +static gint _vfolder_add_msg(Folder *folder, FolderItem *dest, const gchar *file, + MsgFlags *flags); +static gint _vfolder_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo); +static gint _vfolder_remove_msg(Folder *folder, FolderItem *item, gint num); +static gint _vfolder_remove_msgs(Folder *folder, FolderItem *item, + MsgInfoList *msglist, GHashTable *relation); +static gint _vfolder_remove_all_msg(Folder *folder, FolderItem *item); +static void _vfolder_copy_private_data(Folder *folder, FolderItem *src, FolderItem *dst); +static void _vfolder_commit_tags(FolderItem *item, MsgInfo *msginfo, + GSList *tags_set, GSList *tags_unset); +static void _vfolder_item_opened(FolderItem *item); +static void _vfolder_item_closed(FolderItem *item); + +FolderClass *vfolder_get_class(void) +{ + if (vfolder_class.idstr == NULL) { + vfolder_class.type = F_UNKNOWN; + vfolder_class.idstr = "vfolder"; + vfolder_class.uistr = "VFolder"; + + /* Folder functions */ + vfolder_class.new_folder = _vfolder_new_folder; + vfolder_class.destroy_folder = _vfolder_destroy_folder; + vfolder_class.set_xml = NULL;//_vfolder_set_xml; + vfolder_class.get_xml = NULL;//_vfolder_get_xml; + + /* FolderItem functions */ + vfolder_class.item_new = _vfolder_item_new; + vfolder_class.item_destroy = _vfolder_item_destroy; + vfolder_class.item_set_xml = _vfolder_item_set_xml; + vfolder_class.item_get_xml = _vfolder_item_get_xml; + vfolder_class.item_get_path = _vfolder_item_get_path; + vfolder_class.create_folder = _vfolder_create_folder; + vfolder_class.rename_folder = _vfolder_rename_folder; + vfolder_class.remove_folder = _vfolder_remove_folder; + vfolder_class.get_num_list = _vfolder_get_num_list; + vfolder_class.scan_required = _vfolder_scan_required; + + /* Message functions */ + vfolder_class.get_msginfo = _vfolder_get_msginfo; + vfolder_class.get_msginfos = _vfolder_get_msginfos; + vfolder_class.fetch_msg = _vfolder_fetch_msg; + vfolder_class.add_msg = _vfolder_add_msg; + vfolder_class.copy_msg = _vfolder_copy_msg; + vfolder_class.remove_msg = _vfolder_remove_msg; + vfolder_class.remove_msgs = _vfolder_remove_msgs; + vfolder_class.remove_all_msg = _vfolder_remove_all_msg; + vfolder_class.copy_private_data = _vfolder_copy_private_data; + vfolder_class.commit_tags = _vfolder_commit_tags; + vfolder_class.item_opened = _vfolder_item_opened; + vfolder_class.item_closed = _vfolder_item_closed; + } + return &vfolder_class; +} + + +/* Folder */ + +static Folder *_vfolder_new_folder(const gchar *name, const gchar *path) +{ + Folder *folder; + + folder = (Folder *) g_new0(VFolder, 1); + folder->klass = &vfolder_class; + folder_init(folder, name); + + + return folder; +} + +static void _vfolder_destroy_folder(Folder *folder) +{ +} + +static void _vfolder_set_xml(Folder *folder, XMLTag *tag) +{ + + folder_set_xml(folder, tag); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + GList *cur; + for (cur = tag->attr; cur != NULL; cur = g_list_next(cur)) + { + XMLAttr *attr = (XMLAttr *) cur->data; + + if (!attr || !attr->name || !attr->value) + continue; + if (!strcmp(attr->name, "path")) + { + g_free(vfolder->path); + vfolder->path = g_strdup(attr->value); + } + } +#endif +} + +static XMLTag *_vfolder_get_xml(Folder *folder) +{ + XMLTag *tag; + + tag = folder_get_xml(folder); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + xml_tag_add_attr(tag, xml_attr_new("path", vfolder->path)); +#endif + + return tag; +} + + +/* FolderItem */ + +static gboolean on_msginfo_update(gpointer source, gpointer data) +{ + dbg("on_msginfo_update\n"); + MsgInfoUpdate *update = (MsgInfoUpdate *) source; + VFolderItem *vitem = (VFolderItem *) data; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!vitem->vmi) /* || !vitem->ht, they go together */ + return FALSE; + + if (update->flags & MSGINFO_UPDATE_FLAGS) + { + MsgInfo *mi = update->msginfo; + MsgPermFlags perm_add, perm_del; + MsgTmpFlags tmp_add, tmp_del; + gchar *s; + gchar *id; + gint i; + + /* our of ours? then relay to the source */ + if (mi->folder == (FolderItem *) vitem) + { + MsgInfo *src_mi; + + if (vitem->flags_from_src) + return FALSE; + + if (vfolder_get_src_msginfo(mi, &src_mi) == VFOLDER_ERR_DELETED) + return FALSE; + cm_return_val_if_fail(src_mi != NULL, FALSE); + + perm_add = mi->flags.perm_flags & ~src_mi->flags.perm_flags; + perm_del = src_mi->flags.perm_flags & ~mi->flags.perm_flags; + tmp_add = mi->flags.tmp_flags & ~src_mi->flags.tmp_flags; + tmp_del = src_mi->flags.tmp_flags & ~mi->flags.tmp_flags; + + src_mi->to_folder = mi->to_folder; + procmsg_msginfo_change_flags(src_mi, + perm_add, tmp_add, perm_del, tmp_del); + procmsg_msginfo_free(&src_mi); + return FALSE; + } + + /* another virtual one, we don't care */ + if (mi->folder->folder->klass == &vfolder_class) + return FALSE; + + id = folder_item_get_identifier(mi->folder); + s = g_strdup_printf("%d%s", mi->msgnum, id); + g_free(id); + + i = GPOINTER_TO_INT(g_hash_table_lookup(vitem->ht, s)); + g_free(s); + + /* we have this msg in our content, import flags */ + if (i > 0) + { + MsgInfo *our_mi; + + our_mi = GET_MSGINFO(vitem, i); + if (!our_mi) + return FALSE; + + perm_add = mi->flags.perm_flags & ~our_mi->flags.perm_flags; + perm_del = our_mi->flags.perm_flags & ~mi->flags.perm_flags; + tmp_add = mi->flags.tmp_flags & ~our_mi->flags.tmp_flags; + tmp_del = our_mi->flags.tmp_flags & ~mi->flags.tmp_flags; + + if (perm_add || perm_del || tmp_add || tmp_del) + { + vitem->flags_from_src = 1; + our_mi->to_folder = mi->to_folder; + procmsg_msginfo_change_flags(our_mi, + perm_add, tmp_add, perm_del, tmp_del); + vitem->flags_from_src = 0; + } + } + } + + return FALSE; +} + +static gboolean on_folder_item_update(gpointer source, gpointer data) +{ + dbg("on_folder_item_update\n"); + FolderItemUpdateData *update = (FolderItemUpdateData *) source; + VFolderItem *vitem = (VFolderItem *) data; + GSList *cur; + gint i; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!vitem->has_content + || update->item == (FolderItem *) vitem + || !(update->update_flags & F_ITEM_UPDATE_CONTENT)) + return FALSE; + + for (cur = vitem->ignore_folder_update; !!cur; cur = cur->next) + { + if ((FolderItem *) cur->data == update->item) + { + vitem->ignore_folder_update = g_slist_delete_link( + vitem->ignore_folder_update, cur); + return FALSE; + } + } + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, struct search, i); + + if (!search->folder) + { + search->folder = folder_find_item_from_identifier(search->folder_id); + if (!search->folder) + continue; + } + + if (search->folder == update->item + || (search->recursive && folder_is_child_of(update->item, + search->folder))) + break; + } + + if (i < vitem->search->len) + refresh_content(vitem, FALSE); + + return FALSE; +} + +static gboolean on_folder_update(gpointer source, gpointer data) +{ + dbg("on_folder_update\n"); + FolderUpdateData *update = (FolderUpdateData *) source; + VFolderItem *vitem = (VFolderItem *) data; + gboolean save = FALSE; + gint i; + + cm_return_val_if_fail(update != NULL, FALSE); + cm_return_val_if_fail(vitem != NULL, FALSE); + + if (!(update->update_flags & (FOLDER_RENAME_FOLDERITEM + | FOLDER_MOVE_FOLDERITEM | FOLDER_REMOVE_FOLDERITEM)) + || update->item == (FolderItem *) vitem + || !vitem->item.path) + return FALSE; + + vfolder_load_config(vitem, FALSE); + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, + struct search, i); + + if (search->folder == update->item) + { + if (update->update_flags & FOLDER_REMOVE_FOLDERITEM) + search->folder = NULL; + else + { + if (update->update_flags & FOLDER_MOVE_FOLDERITEM) + search->folder = update->item2; + g_free(search->folder_id); + search->folder_id = folder_item_get_identifier(search->folder); + save = TRUE; + } + } + } + + if (save) + vfolder_item_prefs_save(vitem, + vitem->is_autorefresh, + vitem->search->len, + (VFolderSearch *) vitem->search->data); + + return FALSE; +} + +static FolderItem *_vfolder_item_new(Folder *folder) +{ + VFolderItem *vitem; + + vitem = g_new0(VFolderItem, 1); + vitem->hook_msginfo = hooks_register_hook(MSGINFO_UPDATE_HOOKLIST, + on_msginfo_update, (gpointer) vitem); + vitem->hook_folder_item = hooks_register_hook(FOLDER_ITEM_UPDATE_HOOKLIST, + on_folder_item_update, (gpointer) vitem); + vitem->hook_folder = hooks_register_hook(FOLDER_UPDATE_HOOKLIST, + on_folder_update, (gpointer) vitem); + + return (FolderItem *) vitem; +} + +static void _vfolder_item_destroy(Folder *folder, FolderItem *item) +{ + VFolderItem *vitem = (VFolderItem *) item; + + cm_return_if_fail(vitem != NULL); + + if (vitem->search) + g_array_free(vitem->search, TRUE); + if (vitem->vmi) + g_array_free(vitem->vmi, TRUE); + if (vitem->ht) + g_hash_table_destroy(vitem->ht); + + hooks_unregister_hook(MSGINFO_UPDATE_HOOKLIST, vitem->hook_msginfo); + hooks_unregister_hook(FOLDER_ITEM_UPDATE_HOOKLIST, vitem->hook_folder_item); + hooks_unregister_hook(FOLDER_UPDATE_HOOKLIST, vitem->hook_folder); + + g_free(item); +} + +static void _vfolder_item_set_xml(Folder *folder, FolderItem *item, XMLTag *tag) +{ + folder_item_set_xml(folder, item, tag); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + GList *cur; + for (cur = tag->attr; cur != NULL; cur = g_list_next(cur)) + { + XMLAttr *attr = (XMLAttr *) cur->data; + + if (!attr || !attr->name || !attr->value) + continue; + if (!strcmp(attr->name, "path")) + { + g_free(vfolder->path); + vfolder->path = g_strdup(attr->value); + } + } +#endif +} + +static XMLTag *_vfolder_item_get_xml(Folder *folder, FolderItem *item) +{ + XMLTag *tag; + + tag = folder_item_get_xml(folder, item); + +#if 0 + VFolder *vfolder = (VFolder *) folder; + xml_tag_add_attr(tag, xml_attr_new("path", vfolder->path)); +#endif + + return tag; +} + +static gchar *_vfolder_item_get_path(Folder *folder, FolderItem *item) +{ + return g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "VFoldercache", + G_DIR_SEPARATOR_S, folder->name, G_DIR_SEPARATOR_S, item->path, + NULL); +} + +static FolderItem *_vfolder_create_folder(Folder *folder, FolderItem *parent, + const gchar *name) +{ + FolderItem *item; + gchar *path; + + cm_return_val_if_fail(folder != NULL, NULL); + cm_return_val_if_fail(parent != NULL, NULL); + cm_return_val_if_fail(name != NULL, NULL); + + if (folder_find_child_item_by_name(parent, name)) + return NULL; + + if (parent->path) + path = g_strconcat(parent->path, "/", name, NULL); + else + path = (gchar *) name; + + item = folder_item_new(folder, name, path); + + if (path != name) + g_free(path); + + if (item) + folder_item_append(parent, item); + + return item; +} + +static gint _vfolder_rename_folder(Folder *folder, FolderItem *item, const gchar *name) +{ + FolderItem *parent; + gchar *path; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(name != NULL, -1); + + parent = folder_item_parent(item); + if (!parent) + return -1; + + if (folder_find_child_item_by_name(parent, name)) + return -1; + + if (parent->path) + path = g_strconcat(parent->path, "/", name, NULL); + else + path = g_strdup(name); + + g_free(item->path); + item->path = path; + + g_free(item->name); + item->name = g_strdup(name); + + return 0; +} + +static gint _vfolder_remove_folder(Folder *folder, FolderItem *item) +{ + cm_return_val_if_fail(item != NULL, -1); + + folder_item_remove(item); + return 0; +} + +static gint _vfolder_get_num_list(Folder *folder, FolderItem *item, + GSList **list, gboolean *old_uids_valid) +{ + dbg("get_num_list\n"); + VFolderItem *vitem = (VFolderItem *) item; + gint i; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(list != NULL, -1); + cm_return_val_if_fail(old_uids_valid != NULL, -1); + + *old_uids_valid = FALSE; + + if (!vitem->has_content && build_content(vitem, NULL, NULL) < 0) + return -1; + + for (i = 1; i <= vitem->vmi->len; ++i) + *list = g_slist_prepend(*list, GINT_TO_POINTER(i)); + + return vitem->vmi->len; +} + +static gboolean _vfolder_scan_required(Folder *folder, FolderItem *item) +{ + return TRUE; +} + + +/* Message */ + +static MsgInfo *_vfolder_get_msginfo(Folder *folder, FolderItem *item, gint num) +{ + VFolderItem *vitem = (VFolderItem *) item; + MsgInfo *mi; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + cm_return_val_if_fail(num > 0, NULL); + cm_return_val_if_fail(num <= vitem->vmi->len, NULL); + + mi = GET_MSGINFO(vitem, num); + if (mi) + return procmsg_msginfo_new_ref(mi); + else + return NULL; +} + +static GSList *_vfolder_get_msginfos(Folder *folder, FolderItem *item, GSList *msgnum_list) +{ + VFolderItem *vitem = (VFolderItem *) item; + MsgInfoList *ret = NULL; + MsgInfoList *wnt; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(msgnum_list != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + + for (wnt = msgnum_list; wnt != NULL; wnt = wnt->next) + { + gint num = GPOINTER_TO_INT(wnt->data); + + if (num > 0 && num <= vitem->vmi->len) + { + MsgInfo *mi = GET_MSGINFO(vitem, num); + if (mi) + ret = g_slist_prepend(ret, procmsg_msginfo_new_ref(mi)); + } + } + + return ret; +} + +static gchar *_vfolder_fetch_msg(Folder *folder, FolderItem *item, gint num) +{ + VFolderItem *vitem = (VFolderItem *) item; + struct vmi *vmi; + + cm_return_val_if_fail(item != NULL, NULL); + cm_return_val_if_fail(vitem->vmi != NULL, NULL); + cm_return_val_if_fail(num > 0, NULL); + cm_return_val_if_fail(num <= vitem->vmi->len, NULL); + + vmi = GET_VMI(vitem, num); + if (vmi->msginfo) + return folder_item_fetch_msg(vmi->src_folder, vmi->src_msgnum); + else + return NULL; +} + +static gint _vfolder_add_msg(Folder *folder, FolderItem *dest, const gchar *file, + MsgFlags *flags) +{ + return -1; +} + +static gint _vfolder_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) +{ + return -1; +} + +static void remove_msgs_perfolder(MsgInfoList *msglist, gpointer _data); +static gint _vfolder_remove_msg(Folder *folder, FolderItem *item, gint num) +{ + dbg("remove_msg(%d)\n",num); + VFolderItem *vitem = (VFolderItem *) item; + struct vmi *vmi; + gint r = 0; + gpointer data[2] = { item, &r }; + MsgInfoList msglist; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(vitem->vmi != NULL, -1); + cm_return_val_if_fail(num > 0, -1); + cm_return_val_if_fail(num <= vitem->vmi->len, -1); + + vmi = GET_VMI(vitem, num); + if (!vmi->msginfo) + return -1; + + msglist.data = vmi->msginfo; + msglist.next = NULL; + + vfolder_workon_msginfo_perfolder(&msglist, FALSE, + remove_msgs_perfolder, &data); + + return r; +} + +/* used in plugin_gtk.c */ +void _free_msglist_data(gpointer data) +{ + MsgInfo *mi = data; + procmsg_msginfo_free(&mi); +} + +static void remove_msgs_perfolder(MsgInfoList *msglist, gpointer _data) +{ + dbg("remove_msgs_perfolder\n"); + gpointer *data = _data; + VFolderItem *vitem = data[0]; + gint *r = data[1]; + FolderItem *src_folder = NULL; + MsgInfoList *src_msglist = NULL; + GSList *cur; + + if (*r != 0) + return; + + for (cur = msglist; !!cur; cur = cur->next) + { + MsgInfo *src_msginfo = NULL; + struct vmi *vmi; + + vmi = GET_VMI(vitem, ((MsgInfo *) cur->data)->msgnum); + if (!vmi->msginfo) + continue; + + if (!src_folder) + src_folder = vmi->src_folder; + + vfolder_get_src_msginfo(vmi->msginfo, &src_msginfo); + cm_return_if_fail(src_msginfo != NULL); + + /* if the file was moved, let's relay that to the src msginfo */ + if (MSG_IS_MOVE(vmi->msginfo->flags) + && MSG_IS_MOVE_DONE(vmi->msginfo->flags)) + src_msginfo->flags.tmp_flags = vmi->msginfo->flags.tmp_flags; + + src_msglist = g_slist_prepend(src_msglist, src_msginfo); + + /* free memory & "mark" deleted */ + free_vmi_internals(vmi); + vmi->msginfo = NULL; + vmi->src_folder = NULL; + vmi->src_msgnum = 0; + } + + if (vitem->item.opened) + { + vitem->update_on_close = 1; + vitem->ignore_folder_update = g_slist_prepend(vitem->ignore_folder_update, + src_folder); + } + + *r = folder_item_remove_msgs(src_folder, src_msglist); + + g_slist_free_full(src_msglist, _free_msglist_data); +} + +static gint _vfolder_remove_msgs(Folder *folder, FolderItem *item, + MsgInfoList *msglist, GHashTable *relation) +{ + dbg("remove_msgs\n"); + gint r = 0; + gpointer data[2] = { item, &r }; + + cm_return_val_if_fail(item != NULL, -1); + cm_return_val_if_fail(msglist != NULL, -1); + + folder_item_update_freeze(); + + vfolder_workon_msginfo_perfolder(msglist, FALSE, + remove_msgs_perfolder, &data); + + folder_item_update_thaw(); + + return r; +} + +static gint _vfolder_remove_all_msg(Folder *folder, FolderItem *item) +{ + return -1; +} + +static void _vfolder_copy_private_data(Folder *folder, FolderItem *_src, FolderItem *_dst) +{ + VFolderItem *src = (VFolderItem *) _src; + VFolderItem *dst = (VFolderItem *) _dst; + + cm_return_if_fail(_src != NULL); + cm_return_if_fail(_src->folder != NULL); + cm_return_if_fail(_src->folder->klass == &vfolder_class); + cm_return_if_fail(_dst != NULL); + cm_return_if_fail(_dst->folder != NULL); + cm_return_if_fail(_dst->folder->klass == &vfolder_class); + + dst->is_autorefresh = src->is_autorefresh; + + if (src->search && src->search->len > 0) + { + gint i; + + dst->search = g_array_new(FALSE, FALSE, sizeof(struct search)); +#if GLIB_CHECK_VERSION(2, 32, 0) + g_array_set_clear_func(dst->search, + (GDestroyNotify) free_search_internals); +#endif + + for (i = 0; i < src->search->len; ++i) + { + struct search *src_search = &g_array_index(src->search, + struct search, i); + struct search dst_search; + + dst_search.folder_id = g_strdup(src_search->folder_id); + dst_search.recursive = src_search->recursive; + dst_search.cond = g_strdup(src_search->cond); + dst_search.as = NULL; + dst_search.folder = src_search->folder; + + g_array_append_val(dst->search, dst_search); + } + + vfolder_item_prefs_save(dst, + dst->is_autorefresh, + dst->search->len, + (VFolderSearch *) dst->search->data); + } +} + +static void _vfolder_commit_tags(FolderItem *item, MsgInfo *msginfo, + GSList *tags_set, GSList *tags_unset) +{ + MsgInfo *src_msginfo; + GSList *cur; + + cm_return_if_fail(item != NULL); + cm_return_if_fail(msginfo != NULL); + cm_return_if_fail(tags_set != NULL || tags_unset != NULL); + + if (vfolder_get_src_msginfo(msginfo, &src_msginfo) < 0) + return; + + for (cur = tags_set; !!cur; cur = cur->next) + procmsg_msginfo_update_tags(src_msginfo, TRUE, GPOINTER_TO_INT(cur->data)); + for (cur = tags_unset; !!cur; cur = cur->next) + procmsg_msginfo_update_tags(src_msginfo, FALSE, GPOINTER_TO_INT(cur->data)); + procmsg_msginfo_free(&src_msginfo); +} + +static void _vfolder_item_opened(FolderItem *item) +{ + if (folder_item_parent(item)) + { + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", TRUE); + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", TRUE); + } +} + +static void _vfolder_item_closed(FolderItem *item) +{ + VFolderItem *vitem = (VFolderItem *) item; + + vfolder_gtk_set_visible("/Menus/SummaryViewPopup/FindInSrcFolder", FALSE); + vfolder_gtk_set_sensitive("/Menu/View/Goto/FindInSrcFolder", FALSE); + + cm_return_if_fail(vitem != NULL); + + if (vitem->update_on_close) + { + clear_content(vitem); + if (vitem->is_autorefresh) + build_content(vitem, NULL, NULL); + else + trigger_item_update(vitem); + } +} + + +/* Misc */ + +gboolean vfolder_is_item_autorefresh(VFolderItem *vitem) +{ + cm_return_val_if_fail(vitem != NULL, FALSE); + return vitem->is_autorefresh; +} + +static void free_search_internals(struct search *search) +{ + cm_return_if_fail(search != NULL); + g_free(search->folder_id); + g_free(search->cond); + if (search->as) + advsearch_free(search->as); +} + +static void free_vmi_internals(struct vmi *vmi) +{ + cm_return_if_fail(vmi != NULL); + procmsg_msginfo_free(&vmi->msginfo); +} + +static void _g_array_clear(GArray *arr, guint size, GDestroyNotify free_fn) +{ +#if !GLIB_CHECK_VERSION(2, 32, 0) + gint i; + + for (i = 0; i < arr->len; ++i) + free_fn(arr->data + (size * i)); +#endif + g_array_remove_range(arr, 0, arr->len); +} + +static void clear_content(VFolderItem *vitem) +{ + dbg("clear_content\n"); + if (vitem->vmi) + _g_array_clear(vitem->vmi, sizeof(struct vmi), + (GDestroyNotify) free_vmi_internals); + else + { + vitem->vmi = g_array_new(FALSE, FALSE, sizeof(struct vmi)); +#if GLIB_CHECK_VERSION(2, 32, 0) + g_array_set_clear_func(vitem->vmi, (GDestroyNotify) free_vmi_internals); +#endif + } + + if (vitem->ht) + g_hash_table_remove_all(vitem->ht); + else + vitem->ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + + vitem->has_content = 0; + vitem->update_on_close = 0; + if (vitem->ignore_folder_update) + { + g_slist_free(vitem->ignore_folder_update); + vitem->ignore_folder_update = NULL; + } + + /* else after an autorefresh (from on_folder_item_update) the summaryview + * would keep an old list with wrong msgnums... */ + { + FolderItem *item = (FolderItem *) vitem; + + if (item->cache) + msgcache_destroy(item->cache); + item->cache = msgcache_new(); + item->cache_dirty = TRUE; + item->mark_dirty = TRUE; + item->tags_dirty = TRUE; + } +} + +/* from plugin_gtk.c */ +gchar *vfolder_gtk_get_current_msgid(void); +void vfolder_gtk_refresh_summary(FolderItem *item, gint msgnum); +static void refresh_content(VFolderItem *vitem, gboolean manual) +{ + gchar *msgid = NULL; + gint msgnum = 0; + + if (vitem->item.opened) + msgid = vfolder_gtk_get_current_msgid(); + + clear_content(vitem); + if (manual || vitem->is_autorefresh || vitem->item.opened) + build_content(vitem, msgid, &msgnum); + else + trigger_item_update(vitem); + + if (vitem->item.opened) + vfolder_gtk_refresh_summary((FolderItem *) vitem, msgnum); +} + +void vfolder_refresh_content(VFolderItem *vitem) +{ + cm_return_if_fail(vitem != NULL); + refresh_content(vitem, TRUE); +} + +void vfolder_load_config(VFolderItem *vitem, gboolean force) +{ + PrefFile *pfile; + gchar *file; + gchar *id; + gchar *block; + gchar buf[BUFFSIZE]; + gint r; + + if (!vitem->search) + { + vitem->search = g_array_new(FALSE, FALSE, sizeof(struct search)); +#if GLIB_CHECK_VERSION(2, 32, 0) + g_array_set_clear_func(vitem->search, + (GDestroyNotify) free_search_internals); +#endif + } + else if (force) + _g_array_clear(vitem->search, sizeof(struct search), + (GDestroyNotify) free_search_internals); + else + return; + + clear_content(vitem); + vitem->is_autorefresh = 0; + + id = folder_item_get_identifier((FolderItem *) vitem); + if (!id) + { + g_warning("Failed to read configuration from file"); + return; + } + block = g_strdup_printf("VFolder:%s", id); + g_free(id); + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDERITEM_RC, NULL); + pfile = prefs_read_open(file); + g_free(file); + if (!pfile) + { + g_warning("Failed to read configuration from file"); + return; + } + + r = prefs_set_block_label(pfile, block); + g_free(block); + if (r < 0) + return; + + while (fgets(buf, sizeof(buf), pfile->fp) != NULL) + { + struct search search; + gchar *s = buf; + gint esc = 0; + + if (*s == '[') + break; + + if (*s == '!') + { + if (!strcmp(s + 1, "autorefresh\n")) + vitem->is_autorefresh = 1; + else + g_warning("VFolder: unknown option: %s", s + 1); + + continue; + } + + search.recursive = *s == '+'; + if (*s == '+') + ++s; + + for ( ; *s != ' '; ++s) + { + if (*s == '\\') + { + ++esc; + ++s; + } + else if (*s == '\0') + { + g_warning("VFolder: Invalid configuration"); + esc = -1; + break; + } + + if (esc > 0) + s[-esc] = *s; + } + if (esc < 0) + break; + s -= esc; + *s = '\0'; + search.folder_id = g_strdup(buf + ((search.recursive) ? 1 : 0)); + *strchr(s + esc + 1, '\n') = '\0'; + search.cond = g_strdup(s + esc + 1); + search.as = NULL; + search.folder = folder_find_item_from_identifier(search.folder_id); + g_array_append_val(vitem->search, search); + } + + prefs_file_close(pfile); +} + +struct tmp +{ + MsgInfo *msginfo; + gchar *key; +}; + +static gint cmp_tmp(gconstpointer a, gconstpointer b) +{ + const struct tmp *t1 = a; + const struct tmp *t2 = b; + + return t1->msginfo->date_t - t2->msginfo->date_t; +} + +static gint build_content(VFolderItem *vitem, const gchar *msgid, gint *msgnum) +{ + dbg("build_content\n"); + GArray *arr; + guint i; + guint nb = 0; + + cm_return_val_if_fail(vitem != NULL, -1); + cm_return_val_if_fail(!msgid || msgnum, -1); + + if (vitem->is_building) + return -1; + dbg("building...\n"); + vitem->is_building = 1; + + if (!vitem->search) + vfolder_load_config(vitem, FALSE); + + clear_content(vitem); + + if (vitem->search->len == 0) + { + dbg("building done:%d\n",vitem->vmi->len); + vitem->is_building = 0; + vitem->has_content = 1; + trigger_item_update(vitem); + return 0; + } + + arr = g_array_new(FALSE, FALSE, sizeof(struct tmp)); + + for (i = 0; i < vitem->search->len; ++i) + { + struct search *search = &g_array_index(vitem->search, struct search, i); + MsgInfoList *msgs = NULL; + MsgInfoList *cur; + + if (!search->folder) + { + search->folder = folder_find_item_from_identifier(search->folder_id); + if (!search->folder) + goto fail; + } + + if (!search->as) + { + search->as = advsearch_new(); + advsearch_set(search->as, ADVANCED_SEARCH_EXTENDED, search->cond); + } + + if (!advsearch_search_msgs_in_folders(search->as, + &msgs, search->folder, search->recursive)) + goto fail; + + for (cur = msgs; cur != NULL; cur = cur->next) + { + MsgInfo *mi = (MsgInfo *) cur->data; + struct tmp tmp; + gchar *id, *s; + + id = folder_item_get_identifier(mi->folder); + s = g_strdup_printf("%d%s", mi->msgnum, id); + g_free(id); + + if (i > 0 && g_hash_table_lookup_extended(vitem->ht, s, NULL, NULL)) + { + g_free(s); + continue; + } + + tmp.msginfo = mi; + tmp.key = s; + g_array_append_val(arr, tmp); + g_hash_table_insert(vitem->ht, s, GINT_TO_POINTER(0)); + } + g_slist_free(msgs); + } + + g_array_sort(arr, cmp_tmp); + for (i = 0; i < arr->len; ++i) + { + struct tmp *tmp = &g_array_index(arr, struct tmp, i); + struct vmi vmi; + + vmi.msginfo = procmsg_msginfo_copy(tmp->msginfo); + vmi.msginfo->tags = g_slist_copy(tmp->msginfo->tags); + vmi.src_folder = tmp->msginfo->folder; + vmi.src_msgnum = tmp->msginfo->msgnum; + vmi.msginfo->folder = (FolderItem *) vitem; + vmi.msginfo->msgnum = ++nb; + + g_array_append_val(vitem->vmi, vmi); + g_hash_table_insert(vitem->ht, g_strdup(tmp->key), GINT_TO_POINTER(nb)); + + if (msgid && !strcmp(msgid, vmi.msginfo->msgid)) + { + msgid = NULL; + *msgnum = nb; + } + } + g_array_free(arr, TRUE); + + dbg("building done:%d\n",vitem->vmi->len); + vitem->is_building = 0; + vitem->has_content = 1; + trigger_item_update(vitem); + return nb; + +fail: + g_array_free(arr, TRUE); + g_hash_table_remove_all(vitem->ht); + dbg("building failed:%d\n",vitem->vmi->len); + vitem->is_building = 0; + return -1; +} + +static void trigger_item_update(VFolderItem *vitem) +{ + dbg("trigger_item_update\n"); + FolderItem *item = (FolderItem *) vitem; + FolderItemUpdateData source; + gint i; + + cm_return_if_fail(vitem != NULL); + + item->new_msgs = 0; + item->unread_msgs = 0; + item->total_msgs = 0; + item->unreadmarked_msgs = 0; + item->marked_msgs = 0; + item->replied_msgs = 0; + item->forwarded_msgs = 0; + item->locked_msgs = 0; + item->ignored_msgs = 0; + item->watched_msgs = 0; + + if (vitem->vmi && vitem->vmi->len > 0) + { + item->total_msgs = vitem->vmi->len; + + for (i = 1; i <= vitem->vmi->len; ++i) + { + MsgInfo *mi = GET_MSGINFO(vitem, i); + if (!mi) + continue; + + if (MSG_IS_NEW(mi->flags)) + ++item->new_msgs; + if (MSG_IS_UNREAD(mi->flags)) + ++item->unread_msgs; + if (MSG_IS_UNREAD(mi->flags) && procmsg_msg_has_marked_parent(mi)) + ++item->unreadmarked_msgs; + if (MSG_IS_MARKED(mi->flags)) + ++item->marked_msgs; + if (MSG_IS_REPLIED(mi->flags)) + ++item->replied_msgs; + if (MSG_IS_FORWARDED(mi->flags)) + ++item->forwarded_msgs; + if (MSG_IS_LOCKED(mi->flags)) + ++item->locked_msgs; + if (MSG_IS_IGNORE_THREAD(mi->flags)) + ++item->ignored_msgs; + if (MSG_IS_WATCH_THREAD(mi->flags)) + ++item->watched_msgs; + } + } + + source.item = (FolderItem *) vitem; + source.update_flags = F_ITEM_UPDATE_MSGCNT | F_ITEM_UPDATE_CONTENT; + source.msg = NULL; + hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &source); +} + +/* for vfolder_item_prefs.c */ +void _vfolder_item_get_searches(VFolderItem *vitem, gint *len, VFolderSearch **searches) +{ + cm_return_if_fail(vitem != NULL); + cm_return_if_fail(len != NULL); + cm_return_if_fail(searches != NULL); + + if (!vitem->search) + *len = 0; + else + { + *len = vitem->search->len; + *searches = (VFolderSearch *) vitem->search->data; + } +} + +gint vfolder_get_src_folder_msgnum(MsgInfo *msginfo, + FolderItem **src_item, guint *src_msgnum) +{ + VFolderItem *vitem; + struct vmi *vmi; + + cm_return_val_if_fail(msginfo != NULL, FALSE); + cm_return_val_if_fail(msginfo->folder != NULL, FALSE); + cm_return_val_if_fail(msginfo->folder->folder != NULL, FALSE); + + if (msginfo->folder->folder->klass != &vfolder_class) + return VFOLDER_ERR_NOT_VIRTUAL; + + vitem = (VFolderItem *) msginfo->folder; + + cm_return_val_if_fail(vitem->vmi != NULL, FALSE); + cm_return_val_if_fail(msginfo->msgnum > 0, FALSE); + cm_return_val_if_fail(msginfo->msgnum <= vitem->vmi->len, FALSE); + + vmi = GET_VMI(vitem, msginfo->msgnum); + if (!vmi->msginfo) + return VFOLDER_ERR_DELETED; + if (src_item) + *src_item = vmi->src_folder; + if (src_msgnum) + *src_msgnum = vmi->src_msgnum; + return 0; +} + +gint vfolder_get_src_msginfo(MsgInfo *msginfo, MsgInfo **src_msginfo) +{ + FolderItem *item; + gint num; + gboolean r; + + r = vfolder_get_src_folder_msgnum(msginfo, &item, &num); + if (r == 0 && src_msginfo) + *src_msginfo = folder_item_get_msginfo(item, num); + return r; +} + +void vfolder_workon_msginfo_perfolder(MsgInfoList *_msglist, gboolean free_msglist, + vfolder_worker_fn worker, gpointer data) +{ + MsgInfoList *msglist; + + if (free_msglist) + msglist = _msglist; + else + msglist = g_slist_copy(_msglist); + + for ( ; !!msglist; ) + { + FolderItem *cur_item = NULL; + GSList *msglist_last = NULL; + GSList *list = NULL; + GSList *list_last = NULL; + GSList *cur; + + for (cur = msglist; !!cur; ) + { + MsgInfo *mi = (MsgInfo *) cur->data; + FolderItem *item = mi->folder; + + if (vfolder_get_src_folder_msgnum(mi, + &item, NULL) == VFOLDER_ERR_DELETED) + { + cur = cur->next; + cur->next = NULL; + if (cur == msglist) + msglist = NULL; + g_slist_free(cur); + continue; + } + + if (!cur_item) + cur_item = item; + + if (item == cur_item) + { + if (msglist_last) + msglist_last->next = cur; + msglist_last = cur; + } + else + { + if (!list) + list = cur; + if (list_last) + list_last->next = cur; + list_last = cur; + } + + cur = cur->next; + } + if (msglist_last) + msglist_last->next = NULL; + if (list_last) + list_last->next = NULL; + + if (msglist) + { + worker(msglist, data); + g_slist_free(msglist); + } + msglist = list; + } +} diff --git a/src/plugins/vfolder/vfolder.h b/src/plugins/vfolder/vfolder.h new file mode 100644 index 000000000..05d5d1571 --- /dev/null +++ b/src/plugins/vfolder/vfolder.h @@ -0,0 +1,59 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_FOLDER_H__ +#define __VFOLDER_FOLDER_H__ + + +#include + +#include "folder.h" + +typedef struct _VFolder VFolder; +typedef struct _VFolderItem VFolderItem; + +typedef struct _VFolderSearch VFolderSearch; +struct _VFolderSearch +{ + gchar *folder_id; + gboolean recursive; + gchar *cond; + + gpointer *reserved[2]; +}; + +typedef void (*vfolder_worker_fn) (MsgInfoList *msglist, gpointer data); + + +FolderClass *vfolder_get_class (void); + +gboolean vfolder_is_item_autorefresh(VFolderItem *vitem); + +void vfolder_load_config(VFolderItem *vitem, gboolean force); +void vfolder_refresh_content(VFolderItem *vitem); + +#define VFOLDER_ERR_NOT_VIRTUAL -1 +#define VFOLDER_ERR_DELETED -2 +gint vfolder_get_src_folder_msgnum(MsgInfo *msginfo, + FolderItem **src_item, guint *src_msgnum); +gint vfolder_get_src_msginfo(MsgInfo *msginfo, MsgInfo **src_msginfo); + +void vfolder_workon_msginfo_perfolder(MsgInfoList *msglist, gboolean free_msglist, + vfolder_worker_fn worker, gpointer data); + +#endif /* __VFOLDER_FOLDER_H__ */ diff --git a/src/plugins/vfolder/vfolder_item_prefs.c b/src/plugins/vfolder/vfolder_item_prefs.c new file mode 100644 index 000000000..c32a9e336 --- /dev/null +++ b/src/plugins/vfolder/vfolder_item_prefs.c @@ -0,0 +1,1101 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "gtk/menu.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_common.h" +#include "prefs_gtk.h" +#include "prefs_folder_item.h" +#include "prefs_matcher.h" +#include "matcher_parser.h" +#include "alertpanel.h" +#include "foldersel.h" + +#include "plugin.h" +#include "vfolder_item_prefs.h" + + +struct _VFolderItemPrefsPage +{ + PrefsPage page; + + VFolderItem *vitem; + +}; + +static void prefs_cond_define(gpointer action, gpointer data); +static void prefs_register_cb(gpointer action, gpointer data); +static void prefs_substitute_cb(gpointer action, gpointer data); +static void prefs_delete_cb(gpointer action, gpointer data); +static void prefs_delete_all_cb(gpointer action, gpointer data); +static void prefs_duplicate_cb(gpointer action, gpointer data); +static void prefs_clear_cb(gpointer action, gpointer data); +static void prefs_page_up(gpointer action, gpointer data); +static void prefs_page_down(gpointer action, gpointer data); +static void prefs_top(gpointer action, gpointer data); +static void prefs_up(gpointer action, gpointer data); +static void prefs_down(gpointer action, gpointer data); +static void prefs_bottom(gpointer action, gpointer data); + +enum +{ + PREFS_COL_FOLDER, + PREFS_COL_RECURSIVE, + PREFS_COL_COND, + NB_PREFS_COL +}; + +static GtkActionGroup *prefs_popup_action = NULL; +static GtkWidget *prefs_popup_menu = NULL; + +static GtkActionEntry prefs_popup_entries[] = +{ + { "PrefsVfolderPopup", NULL, "PrefsVfolderPopup" }, + { "PrefsVfolderPopup/Delete", NULL, N_("_Delete"), + NULL, NULL, G_CALLBACK(prefs_delete_cb) }, + { "PrefsVfolderPopup/DeleteAll", NULL, N_("Delete _all"), + NULL, NULL, G_CALLBACK(prefs_delete_all_cb) }, + { "PrefsVfolderPopup/Duplicate", NULL, N_("D_uplicate"), + NULL, NULL, G_CALLBACK(prefs_duplicate_cb) }, +#ifdef GENERIC_UMPC + { "PrefsVfolderPopup/---", NULL, "---", NULL, NULL, NULL }, + { "PrefsVfolderPopup/PageUp", NULL, N_("Move one page up"), + NULL, NULL, G_CALLBACK(prefs_page_up) }, + { "PrefsVfolderPopup/PageDown", NULL, N_("Move one page down"), + NULL, NULL, G_CALLBACK(prefs_page_down) }, +#endif +}; + +static GtkWidget *cond_entry; +static GtkWidget *folder_entry; +static GtkWidget *recursive_btn; +static GtkWidget *cond_list_view; +static GtkWidget *autorefresh_btn; + +static void prefs_select_row(GtkTreeView *list_view, GtkTreePath *path) +{ + GtkTreeModel *model = gtk_tree_view_get_model(list_view); + + if (path && model) { + GtkTreeSelection *selection; + GtkTreeIter iter; + gchar *folder, *cond; + gboolean recursive; + + if (gtk_tree_path_get_depth(path) == 1 + && gtk_tree_path_get_indices(path)[0] == 0) + return; + + /* select row */ + selection = gtk_tree_view_get_selection(list_view); + gtk_tree_selection_select_path(selection, path); + + gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get(model, &iter, + PREFS_COL_FOLDER, &folder, + PREFS_COL_RECURSIVE, &recursive, + PREFS_COL_COND, &cond, + -1); + + gtk_entry_set_text(GTK_ENTRY(folder_entry), folder); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(recursive_btn), recursive); + gtk_entry_set_text(GTK_ENTRY(cond_entry), cond); + + g_free(folder); + g_free(cond); + } +} + +static gint prefs_list_btn_pressed(GtkWidget *widget, GdkEventButton *event, + GtkTreeView *list_view) +{ + if (event) { + /* left- or right-button click */ + if (event->button == 1 || event->button == 3) { + GtkTreePath *path = NULL; + + if (gtk_tree_view_get_path_at_pos( list_view, event->x, event->y, + &path, NULL, NULL, NULL)) { + prefs_select_row(list_view, path); + } + if (path) + gtk_tree_path_free(path); + } + + /* right-button click */ + if (event->button == 3) { + GtkTreeModel *model = gtk_tree_view_get_model(list_view); + GtkTreeIter iter; + gboolean non_empty; + gint row; + + if (!prefs_popup_menu) { + prefs_popup_action = cm_menu_create_action_group( + "PrefsVfolderPopup", + prefs_popup_entries, + G_N_ELEMENTS(prefs_popup_entries), + (gpointer) list_view); + MENUITEM_ADDUI("/Menus", + "PrefsVfolderPopup", + "PrefsVfolderPopup", + GTK_UI_MANAGER_MENU); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Delete", + "PrefsVfolderPopup/Delete", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "DeleteAll", + "PrefsVfolderPopup/DeleteAll", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Duplicate", + "PrefsVfolderPopup/Duplicate", + GTK_UI_MANAGER_MENUITEM); +#ifdef GENERIC_UMPC + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "Separator1", + "PrefsVfolderPopup/---", + GTK_UI_MANAGER_SEPARATOR); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "PageUp", + "PrefsVfolderPopup/PageUp", + GTK_UI_MANAGER_MENUITEM); + MENUITEM_ADDUI("/Menus/PrefsVfolderPopup", + "PageDown", + "PrefsVfolderPopup/PageDown", + GTK_UI_MANAGER_MENUITEM); +#endif + prefs_popup_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM( + gtk_ui_manager_get_widget( + gtkut_ui_manager(), + "/Menus/PrefsVfolderPopup")) + ); + } + + /* grey out some popup menu items if there is no selected row */ + row = gtkut_list_view_get_selected_row(GTK_WIDGET(list_view)); + cm_menu_set_sensitive("PrefsVfolderPopup/Delete", (row > 0)); + cm_menu_set_sensitive("PrefsVfolderPopup/Duplicate", (row > 0)); + + /* grey out seom popup menu items if there is no row + (not counting the (New) one at row 0) */ + non_empty = gtk_tree_model_get_iter_first(model, &iter); + if (non_empty) + non_empty = gtk_tree_model_iter_next(model, &iter); + cm_menu_set_sensitive("PrefsVfolderPopup/DeleteAll", non_empty); + + gtk_menu_popup(GTK_MENU(prefs_popup_menu), + NULL, NULL, NULL, NULL, event->button, event->time); + } + } + return FALSE; +} + +static gboolean prefs_list_popup_menu(GtkWidget *widget, gpointer data) +{ + GtkTreeView *list_view = (GtkTreeView *)data; + GdkEventButton event; + + event.button = 3; + event.time = gtk_get_current_event_time(); + + prefs_list_btn_pressed(NULL, &event, list_view); + + return TRUE; +} + +static void prefs_create_list_view_columns(GtkWidget *list_view) +{ + GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes + (_("Folder"), + renderer, + "text", PREFS_COL_FOLDER, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + gtk_tree_view_column_set_resizable(column, TRUE); + + renderer = gtk_cell_renderer_toggle_new(); + g_object_set(renderer, + "radio", FALSE, + "activatable", FALSE, + NULL); + column = gtk_tree_view_column_new_with_attributes + (_("Recursive"), + renderer, + "active", PREFS_COL_RECURSIVE, + NULL); + gtk_tree_view_column_set_alignment (column, 0.5); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes + (_("Condition"), + renderer, + "text", PREFS_COL_COND, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); + gtk_tree_view_column_set_resizable(column, TRUE); +} + +static void prefs_row_selected(GtkTreeSelection *selection, + GtkTreeView *list_view) +{ + GtkTreePath *path; + GtkTreeIter iter; + GtkTreeModel *model; + + if (!gtk_tree_selection_get_selected(selection, &model, &iter)) + return; + + path = gtk_tree_model_get_path(model, &iter); + prefs_select_row(list_view, path); + gtk_tree_path_free(path); +} + +static GtkWidget *prefs_list_view_create(void) +{ + GtkTreeView *list_view; + GtkTreeSelection *selector; + + list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model( + GTK_TREE_MODEL(gtk_list_store_new(NB_PREFS_COL, + G_TYPE_STRING, + G_TYPE_BOOLEAN, + G_TYPE_STRING, + -1)))); +#ifdef GENERIC_UMPC + g_object_set(list_view, "allow-checkbox-mode", FALSE, NULL); +#endif + + g_signal_connect(G_OBJECT(list_view), "popup-menu", + G_CALLBACK(prefs_list_popup_menu), list_view); + g_signal_connect(G_OBJECT(list_view), "button-press-event", + G_CALLBACK(prefs_list_btn_pressed), list_view); + + gtk_tree_view_set_rules_hint(list_view, prefs_common.use_stripes_everywhere); + gtk_tree_view_set_reorderable(list_view, TRUE); + + selector = gtk_tree_view_get_selection(list_view); + gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE); + g_signal_connect(G_OBJECT(selector), "changed", + G_CALLBACK(prefs_row_selected), list_view); + + /* create the columns */ + prefs_create_list_view_columns(GTK_WIDGET(list_view)); + + return GTK_WIDGET(list_view); +} + +static void prefs_select_folder_cb(GtkWidget *widget, gpointer data) +{ + FolderItem *item; + gchar *id; + + item = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL, FALSE); + if (item && item->path) { + id = folder_item_get_identifier(item); + if (id) { + gtk_entry_set_text(GTK_ENTRY(data), id); + g_free(id); + } + } +} + +static void prefs_clear_list_store(void) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + + gtk_list_store_clear(list_store); + + /* add the place holder (New) at row 0 */ + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, _("(New)"), + PREFS_COL_RECURSIVE, FALSE, + PREFS_COL_COND, _("(New)"), + -1); +} + +/* from vfolder.c */ +void _vfolder_item_get_searches(VFolderItem *vitem, gint *len, VFolderSearch **searches); +static void prefs_fill_list_store(VFolderItem *vitem) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + VFolderSearch *searches; + gint len; + gint i; + + _vfolder_item_get_searches(vitem, &len, &searches); + + for (i = 0; i < len; ++i) + { + VFolderSearch *search = &searches[i]; + + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, search->folder_id, + PREFS_COL_RECURSIVE, search->recursive, + PREFS_COL_COND, search->cond, + -1); + } +} + +static void prefs_page_create_widget(PrefsPage *page, GtkWindow *window, gpointer data) +{ + VFolderItemPrefsPage *vpage = (VFolderItemPrefsPage *) page; + VFolderItem *vitem = (VFolderItem *) data; + GtkWidget *vbox1; + GtkWidget *w; + + vpage->vitem = vitem; + + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width(GTK_CONTAINER (vbox1), VBOX_BORDER); + page->widget = vbox1; + + if (!folder_item_parent((FolderItem *) vitem)) + { + w = gtk_label_new(g_strconcat("", + _("There are no Content preferences for top-level folder."), + "", NULL)); + gtk_widget_show(w); + gtk_label_set_use_markup(GTK_LABEL(w), TRUE); + gtk_misc_set_alignment(GTK_MISC(w), 0.5, 0.01); + gtk_box_pack_start (GTK_BOX(vbox1), w, FALSE, TRUE, 0); + + return; + } + + vfolder_load_config(vitem, FALSE); + + GtkWidget *vbox2; + GtkWidget *table; + GtkWidget *folder_label; + GtkWidget *folder_btn; + GtkWidget *cond_label; + GtkWidget *cond_btn; + GtkWidget *reg_hbox; + GtkWidget *arrow; + GtkWidget *btn_hbox; + GtkWidget *reg_btn; + GtkWidget *subst_btn; + GtkWidget *del_btn; + GtkWidget *clear_btn; + GtkWidget *cond_hbox; + GtkWidget *cond_scrolledwin; + GtkWidget *btn_vbox; + GtkWidget *top_btn; + GtkWidget *page_up_btn; + GtkWidget *up_btn; + GtkWidget *down_btn; + GtkWidget *page_down_btn; + GtkWidget *bottom_btn; + + vbox2 = gtk_vbox_new (FALSE, 4); + gtk_widget_show (vbox2); + gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8); + + table = gtk_table_new(4, 3, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_widget_show(table); + gtk_box_pack_start (GTK_BOX (vbox2), table, TRUE, TRUE, 0); + + folder_label = gtk_label_new (_("Folder")); + gtk_widget_show (folder_label); + gtk_misc_set_alignment (GTK_MISC (folder_label), 1, 0.5); + gtk_table_attach (GTK_TABLE (table), folder_label, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + folder_entry = gtk_entry_new (); + gtk_widget_show (folder_entry); + gtk_table_attach (GTK_TABLE (table), folder_entry, 1, 2, 2, 3, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, + GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0); + + folder_btn = gtkut_get_browse_file_btn(_("Browse")); + gtk_widget_show (folder_btn); + gtk_table_attach (GTK_TABLE (table), folder_btn, 2, 3, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 2, 2); + g_signal_connect + (G_OBJECT (folder_btn), "clicked", + G_CALLBACK (prefs_select_folder_cb), + folder_entry); + + recursive_btn = gtk_check_button_new_with_label (_("Recursive")); + gtk_widget_show (recursive_btn); + gtk_table_attach (GTK_TABLE (table), recursive_btn, 1, 3, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + cond_label = gtk_label_new (_("Condition")); + gtk_widget_show (cond_label); + gtk_misc_set_alignment (GTK_MISC (cond_label), 1, 0.5); + gtk_table_attach (GTK_TABLE (table), cond_label, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + cond_entry = gtk_entry_new (); + gtk_widget_show (cond_entry); + gtk_table_attach (GTK_TABLE (table), cond_entry, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_FILL|GTK_EXPAND), + (GtkAttachOptions) (0), 0, 0); + + cond_btn = gtk_button_new_with_mnemonic (_(" Def_ine... ")); + gtk_widget_show (cond_btn); + gtk_table_attach (GTK_TABLE (table), cond_btn, 2, 3, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 2, 2); + g_signal_connect(G_OBJECT (cond_btn), "clicked", + G_CALLBACK(prefs_cond_define), + NULL); + + + /* register / substitute / delete */ + reg_hbox = gtk_hbox_new (FALSE, 4); + gtk_widget_show (reg_hbox); + gtk_box_pack_start (GTK_BOX (vbox2), reg_hbox, FALSE, FALSE, 0); + + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT); + gtk_widget_show (arrow); + gtk_box_pack_start (GTK_BOX (reg_hbox), arrow, FALSE, FALSE, 0); + gtk_widget_set_size_request (arrow, -1, 16); + + btn_hbox = gtk_hbox_new (TRUE, 4); + gtk_widget_show (btn_hbox); + gtk_box_pack_start (GTK_BOX (reg_hbox), btn_hbox, FALSE, FALSE, 0); + + reg_btn = gtk_button_new_from_stock (GTK_STOCK_ADD); + gtk_widget_show (reg_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), reg_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (reg_btn), "clicked", + G_CALLBACK(prefs_register_cb), NULL); + CLAWS_SET_TIP(reg_btn, + _("Append the new search above to the list")); + + subst_btn = gtkut_get_replace_btn (_("_Replace")); + gtk_widget_show (subst_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), subst_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (subst_btn), "clicked", + G_CALLBACK(prefs_substitute_cb), + NULL); + CLAWS_SET_TIP(subst_btn, + _("Replace the selected search in list with the search above")); + + del_btn = gtk_button_new_with_mnemonic (_("D_elete")); + gtk_button_set_image(GTK_BUTTON(del_btn), + gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON)); + gtk_box_pack_start (GTK_BOX (btn_hbox), del_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (del_btn), "clicked", + G_CALLBACK(prefs_delete_cb), NULL); + CLAWS_SET_TIP(del_btn, + _("Delete the selected search from the list")); + + clear_btn = gtk_button_new_with_mnemonic (_("C_lear")); + gtk_button_set_image(GTK_BUTTON(clear_btn), + gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (clear_btn); + gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0); + g_signal_connect(G_OBJECT (clear_btn), "clicked", + G_CALLBACK(prefs_clear_cb), NULL); + CLAWS_SET_TIP(clear_btn, + _("Clear all the input fields in the dialog")); + + cond_hbox = gtk_hbox_new (FALSE, 8); + gtk_widget_show (cond_hbox); + gtk_box_pack_start (GTK_BOX (vbox2), cond_hbox, TRUE, TRUE, 0); + + cond_scrolledwin = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (cond_scrolledwin); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(cond_scrolledwin), + GTK_SHADOW_ETCHED_IN); + gtk_widget_set_size_request (cond_scrolledwin, -1, 150); + gtk_box_pack_start (GTK_BOX (cond_hbox), cond_scrolledwin, + TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (cond_scrolledwin), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_container_set_border_width(GTK_CONTAINER (cond_scrolledwin), 4); + + cond_list_view = prefs_list_view_create(); + gtk_widget_show (cond_list_view); + gtk_container_add (GTK_CONTAINER (cond_scrolledwin), cond_list_view); + prefs_clear_list_store(); + prefs_fill_list_store(vitem); + + btn_vbox = gtk_vbox_new (FALSE, 8); + gtk_widget_show (btn_vbox); + gtk_box_pack_start (GTK_BOX (cond_hbox), btn_vbox, FALSE, FALSE, 0); + + top_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_TOP); + gtk_widget_show (top_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), top_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (top_btn), "clicked", + G_CALLBACK(prefs_top), NULL); + CLAWS_SET_TIP(top_btn, + _("Move the selected search to the top")); + +#ifndef GENERIC_UMPC + page_up_btn = gtk_button_new_with_mnemonic (_("Page u_p")); + gtk_button_set_image(GTK_BUTTON(page_up_btn), + gtk_image_new_from_stock(GTK_STOCK_GO_UP,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (page_up_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), page_up_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (page_up_btn), "clicked", + G_CALLBACK(prefs_page_up), NULL); + CLAWS_SET_TIP(page_up_btn, + _("Move the selected search one page up")); +#endif + + up_btn = gtk_button_new_from_stock (GTK_STOCK_GO_UP); + gtk_widget_show (up_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), up_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (up_btn), "clicked", + G_CALLBACK(prefs_up), NULL); + CLAWS_SET_TIP(up_btn, + _("Move the selected search up")); + + down_btn = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN); + gtk_widget_show (down_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), down_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (down_btn), "clicked", + G_CALLBACK(prefs_down), NULL); + CLAWS_SET_TIP(down_btn, + _("Move the selected search down")); + +#ifndef GENERIC_UMPC + page_down_btn = gtk_button_new_with_mnemonic (_("Page dow_n")); + gtk_button_set_image(GTK_BUTTON(page_down_btn), + gtk_image_new_from_stock(GTK_STOCK_GO_DOWN,GTK_ICON_SIZE_BUTTON)); + gtk_widget_show (page_down_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), page_down_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (page_down_btn), "clicked", + G_CALLBACK(prefs_page_down), NULL); + CLAWS_SET_TIP(page_down_btn, + _("Move the selected search one page down")); +#endif + + bottom_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_BOTTOM); + gtk_widget_show (bottom_btn); + gtk_box_pack_start (GTK_BOX (btn_vbox), bottom_btn, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT (bottom_btn), "clicked", + G_CALLBACK(prefs_bottom), NULL); + CLAWS_SET_TIP(bottom_btn, + _("Move the selected search to the bottom")); + + + autorefresh_btn = gtk_check_button_new_with_label (_("Autorefresh on changes")); + gtk_widget_show (autorefresh_btn); + gtk_box_pack_end (GTK_BOX (vbox2), autorefresh_btn, FALSE, FALSE, 4); + CLAWS_SET_TIP(autorefresh_btn, + _("Automatically re-run searches when changes on source folders are detected")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autorefresh_btn), + vfolder_is_item_autorefresh(vitem)); +} + +static void prefs_condition_define_done(MatcherList *matchers) +{ + gchar *str; + + if (matchers == NULL) + return; + + str = matcherlist_to_string(matchers); + + if (str != NULL) { + gtk_entry_set_text(GTK_ENTRY(cond_entry), str); + g_free(str); + } +} + +static void prefs_cond_define(gpointer action, gpointer data) +{ + gchar *cond_str; + MatcherList *matchers = NULL; + + cond_str = gtk_editable_get_chars(GTK_EDITABLE(cond_entry), 0, -1); + + if (*cond_str != '\0') { + matchers = matcher_parser_get_cond(cond_str, NULL); + if (matchers == NULL) + alertpanel_error(_("Condition string is not valid.")); + } + + g_free(cond_str); + + prefs_matcher_open(matchers, prefs_condition_define_done); + + if (matchers != NULL) + matcherlist_free(matchers); +} + +static gint prefs_list_view_insert_search(gint row) +{ + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + GtkTreeIter sibling; + const gchar *folder; + gboolean recursive; + const gchar *cond; + + folder = gtk_entry_get_text(GTK_ENTRY(folder_entry)); + recursive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(recursive_btn)); + cond = gtk_entry_get_text(GTK_ENTRY(cond_entry)); + + /* validate values */ + { + FolderItem *item; + + item = folder_find_item_from_identifier(folder); + if (!item) + { + alertpanel_error(_("Invalid folder")); + return -1; + } + else if (item->folder->klass == vfolder_get_class()) + { + alertpanel_error(_("Cannot use virtual folder as source.")); + return -1; + } + + if (!matcher_parser_get_cond((gchar *) cond, NULL)) + { + alertpanel_error(_("Condition string is not valid.")); + return -1; + } + } + + /* check if valid row at all */ + if (row >= 0) { + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), + &iter, NULL, row)) + row = -1; + } else if (row < -1) { + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), + &sibling, NULL, -row-2)) + row = -1; + } + + if (row == -1 ) { + /* append new */ + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL) - 1; + } else if (row < -1) { + /* duplicate */ + gtk_list_store_insert_after(list_store, &iter, &sibling); + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL) - 1; + } else { + /* change existing */ + gtk_list_store_set(list_store, &iter, + PREFS_COL_FOLDER, folder, + PREFS_COL_RECURSIVE, recursive, + PREFS_COL_COND, cond, + -1); + return row; + } +} + +static void prefs_register_cb(gpointer action, gpointer data) +{ + prefs_list_view_insert_search(-1); +} + +static void prefs_substitute_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + prefs_list_view_insert_search(row); +} + +static void prefs_delete_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model( + GTK_TREE_VIEW(cond_list_view))); + GtkTreeIter iter; + + if (row <= 0) + return; + + if (alertpanel(_("Delete search"), + _("Do you really want to delete this search?"), + GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT) + return; + + if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(list_store), &iter, NULL, row)) + return; + + gtk_list_store_remove(list_store, &iter); +} + +static void prefs_delete_all_cb(gpointer action, gpointer data) +{ + if (alertpanel(_("Delete all searches"), + _("Do you really want to delete all the searches?"), + GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT) + return; + + prefs_clear_list_store(); +} + +static void prefs_duplicate_cb(gpointer action, gpointer data) +{ + gint row = gtkut_list_view_get_selected_row(cond_list_view); + prefs_list_view_insert_search(-row-2); +} + +static void prefs_clear_cb(gpointer action, gpointer data) +{ + gtk_entry_set_text(GTK_ENTRY(folder_entry), ""); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(recursive_btn), FALSE); + gtk_entry_set_text(GTK_ENTRY(cond_entry), ""); +} + +static void prefs_page_up(gpointer action, gpointer data) +{ + gint row, target_row; + GtkTreeIter selected, target; + GtkTreeModel *model; + GtkTreePath *path; + GdkRectangle cell_rect, view_rect; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &selected, NULL, row)) + return; + + /* compute number of rows per page (approximation) */ + path = gtk_tree_model_get_path(model, &selected); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(cond_list_view), path, NULL, &cell_rect); + gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(cond_list_view), &view_rect); + gtk_tree_path_free(path); + target_row = row - (view_rect.height/cell_rect.height); + if (target_row < 1) + target_row = 1; + + if (!gtk_tree_model_iter_nth_child(model, &target, NULL, target_row)) + return; + gtk_list_store_move_before(GTK_LIST_STORE(model), &selected, &target); + gtkut_list_view_select_row(cond_list_view, target_row); +} + +static void prefs_page_down(gpointer action, gpointer data) +{ + gint row, target_row, n_rows; + GtkTreeIter selected, target; + GtkTreeModel *model; + GtkTreePath *path; + GdkRectangle cell_rect, view_rect; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows -1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &selected, NULL, row)) + return; + + /* compute number of rows per page (approximation) */ + path = gtk_tree_model_get_path(model, &selected); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(cond_list_view), path, NULL, &cell_rect); + gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(cond_list_view), &view_rect); + gtk_tree_path_free(path); + target_row = row + (view_rect.height/cell_rect.height); + if (target_row > n_rows-1) + target_row = n_rows-1; + + if (!gtk_tree_model_iter_nth_child(model, &target, NULL, target_row)) + return; + gtk_list_store_move_after(GTK_LIST_STORE(model), &selected, &target); + gtkut_list_view_select_row(cond_list_view, target_row); +} + +static void prefs_top(gpointer action, gpointer data) +{ + gint row; + GtkTreeIter top, sel; + GtkTreeModel *model; + + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, 0) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row)) + return; + + gtk_list_store_move_after(GTK_LIST_STORE(model), &sel, &top); + gtkut_list_view_select_row(cond_list_view, 1); +} + +static void prefs_up(gpointer action, gpointer data) +{ + gint row; + GtkTreeIter top, sel; + GtkTreeModel *model; + + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row <= 1) + return; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row - 1) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row)) + return; + + gtk_list_store_swap(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, row - 1); +} + +static void prefs_down(gpointer action, gpointer data) +{ + gint row, n_rows; + GtkTreeIter top, sel; + GtkTreeModel *model; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows - 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, row + 1)) + return; + + gtk_list_store_swap(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, row + 1); +} + +static void prefs_bottom(gpointer action, gpointer data) +{ + gint row, n_rows; + GtkTreeIter top, sel; + GtkTreeModel *model; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + n_rows = gtk_tree_model_iter_n_children(model, NULL); + row = gtkut_list_view_get_selected_row(cond_list_view); + if (row < 1 || row >= n_rows - 1) + return; + + if (!gtk_tree_model_iter_nth_child(model, &top, NULL, row) + || !gtk_tree_model_iter_nth_child(model, &sel, NULL, n_rows - 1)) + return; + + gtk_list_store_move_after(GTK_LIST_STORE(model), &top, &sel); + gtkut_list_view_select_row(cond_list_view, n_rows - 1); +} + + +static void prefs_page_destroy_widget(PrefsPage *page) +{ + /* void */ +} + +gboolean vfolder_item_prefs_save(VFolderItem *vitem, gboolean autorefresh, + gint len, VFolderSearch *searches) +{ + gchar *id; + gchar *block; + PrefFile *pfile; + gchar *file; + gint r; + + if (!folder_item_parent((FolderItem *) vitem)) + return FALSE; + + id = folder_item_get_identifier((FolderItem *) vitem); + if (!id) + return FALSE; + block = g_strdup_printf("VFolder:%s", id); + g_free(id); + + file = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDERITEM_RC, NULL); + pfile = prefs_write_open(file); + g_free(file); + if (!pfile) + { + g_warning("Failed to write VFolderItem configuration to file"); + return FALSE; + } + + r = prefs_set_block_label(pfile, block); + g_free(block); + if (r < 0) + return FALSE; + + if (autorefresh && fputs("!autorefresh\n", pfile->fp) == EOF) + goto fail; + + for (r = 0; r < len; ++r) + { + VFolderSearch *search = &searches[r]; + gchar *s; + + if (search->recursive && fputc('+', pfile->fp) == EOF) + goto fail; + + for (s = search->folder_id; s && *s != '\0'; ++s) + { + if ((*s == ' ' || *s == '\\') && fputc('\\', pfile->fp) == EOF) + goto fail; + if (fputc(*s, pfile->fp) == EOF) + goto fail; + } + + if (fputc(' ', pfile->fp) == EOF) + goto fail; + + if (fputs(search->cond, pfile->fp) == EOF) + goto fail; + + if (fputc('\n', pfile->fp) == EOF) + goto fail; + + continue; + +fail: + g_warning("Failed to write VFolderItem configuration to file"); + prefs_file_close_revert(pfile); + return FALSE; + } + + if (prefs_file_close(pfile) < 0) + { + g_warning("Failed to write VFolderItem configuration to file"); + return FALSE; + } + + return TRUE; +} + +static void prefs_page_save(PrefsPage *page) +{ + VFolderItemPrefsPage *vpage = (VFolderItemPrefsPage *) page; + VFolderItem *vitem = vpage->vitem; + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(cond_list_view)); + GtkTreeIter iter; + gint len = gtk_tree_model_iter_n_children(model, NULL) - 1 /* "New" placeholder*/; + gint i = 0; + VFolderSearch searches[len]; + + gtk_tree_model_get_iter_first(model, &iter); + while (gtk_tree_model_iter_next(model, &iter)) + { + VFolderSearch *search = &searches[i++]; + + gtk_tree_model_get(model, &iter, + PREFS_COL_FOLDER, &search->folder_id, + PREFS_COL_RECURSIVE, &search->recursive, + PREFS_COL_COND, &search->cond, + -1); + } + + if (vfolder_item_prefs_save(vitem, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(autorefresh_btn)), + len, searches)) + { + vfolder_load_config(vitem, TRUE); + vfolder_refresh_content(vitem); + } + + for (i = 0; i < len; ++i) + { + VFolderSearch *search = &searches[i]; + g_free(search->folder_id); + g_free(search->cond); + } +} + +#undef _set_pref +#undef set_pref + +static VFolderItemPrefsPage vfolder_item_prefs_page; + +void vfolder_item_prefs_register(void) +{ + static gchar *pfi_path[2]; + + pfi_path[0] = _("Content"); + pfi_path[1] = NULL; + + vfolder_item_prefs_page.page.path = pfi_path; + vfolder_item_prefs_page.page.create_widget = prefs_page_create_widget; + vfolder_item_prefs_page.page.destroy_widget = prefs_page_destroy_widget; + vfolder_item_prefs_page.page.save_page = prefs_page_save; + + prefs_folder_item_register_page((PrefsPage *) &vfolder_item_prefs_page, + vfolder_get_class()); +} + +void vfolder_item_prefs_unregister(void) +{ + prefs_folder_item_register_page((PrefsPage *) &vfolder_item_prefs_page, + vfolder_get_class()); +} + +/* for plugin_gtk.c */ +void _vfolder_search_create(VFolderItem *vitem, GtkWindow *window, + GtkContainer *container) +{ + prefs_page_create_widget((PrefsPage *) &vfolder_item_prefs_page, window, vitem); + gtk_container_add(container, vfolder_item_prefs_page.page.widget); +} +void _vfolder_search_save(void) +{ + prefs_page_save((PrefsPage *) &vfolder_item_prefs_page); +} diff --git a/src/plugins/vfolder/vfolder_item_prefs.h b/src/plugins/vfolder/vfolder_item_prefs.h new file mode 100644 index 000000000..df56f60b4 --- /dev/null +++ b/src/plugins/vfolder/vfolder_item_prefs.h @@ -0,0 +1,33 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_ITEM_PREFS_H__ +#define __VFOLDER_ITEM_PREFS_H__ + +#include + +#include "vfolder.h" + +typedef struct _VFolderItemPrefsPage VFolderItemPrefsPage; + +void vfolder_item_prefs_register(void); +void vfolder_item_prefs_unregister(void); +gboolean vfolder_item_prefs_save(VFolderItem *vitem, gboolean autorefresh, + gint len, VFolderSearch *searches); + +#endif /* __VFOLDER_ITEM_PREFS_H__ */ diff --git a/src/plugins/vfolder/vfolder_prefs.c b/src/plugins/vfolder/vfolder_prefs.c new file mode 100644 index 000000000..5c2bb0a3e --- /dev/null +++ b/src/plugins/vfolder/vfolder_prefs.c @@ -0,0 +1,223 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# include "claws-features.h" +#endif + +#include +#include + +#include "gtk/menu.h" +#include "common/defs.h" +#include "common/prefs.h" +#include "prefs_common.h" +#include "prefs_gtk.h" +#include "alertpanel.h" +#include "foldersel.h" + +#include "plugin.h" +#include "plugin_gtk.h" +#include "vfolder_prefs.h" + + +struct _VFolderPrefsPage +{ + PrefsPage page; +}; + +static GtkWidget *trash_btn; +static GtkWidget *trash_hide_btn; +static GtkWidget *reply_btn; +static GtkWidget *reply_hide_btn; +static GtkWidget *search_btn; +static GtkWidget *folder_entry; + +static void prefs_select_folder_cb(GtkWidget *widget, gpointer data) +{ + FolderItem *item; + + item = foldersel_folder_sel(NULL, FOLDER_SEL_COPY, NULL, FALSE); + if (item && item->path) + { + gchar *id = folder_item_get_identifier(item); + + if (id) + { + if (item->folder->klass != vfolder_get_class()) + alertpanel_error(_("'%s' is not a virtual folder."), id); + else + gtk_entry_set_text(GTK_ENTRY(data), id); + g_free(id); + } + } +} + +static void prefs_page_create_widget(PrefsPage *page, GtkWindow *window, gpointer data) +{ + VFolderConfig *vconfig = vfolder_get_config(); + + GtkWidget *vbox1; + GtkWidget *vbox2; + GtkWidget *box; + GtkWidget *w; + + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width(GTK_CONTAINER (vbox1), VBOX_BORDER); + + vbox2 = gtkut_get_options_frame (vbox1, NULL, _("Additional menu items")); + + w = gtk_label_new (_("Move (thread) to trash: " + "Perform as if from each message's source folder")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (vbox2, trash_btn, + _("Add 'Move (thread) to trash [VFolder]' menu items")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trash_btn), vconfig->add_trash); + + box = gtk_hbox_new (FALSE, 0); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + + w = gtk_label_new (" "); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (box, trash_hide_btn, + _("...and hide original menu items")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trash_hide_btn), + vconfig->hide_trash_org); + SET_TOGGLE_SENSITIVITY (trash_btn, trash_hide_btn); + + w = gtk_label_new (""); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + w = gtk_label_new (_("Reply: " + "Use folder properties from each message's source folder " + "(instead of virtual folder's)")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (vbox2, reply_btn, + _("Add 'Reply [VFolder]' menu item")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reply_btn), + vconfig->add_reply); + + box = gtk_hbox_new (FALSE, 0); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + + w = gtk_label_new (" "); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + PACK_CHECK_BUTTON (box, reply_hide_btn, + _("...and hide original menu item")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reply_hide_btn), + vconfig->hide_reply_org); + SET_TOGGLE_SENSITIVITY (reply_btn, reply_hide_btn); + + + vbox2 = gtkut_get_options_frame (vbox1, NULL, _("Search results")); + + PACK_CHECK_BUTTON (vbox2, search_btn, + _("Enable 'search results' feature")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(search_btn), + vconfig->enable_search); + + box = gtk_hbox_new (FALSE, 2); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX (vbox2), box, FALSE, TRUE, 0); + SET_TOGGLE_SENSITIVITY(search_btn, box); + + w = gtk_label_new (_("Virtual folder to use:")); + gtk_widget_show (w); + gtk_misc_set_alignment (GTK_MISC (w), 1, 0.5); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + + folder_entry = gtk_entry_new (); + gtk_widget_show (folder_entry); + gtk_box_pack_start (GTK_BOX (box), folder_entry, TRUE, TRUE, 0); + gtk_entry_set_text(GTK_ENTRY(folder_entry), vconfig->id_search_folder); + + w = gtkut_get_browse_file_btn(_("Browse")); + gtk_widget_show (w); + gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0); + g_signal_connect (G_OBJECT (w), "clicked", + G_CALLBACK (prefs_select_folder_cb), + folder_entry); + + page->widget = vbox1; +} + +static void prefs_page_destroy_widget(PrefsPage *page) +{ + /* void */ +} + +static void prefs_page_save(PrefsPage *page) +{ + VFolderConfig *vconfig = vfolder_get_config(); + + vconfig->add_trash = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(trash_btn)); + vconfig->hide_trash_org = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(trash_hide_btn)); + vconfig->add_reply = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(reply_btn)); + vconfig->hide_reply_org = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(reply_hide_btn)); + vconfig->enable_search = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(search_btn)); + g_free(vconfig->id_search_folder); + vconfig->id_search_folder = g_strdup( + gtk_entry_get_text(GTK_ENTRY(folder_entry))); + + if (vfolder_save_config()) + vfolder_gtk_set_menus(FALSE); +} + + +static VFolderPrefsPage vfolder_prefs_page; + +void vfolder_prefs_register(void) +{ + static gchar *pfi_path[3]; + + pfi_path[0] = _("Plugins"); + pfi_path[1] = _("VFolder"); + pfi_path[2] = NULL; + + vfolder_prefs_page.page.path = pfi_path; + vfolder_prefs_page.page.create_widget = prefs_page_create_widget; + vfolder_prefs_page.page.destroy_widget = prefs_page_destroy_widget; + vfolder_prefs_page.page.save_page = prefs_page_save; + + prefs_gtk_register_page((PrefsPage *) &vfolder_prefs_page); +} + +void vfolder_prefs_unregister(void) +{ + prefs_gtk_unregister_page((PrefsPage *) &vfolder_prefs_page); +} diff --git a/src/plugins/vfolder/vfolder_prefs.h b/src/plugins/vfolder/vfolder_prefs.h new file mode 100644 index 000000000..eb87f63f6 --- /dev/null +++ b/src/plugins/vfolder/vfolder_prefs.h @@ -0,0 +1,29 @@ +/* vfolder -- Claws Mail plugin to add virtual folders + * Copyright (C) 2017 Olivier Brunel and the Claws Mail Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef __VFOLDER_PREFS_H__ +#define __VFOLDER_PREFS_H__ + +#include + +typedef struct _VFolderPrefsPage VFolderPrefsPage; + +void vfolder_prefs_register(void); +void vfolder_prefs_unregister(void); + +#endif /* __VFOLDER_PREFS_H__ */ -- 2.11.0 From noreply at thewildbeast.co.uk Wed Jan 18 21:57:39 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Wed, 18 Jan 2017 20:57:39 +0000 Subject: [Users] [Bug 3762] 'redirect' fails In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 wwp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-18 21:52:03.048289283 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=fb6eee4447024d69b02416e828fee4744c8c8160 Merge: 1ba704d 9657f8b Author: Colin Leroy Date: Wed Jan 18 21:52:02 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=9657f8bebce60d1cf16061a4fee139e2bb9def9e Author: wwp Date: Wed Jan 18 21:48:50 2017 +0100 Fix bug 3762, 'redirect fails' by removing an check added at 3.14.1.39-g989b3a3, thought I was hardening sanity checks and I changed the logics, making it fail while in normal situation. Removed few more extraneous checks. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 19 10:16:09 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 19 Jan 2017 09:16:09 +0000 Subject: [Users] [Bug 1645] Make claws-mail support GnuPG groups In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=1645 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #599 is|0 |1 patch| | Attachment #599|text/x-diff |text/plain mime type| | -- You are receiving this mail because: You are the assignee for the bug. From john at wexfordpress.com Thu Jan 19 19:59:34 2017 From: john at wexfordpress.com (John Culleton) Date: Thu, 19 Jan 2017 13:59:34 -0500 Subject: [Users] How to direct mail to separate boxes from single address. Message-ID: <20170119135934.35b34b3a@acer3.locall.com> I had this feature set up for many years. But now I have a new computer and I forget how I did it. Here is the situation: One of my email addresses is john at wexfordpress.com. At this addy I get mail from several mailing lists. I want to redirect some of this email into separate boxes, like direct all mail from this list to a box called "claws-mail". I know how to create the mail boxes. I can select all mail in my general inbox from a particular mailing list and move to another box manually. I want to automate the process. I did this before with some lines in my accounts structure but I forget how I did it, years ago. All replies welcome. -- John Culleton Wexfordpress Book design and indexing. From lists-claws at listmail.innovate.net Thu Jan 19 20:10:27 2017 From: lists-claws at listmail.innovate.net (Richard) Date: Thu, 19 Jan 2017 19:10:27 +0000 Subject: [Users] How to direct mail to separate boxes from single address. In-Reply-To: <20170119135934.35b34b3a@acer3.locall.com> References: <20170119135934.35b34b3a@acer3.locall.com> Message-ID: <10322C7A862376BEE4D622E0@ritz.innovate.net> > Date: Thursday, January 19, 2017 13:59:34 -0500 > From: John Culleton > > I had this feature set up for many years. But now I have a new > computer and I forget how I did it. > > Here is the situation: One of my email addresses is > john at wexfordpress.com. At this addy I get mail from several mailing > lists. I want to redirect some of this email into separate boxes, > like direct all mail from this list to a box called "claws-mail". I > know how to create the mail boxes. I can select all mail in my > general inbox from a particular mailing list and move to another > box manually. I want to automate the process. I did this before > with some lines in my accounts structure but I forget how I did it, > years ago. > As I believe was suggested the other day, in response to your earlier message(s) on this topic, you can use the: - Configuration - Filtering (see the top tool bar) claws-mail capabilities to accomplish this. Many mailing lists, this one included, have a "List-Id" indicator: List-Id: in the message headers. The claws-mail filtering lets you filter on that, which generally makes for very clean message handling. From noreply at thewildbeast.co.uk Thu Jan 19 20:30:53 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 19 Jan 2017 19:30:53 +0000 Subject: [Users] [Bug 3762] 'redirect' fails In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3762 --- Comment #3 from lbickley --- Downloaded/Compiled version 3.14.1-150-ge5d028. Tested many filter redirects, All O.K. Thanks for the fix! -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Thu Jan 19 21:06:36 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 19 Jan 2017 20:06:36 +0000 Subject: [Users] [Bug 3760] Can't change folder type more than once In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 --- Comment #3 from Tristan Miller --- I see. So when archiving my sent messages to another folder, is there no way to make that folder display the "To" column instead of the "From" column, other than by making it a child of my outbox? -- You are receiving this mail because: You are the assignee for the bug. From edodd55 at gmail.com Fri Jan 20 08:46:00 2017 From: edodd55 at gmail.com (Liz) Date: Fri, 20 Jan 2017 18:46:00 +1100 Subject: [Users] How to direct mail to separate boxes from single address. In-Reply-To: <10322C7A862376BEE4D622E0@ritz.innovate.net> References: <20170119135934.35b34b3a@acer3.locall.com> <10322C7A862376BEE4D622E0@ritz.innovate.net> Message-ID: <20170120184600.0314fdbe.edodd55@gmail.com> On Thu, 19 Jan 2017 19:10:27 +0000 Richard wrote: > > Date: Thursday, January 19, 2017 13:59:34 -0500 > > From: John Culleton > > > > I had this feature set up for many years. But now I have a new > > computer and I forget how I did it. > > > > Here is the situation: One of my email addresses is > > john at wexfordpress.com. At this addy I get mail from several mailing > > lists. I want to redirect some of this email into separate boxes, > > like direct all mail from this list to a box called "claws-mail". I > > know how to create the mail boxes. I can select all mail in my > > general inbox from a particular mailing list and move to another > > box manually. I want to automate the process. I did this before > > with some lines in my accounts structure but I forget how I did it, > > years ago. > > > > As I believe was suggested the other day, in response to your earlier > message(s) on this topic, you can use the: > > - Configuration > - Filtering > > (see the top tool bar) > > claws-mail capabilities to accomplish this. > > Many mailing lists, this one included, have a "List-Id" indicator: > > List-Id: > > in the message headers. The claws-mail filtering lets you filter on > that, which generally makes for very clean message handling. > > Slowly does it. Select the mail in question in the email list box - mine is top right, and it says Subject / From / Date ?Size Right click on the mail (let's assume its claws-mail-users) Select create filter rule > automatically (works well for mailing lists) up comes a big dialogue box the first line is blank. Its optional the next line has the query which will select claws-mail-users mail the next line ACTION is blank. This is where you fill in the destination etc, so you click the box to the right "Define" and the first action is (guessed as) MOVE then you need to select the destination click ADD back to the first big box, click ADD and CLOSE Liz From noreply at thewildbeast.co.uk Fri Jan 20 17:45:52 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 20 Jan 2017 16:45:52 +0000 Subject: [Users] [Bug 3763] New: Fancy plugin uses insecure webkitgtk+ 2 library Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3763 Bug ID: 3763 Summary: Fancy plugin uses insecure webkitgtk+ 2 library Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: Plugins Assignee: users at lists.claws-mail.org Reporter: waldner at katamail.com The library has lots of security bugs that will not be fixed, arch linux has removed the fancy plugin from claws-mail. Is a fancy replacement scheduled at some point? https://www.archlinux.org/todo/phasing-out-webkitgtk2/ -- You are receiving this mail because: You are the assignee for the bug. From slitt at troubleshooters.com Fri Jan 20 17:45:21 2017 From: slitt at troubleshooters.com (Steve Litt) Date: Fri, 20 Jan 2017 11:45:21 -0500 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: <20170120114521.7b70a19f@mydesk.domain.cxm> On Wed, 18 Jan 2017 08:49:16 +0000, noreply at thewildbeast.co.uk wrote: > http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 > > --- Comment #9 from daniel --- > I've seen this behavior with dovecot mail server with pretty much > default config. In my case during email composing several drafts > showed in drafts folder and after send they remained there for > minutes or hours before their deletion. Client was always TB. > But I did not considered it to be too big issue to report it. I saw it with Claws used as an IMAP window to Dovecot. I didn't check to see if other email clients also contained a huge drafts folder, because like you, I didn't see it as a huge problem --- I just mass-deleted every once in a while. I just looked again, and the problem seems to have magically fixed itself. I'm now using Claws version 3.14.1 on Void Linux 64 bit. SteveT From noreply at thewildbeast.co.uk Fri Jan 20 17:51:30 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 20 Jan 2017 16:51:30 +0000 Subject: [Users] [Bug 3763] Fancy plugin uses insecure webkitgtk+ 2 library In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3763 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugins |Plugins/Fancy -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 20 18:06:58 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 20 Jan 2017 17:06:58 +0000 Subject: [Users] [Bug 3763] Fancy plugin uses insecure webkitgtk+ 2 library In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3763 --- Comment #1 from Michael Schwendt --- There is a similar movement at the Fedora Project: Proposal: remove insecure WebKitGTK+ packages for F27 https://lists.fedoraproject.org/archives/list/devel at lists.fedoraproject.org/thread/AKVB363GFCHHJ5MTHGVYHYT6NLLTF5VM/ -- You are receiving this mail because: You are the assignee for the bug. From slitt at troubleshooters.com Fri Jan 20 18:01:09 2017 From: slitt at troubleshooters.com (Steve Litt) Date: Fri, 20 Jan 2017 12:01:09 -0500 Subject: [Users] How to direct mail to separate boxes from single address. In-Reply-To: <20170119135934.35b34b3a@acer3.locall.com> References: <20170119135934.35b34b3a@acer3.locall.com> Message-ID: <20170120120109.0f845920@mydesk.domain.cxm> On Thu, 19 Jan 2017 13:59:34 -0500, John Culleton wrote: > I had this feature set up for many years. But now I have a new > computer and I forget how I did it. > > Here is the situation: One of my email addresses is > john at wexfordpress.com. At this addy I get mail from several mailing > lists. I want to redirect some of this email into separate boxes, like > direct all mail from this list to a box called "claws-mail". I know > how to create the mail boxes. I can select all mail in my general > inbox from a particular mailing list and move to another box > manually. I want to automate the process. I did this before with some > lines in my accounts structure but I forget how I did it, years ago. > > All replies welcome. Hi John, Claws-mail can do this all by itself, but to present a more diversified view let me tell you how I do it... I use Claws (and all other email clients I ever use) as a mere window into my local Dovecot IMAP server, located on my desktop machine. Every 3 minutes, my Fetchmail daemon retrieves and deletes mail from gmail and my Troubleshooters.Com webhost, sending all those emails to Procmail. My procmail recipes send the emails to different folders in Dovecot's Maildir storage mechanism, so when I look at my Dovecot IMAP with Claws (or Thunderbird or Alpine), I see a bunch of new email in various folders. Here's the procmail recipe for Claws-Mail: :0: * ^(To|Cc).*users at lists.claws-mail.org .claws/ The forward slash on the end of ".claws" tells Procmail it should insert into a Maildir system instead of an mbox system. Note the (To|Cc) instead of the mailing list ID. The mailing list ID was a good idea, but fails miserably because of all these people who think it's a great idea to copy me when posting to the list (as if I'm not on the list, given that I just posted there), or more bizarrely reply directly to me and cc the list. (To|Cc) tends to work much better under such conditions, and works fine even for the majority of people who simply reply to the list. There are two advantages of the way I do it: 1) Dovecot is a much faster and more reliable store of emails than any email client's folders. 2) My Dovecot repository means I can read my email with any IMAP competent email client: For troubleshooting, for special capabilities, or if my usual email client stops working for some reason. Also, if Claws-Mail were to ever self-destruct the way Kmail did six years ago, switching clients would be dead-bang easy, whereas with Kmail it took me over a week. SteveT From noreply at thewildbeast.co.uk Sat Jan 21 04:48:46 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 03:48:46 +0000 Subject: [Users] [Bug 3736] RFE: warn if clicking Quit and changes have been done In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3736 --- Comment #2 from Philip DeSpain --- Created attachment 1712 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1712&action=edit Flash -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 11:13:57 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 10:13:57 +0000 Subject: [Users] [Bug 3736] RFE: warn if clicking Quit and changes have been done In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3736 --- Comment #3 from Andrej Kacian --- The content of attachment 1712 has been deleted by Andrej Kacian who provided the following reason: Spam, unrelated to the bug. Possibly malware. The token used to delete this attachment was generated at 2017-01-21 11:13:03 CET. -- You are receiving this mail because: You are the assignee for the bug. From slitt at troubleshooters.com Sat Jan 21 08:13:31 2017 From: slitt at troubleshooters.com (Steve Litt) Date: Sat, 21 Jan 2017 02:13:31 -0500 Subject: [Users] How to convert an account back to IMAP? Message-ID: <20170121021331.4ccab31c@mydesk.domain.cxm> Hi all, Today, my the folder list of my Claws-Mail quit showing numbers of new and unread messages, although if I actually clicked the folder the new and unread messages were there. To test whether it was Claws or my Dovecot setup, I used Alpine: Alpine's folder list instantly recorded new email. In researching this, I discovered that my email account (called mydesk) had magically changed from an IMAP account to a local account, as shown by the screen produced when I do the following: Configuration->Edit_Accounts->mydesk->Edit->Basic The preceding screen shows server information to be "local mbox file" with local mailbox /var/local, instead of protocol IMAP with a server for receiving and a username and password. So I created a new account called "testt" that was an IMAP account, and testt acts normally and displays the number of new and unread messages in the folder list. I could just keep using testt for the rest of my life (or until testt magically changes), but I have an awful lot of custom configuration in the mydesk account that I'd need to remember to recreate in testt. So tell me: Does anyone know how to convert a "local mbox file" based account (back) to an IMAP based account? The IMAP and "local mbox file" are not fields to be filled in on the screen I mentioned, but just text on the screen. How does the account deduce its type: What data is it looking at? I looked in the manual but found nothing related to this. Thanks, SteveT From claws at thewildbeast.co.uk Sat Jan 21 11:35:47 2017 From: claws at thewildbeast.co.uk (Paul) Date: Sat, 21 Jan 2017 10:35:47 +0000 Subject: [Users] How to convert an account back to IMAP? In-Reply-To: <20170121021331.4ccab31c@mydesk.domain.cxm> References: <20170121021331.4ccab31c@mydesk.domain.cxm> Message-ID: <20170121103547.6213b628@kujata> On Sat, 21 Jan 2017 02:13:31 -0500 Steve Litt wrote: > In researching this, I discovered that my email account (called > mydesk) had magically changed from an IMAP account to a local > account, as shown by the screen produced when I do the following: It's because you used version 3.14.0 or newer, then downgraded to an older version, then upgraded again. To fix it you need to quit Claws, open ~/.claws-mail/accountrc, locate the protocol setting of your IMAP account(s) and change it to protocol=1 with regards Paul From noreply at thewildbeast.co.uk Sat Jan 21 14:19:11 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 13:19:11 +0000 Subject: [Users] [Bug 3764] New: Use external libical instead of the internal copy Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 Bug ID: 3764 Summary: Use external libical instead of the internal copy Classification: Unclassified Product: Claws Mail Version: GIT Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: Plugins/vCalendar Assignee: users at lists.claws-mail.org Reporter: flo.xfce at gmx-topmail.de The vcalendar plugin relies on libical, which is provided in-tree. However, this included version is outdated. I am not aware of any security related issues with libical at the moment, but using the upstream version of libical can prevent some security issues should they arise (users only have to update libical, not claws-mail). The attached patch removes the in-tree version of libical and fixes the build to use an external version of libical. This patch also bumps the minimum dependency of libical to version 2.0 and a few code lines were adjusted accordingly. The patch is only tested on Linux. I do not know if Windows or OS X build were broken. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 14:30:14 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 13:30:14 +0000 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 --- Comment #1 from flo.xfce at gmx-topmail.de --- So the patch is a bit too large to be attached here directly, so please see this paste: https://bpaste.net/raw/9a4c01fcd5ba -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 16:41:53 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 15:41:53 +0000 Subject: [Users] [Bug 3040] [PATCH] Handle revoked GPG private keys In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3040 --- Comment #3 from Tristan Miller --- Has this made it into the current release yet? When Claws Mail 3.14.1 prompts me for the recipient's encryption key, the dialog still lists revoked keys. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 18:20:18 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 17:20:18 +0000 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 --- Comment #2 from Paul --- Created attachment 1713 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1713&action=edit the patch the patch linked in comment 1, gzipped and attached -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 18:21:34 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 17:21:34 +0000 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1713|1 |0 is patch| | Attachment #1713|text/plain |application/gzip mime type| | -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 19:06:10 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 18:06:10 +0000 Subject: [Users] [Bug 3761] drafts msgs are sometimes not deleted after a mail has been sent In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3761 --- Comment #10 from johannes at selfnet.de --- I left one draft of a mail that I sent yesterday in the draft folder, but it didn't get deleted automatically as daniel said. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 21 20:22:38 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 21 Jan 2017 19:22:38 +0000 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 --- Comment #3 from Andrej Kacian --- Created attachment 1714 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1714&action=edit Original patch sans removal of the builtin libical For convenience. :) This (removal of our old, decrepit libical) is definitely something we want. Windows build can be tested, as for Mac version, that is out of our hands - its maintainer will have to take care of testing. -- You are receiving this mail because: You are the assignee for the bug. From slitt at troubleshooters.com Sat Jan 21 20:40:44 2017 From: slitt at troubleshooters.com (Steve Litt) Date: Sat, 21 Jan 2017 14:40:44 -0500 Subject: [Users] How to convert an account back to IMAP? In-Reply-To: <20170121103547.6213b628@kujata> References: <20170121021331.4ccab31c@mydesk.domain.cxm> <20170121103547.6213b628@kujata> Message-ID: <20170121144044.0bdf2206@mydesk.domain.cxm> On Sat, 21 Jan 2017 10:35:47 +0000, Paul wrote: > On Sat, 21 Jan 2017 02:13:31 -0500 > Steve Litt wrote: > > > In researching this, I discovered that my email account (called > > mydesk) had magically changed from an IMAP account to a local > > account, as shown by the screen produced when I do the following: > > It's because you used version 3.14.0 or newer, then downgraded to an > older version, then upgraded again. > > To fix it you need to quit Claws, open ~/.claws-mail/accountrc, > locate the protocol setting of your IMAP account(s) and change it to > > protocol=1 > > with regards > > Paul > _______________________________________________ > Users mailing list > Users at lists.claws-mail.org > http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users Hi Paul, Confirmed! I changed protocol=3 to protocol=1 on one of my accounts, after which mydesk was once again listed as an IMAP account. After doing "rebuild folder tree" on it, it behaved correctly, even detecting when I'd read new mail from my Alpine client. I didn't change and change back, my rolling release distro did, and this could happen to anyone using a rolling release, so I'd suggest if there's a Claws "landmines" document, this symptom and solution be included in it. By the way, for the past month Claws has gained all sorts of new behaviors: Most detrimental, a few handy. I always suspected it was a versioning issue: Now I suspect that even more. Thanks, SteveT From claws at thewildbeast.co.uk Sat Jan 21 21:08:53 2017 From: claws at thewildbeast.co.uk (Paul) Date: Sat, 21 Jan 2017 20:08:53 +0000 Subject: [Users] How to convert an account back to IMAP? In-Reply-To: <20170121144044.0bdf2206@mydesk.domain.cxm> References: <20170121021331.4ccab31c@mydesk.domain.cxm> <20170121103547.6213b628@kujata> <20170121144044.0bdf2206@mydesk.domain.cxm> Message-ID: <20170121200853.4969fb51@kujata> On Sat, 21 Jan 2017 14:40:44 -0500 Steve Litt wrote: > I didn't change and change back, my rolling release distro did, and > this could happen to anyone using a rolling release, so I'd suggest > if there's a Claws "landmines" document, this symptom and solution > be included in it. If that distro keeps rolling forwards, rather than forwards and backwards, there wouldn't be a problem. Anyway, this is something for the distro packagers to be aware of. with regards Paul From noreply at thewildbeast.co.uk Sun Jan 22 05:55:28 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sun, 22 Jan 2017 04:55:28 +0000 Subject: [Users] [Bug 3681] 'Install New' Theme Button Crash In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3681 --- Comment #3 from markvs at openmailbox.org --- It places the theme properly into Roaming\claws-mail\themes now and it all works fine. In the previous version, the way to do it by hand was to put it into Local\VirtualStore. Assuming this isn't about paths but permissions and what the user-started client is allowed to 'see'. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sun Jan 22 06:00:15 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sun, 22 Jan 2017 05:00:15 +0000 Subject: [Users] [Bug 3747] Crash when exiting In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3747 --- Comment #1 from markvs at openmailbox.org --- This happens intermittently and is not strictly related to exiting the program. It can happen rarely but at any time. -- You are receiving this mail because: You are the assignee for the bug. From manfred.lotz at arcor.de Mon Jan 23 16:45:43 2017 From: manfred.lotz at arcor.de (Manfred Lotz) Date: Mon, 23 Jan 2017 16:45:43 +0100 Subject: [Users] Shift-n problem Message-ID: <20170123164543.28b5747b@arcor.com> For quite some time Shift-n doesn't work as before. In the past Shift-n went to next unread mail and the same time marked it as read. The system is Fedora 25. With installation of claws-mail 3.14.1 on December 18 2016 Shift-n still goes to next unread mail but the mail won't get marked as read. Anything has changed? Any error on my side? -- Manfred From noreply at thewildbeast.co.uk Tue Jan 24 10:25:12 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 24 Jan 2017 09:25:12 +0000 Subject: [Users] [Bug 3765] New: UI frozen when exiting external editor Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3765 Bug ID: 3765 Summary: UI frozen when exiting external editor Classification: Unclassified Product: Claws Mail Version: 3.14.1 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P3 Component: UI Assignee: users at lists.claws-mail.org Reporter: ntd at entidi.it Created attachment 1715 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1715&action=edit Screenshot of frozen claws-mail Sometime the UI freezes when exiting the external editor (gvim in my case). The editor is spawned in foreground. Actually I'm using the default embedded gvim command but it was happening also with the non-embedded one (gvim -f %s), so I am pretty sure it is not GtkSocket related: [nicola at iota .claws-mail]$ grep ext_editor_command clawsrc ext_editor_command=gvim -f --socketid %w %s I had hard time trying to figure out how to replicate the problem and I still do not fully understand the problem... it seems something related to focus. Anyway I spawn the external text editor, switch desktop and select something in another program, return to the desktop where claws-mail resides and exit the text editor (:wq). After that I get what is shown in the first screenshot: the window is frozen and do not repaint itself anymore. My current ugly workaround is triggering a close window request via keyboard. After a couple of seconds I get what shown in the second screenshot: a confirmation dialog appears and the compose window is properly populated with what I written in the external editor. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 24 10:25:59 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 24 Jan 2017 09:25:59 +0000 Subject: [Users] [Bug 3765] UI frozen when exiting external editor In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3765 --- Comment #1 from Nicola Fontana --- Created attachment 1716 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1716&action=edit Triggering a close window solves the problem -- You are receiving this mail because: You are the assignee for the bug. From claws at thewildbeast.co.uk Tue Jan 24 11:35:21 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 24 Jan 2017 10:35:21 +0000 Subject: [Users] Shift-n problem In-Reply-To: <20170123164543.28b5747b@arcor.com> References: <20170123164543.28b5747b@arcor.com> Message-ID: <20170124103521.015afa72@kujata> On Mon, 23 Jan 2017 16:45:43 +0100 Manfred Lotz wrote: > For quite some time Shift-n doesn't work as before. In the past > Shift-n went to next unread mail and the same time marked it as > read. > > The system is Fedora 25. With installation of claws-mail 3.14.1 on > December 18 2016 Shift-n still goes to next unread mail but the > mail won't get marked as read. > > Anything has changed? Any error on my side? See /Help/About, 'Release notes' tab: * The /View/Go to/... actions now respect the 'Open message when selected' option. with regards Paul From sylpheed at 911networks.com Tue Jan 24 16:37:08 2017 From: sylpheed at 911networks.com (sylpheed at 911networks.com) Date: Tue, 24 Jan 2017 07:37:08 -0800 Subject: [Users] Messing around with the Sent folder Message-ID: <20170124073708.67ba28a6@frogguski.911networks.com> Hi, 3.14.1 on arch. I haven't yet messed with the Sent folder, but I would like to make subfolders within the sent folder. Right now I have 5400 emails in the sent. I'd like to group them by topic/person What are the consequences? Crash? A mess?... -- sknahT vyS From psychonaut at nothingisreal.com Tue Jan 24 17:50:02 2017 From: psychonaut at nothingisreal.com (Tristan Miller) Date: Tue, 24 Jan 2017 17:50:02 +0100 Subject: [Users] Messing around with the Sent folder In-Reply-To: <20170124073708.67ba28a6@frogguski.911networks.com> References: <20170124073708.67ba28a6@frogguski.911networks.com> Message-ID: <20170124175002.711f97df.psychonaut@nothingisreal.com> Greetings. On Tue, 24 Jan 2017 07:37:08 -0800, sylpheed at 911networks.com wrote: > I haven't yet messed with the Sent folder, but I would like to > make subfolders within the sent folder. Right now I have 5400 emails > in the sent. I'd like to group them by topic/person > > What are the consequences? Crash? A mess?... I just tried doing this myself (as a consequence of the issue I raised at ). So far no crashes or unexpected behaviour, apart from mild annoyance that I apparently need to keep archives of my sent folders separate from the archives of my non-sent folders. (Or is there, in fact, another way to set the From/To column on a per-folder basis?) Regards, Tristan -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tristan Miller Free Software developer, ferret herder, logologist https://logological.org/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From noreply at thewildbeast.co.uk Tue Jan 24 17:59:11 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 24 Jan 2017 16:59:11 +0000 Subject: [Users] [Bug 3760] Can't change folder type more than once In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 --- Comment #4 from Paul --- (In reply to comment #3) > I see. So when archiving my sent messages to another folder, is there no > way to make that folder display the "To" column instead of the "From" > column, other than by making it a child of my outbox? /View/Set displayed columns/In message list... Also see the information about the 'enable_swap_from' preference in Hidden Preference page of the manual: http://www.claws-mail.org/manual/claws-mail-manual.html#adv_hidden -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Tue Jan 24 18:10:00 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Tue, 24 Jan 2017 17:10:00 +0000 Subject: [Users] [Bug 3760] Can't change folder type more than once In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3760 --- Comment #5 from Tristan Miller --- (In reply to comment #4) > (In reply to comment #3) > > I see. So when archiving my sent messages to another folder, is there no > > way to make that folder display the "To" column instead of the "From" > > column, other than by making it a child of my outbox? > > /View/Set displayed columns/In message list... This seems to be a global setting, not per-folder. -- You are receiving this mail because: You are the assignee for the bug. From manfred.lotz at arcor.de Tue Jan 24 19:37:56 2017 From: manfred.lotz at arcor.de (Manfred Lotz) Date: Tue, 24 Jan 2017 19:37:56 +0100 Subject: [Users] Shift-n problem References: <20170123164543.28b5747b@arcor.com> <20170124103521.015afa72@kujata> Message-ID: <20170124193756.438f7db6@arcor.com> On Tue, 24 Jan 2017 10:35:21 +0000 Paul wrote: > On Mon, 23 Jan 2017 16:45:43 +0100 > Manfred Lotz wrote: > > > For quite some time Shift-n doesn't work as before. In the past > > Shift-n went to next unread mail and the same time marked it as > > read. > > > > The system is Fedora 25. With installation of claws-mail 3.14.1 on > > December 18 2016 Shift-n still goes to next unread mail but the > > mail won't get marked as read. > > > > Anything has changed? Any error on my side? > > See /Help/About, 'Release notes' tab: > > * The /View/Go to/... actions now respect the 'Open message when > selected' option. > > with regards > > Paul Thanks a lot. That was it. Now things are working nicely as before. -- Manfred From obsazeny.cz at volny.cz Wed Jan 25 00:16:21 2017 From: obsazeny.cz at volny.cz (Daniel Hrbac) Date: Wed, 25 Jan 2017 00:16:21 +0100 Subject: [Users] How to modify open attachment prefix Message-ID: <20170125001621.4aeda2db@dan-pavilion> Hello, with latest claws-mail on lubuntu the received attachments are opened and prefix is added to the filename. thus when i receive file "hello.odt" and open it in libreoffice it is opened in temporary folder with name like 00000000a.hello.odt Is there a way how to turn this feature off? Or option to modify the logic of the added prefix? Thank you, Daniel From linux at karmasailing.uk Wed Jan 25 12:55:59 2017 From: linux at karmasailing.uk (Bob Williams) Date: Wed, 25 Jan 2017 11:55:59 +0000 Subject: [Users] Order of processing rules Message-ID: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> Hi, I assume processing rules are executed in the order they appear in the list. For example, I have these two rules applied to a folder age_greater 150 & marked move age_greater 180 delete What I want to happen is flagged messages older than 150 days are moved to the destination folder, then messages older than 180 days are deleted. Also, will the second rule run, irrespective of the result of the first rule? Bob -- Bob Williams System: Linux 4.4.36-8-default Distro: openSUSE 42.2 (x86_64) Desktop: KDE Frameworks: 5.26.0, Qt: 5.6.1 and Plasma: 5.8.2 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From claws at thewildbeast.co.uk Wed Jan 25 13:07:40 2017 From: claws at thewildbeast.co.uk (Paul) Date: Wed, 25 Jan 2017 12:07:40 +0000 Subject: [Users] Order of processing rules In-Reply-To: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> References: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> Message-ID: <20170125120740.79c60d52@kujata> On Wed, 25 Jan 2017 11:55:59 +0000 Bob Williams wrote: > I assume processing rules are executed in the order they appear in > the list. For example, I have these two rules applied to a folder > > age_greater 150 & marked move > age_greater 180 delete > > What I want to happen is flagged messages older than 150 days are > moved to the destination folder, then messages older than 180 days > are deleted. > > Also, will the second rule run, irrespective of the result of the > first rule? The second rule will run, but all messages moved by the first are no longer around (they've been moved) to be matched by the second. with regards Paul From claws at thewildbeast.co.uk Wed Jan 25 13:08:51 2017 From: claws at thewildbeast.co.uk (Paul) Date: Wed, 25 Jan 2017 12:08:51 +0000 Subject: [Users] How to modify open attachment prefix In-Reply-To: <20170125001621.4aeda2db@dan-pavilion> References: <20170125001621.4aeda2db@dan-pavilion> Message-ID: <20170125120851.29ea5d99@kujata> On Wed, 25 Jan 2017 00:16:21 +0100 Daniel Hrbac wrote: > Is there a way how to turn this feature off? Or option to modify the > logic of the added prefix? No and No. What's the perceived problem with it? with regards Paul From ricardo at mones.org Wed Jan 25 13:10:40 2017 From: ricardo at mones.org (Ricardo Mones) Date: Wed, 25 Jan 2017 13:10:40 +0100 Subject: [Users] Order of processing rules In-Reply-To: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> References: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> Message-ID: <20170125121040.GB27192@busgosu.mones.org> On Wed, Jan 25, 2017 at 11:55:59AM +0000, Bob Williams wrote: > Hi, > > I assume processing rules are executed in the order they appear in the > list. For example, I have these two rules applied to a folder > > age_greater 150 & marked move > age_greater 180 delete > > What I want to happen is flagged messages older than 150 days are moved > to the destination folder, then messages older than 180 days are > deleted. > > Also, will the second rule run, irrespective of the result of the first > rule? From manual §3.4 "Filtering": | Don't forget that the order of the rules is important: if Claws Mail | finds a rule suitable for an email that either moves or deletes the | email, it will stop looking for further rules for that email. regards, -- Ricardo Mones ~ Don't take the name of root in vain. /usr/src/linux/README -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From linux at karmasailing.uk Wed Jan 25 13:13:17 2017 From: linux at karmasailing.uk (Bob Williams) Date: Wed, 25 Jan 2017 12:13:17 +0000 Subject: [Users] Order of processing rules In-Reply-To: <20170125120740.79c60d52@kujata> References: <20170125115559.5b97f621@blackbox.home.karmasailing.uk> <20170125120740.79c60d52@kujata> Message-ID: <20170125121317.2514d458@blackbox.home.karmasailing.uk> On Wed, 25 Jan 2017 12:07:40 +0000 Paul wrote: > On Wed, 25 Jan 2017 11:55:59 +0000 > Bob Williams wrote: > > > I assume processing rules are executed in the order they appear in > > the list. For example, I have these two rules applied to a folder > > > > age_greater 150 & marked move > > age_greater 180 delete > > > > What I want to happen is flagged messages older than 150 days are > > moved to the destination folder, then messages older than 180 days > > are deleted. > > > > Also, will the second rule run, irrespective of the result of the > > first rule? > > The second rule will run, but all messages moved by the first are no > longer around (they've been moved) to be matched by the second. > > with regards > > Paul Thanks, that's what I want. Regards Bob -- Bob Williams System: Linux 4.4.36-8-default Distro: openSUSE 42.2 (x86_64) Desktop: KDE Frameworks: 5.26.0, Qt: 5.6.1 and Plasma: 5.8.2 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From epodata at gmail.com Wed Jan 25 13:16:49 2017 From: epodata at gmail.com (Erik P. Olsen) Date: Wed, 25 Jan 2017 13:16:49 +0100 Subject: [Users] Question about filter conditionss. Message-ID: <20170125131649.6579fc65@Erik-PC.epolan.dk> Can filter conditions be combined like A and (B or C) or perhaps A or (B and C)? If so then how? -- Erik From obsazeny.cz at volny.cz Wed Jan 25 22:32:41 2017 From: obsazeny.cz at volny.cz (Daniel Hrbac) Date: Wed, 25 Jan 2017 22:32:41 +0100 Subject: [Users] How to modify open attachment prefix In-Reply-To: <20170125120851.29ea5d99@kujata> References: <20170125001621.4aeda2db@dan-pavilion> <20170125120851.29ea5d99@kujata> Message-ID: <20170125223241.5fc2d928@dan-pavilion> V Wed, 25 Jan 2017 12:08:51 +0000 Paul napsáno: > On Wed, 25 Jan 2017 00:16:21 +0100 > Daniel Hrbac wrote: > > > Is there a way how to turn this feature off? Or option to modify the > > logic of the added prefix? > > No and No. > > What's the perceived problem with it? > I would not call it a problem. It is inconvenient, because it is added at the beginning, so when couple of attachments are opened, the file names are not visible from the task bar but application with file must be brought from background to find out what is opened and what is not. It also reduces workflow when any opened document's file name must be edited before saving. So it is more annoying than a problem. Daniel From andrzej.filip at gmail.com Thu Jan 26 19:07:26 2017 From: andrzej.filip at gmail.com (Andrzej A. Filip) Date: Thu, 26 Jan 2017 19:07:26 +0100 Subject: [Users] Linux+NetworkManager: clean network disconnect Message-ID: How make running claws-mail terminate IMAP connections before NetworkManager terminates dialup network connection? -- A. Filip From noreply at thewildbeast.co.uk Thu Jan 26 23:59:49 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 26 Jan 2017 22:59:49 +0000 Subject: [Users] [Bug 3766] New: Windows: crash on NULL dereference if email has invalid date Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3766 Bug ID: 3766 Summary: Windows: crash on NULL dereference if email has invalid date Classification: Unclassified Product: Claws Mail (Windows) Version: GIT Hardware: PC OS: Windows 10 Status: NEW Severity: major Priority: P3 Component: default Assignee: users at lists.claws-mail.org Reporter: cb at gigawatt.nl I usually use Thunderbird but decided to give Claws a try today. Not a happy experience: I found that it consistently crashed, both the 32-bit and 64-bit Windows builds of 3.14.1. Looking into this with gdb, I found that g_date_time_to_unix was being called with a null pointer. This is coming from procheader_date_parse in src/procheader.c: tz = g_time_zone_new(zone); dt = g_date_time_new(tz, year, dmonth, day, hh, mm, ss); timer = g_date_time_to_unix(dt); This assumes g_date_time_new succeeds, but it is documented on https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-date-time-new as returning a null pointer if the input values are out of range. In my case, I appear to have an old spam e-mail with a "Date: Wed, 23 Apr 2014 09:95:98 GMT" header. Note the bogus minutes and seconds components there. This should be handled sanely. The non-Win32 code path uses mktime, where out-of-range values are valid and 95 minutes simply wraps to 35 minutes on the next hour, and 98 seconds simply wraps to 38 seconds on the next minute. The Win32 code path here can be enabled on other OSes to reproduce the crash, and I've done this on Ubuntu using the latest sources from Git. I see that the Win32 code used to use mktime as well, but this was intentionally changed in http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=b84884479e197092efb1792331dd1c2170ec912b. Should the code manually wrap out-of-range values the way mktime did? -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 27 00:32:14 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Thu, 26 Jan 2017 23:32:14 +0000 Subject: [Users] [Bug 3766] Windows: crash on NULL dereference if email has invalid date In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3766 --- Comment #1 from Andrej Kacian --- Nice catch. However, instead of going back to mktime(), on Windows I'd prefer to normalize the date/time values using g_date_time_add_*() family of functions. -- You are receiving this mail because: You are the assignee for the bug. From rikona at sonic.net Fri Jan 27 06:26:24 2017 From: rikona at sonic.net (rikona) Date: Thu, 26 Jan 2017 21:26:24 -0800 Subject: [Users] archives as multiple files Message-ID: <2210503357.20170126212624@sonic.net> I'd like to archive my emails in the form of single files as they are stored by Claws mail. It seems to offer mbox saves, as a single file of multiple emails, but not as a group of single files. Is there a way to archive some, but not all, emails in an account as single files? If it's not a program option, would it be possible to simply move a number of the stored files to a different non-Claws directory without fouling up the way Claws tracks each email message? -- Best regards, rikona From claws at thewildbeast.co.uk Fri Jan 27 10:00:40 2017 From: claws at thewildbeast.co.uk (Paul) Date: Fri, 27 Jan 2017 09:00:40 +0000 Subject: [Users] archives as multiple files In-Reply-To: <2210503357.20170126212624@sonic.net> References: <2210503357.20170126212624@sonic.net> Message-ID: <20170127090040.10484d33@kujata> On Thu, 26 Jan 2017 21:26:24 -0800 rikona wrote: > I'd like to archive my emails in the form of single files as they > are stored by Claws mail. It seems to offer mbox saves, as a single > file of multiple emails, but not as a group of single files. Is > there a way to archive some, but not all, emails in an account as > single files? > > If it's not a program option, would it be possible to simply move a > number of the stored files to a different non-Claws directory > without fouling up the way Claws tracks each email message? Have a look at the Mail Archiver plugin. with regards Paul From noreply at thewildbeast.co.uk Fri Jan 27 16:59:40 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 27 Jan 2017 15:59:40 +0000 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 Paul changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from users at lists.claws-mail.org --- Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2017-01-27 16:57:03.545437245 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d76642c6c7cb6dfb8c1d94308d725bcb6a9d18ae Merge: ff4298a 8925ab2 Author: Colin Leroy Date: Fri Jan 27 16:57:02 2017 +0100 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=8925ab226ba8bb18928d61393d45e7d97f32777b Author: Paul Date: Fri Jan 27 15:56:47 2017 +0000 vCalendar plugin: use external libical closes bug #3764 patch by flo.xfce at gmx-topmail.de --- Comment #5 from Paul --- Thanks! -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 27 19:36:27 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 27 Jan 2017 18:36:27 +0000 Subject: [Users] [Bug 3766] Windows: crash on NULL dereference if email has invalid date In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3766 --- Comment #2 from Harald van Dijk --- Created attachment 1717 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1717&action=edit Handle invalid dates Sure. I also encountered another issue during testing: I have a few e-mails where the year in the header is simply given as 11. This should be changed to 2011 on all platforms. I don't see any reason why the if (year < 1000) block was moved, it doesn't make sense to exclude Windows here, so I moved it back to where it originally was. Does the attached patch look good? Tested only on Ubuntu, with the #ifdef changed to forcibly enable this code path; I haven't set up my Windows machine to be able to compile anything. And I think g_date_time_add_full cannot return NULL for anything that fits in an e-mail header, but I didn't want to take chances. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Fri Jan 27 21:09:21 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Fri, 27 Jan 2017 20:09:21 +0000 Subject: [Users] [Bug 3766] Windows: crash on NULL dereference if email has invalid date In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3766 Harald van Dijk changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1717|0 |1 is obsolete| | --- Comment #3 from Harald van Dijk --- Created attachment 1718 --> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1718&action=edit Handle invalid dates I see that my first attempt was wrong as it potentially leaked tz, and I see that it could be simplified because g_date_time_unref checks for null pointers and just returns another null pointer, avoiding problems. g_date_time_add_full does the same. So here is a second attempt at a patch, making use of that. -- You are receiving this mail because: You are the assignee for the bug. From johnxj at gmx.com Sat Jan 28 02:37:28 2017 From: johnxj at gmx.com (John Jason Jordan) Date: Fri, 27 Jan 2017 17:37:28 -0800 Subject: [Users] Default account Message-ID: <20170127173728.366ffca7@Devil-Bonobo> Claws Mail 3.11.1 on Xubuntu 14.04, up to date. I have four e-mail accounts, but one of them is unchecked in the "get all includes this account." At one time this account was the default, but soon this account will be going away, and I have made a different account the default. Nevertheless, when I go to compose a message the compose window always selects this account. I have to change the account manually, which I usually forget to do. Outside of deleting this account (which I am not yet ready to do), how can I get the compose window to select a different account as its default? From silver.bullet at zoho.com Sat Jan 28 05:34:04 2017 From: silver.bullet at zoho.com (Ralf Mardorf) Date: Sat, 28 Jan 2017 05:34:04 +0100 Subject: [Users] Default account In-Reply-To: <20170127173728.366ffca7@Devil-Bonobo> References: <20170127173728.366ffca7@Devil-Bonobo> Message-ID: <20170128053404.08868e46@utnubu> On Fri, 27 Jan 2017 17:37:28 -0800, John Jason Jordan wrote: >I have made a different account the default. Nevertheless, when I go >to compose a message the compose window always selects this account. Hi, you used the "Set as default account" button and the account then became the account written in a bold font? Assuming the wanted account is the one in the bold font in Configuration > Edit accounts... but it isn't the account that is used, then most likely you need to uncheck folder preferences Right click on a folder > Properties > Compose > [ ] Default account [ ] Apply to subfolders Unfortunately 3.11.1 is very old, so I don't know what options are provided by the version you are using. I e.g. couldn't find "get all includes this account." The Account settings provide an option "'Get Mail' checks for new messages on this account" for 3.14.1. However, I suspect this is irrelevant in regards to the issue. Regards, Ralf From johnxj at gmx.com Sat Jan 28 07:24:36 2017 From: johnxj at gmx.com (John Jason Jordan) Date: Fri, 27 Jan 2017 22:24:36 -0800 Subject: [Users] Default account In-Reply-To: <20170128053404.08868e46@utnubu> References: <20170127173728.366ffca7@Devil-Bonobo> <20170128053404.08868e46@utnubu> Message-ID: <20170127222436.58ed3580@Devil-Bonobo> On Sat, 28 Jan 2017 05:34:04 +0100 Ralf Mardorf dijo: >On Fri, 27 Jan 2017 17:37:28 -0800, John Jason Jordan wrote: >>I have made a different account the default. Nevertheless, when I go >>to compose a message the compose window always selects this account. >you used the "Set as default account" button and the account then >became the account written in a bold font? Yes. >Assuming the wanted account is the one in the bold font in > > Configuration > Edit accounts... It is. >but it isn't the account that is used, then most likely you need to >uncheck folder preferences > > Right click on a folder > Properties > Compose > > [ ] Default account > [ ] Apply to subfolders You lost me here. Which folder? From edodd55 at gmail.com Sat Jan 28 07:31:27 2017 From: edodd55 at gmail.com (Liz) Date: Sat, 28 Jan 2017 17:31:27 +1100 Subject: [Users] Default account In-Reply-To: <20170127222436.58ed3580@Devil-Bonobo> References: <20170127173728.366ffca7@Devil-Bonobo> <20170128053404.08868e46@utnubu> <20170127222436.58ed3580@Devil-Bonobo> Message-ID: <20170128173127.5736215d.edodd55@gmail.com> On Fri, 27 Jan 2017 22:24:36 -0800 John Jason Jordan wrote: > >but it isn't the account that is used, then most likely you need to > >uncheck folder preferences > > > > Right click on a folder > Properties > Compose > > > [ ] Default account > > [ ] Apply to subfolders > > You lost me here. Which folder? any folder. For this purpose, the folders containing the /new/ mail from the /new/ accounts. Liz From rikona at sonic.net Sat Jan 28 07:50:55 2017 From: rikona at sonic.net (rikona) Date: Fri, 27 Jan 2017 22:50:55 -0800 Subject: [Users] archives as multiple files In-Reply-To: <20170127090040.10484d33@kujata> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> Message-ID: <1429319832.20170127225055@sonic.net> Friday, January 27, 2017, 1:00:40 AM, Paul wrote: > On Thu, 26 Jan 2017 21:26:24 -0800 > rikona wrote: >> I'd like to archive my emails in the form of single files as they >> are stored by Claws mail. It seems to offer mbox saves, as a single >> file of multiple emails, but not as a group of single files. Is >> there a way to archive some, but not all, emails in an account as >> single files? >> >> If it's not a program option, would it be possible to simply move a >> number of the stored files to a different non-Claws directory >> without fouling up the way Claws tracks each email message? > Have a look at the Mail Archiver plugin. Where would I find that for Ubuntu 16.04 / Claws 3.12.2. Not in my plugins list, not in 'software', Claws web site says it is already installed.? -- rikona From claws at thewildbeast.co.uk Sat Jan 28 10:16:09 2017 From: claws at thewildbeast.co.uk (Paul) Date: Sat, 28 Jan 2017 09:16:09 +0000 Subject: [Users] archives as multiple files In-Reply-To: <1429319832.20170127225055@sonic.net> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> Message-ID: <20170128091609.30c20ab7@kujata> On Fri, 27 Jan 2017 22:50:55 -0800 rikona wrote: > Where would I find that for Ubuntu 16.04 / Claws 3.12.2. Not in my > plugins list, not in 'software', Claws web site says it is already > installed.? In Ubuntu that package is called 'claws-mail-archiver-plugin'. http://packages.ubuntu.com/xenial/claws-mail-archiver-plugin with regards Paul From noreply at thewildbeast.co.uk Sat Jan 28 12:20:35 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 28 Jan 2017 11:20:35 +0000 Subject: [Users] [Bug 3726] Crash on Vista opening INBOX In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3726 --- Comment #4 from microwiz at gmail.com --- Oh good, I think I may be having a similar issue. I am trying to load the (very large) subfolders under my INBOX folder using IMAP, and at approximately the same point (~26000 headers downloaded out of 36000-40000) Claws Mail for Windows exits abruptly. It is successful for smaller folders (e.g. INBOX with 1400 headers). This is with both the 32-bit and 64-bit versions of Claws Mail 3.14.1-1. I also tried version 3.14.0-1 and it does not crash this way. Stephen, trying this previous version may work for you too! Please let me know if there's anything else you'd like me to try. -- You are receiving this mail because: You are the assignee for the bug. From noreply at thewildbeast.co.uk Sat Jan 28 12:22:28 2017 From: noreply at thewildbeast.co.uk (noreply at thewildbeast.co.uk) Date: Sat, 28 Jan 2017 11:22:28 +0000 Subject: [Users] [Bug 3726] Crash on Vista opening INBOX In-Reply-To: References: Message-ID: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3726 --- Comment #5 from microwiz at gmail.com --- Forgot to mention, I'm on Win10 Anniversary Edition, and I first tried the 64-bit version of 3.14.1-1 (which crashed), then uninstalled it and installed the 32-bit version of 3.14.1-1 (which crashed in exactly the same way), then uninstalled it and installed the version that Andrej suggested below, which seems to be working. Thanks! -- You are receiving this mail because: You are the assignee for the bug. From johnxj at gmx.com Sat Jan 28 17:52:21 2017 From: johnxj at gmx.com (John Jason Jordan) Date: Sat, 28 Jan 2017 08:52:21 -0800 Subject: [Users] Default account In-Reply-To: <20170128173127.5736215d.edodd55@gmail.com> References: <20170127173728.366ffca7@Devil-Bonobo> <20170128053404.08868e46@utnubu> <20170127222436.58ed3580@Devil-Bonobo> <20170128173127.5736215d.edodd55@gmail.com> Message-ID: <20170128085221.50d99a57@Devil-Bonobo> On Sat, 28 Jan 2017 17:31:27 +1100 Liz dijo: >On Fri, 27 Jan 2017 22:24:36 -0800 >John Jason Jordan wrote: > >> >but it isn't the account that is used, then most likely you need to >> >uncheck folder preferences >> > >> > Right click on a folder > Properties > Compose > >> > [ ] Default account >> > [ ] Apply to subfolders >> >> You lost me here. Which folder? > >any folder. >For this purpose, the folders containing the /new/ mail from the /new/ >accounts. Ah! I checked the box for 'default' account in the Inbox, and now it's working as it should. Thanks! From andrej at kacian.sk Sat Jan 28 19:07:58 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Sat, 28 Jan 2017 19:07:58 +0100 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: References: Message-ID: <20170128190758.2f86d5e0@penny> On Sat, 21 Jan 2017 19:22:38 +0000 noreply at thewildbeast.co.uk wrote: > http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 > > --- Comment #3 from Andrej Kacian --- > Created attachment 1714 > --> > http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1714&action=edit > Original patch sans removal of the builtin libical > > For convenience. :) > > This (removal of our old, decrepit libical) is definitely something we want. > Windows build can be tested, as for Mac version, that is out of our hands - its > maintainer will have to take care of testing. Just FYI, if anyone wants to test this on Windows, a build is available at: http://www.claws-mail.org/win32/test/claws-mail-3.14.1git166-99-32bit-external-libical.exe It is latest development version with vcalendar plugin using latest libical library (version 2.0.0). It seems to work correctly with the limited array of test calendar events I have, but it would be nice if someone else could try and break it. :) Regards, -- Andrej From jerry at seibercom.net Sat Jan 28 20:06:12 2017 From: jerry at seibercom.net (Jerry) Date: Sat, 28 Jan 2017 14:06:12 -0500 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: <20170128190758.2f86d5e0@penny> References: <20170128190758.2f86d5e0@penny> Message-ID: <20170128140612.00005af6@seibercom.net> On Sat, 28 Jan 2017 19:07:58 +0100, Andrej Kacian stated: >On Sat, 21 Jan 2017 19:22:38 +0000 >noreply at thewildbeast.co.uk wrote: > >> http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3764 >> >> --- Comment #3 from Andrej Kacian --- >> Created attachment 1714 >> --> >> http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1714&action=edit >> Original patch sans removal of the builtin libical >> >> For convenience. :) >> >> This (removal of our old, decrepit libical) is definitely something >> we want. Windows build can be tested, as for Mac version, that is >> out of our hands - its maintainer will have to take care of >> testing. > >Just FYI, if anyone wants to test this on Windows, a build is >available at: > >http://www.claws-mail.org/win32/test/claws-mail-3.14.1git166-99-32bit-external-libical.exe > >It is latest development version with vcalendar plugin using latest >libical library (version 2.0.0). > >It seems to work correctly with the limited array of test calendar >events I have, but it would be nice if someone else could try and break >it. :) > >Regards, I assume that this is the 32 bit version. Is a 64 bit version available? -- Jerry From andrej at kacian.sk Sat Jan 28 20:22:22 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Sat, 28 Jan 2017 20:22:22 +0100 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: <20170128140612.00005af6@seibercom.net> References: <20170128190758.2f86d5e0@penny> <20170128140612.00005af6@seibercom.net> Message-ID: <20170128202222.6ec472b3@penny> On Sat, 28 Jan 2017 14:06:12 -0500 Jerry wrote: > >Just FYI, if anyone wants to test this on Windows, a build is > >available at: > > > >http://www.claws-mail.org/win32/test/claws-mail-3.14.1git166-99-32bit-external-libical.exe > > > >It is latest development version with vcalendar plugin using latest > >libical library (version 2.0.0). > > > >It seems to work correctly with the limited array of test calendar > >events I have, but it would be nice if someone else could try and break > >it. :) > > > >Regards, > > > I assume that this is the 32 bit version. Is a 64 bit version available? Not yet, it is being built still. Regards, -- Andrej From andrej at kacian.sk Sat Jan 28 21:04:09 2017 From: andrej at kacian.sk (Andrej Kacian) Date: Sat, 28 Jan 2017 21:04:09 +0100 Subject: [Users] [Bug 3764] Use external libical instead of the internal copy In-Reply-To: <20170128140612.00005af6@seibercom.net> References: <20170128190758.2f86d5e0@penny> <20170128140612.00005af6@seibercom.net> Message-ID: <20170128210409.494a4b6f@penny> On Sat, 28 Jan 2017 14:06:12 -0500 Jerry wrote: > I assume that this is the 32 bit version. Is a 64 bit version available? Now it is, at: http://www.claws-mail.org/win32/test/claws-mail-3.14.1git166-99-64bit-external-libical.exe Regards, -- Andrej From rikona at sonic.net Sun Jan 29 05:39:52 2017 From: rikona at sonic.net (rikona) Date: Sat, 28 Jan 2017 20:39:52 -0800 Subject: [Users] archives as multiple files In-Reply-To: <20170128091609.30c20ab7@kujata> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> Message-ID: <1144666752.20170128203952@sonic.net> Saturday, January 28, 2017, 1:16:09 AM, Paul wrote: > On Fri, 27 Jan 2017 22:50:55 -0800 > rikona wrote: >> Where would I find that for Ubuntu 16.04 / Claws 3.12.2. Not in my >> plugins list, not in 'software', Claws web site says it is already >> installed.? > In Ubuntu that package is called 'claws-mail-archiver-plugin'. > http://packages.ubuntu.com/xenial/claws-mail-archiver-plugin Thanks for the pointer. Installed it, but the kind of archive I want does not seem to be one of the options. What I want is a directory containing many single files just as they are stored by Claws mail - not reformatted in any 'archive' format, and not compressed. Also, only some of the files are selected to be archived, and that selection is NOT necessarily by date or even contiguous, which is the plugin option. It seems as though the plugin will not do what I want. So, back to my preferred option - is there a way to simply move a number of the stored files to a different non-Claws directory without fouling up the way Claws tracks each email message? An alternate possibility is to create an 'archive' folder in Claws, move the emails there, in Claws, then copy the emails out of that file [with Claws not running?], then delete the files in the archive folder. Sounds OK, but lots more work than just a simple move, which I'd prefer. Other ideas giving me many single files much appreciated... Thanks -- rikona From myetto1 at nycap.rr.com Sun Jan 29 18:03:14 2017 From: myetto1 at nycap.rr.com (Michael A. Yetto) Date: Sun, 29 Jan 2017 12:03:14 -0500 Subject: [Users] archives as multiple files In-Reply-To: <1144666752.20170128203952@sonic.net> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> <1144666752.20170128203952@sonic.net> Message-ID: <20170129120314.0c3b2439@braetac.lighthouse.yetnet> On Sat, 28 Jan 2017 20:39:52 -0800 rikona wrote: >So, back to my preferred option - is there a way to simply move a >number of the stored files to a different non-Claws directory without >fouling up the way Claws tracks each email message? > >An alternate possibility is to create an 'archive' folder in Claws, >move the emails there, in Claws, then copy the emails out of that file >[with Claws not running?], then delete the files in the archive >folder. Sounds OK, but lots more work than just a simple move, which >I'd prefer. It seems that this is what you want as no plugin can decide which individual file needs to be archived. This can be automated to whatever you are able. Just as you stated you will move the individual mails to a designated folder, use the file system to copy those to your archive area, empty the folder in Claws. I think this should run just fine with Claws running. The initial move to the archive staging folder can be accomplished by setting a specific tag to the message and using a post-processing rule to move anything with that tag. In all probability there are other ways to accomplish this. The move from the staging folder to the archive folder can be automated as well. And please let us know what solution you adopt. Mike Yetto -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From rikona at sonic.net Sun Jan 29 22:22:27 2017 From: rikona at sonic.net (rikona) Date: Sun, 29 Jan 2017 13:22:27 -0800 Subject: [Users] archives as multiple files In-Reply-To: <20170129120314.0c3b2439@braetac.lighthouse.yetnet> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> <1144666752.20170128203952@sonic.net> <20170129120314.0c3b2439@braetac.lighthouse.yetnet> Message-ID: <5110427061.20170129132227@sonic.net> Sunday, January 29, 2017, 9:03:14 AM, Michael wrote: > On Sat, 28 Jan 2017 20:39:52 -0800 > rikona wrote: >>So, back to my preferred option - is there a way to simply move a >>number of the stored files to a different non-Claws directory without >>fouling up the way Claws tracks each email message? >> >>An alternate possibility is to create an 'archive' folder in Claws, >>move the emails there, in Claws, then copy the emails out of that >>file [with Claws not running?], then delete the files in the archive >>folder. Sounds OK, but lots more work than just a simple move, which >>I'd prefer. > It seems that this is what you want as no plugin can decide which > individual file needs to be archived. I was not expecting the plugin to select files, but instead to give me the option to select the files and then archive the files I selected. The current plugin does not let me do that. If it did AND offered to NOT reformat the files, it could do what I want. > This can be automated to whatever you are able. Just as you stated > you will move the individual mails to a designated folder, use the > file system to copy those to your archive area, empty the folder in > Claws. > I think this should run just fine with Claws running. The initial > move to the archive staging folder can be accomplished by setting a > specific tag to the message and using a post-processing rule to move > anything with that tag. If I halt Claws, move the files to a different non-Claws directory, then restart Claws, will Claws recognize that all the files are not there and reindex the files it finds or will that foul up the way Claws tracks each email message? If it can, this is MUCH easier. Thanks for your reply. -- rikona From myetto1 at nycap.rr.com Sun Jan 29 23:47:48 2017 From: myetto1 at nycap.rr.com (Michael A. Yetto) Date: Sun, 29 Jan 2017 17:47:48 -0500 Subject: [Users] archives as multiple files In-Reply-To: <5110427061.20170129132227@sonic.net> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> <1144666752.20170128203952@sonic.net> <20170129120314.0c3b2439@braetac.lighthouse.yetnet> <5110427061.20170129132227@sonic.net> Message-ID: <20170129174748.41e09dd3@braetac.lighthouse.yetnet> On Sun, 29 Jan 2017 13:22:27 -0800 rikona wrote: >Sunday, January 29, 2017, 9:03:14 AM, Michael wrote: > >> On Sat, 28 Jan 2017 20:39:52 -0800 >> rikona wrote: > >>>So, back to my preferred option - is there a way to simply move a >>>number of the stored files to a different non-Claws directory without >>>fouling up the way Claws tracks each email message? >>> >>>An alternate possibility is to create an 'archive' folder in Claws, >>>move the emails there, in Claws, then copy the emails out of that >>>file [with Claws not running?], then delete the files in the archive >>>folder. Sounds OK, but lots more work than just a simple move, which >>>I'd prefer. > >> It seems that this is what you want as no plugin can decide which >> individual file needs to be archived. > >I was not expecting the plugin to select files, but instead to give me >the option to select the files and then archive the files I selected. >The current plugin does not let me do that. If it did AND offered to >NOT reformat the files, it could do what I want. > >> This can be automated to whatever you are able. Just as you stated >> you will move the individual mails to a designated folder, use the >> file system to copy those to your archive area, empty the folder in >> Claws. > >> I think this should run just fine with Claws running. The initial >> move to the archive staging folder can be accomplished by setting a >> specific tag to the message and using a post-processing rule to move >> anything with that tag. > >If I halt Claws, move the files to a different non-Claws directory, >then restart Claws, will Claws recognize that all the files are not >there and reindex the files it finds or will that foul up the way >Claws tracks each email message? If it can, this is MUCH easier. > Let me restate. Define a tag and use it to mark the mail to be archived. Create a post-processing rule to move mail with that tag to a new Claws-Mail aware folder that will be a holding area for the mail intended for the archive. Use your OS and file system to copy those mail files to your archive which is not defined to Claws-Mail. After the files are copied to the external archive delete them from the staging folder in Claws-Mail. Season to taste. No need to close Claws-Mail. Mike Yetto -- "There is danger from all men. The only maxim of a free government ought to be to trust no man living with power to endanger the public liberty." - John Adams -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From rikona at sonic.net Mon Jan 30 07:11:07 2017 From: rikona at sonic.net (rikona) Date: Sun, 29 Jan 2017 22:11:07 -0800 Subject: [Users] archives as multiple files In-Reply-To: <20170129174748.41e09dd3@braetac.lighthouse.yetnet> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> <1144666752.20170128203952@sonic.net> <20170129120314.0c3b2439@braetac.lighthouse.yetnet> <5110427061.20170129132227@sonic.net> <20170129174748.41e09dd3@braetac.lighthouse.yetnet> Message-ID: <87732406.20170129221107@sonic.net> Hello Michael, Sunday, January 29, 2017, 2:47:48 PM, Michael wrote: > On Sun, 29 Jan 2017 13:22:27 -0800 > rikona wrote: >>Sunday, January 29, 2017, 9:03:14 AM, Michael wrote: >> >>> On Sat, 28 Jan 2017 20:39:52 -0800 >>> rikona wrote: >> >>>>So, back to my preferred option - is there a way to simply move a >>>>number of the stored files to a different non-Claws directory without >>>>fouling up the way Claws tracks each email message? >>>> >>>>An alternate possibility is to create an 'archive' folder in Claws, >>>>move the emails there, in Claws, then copy the emails out of that >>>>file [with Claws not running?], then delete the files in the archive >>>>folder. Sounds OK, but lots more work than just a simple move, which >>>>I'd prefer. >> >>> It seems that this is what you want as no plugin can decide which >>> individual file needs to be archived. >> >>I was not expecting the plugin to select files, but instead to give me >>the option to select the files and then archive the files I selected. >>The current plugin does not let me do that. If it did AND offered to >>NOT reformat the files, it could do what I want. >> >>> This can be automated to whatever you are able. Just as you stated >>> you will move the individual mails to a designated folder, use the >>> file system to copy those to your archive area, empty the folder in >>> Claws. >> >>> I think this should run just fine with Claws running. The initial >>> move to the archive staging folder can be accomplished by setting a >>> specific tag to the message and using a post-processing rule to move >>> anything with that tag. >> >>If I halt Claws, move the files to a different non-Claws directory, >>then restart Claws, will Claws recognize that all the files are not >>there and reindex the files it finds or will that foul up the way >>Claws tracks each email message? If it can, this is MUCH easier. >> > Let me restate. > Define a tag and use it to mark the mail to be archived. Use of a tag is a good idea - thanks. Can I set up a **single** keyboard shortcut to apply THIS tag to any number of selected emails? Since I got no comments re just moving the files independent of Claws, I decided to try it. It seems that Claws CAN recover, reindex and properly display the remaining files after Claws is restarted after the move, and the folder is selected. So - it seems the easier way works too. Can anyone confirm that this should work reliably OR that I was just lucky in my tests? -- rikona From obsazeny.cz at volny.cz Tue Jan 31 00:45:15 2017 From: obsazeny.cz at volny.cz (Daniel Hrbac) Date: Tue, 31 Jan 2017 00:45:15 +0100 Subject: [Users] Drag and Drop attachments Message-ID: <20170131004515.70b22c77@dan-pavilion> Good evening, on Lubuntu 14.04 I am trying to Drag and Drop attachments from file explorer (PCManFM) to compose window. However it only works for files on local filesystem. When I access file share - generally samba over openvpn - and try to drag and drop from there to compose window, only file path is inserted (like smb://10.8.0.1/share/directory/filename.pdf). When I try to drag and drop to attachment tab area, nothing happens. Note: Samba is mounted only by PCManFM and not by mount command. Any idea whether I want something impossible or doing something wrong? Thank you, Daniel From claws at thewildbeast.co.uk Tue Jan 31 10:40:32 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 31 Jan 2017 09:40:32 +0000 Subject: [Users] Drag and Drop attachments In-Reply-To: <20170131004515.70b22c77@dan-pavilion> References: <20170131004515.70b22c77@dan-pavilion> Message-ID: <20170131094032.2572fba9@kujata> On Tue, 31 Jan 2017 00:45:15 +0100 Daniel Hrbac wrote: > Any idea whether I want something impossible or doing something > wrong? Go to the /Configuration/Preferences/Compose/Writing prefs page and set 'When dropping files into the Compose window' to 'Ask' and try again. with regards Paul From claws at thewildbeast.co.uk Tue Jan 31 10:41:36 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 31 Jan 2017 09:41:36 +0000 Subject: [Users] archives as multiple files In-Reply-To: <87732406.20170129221107@sonic.net> References: <2210503357.20170126212624@sonic.net> <20170127090040.10484d33@kujata> <1429319832.20170127225055@sonic.net> <20170128091609.30c20ab7@kujata> <1144666752.20170128203952@sonic.net> <20170129120314.0c3b2439@braetac.lighthouse.yetnet> <5110427061.20170129132227@sonic.net> <20170129174748.41e09dd3@braetac.lighthouse.yetnet> <87732406.20170129221107@sonic.net> Message-ID: <20170131094136.0b277c09@kujata> On Sun, 29 Jan 2017 22:11:07 -0800 rikona wrote: > Since I got no comments re just moving the files independent of > Claws, I decided to try it. Good idea, and simple to do. > Can anyone confirm that this should > work reliably OR that I was just lucky in my tests? It works. with regards Paul From obsazeny.cz at volny.cz Tue Jan 31 22:43:13 2017 From: obsazeny.cz at volny.cz (Daniel Hrbac) Date: Tue, 31 Jan 2017 22:43:13 +0100 Subject: [Users] Drag and Drop attachments In-Reply-To: <20170131094032.2572fba9@kujata> References: <20170131004515.70b22c77@dan-pavilion> <20170131094032.2572fba9@kujata> Message-ID: <20170131224313.32a92f99@dan-pavilion> V Tue, 31 Jan 2017 09:40:32 +0000 Paul napsáno: > On Tue, 31 Jan 2017 00:45:15 +0100 > Daniel Hrbac wrote: > > > Any idea whether I want something impossible or doing something > > wrong? > > Go to the /Configuration/Preferences/Compose/Writing prefs page and > set 'When dropping files into the Compose window' to 'Ask' and try > again. > > > Paul > ________ Hi, did not help. It was set to attach. Changed to 'Ask'. Did not help. When dragged from local filesystem, claws asks what to do properly, when dragged from smb://10.xxxx location, only path is inserted. Daniel From sylpheed at 911networks.com Tue Jan 31 22:53:24 2017 From: sylpheed at 911networks.com (sylpheed at 911networks.com) Date: Tue, 31 Jan 2017 13:53:24 -0800 Subject: [Users] HTML fancy doesn't work anymore Message-ID: <20170131135324.0f4beb91@frogguski.911networks.com> Arch & CM 3.14.1 I've been used CM for years, almost a decade and I'm having my first 'real problem'. Today I upgraded my arch (sudo pacman -Syyu). CM wasn't updated but A key doesn't work anymore (it was working this morning): config > plugins: fancy's not there config > plugins > load. I don't have a fancy.so anymore. How do I get it back? -- sknahT vyS From silver.bullet at zoho.com Tue Jan 31 23:23:52 2017 From: silver.bullet at zoho.com (Ralf Mardorf) Date: Tue, 31 Jan 2017 23:23:52 +0100 Subject: [Users] HTML fancy doesn't work anymore In-Reply-To: <20170131135324.0f4beb91@frogguski.911networks.com> References: <20170131135324.0f4beb91@frogguski.911networks.com> Message-ID: <20170131232352.70903607@utnubu> Hi, this seems to be an issue with the official package, so you need to report it at https://bugs.archlinux.org/ . I build claws from git and the plugin is available: [rocketmouse at archlinux ~]$ ls -hAl /usr/lib/claws-mail/plugins/fancy* -rwxr-xr-x 1 root root 1.3K Nov 23 01:53 /usr/lib/claws-mail/plugins/fancy.la -rwxr-xr-x 1 root root 49K Nov 23 01:53 /usr/lib/claws-mail/plugins/fancy.so [rocketmouse at archlinux ~]$ pacman -Q claws-mail-git claws-mail-git 3.14.1.r19.ge7206c0-1 [rocketmouse at archlinux ~]$ pacman -Qi claws-mail-git | grep fancy webkitgtk2: for the fancy webkit html plugin [installed] libsoup: for the fancy webkit html plugin [installed] However, it's missing by the official package: https://www.archlinux.org/packages/extra/x86_64/claws-mail/files/ I build from git like this: ./configure --build=$(uname -m)-arch-linux-gnu --disable-maintainer-mode --prefix=/usr --disable-static --enable-silent-rules --disable-jpilot --enable-enchant --enable-gnutls --enable-ldap --enable-crash-dialog --enable-pgpmime-plugin --enable-spamassassin-plugin --enable-bogofilter-plugin This is from the official PKGBUILD: [rocketmouse at archlinux ~]$ grep ./configure -A7 /var/abs/extra/claws-mail/PKGBUILD ./configure --prefix=/usr --disable-static \ --enable-enchant \ --enable-gnutls \ --enable-ldap \ --enable-crash-dialog \ --enable-pgpmime-plugin \ --enable-spamassassin-plugin \ --enable-bogofilter-plugin #--help Note, I'm not using this plugin, so I don't know if it's working. Regards, Ralf From claws at thewildbeast.co.uk Tue Jan 31 23:58:32 2017 From: claws at thewildbeast.co.uk (Paul) Date: Tue, 31 Jan 2017 22:58:32 +0000 Subject: [Users] HTML fancy doesn't work anymore In-Reply-To: <20170131232352.70903607@utnubu> References: <20170131135324.0f4beb91@frogguski.911networks.com> <20170131232352.70903607@utnubu> Message-ID: <20170131225832.7c60078f@kujata> On Tue, 31 Jan 2017 23:23:52 +0100 Ralf Mardorf wrote: > this seems to be an issue with the official package, so you need to > report it at https://bugs.archlinux.org/ . No need. See latest entry here: https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/claws-mail&showmsg=1 with regards Paul