Changeset 6831c6a for src/alarm/alarm.cpp
- Timestamp:
- 02/01/10 14:05:49 (13 years ago)
- Branches:
- master, qt5
- Children:
- 927eac4
- Parents:
- 8c4d4f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/alarm/alarm.cpp
r8c4d4f7 r6831c6a 5 5 #include <QApplication> 6 6 #include <QDir> 7 #include <QDebug> 8 9 #include <dbus-1.0/dbus/dbus-protocol.h> 7 10 8 11 int Alarm::addAlarm(int aEventId, const QDateTime &aDateTime) … … 17 20 18 21 /* for Deleting purposes */ 19 alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data()); 22 alarm_event_set_message(eve, QString::number(aEventId).toLocal8Bit().data()); 20 23 21 24 /* Use absolute time triggering */ 22 25 eve->alarm_time = time(0) + 5; //aDateTime.toTime_t(); 23 26 eve->flags = ALARM_EVENT_BOOT; 24 25 QString command = QDir::currentPath() + "/" + *qApp->argv() +26 QString(" %1").arg(QString::number(aEventId));27 27 28 28 /* Add exec command action */ … … 33 33 act->flags |= ALARM_ACTION_WHEN_RESPONDED; 34 34 act->flags |= ALARM_ACTION_TYPE_DBUS; 35 36 // DBus params for this action 37 alarm_action_set_dbus_interface(act, "org.f reedesktop.Notifications");38 alarm_action_set_dbus_service(act, "org.f reedesktop.Notifications");39 alarm_action_set_dbus_path(act, "/ org/freedesktop/Notifications");40 alarm_action_set_dbus_name(act, " SystemNoteDialog");41 35 36 // DBus params for this action 37 alarm_action_set_dbus_interface(act, "org.fosdem.schedule.AlarmInterface"); 38 alarm_action_set_dbus_service(act, "org.fosdem.schedule"); 39 alarm_action_set_dbus_path(act, "/Fosdem"); 40 alarm_action_set_dbus_name(act, "Alarm"); 41 42 42 // DBus arguments for the action 43 alarm_action_set_dbus_args(act, aEventId);43 alarm_action_set_dbus_args(act, DBUS_TYPE_INT32, &aEventId, DBUS_TYPE_INVALID); 44 44 45 45 // act->flags |= ALARM_ACTION_TYPE_EXEC; … … 47 47 // alarm_event_set_icon(eve, "fosdem"); 48 48 // alarm_event_set_title(eve, "FOSDEM'10"); 49 // adds assigned cookie at the end of command string 50 // act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; 49 // adds assigned cookie at the end of command string 50 // act->flags |= ALARM_ACTION_EXEC_ADD_COOKIE; 51 51 52 52 /* Add stop button action */ … … 56 56 act->flags |= ALARM_ACTION_WHEN_RESPONDED; 57 57 act->flags |= ALARM_ACTION_TYPE_NOP; 58 58 59 59 /* Add snooze button action */ 60 60 act = alarm_event_add_actions(eve, 1);
Note: See TracChangeset
for help on using the changeset viewer.