aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gnome-cal.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-08 03:01:42 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-08 03:01:42 +0800
commitb5a61327da495147f0a45b4a9f6ee3a77687eeab (patch)
treec982108602c3bda5e204f1c4557a400cf96e00d0 /calendar/gnome-cal.c
parenteaba896a148c812a3744805bcfb56b09753bc896 (diff)
downloadgsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar.gz
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar.bz2
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar.lz
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar.xz
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.tar.zst
gsoc2013-evolution-b5a61327da495147f0a45b4a9f6ee3a77687eeab.zip
More work in progress, wheeeee - Federico
svn path=/trunk/; revision=109
Diffstat (limited to 'calendar/gnome-cal.c')
-rw-r--r--calendar/gnome-cal.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c
index 6e6c17ed21..b202422e2d 100644
--- a/calendar/gnome-cal.c
+++ b/calendar/gnome-cal.c
@@ -10,6 +10,7 @@
#include "gnome-cal.h"
#include "gncal-full-day.h"
#include "gncal-week-view.h"
+#include "timeutil.h"
#include "views.h"
static void gnome_calendar_init (GnomeCalendar *gcal);
@@ -40,21 +41,23 @@ static void
setup_widgets (GnomeCalendar *gcal)
{
time_t now;
+ GtkWidget *sw;
now = time (NULL);
gcal->notebook = gtk_notebook_new ();
- gcal->day_view = day_view_create (gcal);
+ gcal->day_view = day_view_create (gcal);
gcal->week_view = gncal_week_view_new (gcal, now);
gcal->year_view = year_view_create (gcal);
gcal->task_view = tasks_create (gcal);
- if (0)
+ if (1)
{
struct tm tm;
time_t a, b;
tm = *localtime (&now);
+/* tm.tm_mday = 2; */
tm.tm_hour = 0;
tm.tm_min = 0;
tm.tm_sec = 0;
@@ -66,9 +69,16 @@ setup_widgets (GnomeCalendar *gcal)
b = mktime (&tm);
gcal->day_view = gncal_full_day_new (gcal, a, b);
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_container_add (GTK_CONTAINER (sw), gcal->day_view);
+ gtk_widget_show (gcal->day_view);
}
- gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->day_view, gtk_label_new (_("Day View")));
+ gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), sw, gtk_label_new (_("Day View")));
gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->week_view, gtk_label_new (_("Week View")));
gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view, gtk_label_new (_("Year View")));
gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->task_view, gtk_label_new (_("Todo")));
@@ -83,6 +93,9 @@ static void
gnome_calendar_init(GnomeCalendar *gcal)
{
gcal->cal = 0;
+ gcal->day_view = 0;
+ gcal->week_view = 0;
+ gcal->event_editor = 0;
setup_widgets (gcal);
}
@@ -164,6 +177,7 @@ gnome_calendar_new (char *title)
void
gnome_calendar_update_all (GnomeCalendar *cal)
{
+ gncal_full_day_update (GNCAL_FULL_DAY (cal->day_view));
gncal_week_view_update (GNCAL_WEEK_VIEW (cal->week_view));
}