From 9d6fa33e1625b19527cc16f5e7458252373b99fb Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 14 Apr 2011 15:22:31 -0500 Subject: [PATCH] remove toggleToolbar and getToolbar state These are not necessary with the new toolbars --- lib/WebGUI/Asset.pm | 32 ---------------------------- lib/WebGUI/Macro/AssetProxy.pm | 1 - lib/WebGUI/Macro/RandomAssetProxy.pm | 1 - 3 files changed, 34 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 86e4bbc74..027a23a83 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1726,20 +1726,6 @@ sub getToolbar { return $output; } -#------------------------------------------------------------------- - -=head2 getToolbarState ( ) - -Returns 0 if the state is normal, and 1 if the toolbar state has been toggled. See toggleToolbar() for details. - -=cut - -sub getToolbarState { - my $self = shift; - return $self->{_toolbarState}; -} - - #------------------------------------------------------------------- =head2 getUiLevel ( ) @@ -2579,24 +2565,6 @@ sub setState { $self->purgeCache; } -#------------------------------------------------------------------- - -=head2 toggleToolbar ( ) - -Toggles a toolbar to a special state so that custom toolbars can be rendered under special circumstances. This is mostly useful for macros that wish to proxy an asset but not display the toolbar. - -=cut - -sub toggleToolbar { - my $self = shift; - if ($self->{_toolbarState}) { - $self->{_toolbarState} = 0; - } else { - $self->{_toolbarState} = 1; - } -} - - #------------------------------------------------------------------- =head2 write ( ) diff --git a/lib/WebGUI/Macro/AssetProxy.pm b/lib/WebGUI/Macro/AssetProxy.pm index 6dc8671df..31ae8b234 100644 --- a/lib/WebGUI/Macro/AssetProxy.pm +++ b/lib/WebGUI/Macro/AssetProxy.pm @@ -77,7 +77,6 @@ sub process { } } elsif ($asset->canView) { - $asset->toggleToolbar; $asset->prepareView; my $output = $asset->view; $perfLog->({ asset => $asset, time => Time::HiRes::tv_interval($t), type => 'Proxy'}) diff --git a/lib/WebGUI/Macro/RandomAssetProxy.pm b/lib/WebGUI/Macro/RandomAssetProxy.pm index 34a17ee83..2d4363992 100644 --- a/lib/WebGUI/Macro/RandomAssetProxy.pm +++ b/lib/WebGUI/Macro/RandomAssetProxy.pm @@ -51,7 +51,6 @@ sub process { return $i18n->get('childless'); } elsif ($randomAsset->canView) { - $randomAsset->toggleToolbar; $randomAsset->prepareView; return $randomAsset->view; }