~renatofilho/telephony-service/fix-phone-number-field-cursor

« back to all changes in this revision

Viewing changes to indicator/textchannelobserver.cpp

  • Committer: CI bot
  • Author(s): Tiago Salem Herrmann
  • Date: 2014-06-13 18:31:21 UTC
  • mfrom: (827.1.1 telephony-service)
  • Revision ID: ps-jenkins@lists.canonical.com-20140613183121-ool2estbpay9tgik
Delete notifications from mNotifications when actions are performed. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    QString eventId;
58
58
    QString alias;
59
59
    QString message;
 
60
    QMap<NotifyNotification*, NotificationData*> *notificationList;
60
61
};
61
62
 
 
63
void notification_closed(NotifyNotification *notification, QMap<NotifyNotification*, NotificationData*> *map);
 
64
 
62
65
void flash_notification_action(NotifyNotification* notification, char *action, gpointer data)
63
66
{
64
67
    GError *error = NULL;
101
104
    if (notificationData != NULL) {
102
105
        // launch the messaging-app to show the message
103
106
        ApplicationUtils::openUrl(QString("message:///%1").arg(QString(QUrl::toPercentEncoding(notificationData->phoneNumber))));
 
107
        notification_closed(notification, notificationData->notificationList);
104
108
    }
105
109
    g_object_unref(notification);
106
110
}
213
217
    data->phoneNumber = contact->id();
214
218
    data->alias = contact->alias();
215
219
    data->message = message.text();
 
220
    data->notificationList = &mNotifications;
216
221
    mNotifications.insert(notification, data);
217
222
 
218
223
    // add the callback action