Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 10-10-2020, 11:02   #1
Registered User

Join Date: Mar 2020
Posts: 35
VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Hi,

I have VDR 1.2.6 installed on a Raspberry Pi 3. When I click on the VDR record button it brings up the play open file dialog box instead of the new file dialog box.

Thank you.
ZagsAtCF is offline   Reply With Quote
Old 10-10-2020, 12:31   #2
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Same on Linux.
This was correct in version 1.2.3.
cagney is offline   Reply With Quote
Old 10-10-2020, 13:07   #3
Registered User
 
sv_pelagia's Avatar

Join Date: Apr 2013
Location: British Columbia
Boat: Sceptre 41
Posts: 1,960
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

When I record, I toobget the open file (rather than save as) box as well on aandroid and PC. Fortunately, it functions as "save as".
sv_pelagia is offline   Reply With Quote
Old 11-10-2020, 11:12   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Perhaps one of you sharp eyed raspberry programmers can spot the change since June 12 in one of the commits, and advise us where the problem is. I can't find any material change to that part of the program.



https://github.com/rgleason/vdr_pi/commits/master
rgleason is offline   Reply With Quote
Old 11-10-2020, 11:57   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

I think that the problem must be in this commit:

Quote:
Improve to use platform optimized file dialog.
@bdbcat
bdbcat committed on Sep 8
Thomas
cagney is offline   Reply With Quote
Old 11-10-2020, 13:30   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Thanks, I see that, but don't know what to change
https://github.com/rgleason/vdr_pi/c...1a16fd937fb092


Why would these changes result in the "save as" instead of Open?
rgleason is offline   Reply With Quote
Old 11-10-2020, 14:42   #7
Registered User

Join Date: Mar 2011
Posts: 718
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Because the code has been changed from using wxWidgets wxFileDialog functions to an OpenCPN provided PlatformFileSelectorDialog.
Code:
wxFileDialog fdlg( GetOCPNCanvasWindow(), _("Choose a file"), wxT(""), m_ifilename, wxT("*.*"), wxFD_OPEN|wxFD_FILE_MUST_EXIST );
and
Code:
wxFileDialog fdlg( GetOCPNCanvasWindow(), _("Choose a file"), wxT(""), m_ofilename, wxT("*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT );
to
Code:
int response = PlatformFileSelectorDialog( GetOCPNCanvasWindow(), &file, _("Choose a file"), idir, ifile, _T("*.*") );
and without looking at the OpenCPN code to find the implementation of PlatformSelectorDialog, who knows whether it is a File Open or File Close dialog?
Simple fix, revert the changes.

stevead is offline   Reply With Quote
Old 11-10-2020, 17:57   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

stevead, Thanks, that is helpful but I believe bdbcat did that to fix issues in Android, so reverting is not an option, it needs to be fixed.


C:\Users\Rick\Documents\GitHub\OpenCPN\src\pluginm anager.cpp (1 hit)
Line 8297: int PlatformFileSelectorDialog( wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir,

https://github.com/OpenCPN/OpenCPN/b...ginmanager.cpp

Quote:
int PlatformDirSelectorDialog( wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir)
{
return g_Platform->DoDirSelectorDialog( parent, file_spec, Title, initDir);
}

int PlatformFileSelectorDialog( wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir,
wxString suggestedName, wxString wildcard)
{
return g_Platform->DoFileSelectorDialog( parent, file_spec, Title, initDir,
suggestedName, wildcard);
}
rgleason is offline   Reply With Quote
Old 11-10-2020, 21:56   #9
Registered User

Join Date: Mar 2011
Posts: 718
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Hi Rick,

OK, understand that it was done for some obscure reason that mere minions like us are not privy to.

However the problem lies in the fact that the PlatformFileSelectorDialog API does not appear to have any arguments that differentiate between a file open or file save dialog.

Perhaps it was not designed for the purpose that you are using it for in the VDR plugin?

Good luck.
stevead is offline   Reply With Quote
Old 12-10-2020, 05:01   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Steve, you are probably right about reverting, but I wouldn't know. I guess I'll ask Dave directly. Thanks for your help.



Quote:
Originally Posted by stevead View Post
Hi Rick,

OK, understand that it was done for some obscure reason that mere minions like us are not privy to.

However the problem lies in the fact that the PlatformFileSelectorDialog API does not appear to have any arguments that differentiate between a file open or file save dialog.

Perhaps it was not designed for the purpose that you are using it for in the VDR plugin?

Good luck.
rgleason is offline   Reply With Quote
Old 12-10-2020, 05:23   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

I think this report can be ignored. Can anyone else please test and report exactly what the problem is? Is it really a bug? Is it repeatable?

I tested VDR on Windows and it works just as I expected.
rgleason is offline   Reply With Quote
Old 12-10-2020, 12:01   #12
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Rick,


just tested the updated 1.2.6 under macOS and "recording" brings up a dialogue to select an existing file - not to define a file for output, where you are able to edit the name for example.


Hubert
bcn is offline   Reply With Quote
Old 13-10-2020, 05:24   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

bcn,
The menu does not show "Choose a file" and have "Save" at the bottom right?
I can put a new filename in and pick "Save" and it records to the new file.
rgleason is offline   Reply With Quote
Old 13-10-2020, 08:09   #14
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Rick...
I corrected the source in github. Now at 1.2.7.
Builds fine in cloudsmith vdr-beta repo.
I guess it needs to be tagged and rebuilt into cloudsmith vdr-prod, and then update the plugin master catalog.
Will you do this?


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 13-10-2020, 08:22   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: VDR 1.2.6 Raspberry Pi Record Dialog Box issue

Thank you Dave. I would be delighted to follow through on this.
rgleason is offline   Reply With Quote
Reply

Tags
record


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible issue with AIS and VDR playback??? RhythmDoctor OpenCPN 4 24-03-2015 22:01
'Options' Dialog Stops Connections Output RobbieW OpenCPN 3 19-08-2013 18:25

Advertise Here


All times are GMT -7. The time now is 03:36.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.