--- a/idlehomescreen/xmluirendering/uiengine/src/xneditor.cpp Thu Dec 17 08:40:49 2009 +0200
+++ b/idlehomescreen/xmluirendering/uiengine/src/xneditor.cpp Thu Jan 07 12:39:41 2010 +0200
@@ -28,6 +28,7 @@
#include <xnuiengine.rsg>
#include <hscontentcontrolui.h>
#include <hscontentcontrol.h>
+#include <activeidle2domaincrkeys.h>
// User includes
#include "xnuiengine.h"
@@ -80,12 +81,14 @@
_LIT8( KSingle, "single" );
_LIT8( KMulti, "multi" );
-_LIT8( KWMUi, "WmContentControlUI" );
const TInt32 KMultiInstanceUnlimitedValue = -1;
-const TInt32 KMultiInstanceHiddenValue = 0;
const TUid KDummyUid = { 0x0000000 };
+
+const TUint32 KAICCPluginUIDKey = 0x00003010;
+const TInt32 KOpaQDataLen = 10;
+
enum
{
ECanBeAdded = 0x01,
@@ -307,6 +310,7 @@
{
iCpsWrapper = CCpsWrapper::NewL( *this );
iHspsWrapper = CHspsWrapper::NewL( aUid, this );
+ iRepository= CRepository::NewL( TUid::Uid( KCRUidActiveIdleLV ) );
}
// ---------------------------------------------------------------------------
@@ -320,6 +324,7 @@
delete iCpsWrapper;
delete iHspsWrapper;
delete iPublisherMap;
+ delete iRepository;
}
// -----------------------------------------------------------------------------
@@ -617,14 +622,26 @@
}
// ---------------------------------------------------------------------------
+// CXnEditor::IdFromCrep
+// ---------------------------------------------------------------------------
+//
+TInt CXnEditor::IdFromCrep (TDes8& aUid) const
+ {
+ return iRepository->Get( KAICCPluginUIDKey, aUid );
+ }
+
// CXnEditor::AddWidgetL
// ---------------------------------------------------------------------------
//
void CXnEditor::AddWidgetL()
{
- MHsContentControlUi* ui(
- iViewManager.AppUiAdapter().HsContentController( KWMUi ) );
-
+ TBuf8<KOpaQDataLen> oPaqDataStr;
+
+ MHsContentControlUi* ui( NULL );
+ if ( IdFromCrep ( oPaqDataStr ) == KErrNone )
+ {
+ ui = iViewManager.AppUiAdapter().HsContentController( oPaqDataStr );
+ }
if( ui )
{
ui->SetContentController( this );
@@ -1517,9 +1534,13 @@
//
void CXnEditor::WidgetListChanged()
{
- MHsContentControlUi* ui(
- iViewManager.AppUiAdapter().HsContentController( KWMUi ) );
-
+ TBuf8<KOpaQDataLen> oPaqDataStr;
+
+ MHsContentControlUi* ui( NULL );
+ if ( IdFromCrep ( oPaqDataStr ) == KErrNone )
+ {
+ ui = iViewManager.AppUiAdapter().HsContentController( oPaqDataStr );
+ }
if( ui )
{
ui->NotifyWidgetListChanged();
@@ -1537,9 +1558,13 @@
//
void CXnEditor::ViewListChanged()
{
- MHsContentControlUi* ui(
- iViewManager.AppUiAdapter().HsContentController( KWMUi ) );
-
+ TBuf8<KOpaQDataLen> oPaqDataStr;
+
+ MHsContentControlUi* ui( NULL );
+ if ( IdFromCrep ( oPaqDataStr ) == KErrNone )
+ {
+ ui = iViewManager.AppUiAdapter().HsContentController( oPaqDataStr );
+ }
if( ui )
{
ui->NotifyViewListChanged();