aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/prop.c
diff options
context:
space:
mode:
authorRussell Steinthal <steintr@src.gnome.org>1999-11-22 16:04:07 +0800
committerRussell Steinthal <steintr@src.gnome.org>1999-11-22 16:04:07 +0800
commitc895e6eefa4a1f08c619e180973c3ec54b1beda0 (patch)
tree949f274850f27f93f25b6080d7c85bf733777b1b /calendar/prop.c
parent34bf395023e2886dd67e7cdab368c37a7bb2d727 (diff)
downloadgsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar.gz
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar.bz2
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar.lz
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar.xz
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.tar.zst
gsoc2013-evolution-c895e6eefa4a1f08c619e180973c3ec54b1beda0.zip
Merged Rusty's last todo list coloring patch from stable to HEAD.
svn path=/trunk/; revision=1429
Diffstat (limited to 'calendar/prop.c')
-rw-r--r--calendar/prop.c78
1 files changed, 57 insertions, 21 deletions
diff --git a/calendar/prop.c b/calendar/prop.c
index b1fa468010..29b4f527f6 100644
--- a/calendar/prop.c
+++ b/calendar/prop.c
@@ -45,7 +45,13 @@ static GnomeCanvasItem *month_item;
/* Widgets for the todo page */
static GtkWidget *due_date_show_button;
-static GtkWidget *due_date_overdue_highlight;
+
+static GtkWidget *todo_item_time_remaining_show_button;
+
+static GtkWidget *todo_item_highlight_overdue;
+static GtkWidget *todo_item_highlight_not_due_yet;
+static GtkWidget *todo_item_highlight_due_today;
+
static GtkWidget *priority_show_button;
/* Widgets for the alarm page */
@@ -133,13 +139,24 @@ static void
prop_apply_todo(void)
{
todo_show_due_date = GTK_TOGGLE_BUTTON (due_date_show_button)->active;
- todo_due_date_overdue_highlight = GTK_TOGGLE_BUTTON (due_date_overdue_highlight)->active;
+
+ todo_item_dstatus_highlight_overdue = GTK_TOGGLE_BUTTON(todo_item_highlight_overdue)->active;
+ todo_item_dstatus_highlight_not_due_yet = GTK_TOGGLE_BUTTON(todo_item_highlight_not_due_yet)->active;
+ todo_item_dstatus_highlight_due_today = GTK_TOGGLE_BUTTON(todo_item_highlight_due_today)->active;
todo_show_priority = GTK_TOGGLE_BUTTON (priority_show_button)->active;
+ todo_show_time_remaining = GTK_TOGGLE_BUTTON (todo_item_time_remaining_show_button)->active;
+
/* storing the values */
+
+ gnome_config_set_bool("/calendar/Todo/show_time_remain", todo_show_time_remaining);
+ gnome_config_set_bool("/calendar/Todo/highlight_overdue", todo_item_dstatus_highlight_overdue);
+
+ gnome_config_set_bool("/calendar/Todo/highlight_due_today", todo_item_dstatus_highlight_due_today);
+
+ gnome_config_set_bool("/calendar/Todo/highlight_not_due_yet", todo_item_dstatus_highlight_not_due_yet);
gnome_config_set_bool("/calendar/Todo/show_due_date", todo_show_due_date);
- gnome_config_set_bool("/calendar/Todo/highlight_overdue_tasks", todo_due_date_overdue_highlight);
gnome_config_set_bool("/calendar/Todo/show_priority", todo_show_priority);
/* need to sync our config changes. */
gnome_config_sync ();
@@ -496,7 +513,7 @@ create_colors_page (void)
GtkWidget *w;
int i;
- frame = gtk_frame_new (_("Colors for months"));
+ frame = gtk_frame_new (_("Colors for display"));
gtk_container_set_border_width (GTK_CONTAINER (frame), GNOME_PAD_SMALL);
gnome_property_box_append_page (GNOME_PROPERTY_BOX (prop_win), frame,
gtk_label_new (_("Colors")));
@@ -557,15 +574,8 @@ create_colors_page (void)
static void
set_todo_page_options(void)
{
- if(!GTK_TOGGLE_BUTTON (due_date_show_button)->active) {
- /* disable everything */
- gtk_widget_set_sensitive(due_date_overdue_highlight,0);
- }
- else
- {
- gtk_widget_set_sensitive(due_date_overdue_highlight,1);
- }
-
+
+
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -588,17 +598,25 @@ build_list_options_frame(void)
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (frame), vbox);
- due_date_show_button = gtk_check_button_new_with_label (_("Summary"));
due_date_show_button = gtk_check_button_new_with_label (_("Due Date"));
priority_show_button = gtk_check_button_new_with_label (_("Priority"));
-
+ todo_item_time_remaining_show_button = gtk_check_button_new_with_label (_("Time Until Due"));
+
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(due_date_show_button), todo_show_due_date);
gtk_signal_connect (GTK_OBJECT(due_date_show_button),
"clicked",
(GtkSignalFunc) todo_option_set,
NULL);
gtk_box_pack_start (GTK_BOX (vbox), due_date_show_button, FALSE, FALSE, 0);
-
+
+ gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_time_remaining_show_button), todo_show_time_remaining);
+ gtk_signal_connect (GTK_OBJECT(todo_item_time_remaining_show_button),
+ "clicked",
+ (GtkSignalFunc) todo_option_set,
+ NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), todo_item_time_remaining_show_button, FALSE, FALSE, 0);
+
+
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(priority_show_button), todo_show_priority);
gtk_signal_connect (GTK_OBJECT(priority_show_button),
"clicked",
@@ -618,14 +636,32 @@ build_style_list_options_frame(void)
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (frame), vbox);
- due_date_overdue_highlight = gtk_check_button_new_with_label (_("Highlight overdue items"));
-
- gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(due_date_overdue_highlight), todo_due_date_overdue_highlight);
- gtk_signal_connect (GTK_OBJECT(due_date_overdue_highlight),
+ todo_item_highlight_overdue = gtk_check_button_new_with_label (_("Highlight overdue items"));
+ gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_overdue),
+ todo_item_dstatus_highlight_overdue);
+ todo_item_highlight_not_due_yet = gtk_check_button_new_with_label (_("Highlight not yet due items"));
+ gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_not_due_yet),
+ todo_item_dstatus_highlight_overdue);
+ todo_item_highlight_due_today = gtk_check_button_new_with_label (_("Highlight items due today"));
+ gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_due_today),
+ todo_item_dstatus_highlight_overdue);
+
+ gtk_signal_connect (GTK_OBJECT(todo_item_highlight_overdue),
"clicked",
(GtkSignalFunc) todo_option_set,
NULL);
- gtk_box_pack_start (GTK_BOX (vbox), due_date_overdue_highlight, FALSE, FALSE, 0);
+ gtk_signal_connect (GTK_OBJECT(todo_item_highlight_not_due_yet),
+ "clicked",
+ (GtkSignalFunc) todo_option_set,
+ NULL);
+ gtk_signal_connect (GTK_OBJECT(todo_item_highlight_due_today),
+ "clicked",
+ (GtkSignalFunc) todo_option_set,
+ NULL);
+
+ gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_overdue, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_due_today, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_not_due_yet, FALSE, FALSE, 0);
return frame;
}
static void