|
1 /* |
|
2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Gtc Message Display Dialog. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: tr1cfwln#13 % |
|
20 */ |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "GtcNotifDlgPlugin.h" |
|
24 #include "GTCMessageDisplayDialog.h" |
|
25 |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CGTCMessageDisplayDialog::CGTCMessageDisplayDialog |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CGTCMessageDisplayDialog::CGTCMessageDisplayDialog( CGtcDialogPlugin* aPlugin ) |
|
32 : CAknMessageQueryDialog( ENoTone ), |
|
33 iPlugin( aPlugin ) |
|
34 { |
|
35 } |
|
36 |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CGTCMessageDisplayDialog::~CGTCMessageDisplayDialog |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CGTCMessageDisplayDialog::~CGTCMessageDisplayDialog() |
|
43 { |
|
44 } |
|
45 |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CGTCMessageDisplayDialog::NewL |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CGTCMessageDisplayDialog* CGTCMessageDisplayDialog::NewL( const TDesC& aMessage, |
|
52 CGtcDialogPlugin* aPlugin ) |
|
53 { |
|
54 CGTCMessageDisplayDialog* self = new( ELeave ) CGTCMessageDisplayDialog( |
|
55 aPlugin ); |
|
56 |
|
57 CleanupStack::PushL( self ); |
|
58 if ( aMessage.Length() ) |
|
59 { |
|
60 self->SetMessageTextL( aMessage ); |
|
61 } |
|
62 |
|
63 CleanupStack::Pop( self ); |
|
64 return self; |
|
65 } |
|
66 |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CGTCMessageDisplayDialog::OkToExitL |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 TBool CGTCMessageDisplayDialog::OkToExitL( TInt aButtonId ) |
|
73 { |
|
74 if ( CAknMessageQueryDialog::OkToExitL( aButtonId ) ) |
|
75 { |
|
76 if ( aButtonId == EAknSoftkeyOk ) |
|
77 { |
|
78 iPlugin->CompleteMessageDisplayL( KErrNone ); |
|
79 } |
|
80 else |
|
81 { |
|
82 // Some cancel. |
|
83 iPlugin->CompleteMessageDisplayL( KErrCancel ); |
|
84 } |
|
85 |
|
86 return( ETrue ); |
|
87 } |
|
88 |
|
89 return( EFalse ); |
|
90 } |
|
91 |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CGTCMessageDisplayDialog::HandleResourceChange |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void CGTCMessageDisplayDialog::HandleResourceChange( TInt aType ) |
|
98 { |
|
99 CAknMessageQueryDialog::HandleResourceChange( aType ); |
|
100 if ( aType == KAknsMessageSkinChange ) |
|
101 { |
|
102 } |
|
103 } |
|
104 |
|
105 |
|
106 // End of File |