aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog234
-rw-r--r--calendar/gui/dialogs/event-editor.c8
-rw-r--r--calendar/gui/dialogs/task-page.c11
-rw-r--r--calendar/gui/e-itip-control.c23
-rw-r--r--calendar/gui/e-tasks.c93
5 files changed, 52 insertions, 317 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9fda443b83..9283969c6e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,233 +1,5 @@
-2004-06-10 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/e-cal-model.c (e_cal_view_objects_modified_cb): removed
- g_assert call, since we shouldn't crash when getting wrong
- notifications from a backend.
-
-2004-06-10 JP Rosevear <jpr@novell.com>
-
- * gui/gnome-cal.c
- (gnome_calendar_on_date_navigator_selection_changed): only do the
- range selected hack in one case
-
-2004-06-10 JP Rosevear <jpr@novell.com>
-
- * gui/gnome-cal.c (setup_widgets): set 6 weeks shown
- (display_view): ditto
-
-2004-06-10 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #58748
-
- * gui/gnome-cal.c (setup_widgets): set the timezone on all views
- when creating them.
-
-2004-06-10 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): don't set
- the "bg_color_column" property on the ECellToggle class.
-
-2004-06-10 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #58799
-
- * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence):
- Use the timezone for getting the RECUR-ID from the instance start
- date if available. Also, use dates only as the recurrence ID, and
- do nothing if not a recurrent appointment.
-
-2004-06-09 JP Rosevear <jpr@novell.com>
-
- Fixes #59242, #57404, ##55394
-
- * gui/gnome-cal.c (get_times_for_views): calculate the work week,
- week, and month views more exactly
- (update_adjustment): update the view based on week view scrolling
- (setup_widgets): listen for the scroll bar moving on the week
- views
- (gnome_calendar_update_date_navigator): adjust for compressed
- weekends in the month view
- (gnome_calendar_on_date_navigator_selection_changed): ditto
-
- * gui/e-week-view.h: add protos
-
- * gui/e-week-view.c (time_range_changed_cb): calculate the
- base_date and first_day_shown more simply, allows multi-week
- selection to work better; update the base date when told to do so
- (e_week_view_init): init update_base_value var
- (e_week_view_get_update_base_date): accessor
- (e_week_view_set_update_base_date): ditto
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #57578
-
- * gui/e-calendar-view.c (on_move_to, on_copy_to): simplified to
- just call transfer_selected_items() with the approppriate
- arguments.
- (transfer_selected_items): new function to transfer all selected
- items to another calendar.
- (transfer_item_to): added missing implementation.
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #57579
-
- * gui/dialogs/select-source-dialog.c (select_source_dialog): start
- with the OK button disabled.
- (primary_selection_changed_cb): enable/disable the OK button depending
- on the selection on the ESourceSelector.
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/dialogs/comp-editor.[ch] (comp_editor_notify_client_changed):
- new function for notifying all pages of the client change.
- (page_client_changed_cb): no need for this callback.
- (comp_editor_append_page): no need to connect to "client_changed"
- signal on the pages.
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_notify_client_changed): re-added the call to
- comp_editor_page_set_e_cal(), the client was not being set anywhere.
-
- * gui/dialogs/event-page.c (source_changed_cb): use
- comp_editor_notify_client_changed() so that all pages get informed
- of the client change.
-
- * gui/dialogs/task-page.c (source_changed_cb): ditto.
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_notify_client_changed): do not set the private
- client here, it is set in comp-editor.c.
-
- * gui/dialogs/event-page.c (sensitize_widgets): new function.
- (source_changed_cb): call sensitize_buttons().
-
- * gui/dialogs/recurrence-page.c (sensitize_buttons): new
- function, to deal correctly with the sensitivity of all widgets
- in the page.
- (recurrence_page_fill_widgets, type_toggled_cb, client_changed_cb):
- call sensitize_buttons() instead of sensitize_recur_widgets().
- (recurrence_page_construct): g_signal_connect_after for
- "client_changed", to get notifications after CompEditorPage
- gets his.
-
- * gui/dialogs/alarm-page.c (sensitize_buttons): sensitize the missing
- widgets in the page.
- (alarm_page_construct): g_signal_connect_after for "client_changed",
- to get notifications after CompEditorPage gets his.
-
-2004-06-08 JP Rosevear <jpr@novell.com>
-
- * gui/e-week-view.c (e_week_view_do_key_press): cast week view
- correctly
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/dialogs/recurrence-page.c (recurrence_page_construct): connect
- to "client_changed" signal on the page.
- (client_changed_cb): new callback.
-
- * gui/dialogs/alarm-page.c (sensitize_buttons): fixed missing stuff
- in last commit.
-
-2004-06-08 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #59650
-
- * gui/dialogs/alarm-page.c (alarm_page_construct): connect to
- "client_changed" signal on the page.
- (client_changed_cb): new callback.
- (sensitize_buttons): added code for dealing with read only calendars
- and disable/enable buttons approppriately.
-
-2004-06-07 Dan Winship <danw@novell.com>
-
- * gui/dialogs/comp-editor.c (pixmaps): s/stock_save_as/stock_save-as/
-
-2004-06-07 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/e-tasks.c (e_tasks_add_todo_source): open task lists
- asynchronously.
- (client_cal_opened_cb): callback from the client when opened.
-
- * gui/gnome-cal.c (client_cal_opened_cb): disconnect from all
- signals of the client when opening it fails. Clean up the status
- messages correctly, based on source type.
- (open_ecal): for tasks, use e_calendar_table_set_status_message
- not e_calendar_view_set_status_message.
- (gnome_calendar_remove_source_by_uid): call update_query only when
- removing calendars, not tasks lists.
- (update_query): set meaningful status messages.
-
-2004-06-06 Vardhman Jain <vardhman@students.iiit.net>
-
- * Bug #36247
- * gui/e-itip-control.c (write_html, set_date_label):
- Changes to improve the performance of _(str) function call on strings
- str of the type <tar>str</tag> to avoid translation of tag.
-
-2004-06-04 <jpr@novell.com>
-
- * gui/gnome-cal.c: define G_MAXINT32 if it isn't already
-
-2004-06-04 JP Rosevear <jpr@novell.com>
-
- Fixes #58739
-
- * gui/migration.c (migrate_calendars): guard against NULL
- gconf_val
-
-2004-06-04 JP Rosevear <jpr@novell.com>
-
- Fixes #59058
-
- * gui/gnome-cal.c (gnome_calendar_purge): make purging actually
- work
-
-2004-06-04 JP Rosevear <jpr@novell.com>
-
- * gui/dialogs/task-page.c (task_page_fill_widgets): guard
- against the text value being NULL
-
- * gui/dialogs/event-page.c (event_page_fill_widgets): add guards
- here as well
-
-2004-06-03 Jeffrey Stedfast <fejj@novell.com>
-
- * conduits/calendar/calendar-conduit.c
- (calconduit_load_configuration): If the last_uri string value is
- the Evolution 1.4 URI, change it to the new URI. Fixes bug #54134.
-
-2004-06-03 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #59481
-
- * gui/e-tasks.c (set_status_message): don't use vsprintf with
- NULL strings, crashes on FreeBSD.
-
-2004-06-03 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_notify_client_changed): update the internal client
- when it changes.
-
-2004-06-03 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #56875
-
- * gui/dialogs/event-editor.c (event_editor_construct): connect to
- "client_changed" signal on the EventPage.
- (client_changed_cb): set menu sensibility when the client changes.
-
- * gui/dialogs/task-editor.c (task_editor_construct): connect to
- "client_changed signal on the TaskPage.
- (client_changed_cb): set menu sensibility when the client changes.
-
2004-06-02 JP Rosevear <jpr@novell.com>
-
+
* gui/alarm-notify/alarm-notify.c (process_removal_in_hash): free
the correct uri, preventing bad memory corruption
(list_changed_cb): track the removals in a list so we don't
@@ -246,6 +18,9 @@
(emlv_finalize): no need to unref the book anymore.
(emlv_init): don't call start_addressbook_server.
+ * gui/e-meeting-store.c (start_addressbook_server): removed.
+ (ems_finalize): no need to unref the book anymore.
+
* gui/dialogs/copy-source-dialog.c (copy_source): fixed
leak and pass the correct icalcomponent to e_cal_modify_object.
@@ -273,7 +48,6 @@
* gui/dialogs/calendar-setup.glade: remove edit dialogs and name
the tables.
-
2004-06-01 Rodrigo Moya <rodrigo@novell.com>
Fixes #59369
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index a035f6b87e..f8197b5f85 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -172,12 +172,6 @@ init_widgets (EventEditor *ee)
G_CALLBACK (model_row_delete_cb), ee);
}
-static void
-client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
-{
- set_menu_sens (EVENT_EDITOR (user_data));
-}
-
/* Object initialization function for the event editor */
static void
event_editor_init (EventEditor *ee)
@@ -205,8 +199,6 @@ event_editor_construct (EventEditor *ee, ECal *client)
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->event_page),
_("Appointment"));
- g_signal_connect (G_OBJECT (priv->event_page), "client_changed",
- G_CALLBACK (client_changed_cb), ee);
priv->alarm_page = alarm_page_new ();
g_object_ref (priv->alarm_page);
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index de17834994..0f234eeeea 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -42,7 +42,6 @@
#include "e-util/e-categories-config.h"
#include "../e-timezone-entry.h"
#include "../calendar-config.h"
-#include "comp-editor.h"
#include "comp-editor-util.h"
#include "task-page.h"
@@ -279,11 +278,9 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
- ECalComponentText *dtext;
-
- dtext = l->data;
+ text = *(ECalComponentText *)l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- dtext->value ? dtext->value : "", -1);
+ text.value, -1);
} else {
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
"", 0);
@@ -828,9 +825,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
} else {
- comp_editor_notify_client_changed (
- COMP_EDITOR (gtk_widget_get_toplevel (priv->main)),
- client);
+ comp_editor_page_notify_client_changed (COMP_EDITOR_PAGE (epage), client);
}
}
}
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 6bbe1dfb4d..ad0503001a 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -672,7 +672,6 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
EItipControlPrivate *priv;
ECalComponentDateTime datetime;
static char buffer[1024];
- gchar *str;
gboolean wrote = FALSE, task_completed = FALSE;
ECalComponentVType type;
@@ -683,24 +682,20 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
buffer[0] = '\0';
e_cal_component_get_dtstart (comp, &datetime);
if (datetime.value) {
- str = g_strdup_printf ("<b>%s:</b>", _("Starts"));
write_label_piece (itip, &datetime, buffer, 1024,
- str,
+ _("<b>Starts:</b> "),
"<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen(buffer));
wrote = TRUE;
- g_free (str);
}
e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
e_cal_component_get_dtend (comp, &datetime);
if (datetime.value){
- str = g_strdup_printf ("<b>%s:</b>", _("Ends"));
- write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
+ write_label_piece (itip, &datetime, buffer, 1024, _("<b>Ends:</b> "), "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
- g_free (str);
}
e_cal_component_free_datetime (&datetime);
@@ -717,24 +712,20 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
if (type == E_CAL_COMPONENT_TODO && datetime.value) {
/* Pass TRUE as is_utc, so it gets converted to the current
timezone. */
- str = g_strdup_printf ("<b>%s:</b>", _("Completed"));
datetime.value->is_utc = TRUE;
- write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
+ write_label_piece (itip, &datetime, buffer, 1024, _("<b>Completed:</b> "), "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
task_completed = TRUE;
- g_free (str);
}
e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
e_cal_component_get_due (comp, &datetime);
if (type == E_CAL_COMPONENT_TODO && !task_completed && datetime.value) {
- str = g_strdup_printf ("<b>%s:</b>", _("Due"));
- write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
+ write_label_piece (itip, &datetime, buffer, 1024, _("<b>Due:</b> "), "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
- g_free (str);
}
e_cal_component_free_datetime (&datetime);
@@ -816,7 +807,6 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
gchar *html;
const gchar *const_html;
gchar *filename;
- gchar *str;
priv = itip->priv;
@@ -925,12 +915,9 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
/* Summary */
e_cal_component_get_summary (priv->comp, &text);
- str = g_strdup_printf ("<i>%s:</i>", _("None"));
-
- html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : str;
+ html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : _("<i>None</i>");
gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
_("Summary:"), html);
- g_free (str);
if (text.value)
g_free (html);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index fbf652523a..947cf60a11 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -679,18 +679,15 @@ set_status_message (ETasks *tasks, const char *message, ...)
{
ETasksPrivate *priv;
va_list args;
- char sz[2048], *msg_string = NULL;
-
- if (message) {
- va_start (args, message);
- vsnprintf (sz, sizeof sz, message, args);
- va_end (args);
- msg_string = sz;
- }
+ char sz[2048];
+
+ va_start (args, message);
+ vsnprintf (sz, sizeof sz, message, args);
+ va_end (args);
priv = tasks->priv;
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string);
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), sz);
}
/* Callback from the calendar client when an error occurs in the backend */
@@ -738,48 +735,6 @@ backend_died_cb (ECal *client, gpointer data)
g_object_unref (source);
}
-/* Callback from the calendar client when the calendar is opened */
-static void
-client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks)
-{
- ECalModel *model;
- ESource *source;
- ETasksPrivate *priv;
-
- priv = tasks->priv;
-
- source = e_cal_get_source (ecal);
-
- switch (status) {
- case E_CALENDAR_STATUS_OK :
- set_status_message (tasks, _("Loading tasks"));
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- e_cal_model_add_client (model, ecal);
-
- set_timezone (tasks);
- set_status_message (tasks, NULL);
- break;
- default :
- /* Make sure the source doesn't disappear on us */
- g_object_ref (source);
-
- priv->clients_list = g_list_remove (priv->clients_list, ecal);
- g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, tasks);
-
- /* Do this last because it unrefs the client */
- g_hash_table_remove (priv->clients, e_cal_get_uri (ecal));
-
- gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source);
-
- set_status_message (tasks, NULL);
- g_object_unref (ecal);
- g_object_unref (source);
-
- break;
- }
-}
-
void
e_tasks_open_task (ETasks *tasks)
{
@@ -824,6 +779,7 @@ e_tasks_add_todo_source (ETasks *tasks, ESource *source)
{
ETasksPrivate *priv;
ECal *client;
+ ECalModel *model;
char *str_uri;
GError *error = NULL;
@@ -856,11 +812,42 @@ e_tasks_add_todo_source (ETasks *tasks, ESource *source)
g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), tasks);
g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), tasks);
g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), tasks);
- g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (client_cal_opened_cb), tasks);
gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_ADDED], source);
- e_cal_open_async (client, FALSE);
+ if (!e_cal_open (client, FALSE, &error)) {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))),
+ GTK_DIALOG_NO_SEPARATOR,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ _("Error opening %s:\n%s"),
+ str_uri, error ? error->message : "");
+
+ g_error_free (error);
+ priv->clients_list = g_list_prepend (priv->clients_list, client);
+ g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, tasks);
+
+ /* Do this last because it unrefs the client */
+ g_hash_table_remove (priv->clients, str_uri);
+
+ gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+
+ set_status_message (tasks, NULL);
+
+ return FALSE;
+ }
+
+ set_status_message (tasks, _("Loading tasks"));
+ model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
+ e_cal_model_add_client (model, client);
+
+ set_timezone (tasks);
+ set_status_message (tasks, NULL);
return TRUE;
}