|
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 // INCLUDE FILES |
|
20 #include "GtcNotifDlgPlugin.h" |
|
21 #include "GTCMessageDisplayDialog.h" |
|
22 |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // CGTCMessageDisplayDialog::CGTCMessageDisplayDialog |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 CGTCMessageDisplayDialog::CGTCMessageDisplayDialog( CGtcDialogPlugin* aPlugin ) |
|
29 : CAknMessageQueryDialog( ENoTone ), |
|
30 iPlugin( aPlugin ) |
|
31 { |
|
32 } |
|
33 |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CGTCMessageDisplayDialog::~CGTCMessageDisplayDialog |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 CGTCMessageDisplayDialog::~CGTCMessageDisplayDialog() |
|
40 { |
|
41 } |
|
42 |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CGTCMessageDisplayDialog::NewL |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 CGTCMessageDisplayDialog* CGTCMessageDisplayDialog::NewL( const TDesC& aMessage, |
|
49 CGtcDialogPlugin* aPlugin ) |
|
50 { |
|
51 CGTCMessageDisplayDialog* self = new( ELeave ) CGTCMessageDisplayDialog( |
|
52 aPlugin ); |
|
53 |
|
54 CleanupStack::PushL( self ); |
|
55 if ( aMessage.Length() ) |
|
56 { |
|
57 self->SetMessageTextL( aMessage ); |
|
58 } |
|
59 |
|
60 CleanupStack::Pop( self ); |
|
61 return self; |
|
62 } |
|
63 |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CGTCMessageDisplayDialog::OkToExitL |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 TBool CGTCMessageDisplayDialog::OkToExitL( TInt aButtonId ) |
|
70 { |
|
71 if ( CAknMessageQueryDialog::OkToExitL( aButtonId ) ) |
|
72 { |
|
73 if ( aButtonId == EAknSoftkeyOk ) |
|
74 { |
|
75 iPlugin->CompleteMessageDisplayL( KErrNone ); |
|
76 } |
|
77 else |
|
78 { |
|
79 // Some cancel. |
|
80 iPlugin->CompleteMessageDisplayL( KErrCancel ); |
|
81 } |
|
82 |
|
83 return( ETrue ); |
|
84 } |
|
85 |
|
86 return( EFalse ); |
|
87 } |
|
88 |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CGTCMessageDisplayDialog::HandleResourceChange |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CGTCMessageDisplayDialog::HandleResourceChange( TInt aType ) |
|
95 { |
|
96 CAknMessageQueryDialog::HandleResourceChange( aType ); |
|
97 if ( aType == KAknsMessageSkinChange ) |
|
98 { |
|
99 } |
|
100 } |
|
101 |
|
102 |
|
103 // End of File |