diff options
author | JP Rosevear <jpr@ximian.com> | 2001-07-04 09:33:05 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-07-04 09:33:05 +0800 |
commit | 720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0 (patch) | |
tree | c8b9492d1846916055a6f3aaa9628aaffd6548a3 /calendar | |
parent | 7a2f3f2fbce5eca8bd2553db2b02de5a5edc5ff6 (diff) | |
download | gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar.gz gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar.bz2 gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar.lz gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar.xz gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.tar.zst gsoc2013-evolution-720a792d11bbcadfd8bddfa8d68a0fbe0eb817d0.zip |
Add new columns for information specification (meeting_page_destroy): save
2001-07-03 JP Rosevear <jpr@ximian.com>
* gui/dialogs/meeting-page.c: Add new columns for information
specification
(meeting_page_destroy): save the table state
(build_etable): load new table state
* gui/dialogs/task-editor.c (task_editor_destroy): unref pages
* gui/dialogs/event-editor.c (event_editor_destroy): unref pages
* gui/dialogs/comp-editor.c (setup_widgets): kill warning
(comp_editor_append_page): ref page passed in
(close_dialog): unref pages
svn path=/trunk/; revision=10777
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 15 | ||||
-rw-r--r-- | calendar/cal-util/cal-component.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 10 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 5 | ||||
-rw-r--r-- | calendar/gui/dialogs/meeting-page.c | 61 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 1 |
7 files changed, 80 insertions, 17 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index cff0c1a1a5..c56c872508 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,18 @@ +2001-07-03 JP Rosevear <jpr@ximian.com> + + * gui/dialogs/meeting-page.c: Add new columns for information + specification + (meeting_page_destroy): save the table state + (build_etable): load new table state + + * gui/dialogs/task-editor.c (task_editor_destroy): unref pages + + * gui/dialogs/event-editor.c (event_editor_destroy): unref pages + + * gui/dialogs/comp-editor.c (setup_widgets): kill warning + (comp_editor_append_page): ref page passed in + (close_dialog): unref pages + 2001-07-03 Damon Chaplin <damon@ximian.com> * gui/e-day-view.c (query_obj_updated_cb): fix warning, and added diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c index 86b949dfed..1ebc398e63 100644 --- a/calendar/cal-util/cal-component.c +++ b/calendar/cal-util/cal-component.c @@ -3756,7 +3756,7 @@ set_attendee_list (CalComponent *comp, icalproperty_add_parameter (attendee->prop, attendee->cn_param); } if (a->language) { - attendee->language_param = icalparameter_new_language (a->cn); + attendee->language_param = icalparameter_new_language (a->language); icalproperty_add_parameter (attendee->prop, attendee->language_param); } diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index c001207783..ea42980c2c 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -201,7 +201,7 @@ setup_widgets (CompEditor *editor) /* Notebook */ priv->notebook = GTK_NOTEBOOK (gtk_notebook_new ()); - gtk_widget_show (priv->notebook); + gtk_widget_show (GTK_WIDGET (priv->notebook)); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->notebook), TRUE, TRUE, 0); } @@ -273,6 +273,8 @@ comp_editor_append_page (CompEditor *editor, priv = editor->priv; + gtk_object_ref (GTK_OBJECT (page)); + /* If we are editing something, fill the widgets with current info */ if (priv->comp != NULL) { CalComponent *comp; @@ -723,11 +725,15 @@ static void close_dialog (CompEditor *editor) { CompEditorPrivate *priv; - + GList *l; + priv = editor->priv; g_assert (priv->window != NULL); + for (l = priv->pages; l != NULL; l = l->next) + gtk_object_unref (GTK_OBJECT (l->data)); + gtk_object_destroy (GTK_OBJECT (editor)); } diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 4a69fcbe43..6eb10cb0fb 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -191,6 +191,11 @@ event_editor_destroy (GtkObject *object) ee = EVENT_EDITOR (object); priv = ee->priv; + gtk_object_unref (GTK_OBJECT (priv->event_page)); + gtk_object_unref (GTK_OBJECT (priv->alarm_page)); + gtk_object_unref (GTK_OBJECT (priv->recur_page)); + gtk_object_unref (GTK_OBJECT (priv->meet_page)); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 566422aa9b..b67cf622ba 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -42,6 +42,7 @@ #include <widgets/meeting-time-sel/e-meeting-time-sel.h> #include <e-util/e-dialog-widgets.h> #include <addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.h> +#include "../component-factory.h" #include "comp-editor-util.h" #include "meeting-page.h" @@ -53,34 +54,35 @@ " _click-to-add-message=\"Click here to add an attendee\" " \ " draw-grid=\"true\">" \ " <ETableColumn model_col= \"0\" _title=\"Attendee\" " \ - " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ + " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"string\" compare=\"string\"/>" \ " <ETableColumn model_col= \"1\" _title=\"Member\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"text\" compare=\"string\"/>" \ + " cell=\"string\" compare=\"string\"/>" \ " <ETableColumn model_col= \"2\" _title=\"Type\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ + " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"typeedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"3\" _title=\"Role\" " \ " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"roleedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"4\" _title=\"RSVP\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ + " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"rsvpedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"5\" _title=\"Status\" " \ - " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ + " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \ " cell=\"statusedit\" compare=\"string\"/>" \ " <ETableColumn model_col= \"6\" _title=\"Common Name\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"text\" compare=\"string\"/>" \ - " <ETableColumn model_col= \"7\" _title=\"Language\" " \ + " cell=\"string\" compare=\"string\"/>" \ + " <ETableColumn model_col= \"7\" _title=\"Language\" " \ " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \ - " cell=\"text\" compare=\"string\"/>" \ + " cell=\"string\" compare=\"string\"/>" \ " <ETableState>" \ " <column source=\"0\"/>" \ - " <column source=\"1\"/>" \ " <column source=\"2\"/>" \ " <column source=\"3\"/>" \ + " <column source=\"4\"/>" \ + " <column source=\"5\"/>" \ " <grouping></grouping>" \ " </ETableState>" \ "</ETableSpecification>" @@ -232,13 +234,21 @@ meeting_page_destroy (GtkObject *object) { MeetingPage *mpage; MeetingPagePrivate *priv; - + ETable *real_table; + char *filename; + g_return_if_fail (object != NULL); g_return_if_fail (IS_MEETING_PAGE (object)); mpage = MEETING_PAGE (object); priv = mpage->priv; + filename = g_strdup_printf ("%s/config/et-header-meeting-page", + evolution_dir); + real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (priv->etable)); + e_table_save_state (real_table, filename); + g_free (filename); + if (priv->xml) { gtk_object_unref (GTK_OBJECT (priv->xml)); priv->xml = NULL; @@ -357,7 +367,7 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp) CalComponentAttendee *att = g_new0 (CalComponentAttendee, 1); att->value = attendee->address; - att->member = attendee->member; + att->member = (attendee->member && *attendee->member) ? attendee->member : NULL; att->cutype= attendee->cutype; att->role = attendee->role; att->status = attendee->status; @@ -365,8 +375,8 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp) att->delto = attendee->delto; att->delfrom = attendee->delfrom; att->sentby = attendee->sentby; - att->cn = attendee->cn; - att->language = attendee->language; + att->cn = (attendee->cn && *attendee->cn) ? attendee->cn : NULL; + att->language = (attendee->language && *attendee->language) ? attendee->language : NULL; attendees = g_slist_prepend (attendees, att); @@ -862,13 +872,32 @@ static void build_etable (MeetingPage *mpage) { MeetingPagePrivate *priv; + ETable *real_table; ETableExtras *extras; GList *strings; ECell *popup_cell, *cell; + char *filename; + priv = mpage->priv; extras = e_table_extras_new (); + + /* For type */ + cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); + 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, "Individual"); + strings = g_list_append (strings, "Group"); + strings = g_list_append (strings, "Resource"); + strings = g_list_append (strings, "Room"); + strings = g_list_append (strings, "Unknown"); + + e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); + e_table_extras_add_cell (extras, "typeedit", popup_cell); /* For role */ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); @@ -934,6 +963,12 @@ build_etable (MeetingPage *mpage) priv->etable = e_table_scrolled_new (priv->model, extras, MEETING_PAGE_TABLE_SPEC, NULL); + filename = g_strdup_printf ("%s/config/et-header-meeting-page", + evolution_dir); + real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (priv->etable)); + e_table_load_state (real_table, filename); + g_free (filename); + gtk_object_unref (GTK_OBJECT (extras)); } diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 6b582315f4..6e5a6f689e 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -173,6 +173,9 @@ task_editor_destroy (GtkObject *object) te = TASK_EDITOR (object); priv = te->priv; + gtk_object_unref (GTK_OBJECT (priv->task_page)); + gtk_object_unref (GTK_OBJECT (priv->task_details_page)); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 92113f2702..6a14469213 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -33,7 +33,6 @@ #include "widgets/menus/gal-view-menus.h" #include "dialogs/task-editor.h" #include "calendar-config.h" -#include "calendar-config.h" #include "component-factory.h" #include "e-tasks.h" |