Recent

Author Topic: Lazarus MailingList Reader  (Read 14550 times)

GetMem

  • Hero Member
  • *****
  • Posts: 3782
Re: Lazarus MailingList Reader
« Reply #15 on: November 16, 2015, 10:01:20 pm »
t's never safe to free a thread from inside of its own events including OnTerminate, furthermore WaitFor can lead to deadlock if not handled properly. This was true back in the delphi days, on multiplatform it's even worse. I never ever free the thread manually or call WaitFor. FreeOnTerminate always works, even under OSX.
Other then this @rvk is right, to be perferctly honest I didn't even noticed procedure StopMailReaderThreads, that is why I like this forum. 

GetMem

  • Hero Member
  • *****
  • Posts: 3782
Re: Lazarus MailingList Reader
« Reply #16 on: November 17, 2015, 08:09:24 am »
@wp
I don't want to insist on poDestkopCenter, if you like it this way it's perfectly fine,  I won't mention it again, but in my opinion it looks ugly on dual monitor(see screenshot). poScreenCenter always display the form on the currently active monitor(where lmlr.exe is opened).

rvk

  • Hero Member
  • *****
  • Posts: 4385
Re: Lazarus MailingList Reader
« Reply #17 on: November 17, 2015, 09:41:32 am »
... but in my opinion it looks ugly on dual monitor(see screenshot).
And if you haven't glued your screens together it looks even worse  :P

I'm still wondering why there is a poDestkopCenter. I can't imagine a case where you would want to use that. And when you don't have a multi-monitor setup you can always make the mistake in choosing this option (which you never should).

GetMem

  • Hero Member
  • *****
  • Posts: 3782
Re: Lazarus MailingList Reader
« Reply #18 on: November 17, 2015, 09:52:10 am »
Quote
And if you haven't glued your screens together it looks even worse  :P
:D

Quote
I'm still wondering why there is a poDestkopCenter
The only difference AFAIK is:  Form.Top(poDesktopCenter) = Form.Top(poScreenCenter) - TaskBarHeight, or the other way arround.

wp

  • Hero Member
  • *****
  • Posts: 7727
Re: Lazarus MailingList Reader
« Reply #19 on: November 17, 2015, 11:14:00 am »
@GetMem: You are absolutely correct - poDesktopCenter is not nice! Strange, I thought I'd never had set the Position like that this, but looking at the svn message shows me that it was always poDesktopCenter... I hope it is fixed now.
« Last Edit: November 17, 2015, 11:20:06 am by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

rvk

  • Hero Member
  • *****
  • Posts: 4385
Re: Lazarus MailingList Reader
« Reply #20 on: November 17, 2015, 11:51:54 am »
I wouldn't be me, if I couldn't resist suggesting some options :)
  • Automatic update of mail-items. Save the last updated date in config and make an Auto-update option when you start the program and the last-date has changed, retrieve all mail-items from the month of that last-date to the month of today.
  • Seeing that search is probably a big part of the program, a keyboard shortcut option for it would be nice. F3 to open the search-option (or if it's already open, search the next occurrence) and Shift+F3 to search backwards. I'm normally a very (and I mean VERY) big fan of keyboard shortcuts so a program can be entirely operated using keyboard. (maybe also include other shortcuts or at least add alt_characters.)
  • Any plans to also include the FPC-devel list for automatic retrieval (which has the same format) ? (and if there isn't already, a possibility to start the program with a parameter specifying which archive, so you can create to distinct shortcuts for each mail-list)
  • Now the mail-items are editable. Is that done for a reason? Changing a mail-item shouldn't be necessary (I think). Now it "eats" my tab-key so I can't tab and shift-tab through the windows. (yeah, I'm a keyboard-Junkie :))
  • And last... (but this might be nitpicking) adding ebTop to the EdgeBorder (which was default I think). Attached is a screenshot on Windows 10. I've noticed this with other programs too on Windows 10. Microsoft removed a line-border from the title-bar, which leaves all programs to not have clear border between panels and titlebar (which isn't aesthetically pleasing to the eye.) Also attached a screenshot with ebTop+ebBottom for EdgeBottom. I'm not sure how it would look on other platforms though.

wp

  • Hero Member
  • *****
  • Posts: 7727
Re: Lazarus MailingList Reader
« Reply #21 on: November 17, 2015, 12:20:25 pm »
Automatic update of mail-items. Save the last updated date in config and make an Auto-update option when you start the program and the last-date has changed, retrieve all mail-items from the month of that last-date to the month of today.
Good idea.

Seeing that search is probably a big part of the program, a keyboard shortcut option for it would be nice. F3 to open the search-option (or if it's already open, search the next occurrence) and Shift+F3 to search backwards.
Since all commands are built around actions this shouldn't be too difficult.

Any plans to also include the FPC-devel list for automatic retrieval (which has the same format) ? (and if there isn't already, a possibility to start the program with a parameter specifying which archive, so you can create to distinct shortcuts for each mail-list)
Do you know the url where the FPC-devel list resides? What about having both mailing lists together?

Now the mail-items are editable. Is that done for a reason? Changing a mail-item shouldn't be necessary (I think). Now it "eats" my tab-key so I can't tab and shift-tab through the windows. (yeah, I'm a keyboard-Junkie :) )
I left editing on intentionally because sometimes there are annoying typos etc. I am also thinking of drag&drop of the nodes because people (like me) sometimes don't reply correctly and this opens another thread on the same topic. But I see the point: this could be another option for the settings dialog.

And last... (but this might be nitpicking) adding ebTop to the EdgeBorder (which was default I think). Attached is a screenshot on Windows 10. I've noticed this with other programs too on Windows 10. Microsoft removed a line-border from the title-bar, which leaves all programs to not have clear border between panels and titlebar (which isn't aesthetically pleasing to the eye.) Also attached a screenshot with ebTop+ebBottom for EdgeBottom. I'm not sure how it would look on other platforms though.
Yes - I hate Windows10... The upper bar looks a bit strange on Win7, so maybe an IFDEF would be fine here. Do you know how to detect that Win10 is running?
« Last Edit: November 17, 2015, 12:23:36 pm by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

rvk

  • Hero Member
  • *****
  • Posts: 4385
Re: Lazarus MailingList Reader
« Reply #22 on: November 17, 2015, 12:41:24 pm »
Do you know the url where the FPC-devel list resides? What about having both mailing lists together?
At the left of the forum you can click "Mailing lists" in the Free Pascal section. You directed here: http://lists.freepascal.org/mailman/listinfo
I think fpc-devel is the most active (but there are some less active-ones too). The same goes for Lazarus mailing lists. There is lazarus-other and lazarus-es but these aren't very active.
I'm not sure if mixing them would be advantageous. It would depend if you use the program primarily to read or to search. Of course it could also be possible to load multiple archives and have a visible switch to make them active or not. If you activate multiple archives they are all in the same window. Just a thought. Not sure if it's doable.

Now the mail-items are editable. Is that done for a reason? Changing a mail-item shouldn't be necessary (I think). Now it "eats" my tab-key so I can't tab and shift-tab through the windows. (yeah, I'm a keyboard-Junkie :) )
I left editing on intentionally because sometimes there are annoying typos etc. I am also thinking of drag&drop of the nodes because people (like me) sometimes don't answer correctly and this opens another thread on the same topic. But I see the point: this could be another option for the settings dialog.
You could at least set the WantTabs to false for SynMailBody. That way you can use tab to escape from the Mailbody. I can't imagine you want tabs in a mail anyway. And that way the mail stays editable.

Yes - I hate Windows10... The upper bar looks a bit strange on Win7, so maybe an IFDEF would be fine here. Do you know how to detect that Win10 is running?
You might not even see the ebTop on other systems. So maybe this could be added regardless (if you don't see a "double" line in Linux).
But an IDFEF couldn't work because that is at compile time. If you really want to check it, you need to check it at runtime.

Code: Pascal  [Select][+][-]
  1. {$IFDEF WINDOWS}uses win32proc;{$ENDIF}
  2. ...
  3. {$IFDEF WINDOWS}
  4. if WindowsVersion >= wv10 then
  5.   Showmessage('I an on Windows 10 or later');
  6. {$ENDIF}

But maybe this also depends on themes. (O, hey, they removed the Classic Theme from Windows 10 :))

rvk

  • Hero Member
  • *****
  • Posts: 4385
Re: Lazarus MailingList Reader
« Reply #23 on: November 17, 2015, 01:11:42 pm »
Found a typo:
Code: Pascal  [Select][+][-]
  1. function TMainForm.SaveFile: Boolean;
  2. ...
  3.   with SaveDialog do begin
  4.     InitialDir := ExtractFileDir(FileName);
  5.     FileName := ExtractFileName(FFilename);
That ExtractFileDir should be done on FFileName and not on FileName.

(Now, when I click Save, it doesn't start where the original file was. In a previous version this worked ok.)

Edit:
O, and another one:
Code: Pascal  [Select][+][-]
  1.   with OpenLocalFilesDialog do begin
  2.     if FFileName <> '' then begin
  3.       InitialDir := ExtractFileDir(FFileName);
  4.       FileName := ExtractFileName(FFileName);
  5.       if Lowercase(ExtractFileExt(FileName)) = '.gz' then
  6.         FilterIndex := 1
  7.       else if Lowercase(ExtractFileExt(Filename)) = '.txt' then
  8.         FilterIndex := 2;
  9.     end;
Shouldn't that also be on FFileName (and not FileName). I think you need to check all your FFileName and FileName occurrences :)
« Last Edit: November 17, 2015, 01:13:19 pm by rvk »

wp

  • Hero Member
  • *****
  • Posts: 7727
Re: Lazarus MailingList Reader
« Reply #24 on: November 19, 2015, 12:40:54 am »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

mdalacu

  • Full Member
  • ***
  • Posts: 214
    • dmSimpleApps
Re: Lazarus MailingList Reader
« Reply #25 on: November 19, 2015, 07:49:53 am »
Please, add proxy support. Thx.

wp

  • Hero Member
  • *****
  • Posts: 7727
Re: Lazarus MailingList Reader
« Reply #26 on: November 19, 2015, 06:01:06 pm »
The new trunk version (exe download: http://sourceforge.net/projects/wp-laz/files/Lazarus%20MailingList%20Reader/LazarusMailingListReader-trunk.zip) contains some kind of proxy support. Unfortunately I cannot test it because I am connected to the internet directly. Please test and notify me of the results.

The new version also provides incremental search for the search combobox.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

John Landmesser

  • New Member
  • *
  • Posts: 25
Re: Lazarus MailingList Reader
« Reply #27 on: August 03, 2016, 02:35:25 pm »
trying to compile lmlr on linux i get errors:

lmlrmailarchiveform.pas(287,91) Error: Illegal type conversion: "TMailingList" to "TObject"

source line 287:

  for ml in TMailingList do
    if Settings.MailArchiveURLs[ml][1] <> '-' then
{ TODO : nix compile on linux }      CbMailingLists.Items.AddObject(MailingListNames[ml], TObject(ml));

Compiles ok on Win32

There is nothing special with "CbMailingLists.Items.AddObject(MailingListNames[ml], TObject(ml));" so what the compiler complaines about?

SysInfo:
Lazarus 1.7 r52780 FPC 3.0.0 x86_64-linux-gtk 2

Debian Sid
CPU~Dual core Pentium E5200 (-MCP-) speed/max~2000/2500 MHz Kernel~4.7.0-towo.1-siduction-amd64 x86_64 Up~53 min Mem~1987.3/3948.2MB HDD~160.0GB(46.7% used) Procs~184 Client~Shell inxi~2.3.0

Quote:
"@John: Just checked the Lazarus MailingList Reader on Linux, compiling fine. Maybe you use the wrong VirtualTreeView package, mine is version 5.8 in the branches folder of virtualtreeview-new (lazarus-ccr). If this does not solve your issue please continue this discussion via PM or in the forum."

I have the VirtualTreeView package 4.8.7.3 from branches folder. There is no version 5.8

It's a mess with these versions of VirtualTreeView, giving up!

« Last Edit: August 03, 2016, 03:31:44 pm by John Landmesser »

wp

  • Hero Member
  • *****
  • Posts: 7727
Re: Lazarus MailingList Reader
« Reply #28 on: August 03, 2016, 03:42:22 pm »
64 bit? Then it is the missing cast to PtrInt because pointers and integers have different sizes. I don't have a 64-bit Linux available, but this code compiles fine on for 64 bit on Win:

Code: Pascal  [Select][+][-]
  1.   CbMailingLists.Items.AddObject(MailingListNames[ml], TObject(PtrInt(ml)));
  2.  
  3. // same at line 363:
  4.   CbMailingLists.ItemIndex := CbMailingLists.Items.IndexOfObject(TObject(PtrInt(AValue)));

Sorry for the confusion with the VTV version number - it is 4.8 of course.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

John Landmesser

  • New Member
  • *
  • Posts: 25
Re: Lazarus MailingList Reader
« Reply #29 on: August 03, 2016, 04:22:49 pm »
Thats it, thank you very much :-))

 

TinyPortal © 2005-2018