Kaydet (Commit) 06193462 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: Id600a5ee28440ee91c7089c8f7aa05f83bc0e63c
üst bd1da371
...@@ -281,7 +281,7 @@ void Sane::ReloadOptions() ...@@ -281,7 +281,7 @@ void Sane::ReloadOptions()
CheckConsistency( NULL, true ); CheckConsistency( NULL, true );
maReloadOptionsLink.Call( this ); maReloadOptionsLink.Call( *this );
} }
bool Sane::Open( const char* name ) bool Sane::Open( const char* name )
......
...@@ -96,7 +96,7 @@ private: ...@@ -96,7 +96,7 @@ private:
int mnDevice; int mnDevice;
SANE_Handle maHandle; SANE_Handle maHandle;
Link<> maReloadOptionsLink; Link<Sane&,void> maReloadOptionsLink;
static inline oslGenericFunction static inline oslGenericFunction
LoadSymbol( const char* ); LoadSymbol( const char* );
...@@ -168,7 +168,7 @@ public: ...@@ -168,7 +168,7 @@ public:
bool Start( BitmapTransporter& ); bool Start( BitmapTransporter& );
inline Link<> SetReloadOptionsHdl( const Link<>& rLink ); inline Link<Sane&,void> SetReloadOptionsHdl( const Link<Sane&,void>& rLink );
}; };
inline int Sane::GetOptionElements( int n ) inline int Sane::GetOptionElements( int n )
...@@ -181,9 +181,9 @@ inline int Sane::GetOptionElements( int n ) ...@@ -181,9 +181,9 @@ inline int Sane::GetOptionElements( int n )
return 1; return 1;
} }
inline Link<> Sane::SetReloadOptionsHdl( const Link<>& rLink ) inline Link<Sane&,void> Sane::SetReloadOptionsHdl( const Link<Sane&,void>& rLink )
{ {
Link<> aRet = maReloadOptionsLink; Link<Sane&,void> aRet = maReloadOptionsLink;
maReloadOptionsLink = rLink; maReloadOptionsLink = rLink;
return aRet; return aRet;
} }
......
...@@ -662,7 +662,7 @@ IMPL_LINK_TYPED( SaneDlg, ClickBtnHdl, Button*, pButton, void ) ...@@ -662,7 +662,7 @@ IMPL_LINK_TYPED( SaneDlg, ClickBtnHdl, Button*, pButton, void )
} }
else if( pButton == mpAdvancedBox ) else if( pButton == mpAdvancedBox )
{ {
ReloadSaneOptionsHdl( NULL ); ReloadSaneOptionsHdl( mrSane );
} }
} }
if( pButton == mpOKButton || pButton == mpScanButton ) if( pButton == mpOKButton || pButton == mpScanButton )
...@@ -873,14 +873,13 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit ) ...@@ -873,14 +873,13 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
return 0; return 0;
} }
IMPL_LINK( SaneDlg, ReloadSaneOptionsHdl, Sane*, /*pSane*/ ) IMPL_LINK_NOARG_TYPED( SaneDlg, ReloadSaneOptionsHdl, Sane&, void )
{ {
mnCurrentOption = -1; mnCurrentOption = -1;
mnCurrentElement = 0; mnCurrentElement = 0;
DisableOption(); DisableOption();
InitFields(); InitFields();
mpPreview->Invalidate(); mpPreview->Invalidate();
return 0;
} }
void SaneDlg::AcquirePreview() void SaneDlg::AcquirePreview()
......
...@@ -35,10 +35,10 @@ class ScanPreview; ...@@ -35,10 +35,10 @@ class ScanPreview;
class SaneDlg : public ModalDialog class SaneDlg : public ModalDialog
{ {
private: private:
Sane& mrSane; Sane& mrSane;
bool mbScanEnabled; bool mbScanEnabled;
Link<> maOldLink; Link<Sane&,void> maOldLink;
VclPtr<OKButton> mpOKButton; VclPtr<OKButton> mpOKButton;
VclPtr<CancelButton> mpCancelButton; VclPtr<CancelButton> mpCancelButton;
...@@ -83,7 +83,7 @@ private: ...@@ -83,7 +83,7 @@ private:
DECL_LINK_TYPED( ClickBtnHdl, Button*, void ); DECL_LINK_TYPED( ClickBtnHdl, Button*, void );
DECL_LINK( SelectHdl, ListBox* ); DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( ModifyHdl, Edit* ); DECL_LINK( ModifyHdl, Edit* );
DECL_LINK( ReloadSaneOptionsHdl, Sane* ); DECL_LINK_TYPED( ReloadSaneOptionsHdl, Sane&, void );
DECL_LINK_TYPED( OptionsBoxSelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( OptionsBoxSelectHdl, SvTreeListBox*, void );
void SaveState(); void SaveState();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment