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 General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Authors: Danielle Madeley <danielle.madeley@collabora.co.uk>
24 #include "libempathy-gtk/empathy-calendar-button.h"
27 date_changed_cb (EmpathyCalendarButton *button,
33 g_print ("date changed: none\n");
39 g_date_strftime (buffer, 128, "%x", date);
40 g_print ("date changed: %s\n", buffer);
48 GtkWidget *win, *button;
51 gtk_init (&argc, &argv);
53 win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
55 g_signal_connect_swapped (win, "destroy",
56 G_CALLBACK (gtk_main_quit), NULL);
58 button = empathy_calendar_button_new ();
60 date = g_date_new_dmy (30, 11, 1984);
61 empathy_calendar_button_set_date (EMPATHY_CALENDAR_BUTTON (button), date);
64 g_signal_connect (button, "date-changed",
65 G_CALLBACK (date_changed_cb), NULL);
67 gtk_container_add (GTK_CONTAINER (win), button);
68 gtk_widget_show_all (win);