>
> Update of /cvsroot/abiword-plugins/tools/abicollab/unix
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv17439/unix
>
> Modified Files:
> ap_UnixDialog_Collaboration.cpp ap_UnixDialog_Collaboration.h
> Log Message:
>
> Implement Jean Brefort's idea to remove the platform ifdefs. Now we have
> extern pointers that are assigned at compile time in the platform code.
>
This code couretsy of Jean Brefort, allows us to avoid th eifdef's xp
code. Now one must declare an extern pointer to the platform static
constructor in the xp Dialog code, like this:
extern pt2Constructor ap_Collaboration_Constructor ;
Then all the platform maintainers need to assign this to the static
constructor in the platform code like this:
pt2Constructor ap_Collaboration_Constructor =
&AP_UnixDialog_Collaboration::static_constructor;
Then we call the registerDialog method like this:
m_iDialogCollab_Id =
pFactory->registerDialog(ap_Collaboration_Constructor,XAP_DLGT_NON_PERSISTENT);
No need for ifdef's!
Thanks Jean.
Cheers
Martin
>
> Index: ap_UnixDialog_Collaboration.cpp
> ===================================================================
> RCS file:
> /cvsroot/abiword-plugins/tools/abicollab/unix/ap_UnixDialog_Collaboration.cpp,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -d -r1.7 -r1.8
> --- ap_UnixDialog_Collaboration.cpp 28 Aug 2006 02:15:05 -0000 1.7
> +++ ap_UnixDialog_Collaboration.cpp 28 Aug 2006 12:11:36 -0000 1.8
> @@ -46,12 +46,19 @@
> dlg->event_CollaborationType();
> }
>
> -
> XAP_Dialog *
> AP_UnixDialog_Collaboration::static_constructor(XAP_DialogFactory *
> pFactory, XAP_Dialog_Id id)
> {
> return static_cast<XAP_Dialog *>(new
> AP_UnixDialog_Collaboration(pFactory,id));
> }
>
> +
> +//
> +// Need this pointer to find the dialogFactory. Other platforms
> +// should implement this
> +//
> +
> +pt2Constructor ap_Collaboration_Constructor =
> &AP_UnixDialog_Collaboration::static_constructor;
> +
> AP_UnixDialog_Collaboration::AP_UnixDialog_Collaboration(XAP_DialogFactory
> * pDlgFactory, XAP_Dialog_Id id)
> : AP_Dialog_Collaboration(pDlgFactory, id),
> m_pWindowMain(NULL)
>
> Index: ap_UnixDialog_Collaboration.h
> ===================================================================
> RCS file:
> /cvsroot/abiword-plugins/tools/abicollab/unix/ap_UnixDialog_Collaboration.h,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -d -r1.5 -r1.6
> --- ap_UnixDialog_Collaboration.h 28 Aug 2006 02:15:05 -0000 1.5
> +++ ap_UnixDialog_Collaboration.h 28 Aug 2006 12:11:36 -0000 1.6
> @@ -25,6 +25,8 @@
>
> class XAP_Frame;
>
> +extern pt2Constructor ap_Collaboration_Constructor ;
> +
> class AP_UnixDialog_Collaboration : public AP_Dialog_Collaboration
> {
> public:
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
Received on Mon Aug 28 14:25:59 2006
This archive was generated by hypermail 2.1.8 : Mon Aug 28 2006 - 14:25:59 CEST