~ubuntu-branches/ubuntu/quantal/xdaliclock/quantal

« back to all changes in this revision

Viewing changes to gtk/xdaliclock.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-04-20 08:42:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100420084220-j7ykvh34b2jx7hyv
Tags: 2.31-1
* New maintainer (Closes: #561233)
* New upstream release (Closes: #578379)
* debian/control:
  + Updated to Standards-Version 3.8.4
  + Added ${misc:Depends} to Depends
  + Updated debhelper dependency to 7
* debian/rules:
  + Do not do append to copyright file trick
  + Used dh_prep instead of dh_clean -k
* Converted package to new source format 3.0 (quilt)
* debian/copyright:
  + Added missing vroot.h copyright
  + Better copyright assignment, year for Author
* debian/patches/spelling-error-in-manpage_xdaliclock:
  + Added patch to fix manpage spelling mistake by Florian Ernst
    <florian@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* xdaliclock - a melting digital clock
2
 
 * Copyright (c) 1991-2003 Jamie Zawinski <jwz@jwz.org>
 
2
 * Copyright (c) 1991-2010 Jamie Zawinski <jwz@jwz.org>
3
3
 *
4
4
 * Permission to use, copy, modify, distribute, and sell this software and its
5
5
 * documentation for any purpose is hereby granted without fee, provided that
293
293
      render_reset (cd);
294
294
    }
295
295
 
296
 
  {
297
 
    struct timeval now;
298
 
# ifdef GETTIMEOFDAY_TWO_ARGS
299
 
    struct timezone tzp;
300
 
    gettimeofday(&now, &tzp);
301
 
# else
302
 
    gettimeofday(&now);
303
 
# endif
304
 
 
305
 
    render_once (&cd->config, now.tv_sec, now.tv_usec);
306
 
  }
307
 
 
 
296
  render_once (&cd->config);
308
297
  draw_image (cd, TRUE);
309
298
 
310
299
 END:
355
344
  gtk_widget_show (config);
356
345
}
357
346
 
 
347
static int
 
348
date_off_timer (gpointer data)
 
349
{
 
350
  clock_data *cd = (clock_data *) data;
 
351
  cd->config.display_date_p = 0;
 
352
  return FALSE;  /* do not re-execute timer */
 
353
}
 
354
 
 
355
 
 
356
 
358
357
gboolean
359
358
on_drawingarea_button_press_event (GtkWidget *widget,
360
359
                                   GdkEventButton *event,
387
386
  switch (event->button)
388
387
    {
389
388
    case 1:
390
 
      cd->config.display_date_p = 0;
 
389
      /* Switch from date back to time 2 secs after mouse released */
 
390
      gtk_timeout_add (2 * 1000, date_off_timer, (gpointer) cd);
391
391
      break;
392
392
    case 3:
393
393
      popup_config_dialog (widget);
628
628
  cd->config.cycle_p        = 1;
629
629
  cd->config.transparent_p  = 0;
630
630
  cd->config.max_fps        = 15;
 
631
  cd->config.max_fps        = 15;
631
632
}
632
633
 
633
634
static void