[maemo-developers] libalarm-dev: Some UI Related Questions
From: Matus Uzak matus.uzak at ixonos.comDate: Mon Jan 25 21:01:22 EET 2010
- Previous message: How to remove / rename a package in the devel repository?
- Next message: Where have the diablo/chinook promoters gone?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I'm playing with libalarm actually and I would like to ask some questions: 1. What's the preferred way to display the alarm dialog, using the "system ui dialog service", or to do it by MyApp? Let's check the code. Common stuff: ============== cookie_t cookie = 0; alarm_event_t *eve = 0; alarm_action_t *act = 0; eve = alarm_event_create(); eve->alarm_time = time(0) + 5; alarm_event_set_alarm_appid(eve, APPID); Using "system ui dialog service": ================================= alarm_event_set_title(eve, "TestAlarm"); alarm_event_set_message(eve, "TestAlarm Message"); alarm_event_set_icon(eve, "MyIcon.png"); act = alarm_event_add_actions(eve, 1); act->flags = ALARM_ACTION_TYPE_EXEC | ALARM_ACTION_WHEN_RESPONDED; alarm_action_set_label(act, "MyApp"); alarm_action_set_exec_command(act, "MyApp"); /* Add stop button action */ act = alarm_event_add_actions(eve, 1); alarm_action_set_label(act, "Stop"); act->flags |= ALARM_ACTION_WHEN_RESPONDED; act->flags |= ALARM_ACTION_TYPE_NOP; /* Add snooze button action */ act = alarm_event_add_actions(eve, 1); alarm_action_set_label(act, "Snooze"); act->flags |= ALARM_ACTION_WHEN_RESPONDED; act->flags |= ALARM_ACTION_TYPE_SNOOZE; Using MyApp: ============ act = alarm_event_add_actions(eve, 1); act->flags = ALARM_ACTION_TYPE_EXEC | ALARM_ACTION_WHEN_TRIGGERED; alarm_action_set_exec_command(act, "MyApp p1 p2"); 2. I would like to use the first approach to have the native layout, but I have no idea how the "title" and "icon" variables are used by the "ui dialog service". Is there any specification for the icon? Thanks for help! br, matus
- Previous message: How to remove / rename a package in the devel repository?
- Next message: Where have the diablo/chinook promoters gone?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]