equal
deleted
inserted
replaced
89 bool btEnabledInOffline = false; |
89 bool btEnabledInOffline = false; |
90 if (checkOfflineMode(btEnabledInOffline)){ // offline mode is active |
90 if (checkOfflineMode(btEnabledInOffline)){ // offline mode is active |
91 if (btEnabledInOffline){ |
91 if (btEnabledInOffline){ |
92 // BT is allowed to be enabled in offline mode, show query. |
92 // BT is allowed to be enabled in offline mode, show query. |
93 HbMessageBox::question( hbTrId("txt_bt_info_trun_bluetooth_on_ini_offline_mode" ),this, |
93 HbMessageBox::question( hbTrId("txt_bt_info_trun_bluetooth_on_ini_offline_mode" ),this, |
94 SLOT(btOnQuestionClose(HbAction*))); |
94 SLOT(btOnQuestionClose(int)), HbMessageBox::Yes | HbMessageBox::No ); |
95 |
95 |
96 } |
96 } |
97 else{ |
97 else{ |
98 //if BT is not allowed to be enabled in offline mode, show message and complete |
98 //if BT is not allowed to be enabled in offline mode, show message and complete |
99 HbMessageBox::warning( hbTrId("txt_bt_info_bluetooth_not_allowed_to_be_turned_on" ),this, |
99 HbMessageBox::warning( hbTrId("txt_bt_info_bluetooth_not_allowed_to_be_turned_on" ),this, |
111 emit commandCompleted(KErrGeneral); |
111 emit commandCompleted(KErrGeneral); |
112 } |
112 } |
113 |
113 |
114 } |
114 } |
115 |
115 |
116 void BtDelegatePower::btOnQuestionClose(HbAction *action) |
116 void BtDelegatePower::btOnQuestionClose(int action) |
117 { |
117 { |
118 HbMessageBox *dlg = static_cast<HbMessageBox*>(sender()); |
|
119 int err = 0; |
118 int err = 0; |
120 if(action == dlg->actions().at(0)) |
119 if(action == HbMessageBox::Yes) |
121 { |
120 { |
122 //user chooses "yes" for using BT in offline |
121 //user chooses "yes" for using BT in offline |
123 mActiveHandling = true; |
122 mActiveHandling = true; |
124 err = mBtengSettings->SetPowerState(EBTPowerOn); |
123 err = mBtengSettings->SetPowerState(EBTPowerOn); |
125 } |
124 } |