aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/main.c')
-rw-r--r--calendar/gui/main.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 08bb61fb8b..6075cc0f7d 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -32,6 +32,9 @@ int day_begin, day_end;
/* Number of calendars active */
int active_calendars = 0;
+/* A list of all of the calendars started */
+GList *all_calendars = NULL;
+
void
init_username (void)
{
@@ -90,21 +93,6 @@ init_calendar (void)
}
void
-new_calendar_cmd (GtkWidget *widget, void *data)
-{
-}
-
-void
-open_calendar_cmd (GtkWidget *widget, void *data)
-{
-}
-
-void
-save_calendar_cmd (GtkWidget *widget, void *data)
-{
-}
-
-void
about_calendar_cmd (GtkWidget *widget, void *data)
{
GtkWidget *about;
@@ -170,6 +158,26 @@ today_clicked (GtkWidget *widget, GnomeCalendar *gcal)
gnome_calendar_goto (gcal, time (NULL));
}
+void
+new_calendar_cmd (GtkWidget *widget, void *data)
+{
+}
+
+void
+open_calendar_cmd (GtkWidget *widget, void *data)
+{
+ GtkWidget *filesel;
+
+ filesel = gtk_file_selection_new (_("Open Calendar"));
+ gtk_widget_show (filesel);
+
+}
+
+void
+save_calendar_cmd (GtkWidget *widget, void *data)
+{
+}
+
GnomeUIInfo gnome_cal_file_menu [] = {
{ GNOME_APP_UI_ITEM, N_("New calendar"), NULL, new_calendar_cmd },
@@ -238,6 +246,7 @@ new_calendar (char *full_name, char *calendar_file)
title = g_copy_strings (full_name, "'s calendar", NULL);
toplevel = gnome_calendar_new (title);
+ g_free (title);
setup_menu (toplevel);
if (g_file_exists (calendar_file)){
@@ -248,7 +257,7 @@ new_calendar (char *full_name, char *calendar_file)
gnome_calendar_load (GNOME_CALENDAR (toplevel), "./test.vcf");
}
active_calendars++;
-
+ all_calendars = g_list_prepend (all_calendars, toplevel);
gtk_widget_show (toplevel);
}