diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-02-11 19:08:08 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-02-11 19:08:08 +0800 |
commit | d8fbc4fc0c01d174f04e8f2370131a5240764f4b (patch) | |
tree | d530001f5c312790457e2cd55585dd46eac32085 /calendar/html-month.c | |
parent | db6312e2549c63372546af84fce3ce41b7c3f48d (diff) | |
download | gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar.gz gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar.bz2 gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar.lz gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar.xz gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.tar.zst gsoc2013-evolution-d8fbc4fc0c01d174f04e8f2370131a5240764f4b.zip |
Connect to the Cal's destroy signal. (cal_backend_remove_cal): Killed
2000-02-10 Federico Mena Quintero <federico@helixcode.com>
* cal-backend.c (cal_backend_add_cal): Connect to the Cal's
destroy signal.
(cal_backend_remove_cal): Killed function now that removal of Cal
objects is done in their destroy callback.
(cal_destroy_cb): New callback to remove a Cal from the backend's
list of clients. Also, the backend destroys itself when there are
no more clients connected to it.
(save): New placeholder function to save a backend.
(destroy): New function to destroy a backend's data.
(cal_backend_destroy): Save the calendar and destroy it.
* cal.c (cal_destroy): Reset the priv->backend to NULL.
* cal-factory.c (add_calendar_client): There is no need to call
cal_backend_remove_cal(); we can now just destroy the Cal object.
(create_fn): Make sure we always unref the URI.
(load_fn): Move the URI unref to the end of the function for
safety.
* cal-factory.c (add_calendar_client): Unref the Cal only if
notification of the listener was unsuccessful. Otherwise, the
calendar user agent (Listener side) keeps the reference.
* tl-test.c (list_uids): Free the calobj.
* cal-client.c (cal_loaded_cb): Use bonobo_object_unref() to get
rid of the listener.
(load_or_create): Likewise.
(destroy_factory): New function to get rid of the factory.
(destroy_listener): New function to get rid of the listener.
(destroy_cal): New function to get rid of the calendar client
interface object.
(cal_client_destroy): Free all resources.
(cal_client_get_object): CORBA_free() the calobj string. Boy, I
love memprof.
* cal-listener.c (cal_listener_destroy): Reset the priv->cal to
CORBA_OBJECT_NIL.
* cal-backend.c (cal_backend_remove_cal): Do not unref the Cal,
since the calendar user agent owns it.
(cal_backend_add_cal): Do not ref the Cal, since the calendar user
agent owns it.
* cal-factory.c (add_calendar_client): Use bonobo_object_unref()
to get rid of the calendar client interface object.
* calobj.c (ical_object_create_from_vobject): Duplicate the
default "PUBLIC" string.
2000-02-09 Federico Mena Quintero <federico@helixcode.com>
* cal-factory.c (cal_factory_load): Added documentation comment.
(load_fn): Do not print a message if the backend could not be
loaded due to a non-fatal error.
(queue_load_create_job): Moved the stuff from cal_factory_load()
to here. Now this function serves to queue load or create
requests.
(cal_factory_load): Use queue_load_create_job().
(cal_factory_create): Implemented; use queue_load_create_job().
(create_fn): New job handler for creating new calendars.
(create_backend): New function to create a new backend with a new
calendar.
(add_backend): New helper function to add backends to the
factory's hash table.
(load_backend): Use add_backend() instead of adding the backend by
ourselves.
* cal-client.c (load_or_create): Moved the functionality from
cal_client_load_calendar() to here, and added an option to create
a new calendar instead of loading an existing one.
(cal_client_load_calendar): Use load_or_create().
(cal_client_create_calendar): Implemented.
* cal-backend.c (cal_backend_create): Implemented.
* evolution-calendar.idl (LoadStatus): Added an IN_USE error for
create requests.
* cal-listener.h (CalListenerLoadStatus): Added CAL_LISTENER_LOAD_IN_USE.
* cal-listener.c (Listener_cal_loaded): Convert the IN_USE error.
* cal-client.h (CalClientLoadStatus): Added CAL_CLIENT_LOAD_IN_USE.
* cal-client.c (cal_loaded_cb): Handle CAL_LISTENER_LOAD_IN_USE.
* tl-test.c: New test program for the calendar client side; it
also exercises the server side by sending commands to it.
* Makefile.am: Added the tl-test program.
* tlacuache.gnorba: Updated.
* tlacuache.c (create_cal_factory): Use the right GOAD id.
* cal-client.c (cal_client_construct): Use the right GOAD id.
svn path=/trunk/; revision=1732
Diffstat (limited to 'calendar/html-month.c')
-rw-r--r-- | calendar/html-month.c | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/calendar/html-month.c b/calendar/html-month.c deleted file mode 100644 index 9d4af13c33..0000000000 --- a/calendar/html-month.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Creates an HTML rendering for this month - * Copyright (C) 1999 the Free Software Foundation - * - * Authors: - * Miguel de Icaza (miguel@kernel.org) - */ -#include <config.h> -#include <gnome.h> -#include <pwd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <string.h> -#include <ctype.h> -#include "calendar.h" -#include "alarm.h" -#include "eventedit.h" -#include "gnome-cal.h" -#include "main.h" -#include "timeutil.h" - -static void -make_html_header (GnomeCalendar *gcal, GString *s) -{ - g_string_sprintf (s, - "<html>\n" - " <head>\n" - " <title>%s</title>\n" - " </head>\n" - " <body>\n", - gcal->cal->title); -} - -static void -make_html_footer (GString *s) -{ - g_string_sprintf (s, "</html>"); -} - -static void -make_days_headers (GString *s) -{ - g_string_append (s, - "<p><table border=1>\n" - "<tr>\n" - " <td></td>\n" - " <td>MONDAY</td>\n" - " <td>TUESDAY</td>\n" - " <td>WEDNESDAY</td>\n" - " <td>THURSDAY</td>\n" - " <td>FRIDAY</td>\n" - "</tr>\n"); -} - -static void -make_days (GnomeCalendar *gcal, GString *s) -{ - struct tm tm, month; - time_t month_start; - int day; - time_t now = time (NULL); - - make_days_headers (s); - tm = *localtime (&now); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mday = 1; - month_start = mktime (&tm); - month = *localtime (&month_start); - - for (day = 0; day < month.tm_mday; day++){ - - } -#if 0 - day = 0; - for (y = 0; y < 5; y++){ - for (x = 0; x < 7; x++){ - if (month.tm_mday < day - } - } -#endif -} - -void -make_month_html (GnomeCalendar *gcal, char *output) -{ - FILE *f; - GString *s; - - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - f = fopen (output, "w"); - if (!f){ - g_warning ("Add nice error message here"); - return; - } - - s = g_string_new (""); - - make_html_header (gcal, s); - make_days (gcal, s); - make_html_footer (s); - - fwrite (s->str, strlen (s->str), 1, f); - - g_string_free (s, TRUE); - fclose (f); -} |