aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/main.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-04 10:44:29 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-04 10:44:29 +0800
commitf4295ffe09c2994a93eff4d4c73505f2bc291a59 (patch)
treeea15367750bae25c44a3fa79d241f5fb43ebad54 /calendar/main.c
parent1be7718e7d14edf3b4501de53fd600af1a53a156 (diff)
downloadgsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar.gz
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar.bz2
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar.lz
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar.xz
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.tar.zst
gsoc2013-evolution-f4295ffe09c2994a93eff4d4c73505f2bc291a59.zip
Lots -mig
svn path=/trunk/; revision=103
Diffstat (limited to 'calendar/main.c')
-rw-r--r--calendar/main.c41
1 files changed, 34 insertions, 7 deletions
diff --git a/calendar/main.c b/calendar/main.c
index 54fdbaaa2b..eb272c1246 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -57,10 +57,13 @@ init_username (void)
int
range_check_hour (int hour)
{
+ struct tm tm;
+
if (hour < 0)
hour = 0;
if (hour > 24)
hour = 23;
+
return hour;
}
@@ -122,10 +125,7 @@ about_calendar_cmd (GtkWidget *widget, void *data)
void
display_objedit (GtkWidget *widget, GnomeCalendar *gcal)
{
- if (!gcal->event_editor){
- gcal->event_editor = event_editor_new (NULL);
- gtk_widget_show (gcal->event_editor);
- }
+ event_editor_new (gcal, NULL);
}
void
@@ -151,6 +151,33 @@ close_cmd (GtkWidget *widget, GnomeCalendar *gcal)
gtk_main_quit ();
}
+static GtkWidget *
+get_current_page (GnomeCalendar *gcal)
+{
+ return GTK_NOTEBOOK (gcal->notebook)->cur_page->child;
+}
+
+void
+previous_clicked (GtkWidget *widget, GnomeCalendar *gcal)
+{
+ GtkWidget *current_page = get_current_page (gcal);
+
+ if (current_page == gcal->week_view){
+ }
+}
+
+void
+next_clicked (GtkWidget *widget, GnomeCalendar *gcal)
+{
+ GtkWidget *current_page = get_current_page (gcal);
+}
+
+void
+today_clicked (GtkWidget *widget, GnomeCalendar *gcal)
+{
+ GtkWidget *current_page = get_current_page (gcal);
+}
+
GnomeUIInfo gnome_cal_file_menu [] = {
{ GNOME_APP_UI_ITEM, N_("New calendar"), NULL, new_calendar_cmd },
@@ -190,13 +217,13 @@ GnomeUIInfo gnome_cal_menu [] = {
};
GnomeUIInfo gnome_toolbar [] = {
- { GNOME_APP_UI_ITEM, N_("Prev"), N_("Previous"), /*previous_clicked*/0, 0, 0,
+ { GNOME_APP_UI_ITEM, N_("Prev"), N_("Previous"), previous_clicked, 0, 0,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BACK },
- { GNOME_APP_UI_ITEM, N_("Today"), N_("Today"), /*previous_clicked*/0, 0, 0,
+ { GNOME_APP_UI_ITEM, N_("Today"), N_("Today"), today_clicked, 0, 0,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BACK },
- { GNOME_APP_UI_ITEM, N_("Next"), N_("Next"), /*previous_clicked*/0, 0, 0,
+ { GNOME_APP_UI_ITEM, N_("Next"), N_("Next"), next_clicked, 0, 0,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_FORWARD },
GNOMEUIINFO_END