aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-23 00:47:54 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-23 00:47:54 +0800
commit5e9d81e541449d811574d64c9f0e84e0cf24b536 (patch)
tree019c82df311027547629e1464b70b7f75e6d9e5e
parentc4b424decd46e0487272a7e6c18ed6454418de0f (diff)
downloadgsoc2013-evolution-5e9d81e541449d811574d64c9f0e84e0cf24b536.tar.gz
gsoc2013-evolution-5e9d81e541449d811574d64c9f0e84e0cf24b536.tar.zst
gsoc2013-evolution-5e9d81e541449d811574d64c9f0e84e0cf24b536.zip
write out the correct time in the control
2001-10-22 JP Rosevear <jpr@ximian.com> * gui/e-itip-control.c (set_date_label): write out the correct time in the control * pcs/cal.c (build_fb_seq): utility function to build sequences of f/b data (impl_Cal_get_free_busy): use above so we never return a NULL * conduits/calendar/calendar-conduit-config.h (calconduit_save_configuration): fix c/p error (calconduit_load_configuration): ditto svn path=/trunk/; revision=13876
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/conduits/calendar/calendar-conduit-config.h4
-rw-r--r--calendar/conduits/calendar/calendar-conduit.h2
-rw-r--r--calendar/gui/e-itip-control.c4
-rw-r--r--calendar/pcs/cal.c57
5 files changed, 49 insertions, 31 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index da804df125..14f84208dc 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,18 @@
2001-10-22 JP Rosevear <jpr@ximian.com>
+ * gui/e-itip-control.c (set_date_label): write out the correct
+ time in the control
+
+ * pcs/cal.c (build_fb_seq): utility function to build sequences of
+ f/b data
+ (impl_Cal_get_free_busy): use above so we never return a NULL
+
+ * conduits/calendar/calendar-conduit-config.h
+ (calconduit_save_configuration): fix c/p error
+ (calconduit_load_configuration): ditto
+
+2001-10-22 JP Rosevear <jpr@ximian.com>
+
* gui/dialogs/meeting-page.c (meeting_page_destroy): we don't need
to save the state
diff --git a/calendar/conduits/calendar/calendar-conduit-config.h b/calendar/conduits/calendar/calendar-conduit-config.h
index e624552cda..e557f7d87f 100644
--- a/calendar/conduits/calendar/calendar-conduit-config.h
+++ b/calendar/conduits/calendar/calendar-conduit-config.h
@@ -43,7 +43,7 @@ static void
calconduit_load_configuration (ECalConduitCfg **c, guint32 pilot_id)
{
gchar prefix[256];
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
+ g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/",
pilot_id);
*c = g_new0 (ECalConduitCfg,1);
@@ -67,7 +67,7 @@ calconduit_save_configuration (ECalConduitCfg *c)
{
gchar prefix[256];
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
+ g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/",
c->pilot_id);
gnome_config_push_prefix (prefix);
diff --git a/calendar/conduits/calendar/calendar-conduit.h b/calendar/conduits/calendar/calendar-conduit.h
index 244a022c00..886588c978 100644
--- a/calendar/conduits/calendar/calendar-conduit.h
+++ b/calendar/conduits/calendar/calendar-conduit.h
@@ -48,7 +48,7 @@ struct _ECalLocalRecord {
/* The corresponding Comp object */
CalComponent *comp;
- /* pilot-link todo structure */
+ /* pilot-link appointment structure */
struct Appointment *appt;
};
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 85fcfd4572..b85e113170 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -500,11 +500,11 @@ set_date_label (GtkHTML *html, GtkHTMLStream *html_stream, CalComponent *comp)
write_label_piece (end, buffer, 1024, U_("Meeting ends: <b>"), "</b><br>");
break;
case CAL_COMPONENT_FREEBUSY:
- write_label_piece (start, buffer, 1024, U_("Free/Busy info ends: <b>"),
+ write_label_piece (end, buffer, 1024, U_("Free/Busy info ends: <b>"),
"</b><br>");
break;
default:
- write_label_piece (start, buffer, 1024, U_("Ends: <b>"), "</b><br>");
+ write_label_piece (end, buffer, 1024, U_("Ends: <b>"), "</b><br>");
}
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index b5d404bc7a..0d0e8e4a8b 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -241,6 +241,32 @@ impl_Cal_get_objects_in_range (PortableServer_Servant servant,
return seq;
}
+static GNOME_Evolution_Calendar_CalObjSeq *
+build_fb_seq (GList *obj_list)
+{
+ GNOME_Evolution_Calendar_CalObjSeq *seq;
+ GList *l;
+ int n, i;
+
+ n = g_list_length (obj_list);
+
+ seq = GNOME_Evolution_Calendar_CalObjSeq__alloc ();
+ CORBA_sequence_set_release (seq, TRUE);
+ seq->_length = n;
+ seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalObj_allocbuf (n);
+
+ /* Fill the sequence */
+
+ for (i = 0, l = obj_list; l; i++, l = l->next) {
+ char *calobj;
+
+ calobj = l->data;
+ seq->_buffer[i] = CORBA_string_dup (calobj);
+ }
+
+ return seq;
+}
+
/* Cal::get_free_busy method */
static GNOME_Evolution_Calendar_CalObjSeq *
impl_Cal_get_free_busy (PortableServer_Servant servant,
@@ -264,7 +290,7 @@ impl_Cal_get_free_busy (PortableServer_Servant servant,
if (t_start > t_end || t_start == -1 || t_end == -1) {
bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidRange);
- return NULL;
+ return build_fb_seq (NULL);
}
/* convert the CORBA user list to a GList */
@@ -277,34 +303,13 @@ impl_Cal_get_free_busy (PortableServer_Servant servant,
/* call the backend's get_free_busy method */
obj_list = cal_backend_get_free_busy (priv->backend, users, t_start, t_end);
+ seq = build_fb_seq (obj_list);
g_list_free (users);
- if (obj_list) {
- GList *l;
- gint count;
- gint n;
-
- count = g_list_length (obj_list);
-
- seq = GNOME_Evolution_Calendar_CalObjSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = count;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalObj_allocbuf (count);
- for (l = obj_list, n = 0; l; l = l->next, n++) {
- gchar *calobj = (gchar *) l->data;
-
- seq->_buffer[n] = CORBA_string_dup (calobj);
- g_free (calobj);
- }
-
- g_list_free (obj_list);
-
- return seq;
- }
-
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
+ if (obj_list == NULL)
+ bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
- return NULL;
+ return seq;
}
/* Cal::get_alarms_in_range method */