2 * Copyright (C) 2012 Collabora Ltd.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 * Authors: Danielle Madeley <danielle.madeley@collabora.co.uk>
23 #include <tp-account-widgets/tpaw-calendar-button.h>
26 date_changed_cb (TpawCalendarButton
*button
,
32 g_print ("date changed: none\n");
38 g_date_strftime (buffer
, 128, "%x", date
);
39 g_print ("date changed: %s\n", buffer
);
47 GtkWidget
*win
, *button
;
50 gtk_init (&argc
, &argv
);
52 win
= gtk_window_new (GTK_WINDOW_TOPLEVEL
);
54 g_signal_connect_swapped (win
, "destroy",
55 G_CALLBACK (gtk_main_quit
), NULL
);
57 button
= tpaw_calendar_button_new ();
59 date
= g_date_new_dmy (30, 11, 1984);
60 tpaw_calendar_button_set_date (TPAW_CALENDAR_BUTTON (button
), date
);
63 g_signal_connect (button
, "date-changed",
64 G_CALLBACK (date_changed_cb
), NULL
);
66 gtk_container_add (GTK_CONTAINER (win
), button
);
67 gtk_widget_show_all (win
);