~ubuntu-branches/debian/sid/alarm-clock/sid

« back to all changes in this revision

Viewing changes to src/alarm_thread.c

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-08-02 01:40:45 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090802014045-9298ztc2yucmfw7j
* New Upstream Version
  - fixes simple counters (Closes: #537791)
* patch to fix the autostart exec path (Closes: #537793)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        gchar *date = g_key_file_get_string(loaded_alarms, name, "DateTime", NULL);
82
82
        
83
83
        if (g_strcmp0(date, current_date) == 0) ret = TRUE;
84
 
        
 
84
 
85
85
        g_free(date);
86
 
 
87
 
        if (timeinfo->tm_sec != 0) ret = FALSE;
88
86
        return ret;
89
87
}
90
88
 
292
290
                snoozed = g_key_file_get_boolean(loaded_alarms, alarms[count], "Snoozed", NULL);
293
291
                
294
292
                if (g_strcmp0(alarm_type, "Single") == 0 || g_strcmp0(alarm_type, "Counter") == 0)
 
293
                {
295
294
                        iso_date = g_key_file_get_string(loaded_alarms, alarms[count], "DateTime", NULL);
 
295
                }
296
296
                else if (g_strcmp0(alarm_type, "Schedule") == 0)
 
297
                {
297
298
                        iso_date = get_iso_date_from_scheduled(alarms[count]);
 
299
                }
298
300
                else
 
301
                {
 
302
 
299
303
                        return;
 
304
                }
 
305
                
300
306
                
301
307
                g_time_val_from_iso8601(iso_date, &alarm_time);
302
308
                g_free(iso_date);
379
385
{
380
386
        gchar *type = g_key_file_get_string(loaded_alarms, name, "AlarmType", NULL);
381
387
        gboolean snooze = g_key_file_get_boolean(loaded_alarms, name, "snoozed", NULL);
382
 
        gboolean single = FALSE;
 
388
        gboolean single = TRUE;
383
389
 
384
 
        if (g_strcmp0(type, "Single") == 0) single = TRUE;
385
390
        if (g_strcmp0(type, "Schedule") == 0) single = FALSE;
386
391
        if (snooze)  snooze = FALSE;
387
392
 
446
451
        while(TRUE)
447
452
        {       
448
453
                if (alarms[count] == NULL) break;
449
 
 
 
454
                
450
455
                if (check_play_alarm(alarms[count], date_string->str))
451
456
                {
452
457
                        gdk_threads_enter();
466
471
                if (diff < 0)
467
472
                {
468
473
                        manage_old_alarm(alarms[count]);
469
 
                        break;
470
474
                }
471
475
 
472
476
                count++;        
510
514
        iso_date = g_strdup_printf("%i-%s-%s", timeinfo->tm_year + 1900, month, day);
511
515
 
512
516
        birthdays_key = g_key_file_new();
513
 
 
514
517
        g_key_file_load_from_file(birthdays_key, config_birthdays, G_KEY_FILE_NONE, NULL);
515
 
 
516
518
        birthdays = g_key_file_get_groups(birthdays_key, NULL);
517
 
 
518
519
        
519
520
        while (TRUE)
520
521
        {