Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-10-2014, 09:50   #1
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Plugins and tool bar icons

I want severals icons on the tool bar for the same plugin
I have no problem to create and use them, getting action from a click on one of them - no problem

But I would like to toggle visible/invisible them from the plugin and I was unable to do that.
There is a "SetToolbarToolViz( ... )" function but seems to do nothing

Have I missed something ?

Thanks
Jean Pierre
__________________

__________________
Ptizef is offline   Reply With Quote
Old 03-10-2014, 10:17   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Plugins and tool bar icons

JP...
I'm not aware of anyone ever using it, so it might clearly be broken.

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 03-10-2014, 11:30   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,369
Re: Plugins and tool bar icons

Prize Would this possibly be a solution to having the current(data) grib in one file and wind & pressure in another grib file. Such that wxrte can use both files?

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
__________________
rgleason is offline   Reply With Quote
Old 03-10-2014, 11:31   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,369
Re: Plugins and tool bar icons

Sorry I meant ptizef. Spell correct un-corrected.

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
__________________
rgleason is offline   Reply With Quote
Old 04-10-2014, 01:48   #5
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: Plugins and tool bar icons

Pavel
yes the visibility function is broken (or more exactly not finished )
Although I'm not familiar with this stuff, I found a solution working in the patch here:

chart1.cpp
@@ -3085,6 +3085,7 @@ bool MyFrame::AddDefaultPositionPlugInTools( ocpnToolBarSimple *tb )

for( unsigned int i = 0; i < tool_array.GetCount(); i++ ) {
PlugInToolbarToolContainer *pttc = tool_array.Item( i );
+ if( !pttc->b_viz ) continue;
if( pttc->position == -1 ) // PlugIn has requested default positioning
{
wxBitmap *ptool_bmp;


pluginmanager.cpp
@@ -1364,6 +1364,7 @@ void PlugInManager::SetToolbarToolViz(int item, bool viz)
if(pttc->id == item)
{
pttc->b_viz = viz;
+ pParent->RequestNewToolbar();
break;
}
}


Jean Pierre
__________________
Ptizef is offline   Reply With Quote
Reply

Tags
plug

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Plugins and outboard and laptop! Algarve OpenCPN 1 01-02-2014 20:00
Installateur de plugins, Install software for plugins. Gilletarom OpenCPN 3 30-04-2013 06:57
Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide manuprenlair OpenCPN 19 08-06-2012 05:12
GPX (In) (Out) on Tool Bar Yellowrose Navigation 6 10-02-2011 13:18
Let's See Your Boat's Workbench, Tool Shed, Tool Box . . . Ocean Roads Construction, Maintenance & Refit 46 12-10-2010 17:22



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:21.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.