diff options
author | Damon Chaplin <damon@ximian.com> | 2001-03-05 08:11:35 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-03-05 08:11:35 +0800 |
commit | d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d (patch) | |
tree | 9bd19bd8db1552c3f7d66a75f5c98ef2a102d891 /calendar/gui/e-calendar-table.c | |
parent | 7b7acde405898803001e1614e6ffd15df7682391 (diff) | |
download | gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.gz gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.bz2 gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.lz gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.xz gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.tar.zst gsoc2013-evolution-d842e1a20e3ab2fd38582d2ccc863e4bbcb87d0d.zip |
keep list of all Tasks folders so we can update the preference settings
2001-03-05 Damon Chaplin <damon@ximian.com>
* gui/e-tasks.c: keep list of all Tasks folders so we can update the
preference settings when necessary.
* gui/gnome-cal.c: configure the TaskPad according to the settings.
* gui/e-calendar-table.c: use ECellCombo and ECellDateEdit for fields,
so the tasks folders is almost usable now.
* gui/calendar-model.c: added support for the Status property.
* gui/calendar-config.[hc]: added convenience functions to setup
ECalendarTable and ECellDateEdit objects.
* gui/calendar-commands.c: connected to "destroy" signal of calendars
so we can remove them from all_calendars list.
* gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_update_config):
call e_tasks_update_all_config_settings() to update all the settings
in the Tasks folders as well.
* cal-util/cal-component.h: added CAL_COMPONENT_FIELD_STATUS.
* cal-util/cal-component.c (cal_component_get_transparency): fixed
calls to strcasecmp so they check for '== 0'.
Applied patch from Miguel...
2001-02-27 Miguel de Icaza <miguel@ximian.com>
* gui/e-day-view.c (e_day_view_on_event_right_click): Reorganize
the menus to have entries always in a consistent fashion, as
reported to the genepool mailing list.
(e_day_view_on_event_right_click): Added a FIXME comment to the
FIXME comment without a FIXME.
Now we use e_popup_menu. This allows us to hide/show items on
demand, and to sensitize/de-sensitize items depending on their
state.
This will also let us add icon support (when we get nice icons for
this)
* gui/e-week-view.c (e_week_view_show_popup_menu): Ditto.
The files popup-menu.c and popup-menu.h can now be removed.
svn path=/trunk/; revision=8549
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r-- | calendar/gui/e-calendar-table.c | 174 |
1 files changed, 163 insertions, 11 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index ba3d1dedb3..f173ac3783 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -36,6 +36,8 @@ #include <gal/e-table/e-cell-checkbox.h> #include <gal/e-table/e-cell-toggle.h> #include <gal/e-table/e-cell-text.h> +#include <gal/e-table/e-cell-combo.h> +#include <widgets/misc/e-cell-date-edit.h> #include "e-calendar-table.h" #include "calendar-model.h" #include "dialogs/delete-comp.h" @@ -158,7 +160,7 @@ static char *list [] = { N_("Start Date"), N_("Due Date"), N_("Geographical Position"), - N_("Precent complete"), + N_("Percent complete"), N_("Priority"), N_("Summary"), N_("Transparency"), @@ -177,34 +179,34 @@ static char *list [] = { " cell=\"calstring\" compare=\"string\"/>" \ " <ETableColumn model_col= \"1\" _title=\"Classification\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"classification\" compare=\"string\"/>" \ " <ETableColumn model_col= \"2\" _title=\"Completion Date\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"dateedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"3\" _title=\"End Date\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"dateedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"4\" _title=\"Start Date\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"dateedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"5\" _title=\"Due Date\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"dateedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"6\" _title=\"Geographical Position\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"calstring\" compare=\"string\"/>" \ " <ETableColumn model_col= \"7\" _title=\"% Complete\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"percent\" compare=\"string\"/>" \ " <ETableColumn model_col= \"8\" _title=\"Priority\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"priority\" compare=\"string\"/>" \ " <ETableColumn model_col= \"9\" _title=\"Summary\" " \ " expansion=\"3.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"calstring\" compare=\"string\"/>" \ " <ETableColumn model_col=\"10\" _title=\"Transparency\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"calstring\" compare=\"string\"/>" \ + " cell=\"transparency\" compare=\"string\"/>" \ " <ETableColumn model_col=\"11\" _title=\"URL\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"calstring\" compare=\"string\"/>" \ @@ -214,9 +216,12 @@ static char *list [] = { " <ETableColumn model_col=\"13\" pixbuf=\"icon\" _title=\"Type\" "\ " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\ " cell=\"icon\" compare=\"integer\"/>" \ - " <ETableColumn model_col=\"14\" pixbuf=\"complete\" _title=\"Compelete\" " \ + " <ETableColumn model_col=\"14\" pixbuf=\"complete\" _title=\"Complete\" " \ " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\ " cell=\"checkbox\" compare=\"integer\"/>" \ + " <ETableColumn model_col=\"18\" _title=\"Status\" " \ + " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ + " cell=\"calstatus\" compare=\"string\"/>" \ " <ETableState>" \ " <column source=\"13\"/>" \ " <column source=\"14\"/>" \ @@ -230,13 +235,14 @@ e_calendar_table_init (ECalendarTable *cal_table) { GtkWidget *table; ETable *e_table; - ECell *cell; + ECell *cell, *popup_cell; ETableExtras *extras; gint i; GdkPixbuf *pixbuf; GdkColormap *colormap; gboolean success[E_CALENDAR_TABLE_COLOR_LAST]; gint nfailed; + GList *strings; /* Allocate the colors we need. */ @@ -271,14 +277,160 @@ e_calendar_table_init (ECalendarTable *cal_table) extras = e_table_extras_new(); + /* + * Normal string fields. + */ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); gtk_object_set (GTK_OBJECT (cell), "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, "bold_column", CAL_COMPONENT_FIELD_OVERDUE, "color_column", CAL_COMPONENT_FIELD_COLOR, NULL); + e_table_extras_add_cell (extras, "calstring", cell); + + /* + * Date fields. + */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + NULL); + + popup_cell = e_cell_date_edit_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + e_table_extras_add_cell (extras, "dateedit", popup_cell); + cal_table->dates_cell = E_CELL_DATE_EDIT (popup_cell); + + + /* + * Combo fields. + */ + + /* Classification field. */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + "editable", FALSE, + NULL); + + popup_cell = e_cell_combo_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + + strings = NULL; + strings = g_list_append (strings, _("None")); + strings = g_list_append (strings, _("Public")); + strings = g_list_append (strings, _("Private")); + strings = g_list_append (strings, _("Confidential")); + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), + strings); + + e_table_extras_add_cell (extras, "classification", popup_cell); + + /* Priority field. */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + "editable", FALSE, + NULL); + + popup_cell = e_cell_combo_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + + strings = NULL; + strings = g_list_append (strings, _("High")); + strings = g_list_append (strings, _("Normal")); + strings = g_list_append (strings, _("Low")); + strings = g_list_append (strings, _("Undefined")); + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), + strings); + + e_table_extras_add_cell (extras, "priority", popup_cell); + + /* Percent field. */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + NULL); + + popup_cell = e_cell_combo_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + + strings = NULL; + strings = g_list_append (strings, _("0%")); + strings = g_list_append (strings, _("10%")); + strings = g_list_append (strings, _("20%")); + strings = g_list_append (strings, _("30%")); + strings = g_list_append (strings, _("40%")); + strings = g_list_append (strings, _("50%")); + strings = g_list_append (strings, _("60%")); + strings = g_list_append (strings, _("70%")); + strings = g_list_append (strings, _("80%")); + strings = g_list_append (strings, _("90%")); + strings = g_list_append (strings, _("100%")); + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), + strings); + + e_table_extras_add_cell (extras, "percent", popup_cell); + + /* Transparency field. */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + "editable", FALSE, + NULL); + + popup_cell = e_cell_combo_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + + strings = NULL; + strings = g_list_append (strings, _("None")); + strings = g_list_append (strings, _("Opaque")); + strings = g_list_append (strings, _("Transparent")); + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), + strings); + + e_table_extras_add_cell (extras, "transparency", popup_cell); + + /* Status field. */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + gtk_object_set (GTK_OBJECT (cell), + "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE, + "bold_column", CAL_COMPONENT_FIELD_OVERDUE, + "color_column", CAL_COMPONENT_FIELD_COLOR, + "editable", FALSE, + NULL); + + popup_cell = e_cell_combo_new (); + e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell); + gtk_object_unref (GTK_OBJECT (cell)); + + strings = NULL; + strings = g_list_append (strings, _("Not Started")); + strings = g_list_append (strings, _("In Progress")); + strings = g_list_append (strings, _("Completed")); + strings = g_list_append (strings, _("Cancelled")); + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), + strings); + + e_table_extras_add_cell (extras, "calstatus", popup_cell); + /* Create pixmaps */ if (!icon_pixbufs[0]) |