* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <config.h>
+#include "config.h"
#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
g_hash_table_replace (data->details_table, key, detail);
}
-static G_CONST_RETURN gchar*
+static gchar*
calendar_get_detail (CalendarData *data,
guint year,
guint month,
detail = g_hash_table_lookup (data->details_table, key);
g_free (key);
- return detail;
+ return (detail ? g_strdup (detail) : NULL);
}
static void
calendar_update_details (CalendarData *data)
{
guint year, month, day;
- const gchar *detail;
+ gchar *detail;
gtk_calendar_get_date (GTK_CALENDAR (data->calendar_widget), &year, &month, &day);
detail = calendar_get_detail (data, year, month, day);
g_signal_handler_block (data->details_buffer, data->details_changed);
gtk_text_buffer_set_text (data->details_buffer, detail ? detail : "", -1);
g_signal_handler_unblock (data->details_buffer, data->details_changed);
+
+ g_free (detail);
}
static void
}
}
-static G_CONST_RETURN gchar*
+static gchar*
calendar_detail_cb (GtkCalendar *calendar,
guint year,
guint month,
gtk_container_add (GTK_CONTAINER (window), vbox);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 0);