From 6dd1dea18e48b1956869a2f7a10c866dc97d49d1 Mon Sep 17 00:00:00 2001 From: pinkerton Date: Wed, 27 May 1998 19:55:09 +0000 Subject: [PATCH] Port to new AM classes of security button. --- cmd/macfe/gui/CBrowserSecurityButton.cp | 11 +++++---- cmd/macfe/gui/CBrowserSecurityButton.h | 4 ++-- cmd/macfe/gui/CMiniSecurityButton.cp | 28 +---------------------- cmd/macfe/gui/CMiniSecurityButton.h | 2 -- cmd/macfe/rsrc/navigator/BrowserRat.cnst | Bin 16010 -> 16053 bytes 5 files changed, 10 insertions(+), 35 deletions(-) diff --git a/cmd/macfe/gui/CBrowserSecurityButton.cp b/cmd/macfe/gui/CBrowserSecurityButton.cp index e5457509b6f..df589af8721 100644 --- a/cmd/macfe/gui/CBrowserSecurityButton.cp +++ b/cmd/macfe/gui/CBrowserSecurityButton.cp @@ -19,7 +19,7 @@ #include "CBrowserSecurityButton.h" CBrowserSecurityButton::CBrowserSecurityButton(LStream* inStream) -: CPatternButton(inStream) +: CToolbarBevelButton(inStream) { } @@ -34,10 +34,13 @@ ResIDT CBrowserSecurityButton::GetIconID(ESecurityState inSecurityState) void CBrowserSecurityButton::NoteSecurityState(ESecurityState inSecurityState) { ResIDT wantedIconID = GetIconID(inSecurityState); + ControlButtonContentInfo currInfo; + GetContentInfo ( currInfo ); - if (wantedIconID != GetGraphicID()) + if (wantedIconID != currInfo.u.resID) { - SetGraphicID(wantedIconID); - Draw(NULL); + // set the new icon + currInfo.u.resID = wantedIconID; + SetContentInfo ( currInfo ); } } diff --git a/cmd/macfe/gui/CBrowserSecurityButton.h b/cmd/macfe/gui/CBrowserSecurityButton.h index 3605f539812..72bc0bff415 100644 --- a/cmd/macfe/gui/CBrowserSecurityButton.h +++ b/cmd/macfe/gui/CBrowserSecurityButton.h @@ -18,10 +18,10 @@ #pragma once -#include "CPatternButton.h" +#include "CToolbarBevelButton.h" #include "CSecurityStateListener.h" -class CBrowserSecurityButton : public CPatternButton, public CSecurityStateListener +class CBrowserSecurityButton : public CToolbarBevelButton, public CSecurityStateListener { public: enum { class_ID = 'BrSB' }; diff --git a/cmd/macfe/gui/CMiniSecurityButton.cp b/cmd/macfe/gui/CMiniSecurityButton.cp index aef55cb55d7..010d12fa6a1 100644 --- a/cmd/macfe/gui/CMiniSecurityButton.cp +++ b/cmd/macfe/gui/CMiniSecurityButton.cp @@ -30,30 +30,4 @@ ResIDT CMiniSecurityButton::GetIconID(ESecurityState inSecurityState) if (inSecurityState == eSecureState) result = ResID_SecureIcon; return result; -} - - -// ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ -// ₯ DrawButtonContent -// ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ - -void CMiniSecurityButton::DrawButtonContent(void) -{ - CGrafPtr thePort; - ::GetPort(&(GrafPtr)thePort); - - Rect theFrame = mCachedButtonFrame; - Point theAlignment; - - CalcOrientationPoint(theAlignment); - mPatternWorld->Fill(thePort, theFrame, theAlignment); -} - -// ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ -// ₯ DrawButtonGraphic -// ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡ - -void CMiniSecurityButton::DrawButtonGraphic(void) -{ - CToolbarButton::DrawButtonGraphic(); -} +} \ No newline at end of file diff --git a/cmd/macfe/gui/CMiniSecurityButton.h b/cmd/macfe/gui/CMiniSecurityButton.h index dc5957b88ab..b07278bca56 100644 --- a/cmd/macfe/gui/CMiniSecurityButton.h +++ b/cmd/macfe/gui/CMiniSecurityButton.h @@ -36,6 +36,4 @@ class CMiniSecurityButton : public CBrowserSecurityButton protected: - virtual void DrawButtonContent(void); - virtual void DrawButtonGraphic(void); }; diff --git a/cmd/macfe/rsrc/navigator/BrowserRat.cnst b/cmd/macfe/rsrc/navigator/BrowserRat.cnst index b134d969857be6aa8ea443e61d27682795188301..3504888ce5a063609c77259ad6f93cafc00798c0 100644 GIT binary patch delta 388 zcmXAlu}cFn7{!zGK%_&Ls)(T9q`1_!=V^~ZrMFqop%pthoQ zi>q6=dboA=PY^_KQd}JT0|d>r55f!lULIe*UiYcnPcKyvLURb^@00^VSeaQsXsa+N zTC-->G|g;k&|8o7y-S6Z@|Dr}cT=}{*$&64d2RW1kbB(Q{mi70u5eUvLv!Cz#$ww)`7O50*LQZ!incnkPNDvbin7V#;KSF1@#q{ z6izs6ftWT(dM=YtqD=*=a6qMSiBG|85)pNRtP=@UrksKxEmd7_cr{>-U`?u?1Xsoy zwt@#^2RDK@0#81q2G;(RqRFSO52L%1;<+ybL3%Nv>BHb=>m@$f jpIYmJ_HlH$@gAOliwK0)mt#| zI~C=Z7pE2lC6?$V=M|TLl*IVv7o{pB78Il=7A58-rz+$o<|U@57AYiWB<7{37V9Yl zmlhP{7nLZa(Wp6epIIRq82d01YZqC{9UC z&q=M+)B{-%`fE1>GmxIV%~+DrV)6xJbH?n+944{qJ^>|8CBB)#P7DGJ0*pWab~D`V z|ABykfo0WXLvc|-Rt5%7XFp}@=L|rWx&Q;y