aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>1999-07-30 04:42:21 +0800
committerJonathan Blandford <jrb@src.gnome.org>1999-07-30 04:42:21 +0800
commitc9574a3295903db7b3868411545036305a26a692 (patch)
tree4744b2310e21f983782991547df6d1639e1c759a /calendar
parent7b4d44e73d16534d6d4ff8497b363fc7d53fc410 (diff)
downloadgsoc2013-evolution-c9574a3295903db7b3868411545036305a26a692.tar.gz
gsoc2013-evolution-c9574a3295903db7b3868411545036305a26a692.tar.zst
gsoc2013-evolution-c9574a3295903db7b3868411545036305a26a692.zip
Add scrolling to the yearview.
1999-07-29 Jonathan Blandford <jrb@redhat.com> * gnome-cal.c (setup_widgets): Add scrolling to the yearview. svn path=/trunk/; revision=1045
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gnome-cal.c52
-rw-r--r--calendar/gui/gnome-cal.c52
3 files changed, 58 insertions, 50 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index dff89e965e..680ed271cf 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+1999-07-29 Jonathan Blandford <jrb@redhat.com>
+
+ * gnome-cal.c (setup_widgets): Add scrolling to the yearview.
+
1999-07-28 Miguel de Icaza <miguel@gnu.org>
* calendar-pilot-sync.c: (sync_object_to_pilot): If the enddate is
diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c
index 1b6c80e236..21d9b78969 100644
--- a/calendar/gnome-cal.c
+++ b/calendar/gnome-cal.c
@@ -47,7 +47,7 @@ setup_widgets (GnomeCalendar *gcal)
time_t now;
now = time (NULL);
-
+
gcal->notebook = gtk_notebook_new ();
gcal->day_view = gncal_day_panel_new (gcal, now);
gcal->week_view = gncal_week_view_new (gcal, now);
@@ -59,11 +59,13 @@ setup_widgets (GnomeCalendar *gcal)
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (gcal->year_view_sw), gcal->year_view);
+ GTK_LAYOUT (gcal->year_view)->vadjustment->step_increment = 10.0;
+ gtk_adjustment_changed (GTK_ADJUSTMENT (GTK_LAYOUT (gcal->year_view)->vadjustment));
gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->day_view, 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->month_view, gtk_label_new (_("Month View")));
- gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view_sw, gtk_label_new (_("Year View")));
+ gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view_sw, gtk_label_new (_("Year View")));
gtk_widget_show_all (gcal->notebook);
@@ -131,7 +133,7 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction)
{
GtkWidget *cp = get_current_page (gcal);
time_t new_time;
-
+
if (cp == gcal->day_view)
new_time = time_add_day (time_day_begin (gcal->current_display), 1 * direction);
else if (cp == gcal->week_view)
@@ -182,7 +184,7 @@ gnome_calendar_goto_today (GnomeCalendar *gcal)
{
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
+
gnome_calendar_goto (gcal, time (NULL));
}
@@ -194,7 +196,7 @@ gnome_calendar_set_view (GnomeCalendar *gcal, char *page_name)
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
g_return_if_fail (page_name != NULL);
-
+
if (strcmp (page_name, "dayview") == 0)
page = 0;
@@ -213,21 +215,21 @@ gnome_calendar_new (char *title)
GtkWidget *retval;
GnomeCalendar *gcal;
GnomeApp *app;
-
+
retval = gtk_type_new (gnome_calendar_get_type ());
app = GNOME_APP (retval);
gcal = GNOME_CALENDAR (retval);
-
+
app->name = g_strdup ("calendar");
app->prefix = g_strconcat ("/", app->name, "/", NULL);
-
+
gtk_window_set_title(GTK_WINDOW(retval), title);
gcal->current_display = time_day_begin (time (NULL));
gcal->cal = calendar_new (title);
setup_widgets (gcal);
gnome_calendar_create_corba_server (gcal);
-
+
return retval;
}
@@ -248,7 +250,7 @@ gnome_calendar_load (GnomeCalendar *gcal, char *file)
g_return_val_if_fail (gcal != NULL, 0);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), 0);
g_return_val_if_fail (file != NULL, 0);
-
+
if ((r = calendar_load (gcal->cal, file)) != NULL){
printf ("Error loading calendar: %s\n", r);
return 0;
@@ -316,12 +318,12 @@ execute (char *command, int close_standard)
struct sigaction ignore, save_intr, save_quit;
int status = 0, i;
pid_t pid;
-
+
ignore.sa_handler = SIG_IGN;
sigemptyset (&ignore.sa_mask);
ignore.sa_flags = 0;
-
- sigaction (SIGINT, &ignore, &save_intr);
+
+ sigaction (SIGINT, &ignore, &save_intr);
sigaction (SIGQUIT, &ignore, &save_quit);
if ((pid = fork ()) < 0){
@@ -334,16 +336,16 @@ execute (char *command, int close_standard)
const int top = max_open_files ();
sigaction (SIGINT, &save_intr, NULL);
sigaction (SIGQUIT, &save_quit, NULL);
-
+
for (i = (close_standard ? 0 : 3); i < top; i++)
close (i);
-
+
/* FIXME: As an excercise to the reader, copy the
* code from mc to setup shell properly instead of
* /bin/sh. Yes, this comment is larger than a cut and paste.
*/
execl ("/bin/sh", "/bin/sh", "-c", command, (char *) 0);
-
+
_exit (127);
} else {
_exit (127);
@@ -360,7 +362,7 @@ mail_notify (char *mail_address, char *text, time_t app_time)
pid_t pid;
int p [2];
char *command;
-
+
pipe (p);
pid = fork ();
if (pid == 0){
@@ -395,7 +397,7 @@ static gint
start_beeping (gpointer data)
{
gdk_beep ();
-
+
return TRUE;
}
@@ -404,7 +406,7 @@ calendar_notify (time_t time, CalendarAlarm *which, void *data)
{
iCalObject *ico = data;
guint tag;
-
+
if (&ico->aalarm == which){
time_t app = ico->dalarm.trigger + ico->dalarm.offset;
GtkWidget *w;
@@ -461,11 +463,11 @@ mark_gtk_calendar_day (iCalObject *obj, time_t start, time_t end, void *c)
tm_s = *localtime (&start);
day_end = time_day_end (end);
-
+
for (t = start; t <= day_end; t += 60*60*24){
time_t new = mktime (&tm_s);
struct tm tm_day;
-
+
tm_day = *localtime (&new);
gtk_calendar_mark_day (gtk_cal, tm_day.tm_mday);
tm_s.tm_mday++;
@@ -538,14 +540,14 @@ gnome_calendar_colors_changed (GnomeCalendar *gcal)
todo_list_properties_changed (GNCAL_DAY_PANEL (gcal->day_view));
}
-void
-gnome_calendar_todo_properties_changed (GnomeCalendar *gcal)
+void
+gnome_calendar_todo_properties_changed (GnomeCalendar *gcal)
{
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
+
/* FIXME: add day and week view when they are done */
-
+
todo_style_changed = 1;
todo_list_properties_changed (GNCAL_DAY_PANEL (gcal->day_view));
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 1b6c80e236..21d9b78969 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -47,7 +47,7 @@ setup_widgets (GnomeCalendar *gcal)
time_t now;
now = time (NULL);
-
+
gcal->notebook = gtk_notebook_new ();
gcal->day_view = gncal_day_panel_new (gcal, now);
gcal->week_view = gncal_week_view_new (gcal, now);
@@ -59,11 +59,13 @@ setup_widgets (GnomeCalendar *gcal)
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (gcal->year_view_sw), gcal->year_view);
+ GTK_LAYOUT (gcal->year_view)->vadjustment->step_increment = 10.0;
+ gtk_adjustment_changed (GTK_ADJUSTMENT (GTK_LAYOUT (gcal->year_view)->vadjustment));
gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->day_view, 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->month_view, gtk_label_new (_("Month View")));
- gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view_sw, gtk_label_new (_("Year View")));
+ gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view_sw, gtk_label_new (_("Year View")));
gtk_widget_show_all (gcal->notebook);
@@ -131,7 +133,7 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction)
{
GtkWidget *cp = get_current_page (gcal);
time_t new_time;
-
+
if (cp == gcal->day_view)
new_time = time_add_day (time_day_begin (gcal->current_display), 1 * direction);
else if (cp == gcal->week_view)
@@ -182,7 +184,7 @@ gnome_calendar_goto_today (GnomeCalendar *gcal)
{
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
+
gnome_calendar_goto (gcal, time (NULL));
}
@@ -194,7 +196,7 @@ gnome_calendar_set_view (GnomeCalendar *gcal, char *page_name)
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
g_return_if_fail (page_name != NULL);
-
+
if (strcmp (page_name, "dayview") == 0)
page = 0;
@@ -213,21 +215,21 @@ gnome_calendar_new (char *title)
GtkWidget *retval;
GnomeCalendar *gcal;
GnomeApp *app;
-
+
retval = gtk_type_new (gnome_calendar_get_type ());
app = GNOME_APP (retval);
gcal = GNOME_CALENDAR (retval);
-
+
app->name = g_strdup ("calendar");
app->prefix = g_strconcat ("/", app->name, "/", NULL);
-
+
gtk_window_set_title(GTK_WINDOW(retval), title);
gcal->current_display = time_day_begin (time (NULL));
gcal->cal = calendar_new (title);
setup_widgets (gcal);
gnome_calendar_create_corba_server (gcal);
-
+
return retval;
}
@@ -248,7 +250,7 @@ gnome_calendar_load (GnomeCalendar *gcal, char *file)
g_return_val_if_fail (gcal != NULL, 0);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), 0);
g_return_val_if_fail (file != NULL, 0);
-
+
if ((r = calendar_load (gcal->cal, file)) != NULL){
printf ("Error loading calendar: %s\n", r);
return 0;
@@ -316,12 +318,12 @@ execute (char *command, int close_standard)
struct sigaction ignore, save_intr, save_quit;
int status = 0, i;
pid_t pid;
-
+
ignore.sa_handler = SIG_IGN;
sigemptyset (&ignore.sa_mask);
ignore.sa_flags = 0;
-
- sigaction (SIGINT, &ignore, &save_intr);
+
+ sigaction (SIGINT, &ignore, &save_intr);
sigaction (SIGQUIT, &ignore, &save_quit);
if ((pid = fork ()) < 0){
@@ -334,16 +336,16 @@ execute (char *command, int close_standard)
const int top = max_open_files ();
sigaction (SIGINT, &save_intr, NULL);
sigaction (SIGQUIT, &save_quit, NULL);
-
+
for (i = (close_standard ? 0 : 3); i < top; i++)
close (i);
-
+
/* FIXME: As an excercise to the reader, copy the
* code from mc to setup shell properly instead of
* /bin/sh. Yes, this comment is larger than a cut and paste.
*/
execl ("/bin/sh", "/bin/sh", "-c", command, (char *) 0);
-
+
_exit (127);
} else {
_exit (127);
@@ -360,7 +362,7 @@ mail_notify (char *mail_address, char *text, time_t app_time)
pid_t pid;
int p [2];
char *command;
-
+
pipe (p);
pid = fork ();
if (pid == 0){
@@ -395,7 +397,7 @@ static gint
start_beeping (gpointer data)
{
gdk_beep ();
-
+
return TRUE;
}
@@ -404,7 +406,7 @@ calendar_notify (time_t time, CalendarAlarm *which, void *data)
{
iCalObject *ico = data;
guint tag;
-
+
if (&ico->aalarm == which){
time_t app = ico->dalarm.trigger + ico->dalarm.offset;
GtkWidget *w;
@@ -461,11 +463,11 @@ mark_gtk_calendar_day (iCalObject *obj, time_t start, time_t end, void *c)
tm_s = *localtime (&start);
day_end = time_day_end (end);
-
+
for (t = start; t <= day_end; t += 60*60*24){
time_t new = mktime (&tm_s);
struct tm tm_day;
-
+
tm_day = *localtime (&new);
gtk_calendar_mark_day (gtk_cal, tm_day.tm_mday);
tm_s.tm_mday++;
@@ -538,14 +540,14 @@ gnome_calendar_colors_changed (GnomeCalendar *gcal)
todo_list_properties_changed (GNCAL_DAY_PANEL (gcal->day_view));
}
-void
-gnome_calendar_todo_properties_changed (GnomeCalendar *gcal)
+void
+gnome_calendar_todo_properties_changed (GnomeCalendar *gcal)
{
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
+
/* FIXME: add day and week view when they are done */
-
+
todo_style_changed = 1;
todo_list_properties_changed (GNCAL_DAY_PANEL (gcal->day_view));
}
ON, to specify which version ofasami2000-08-036-11/+11 * Update to version 1.4.2kevlo2000-08-028-321/+442 * png library number has bumped from 3 to 4.alex2000-07-191-1/+1 * Correct dependencies.alex2000-07-141-5/+6 * Reorder MASTER_SITES because distfile on MASTER_SITE_SUNSITE appears to besobomax2000-07-131-2/+2 * Update to version 0.99.6.steve2000-07-085-74/+86 * Use the jpeg and png libraries from the port's collection.steve2000-07-082-2/+62 * Update to 4.5.51ade2000-07-063-2/+5 * Update to version 1.12nbm2000-06-304-31/+58 * - USE_XLIB -> USE_X_PREFIXalex2000-06-296-8/+123 * - Use MASTER_SITE_SUNSITE to MASTER_SITESsobomax2000-06-231-3/+3 * - Use MASTER_SITE_AFTERSTEP to MASTER_SITESsobomax2000-06-232-4/+4 * Remove maintainership of most of my ports. I don't really havecpiazza2000-06-211-1/+1 * Add i18n support.will2000-06-171-0/+20 * Add vide, a simple filemanager with vi-like keybindings.will2000-06-107-0/+53 * Fix URL.will2000-06-101-1/+1 * Add X-Files.1x (not sure if the "x" at the end is meant to be a joke or not).asami2000-06-081-0/+1 * Nuke q3dmenu. The port never had been a real aplication, but just a smallsobomax2000-06-051-1/+0 * Adjust for the libgtkgl version bump.sobomax2000-06-021-1/+1 * Say hello to GNOME 1.2ade2000-06-024-5/+14 * Nuke explorer.sobomax2000-05-291-1/+0 * - Use itcl as a dependency instead of itk.steve2000-05-299-2/+140 * Update to version 0.4.3.steve2000-05-284-55/+36 * Update to 4.5.48ade2000-05-245-89/+27 * Update to version 1.5.sobomax2000-05-204-14/+14 * 's|sobomax@altavista.net|sobomax@FreeBSD.org|'sobomax2000-05-171-1/+1 * Upgrade to tkdesk-1.2jseger2000-05-025-47/+70 * Mark BROKEN: Distfile changed with no version update, and the patcheskris2000-04-301-0/+2 * DISTNAMe-related cleanups.asami2000-04-161-1/+1 * Remove LANGPREFIX which is unnecessary thanks to PKGNAMEPREFIX.knu2000-04-131-2/+1 * Fix typocpiazza2000-04-111-1/+1 * Update with the new PORTNAME/PORTVERSION variablescpiazza2000-04-1018-47/+46 * Update to 4.5.44.reg2000-04-082-4/+4 * - Support CFLAGS/CXX/CXXFLAGS/PREFIX/X11BASE properlyjedgar2000-04-013-50/+137 * Remove andy@icc.surw.chel.su as maintainer from his ports..he doesn'tkris2000-03-293-3/+3 * Update to 4.5.43.reg2000-03-265-8/+46 * Fix for new compiler in -current.steve2000-02-275-0/+100 * Update port to 4.2.1jedgar2000-02-186-43/+67 * Maxim has already done this work.nakai2000-02-151-1/+1 * Add fsv.nakai2000-02-131-0/+1 * Initial import.nakai2000-02-136-0/+86 * Fix problem with gmc (aka corba-mc) leaving zombiesade2000-02-071-0/+20 * Standardize my e-mail as reg@FreeBSD.org.reg2000-01-301-1/+1 * Update to version 1.3.steve2000-01-304-12/+20 * Update port to 0.24jedgar2000-01-282-5/+3 * Add mfm.cpiazza2000-01-2211-0/+71 * Move xcruise port from x11 to x11-fm category.imura2000-01-187-0/+49 * Update to 4.5.42nakai1999-12-244-5/+7 * Update to version 1.07cpiazza1999-12-052-5/+5 * New location on MASTER_SITE.steve1999-12-051-1/+1 * Update to use Tcl/Tk version 8.2.steve1999-11-293-6/+6 * Update to 4.5.41nakai1999-11-093-8/+8 * Switch to tcl/tk 8.2jseger1999-11-024-6/+6 * Update to version 2.00b1.steve1999-11-014-9/+16 * PR: ports/14303nakai1999-10-145-24/+46 * Bump imlib shlib version.asami1999-10-101-1/+1 * Activate endeavourcpiazza1999-10-081-0/+1 * Endeavour is a graphical file manager and image viewercpiazza1999-10-0819-0/+246