diff options
121 files changed, 20 insertions, 30405 deletions
@@ -1,3 +1,21 @@ +2003-10-22 Dan Winship <danw@ximian.com> + + * executive-summary/*: Removed; this code has not been used since + pre-1.0. + + * my-evolution/*: Removed; gone in evolution 2.0. + + * notes/*: Removed; never finished and no one is working on it. + + * configure.in (E_UTIL_{CFLAGS,LIBS}): Remove soup-2.0 since + e-proxy is gone. + (EVOLUTION_MAIL_{CFLAGS,LIBS}): Remove soup-2.0 since the mailer + uses CamelHTTPStream now. + (EVOLUTION_EXECUTIVE_SUMMARY_{CFLAGS,LIBS}): Gone + (AC_OUTPUT): Remove my-evolution/Makefile + + * README: evolution no longer depends on soup + 2003-10-21 Dan Winship <danw@ximian.com> * configure.in (GNOME_COMPILE_WARNINGS): Turn off the annoying @@ -68,10 +68,6 @@ dependencies should be compiled in the order they are listed here): If you have a GNOME 2.0 installation, libgnomecanvas 2.0 is safe to use. - * libsoup 1.99.12 or later - - ftp://ftp.gnome.org/pub/gnome/sources/libsoup - * gtkhtml 3.0.1 or later ftp://ftp.gnome.org/pub/gnome/sources/gtkhtml diff --git a/configure.in b/configure.in index b29fd92db0..9679a64817 100644 --- a/configure.in +++ b/configure.in @@ -1109,7 +1109,7 @@ EVO_SET_COMPILE_FLAGS(E_NAME, libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQ AC_SUBST(E_NAME_CFLAGS) AC_SUBST(E_NAME_LIBS) -EVO_SET_COMPILE_FLAGS(E_UTIL, gthread-2.0 gconf-2.0 libxml-2.0 libbonoboui-2.0 libglade-2.0 gal-2.2 >= $GAL_REQUIRED libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 soup-2.0 $mozilla_nspr, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS) +EVO_SET_COMPILE_FLAGS(E_UTIL, gthread-2.0 gconf-2.0 libxml-2.0 libbonoboui-2.0 libglade-2.0 gal-2.2 >= $GAL_REQUIRED libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 $mozilla_nspr, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS) AC_SUBST(E_UTIL_CFLAGS) AC_SUBST(E_UTIL_LIBS) @@ -1146,12 +1146,6 @@ AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS) AC_SUBST(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS) fi -dnl -- evolution-executive-summary flags - -EVO_SET_COMPILE_FLAGS(EVOLUTION_EXECUTIVE_SUMMARY, libbonoboui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libgnomeui-2.0 libglade-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 soup-2.0 libgtkhtml-3.1 >= $GTKHTML_REQUIRED) -AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS) -AC_SUBST(EVOLUTION_EXECUTIVE_SUMMARY_LIBS) - dnl --- evolution-calendar flags EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED, ${GTKHTML_CFLAGS}, ${GTKHTML_LIBS}) @@ -1166,7 +1160,7 @@ fi dnl --- evolution-mail flags -EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-module-2.0 soup-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED libxml-2.0 bonobo-activation-2.0 gthread-2.0 gconf-2.0 $mozilla_nss) +EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-2.2 >= $GAL_REQUIRED libglade-2.0 gnome-vfs-module-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.1 >= $GTKHTML_REQUIRED libxml-2.0 bonobo-activation-2.0 gthread-2.0 gconf-2.0 $mozilla_nss) AC_SUBST(EVOLUTION_MAIL_CFLAGS) AC_SUBST(EVOLUTION_MAIL_LIBS) @@ -1397,7 +1391,6 @@ shell/Makefile shell/evolution-nognome shell/glade/Makefile shell/importer/Makefile -my-evolution/Makefile ui/Makefile views/Makefile views/addressbook/Makefile diff --git a/executive-summary/.cvsignore b/executive-summary/.cvsignore deleted file mode 100644 index a098ff204f..0000000000 --- a/executive-summary/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -core -Makefile.in -Makefile -GNOME_Evolution_Summary.oaf diff --git a/executive-summary/ChangeLog b/executive-summary/ChangeLog deleted file mode 100644 index fe9ebfed88..0000000000 --- a/executive-summary/ChangeLog +++ /dev/null @@ -1,913 +0,0 @@ -2003-02-06 Ettore Perazzoli <ettore@ximian.com> - - * component/e-summary-factory.c (control_activate): Get - evolution-executive-summary.xml from EVOLUTION_UI_DIRECTORY. - -2001-09-14 Ettore Perazzoli <ettore@ximian.com> - - [Automake 1.5 fixes pointed out by Richard Boulton - <richard@tartarus.org>, as per #9258.] - - * executive-summary/component/Makefile.am (CLEANFILE): Assign - directly with `=', not `+='. - * executive-summary/evolution-services/Makefile.am: Likewise. - -2001-07-21 Ettore Perazzoli <ettore@ximian.com> - - * component/component-factory.c: Make the "executive-summary" - folders non-user-creatable by setting `user_creatable' to %FALSE - in the `EvolutionShellComponentFolderType's. - -2001-06-18 Dan Winship <danw@ximian.com> - - * test-service/Makefile.am (test_service_LDADD): Remove DB3_LDADD - - * component/Makefile.am (evolution_executive_summary_LDADD): - Remove DB3_LDADD - -2001-06-04 Ettore Perazzoli <ettore@ximian.com> - - * component/Makefile.am (evolution_executive_summary_LDADD): Move - `libevolution-services.la' on top. - -2001-06-03 Ettore Perazzoli <ettore@ximian.com> - - * test-service/Makefile.am (rdf_summary_LDADD): Move - `$(DB3_LDADD)' before the shared libraries. - - * component/Makefile.am (evolution_executive_summary_LDADD): Move - `$(DB3_LDADD)' before libeutil. - -2001-06-01 Ettore Perazzoli <ettore@ximian.com> - - * component/Makefile.am (evolution_executive_summary_LDADD): Add - `$(DB3_LDADD)'. - * test-service/Makefile.am (test_service_LDADD): Likewise. - (rdf_summary_LDADD): Likewise. - -2001-05-27 Dan Winship <danw@ximian.com> - - * component/e-summary-factory.c: #include - "evolution-shell-component-utils.h" rather than "e-gui-utils.h" - for e_pixmaps_update. - - * component/Makefile.am (evolution_executive_summary_LDADD): Use - libeshell.la, not libeshell.a (Did Peter forget to commit this?) - -2001-05-25 Peter Williams <peterw@ximian.com> - - * component/Makefile.am: Reference libeshell.la instead of libeshell.a. - -2001-05-23 Kjartan Maraas <kmaraas@gnome.org> - - * component/e-summary-url.c: Mark a string for translation. - -2001-05-10 Iain Holmes <iain@ximian.com> - - * test-service/rdf-summary.c (load_from_stream): Set the time, not the - timeout id. (duh!) - (summary_to_string): Get the time, not the timeout id. (DUH!) - (property_control): Connect the spin button to the item_changed callback. - -2001-05-10 Iain Holmes <iain@ximian.com> - - * test-service/rdf-summary.c (property_control): Don't let the spinner - be set to 0 - -2001-05-10 Iain Holmes <iain@ximian.com> - - * test-service/rdf-summary.c (download_cb): Proxy clicked events to - download. - (property_control): Connect the Update Now button to the download_cb - instead of download to prevent a crash. - -2001-05-05 Gediminas Paulauskas <menesis@delfi.lt> - - * component/Makefile.am, evolution-services/Makefile.am: no need of - -DEVOLUTION_VERSION - - * component/e-summary-callbacks.c: translate window title. - - * component/e-summary-url.c (e_summary_url_describe): contents are in - utf-8, convert to locale. - - * test-service/Makefile.am: define EVOLUTION_LOCALEDIR. - - * test-service/rdf-summary.c: init gettext. - -2001-05-02 Gediminas Paulauskas <menesis@delfi.lt> - - * component/e-summary.c: set default content type of html to - "text/html; charset=utf-8". - -2001-04-25 Dan Winship <danw@ximian.com> - - * idl/Makefile.am (INCLUDES): Remove this section, which doesn't - apply to anything since there are no targets in this directory. - - * test-service/Makefile.am: - * evolution-services/Makefile.am: - * component/Makefile.am: Remove UNICODE_LIBS/UNICODE_CFLAGS - -2001-04-14 Michael Meeks <michael@ximian.com> - - * idl/Makefile.am: Remove stale build cruftiness. - -2001-04-10 Gediminas Paulauskas <menesis@delfi.lt> - - * widgets/e-summary-subwindow.c: added some missing includes. - * widgets/e-summary-title-button.h: same. - -2001-04-04 Gediminas Paulauskas <menesis@delfi.lt> - - * component/component-factory.c: last time I've broken shortcut view. - renamed icons properly. - -2001-04-01 Gediminas Paulauskas <menesis@delfi.lt> - - * component/component-factory.c: Changed folder type icon to tiny - executive summary icon. - * component/e-summary-factory.c: replaced set_pixmap with new EPixmap - cache. - -2001-03-29 Kjartan Maraas <kmaraas@gnome.org> - - * *.*: Clean up includes. Remove/replace <gnome.h>, <bonobo.h> - and <gtk/gtk.h>. - -2001-03-08 Ettore Perazzoli <ettore@ximian.com> - - * component/component-factory.c (factory_fn): Specify a NULL - `EvolutionShellComponentGetDndSelectionFn'. - -2001-02-14 Iain Holmes <iain@ximian.com> - - * component/e-summary-url.c (e_summary_url_click): Remove the new - OTHER uri stuff. - -2001-02-14 Christopher James Lahey <clahey@ximian.com> - - * component/component-factory.c (component_destroy_cb): Removed - this unused function. - - * evolution-services/executive-summary-html-view.c - (impl_GNOME_Evolution_Summary_HTMLView_handleURI): Changed the - declaration of this function to match the signature in the - generated header file. - - * test-service/rdf-summary.c (property_control): Added a cast here. - -2001-02-14 Iain Holmes <iain@ximian.com> - - * evolution-services/executive-summary-html-view.c - (executive_summary_html_view_destroy): Don't unref the event source. - (impl_GNOME_Evolution_Summary_HTMLView_handleURI): Emit the signal. - (corba_class_init): Hook up the handleURI method. - (executive_summary_html_view_class_init): Create the signal. - - * idl/HTMLView.idl: Add the handleURI method. - -2001-02-13 Iain Holmes <iain@ximian.com> - - * test-service/rdf-summary.c (property_control): Add an update now button. - -2001-02-12 Iain Holmes <iain@ximian.com> - - * test-service/rdf-summary.c (property_control): Add a "Update" spinner. - (property_action): Only download a new RDF if the URL changed. Use a cached - version otherwise. - -2001-02-08 Iain Holmes <iain@ximian.com> - - * component/e-summary-url.c (e_summary_url_click): Close and remove the - window on an idle, so that the whole desktop isn't locked by a - GNOME-VFS bug. - -2001-02-13 Kjartan Maraas <kmaraas@gnome.org> - - * Makefile.am: xml-i18n-tools setup for .oaf.in files. - * GNOME_Evolution_Summary.oaf.in: Mark strings for translation. - * test-service/Makefile.am: xml-i18n-tools setup for .oaf.in files. - * test-service/*.oaf.in: Mark strings for translation. - -2001-01-23 Iain Holmes <iain@ximian.com> - - * component/e-summary.c (e_summary_load_page): Don't strdup the NULL. - -2001-01-20 Iain Holmes <iain@ximian.com> - - * component/e-summary.c (e_summary_display_window): Free the html - variable and the header too. - -2001-01-22 Christopher James Lahey <clahey@helixcode.com> - - * component/e-summary-url.c: Change the callbacks in this file to - match the callback function types. Fixes warnings. - -2001-01-12 Ettore Perazzoli <ettore@helixcode.com> - - * component/component-factory.c (factory_fn): Pass NULL as the - @copy_folder_fn arg to `evolution_shell_component_new()'. - - * evolution-services/executive-summary-component.c - (executive_summary_component_destroy): Remove unused variable. - -2001-01-12 Iain Holmes <iain@ximian.com> - - * component/e-summary-util.c (e_summary_rm_dir): If base == NULL return; - Closes bug #37077 - -2000-12-30 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_rebuild_page): The number of columns - is no longer hardcoded. - - * component/e-summary-prefs.[ch]: Add a columns member, and all the - necessary code to support it. - - * component/e-summary-callbacks.c: Set the columns member. - - * test-service/rdf-summary.c: Add a "Show title" button for turning off - the title if it is taking up too much room. - -2000-12-29 Iain Holmes <iain@helixcode.com> - - * test-service/rdf-summary.c (view_destroyed): Cancel all pending - async downloads. - (load_from_stream): Check if the XML was correctly loaded. - (read_callback): - (close_callback): - (open_callback): Add a cast to remove warnings - - * component/e-summary.c (listener_event): Check for the correct event names. - -2000-12-28 Iain Holmes <iain@helixcode.com> - - * test-service/rdf-summary.c (create_view): Aggregate a - Bonobo::PersistStream interface. - (load_from_stream): - (summary_to_string): - (save_to_stream): - (content_types): Functions to load and save an XML document. - -2000-12-26 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (make_control_html): Neatened the code. - (e_summary_add_service): Get the event source that is shared - between everything. - - * component/e-summary-url.c (e_summary_url_click): Use the shared - event source. - - * test-service/rdf-summary.c (create_view): Use the EventSource when - creating the BonoboPropertyBag. - - * test-service/main.c (create_view): Create a shared BonoboEventSource. - -2000-12-21 Iain Holmes <iain@helixcode.com> - - * test-service/rdf-summary.c (download): Split this function into - many callbacks, for async action. - - * component/e-summary-url.c (e_summary_url_request): Split this - into async callbacks too. - -2000-12-13 Christopher James Lahey <clahey@helixcode.com> - - * component/e-summary-callbacks.c (configure_summary): Added a - cast. - -2000-12-13 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_rebuild_page): Display all the windows - correctly. - (e_summary_save_state): Remove the whole of the Executive-Summary dir. - - * component/e-summary-util.[ch]: Add e_summary_rm_dir, a function to reove - everything in the path. RC people have a function to do it too, but I can't - remember how to get RC :) - - * component/e-summary-callbacks.c: (configure_summary): Put an HTML - explanation into the configure dialog. - -2000-12-13 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_rebuild_page): Count the number - of rows correctly. - -2000-12-12 Christopher James Lahey <clahey@helixcode.com> - - * component/e-summary-callbacks.c: Added #include - <e-summary-callbacks.h>. - (destroy_prefs_cb): Added a cast. - (configure_summary): Added a cast. - - * component/e-summary-callbacks.h: Added #include "e-summary.h" - - * component/e-summary-url.c (e_summary_url_click): Removed an - unused variable. - - * component/e-summary-util.c: Added #include <e-summary-util.h> - - * component/e-summary.c: Added #include <gtkhtml/htmlselection.h>. - (e_summary_queue_rebuild): Added a cast. - - * component/main.c: Added #include <glade/glade.h>. - - * test-service/main.c: Changed some variable types to make casting - easier. - - * test-service/rdf-summary.c: Changed some variable types to make - casting easier. - -2000-12-12 Dan Winship <danw@helixcode.com> - - * Makefile.am (EXTRA_DIST): Add stuff. (From campd.) - -2000-12-11 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-html-view.h: Add a define - for the "html_changed" signal to name space it. Change the - function declarations to fit with the below change too. - - * evolution-services/executive-summary-html-view.c - (executive_summary_html_view_new): Create a default BonoboEventSource - and use the new _full function. - (executive_summary_html_view_new_full): Creates a new HtmlView with - the given BonoboEventSource. - (executive_summary_html_view_get_event_source): Returns the - BonoboEventSource for the view. - (executive_summary_html_view_set_html): Use the new #define for the event - name. - - * test-service/rdf-summary.c (create_view): Share the BonoboEventSource - between the HtmlView and the BonoboPropertyControl. - - * component/e-summary.c (html_event): Use the name spaced #define. - (e_summary_start_load): Add a new hack to set the border width of the - GtkHTML widget to 0. - (e_summary_rebuild_page): Redid the way the tables are drawn. Made the - title icon be constrained to 48. - - * evolution-services/executive-summary-component.c - (impl_GNOME_Evolution_Summary_ComponentFactory_createViw): Fixed a warning. - - * component/e-summary-util (e_pixmap_file): Free the edir. - -2000-12-08 Iain Holmes <iain@helixcode.com> - - * summary.html: Don't hardcode the image paths. - -2000-12-08 JP Rosevear <jpr@helixcode.com> - - * component/Makefile.am (evolution-executive-summary.pure): Add purify - options for the build - -2000-12-08 JP Rosevear <jpr@helixcode.com> - - * Makefile.am: Remove files from extra_dist since they are already - listed - -2000-12-07 Iain Holmes <iain@helixcode.com> - - * summary.html: Prettier HTML summary. - - * Makefile.am: Install the new summary.html - - * component/e-summary.c (load_component): Free corba_subdir and - corba_stream. - (save_component): Free corba stuff. - - -2000-12-06 Iain Holmes <iain@helixcode.com> - - * e-summary-callbacks.c (new_mail): Update COMPOSER_IID to the new - style IIDs. - (configure_summary): Set up to do stuff when preferences are changed. - - * e-summary-prefs.c (e_summary_prefs_save): Sync and drop the config file - so that changes are written to disk. - - * e-summary.c (e_summary_reconfigure): Change the summary to the new - preferences. - -2000-12-04 Iain Holmes <iain@helixcode.com> - - * test-service/rdf-summary.c (entry_changed): Add a NULL for opt_ev. - - * idl/HtmlView.idl: Inherit from Bonobo::Unknown and not - Bonobo::EventSource. - - * evolution-services/executive-summary-html-view.[ch]: Change - implementation of the EventSource so that it is aggregated onto - the HtmlView object and not inherited. - - * component/e-summary.c (e_summary_window_free): Free the event_source. - (e_summary_add_service): query for the EventSource interface. - -2000-12-01 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_load_state): Fix memory leak. - (everywhere): Fixed memory leaks, and unref problems. - -2000-11-30 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_window_free): remove the - event listener before destruction. - - * component/e-summary-url.c (e_summary_url_click): Handle the - new PropertyControl api. Add a listener to detect when the page - is changed, and adjust the property box accordingly. - - * test-service/main.c (create_view): Increment running view. - -2000-11-29 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c: Big memory leak cleanup. - -2000-11-28 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_display_window): If the HTML - control dies, then just close the open tags. - - * component/e-summary-url (e_summary_url_click): Put the control - into a GnomePropertyBox. - - * evolution-services/executive-summary-component.c - (impl_GNOME_Evolution_Summary_ComponentFactory_createView): - Duplicate the component. - -2000-11-27 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_window_free): Free all the - interfaces and the component. - (e_summary_load_state): Fix typos. - - * component/e-summary-prefs.c: Fix some typos. - - * component/e-summary-url.c: If configure is pressed, retrieve - the control and embed it in a window. - - * test-services/main.c (component_destroyed): assign ud from data - not from ud! - - * test-services/rdf-summary.c (view_destroyed): Connect this - callback and free the summary. - (property_control): Made a simple configuration dialog. - -2000-11-25 Iain Holmes <iain@helixcode.com> - - * component/e-summary-prefs.[ch]: New files to handle loading, - saving, copying and freeing preferences. - - * component/e-summary.c (e_summary_save_state): Use the new - prefs stuff to save. - (e_summary_load_state): Use the new prefs stuff to load. - - * component/e-summary-factory.c (set_pixmap): Use e_pixmap_file - to find the pixbuf. - -2000-11-24 Iain Holmes <iain@helixcode.com> - - * idl/SummaryComponent.idl: Removed the setOwner and unsetOwner - methods from the Component interface. - - * evolution-services/executive-summary.[ch] - evolution-services/executive-summary-client.[ch] - evolution-services/executive-summary-component-client.[ch] - evolution-services/executive-summary-component-view.[ch]: - Removed. - - * component/main.c (main): Stopped ignoring the signals. - - * component/executive-summary-config.glade: Glade file for the - prefs dialog. - -2000-11-23 Iain Holmes <iain@helixcode.com> - - * component/e-summary-factory.c (embed-service): Moved to - e-summary-callbacks.c. - (e_summary_factory_embed_from_id): Moved to e-summary.c and renamed - e_summary_embed_from_id. - Added a New Mail button. - - * component/e-summary-callbacks.c: New file. - -2000-11-22 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_save_state): removed the #if 0s - and changed the save type to fs. - -2000-11-21 Iain Holmes <iain@helixcode.com> - - * test-services/rdf-summary.c: Rewrote to use the new services code. - - * idl/HtmlView.idl: Inherit from Bonobo::EventSource instead of - Bonobo::Unknown. - -2000-11-20 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_save_state): #if 0'd out the - PersistStream code till it is fixed. - (e_summary_window_free): Only Bonobo_Unknown_unref the component, - not all the other interfaces. - (e_summary_remove_window): Function to remove the window from the - window list and free it. - (make_control_html): Make "id" the address of the window structure. - - * component/e-summary-url.c: Reimplemented all the functions that the - Executive Summary had before the big code change. - -2000-11-18 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_save_state): Use Persist stream to - save the state of all the components. - (e_summary_load_state): Use Persist stream to load the components again. - (e_summary_add_service): Add a Property Listener to the property bag to - be notified of changes to the title or icon. - -2000-12-07 Dave Camp <dave@helixcode.com> - - * evolution-services/evolution-summary-component.c: Don't include - executive-summary-client.h. - -2000-12-07 Dave Camp <dave@helixcode.com> - - * idl/Makefile.am (IDLS): Include HtmlView.idl - -2000-11-29 Dan Winship <danw@helixcode.com> - - * component/main.c (main): Remove no-longer-needed e_unicode_init. - -2000-17-10 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (make_control_html): Set the configure button - active if there is a Bonobo_PropertyControl object associated with the - window. - - * Makefile.am: Remove the widgets subdirectory. - -2000-16-10 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_display_window): Use the property - bag to get the window title and icon. - - * test-service/main.c: (create_view): Add a PropertyBag to the object. - (set_property): Set the properties. - (get_property): Get the properties. - -2000-15-10 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-component-factory-client.[ch]: - A client for the factory stuff. - -2000-14-10 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-html-view.[ch]: Implementation - of the HtmlView interface. - - * component/e-summary-factory.c - (e_summary_factory_embed_service_from_id): Rewrote to use the new - component_factory. - - * component/e-summary.c (e_summary_add_service): Rewrote to use - the new component stuff. Lots of queryInterfaces :) - (e_summary_window_free): Rewrote. - - * test-service/main.c: Rewrote completely as an example of the - new services. - -2000-13-10 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-component.c: - Created the ExecutiveSummaryComponentFactory type, that implements - GNOME/Evolution/Summary/ComponentFactory. Changed the way - GNOME/Evolution/Summary/Component is implemented. - - * idl/SummaryComponent.idl: Removed all methods from Component - execpt setOwner and unsetOwner. Added ComponentFactory interface - with a createView method. - - * idl/HtmlView.idl: New interface for HTML services. One method - getHtml. - -2000-11-10 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-component-view.c - (executive_summary_component_view_set_title): Removed the - "wrong side" warning. - - * component/e-summary-factory.c (set_icon): Change the view's - icon. - (e_summary_factory_embed_service_from_id): Connect to the set_icon - signal. - -2000-11-09 Iain Holmes <iain@helixcode.com> - - * test-service/rdf-summary.c: Made Alan Cox's rdf-engine.c from - Portaloo into a summary component. - -2000-11-08 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_window_free): Remove the view - from the id_to_view hash table. - (make_control_html): Fix the bottom row comparison. - -2000-11-07 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_load_state): Load the HTML - page for the background. - (load_html_page): Use GnomeVFS to load this page, and split it - into a header and footer. - (e_summary_rebuild_page): If a header and footer exist, use them - otherwise just load the default. - -2000-11-06 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (on_object_requested): Load a bonobo - service and try to get it to display (Not working yet). - -2000-11-04 Iain Holmes <iain@helixcode.com> - - * test-service/test-bonobo.c: New file to test Bonobo control - based services. - - * test-service/test-service.oafinfo: Added the details for the - test-bonobo service. - -2000-11-03 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (make_control_html): Make a neater - function to create the window controls. Check if a window can - be moved in a certain direction before making a link. - - * evolution-services/executive-summary-component-view.c: Added a - GtkWidget to the private structure to store the control's widget. - -2000-11-03 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-component-view.c: - (executive_summary_component_view_class_init): Add a "configure" - signal. - - * evolution-services/executive-summary-component-view.h: Add the - default handler in the class type. - - * idl/SummaryComponent.idl: Add an id to the configure method. - - * evolution-services/executive-summary-component-client.[ch]: - executive_summary_component_client_configure: Takes a View param. - - * component/e-summary-factory.c: Connect to the configure signal - of the created view and call the configure method. - - * component/e-summary-url.c: When the [?] is clicked, emit the - configure signal. - - * test-service/main.c: Connect the configure signal to something. - -2000-11-21 Radek Doulik <rodo@helixcode.com> - - * component/e-summary.c (e_summary_rebuild_page): use html_engine_is_selection_active - added some includes - -2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu> - - * component/e-summary-factory.c: (control_activate_cb), - (embed_service): - * evolution-executive-summary.oafinfo: - * test-service/test-service.oafinfo: - Update the remaining "IDL:Evolution*" to "IDL:GNOME/Evolution*" - to sync up with yesterday's IDL re-scoping. - -2000-11-10 Matt Bissiri <bissiri@eecs.umich.edu> - - * component/Makefile.am: Regenerate the idl-generated files - if composer idl changes. - -2000-11-03 Federico Mena Quintero <federico@helixcode.com> - - * evolution-services/Makefile.am: Clean the idl-generated files - properly. - -2000-11-01 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c: - component/e-summary-factory.c: - component/e-summary-url.c: Warning's cleanup. - -2000-11-01 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_rebuild_page): Requeue the redraw - if there is a selection on the widget. - -2000-11-01 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_display_window): Draw the window - controls to move, close and configure the window. - (e_summary_window_move_(left|right|up|down)): Move the window around the - window list. - - * component/e-summary-url.c (e_summary_url_click): Add handlers for the - window control URIs (close:// configure:// up:// down:// left:// and - right://). - (get_protocol): Add support for the new protocols. - (parse_uri): Ditto. - (e_summary_url_describe): ditto. - -2000-10-30 Iain Holmes <iain@helixcode.com> - - * component/e-summary-factory.c (embed_service): Generate the uid here - and pass it into the create_view method. - - * evolution-services/executive-summary-component-client.c - (executive_summary_component_client_create_view): Use the passed in UID - to generate a view. - - * evolution-services/executive-summary-component.c - (impl_Evolution_SummaryComponent_create_view): Don't generate the id here - but use the passed in one instead. - - * idl/SummaryComponent.idl: create_view now takes an ID parameter. - -2000-10-26 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (load_default): Neaten the Report bug link. - (e_summary_end_load): Put in a <hr> and a mailto to me. - (e_summary_new): Create an EvolutionShellClient from the Evolution_Shell. - (e_summary_get_shell_client): Retrieve the shell-client. - - * component/e-summary-url.c (e_summary_url_click): On a PROTOCOL_VIEW - change the current view to the one specified in the URL. - -2000-10-28 Ettore Perazzoli <ettore@helixcode.com> - - * component/Makefile.am (INCLUDES): Add - `-I$(top_builddir)/executive-summary/evolution-services' and - `-I$(top_srcdir)/executive-summary/evolution-services'. - -2000-10-25 Iain Holmes <iain@helixcode.com> - - * component/e-summary-url.c (e_summary_url_exec): Execute a program - specified in the format "exec://program args". - (e_summary_url_mail_compose): Run the mail composer when a mailto: - URL is clicked. - -2000-10-25 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (e_summary_start_load): Add a hack to stop the - GtkHTML widget returning to the top when it is redrawn. - - * component/e-summary-url.[ch] - * component/e-summary-util.[ch]: Split some functions out of e-summary.c - - * component/Makefile.am: Added the new files, and run orbit-idl on the - mail composer idl. - -2000-10-25 <jpr@helixcode.com> - - * component/e-summary-factory.c (control_activate): User - bonobo_control_get_remote_uid_container, not the old version - -2000-10-25 Iain Holmes <iain@helixcode.com> - - * test-service/main.c: Store each individual views data with the view. - Add comments to explain everything. - - * evolution-services/executive-summary-component.c - (impl_Evolution_SummaryComponent_create_view): Only try to create a - control if the returned control != NULL. - -2000-10-25 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary-component.c - (impl_Evolution_SummaryComponent_create_view): Set the UID of the view - before passing it to the create_view method. - -2000-10-25 Iain Holmes <iain@helixcode.com> - - * idl/Summary.idl: Added set_icon method, and changed update_html_component - to update_component. Made all methods take a long ID instead of an - SummaryComponent. - - * idl/SummaryComponent.idl: Combined the create_bonobo_view and - create_html_view into create_view. - Added a destroy_view method. - - * evolution-services/Makefile.am: Added the 2 new files. - - * evolution-services/executive-summary-component-view.[ch]: New - files implementing a view of an ExecutiveSummaryComponent. - - * evolution-services/executive-summary.[ch] - * evolution-services/executive-summary-client.[ch] - * evolution-services/executive-summary-component.[ch] - * evolution-services/executive-summary-component-client.[ch]: - * component/e-summary-factory.c - * component/e-summary.c - * test-service/main.c: - Updated to use new methods and the new ExecutiveSummaryComponentView - object. - -2000-10-16 Iain Holmes <iain@helixcode.com> - - * evolution-services/executive-summary.c (executive_summary_class_init): - Implement the update, set_title and flash functionality as signals - instead of methods. - (impl_Evolution_Summary_set_title): Emit signal. - (impl_Evolution_Summary_flash): Emit signal. - (impl_Evolution_Summary_update_html_component): Emit signal. - (executive_summary_new): Don't need the methods anymore. - (executive_summary_construct): Same. - (executive_summary_init): Remove the private initialisation. - -2000-10-23 Dan Winship <danw@helixcode.com> - - * idl/Makefile.am (INCLUDES): - * evolution-services/Makefile.am (INCLUDES): - * component/Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR - -2000-10-14 Ettore Perazzoli <ettore@helixcode.com> - - * evolution-executive-summary.oafinfo: Added - "evolution:shell-component-icon" property. - -2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com> - - * evolution-services/Makefile.am (IDLS): make the built sources - depend on the idl files - -2000-10-09 Iain Holmes <iain@helixcode.com> - - * idl/SummaryComponent.idl: Added an icon parameter to the - create_view methods. - - * evolution-services/executive-summary-component.c: Implement - the icon parameter. - - * evolution-services/executive-summary-component-client.c: Ditto - - * component/e-summary.c: Draw the specified icon. - - * component/e-summary-factory.c: Use the icon parameter. - -2000-10-09 Iain Holmes <iain@helixcode.com> - - * evolution-services/Makefile.am: Added $(EXTRA_GNOME_CFLAGS) to - find gnomesupport.h - -2000-10-06 Iain Holmes <iain@helixcode.com> - - * component/e-summary.c (request_cb): Use gnome-vfs to retrieve - the requested files. Allows services to specify remote urls. - (load_default, e_summary_display_window, e_summary_rebuild_page): - Change the html to match TigerT's lovely design. - (e_summary_add_html_service, e_summary_add_html_service): Add - the client argument so we can destroy it when we've quit. - (e_summary_window_update): Only do an update if there isn't one - pending. - - * component/e-summary-factory.c (embed_service): upd. - - * test-service/main.c: Made the test service be really silly and count - the number of seconds since it was started. - -2000-10-06 Ettore Perazzoli <ettore@helixcode.com> - - * component/Makefile.am (INCLUDES): Fix builddir != srcdir. - -2000-10-05 Chris Toshok <toshok@helixcode.com> - - * widgets/.cvsignore: ignore more stuff. - - * .cvsignore: ignore more stuff. - - * idl/.cvsignore: ignore more stuff. - - * evolution-services/.cvsignore: ignore more stuff. - - * component/.cvsignore: ignore more stuff. - - * .cvsignore: add Makefile - -2000-10-05 Chris Toshok <toshok@helixcode.com> - - * component/component-factory.c: include - <gal/widgets/e-gui-utils.h> instead of "e-util/e-gui-utils.h" to - clear up e_notice declaration, and #include <gnome.h> to get "_". - -2000-10-05 Michael Meeks <michael@helixcode.com> - - * component/e-summary-factory.c (control_activate): upd. - (set_pixmap): upd. (update_pixmaps): upd. - (control_activate_cb): upd. - (control_deactivate): upd. - -2000-10-04 Iain Holmes <iain@helixcode.com> - - * idl/SummaryComponent.idl: Added a title argument to the - create_view methods. - -2000-09-13 Iain Holmes <iain@helixcode.com> - - * Started the Executive Summary diff --git a/executive-summary/Makefile.am b/executive-summary/Makefile.am deleted file mode 100644 index 6d9aa83a17..0000000000 --- a/executive-summary/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -SUBDIRS = idl evolution-services component test-service - -oafdir = $(datadir)/oaf -oaf_in_files = GNOME_Evolution_Summary.oaf.in -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) - -@XML_I18N_MERGE_OAF_RULE@ - -htmldir = $(datadir)/evolution -html_DATA = summary.html - -EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) $(html_DATA) diff --git a/executive-summary/component/.cvsignore b/executive-summary/component/.cvsignore deleted file mode 100644 index 75f1a012f2..0000000000 --- a/executive-summary/component/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -core -Makefile.in -Makefile -.deps -.libs -evolution-executive-summary -Composer-common.c -Composer.h -Composer-stubs.c -Composer-skels.c
\ No newline at end of file diff --git a/executive-summary/component/Makefile.am b/executive-summary/component/Makefile.am deleted file mode 100644 index 356665d777..0000000000 --- a/executive-summary/component/Makefile.am +++ /dev/null @@ -1,88 +0,0 @@ -bin_PROGRAMS = evolution-executive-summary - -INCLUDES = \ - -I$(top_srcdir)/widgets \ - -I$(top_srcdir)/widgets/e-text \ - -I$(top_srcdir) \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/shell \ - -I$(top_builddir)/executive-summary \ - -I$(top_srcdir)/executive-summary \ - -I$(top_builddir)/executive-summary/evolution-services \ - -I$(top_srcdir)/executive-summary/evolution-services \ - $(EXTRA_GNOME_CFLAGS) \ - $(GNOME_VFS_CFLAGS) \ - $(GTKHTML_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DG_LOG_DOMAIN=\"evolution-executive-summary\" - -COMPOSER_GENERATED = \ - Composer.h \ - Composer-common.c \ - Composer-skels.c \ - Composer-stubs.c - -Composer-impl.o: Composer.h - -selectnamesdir = $(top_srcdir)/addressbook/gui/component/select-names - -IDLS = \ - $(selectnamesdir)/Evolution-Addressbook-SelectNames.idl \ - $(top_srcdir)/composer/Evolution-Composer.idl \ - $(top_srcdir)/composer/Composer.idl - -$(COMPOSER_GENERATED): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ - $(top_srcdir)/composer/Composer.idl - -evolution_executive_summary_SOURCES = \ - $(COMPOSER_GENERATED) \ - component-factory.c \ - component-factory.h \ - e-summary.c \ - e-summary.h \ - e-summary-callbacks.c \ - e-summary-callbacks.h \ - e-summary-factory.c \ - e-summary-factory.h \ - e-summary-prefs.c \ - e-summary-prefs.h \ - e-summary-url.c \ - e-summary-url.h \ - e-summary-util.c \ - e-summary-util.h \ - main.c - -evolution_executive_summary_LDADD = \ - $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \ - $(top_builddir)/shell/libeshell.la \ - $(top_builddir)/widgets/misc/libemiscwidgets.a \ - $(top_builddir)/e-util/libeutil.la \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(EXTRA_GNOME_LIBS) \ - -lgal \ - $(GTKHTML_LIBS) - -gladedir = $(datadir)/evolution-$(BASE_VERSION)/glade -glade_DATA = executive-summary-config.glade - -if ENABLE_PURIFY -PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ - -all-local: evolution-executive-summary.pure - -evolution-executive-summary.pure: evolution-executive-summary - @rm -f evolution-executive-summary.pure - $(PLINK) $(evolution_executive_summary_OBJECTS) $(evolution_executive_summary_LDADD) $(LIBS) - -endif - -EXTRA_DIST = $(glade_DATA) -CLEANFILES = $(COMPOSER_GENERATED) -BUILT_SOURCES = $(COMPOSER_GENERATED) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/executive-summary/component/component-factory.c b/executive-summary/component/component-factory.c deleted file mode 100644 index ab917251d2..0000000000 --- a/executive-summary/component/component-factory.c +++ /dev/null @@ -1,154 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.c - * - * Authors: Ettore Perazzoli <ettore@ximian.com> - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-generic-factory.h> - -#include "Evolution.h" -#include "evolution-storage.h" - -#include "evolution-shell-component.h" -#include <gal/widgets/e-gui-utils.h> - -#include "component-factory.h" -#include "e-summary-factory.h" - -#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Summary_ShellComponentFactory" - -static BonoboGenericFactory *factory = NULL; -static gint running_objects = 0; - -static const EvolutionShellComponentFolderType folder_types[] = { - { "executive-summary", "evolution-today.png", FALSE, NULL, NULL }, - { NULL, NULL } -}; - -char *evolution_dir; - -/* EvolutionShellComponent methods and signals */ - -static EvolutionShellComponentResult -create_view (EvolutionShellComponent *shell_component, - const char *physical_uri, - const char *folder_type, - BonoboControl **control_return, - void *closure) -{ - EvolutionShellClient *shell_client; - GNOME_Evolution_Shell corba_shell; - BonoboControl *control; - - if (g_strcasecmp (folder_type, "executive-summary") != 0) - return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; - - shell_client = evolution_shell_component_get_owner (shell_component); - corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); - - control = e_summary_factory_new_control (physical_uri, corba_shell); - if (!control) - return EVOLUTION_SHELL_COMPONENT_NOTFOUND; - - *control_return = control; - - return EVOLUTION_SHELL_COMPONENT_OK; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - EvolutionShellClient *shell_client, - const char *evolution_homedir, - gpointer user_data) -{ - GNOME_Evolution_Shell corba_shell; - - evolution_dir = g_strdup (evolution_homedir); - - corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); -} - -static void -owner_unset_cb (EvolutionShellComponent *shell_component, - gpointer user_data) -{ - gtk_main_quit (); -} - -static void -factory_destroy (BonoboObject *component, - gpointer dummy) -{ - running_objects--; - - if (running_objects > 0) - return; - - if (factory) - bonobo_object_unref (BONOBO_OBJECT (factory)); - else - g_warning ("Serious ref counting error"); - factory = NULL; - - gtk_main_quit (); -} - -static BonoboObject * -factory_fn (BonoboGenericFactory *factory, - void *closure) -{ - EvolutionShellComponent *shell_component; - - running_objects++; - - shell_component = evolution_shell_component_new (folder_types, - create_view, - NULL, NULL, NULL, NULL, NULL, - NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "destroy", - GTK_SIGNAL_FUNC (factory_destroy), NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", - GTK_SIGNAL_FUNC (owner_set_cb), NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset", - GTK_SIGNAL_FUNC (owner_unset_cb), NULL); - - return BONOBO_OBJECT (shell_component); -} - -void -component_factory_init (void) -{ - if (factory != NULL) - return; - - factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID, - factory_fn, NULL); - - if (factory == NULL) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot initialize Evolution's Executive Summary component.")); - exit (1); - } -} diff --git a/executive-summary/component/component-factory.h b/executive-summary/component/component-factory.h deleted file mode 100644 index fc10a08046..0000000000 --- a/executive-summary/component/component-factory.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.h - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef COMPONENT_FACTORY_H -#define COMPONENT_FACTORY_H - -void component_factory_init (void); - -#endif - - diff --git a/executive-summary/component/e-summary-callbacks.c b/executive-summary/component/e-summary-callbacks.c deleted file mode 100644 index 1eff427af9..0000000000 --- a/executive-summary/component/e-summary-callbacks.c +++ /dev/null @@ -1,320 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-callbacks.c - * - * Author: - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <libgnomeui/gnome-propertybox.h> -#include <libgnomeui/gnome-file-entry.h> -#include <libgnome/gnome-i18n.h> - -#include <bonobo/bonobo-selector.h> - -#include <stdlib.h> /* For atoi */ - -#include <liboaf/liboaf.h> -#include <glade/glade.h> -#include <gtkhtml/gtkhtml.h> -#include <e-util/e-html-utils.h> - -#include "e-summary.h" -#include "e-summary-callbacks.h" - -#include "Composer.h" - -#define COMPOSER_IID "OAFIID:GNOME_Evolution_Mail_Composer" -typedef struct _PropertyData { - ESummary *esummary; - GnomePropertyBox *box; - GladeXML *xml; -} PropertyData; - -/* HTML helper functions from mail/mail-config-gui.c */ -static void -html_size_req (GtkWidget *widget, - GtkRequisition *requisition) -{ - requisition->height = GTK_LAYOUT (widget)->height; -} - -/* Returns a GtkHTML which is already inside a GtkScrolledWindow. If - * @white is TRUE, the GtkScrolledWindow will be inside a GtkFrame. - */ -static GtkWidget * -html_new (gboolean white) -{ - GtkWidget *html, *scrolled, *frame; - GtkStyle *style; - - html = gtk_html_new (); - GTK_LAYOUT (html)->height = 0; - gtk_signal_connect (GTK_OBJECT (html), "size_request", - GTK_SIGNAL_FUNC (html_size_req), NULL); - gtk_html_set_editable (GTK_HTML (html), FALSE); - style = gtk_rc_get_style (html); - - if (style) { - gtk_html_set_default_background_color (GTK_HTML (html), - white ? &style->white: - &style->bg[0]); - } - - gtk_widget_set_sensitive (html, FALSE); - scrolled = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), - GTK_POLICY_NEVER, GTK_POLICY_NEVER); - gtk_container_add (GTK_CONTAINER (scrolled), html); - if (white) { - frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (frame), - GTK_SHADOW_ETCHED_IN); - gtk_container_add (GTK_CONTAINER (frame), scrolled); - gtk_widget_show_all (frame); - } else { - gtk_widget_show_all (scrolled); - } - - return html; -} - -static void -put_html (GtkHTML *html, - const char *text) -{ - GtkHTMLStream *handle; - char *htmltext; - - htmltext = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL); - handle = gtk_html_begin (html); - gtk_html_write (html, handle, "<HTML><BODY>", 12); - gtk_html_write (html, handle, text, strlen (text)); - gtk_html_write (html, handle, "</BODY></HTML>", 14); - g_free (htmltext); - gtk_html_end (html, handle, GTK_HTML_STREAM_OK); -} - -void -embed_service (GtkWidget *widget, - ESummary *esummary) -{ - char *required_interfaces[2] = {"IDL:GNOME/Evolution:Summary:ComponentFactory:1.0", - NULL}; - char *obj_id; - - obj_id = bonobo_selector_select_id (_("Select a service"), - (const char **) required_interfaces); - if (obj_id == NULL) - return; - - e_summary_embed_service_from_id (esummary, obj_id); -} - -void -new_mail (GtkWidget *widget, - ESummary *esummary) -{ - GNOME_Evolution_Composer_RecipientList *to, *cc, *bcc; - CORBA_char *subject; - CORBA_Object composer; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - composer = oaf_activate_from_id ((char *)COMPOSER_IID, 0, NULL, &ev); - if (ev._major != CORBA_NO_EXCEPTION || composer == NULL) { - CORBA_exception_free (&ev); - g_warning ("Unable to start composer component!"); - return; - } - CORBA_exception_free (&ev); - - to = GNOME_Evolution_Composer_RecipientList__alloc (); - to->_length = 0; - to->_maximum = 0; - to->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0); - - cc = GNOME_Evolution_Composer_RecipientList__alloc (); - cc->_length = 0; - cc->_maximum = 0; - cc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0); - - bcc = GNOME_Evolution_Composer_RecipientList__alloc (); - bcc->_length = 0; - bcc->_maximum = 0; - bcc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0); - - subject = CORBA_string_dup (""); - - CORBA_exception_init (&ev); - GNOME_Evolution_Composer_setHeaders (composer, to, cc, - bcc, subject, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - CORBA_free (to); - CORBA_free (cc); - CORBA_free (bcc); - CORBA_free (subject); - - g_warning ("Error setting headers!"); - return; - } - - CORBA_free (to); - CORBA_free (cc); - CORBA_free (bcc); - CORBA_free (subject); - - GNOME_Evolution_Composer_show (composer, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("Error showing composer"); - return; - } - - CORBA_exception_free (&ev); - return; -} - -static void -destroy_prefs_cb (GtkObject *object, - PropertyData *data) -{ - gtk_object_unref (GTK_OBJECT(data->xml)); - g_free (data); -} - -static void -html_page_changed_cb (GtkEntry *entry, - PropertyData *data) -{ - ESummaryPrefs *prefs; - - /* Change the tmp prefs so that we can restore if the user cancels */ - prefs = data->esummary->tmp_prefs; - - if (prefs->page) - g_free (prefs->page); - - prefs->page = g_strdup (gtk_entry_get_text (entry)); - - gnome_property_box_changed (data->box); -} - -static void -column_spinner_changed_cb (GtkEntry *entry, - PropertyData *data) -{ - ESummaryPrefs *prefs; - char *value; - - prefs = data->esummary->tmp_prefs; - - gnome_property_box_changed (data->box); - value = gtk_entry_get_text (entry); - if (value == NULL || *value == '\0') - return; - - prefs->columns = atoi (value); -} - -static void -apply_prefs_cb (GnomePropertyBox *property_box, - int page, - ESummary *esummary) -{ - g_print ("Applying\n"); - - if (page != -1) - return; - - esummary->prefs = e_summary_prefs_copy (esummary->tmp_prefs); - - e_summary_reconfigure (esummary); -} - -void -configure_summary (GtkWidget *widget, - ESummary *esummary) -{ - static GtkWidget *prefs = NULL; - PropertyData *data; - GtkWidget *html_page; - GtkWidget *vbox, *html, *spinner; - char *tmp; - - if (prefs != NULL) { - g_assert (GTK_WIDGET_REALIZED (prefs)); - gdk_window_show (prefs->window); - gdk_window_raise (prefs->window); - return; - } - - data = g_new (PropertyData, 1); - data->esummary = esummary; - - if (esummary->tmp_prefs != NULL) { - e_summary_prefs_free (esummary->tmp_prefs); - } - - esummary->tmp_prefs = e_summary_prefs_copy (esummary->prefs); - - data->xml = glade_xml_new (EVOLUTION_GLADEDIR - "/executive-summary-config.glade", NULL); - prefs = glade_xml_get_widget (data->xml, "summaryprefs"); - data->box = GNOME_PROPERTY_BOX(prefs); - - vbox = glade_xml_get_widget (data->xml, "vbox"); - html = html_new (TRUE); - put_html (GTK_HTML(html), - _("You can select a different HTML page for the background " - "of the Executive Summary.\n\nJust leave it blank for the " - "default")); - gtk_box_pack_start (GTK_BOX (vbox), html->parent->parent, TRUE, TRUE, 0); - gtk_box_reorder_child (GTK_BOX (vbox), html->parent->parent, 0); - - html_page = glade_xml_get_widget (data->xml, "htmlpage"); - - if (esummary->prefs->page != NULL) - gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (html_page))), esummary->prefs->page); - - gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (html_page))), - "changed", GTK_SIGNAL_FUNC (html_page_changed_cb), - data); - - spinner = glade_xml_get_widget (data->xml, "columnspinner"); - - tmp = g_strdup_printf ("%d", esummary->prefs->columns); - gtk_entry_set_text (GTK_ENTRY (spinner), tmp); - g_free (tmp); - gtk_signal_connect (GTK_OBJECT (spinner), "changed", - GTK_SIGNAL_FUNC (column_spinner_changed_cb), data); - - gtk_signal_connect (GTK_OBJECT (prefs), "apply", - GTK_SIGNAL_FUNC (apply_prefs_cb), esummary); - - gtk_signal_connect (GTK_OBJECT (prefs), "destroy", - GTK_SIGNAL_FUNC (destroy_prefs_cb), data); - gtk_signal_connect (GTK_OBJECT (prefs), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), &prefs); -} - diff --git a/executive-summary/component/e-summary-callbacks.h b/executive-summary/component/e-summary-callbacks.h deleted file mode 100644 index 6b908d694c..0000000000 --- a/executive-summary/component/e-summary-callbacks.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __E_SUMMARY_CALLBACKS_H__ -#define __E_SUMMARY_CALLBACKS_H__ - -#include "e-summary.h" - -void embed_service (GtkWidget *widget, - ESummary *esummary); -void new_mail (GtkWidget *widget, - ESummary *esummary); -void configure_summary (GtkWidget *widget, - ESummary *esummary); -#endif diff --git a/executive-summary/component/e-summary-factory.c b/executive-summary/component/e-summary-factory.c deleted file mode 100644 index 42b666715d..0000000000 --- a/executive-summary/component/e-summary-factory.c +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-factory.c - * - * Authors: Ettore Perazzoli <ettore@ximian.com> - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-control.h> -#include <bonobo/bonobo-main.h> -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-generic-factory.h> -#include <bonobo/bonobo-ui-util.h> - -#include <liboaf/liboaf.h> - -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <gal/util/e-util.h> -#include "evolution-shell-component-utils.h" - -#include "e-summary-factory.h" - -#include "e-summary.h" -#include "e-summary-util.h" -#include "e-summary-callbacks.h" -#include "Evolution.h" - -#include <evolution-services/Executive-Summary.h> -#include <evolution-services/executive-summary-component.h> -#include <evolution-services/executive-summary-component-factory-client.h> - -static GList *control_list = NULL; - -BonoboUIVerb verbs[] = { - BONOBO_UI_UNSAFE_VERB ("AddService", embed_service), - BONOBO_UI_UNSAFE_VERB ("NewMail", new_mail), - BONOBO_UI_UNSAFE_VERB ("ESummarySettings", configure_summary), - BONOBO_UI_VERB_END -}; - -static EPixmap pixmaps [] = { - E_PIXMAP ("/Toolbar/AddService", "buttons/add-service.png"), - E_PIXMAP ("/Toolbar/NewMail", "buttons/compose-message.png"), - E_PIXMAP_END -}; - -static void -control_activate (BonoboControl *control, - BonoboUIComponent *ui_component, - ESummary *esummary) -{ - Bonobo_UIContainer container; - - container = bonobo_control_get_remote_ui_container (control); - bonobo_ui_component_set_container (ui_component, container); - bonobo_object_release_unref (container, NULL); - - bonobo_ui_component_add_verb_list_with_data (ui_component, verbs, esummary); - - bonobo_ui_component_freeze (ui_component, NULL); - - bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR, - EVOLUTION_UI_DIRECTORY "/evolution-executive-summary.xml", - "evolution-executive-summary"); - - e_pixmaps_update (ui_component, pixmaps); - - bonobo_ui_component_thaw (ui_component, NULL); -} - -static void -control_deactivate (BonoboControl *control, - BonoboUIComponent *ui_component, - ESummary *esummary) -{ - e_summary_unset_message (esummary); - bonobo_ui_component_unset_container (ui_component); -} - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - gpointer user_data) -{ - ESummary *summary; - BonoboUIComponent *ui_component; - Bonobo_ControlFrame control_frame; - GNOME_Evolution_ShellView shell_view_interface; - CORBA_Environment ev; - - ui_component = bonobo_control_get_ui_component (control); - g_assert (ui_component != NULL); - - if (gtk_object_get_data (GTK_OBJECT (control), "shell_view_interface") == NULL) { - control_frame = bonobo_control_get_control_frame (control); - if (control_frame == NULL) { - goto out; - } - - CORBA_exception_init (&ev); - shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, - "IDL:GNOME/Evolution/ShellView:1.0", - &ev); - CORBA_exception_free (&ev); - - if (shell_view_interface != CORBA_OBJECT_NIL) { - gtk_object_set_data (GTK_OBJECT (control), - "shell_view_interface", - shell_view_interface); - } else { - g_warning ("Control frame doesn't have Evolution/ShellView."); - } - - summary = E_SUMMARY (user_data); - e_summary_set_shell_view_interface (summary, - shell_view_interface); - } - - out: - if (activate) - control_activate (control, ui_component, user_data); - else - control_deactivate (control, ui_component, user_data); -} - -static void -control_destroy_cb (BonoboControl *control, - gpointer user_data) -{ - GtkWidget *esummary = user_data; - - control_list = g_list_remove (control_list, control); - - gtk_object_destroy (GTK_OBJECT (esummary)); -} - -BonoboControl * -e_summary_factory_new_control (const char *uri, - const GNOME_Evolution_Shell shell) -{ - BonoboControl *control; - GtkWidget *esummary; - - esummary = e_summary_new (shell); - if (esummary == NULL) - return NULL; - - gtk_widget_show (esummary); - - control = bonobo_control_new (esummary); - - if (control == NULL) { - gtk_object_destroy (GTK_OBJECT (esummary)); - return NULL; - } - - gtk_signal_connect (GTK_OBJECT (control), "activate", - control_activate_cb, esummary); - - gtk_signal_connect (GTK_OBJECT (control), "destroy", - control_destroy_cb, esummary); - - control_list = g_list_prepend (control_list, control); - - return control; -} diff --git a/executive-summary/component/e-summary-factory.h b/executive-summary/component/e-summary-factory.h deleted file mode 100644 index d047ebd491..0000000000 --- a/executive-summary/component/e-summary-factory.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-factory.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_FACTORY_H__ -#define _E_SUMMARY_FACTORY_H__ - -#include <Evolution.h> -#include "e-summary.h" - -BonoboControl *e_summary_factory_new_control (const char *uri, - const GNOME_Evolution_Shell shell); -ESummaryWindow *e_summary_factory_embed_service_from_id (ESummary *esummary, - const char *obj_id); - -#endif diff --git a/executive-summary/component/e-summary-prefs.c b/executive-summary/component/e-summary-prefs.c deleted file mode 100644 index fdf51ead1e..0000000000 --- a/executive-summary/component/e-summary-prefs.c +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-prefs.c: Preference handling routines. - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-config.h> -#include "e-summary-prefs.h" -#include "e-summary.h" - -void -e_summary_prefs_free (ESummaryPrefs *prefs) -{ - g_return_if_fail (prefs != NULL); - - g_free (prefs->page); - g_free (prefs); -} - -ESummaryPrefs * -e_summary_prefs_new (void) -{ - ESummaryPrefs *prefs; - - prefs = g_new0 (ESummaryPrefs, 1); - return prefs; -} - -ESummaryPrefs * -e_summary_prefs_copy (ESummaryPrefs *prefs) -{ - ESummaryPrefs *copy; - - g_return_val_if_fail (prefs != NULL, NULL); - - copy = e_summary_prefs_new (); - copy->page = g_strdup (prefs->page); - copy->columns = prefs->columns; - - return copy; -} - -gboolean -e_summary_prefs_compare (ESummaryPrefs *p1, - ESummaryPrefs *p2) -{ - if (p1 == p2) - return TRUE; - - if (strcmp (p1->page, p2->page) == 0) - return TRUE; - - if (p1->columns == p2->columns) - return TRUE; - - return FALSE; -} - -ESummaryPrefs * -e_summary_prefs_load (const char *path) -{ - ESummaryPrefs *prefs; - char *item; - - g_return_val_if_fail (path != NULL, NULL); - g_return_val_if_fail (*path != '\0', NULL); - - prefs = e_summary_prefs_new (); - - item = g_strdup_printf ("=%s/e-summary=/executive-summary/page", path); - prefs->page = gnome_config_get_string (item); - g_free (item); - - item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns=3", path); - prefs->columns = gnome_config_get_int (item); - g_free (item); - return prefs; -} - -void -e_summary_prefs_save (ESummaryPrefs *prefs, - const char *path) -{ - char *item; - - g_return_if_fail (prefs != NULL); - g_return_if_fail (path != NULL); - g_return_if_fail (*path != '\0'); - - item = g_strdup_printf ("=%s/e-summary=/executive-summary/page", path); - gnome_config_set_string (item, prefs->page); - g_free (item); - - item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns", path); - gnome_config_set_int (item, prefs->columns); - g_free (item); - - gnome_config_sync (); - gnome_config_drop_all (); -} diff --git a/executive-summary/component/e-summary-prefs.h b/executive-summary/component/e-summary-prefs.h deleted file mode 100644 index e7b2b9b127..0000000000 --- a/executive-summary/component/e-summary-prefs.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-prefs.h: Preference handling routines. - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_SUMMARY_PREFS_H__ -#define __E_SUMMARY_PREFS_H__ - -typedef struct _ESummaryPrefs ESummaryPrefs; -struct _ESummaryPrefs { - char *page; /* Background HTML page URL */ - int columns; /* Number of components per row (Default = 3) */ - - /* If anything is added here, don't forget to add - copy, compare, load and save routines to the appropriate - functions. */ -}; - -ESummaryPrefs *e_summary_prefs_new (void); -void e_summary_prefs_free (ESummaryPrefs *prefs); -ESummaryPrefs *e_summary_prefs_copy (ESummaryPrefs *prefs); -gboolean e_summary_prefs_compare (ESummaryPrefs *p1, - ESummaryPrefs *p2); -ESummaryPrefs *e_summary_prefs_load (const char *path); -void e_summary_prefs_save (ESummaryPrefs *prefs, - const char *path); - -#endif diff --git a/executive-summary/component/e-summary-url.c b/executive-summary/component/e-summary-url.c deleted file mode 100644 index ed4aa7af69..0000000000 --- a/executive-summary/component/e-summary-url.c +++ /dev/null @@ -1,851 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-url.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-property-control.h> -#include <bonobo/bonobo-event-source.h> -#include <bonobo/bonobo-widget.h> - -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-url.h> -#include <libgnome/gnome-exec.h> -#include <libgnomeui/gnome-propertybox.h> - -#include <stdlib.h> - -#include <gtkhtml/gtkhtml.h> -#include <gtkhtml/gtkhtml-stream.h> -#include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> - -#include <liboaf/liboaf.h> - -#include <libgnomevfs/gnome-vfs.h> -#include "e-summary.h" -#include "e-summary-url.h" -#include "e-summary-util.h" - -#include "Composer.h" - -typedef enum _ESummaryProtocol { - PROTOCOL_NONE, - PROTOCOL_HTTP, - PROTOCOL_MAILTO, - PROTOCOL_VIEW, - PROTOCOL_EXEC, - PROTOCOL_FILE, - PROTOCOL_CLOSE, - PROTOCOL_LEFT, - PROTOCOL_RIGHT, - PROTOCOL_UP, - PROTOCOL_DOWN, - PROTOCOL_CONFIGURE, - PROTOCOL_OTHER -} ESummaryProtocol; - -static char *descriptions[] = { - N_("Open %s with the default GNOME application"), - N_("Open %s with the default GNOME web browser"), - N_("Send an email to %s"), - N_("Change the view to %s"), - N_("Run %s"), - N_("Open %s with the default GNOME application"), - N_("Close %s"), - N_("Move %s to the left"), - N_("Move %s to the right"), - N_("Move %s into the previous row"), - N_("Move %s into the next row"), - N_("Configure %s"), - N_("Open %s with the default GNOME application") -}; - -typedef struct _PropertyDialog { - BonoboListener *listener; - int listener_id; - - Bonobo_EventSource eventsource; - GtkWidget *dialog; -} PropertyDialog; -#define COMPOSER_IID "OAFIID:GNOME_Evolution_Mail_Composer" - -#if HAVECACHE -static ESummaryCache *image_cache = NULL; -#endif - -gboolean e_summary_url_mail_compose (ESummary *esummary, - const char *url); -gboolean e_summary_url_exec (const char *exec); - -struct _DownloadInfo { - GtkHTMLStream *stream; - char *uri; - char *buffer; - - gboolean error; -}; -typedef struct _DownloadInfo DownloadInfo; - -static void -close_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - gpointer data) -{ - DownloadInfo *info = data; - if (info->error) { - gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR); - } else { - gtk_html_stream_close (info->stream, GTK_HTML_STREAM_OK); - } - - g_free (info->uri); - g_free (info->buffer); - g_free (info); -} - -static void -read_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - gpointer buffer, - GnomeVFSFileSize bytes_requested, - GnomeVFSFileSize bytes_read, - gpointer data) -{ - DownloadInfo *info = data; - if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { - g_warning ("Read error"); - info->error = TRUE; - gnome_vfs_async_close (handle, close_callback, info); - } - - if (bytes_read == 0) { - info->error = FALSE; - gnome_vfs_async_close (handle, close_callback, info); - } else { - gtk_html_stream_write (info->stream, buffer, bytes_read); - gnome_vfs_async_read (handle, buffer, 4095, read_callback, - info); - } -} - -static void -open_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - DownloadInfo *info) -{ - if (result != GNOME_VFS_OK) { - gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR); - g_free (info->uri); - g_free (info); - return; - } - - info->buffer = g_new (char, 4096); - gnome_vfs_async_read (handle, info->buffer, 4095, read_callback, info); -} - -void -e_summary_url_request (GtkHTML *html, - const gchar *url, - GtkHTMLStream *stream) -{ - char *filename; - GnomeVFSAsyncHandle *handle; - DownloadInfo *info; - - g_print ("url: %s\n", url); - if (strncasecmp (url, "file:", 5) == 0) { - url += 5; - filename = e_pixmap_file (url); - } else if (strchr (url, ':') >= strchr (url, '/')) { - filename = e_pixmap_file (url); - } else - filename = g_strdup (url); - - if (filename == NULL) { - gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR); - return; - } - - g_print ("Filename: %s\n", filename); - - info = g_new (DownloadInfo, 1); - info->stream = stream; - info->uri = filename; - info->error = FALSE; - - gnome_vfs_async_open (&handle, filename, GNOME_VFS_OPEN_READ, - (GnomeVFSAsyncOpenCallback) open_callback, info); -} - -static char * -parse_uri (const char *uri, - ESummaryProtocol protocol, - ESummary *esummary) -{ - char *parsed; - char *p; - int address; - ESummaryWindow *window; - - switch (protocol) { - - case PROTOCOL_HTTP: - /* "http://" == 7 */ - parsed = g_strdup (uri + 7); - break; - - case PROTOCOL_EXEC: - /* "exec://" == 7 */ - parsed = g_strdup (uri + 7); - break; - - case PROTOCOL_VIEW: - /* "view://" == 7 */ - parsed = g_strdup (uri + 7); - break; - - case PROTOCOL_MAILTO: - /* Fun. Mailto's might be "mailto:" or "mailto://" */ - if (strstr (uri, "mailto://") == NULL) { - parsed = (char *) (uri + 7); - } else { - parsed = (char *) (uri + 9); - } - - /* Now strip anything after a question mark, - as it is a parameter (that we ignore for the time being) */ - if ( (p = strchr (parsed, '?')) != NULL) { - parsed = g_strndup (parsed, p - parsed); - } else { - parsed = g_strdup (parsed); - } - - break; - - case PROTOCOL_CLOSE: - address = atoi (uri + 8); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_LEFT: - address = atoi (uri + 7); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_RIGHT: - address = atoi (uri + 8); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_UP: - address = atoi (uri + 5); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_DOWN: - address = atoi (uri + 7); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_CONFIGURE: - address = atoi (uri + 12); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - parsed = g_strdup (window->title); - break; - - case PROTOCOL_NONE: - case PROTOCOL_OTHER: - default: - /* Just return the uneditted uri. */ - parsed = g_strdup (uri); - break; - } - - return parsed; -} - -static ESummaryProtocol -get_protocol (const char *url) -{ - char *lowerurl; - ESummaryProtocol protocol = PROTOCOL_OTHER; - - lowerurl = g_strdup (url); - g_strdown (lowerurl); - - /* Check for no :/ */ - if (strstr (lowerurl, "://") == NULL) { - - /* Annoying alternative for mailto URLs */ - if (strncmp (lowerurl, "mailto:", 6) != 0) { - g_free (lowerurl); - return PROTOCOL_NONE; - } else { - g_free (lowerurl); - return PROTOCOL_MAILTO; - } - } - - switch (lowerurl[0]) { - case 'c': - switch (lowerurl[1]) { - case 'l': - if (strncmp (lowerurl + 2, "ose", 3) == 0) - protocol = PROTOCOL_CLOSE; - break; - case 'o': - if (strncmp (lowerurl + 2, "nfigure", 7) == 0) - protocol = PROTOCOL_CONFIGURE; - break; - } - - case 'd': - if (strncmp (lowerurl + 1, "own", 3) == 0) - protocol = PROTOCOL_DOWN; - break; - - case 'e': - if (strncmp (lowerurl + 1, "xec", 3) == 0) - protocol = PROTOCOL_EXEC; - break; - - case 'f': - if (strncmp (lowerurl + 1, "ile", 3) == 0) - protocol = PROTOCOL_FILE; - break; - - case 'h': - if (strncmp (lowerurl + 1, "ttp", 3) == 0) - protocol = PROTOCOL_HTTP; - break; - - case 'l': - if (strncmp (lowerurl + 1, "eft", 3) == 0) - protocol = PROTOCOL_LEFT; - break; - - case 'm': - if (strncmp (lowerurl + 1, "ailto", 5) == 0) - protocol = PROTOCOL_MAILTO; - break; - - case 'r': - if (strncmp (lowerurl + 1, "ight", 4) == 0) - protocol = PROTOCOL_RIGHT; - break; - - case 'u': - if (lowerurl[1] == 'p') - protocol = PROTOCOL_UP; - break; - - case 'v': - if (strncmp (lowerurl + 1, "iew", 3) == 0) - protocol = PROTOCOL_VIEW; - break; - - default: - break; - } - - g_free (lowerurl); - - return protocol; -} - -static void -property_apply (GnomePropertyBox *propertybox, - gint page_num, - Bonobo_PropertyControl control) -{ - CORBA_Environment ev; - - g_print ("page_num: %d\n", page_num); - - CORBA_exception_init (&ev); - Bonobo_PropertyControl_notifyAction (control, page_num, Bonobo_PropertyControl_APPLY, &ev); - CORBA_exception_free (&ev); -} - -static void -property_help (GnomePropertyBox *propertybox, - gint page_num, - Bonobo_PropertyControl control) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Bonobo_PropertyControl_notifyAction (control, page_num, Bonobo_PropertyControl_HELP, &ev); - CORBA_exception_free (&ev); -} - -static void -property_event (BonoboListener *listener, - char *event_name, - CORBA_any *any, - CORBA_Environment *ev, - gpointer user_data) -{ - PropertyDialog *data = (PropertyDialog *) user_data; - if (strcmp (event_name, BONOBO_PROPERTY_CONTROL_CHANGED) == 0) { - gnome_property_box_changed (GNOME_PROPERTY_BOX (data->dialog)); - return; - } -} - -static void -dialog_destroyed (GtkObject *object, - PropertyDialog *dialog) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Bonobo_EventSource_removeListener (dialog->eventsource, - dialog->listener_id, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error: %s", CORBA_exception_id (&ev)); - } - - bonobo_object_unref (BONOBO_OBJECT (dialog->listener)); - CORBA_exception_free (&ev); - g_free (dialog); -} - -struct _idle_data { - ESummary *esummary; - ESummaryWindow *window; -}; - -static gboolean -idle_remove_window (gpointer data) -{ - struct _idle_data *id = data; - - e_summary_remove_window (id->esummary, id->window); - e_summary_queue_rebuild (id->esummary); - g_free (id); - - return FALSE; -} - -void -e_summary_url_click (GtkWidget *widget, - const char *url, - ESummary *esummary) -{ - ESummaryProtocol protocol; - char *parsed; - int address; - ESummaryWindow *window; - struct _idle_data *id; - Bonobo_Control control; - Bonobo_Listener corba_listener; - GtkWidget *prefsbox, *control_widget; - CORBA_Environment ev; - PropertyDialog *data; - int num_pages, i; - - protocol = get_protocol (url); - - parsed = parse_uri (url, protocol, esummary); - - switch (protocol) { - case PROTOCOL_MAILTO: - /* Open a composer window */ - e_summary_url_mail_compose (esummary, parsed); - break; - - case PROTOCOL_VIEW: - /* Change the EShellView's current uri */ - e_summary_change_current_view (esummary, parsed); - break; - - case PROTOCOL_EXEC: - /* Execute the rest of the url */ - e_summary_url_exec (parsed); - break; - - case PROTOCOL_CLOSE: - /* Close the window. */ - address = atoi (url + 8); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - id = g_new (struct _idle_data, 1); - id->window = window; - id->esummary = esummary; - - /* Close the window on an idle to work around a bug in - gnome-vfs which locks the e_summary_remove_window function - and as gtkhtml has a pointer grab on, this locks the whole - display. GAH! */ - g_idle_add (idle_remove_window, id); - break; - - case PROTOCOL_CONFIGURE: - /* Configure the window. . . */ - address = atoi (url + 12); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - data = g_new (PropertyDialog, 1); - /* Create the property box */ - prefsbox = gnome_property_box_new (); - data->dialog = prefsbox; - - CORBA_exception_init (&ev); - data->eventsource = window->event_source; - data->listener = bonobo_listener_new (property_event, data); - corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (data->listener)); - data->listener_id = Bonobo_EventSource_addListener (data->eventsource, - corba_listener, &ev); - - gtk_signal_connect (GTK_OBJECT (prefsbox), "apply", - GTK_SIGNAL_FUNC (property_apply), - window->propertycontrol); - gtk_signal_connect (GTK_OBJECT (prefsbox), "help", - GTK_SIGNAL_FUNC (property_help), - window->propertycontrol); - gtk_signal_connect (GTK_OBJECT (prefsbox), "destroy", - GTK_SIGNAL_FUNC (dialog_destroyed), data); - - num_pages = Bonobo_PropertyControl__get_pageCount (window->propertycontrol, &ev); - for (i = 0; i < num_pages; i++) { - control = Bonobo_PropertyControl_getControl (window->propertycontrol, i, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Unable to get property control."); - CORBA_exception_free (&ev); - break; - } - control_widget = bonobo_widget_new_control_from_objref (control, - CORBA_OBJECT_NIL); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefsbox), - control_widget, - gtk_label_new (_("page"))); - } - - gtk_widget_show_all (prefsbox); - - break; - - case PROTOCOL_LEFT: - /* Window left */ - address = atoi (url + 7); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - e_summary_window_move_left (esummary, window); - e_summary_queue_rebuild (esummary); - break; - - case PROTOCOL_RIGHT: - address = atoi (url + 8); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - e_summary_window_move_right (esummary, window); - e_summary_queue_rebuild (esummary); - break; - - case PROTOCOL_UP: - address = atoi (url + 5); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - e_summary_window_move_up (esummary, window); - e_summary_queue_rebuild (esummary); - break; - - case PROTOCOL_DOWN: - address = atoi (url + 7); - window = (ESummaryWindow *) GINT_TO_POINTER (address); - if (window->iid == NULL) - break; - - e_summary_window_move_down (esummary, window); - e_summary_queue_rebuild (esummary); - break; - - case PROTOCOL_OTHER: - case PROTOCOL_NONE: - case PROTOCOL_HTTP: - case PROTOCOL_FILE: - default: - /* Let browser handle it */ - gnome_url_show (url); - break; - - } - - g_free (parsed); -} - -static void -parse_mail_url (char *url, - GList **cc, - GList **bcc, - char **subject) -{ - char **options; - int i = 0; - - options = g_strsplit (url, "&", 0); - while (options[i] != NULL) { - char **params; - - params = g_strsplit (options[i], "=", 2); - if (strcmp (params[0], "subject") == 0) { - *subject = g_strdup (params[1]); - } else if (strcmp (params[0], "cc") == 0) { - *cc = g_list_prepend (*cc, g_strdup (params[1])); - } else if (strcmp (params[1], "bcc") == 0) { - *bcc = g_list_prepend (*bcc, g_strdup (params[1])); - } - - g_strfreev (params); - i++; - } - - g_strfreev (options); - /* Reverse the list so it's in the correct order */ - *cc = g_list_reverse (*cc); - *bcc = g_list_reverse (*bcc); -} - -static void -recipients_from_list (GNOME_Evolution_Composer_RecipientList *recipients, - GList *list) -{ - GList *t; - int i; - - for (i = 0, t = list; t; i++, t = t->next) { - GNOME_Evolution_Composer_Recipient *recipient; - char *address = (char *)t->data; - - recipient = recipients->_buffer + i; - recipient->name = CORBA_string_dup (""); - recipient->address = CORBA_string_dup (address ? address : ""); - } -} - -static void -free_list (GList *list) -{ - for (; list; list = list->next) { - g_free (list->data); - } -} - -gboolean -e_summary_url_mail_compose (ESummary *esummary, - const char *url) -{ - CORBA_Object composer; - CORBA_Environment ev; - char *full_address, *address, *proto, *q; - GNOME_Evolution_Composer_RecipientList *to, *cc, *bcc; - GNOME_Evolution_Composer_Recipient *recipient; - CORBA_char *subject; - GList *gcc = NULL, *gbcc = NULL; - char *gsubject = NULL; - - CORBA_exception_init (&ev); - - /* FIXME: Query for IIDs? */ - composer = oaf_activate_from_id ((char *)COMPOSER_IID, 0, NULL, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("Unable to start composer component!"); - return FALSE; - } - - if ( (proto = strstr (url, "://")) != NULL){ - full_address = proto + 3; - } else { - if (strncmp (url, "mailto:", 7) == 0) - full_address = (char *) (url + 7); - else - full_address = (char *) url; - } - - q = strchr (full_address, '?'); - if (q != NULL) { - address = g_strndup (full_address, q - full_address); - parse_mail_url (q + 1, &gcc, &gbcc, &gsubject); - } else { - address = g_strdup (full_address); - } - - to = GNOME_Evolution_Composer_RecipientList__alloc (); - to->_length = 1; - to->_maximum = 1; - to->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (to->_maximum); - - recipient = to->_buffer; - recipient->name = CORBA_string_dup (""); - recipient->address = CORBA_string_dup (address?address:""); - g_free (address); - - /* FIXME: Get these out of the URL */ - cc = GNOME_Evolution_Composer_RecipientList__alloc (); - cc->_length = g_list_length (gcc); - cc->_maximum = cc->_length; - cc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (cc->_maximum); - - recipients_from_list (cc, gcc); - free_list (gcc); - g_list_free (gcc); - - bcc = GNOME_Evolution_Composer_RecipientList__alloc (); - bcc->_length = g_list_length (gbcc); - bcc->_maximum = bcc->_length; - bcc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (bcc->_maximum); - - recipients_from_list (bcc, gbcc); - free_list (gbcc); - g_list_free (gbcc); - - subject = CORBA_string_dup (gsubject ? gsubject : ""); - g_free (gsubject); - - CORBA_exception_init (&ev); - GNOME_Evolution_Composer_setHeaders (composer, to, cc, bcc, subject, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - CORBA_free (to); - CORBA_free (cc); - CORBA_free (bcc); - CORBA_free (subject); - - g_warning ("%s(%d): Error setting headers", __FUNCTION__, __LINE__); - return FALSE; - } - - CORBA_free (to); - CORBA_free (cc); - CORBA_free (bcc); - CORBA_free (subject); - - CORBA_exception_init (&ev); - GNOME_Evolution_Composer_show (composer, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("%s(%d): Error showing composer", __FUNCTION__, __LINE__); - return FALSE; - } - - CORBA_exception_free (&ev); - - /* FIXME: Free the composer? */ - - return TRUE; -} - -gboolean -e_summary_url_exec (const char *exec) -{ - gchar **exec_array; - int argc; - - exec_array = g_strsplit (exec, " ", 0); - - argc = 0; - while (exec_array[argc] != NULL) { - argc++; - } - - gnome_execute_async (NULL, argc, exec_array); - - g_strfreev (exec_array); - return TRUE; -} - -static char * -e_summary_url_describe (const char *uri, - ESummary *esummary) -{ - ESummaryProtocol protocol; - char *contents, *description, *tmp; - - protocol = get_protocol (uri); - contents = parse_uri (uri, protocol, esummary); - tmp = e_utf8_to_locale_string (contents); - - description = g_strdup_printf (_(descriptions[protocol]), tmp); - g_free (tmp); - g_free (contents); - - return description; -} - -void -e_summary_url_over (GtkHTML *html, - const char *uri, - ESummary *esummary) -{ - char *description; - - if (uri != NULL) { - description = e_summary_url_describe (uri, esummary); - e_summary_set_message (esummary, description, FALSE); - g_free (description); - } else { - e_summary_unset_message (esummary); - } -} - -/* Cache stuff */ -#if HAVECACHE -void -e_summary_url_init_cache (void) -{ - if (image_cache != NULL) - return; - - image_cache = e_summary_cache_new (); -} - -void -e_summary_url_cache_destroy (void) -{ - if (image_cache == NULL) - return; - - gtk_object_unref (GTK_OBJECT (image_cache)); - - image_cache = NULL; -} -#endif diff --git a/executive-summary/component/e-summary-url.h b/executive-summary/component/e-summary-url.h deleted file mode 100644 index 03db66353b..0000000000 --- a/executive-summary/component/e-summary-url.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-url.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_URL_H__ -#define _E_SUMMARY_URL_H__ - -void e_summary_url_request (GtkHTML *html, - const gchar *url, - GtkHTMLStream *stream); -void e_summary_url_click (GtkWidget *widget, - const char *url, - ESummary *esummary); -void e_summary_url_over (GtkHTML *html, - const char *uri, - ESummary *esummary); - -#endif diff --git a/executive-summary/component/e-summary-util.c b/executive-summary/component/e-summary-util.c deleted file mode 100644 index 4f7b5f5d6d..0000000000 --- a/executive-summary/component/e-summary-util.c +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-url.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <e-summary-util.h> - -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <dirent.h> - -#include <glib.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-util.h> - -/** - * e_pixmap_file: - * @filename: Filename of pixmap. - * - * Finds @filename in the Evolution or GNOME installation dir. - * - * Returns: A newly allocated absolute path to @filename, or NULL - * if it cannot be found. - */ -char * -e_pixmap_file (const char *filename) -{ - char *ret; - char *edir; - - if (g_file_exists (filename)) { - ret = g_strdup (filename); - - return ret; - } - - /* Try the evolution images dir */ - edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution", - filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Try the evolution button images dir */ - edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons", - filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Fall back to the gnome_pixmap_file */ - return gnome_pixmap_file (filename); -} - -/** - * e_summary_rm_dir: - * @path: Full path to the directory or file to be removed. - * - * Deletes everything in fullpath. - */ -void -e_summary_rm_dir (const char *path) -{ - DIR *base; - struct stat statbuf; - struct dirent *contents; - - stat (path, &statbuf); - if (!S_ISDIR (statbuf.st_mode)) { - /* Not a directory */ - g_warning ("Removing: %s", path); - unlink (path); - return; - } else { - g_warning ("Opening: %s", path); - base = opendir (path); - - if (base == NULL) - return; - - contents = readdir (base); - while (contents != NULL) { - char *fullpath; - - if (strcmp (contents->d_name, ".") == 0|| - strcmp (contents->d_name, "..") ==0) { - contents = readdir (base); - continue; - } - - fullpath = g_concat_dir_and_file (path, contents->d_name); - e_summary_rm_dir (fullpath); - g_free (fullpath); - - contents = readdir (base); - } - - closedir (base); - rmdir (path); - } -} - diff --git a/executive-summary/component/e-summary-util.h b/executive-summary/component/e-summary-util.h deleted file mode 100644 index 185bafcf1f..0000000000 --- a/executive-summary/component/e-summary-util.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-util.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_UTIL_H__ -#define _E_SUMMARY_UTIL_H__ - -char *e_pixmap_file (const char *filename); -void e_summary_rm_dir (const char *filename); - -#endif diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c deleted file mode 100644 index 7a33ba14ef..0000000000 --- a/executive-summary/component/e-summary.c +++ /dev/null @@ -1,1340 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <glib.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-util.h> -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-event-source.h> -#include <bonobo/bonobo-listener.h> -#include <bonobo/bonobo-property-bag.h> -#include <bonobo/bonobo-property-control.h> -#include <bonobo/bonobo-storage.h> -#include <bonobo/bonobo-stream-client.h> - -#include <gtkhtml/gtkhtml.h> -#include <gtkhtml/gtkhtml-embedded.h> -#include <gtkhtml/gtkhtml-stream.h> -#include <gtkhtml/htmlengine.h> -#include <gtkhtml/htmlselection.h> - -#include <gal/util/e-util.h> -#include <gal/widgets/e-gui-utils.h> -#include <libgnomevfs/gnome-vfs.h> - -#include "e-summary.h" -#include "e-summary-factory.h" -#include "e-summary-util.h" -#include "e-summary-url.h" - -#include <evolution-services/executive-summary-component.h> -#include <evolution-services/executive-summary-component-factory-client.h> -#include <evolution-services/executive-summary-html-view.h> - -#define PARENT_TYPE (gtk_vbox_get_type ()) - -#define STORAGE_TYPE "fs" -#define IID_FILE "oaf.id" -#define DATA_FILE "data" - -/* From component-factory.c */ -extern char *evolution_dir; - -static GtkObjectClass *e_summary_parent_class; - -struct _ESummaryPrivate { - GNOME_Evolution_Shell shell; - GNOME_Evolution_ShellView shell_view_interface; - - GtkWidget *html_scroller; - GtkWidget *html; - - guint idle; - - GtkHTMLStream *stream; - gboolean grabbed; - - GList *window_list; - - char *header; - int header_len; - char *footer; - int footer_len; -}; - -static gboolean on_object_requested (GtkHTML *html, - GtkHTMLEmbedded *eb, - ESummary *summary); -static void e_summary_save_state (ESummary *esummary, - const char *path); -static void e_summary_load_state (ESummary *esummary, - const char *path); - -/* GtkObject methods */ - -static void -e_summary_destroy (GtkObject *object) -{ - ESummary *esummary = E_SUMMARY (object); - ESummaryPrivate *priv; - GList *l; - char *prefix; - - priv = esummary->private; - if (priv == NULL) - return; - - prefix = g_concat_dir_and_file (evolution_dir, "config/"); - e_summary_save_state (esummary, prefix); - g_free (prefix); - - e_summary_prefs_free (esummary->prefs); - for (l = priv->window_list; l; l = l->next) - e_summary_window_free (l->data); - g_list_free (priv->window_list); - - g_free (priv->header); - g_free (priv->footer); - g_free (esummary->private); - esummary->private = NULL; - - e_summary_parent_class->destroy (object); -} - -static void -e_summary_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = e_summary_destroy; - - e_summary_parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -e_summary_start_load (ESummary *esummary) -{ - ESummaryPrivate *priv; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - priv->stream = gtk_html_begin (GTK_HTML (priv->html)); - - /* HTML hacks */ - /* Hack to stop page returning to the top */ - GTK_HTML (priv->html)->engine->newPage = FALSE; - /* Hack to make the border width of the page 0 */ - GTK_HTML (priv->html)->engine->leftBorder = 0; - GTK_HTML (priv->html)->engine->rightBorder = 0; - GTK_HTML (priv->html)->engine->topBorder = 0; - GTK_HTML (priv->html)->engine->bottomBorder = 0; -} - -static void -load_default_header (ESummary *esummary) -{ - ESummaryPrivate *priv; - char *def = "<html><body bgcolor=\"#ffffff\">" - "<table width=\"100%\"><tr><td align=\"right\">" - "<img src=\"ccsplash.png\"></td></tr></table>" - "<table><tr><td><a href=\"exec://bug-buddy\"><img src=\"file://gnome-spider.png\" width=\"24\" height=\"24\" border=\"0\">" - "</a></td><td><a href=\"exec://bug-buddy\">Submit a bug report" - "</a></td></tr></table><hr>"; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - g_return_if_fail (priv->stream != NULL); - - gtk_html_write (GTK_HTML (priv->html), priv->stream, def, strlen (def)); -} -static void -load_default_footer (ESummary *esummary) -{ - ESummaryPrivate *priv; - char *footer = "<hr><p align=\"right\">All Executive Summary comments to <a href=\"mailto:iain@ximian.com\">Iain Holmes (iain@ximian.com)</a></p></body></html>"; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - gtk_html_write (GTK_HTML (priv->html), priv->stream, - footer, strlen (footer)); -} - -static void -e_summary_end_load (ESummary *esummary) -{ - ESummaryPrivate *priv; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - gtk_html_end (GTK_HTML (priv->html), priv->stream, GTK_HTML_STREAM_OK); - - priv->stream = NULL; -} - -static void -e_summary_init (ESummary *esummary) -{ - GdkColor bgcolour = {0, 0xdfff, 0xdfff, 0xffff}; - ESummaryPrivate *priv; - - esummary->prefs = NULL; - esummary->tmp_prefs = NULL; - esummary->private = g_new0 (ESummaryPrivate, 1); - priv = esummary->private; - - priv->window_list = NULL; - priv->idle = 0; - - /* HTML widget */ - priv->html_scroller = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller), - GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - priv->html = gtk_html_new (); - gtk_html_set_editable (GTK_HTML (priv->html), FALSE); - gtk_html_set_default_content_type (GTK_HTML (priv->html), - "text/html; charset=utf-8"); - gtk_html_set_default_background_color (GTK_HTML (priv->html), &bgcolour); - gtk_signal_connect (GTK_OBJECT (priv->html), "url-requested", - GTK_SIGNAL_FUNC (e_summary_url_request), esummary); - gtk_signal_connect (GTK_OBJECT (priv->html), "object-requested", - GTK_SIGNAL_FUNC (on_object_requested), esummary); - gtk_signal_connect (GTK_OBJECT (priv->html), "link-clicked", - GTK_SIGNAL_FUNC (e_summary_url_click), esummary); - gtk_signal_connect (GTK_OBJECT (priv->html), "on-url", - GTK_SIGNAL_FUNC (e_summary_url_over), esummary); - - gtk_container_add (GTK_CONTAINER (priv->html_scroller), priv->html); - gtk_widget_show_all (priv->html_scroller); - - e_summary_queue_rebuild (esummary); - - /* Pack stuff */ - gtk_box_pack_start (GTK_BOX (esummary), priv->html_scroller, - TRUE, TRUE, 0); -} - -E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init, - e_summary_init, PARENT_TYPE); - -GtkWidget * -e_summary_new (const GNOME_Evolution_Shell shell) -{ - ESummary *esummary; - ESummaryPrivate *priv; - char *path; - - esummary = gtk_type_new (e_summary_get_type ()); - priv = esummary->private; - - priv->shell = shell; - - /* Restore services */ - path = g_concat_dir_and_file (evolution_dir, - "config"); - e_summary_load_state (esummary, path); - g_free (path); - - return GTK_WIDGET (esummary); -} - -#if 0 -static void -control_unrealize (GtkHTMLEmbedded *eb, - GtkWidget *widget) -{ - g_print ("Removing\n"); -} - -static void -being_unrealized (GtkWidget *widget, - GtkHTMLEmbedded *eb) -{ - g_warning ("Widget is being unrealized"); - gtk_container_remove (GTK_CONTAINER (eb), widget); -} - -static void -being_realized (GtkWidget *widget, - gpointer user_data) -{ - gdk_window_ref (widget->window); -} -#endif - -static gboolean -on_object_requested (GtkHTML *html, - GtkHTMLEmbedded *eb, - ESummary *esummary) -{ -#if 0 - static GtkWidget *widget = NULL; - int id; - - if (sscanf (eb->classid, "cid:%d", &id) != 1) { - g_warning ("Could not get the view id: eb->classid = %s", - eb->classid); - return FALSE; - } - - if (widget == NULL || !GTK_IS_WIDGET (widget)) { - g_print ("Create new\n"); - widget = executive_summary_component_view_get_widget (view); -/* widget = gtk_button_new_with_label ("Hello?"); */ - gtk_signal_connect (GTK_OBJECT (widget), "realize", - GTK_SIGNAL_FUNC (being_realized), NULL); - gtk_signal_connect (GTK_OBJECT (widget), "unrealize", - GTK_SIGNAL_FUNC (being_unrealized), eb); - g_print ("New widget: %p\n", GTK_BIN (widget)->child); - } else { - g_print ("No new\n"); - } - - if (widget == NULL) { - g_warning ("View %d has no GtkWidget.", id); - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (eb), "unrealize", - GTK_SIGNAL_FUNC (control_unrealize), widget); - gtk_widget_show_all (widget); - gtk_widget_ref (widget); - - if (widget->parent == NULL) - gtk_container_add (GTK_CONTAINER (eb), widget); - -#endif - return TRUE; -} - -/* Generates the window controls and works out - if they should be disabled or not */ -static char * -make_control_html (ESummaryWindow *window, - int row, - int col, - int numwindows) -{ - char *html, *tmp; - int id = GPOINTER_TO_INT (window); - gboolean config; - - config = TRUE; - - if (window->propertycontrol == CORBA_OBJECT_NIL) - config = FALSE; - - html = g_strdup_printf ("<table><tr><td><a href=\"close://%d\">" - "<img src=\"service-close.png\" border=\"0\">" - "</a></td></tr><tr><td>", id); - - tmp = html; - if (!config) { - html = g_strdup_printf ("%s<img src=\"service-configure.png\">" - "</td></tr></table>", tmp); - } else { - html = g_strdup_printf ("%s<a href=\"configure://%d\">" - "<img src=\"service-configure.png\" border=\"0\">" - "</a></td></tr></table>", tmp, id); - } - g_free (tmp); - - return html; -} - -static void -e_summary_display_window_title (ESummary *esummary, - ESummaryWindow *window, - int row, - int col, - int numwindows) -{ - ESummaryPrivate *priv; - char *title_html; - char *control_html; - char *title_colour[2] = {"bac1b6", - "cdd1c7"}; - - priv = esummary->private; - - control_html = make_control_html (window, row, col, numwindows); - title_html = g_strdup_printf ("<td bgcolor=\"#%s\">" - "<table width=\"100%%\" height=\"100%%\"><tr><td>" - "<img src=\"%s\" height=\"48\"></td>" - "<td nowrap align=\"center\" width=\"100%%\">" - "<b>%s</b></td><td>%s</td></tr></table></td>", - title_colour[col % 2], window->icon, - window->title, control_html); - g_free (control_html); - - gtk_html_write (GTK_HTML (priv->html), priv->stream, title_html, - strlen (title_html)); - g_free (title_html); -} - -static void -e_summary_display_window (ESummary *esummary, - ESummaryWindow *window, - int row, - int col, - int numwindows) -{ - ESummaryPrivate *priv; - char *footer = "</td>"; - char *header; - char *colour[2] = {"e6e8e4", - "edeeeb"}; - - priv = esummary->private; - - header = g_strdup_printf ("<td bgcolor=\"%s\" valign=\"top\">", colour[col % 2]); - gtk_html_write (GTK_HTML (priv->html), priv->stream, header, strlen (header)); - g_free (header); - - if (window->html != CORBA_OBJECT_NIL) { - char *html = NULL; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - html = GNOME_Evolution_Summary_HTMLView_getHtml (window->html, - &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("Cannot get HTML."); - if (html) - CORBA_free (html); - } else { - CORBA_exception_free (&ev); - - gtk_html_write (GTK_HTML (priv->html), priv->stream, - html, strlen (html)); - CORBA_free (html); - } - } else { -#if 0 - char *body_cid; - - body_cid = g_strdup_printf ("<object classid=\"cid:%d\"></object>", id); - gtk_html_write (GTK_HTML (priv->html), priv->stream, - body_cid, strlen (body_cid)); - g_free (body_cid); -#endif - } - - gtk_html_write (GTK_HTML (priv->html), priv->stream, - footer, strlen (footer)); -} - -static int -e_summary_rebuild_page (ESummary *esummary) -{ - ESummaryPrivate *priv; - GList *windows; - char *service_table = "<table numcols=\"%d\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"100%%\" width=\"100%%\">"; - char *tmp; - int numwindows, numrows; - int i, j, k; - int columns; - - g_return_val_if_fail (esummary != NULL, FALSE); - g_return_val_if_fail (IS_E_SUMMARY (esummary), FALSE); - - priv = esummary->private; - - if (priv->idle == 0) { - g_warning ("esummary->private->idle == 0! This means that " - "e_summary_rebuild_page was called by itself and " - "not queued. You should use e_summary_queue_rebuild " - "instead."); - return FALSE; - } - - /* If there is a selection, don't redraw the page so that the selection - isn't cleared */ - if (GTK_HTML (priv->html)->in_selection == TRUE || - html_engine_is_selection_active (GTK_HTML (priv->html)->engine) == TRUE) - return FALSE; - - gtk_layout_freeze (GTK_LAYOUT (priv->html)); - e_summary_start_load (esummary); - - if (priv->header == NULL || *priv->header == '\0') { - load_default_header (esummary); - } else { - gtk_html_write (GTK_HTML (priv->html), priv->stream, - priv->header, priv->header_len); - } - - /* Load the start of the services */ - tmp = g_strdup_printf (service_table, esummary->prefs->columns); - gtk_html_write (GTK_HTML (priv->html), priv->stream, tmp, strlen (tmp)); - g_free (tmp); - /* Load each of the services */ - numwindows = g_list_length (priv->window_list); - - columns = esummary->prefs->columns; - - windows = priv->window_list; - if (numwindows % columns == 0) - numrows = numwindows / columns; - else - numrows = numwindows / columns + 1; - - for (i = 0; i < numrows; i++) { - GList *window = windows; - - /* Do the same row twice: - Once for the title, once for the contents */ - for (j = 0; j < 2; j++) { - int limit; - - gtk_html_write (GTK_HTML (priv->html), priv->stream, - "<tr>", 4); - /* For each window on row i */ - limit = MIN (columns, (numwindows - (i * columns))); - for (k = 0; k < limit; k++) { - - if (window == NULL) - break; - - if (j == 0) { - e_summary_display_window_title (esummary, - window->data, - k, k, - numwindows); - } else { - e_summary_display_window (esummary, - window->data, - k, k, - numwindows); - } - - if (window != NULL) - window = window->next; - - if (window == NULL) - break; - } - - gtk_html_write (GTK_HTML (priv->html), priv->stream, - "</tr>", 5); - if (j == 0) - window = windows; - else { - if (window) - windows = window; - else - break; - } - } - } - gtk_html_write (GTK_HTML (priv->html), priv->stream, "</tr></table>", 13); - - if (priv->footer == NULL || *priv->footer == '\0') { - load_default_footer (esummary); - } else { - gtk_html_write (GTK_HTML (priv->html), priv->stream, - priv->footer, priv->footer_len); - } - - e_summary_end_load (esummary); - gtk_layout_thaw (GTK_LAYOUT (priv->html)); - - priv->idle = 0; - return FALSE; -} - -/* This is the function that should be called instead of - e_summary_queue_rebuild. This prevents multiple - rebuilds happening together. */ -void -e_summary_queue_rebuild (ESummary *esummary) -{ - ESummaryPrivate *priv; - - priv = esummary->private; - if (priv->idle != 0) - return; - - priv->idle = g_idle_add ((GSourceFunc) e_summary_rebuild_page, esummary); -} - -static void -listener_event (BonoboListener *listener, - char *event_name, - BonoboArg *event_data, - CORBA_Environment *ev, - gpointer user_data) -{ - ESummaryWindow *window = (ESummaryWindow *) user_data; - - if (strcmp (event_name, "Bonobo/Property:change:window_title") == 0) { - if (window->title != NULL) - g_free (window->title); - - window->title = g_strdup (BONOBO_ARG_GET_STRING (event_data)); - e_summary_queue_rebuild (window->esummary); - } else if (strcmp (event_name, "Bonobo/Property:change:window_icon") == 0) { - if (window->icon != NULL) - g_free (window->icon); - - window->icon = g_strdup (BONOBO_ARG_GET_STRING (event_data)); - e_summary_queue_rebuild (window->esummary); - } else if (strcmp (event_name, EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED) == 0) { - e_summary_queue_rebuild (window->esummary); - } - - return; -} - -ESummaryWindow * -e_summary_add_service (ESummary *esummary, - GNOME_Evolution_Summary_Component component, - const char *iid) -{ - ESummaryWindow *window; - ESummaryPrivate *priv; - Bonobo_Unknown unknown = CORBA_OBJECT_NIL; - Bonobo_Listener listener; - CORBA_Environment ev; - - g_return_val_if_fail (esummary != NULL, NULL); - g_return_val_if_fail (IS_E_SUMMARY (esummary), NULL); - g_return_val_if_fail (component != CORBA_OBJECT_NIL, NULL); - - priv = esummary->private; - - window = g_new0 (ESummaryWindow, 1); - window->component = component; - window->iid = g_strdup (iid); - window->esummary = esummary; - - /* See what interfaces our component supports */ - CORBA_exception_init (&ev); - unknown = Bonobo_Unknown_queryInterface (component, - "IDL:Bonobo/Control:1.0", &ev); - window->control = (Bonobo_Control) unknown; - - unknown = Bonobo_Unknown_queryInterface (component, - "IDL:GNOME/Evolution/Summary/HTMLView:1.0", - &ev); - window->html = (GNOME_Evolution_Summary_HTMLView) unknown; - - /* Check at least one of the above interfaces was supported */ - if (window->html == CORBA_OBJECT_NIL && - window->control == CORBA_OBJECT_NIL) { - CORBA_Environment ev2; - g_warning ("This component does not support either" - "Bonobo/Control:1.0 or GNOME/Evolution/Summary/HTMLView:1.0"); - - CORBA_exception_init (&ev2); - CORBA_Object_release (component, &ev2); - CORBA_exception_free (&ev2); - - g_free (window); - return NULL; - } - - unknown = Bonobo_Unknown_queryInterface (component, - "IDL:Bonobo/PropertyBag:1.0", - &ev); - window->propertybag = (Bonobo_PropertyBag) unknown; - - window->event_source = Bonobo_Unknown_queryInterface(window->propertybag, - "IDL:Bonobo/EventSource:1.0", &ev); - if (window->event_source == CORBA_OBJECT_NIL) { - g_warning ("There is no Bonobo::EventSource interface"); - - /* FIXME: Free whatever objects exist */ - g_free (window); - return NULL; - } - - window->listener = bonobo_listener_new (NULL, NULL); - gtk_signal_connect (GTK_OBJECT (window->listener), "event_notify", - GTK_SIGNAL_FUNC (listener_event), window); - listener = bonobo_object_corba_objref (BONOBO_OBJECT (window->listener)); - window->listener_id = Bonobo_EventSource_addListener (window->event_source, listener, &ev); - - unknown = Bonobo_Unknown_queryInterface (component, - "IDL:Bonobo/PersistStream:1.0", - &ev); - window->persiststream = (Bonobo_PersistStream) unknown; - - unknown = Bonobo_Unknown_queryInterface (component, - "IDL:Bonobo/PropertyControl:1.0", - &ev); - window->propertycontrol = (Bonobo_PropertyControl) unknown; - - /* Cache the title and icon */ - window->title = bonobo_property_bag_client_get_value_string (window->propertybag, - "window_title", - NULL); - g_print ("title: %s\n", window->title); - window->icon = bonobo_property_bag_client_get_value_string (window->propertybag, - "window_icon", NULL); - g_print ("icon: %s\n", window->icon); - - CORBA_exception_free (&ev); - priv->window_list = g_list_append (priv->window_list, window); - - return window; -} - - -ESummaryWindow * -e_summary_embed_service_from_id (ESummary *esummary, - const char *obj_id) -{ - GNOME_Evolution_Summary_Component component; - ExecutiveSummaryComponentFactoryClient *client; - ESummaryWindow *window; - - client = executive_summary_component_factory_client_new (obj_id); - - component = executive_summary_component_factory_client_create_view (client); - - /* Don't need the client any more */ - bonobo_object_unref (BONOBO_OBJECT (client)); - - window = e_summary_add_service (esummary, component, obj_id); - e_summary_queue_rebuild (esummary); - - return window; -} - -void -e_summary_window_free (ESummaryWindow *window) -{ - CORBA_Environment ev; - - g_return_if_fail (window != NULL); - - g_free (window->iid); - g_free (window->icon); - g_free (window->title); - - CORBA_exception_init (&ev); - - if (window->control != CORBA_OBJECT_NIL) { - bonobo_object_release_unref (window->control, &ev); - } - - if (window->event_source != CORBA_OBJECT_NIL) { - Bonobo_EventSource_removeListener (window->event_source, - window->listener_id, - &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("CORBA ERROR: %s", CORBA_exception_id (&ev)); - } - bonobo_object_release_unref (window->event_source, &ev); - } - - bonobo_object_release_unref (window->propertybag, &ev); - bonobo_object_release_unref (window->persiststream, &ev); - bonobo_object_release_unref (window->propertycontrol, &ev); - bonobo_object_unref (BONOBO_OBJECT (window->listener)); - bonobo_object_release_unref (window->html, &ev); - - bonobo_object_release_unref (window->component, &ev); - CORBA_exception_free (&ev); - g_free (window); -} - -void -e_summary_remove_window (ESummary *esummary, - ESummaryWindow *window) -{ - ESummaryPrivate *priv; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - g_return_if_fail (window != NULL); - - priv = esummary->private; - priv->window_list = g_list_remove (priv->window_list, window); - e_summary_window_free (window); -} - -void -e_summary_set_shell_view_interface (ESummary *esummary, - GNOME_Evolution_ShellView svi) -{ - ESummaryPrivate *priv; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - g_return_if_fail (svi != CORBA_OBJECT_NIL); - - priv = esummary->private; - priv->shell_view_interface = svi; -} - -/* Wrappers for GNOME_Evolution_ShellView */ -void -e_summary_set_message (ESummary *esummary, - const char *message, - gboolean busy) -{ - ESummaryPrivate *priv; - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - svi = priv->shell_view_interface; - if (svi == NULL) - return; - - CORBA_exception_init (&ev); - if (message != NULL) - GNOME_Evolution_ShellView_setMessage (svi, message, busy, &ev); - else - GNOME_Evolution_ShellView_setMessage (svi, "", busy, &ev); - CORBA_exception_free (&ev); -} - -void -e_summary_unset_message (ESummary *esummary) -{ - ESummaryPrivate *priv; - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - svi = priv->shell_view_interface; - if (svi == NULL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_unsetMessage (svi, &ev); - CORBA_exception_free (&ev); -} - -void -e_summary_change_current_view (ESummary *esummary, - const char *uri) -{ - ESummaryPrivate *priv; - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - svi = priv->shell_view_interface; - if (svi == NULL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_changeCurrentView (svi, uri, &ev); - CORBA_exception_free (&ev); -} - -void -e_summary_set_title (ESummary *esummary, - const char *title) -{ - ESummaryPrivate *priv; - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - svi = priv->shell_view_interface; - if (svi == NULL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_setTitle (svi, title, &ev); - CORBA_exception_free (&ev); -} - -static void -e_summary_load_page (ESummary *esummary) -{ - ESummaryPrivate *priv; - GnomeVFSHandle *handle = NULL; - GnomeVFSResult result; - GtkWidget *toplevel; - GString *string; - char *str, *comment; - char *filename; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - /* Pass NULL to reset the page to the default */ - if ((esummary->prefs->page) == NULL || - *(esummary->prefs->page) == '\0') { - filename = g_concat_dir_and_file (EVOLUTION_DATADIR, "/evolution/summary.html"); - } else { - filename = g_strdup (esummary->prefs->page); - } - - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (esummary)); - string = g_string_new (""); - result = gnome_vfs_open (&handle, filename, GNOME_VFS_OPEN_READ); - if (result != GNOME_VFS_OK) { - e_notice (GTK_WINDOW (toplevel), GNOME_MESSAGE_BOX_WARNING, - _("Cannot open the HTML file:\n%s"), filename); - g_free (filename); - return; - } - - g_free (filename); - while (1) { - char buffer[4096]; - GnomeVFSFileSize size; - - memset (buffer, 0x00, 4096); - result = gnome_vfs_read (handle, buffer, 4096, &size); - if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { - e_notice (GTK_WINDOW (toplevel), GNOME_MESSAGE_BOX_WARNING, - _("Error reading data:\n%s"), - gnome_vfs_result_to_string (result)); - gnome_vfs_close (handle); - return; - } - if (size == 0) - break; /* EOF */ - - string = g_string_append (string, buffer); - } - - gnome_vfs_close (handle); - str = string->str; - g_string_free (string, FALSE); - - comment = strstr (str, "<!-- EVOLUTION EXECUTIVE SUMMARY SERVICES DO NOT REMOVE -->"); - if (comment == NULL) { - e_notice (NULL, GNOME_MESSAGE_BOX_WARNING, - _("File does not have a place for the services.\n")); - g_free (str); - return; - } - - if (priv->header != NULL) - g_free (priv->header); - priv->header = g_strndup (str, comment - str); - priv->header_len = strlen (priv->header); - - if (priv->footer != NULL) - g_free (priv->footer); - priv->footer = g_strdup (comment); - priv->footer_len = strlen (priv->footer); - g_free (str); -} - -static char * -load_component_id_stream_read (Bonobo_Stream stream, - CORBA_Environment *ev) -{ - Bonobo_Stream_iobuf *buffer; - GString *str; - char *ans; - - str = g_string_sized_new (256); -#define READ_CHUNK_SIZE 65536 - do { - int i; - Bonobo_Stream_read (stream, READ_CHUNK_SIZE, &buffer, ev); - if (ev->_major != CORBA_NO_EXCEPTION) - return NULL; - - /* FIXME: make better PLEASE!!!*/ - for (i = 0; i < buffer->_length; i++) - g_string_append_c (str, buffer->_buffer[i]); - - if (buffer->_length <= 0) - break; - CORBA_free (buffer); - } while (1); -#undef READ_CHUNK_SIZE - CORBA_free (buffer); - - ans = str->str; - g_string_free (str, FALSE); - - return ans; -} - -static char * -load_component_id (Bonobo_Storage corba_storage, - CORBA_Environment *ev) -{ - Bonobo_Stream corba_stream; - char *iid; - - corba_stream = Bonobo_Storage_openStream (corba_storage, IID_FILE, - Bonobo_Storage_READ, ev); - if (ev->_major != CORBA_NO_EXCEPTION) - return NULL; - - if (corba_stream) { - iid = load_component_id_stream_read (corba_stream, ev); - Bonobo_Unknown_unref (corba_stream, ev); - CORBA_Object_release (corba_stream, ev); - } else { - g_warning ("Cannot find `%s'", IID_FILE); - return NULL; - } - - return iid; -} - -static void -load_component (ESummary *esummary, - BonoboStorage *storage, - int index) -{ - char *curdir; - char *iid; - Bonobo_Storage corba_subdir; - Bonobo_Storage corba_storage; - ESummaryWindow *window; - CORBA_Environment ev; - - curdir = g_strdup_printf ("%08d", index); - corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage)); - CORBA_exception_init (&ev); - - corba_subdir = Bonobo_Storage_openStorage (corba_storage, curdir, - Bonobo_Storage_READ, &ev); - if (corba_subdir == CORBA_OBJECT_NIL) { - g_free (curdir); - return; - } - - iid = load_component_id (corba_subdir, &ev); - - if (iid) { - Bonobo_Stream corba_stream; - - window = e_summary_embed_service_from_id (esummary, iid); - if (window) { - if (window->persiststream) { - corba_stream = Bonobo_Storage_openStream - (corba_subdir, - DATA_FILE, - Bonobo_Storage_READ | - Bonobo_Storage_CREATE, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_print ("Gah"); - return; - } - - Bonobo_PersistStream_load (window->persiststream, - corba_stream, - "", &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_warning ("Could not load `%s'", iid); - - bonobo_object_release_unref (corba_stream, &ev); - } - } - - g_free (iid); - } - - bonobo_object_release_unref (corba_subdir, &ev); - CORBA_exception_free (&ev); - g_free (curdir); -} - -void -e_summary_reconfigure (ESummary *esummary) -{ - e_summary_load_page (esummary); - e_summary_queue_rebuild (esummary); -} - -static void -e_summary_load_state (ESummary *esummary, - const char *path) -{ - char *fullpath; - BonoboStorage *storage; - Bonobo_Storage corba_storage; - Bonobo_Storage_DirectoryList *list; - CORBA_Environment ev; - int i; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - fullpath = g_strdup_printf ("%s/Executive-Summary", path); - storage = bonobo_storage_open (STORAGE_TYPE, fullpath, - Bonobo_Storage_READ | - Bonobo_Storage_WRITE, - 0664); - if (storage != NULL) { - CORBA_exception_init (&ev); - - corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage)); - list = Bonobo_Storage_listContents (corba_storage, "/", 0, &ev); - if (list) { - for (i = 0; i < list->_length; i++) - load_component (esummary, storage, i); - - CORBA_free (list); - } - - bonobo_object_unref (BONOBO_OBJECT (storage)); - CORBA_exception_free (&ev); - } - - g_free (fullpath); - - /* Load the preferences */ - if (esummary->prefs != NULL) - e_summary_prefs_free (esummary->prefs); - - esummary->prefs = e_summary_prefs_load (path); - e_summary_reconfigure (esummary); -} - -static void -save_component (BonoboStorage *storage, - ESummaryWindow *window, - int index) -{ - char *curdir = g_strdup_printf ("%08d", index); - Bonobo_Storage corba_storage; - Bonobo_Storage corba_subdir; - CORBA_Environment ev; - - corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage)); - CORBA_exception_init (&ev); - - corba_subdir = Bonobo_Storage_openStorage (corba_storage, curdir, - Bonobo_Storage_CREATE| - Bonobo_Storage_WRITE| - Bonobo_Storage_READ, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Cannot create '%s'", curdir); - g_free (curdir); - } else { - Bonobo_Stream corba_stream; - - g_free (curdir); - corba_stream = Bonobo_Storage_openStream - (corba_subdir, IID_FILE, - Bonobo_Storage_CREATE| - Bonobo_Storage_READ| - Bonobo_Storage_WRITE, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EEK: %s", CORBA_exception_id (&ev)); - if (corba_subdir != CORBA_OBJECT_NIL) - bonobo_object_release_unref (corba_subdir, &ev); - CORBA_exception_free (&ev); - return; - } - - bonobo_stream_client_write_string (corba_stream, - window->iid, TRUE, &ev); - bonobo_object_release_unref (corba_stream, &ev); - - corba_stream = Bonobo_Storage_openStream (corba_subdir, DATA_FILE, - Bonobo_Storage_CREATE, - &ev); - if (window->persiststream != CORBA_OBJECT_NIL) { - Bonobo_PersistStream_save (window->persiststream, - corba_stream, "", &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Unable to save %s", window->iid); - } - } - - bonobo_object_release_unref (corba_stream, &ev); - } - - if (corba_subdir != CORBA_OBJECT_NIL) - bonobo_object_release_unref (corba_subdir, &ev); - CORBA_exception_free (&ev); -} - -static void -e_summary_save_state (ESummary *esummary, - const char *path) -{ - ESummaryPrivate *priv; - BonoboStorage *storage; - Bonobo_Storage corba_storage; - CORBA_Environment ev; - GList *windows; - char *fullpath; - int i; - - g_return_if_fail (esummary != NULL); - g_return_if_fail (IS_E_SUMMARY (esummary)); - - priv = esummary->private; - - fullpath = g_strdup_printf("%s/Executive-Summary", path); - g_print ("fullpath: %s\n", fullpath); - - e_summary_rm_dir (fullpath); - - storage = bonobo_storage_open (STORAGE_TYPE, fullpath, - Bonobo_Storage_READ | - Bonobo_Storage_WRITE | - Bonobo_Storage_CREATE, 0660); - g_return_if_fail (storage); - - CORBA_exception_init (&ev); - corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage)); - - i = 0; - for (windows = priv->window_list; windows; windows = windows->next) { - save_component (storage, windows->data, i); - g_print ("IID: %s\n", ((ESummaryWindow *)windows->data)->iid); - i++; - } - - Bonobo_Storage_commit (corba_storage, &ev); - CORBA_exception_free (&ev); - bonobo_object_unref (BONOBO_OBJECT (storage)); - - e_summary_prefs_save (esummary->prefs, path); - g_free (fullpath); -} - -void -e_summary_window_move_left (ESummary *esummary, - ESummaryWindow *window) -{ - ESummaryPrivate *priv; - GList *win_item, *grandparent; - int position; - - priv = esummary->private; - - /* Need to cache this location */ - win_item = g_list_find (priv->window_list, window); - - /* Find the item 2 previous. */ - if (win_item->prev == NULL) - return; /* Item was first, can't be moved left */ - - grandparent = win_item->prev->prev; - - /* Remove it from the list */ - priv->window_list = g_list_remove_link (priv->window_list, win_item); - - /* Insert it after the grandparent */ - position = g_list_position (priv->window_list, grandparent); - priv->window_list = g_list_insert (priv->window_list, win_item->data, - position + 1); - g_list_free_1 (win_item); -} - -void -e_summary_window_move_right (ESummary *esummary, - ESummaryWindow *window) -{ - ESummaryPrivate *priv; - GList *win_item, *child; - int position; - - priv = esummary->private; - - win_item = g_list_find (priv->window_list, window); - - if (win_item->next == NULL) - return; - - child = win_item->next; - - priv->window_list = g_list_remove_link (priv->window_list, win_item); - - position = g_list_position (priv->window_list, child); - priv->window_list = g_list_insert (priv->window_list, win_item->data, - position + 1); - g_list_free_1 (win_item); -} - -void -e_summary_window_move_up (ESummary *esummary, - ESummaryWindow *window) -{ - ESummaryPrivate *priv; - GList *win_item; - int position; - - priv = esummary->private; - - win_item = g_list_find (priv->window_list, window); - - position = g_list_position (priv->window_list, win_item); - priv->window_list = g_list_remove_link (priv->window_list, win_item); - - priv->window_list = g_list_insert (priv->window_list, win_item->data, - position - 3); - g_list_free_1 (win_item); -} - -void -e_summary_window_move_down (ESummary *esummary, - ESummaryWindow *window) -{ - ESummaryPrivate *priv; - GList *win_item; - int position; - - priv = esummary->private; - - win_item = g_list_find (priv->window_list, window); - - position = g_list_position (priv->window_list, win_item); - priv->window_list = g_list_remove_link (priv->window_list, win_item); - - priv->window_list = g_list_insert (priv->window_list, win_item->data, - position + 3); -} diff --git a/executive-summary/component/e-summary.h b/executive-summary/component/e-summary.h deleted file mode 100644 index 5469adc6fe..0000000000 --- a/executive-summary/component/e-summary.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_H__ -#define _E_SUMMARY_H__ - -#include <gtk/gtkvbox.h> - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-listener.h> -#include <bonobo/bonobo-event-source.h> -#include <Evolution.h> -#include <evolution-services/Executive-Summary.h> - -#include "e-summary-prefs.h" - -#define E_SUMMARY_TYPE (e_summary_get_type ()) -#define E_SUMMARY(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE, ESummary)) -#define E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE, ESummaryClass)) -#define IS_E_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TYPE)) -#define IS_E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TYPE)) - -typedef struct _ESummaryPrivate ESummaryPrivate; -typedef struct _ESummary ESummary; -typedef struct _ESummaryClass ESummaryClass; -typedef struct _ESummaryWindow ESummaryWindow; - -struct _ESummaryWindow { - GNOME_Evolution_Summary_Component component; - - Bonobo_Control control; - GNOME_Evolution_Summary_HTMLView html; - - Bonobo_PersistStream persiststream; - Bonobo_PropertyBag propertybag; - Bonobo_PropertyControl propertycontrol; - Bonobo_EventSource event_source; - - /* Listener for the event_source */ - BonoboListener *listener; - int listener_id; - - char *iid; - char *title; - char *icon; - - ESummary *esummary; -}; - -struct _ESummary { - GtkVBox parent; - - ESummaryPrefs *prefs; - ESummaryPrefs *tmp_prefs; - ESummaryPrivate *private; -}; - -struct _ESummaryClass { - GtkVBoxClass parent_class; -}; - -GtkType e_summary_get_type (void); -GtkWidget *e_summary_new (const GNOME_Evolution_Shell shell); -void e_summary_queue_rebuild (ESummary *esummary); - -void e_summary_window_free (ESummaryWindow *window); -void e_summary_remove_window (ESummary *esummary, - ESummaryWindow *window); -ESummaryWindow *e_summary_add_service (ESummary *esummary, - GNOME_Evolution_Summary_Component component, - const char *iid); -ESummaryWindow * e_summary_embed_service_from_id (ESummary *esummary, - const char *obj_id); - -void e_summary_set_shell_view_interface (ESummary *summary, - GNOME_Evolution_ShellView svi); -void e_summary_set_message (ESummary *esummary, - const char *message, - gboolean busy); -void e_summary_unset_message (ESummary *esummary); -void e_summary_change_current_view (ESummary *esummary, - const char *uri); -void e_summary_set_title (ESummary *esummary, - const char *title); - -void e_summary_window_move_left (ESummary *esummary, - ESummaryWindow *window); -void e_summary_window_move_right (ESummary *esummary, - ESummaryWindow *window); -void e_summary_window_move_up (ESummary *esummary, - ESummaryWindow *window); -void e_summary_window_move_down (ESummary *esummary, - ESummaryWindow *window); -void e_summary_reconfigure (ESummary *esummary); - -#endif diff --git a/executive-summary/component/executive-summary-config.glade b/executive-summary/component/executive-summary-config.glade deleted file mode 100644 index 17fd9b0e69..0000000000 --- a/executive-summary/component/executive-summary-config.glade +++ /dev/null @@ -1,223 +0,0 @@ -<?xml version="1.0"?> -<GTK-Interface> - -<project> - <name>Project1</name> - <program_name>project1</program_name> - <directory></directory> - <source_directory>src</source_directory> - <pixmaps_directory>pixmaps</pixmaps_directory> - <language>C</language> - <gnome_support>True</gnome_support> - <gettext_support>True</gettext_support> - <use_widget_names>False</use_widget_names> - <output_main_file>True</output_main_file> - <output_support_files>True</output_support_files> - <output_build_files>True</output_build_files> - <backup_source_files>True</backup_source_files> - <main_source_file>interface.c</main_source_file> - <main_header_file>interface.h</main_header_file> - <handler_source_file>callbacks.c</handler_source_file> - <handler_header_file>callbacks.h</handler_header_file> - <support_source_file>support.c</support_source_file> - <support_header_file>support.h</support_header_file> - <translatable_strings_file></translatable_strings_file> -</project> - -<widget> - <class>GnomePropertyBox</class> - <name>summaryprefs</name> - <cxx_use_heap>True</cxx_use_heap> - - <widget> - <class>GtkNotebook</class> - <child_name>GnomePropertyBox:notebook</child_name> - <name>notebook1</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <can_focus>True</can_focus> - <show_tabs>True</show_tabs> - <show_border>True</show_border> - <tab_pos>GTK_POS_TOP</tab_pos> - <scrollable>False</scrollable> - <tab_hborder>2</tab_hborder> - <tab_vborder>2</tab_vborder> - <popup_enable>False</popup_enable> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkVBox</class> - <name>vbox</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <homogeneous>False</homogeneous> - <spacing>8</spacing> - - <widget> - <class>Placeholder</class> - </widget> - - <widget> - <class>GtkFrame</class> - <name>frame1</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <label>Appearance</label> - <label_xalign>0</label_xalign> - <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkVBox</class> - <name>vbox2</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <homogeneous>False</homogeneous> - <spacing>5</spacing> - - <widget> - <class>GtkHBox</class> - <name>hbox1</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <homogeneous>False</homogeneous> - <spacing>5</spacing> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label2</name> - <cxx_use_heap>True</cxx_use_heap> - <label>Background:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GnomeFileEntry</class> - <name>htmlpage</name> - <cxx_use_heap>True</cxx_use_heap> - <max_saved>10</max_saved> - <directory>False</directory> - <modal>False</modal> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkEntry</class> - <child_name>GnomeEntry:entry</child_name> - <name>combo-entry1</name> - <cxx_use_heap>True</cxx_use_heap> - <can_focus>True</can_focus> - <editable>True</editable> - <text_visible>True</text_visible> - <text_max_length>0</text_max_length> - <text></text> - </widget> - </widget> - </widget> - - <widget> - <class>GtkHBox</class> - <name>hbox2</name> - <border_width>2</border_width> - <cxx_use_heap>True</cxx_use_heap> - <homogeneous>False</homogeneous> - <spacing>5</spacing> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label3</name> - <cxx_use_heap>True</cxx_use_heap> - <label>Number of columns:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GtkSpinButton</class> - <name>columnspinner</name> - <cxx_use_heap>True</cxx_use_heap> - <can_focus>True</can_focus> - <climb_rate>1</climb_rate> - <digits>0</digits> - <numeric>True</numeric> - <update_policy>GTK_UPDATE_ALWAYS</update_policy> - <snap>False</snap> - <wrap>False</wrap> - <value>1</value> - <lower>1</lower> - <upper>100</upper> - <step>1</step> - <page>10</page> - <page_size>10</page_size> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> - </widget> - </widget> - </widget> - - <widget> - <class>Placeholder</class> - </widget> - </widget> - - <widget> - <class>GtkLabel</class> - <child_name>Notebook:tab</child_name> - <name>Label</name> - <cxx_use_heap>True</cxx_use_heap> - <label>General</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> -</widget> - -</GTK-Interface> diff --git a/executive-summary/component/executive-summary.png b/executive-summary/component/executive-summary.png Binary files differdeleted file mode 100644 index 10a122f39e..0000000000 --- a/executive-summary/component/executive-summary.png +++ /dev/null diff --git a/executive-summary/component/main.c b/executive-summary/component/main.c deleted file mode 100644 index e23b59c23a..0000000000 --- a/executive-summary/component/main.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * main.c: The core of the executive summary component. - * - * Copyright (C) 2000 Ximian, Inc - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <glib.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> -#include <bonobo/bonobo-main.h> -#include <liboaf/liboaf.h> -#include <glade/glade.h> - -#ifdef GTKHTML_HAVE_GCONF -#include <gconf/gconf.h> -#endif - -#include "gal/widgets/e-gui-utils.h" -#include "gal/widgets/e-cursors.h" - -#include <libgnomevfs/gnome-vfs.h> -#include "component-factory.h" - -int -main (int argc, - char **argv) -{ - CORBA_ORB orb; - - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - - gnome_init_with_popt_table ("evolution-executive-summary", VERSION, - argc, argv, oaf_popt_options, 0, NULL); - orb = oaf_init (argc, argv); - - gdk_rgb_init (); - glade_gnome_init (); - if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - g_error (_("Executive summary component could not initialize Bonobo.\n" - "If there was a warning message about the " - "RootPOA, it probably means\nyou compiled " - "Bonobo against GOAD instead of OAF.")); - } - -#ifdef GTKHTML_HAVE_GCONF - gconf_init (argc, argv, NULL); -#endif - - e_cursors_init (); - - component_factory_init (); - - gnome_vfs_init (); - bonobo_main (); - - return 0; -} diff --git a/executive-summary/default-header.html b/executive-summary/default-header.html deleted file mode 100644 index 64fc119ea6..0000000000 --- a/executive-summary/default-header.html +++ /dev/null @@ -1,14 +0,0 @@ -<html> -<head> -<title>Evolution - Executive Summary</title> -</head> - -<body bgcolor="#ffffff"> -<table> -<tr valign="center"> -<td align="right"><img src="executive-summary.png"></td> -</tr> -</table> -</body> -</html> - diff --git a/executive-summary/evolution-services/.cvsignore b/executive-summary/evolution-services/.cvsignore deleted file mode 100644 index d9807cd94f..0000000000 --- a/executive-summary/evolution-services/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -Executive-Summary.h -Executive-Summary-common.c -Executive-Summary-skels.c -Executive-Summary-stubs.c -Makefile.in -Makefile -core -.deps -.libs -*.lo -*.la
\ No newline at end of file diff --git a/executive-summary/evolution-services/Makefile.am b/executive-summary/evolution-services/Makefile.am deleted file mode 100644 index e371b0ddf4..0000000000 --- a/executive-summary/evolution-services/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -lib_LTLIBRARIES = libevolution-services.la - -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/shell \ - -I$(top_srcdir)/executive-summary \ - -I$(top_builddir)/executive-summary \ - $(EXTRA_GNOME_CFLAGS) \ - $(GNOME_VFS_CFLAGS) \ - $(GTKHTML_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DG_LOG_DOMAIN=\"evolution-services\" - -IDL_GENERATED = \ - Executive-Summary.h \ - Executive-Summary-common.c \ - Executive-Summary-skels.c \ - Executive-Summary-stubs.c - -Executive-Summary-impl.o: Executive-Summary.h - -IDLS = \ - $(srcdir)/../idl/Executive-Summary.idl \ - $(srcdir)/../idl/Summary.idl \ - $(srcdir)/../idl/SummaryComponent.idl \ - $(srcdir)/../idl/HtmlView.idl - -$(IDL_GENERATED): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ - $(srcdir)/../idl/Executive-Summary.idl - -libevolution_services_la_SOURCES = \ - $(IDL_GENERATED) \ - executive-summary-component.c \ - executive-summary-component.h \ - executive-summary-component-factory-client.c \ - executive-summary-component-factory-client.h \ - executive-summary-html-view.c \ - executive-summary-html-view.h - -libevolution_services_la_LIBADD = \ - $(top_builddir)/e-util/libeutil.la \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(GTKHTML_LIBS) - -BUILT_SOURCES = $(IDL_GENERATED) -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/executive-summary/evolution-services/executive-summary-client.c b/executive-summary/evolution-services/executive-summary-client.c deleted file mode 100644 index b2415810ba..0000000000 --- a/executive-summary/evolution-services/executive-summary-client.c +++ /dev/null @@ -1,171 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-client.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include "Executive-Summary.h" -#include "executive-summary-client.h" -#include "executive-summary-component.h" - -#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _ExecutiveSummaryClientPrivate { - int dummy; -}; - -static void -executive_summary_client_destroy (GtkObject *object) -{ - ExecutiveSummaryClient *client; - ExecutiveSummaryClientPrivate *priv; - - client = EXECUTIVE_SUMMARY_CLIENT (object); - priv = client->private; - - if (priv == NULL) - return; - - g_free (priv); - client->private = NULL; - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -executive_summary_client_init (ExecutiveSummaryClient *client) -{ - ExecutiveSummaryClientPrivate *priv; - - priv = g_new0 (ExecutiveSummaryClientPrivate, 1); - client->private = priv; -} - -static void -executive_summary_client_class_init (ExecutiveSummaryClientClass *client) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (client); - parent_class = gtk_type_class (PARENT_TYPE); - - object_class->destroy = executive_summary_client_destroy; -} - -void -executive_summary_client_construct (ExecutiveSummaryClient *client, - CORBA_Object corba_object) -{ - g_return_if_fail (client != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_CLIENT (client)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object); -} - -E_MAKE_TYPE (executive_summary_client, "ExecutiveSummaryClient", - ExecutiveSummaryClient, executive_summary_client_class_init, - executive_summary_client_init, PARENT_TYPE); - -void -executive_summary_client_set_title (ExecutiveSummaryClient *client, - int id, - const char *title) -{ - GNOME_Evolution_Summary_ViewFrame summary; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - summary = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - GNOME_Evolution_Summary_ViewFrame_setTitle (summary, id, title, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error setting title to %s:%s", title, CORBA_exception_id (&ev)); - } - - CORBA_exception_free (&ev); -} - -void -executive_summary_client_set_icon (ExecutiveSummaryClient *client, - int id, - const char *icon) -{ - GNOME_Evolution_Summary_ViewFrame summary; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - summary = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - GNOME_Evolution_Summary_ViewFrame_setIcon (summary, id, icon, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error setting icon to %s:%s", icon, CORBA_exception_id (&ev)); - } - - CORBA_exception_free (&ev); -} - -void -executive_summary_client_flash (ExecutiveSummaryClient *client, - int id) -{ - GNOME_Evolution_Summary_ViewFrame summary; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - summary = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - GNOME_Evolution_Summary_ViewFrame_flash (summary, id, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error flashing"); - } - - CORBA_exception_free (&ev); -} - -void -executive_summary_client_update (ExecutiveSummaryClient *client, - int id, - const char *html) -{ - GNOME_Evolution_Summary_ViewFrame summary; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - summary = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - GNOME_Evolution_Summary_ViewFrame_updateComponent (summary, id, html, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error updating the component"); - } - - CORBA_exception_free (&ev); -} - - diff --git a/executive-summary/evolution-services/executive-summary-client.h b/executive-summary/evolution-services/executive-summary-client.h deleted file mode 100644 index 765f9e3988..0000000000 --- a/executive-summary/evolution-services/executive-summary-client.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-client.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_CLIENT_H__ -#define _EXECUTIVE_SUMMARY_CLIENT_H__ - -#include <bonobo/bonobo-object.h> -#include <evolution-services/executive-summary-component.h> - -#define EXECUTIVE_SUMMARY_CLIENT_TYPE (executive_summary_client_get_type ()) -#define EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClient)) -#define EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClientClass)) -#define IS_EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE)) -#define IS_EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE)) - -typedef struct _ExecutiveSummaryClientPrivate ExecutiveSummaryClientPrivate; -typedef struct _ExecutiveSummaryClient ExecutiveSummaryClient; -typedef struct _ExecutiveSummaryClientClass ExecutiveSummaryClientClass; - -struct _ExecutiveSummaryClient { - BonoboObjectClient parent; - - ExecutiveSummaryClientPrivate *private; -}; - -struct _ExecutiveSummaryClientClass { - BonoboObjectClientClass parent_class; -}; - -GtkType executive_summary_client_get_type (void); -void executive_summary_client_construct (ExecutiveSummaryClient *client, - CORBA_Object object); -void executive_summary_client_set_title (ExecutiveSummaryClient *client, - int id, - const char *title); -void executive_summary_client_set_icon (ExecutiveSummaryClient *client, - int id, - const char *icon); -void executive_summary_client_flash (ExecutiveSummaryClient *client, - int id); -void executive_summary_client_update (ExecutiveSummaryClient *client, - int id, - const char *html); - -#endif diff --git a/executive-summary/evolution-services/executive-summary-component-client.c b/executive-summary/evolution-services/executive-summary-component-client.c deleted file mode 100644 index 98247bdb00..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-client.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component-client.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include <liboaf/liboaf.h> - -#include <Executive-Summary.h> -#include "executive-summary-component-client.h" -#include "executive-summary.h" - -#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _ExecutiveSummaryComponentClientPrivate { - int dummy; -}; - -static void -executive_summary_component_client_destroy (GtkObject *object) -{ - ExecutiveSummaryComponentClient *client; - ExecutiveSummaryComponentClientPrivate *priv; - - client = EXECUTIVE_SUMMARY_COMPONENT_CLIENT (object); - priv = client->private; - - if (priv == NULL) - return; - - g_free (priv); - client->private = NULL; - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -executive_summary_component_client_init (ExecutiveSummaryComponentClient *client) -{ - ExecutiveSummaryComponentClientPrivate *priv; - - priv = g_new0 (ExecutiveSummaryComponentClientPrivate, 1); - client->private = priv; -} - -static void -executive_summary_component_client_class_init (ExecutiveSummaryComponentClientClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = executive_summary_component_client_destroy; - - parent_class = gtk_type_class (PARENT_TYPE); -} - -void -executive_summary_component_client_construct (ExecutiveSummaryComponentClient *client, - CORBA_Object corba_object) -{ - g_return_if_fail (client != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object); -} - -ExecutiveSummaryComponentClient* -executive_summary_component_client_new (const char *id) -{ - ExecutiveSummaryComponentClient *client; - CORBA_Environment ev; - CORBA_Object corba_object; - - g_return_val_if_fail (id != NULL, NULL); - - CORBA_exception_init (&ev); - - corba_object = oaf_activate_from_id ((char *)id, 0, NULL, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("Could not start %s\n", id); - return NULL; - } - - CORBA_exception_free (&ev); - - if (corba_object == CORBA_OBJECT_NIL) { - g_warning ("Could not activate %s\n", id); - return NULL; - } - - client = gtk_type_new (executive_summary_component_client_get_type ()); - executive_summary_component_client_construct (client, corba_object); - - return client; -} - -/* External API */ -void -executive_summary_component_client_set_owner (ExecutiveSummaryComponentClient *client, - ExecutiveSummary *summary) -{ - GNOME_Evolution_Summary_Component component; - GNOME_Evolution_Summary_ViewFrame corba_object; - CORBA_Environment ev; - - g_return_if_fail (client != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client)); - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY (summary)); - - CORBA_exception_init (&ev); - component = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (summary)); - - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - GNOME_Evolution_Summary_Component_setOwner (component, corba_object, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error setting owner"); - } - - CORBA_exception_free (&ev); - return; -} - -void -executive_summary_component_client_unset_owner (ExecutiveSummaryComponentClient *client) -{ - GNOME_Evolution_Summary_Component component; - CORBA_Environment ev; - - g_return_if_fail (client != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client)); - - CORBA_exception_init (&ev); - component = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - GNOME_Evolution_Summary_Component_unsetOwner (component, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error unsetting owner"); - } - - CORBA_exception_free (&ev); - return; -} - -E_MAKE_TYPE (executive_summary_component_client, - "ExecutiveSummaryComponentClient", - ExecutiveSummaryComponentClient, - executive_summary_component_client_class_init, - executive_summary_component_client_init, PARENT_TYPE) diff --git a/executive-summary/evolution-services/executive-summary-component-client.h b/executive-summary/evolution-services/executive-summary-component-client.h deleted file mode 100644 index 5a8e70f0fe..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-client.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component-client.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_COMPONENT_CLIENT_H__ -#define _EXECUTIVE_SUMMARY_COMPONENT_CLIENT_H__ - -#include <bonobo/bonobo-object.h> -#include <evolution-services/executive-summary.h> -#include <evolution-services/executive-summary-component-view.h> - -#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE (executive_summary_component_client_get_type ()) -#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClient)) -#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClientClass)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE)) - -typedef struct _ExecutiveSummaryComponentClientPrivate ExecutiveSummaryComponentClientPrivate; -typedef struct _ExecutiveSummaryComponentClient ExecutiveSummaryComponentClient; -typedef struct _ExecutiveSummaryComponentClientClass ExecutiveSummaryComponentClientClass; - -struct _ExecutiveSummaryComponentClient { - BonoboObjectClient parent; - - ExecutiveSummaryComponentClientPrivate *private; -}; - -struct _ExecutiveSummaryComponentClientClass { - BonoboObjectClientClass parent_class; -}; - -GtkType executive_summary_component_client_get_type (void); -ExecutiveSummaryComponentClient *executive_summary_component_client_new (const char *id); - -void executive_summary_component_client_set_owner (ExecutiveSummaryComponentClient *client, - ExecutiveSummary *summary); -void executive_summary_component_client_unset_owner (ExecutiveSummaryComponentClient *client); - -void executive_summary_component_client_supports (ExecutiveSummaryComponentClient *client, - gboolean *bonobo, - gboolean *html); - -void executive_summary_component_client_configure (ExecutiveSummaryComponentClient *client, - ExecutiveSummaryComponentView *view); -void executive_summary_component_client_destroy_view (ExecutiveSummaryComponentClient *client, - ExecutiveSummaryComponentView *view); - -#endif - diff --git a/executive-summary/evolution-services/executive-summary-component-factory-client.c b/executive-summary/evolution-services/executive-summary-component-factory-client.c deleted file mode 100644 index 23b5034849..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-factory-client.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component-factory-client.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include <liboaf/liboaf.h> - -#include <Executive-Summary.h> -#include "executive-summary-component-factory-client.h" - -#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _ExecutiveSummaryComponentFactoryClientPrivate { - int dummy; -}; - -static void -executive_summary_component_factory_client_destroy (GtkObject *object) -{ - ExecutiveSummaryComponentFactoryClient *client; - ExecutiveSummaryComponentFactoryClientPrivate *priv; - - client = EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (object); - priv = client->private; - - if (priv == NULL) - return; - - g_free (priv); - client->private = NULL; - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -executive_summary_component_factory_client_init (ExecutiveSummaryComponentFactoryClient *client) -{ - ExecutiveSummaryComponentFactoryClientPrivate *priv; - - priv = g_new0 (ExecutiveSummaryComponentFactoryClientPrivate, 1); - client->private = priv; -} - -static void -executive_summary_component_factory_client_class_init (ExecutiveSummaryComponentFactoryClientClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = executive_summary_component_factory_client_destroy; - - parent_class = gtk_type_class (PARENT_TYPE); -} - -E_MAKE_TYPE (executive_summary_component_factory_client, - "ExecutiveSummaryComponentFactoryClient", - ExecutiveSummaryComponentFactoryClient, - executive_summary_component_factory_client_class_init, - executive_summary_component_factory_client_init, PARENT_TYPE) - - -/*** Public API ***/ -/** - * executive_summary_component_factory_client_construct: - * @client: The ExecutiveSummaryComponentFactoryClient to construct. - * @corba_object: The CORBA_Object to construct it from. - * - * Constructs a client from the given CORBA_Object. - */ -void -executive_summary_component_factory_client_construct (ExecutiveSummaryComponentFactoryClient *client, - CORBA_Object corba_object) -{ - g_return_if_fail (client != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (client)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object); -} - -/** - * executive_summary_component_factory_client_new: - * @id: The OAFIID of the component to activate. - * - * Activates the component specified by @id, and creates a server side client - * for that object. - * - * Returns: A pointer to an ExecutiveSummaryComponentFactoryClient object. - */ -ExecutiveSummaryComponentFactoryClient * -executive_summary_component_factory_client_new (const char *id) -{ - ExecutiveSummaryComponentFactoryClient *client; - CORBA_Environment ev; - CORBA_Object corba_object; - - g_return_val_if_fail (id != NULL, NULL); - - CORBA_exception_init (&ev); - - corba_object = oaf_activate_from_id ((char *)id, 0, NULL, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - g_warning ("Could not start %s\n", id); - return NULL; - } - - CORBA_exception_free (&ev); - - if (corba_object == CORBA_OBJECT_NIL) { - g_warning ("Could not activate %s\n", id); - return NULL; - } - - client = gtk_type_new (executive_summary_component_factory_client_get_type ()); - executive_summary_component_factory_client_construct (client, - corba_object); - - return client; -} - -/** - * executive_summary_component_factory_client_create_view: - * @client: The client on which to create the view. - * - * Creates a new view of a remote component. - * - * Returns: A GNOME_Evolution_Summary_Component. - */ -GNOME_Evolution_Summary_Component -executive_summary_component_factory_client_create_view (ExecutiveSummaryComponentFactoryClient *client) -{ - GNOME_Evolution_Summary_ComponentFactory factory; - GNOME_Evolution_Summary_Component component; - CORBA_Environment ev; - - g_return_val_if_fail (client != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (client), - CORBA_OBJECT_NIL); - - CORBA_exception_init (&ev); - factory = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - - component = GNOME_Evolution_Summary_ComponentFactory_createView (factory, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Error creating view: %s", CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return component; -} diff --git a/executive-summary/evolution-services/executive-summary-component-factory-client.h b/executive-summary/evolution-services/executive-summary-component-factory-client.h deleted file mode 100644 index 71cd7af613..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-factory-client.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component-factory-client.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_H__ -#define _EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_H__ - -#include <bonobo/bonobo-object-client.h> - -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE (executive_summary_component_factory_client_get_type ()) -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClient)) -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClientClass)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE)) - -typedef struct _ExecutiveSummaryComponentFactoryClientPrivate ExecutiveSummaryComponentFactoryClientPrivate; -typedef struct _ExecutiveSummaryComponentFactoryClient ExecutiveSummaryComponentFactoryClient; -typedef struct _ExecutiveSummaryComponentFactoryClientClass ExecutiveSummaryComponentFactoryClientClass; - -struct _ExecutiveSummaryComponentFactoryClient { - BonoboObjectClient parent; - - ExecutiveSummaryComponentFactoryClientPrivate *private; -}; - -struct _ExecutiveSummaryComponentFactoryClientClass { - BonoboObjectClientClass parent_class; -}; - -GtkType executive_summary_component_factory_client_get_type (void); - -void executive_summary_component_factory_client_construct (ExecutiveSummaryComponentFactoryClient *client, - CORBA_Object corba_object); -ExecutiveSummaryComponentFactoryClient *executive_summary_component_factory_client_new (const char *id); -CORBA_Object executive_summary_component_factory_client_create_view (ExecutiveSummaryComponentFactoryClient *client); - -#endif - diff --git a/executive-summary/evolution-services/executive-summary-component-view.c b/executive-summary/evolution-services/executive-summary-component-view.c deleted file mode 100644 index 2b769b3bbe..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-view.c +++ /dev/null @@ -1,400 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component.c - Bonobo implementation of - * SummaryComponent.idl - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include <evolution-services/executive-summary-component.h> -#include <evolution-services/executive-summary-component-view.h> - -struct _ExecutiveSummaryComponentViewPrivate { - ExecutiveSummaryComponent *component; - - BonoboControl *control; - Bonobo_Control objref; - - char *html; - - char *title; - char *icon; - - int id; -}; - -static GtkObjectClass *parent_class = NULL; -#define PARENT_TYPE (gtk_object_get_type ()) - -enum { - CONFIGURE, - LAST_SIGNAL -}; - -static gint32 view_signals[LAST_SIGNAL] = { 0 }; - -static void -executive_summary_component_view_destroy (GtkObject *object) -{ - ExecutiveSummaryComponentView *view; - ExecutiveSummaryComponentViewPrivate *priv; - - view = EXECUTIVE_SUMMARY_COMPONENT_VIEW (object); - priv = view->private; - if (priv == NULL) - return; - - if (priv->component) - bonobo_object_unref (BONOBO_OBJECT (priv->component)); - - if (priv->control) - bonobo_object_unref (BONOBO_OBJECT (priv->control)); - - g_free (priv->html); - g_free (priv->title); - g_free (priv->icon); - - g_free (priv); - view->private = NULL; - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -executive_summary_component_view_class_init (ExecutiveSummaryComponentViewClass *view_class) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (view_class); - - object_class->destroy = executive_summary_component_view_destroy; - - view_signals[CONFIGURE] = gtk_signal_new ("configure", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryComponentViewClass, configure), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, view_signals, LAST_SIGNAL); - - parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -executive_summary_component_view_init (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - priv = g_new (ExecutiveSummaryComponentViewPrivate, 1); - view->private = priv; - - priv->control = NULL; - priv->objref = NULL; - priv->html = NULL; - priv->title = NULL; - priv->icon = NULL; - priv->id = -1; -} - -E_MAKE_TYPE (executive_summary_component_view, "ExecutiveSummaryComponentView", - ExecutiveSummaryComponentView, - executive_summary_component_view_class_init, - executive_summary_component_view_init, PARENT_TYPE); - -void -executive_summary_component_view_construct (ExecutiveSummaryComponentView *view, - ExecutiveSummaryComponent *component, - BonoboControl *control, - const char *html, - const char *title, - const char *icon) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - g_return_if_fail (control != NULL || html != NULL); - - priv = view->private; - - if (component != NULL) { - bonobo_object_ref (BONOBO_OBJECT (component)); - priv->component = component; - } else { - priv->component = NULL; - } - - if (control != NULL) { - bonobo_object_ref (BONOBO_OBJECT (control)); - priv->control = control; - } else { - priv->control = NULL; - } - - if (html) { - priv->html = g_strdup (html); - } else { - priv->html = NULL; - } - - if (title) { - priv->title = g_strdup (title); - } else { - priv->title = NULL; - } - - if (icon) { - priv->icon = g_strdup (icon); - } else { - priv->icon = NULL; - } -} - -ExecutiveSummaryComponentView * -executive_summary_component_view_new (ExecutiveSummaryComponent *component, - BonoboControl *control, - const char *html, - const char *title, - const char *icon) -{ - ExecutiveSummaryComponentView *view; - - g_return_val_if_fail (control != NULL || html != NULL, NULL); - - view = gtk_type_new (executive_summary_component_view_get_type ()); - executive_summary_component_view_construct (view, component, control, - html, title, icon); - - return view; -} - -void -executive_summary_component_view_set_title (ExecutiveSummaryComponentView *view, - const char *title) -{ - ExecutiveSummaryComponentViewPrivate *priv; - ExecutiveSummaryComponent *component; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - if (priv->title) - g_free (priv->title); - priv->title = g_strdup (title); - - component = priv->component; - if (component == NULL) { - return; - } - - executive_summary_component_set_title (component, view); -} - -const char * -executive_summary_component_view_get_title (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL); - - priv = view->private; - - return priv->title; -} - -void -executive_summary_component_view_set_icon (ExecutiveSummaryComponentView *view, - const char *icon) -{ - ExecutiveSummaryComponentViewPrivate *priv; - ExecutiveSummaryComponent *component; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - if (priv->icon) - g_free (priv->icon); - priv->icon = g_strdup (icon); - - component = priv->component; - if (component == NULL) { - return; - } - - executive_summary_component_set_icon (component, view); -} - -const char * -executive_summary_component_view_get_icon (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL); - - priv = view->private; - - return priv->icon; -} - -void -executive_summary_component_view_flash (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - ExecutiveSummaryComponent *component; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - component = priv->component; - if (component == NULL) { - g_warning ("Calling %s from the wrong side of the CORBA interface", __FUNCTION__); - return; - } - - executive_summary_component_flash (component, view); -} - -void -executive_summary_component_view_set_html (ExecutiveSummaryComponentView *view, - const char *html) -{ - ExecutiveSummaryComponentViewPrivate *priv; - ExecutiveSummaryComponent *component; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - if (priv->html) - g_free (priv->html); - - priv->html = g_strdup (html); - - component = priv->component; - if (component == NULL) { - return; - } - - executive_summary_component_update (component, view); -} - -void -executive_summary_component_view_configure (ExecutiveSummaryComponentView *view) -{ - gtk_signal_emit (GTK_OBJECT (view), view_signals[CONFIGURE]); -} - -const char * -executive_summary_component_view_get_html (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL); - - priv = view->private; - - return priv->html; -} - -BonoboObject * -executive_summary_component_view_get_control (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL); - - priv = view->private; - - return (BonoboObject *)priv->control; -} - -void -executive_summary_component_view_set_id (ExecutiveSummaryComponentView *view, - int id) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - - priv->id = id; -} - -int -executive_summary_component_view_get_id (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, -1); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), -1); - - priv = view->private; - - return priv->id; -} - -void -executive_summary_component_view_set_objref (ExecutiveSummaryComponentView *view, - Bonobo_Control objref) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view)); - - priv = view->private; - - if (priv->objref) { - g_warning ("View already has an objref."); - return; - } - - priv->objref = objref; -} - -GtkWidget * -executive_summary_component_view_get_widget (ExecutiveSummaryComponentView *view) -{ - ExecutiveSummaryComponentViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL); - - priv = view->private; - if (priv->objref == NULL) { - g_warning ("View has no objref."); - return NULL; - } - - return bonobo_widget_new_control_from_objref (priv->objref, NULL); -} diff --git a/executive-summary/evolution-services/executive-summary-component-view.h b/executive-summary/evolution-services/executive-summary-component-view.h deleted file mode 100644 index a204dbe007..0000000000 --- a/executive-summary/evolution-services/executive-summary-component-view.h +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __EXECUTIVE_SUMMARY_COMPONENT_VIEW_H__ -#define __EXECUTIVE_SUMMARY_COMPONENT_VIEW_H__ - -#include <bonobo/bonobo-control.h> -#include <evolution-services/executive-summary-component.h> - -#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE (executive_summary_component_view_get_type ()) -#define EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentView)) -#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentClass)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS_TYPE)) - -typedef struct _ExecutiveSummaryComponentViewPrivate ExecutiveSummaryComponentViewPrivate; -typedef struct _ExecutiveSummaryComponentView ExecutiveSummaryComponentView; -typedef struct _ExecutiveSummaryComponentViewClass ExecutiveSummaryComponentViewClass; - -struct _ExecutiveSummaryComponentView { - GtkObject object; - - ExecutiveSummaryComponentViewPrivate *private; -}; - -struct _ExecutiveSummaryComponentViewClass { - GtkObjectClass parent_class; - - /* Signals */ - void (* configure) (ExecutiveSummaryComponentView *view); -}; - -GtkType executive_summary_component_view_get_type (void); -void -executive_summary_component_view_construct (ExecutiveSummaryComponentView *view, - ExecutiveSummaryComponent *component, - BonoboControl *control, - const char *html, - const char *title, - const char *icon); -ExecutiveSummaryComponentView * -executive_summary_component_view_new (ExecutiveSummaryComponent *component, - BonoboControl *control, - const char *html, - const char *title, - const char *icon); - -void executive_summary_component_view_set_title (ExecutiveSummaryComponentView *view, - const char *title); -const char *executive_summary_component_view_get_title (ExecutiveSummaryComponentView *view); - -void executive_summary_component_view_set_icon (ExecutiveSummaryComponentView *view, - const char *icon); -const char *executive_summary_component_view_get_icon (ExecutiveSummaryComponentView *view); - -void executive_summary_component_view_flash (ExecutiveSummaryComponentView *view); - -void executive_summary_component_view_set_html (ExecutiveSummaryComponentView *view, - const char *html); -const char *executive_summary_component_view_get_html (ExecutiveSummaryComponentView *view); -BonoboObject *executive_summary_component_view_get_control (ExecutiveSummaryComponentView *view); - -int executive_summary_component_view_get_id (ExecutiveSummaryComponentView *view); -void executive_summary_component_view_set_id (ExecutiveSummaryComponentView *view, - int id); -void executive_summary_component_view_configure (ExecutiveSummaryComponentView *view); -void executive_summary_component_view_set_objref (ExecutiveSummaryComponentView *view, - Bonobo_Control objref); -GtkWidget *executive_summary_component_view_get_widget (ExecutiveSummaryComponentView *view); - -#endif - - diff --git a/executive-summary/evolution-services/executive-summary-component.c b/executive-summary/evolution-services/executive-summary-component.c deleted file mode 100644 index cb2fd95ee9..0000000000 --- a/executive-summary/evolution-services/executive-summary-component.c +++ /dev/null @@ -1,353 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component.c - Bonobo implementation of - * SummaryComponent.idl - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include "Executive-Summary.h" -#include "executive-summary-component.h" - -static void executive_summary_component_destroy (GtkObject *object); -static void executive_summary_component_init (ExecutiveSummaryComponent *component); -static void executive_summary_component_class_init (ExecutiveSummaryComponentClass *esc_class); - -#define PARENT_TYPE (bonobo_object_get_type ()) -#define FACTORY_PARENT_TYPE (bonobo_object_get_type ()) - -static BonoboObjectClass *parent_class; -static BonoboObjectClass *factory_parent_class; - -struct _ExecutiveSummaryComponentPrivate { - int dummy; -}; - -struct _ExecutiveSummaryComponentFactoryPrivate { - EvolutionServicesCreateViewFn create_view; - void *closure; -}; - -/* CORBA interface */ -static POA_GNOME_Evolution_Summary_Component__vepv SummaryComponent_vepv; -static POA_GNOME_Evolution_Summary_ComponentFactory__vepv ComponentFactory_vepv; - -static POA_GNOME_Evolution_Summary_Component * -create_servant (void) -{ - POA_GNOME_Evolution_Summary_Component *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Summary_Component *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &SummaryComponent_vepv; - - CORBA_exception_init (&ev); - POA_GNOME_Evolution_Summary_Component__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static void -executive_summary_component_destroy (GtkObject *object) -{ - ExecutiveSummaryComponent *component; - ExecutiveSummaryComponentPrivate *priv; - - component = EXECUTIVE_SUMMARY_COMPONENT (object); - priv = component->private; - - if (priv == NULL) - return; - - g_free (priv); - component->private = NULL; - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -/* Init */ -static void -corba_class_init (void) -{ - POA_GNOME_Evolution_Summary_Component__vepv *vepv; - POA_GNOME_Evolution_Summary_Component__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_Summary_Component__epv, 1); - - vepv = &SummaryComponent_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Summary_Component_epv = epv; -} - -static void -executive_summary_component_class_init (ExecutiveSummaryComponentClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = executive_summary_component_destroy; - - parent_class = gtk_type_class (PARENT_TYPE); - - corba_class_init (); -} - -static void -executive_summary_component_init (ExecutiveSummaryComponent *component) -{ - ExecutiveSummaryComponentPrivate *priv; - - priv = g_new (ExecutiveSummaryComponentPrivate, 1); - - component->private = priv; -} - -E_MAKE_TYPE (executive_summary_component, "ExecutiveSummaryComponent", - ExecutiveSummaryComponent, executive_summary_component_class_init, - executive_summary_component_init, PARENT_TYPE); - - -static void -executive_summary_component_construct (ExecutiveSummaryComponent *component, - GNOME_Evolution_Summary_Component corba_object) -{ - g_return_if_fail (component != NULL); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (component), corba_object); -} - - -/*** Public API ***/ -/** - * executive_summary_component_new: - * - * Creates a BonoboObject that implements the Summary::Component interface. - * - * Returns: A pointer to a BonoboObject. - */ -BonoboObject * -executive_summary_component_new (void) -{ - ExecutiveSummaryComponent *component; - POA_GNOME_Evolution_Summary_Component *servant; - GNOME_Evolution_Summary_Component corba_object; - - servant = create_servant (); - if (servant == NULL) - return NULL; - - component = gtk_type_new (executive_summary_component_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (component), - servant); - - executive_summary_component_construct (component, corba_object); - - return BONOBO_OBJECT (component); -} - - -/**** ComponentFactory implementation ****/ - -static POA_GNOME_Evolution_Summary_ComponentFactory * -create_factory_servant (void) -{ - POA_GNOME_Evolution_Summary_ComponentFactory *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Summary_ComponentFactory *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &ComponentFactory_vepv; - - CORBA_exception_init (&ev); - POA_GNOME_Evolution_Summary_ComponentFactory__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static GNOME_Evolution_Summary_Component -impl_GNOME_Evolution_Summary_ComponentFactory_createView (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - BonoboObject *view; - ExecutiveSummaryComponentFactory *factory; - ExecutiveSummaryComponentFactoryPrivate *priv; - GNOME_Evolution_Summary_Component component, component_dup; - - bonobo_object = bonobo_object_from_servant (servant); - factory = EXECUTIVE_SUMMARY_COMPONENT_FACTORY (bonobo_object); - priv = factory->private; - - view = (* priv->create_view) (factory, priv->closure); - g_return_val_if_fail (view != NULL, CORBA_OBJECT_NIL); - - component = bonobo_object_corba_objref (BONOBO_OBJECT (view)); - - component_dup = CORBA_Object_duplicate (component, ev); - - return component_dup; -} - -static void -corba_factory_init (void) -{ - POA_GNOME_Evolution_Summary_ComponentFactory__vepv *vepv; - POA_GNOME_Evolution_Summary_ComponentFactory__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_Summary_ComponentFactory__epv, 1); - epv->createView = impl_GNOME_Evolution_Summary_ComponentFactory_createView; - - vepv = &ComponentFactory_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Summary_ComponentFactory_epv = epv; -} - -/* GtkObject methods */ -static void -executive_summary_component_factory_destroy (GtkObject *object) -{ - ExecutiveSummaryComponentFactory *factory; - ExecutiveSummaryComponentFactoryPrivate *priv; - - factory = EXECUTIVE_SUMMARY_COMPONENT_FACTORY (object); - priv = factory->private; - - if (priv == NULL) - return; - - g_free (priv); - factory->private = NULL; - - (* GTK_OBJECT_CLASS (factory_parent_class)->destroy) (object); -} - -static void -executive_summary_component_factory_class_init (ExecutiveSummaryComponentFactoryClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = executive_summary_component_factory_destroy; - - factory_parent_class = gtk_type_class (FACTORY_PARENT_TYPE); - corba_factory_init (); -} - -static void -executive_summary_component_factory_init (ExecutiveSummaryComponentFactory *factory) -{ - ExecutiveSummaryComponentFactoryPrivate *priv; - - priv = g_new (ExecutiveSummaryComponentFactoryPrivate, 1); - - priv->create_view = NULL; - priv->closure = NULL; - factory->private = priv; -} - -E_MAKE_TYPE (executive_summary_component_factory, - "ExecutiveSummaryComponentFactory", - ExecutiveSummaryComponentFactory, - executive_summary_component_factory_class_init, - executive_summary_component_factory_init, FACTORY_PARENT_TYPE); - -static void -executive_summary_component_factory_construct (ExecutiveSummaryComponentFactory *factory, - GNOME_Evolution_Summary_ComponentFactory corba_object, - EvolutionServicesCreateViewFn create_view, - void *closure) -{ - ExecutiveSummaryComponentFactoryPrivate *priv; - - g_return_if_fail (factory != NULL); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (factory), corba_object); - priv = factory->private; - - priv->create_view = create_view; - priv->closure = closure; -} - - -/*** Public API ***/ -/** - * executive_summary_component_factory_new: - * @create_view: A pointer to the function to create a new view. - * @closure: The data to be passed to the @create_view function when it is - * called. - * - * Creates a BonoboObject that implements the Summary::ComponentFactory - * interface. - * - * Returns: A pointer to a BonoboObject. - */ -BonoboObject * -executive_summary_component_factory_new (EvolutionServicesCreateViewFn create_view, - void *closure) -{ - ExecutiveSummaryComponentFactory *factory; - POA_GNOME_Evolution_Summary_ComponentFactory *servant; - GNOME_Evolution_Summary_ComponentFactory corba_object; - - servant = create_factory_servant (); - if (servant == NULL) - return NULL; - - factory = gtk_type_new (executive_summary_component_factory_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (factory), - servant); - executive_summary_component_factory_construct (factory, corba_object, - create_view, closure); - return BONOBO_OBJECT (factory); -} - diff --git a/executive-summary/evolution-services/executive-summary-component.h b/executive-summary/evolution-services/executive-summary-component.h deleted file mode 100644 index 23b653d488..0000000000 --- a/executive-summary/evolution-services/executive-summary-component.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-component.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_COMPONENT_H__ -#define _EXECUTIVE_SUMMARY_COMPONENT_H__ - -#include <gtk/gtksignal.h> -#include <bonobo/bonobo-object.h> - -#define EXECUTIVE_SUMMARY_COMPONENT_TYPE (executive_summary_component_get_type ()) -#define EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponent)) -#define EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponentClass)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE)) - -typedef struct _ExecutiveSummaryComponentPrivate ExecutiveSummaryComponentPrivate; -typedef struct _ExecutiveSummaryComponent ExecutiveSummaryComponent; -typedef struct _ExecutiveSummaryComponentClass ExecutiveSummaryComponentClass; - -struct _ExecutiveSummaryComponent { - BonoboObject parent; - - ExecutiveSummaryComponentPrivate *private; -}; - -struct _ExecutiveSummaryComponentClass { - BonoboObjectClass parent_class; -}; - -GtkType executive_summary_component_get_type (void); - -BonoboObject *executive_summary_component_new (void); - - -/* Factory */ - -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE (executive_summary_component_factory_get_type ()) -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactory)) -#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactoryClass)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE)) -#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE)) - -typedef struct _ExecutiveSummaryComponentFactoryPrivate ExecutiveSummaryComponentFactoryPrivate; -typedef struct _ExecutiveSummaryComponentFactory ExecutiveSummaryComponentFactory; -typedef struct _ExecutiveSummaryComponentFactoryClass ExecutiveSummaryComponentFactoryClass; - -typedef BonoboObject *(* EvolutionServicesCreateViewFn) (ExecutiveSummaryComponentFactory *factory, - void *closure); - -struct _ExecutiveSummaryComponentFactory { - BonoboObject parent; - - ExecutiveSummaryComponentFactoryPrivate *private; -}; - -struct _ExecutiveSummaryComponentFactoryClass { - BonoboObjectClass parent_class; -}; - -GtkType executive_summary_component_factory_get_type (void); - -BonoboObject *executive_summary_component_factory_new (EvolutionServicesCreateViewFn create_view, - void *closure); -#endif diff --git a/executive-summary/evolution-services/executive-summary-html-view.c b/executive-summary/evolution-services/executive-summary-html-view.c deleted file mode 100644 index 054da34fae..0000000000 --- a/executive-summary/evolution-services/executive-summary-html-view.c +++ /dev/null @@ -1,340 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-html-view.c - Bonobo implementation of - * HtmlView.idl - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtksignal.h> -#include <bonobo/bonobo-event-source.h> -#include <gal/util/e-util.h> - -#include "Executive-Summary.h" -#include "executive-summary-html-view.h" - -static void executive_summary_html_view_destroy (GtkObject *object); -static void executive_summary_html_view_init (ExecutiveSummaryHtmlView *component); -static void executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClass *klass); - -#define PARENT_TYPE (bonobo_object_get_type ()) - -static BonoboObjectClass *parent_class; - -enum { - HANDLE_URI, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -struct _ExecutiveSummaryHtmlViewPrivate { - BonoboEventSource *event_source; - - char *html; -}; - -/* CORBA interface */ -static POA_GNOME_Evolution_Summary_HTMLView__vepv HTMLView_vepv; - -static POA_GNOME_Evolution_Summary_HTMLView * -create_servant (void) -{ - POA_GNOME_Evolution_Summary_HTMLView *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Summary_HTMLView *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &HTMLView_vepv; - - CORBA_exception_init (&ev); - POA_GNOME_Evolution_Summary_HTMLView__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static CORBA_char * -impl_GNOME_Evolution_Summary_HTMLView_getHtml (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ExecutiveSummaryHtmlView *view; - ExecutiveSummaryHtmlViewPrivate *priv; - - bonobo_object = bonobo_object_from_servant (servant); - view = EXECUTIVE_SUMMARY_HTML_VIEW (bonobo_object); - priv = view->private; - - return CORBA_string_dup (priv->html? priv->html: ""); -} - -static void -impl_GNOME_Evolution_Summary_HTMLView_handleURI (PortableServer_Servant servant, - const CORBA_char *uri, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - - bonobo_object = bonobo_object_from_servant (servant); - - gtk_signal_emit (GTK_OBJECT (bonobo_object), signals[HANDLE_URI], uri); -} - -/* GtkObject methods */ -static void -executive_summary_html_view_destroy (GtkObject *object) -{ - ExecutiveSummaryHtmlView *view; - ExecutiveSummaryHtmlViewPrivate *priv; - - g_print ("BANG!"); - view = EXECUTIVE_SUMMARY_HTML_VIEW (object); - priv = view->private; - - if (priv == NULL) - return; - - g_free (priv->html); - g_free (priv); - - view->private = NULL; - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -static void -corba_class_init (void) -{ - POA_GNOME_Evolution_Summary_HTMLView__vepv *vepv; - POA_GNOME_Evolution_Summary_HTMLView__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_Summary_HTMLView__epv, 1); - epv->getHtml = impl_GNOME_Evolution_Summary_HTMLView_getHtml; - epv->handleURI = impl_GNOME_Evolution_Summary_HTMLView_handleURI; - - vepv = &HTMLView_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Summary_HTMLView_epv = epv; -} - -static void -executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = executive_summary_html_view_destroy; - - signals[HANDLE_URI] = gtk_signal_new ("handle_uri", GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryHtmlViewClass, handle_uri), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - parent_class = gtk_type_class (PARENT_TYPE); - - corba_class_init (); -} - -static void -executive_summary_html_view_init (ExecutiveSummaryHtmlView *view) -{ - ExecutiveSummaryHtmlViewPrivate *priv; - - priv = g_new (ExecutiveSummaryHtmlViewPrivate, 1); - priv->html = NULL; - priv->event_source = NULL; - - view->private = priv; -} - -E_MAKE_TYPE (executive_summary_html_view, "ExecutiveSummaryHtmlView", - ExecutiveSummaryHtmlView, executive_summary_html_view_class_init, - executive_summary_html_view_init, PARENT_TYPE); - -static void -executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view, - BonoboEventSource *event_source, - GNOME_Evolution_Summary_HTMLView corba_object) -{ - ExecutiveSummaryHtmlViewPrivate *priv; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - priv = view->private; - - priv->event_source = event_source; - bonobo_object_add_interface (BONOBO_OBJECT (view), - BONOBO_OBJECT (priv->event_source)); - - bonobo_object_construct (BONOBO_OBJECT (view), corba_object); -} - -/*** Public API ***/ -/** - * executive_summary_html_view_new_full: - * @event_source: A BonoboEventSource that will be aggregated onto the - * interface. - * - * Creates a new BonoboObject that implements - * the HTMLView.idl interface. - * - * Returns: A BonoboObject. - */ -BonoboObject * -executive_summary_html_view_new_full (BonoboEventSource *event_source) -{ - ExecutiveSummaryHtmlView *view; - POA_GNOME_Evolution_Summary_HTMLView *servant; - GNOME_Evolution_Summary_HTMLView corba_object; - - g_return_val_if_fail (event_source != NULL, NULL); - g_return_val_if_fail (BONOBO_IS_EVENT_SOURCE (event_source), NULL); - - servant = create_servant (); - if (servant == NULL) - return NULL; - - view = gtk_type_new (executive_summary_html_view_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (view), - servant); - - executive_summary_html_view_construct (view, event_source, corba_object); - - return BONOBO_OBJECT (view); -} - -/** - * executive_summary_html_view_new: - * - * Creates a new BonoboObject that implements - * the HTMLView.idl interface. - * Creates a default Bonobo::EventSource interface that will be aggregated onto - * the interface. - * - * Returns: A BonoboObject. - */ -BonoboObject * -executive_summary_html_view_new (void) -{ - BonoboEventSource *event_source; - - event_source = bonobo_event_source_new (); - return executive_summary_html_view_new_full (event_source); -} - -/** - * executive_summary_html_view_set_html: - * @view: The ExecutiveSummaryHtmlView to operate on, - * @html: The HTML as a string. - * - * Sets the HTML string in @view to @html. @html is copied into @view, - * so after this call you are free to do what you want with @html. - */ -void -executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view, - const char *html) -{ - ExecutiveSummaryHtmlViewPrivate *priv; - CORBA_any any; - CORBA_short s; - - g_return_if_fail (view != NULL); - g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view)); - - priv = view->private; - if (priv->html) - g_free (priv->html); - - if (html != NULL) - priv->html = g_strdup (html); - else - priv->html = NULL; - - /* Notify any listeners */ - s = 0; - - any._type = (CORBA_TypeCode) TC_short; - any._value = &s; - - bonobo_event_source_notify_listeners (BONOBO_EVENT_SOURCE (priv->event_source), - EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED, - &any, NULL); -} - -/** - * executive_summary_html_view_get_html: - * @view: The ExecutiveSummaryHtmlView to operate on. - * - * Retrieves the HTML stored in @view. This return value is not duplicated - * before returning, so you should not free it. Instead, if you want to free - * the HTML stored in @view, you should use - * executive_summary_html_view_set_html (view, NULL);. - * - * Returns: A pointer to the HTML stored in @view. - */ -const char * -executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view) -{ - ExecutiveSummaryHtmlViewPrivate *priv; - - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view), NULL); - - priv = view->private; - return priv->html; -} - -/** - * executive_summary_html_view_get_event_source: - * @view: The ExecutiveSummaryHtmlView to operate on. - * - * Retrieves the BonoboEventSource that is used in this view. - * - * Returns: A BonoboEventSource pointer. - */ -BonoboEventSource * -executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view) -{ - g_return_val_if_fail (view != NULL, NULL); - g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view), NULL); - - return view->private->event_source; -} diff --git a/executive-summary/evolution-services/executive-summary-html-view.h b/executive-summary/evolution-services/executive-summary-html-view.h deleted file mode 100644 index d5cf6741fc..0000000000 --- a/executive-summary/evolution-services/executive-summary-html-view.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary-html-view.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_HTML_VIEW_H__ -#define _EXECUTIVE_SUMMARY_HTML_VIEW_H__ - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-event-source.h> - -#define EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED "GNOME:Evolution:Summary:HTMLView:html_changed" - -#define EXECUTIVE_SUMMARY_HTML_VIEW_TYPE (executive_summary_html_view_get_type ()) -#define EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlView)) -#define EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlViewClass)) -#define IS_EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE)) -#define IS_EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE)) - -typedef struct _ExecutiveSummaryHtmlViewPrivate ExecutiveSummaryHtmlViewPrivate; -typedef struct _ExecutiveSummaryHtmlView ExecutiveSummaryHtmlView; -typedef struct _ExecutiveSummaryHtmlViewClass ExecutiveSummaryHtmlViewClass; - -struct _ExecutiveSummaryHtmlView { - BonoboObject parent; - - ExecutiveSummaryHtmlViewPrivate *private; -}; - -struct _ExecutiveSummaryHtmlViewClass { - BonoboObjectClass parent_class; - - void (* handle_uri) (ExecutiveSummaryHtmlView *view, - char *uri); -}; - -GtkType executive_summary_html_view_get_type (void); -BonoboObject *executive_summary_html_view_new_full (BonoboEventSource *event_source); -BonoboObject *executive_summary_html_view_new (void); - -void executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view, - const char *html); -const char *executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view); -BonoboEventSource *executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view); - -#endif - diff --git a/executive-summary/evolution-services/executive-summary.c b/executive-summary/evolution-services/executive-summary.c deleted file mode 100644 index 8be483b750..0000000000 --- a/executive-summary/evolution-services/executive-summary.c +++ /dev/null @@ -1,266 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary.c - Bonobo implementation of Summary.idl - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> - -#include "Executive-Summary.h" -#include "executive-summary.h" - -static void executive_summary_destroy (GtkObject *object); -static void executive_summary_class_init (ExecutiveSummaryClass *es_class); -static void executive_summary_init (ExecutiveSummary *es); - -#define PARENT_TYPE (bonobo_object_get_type ()) - -enum { - UPDATE, - SET_TITLE, - SET_ICON, - FLASH, - LAST_SIGNAL -}; - -static guint32 summary_signals [LAST_SIGNAL] = { 0 }; -static BonoboObjectClass *parent_class; - -struct _ExecutiveSummaryPrivate { - int dummy; -}; - -/* CORBA interface implementation */ -static POA_GNOME_Evolution_Summary_ViewFrame__vepv Summary_vepv; - -static POA_GNOME_Evolution_Summary_ViewFrame * -create_servant (void) -{ - POA_GNOME_Evolution_Summary_ViewFrame *servant; - CORBA_Environment ev; - - servant = (POA_GNOME_Evolution_Summary_ViewFrame *)g_new0 (BonoboObjectServant, 1); - servant->vepv = &Summary_vepv; - - CORBA_exception_init (&ev); - - POA_GNOME_Evolution_Summary_ViewFrame__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -#if 0 -static void -impl_GNOME_Evolution_Summary_ViewFrame_setTitle (PortableServer_Servant servant, - CORBA_long id, - const CORBA_char *title, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ExecutiveSummary *summary; - - bonobo_object = bonobo_object_from_servant (servant); - summary = EXECUTIVE_SUMMARY (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (summary), summary_signals[SET_TITLE], - id, title); -} - -static void -impl_GNOME_Evolution_Summary_ViewFrame_setIcon (PortableServer_Servant servant, - CORBA_long id, - const CORBA_char *title, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ExecutiveSummary *summary; - - bonobo_object = bonobo_object_from_servant (servant); - summary = EXECUTIVE_SUMMARY (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (summary), summary_signals[SET_ICON], - id, title); -} - -static void -impl_GNOME_Evolution_Summary_ViewFrame_flash (PortableServer_Servant servant, - CORBA_long id, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ExecutiveSummary *summary; - - bonobo_object = bonobo_object_from_servant (servant); - summary = EXECUTIVE_SUMMARY (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (summary), summary_signals[FLASH], id); -} - -static void -impl_GNOME_Evolution_Summary_ViewFrame_updateComponent (PortableServer_Servant servant, - const CORBA_long id, - const CORBA_char *html, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ExecutiveSummary *summary; - - bonobo_object = bonobo_object_from_servant (servant); - summary = EXECUTIVE_SUMMARY (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (summary), summary_signals[UPDATE], - id, html); -} -#endif - -/* GtkObject methods */ -static void -executive_summary_destroy (GtkObject *object) -{ - ExecutiveSummary *es; - ExecutiveSummaryPrivate *priv; - - es = EXECUTIVE_SUMMARY (object); - priv = es->private; - - if (priv == NULL) - return; - - g_free (priv); - es->private = NULL; -} - -/* Initialisation */ - -static void -corba_class_init (void) -{ - POA_GNOME_Evolution_Summary_ViewFrame__vepv *vepv; - POA_GNOME_Evolution_Summary_ViewFrame__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_GNOME_Evolution_Summary_ViewFrame__epv, 1); - - vepv = &Summary_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_Summary_ViewFrame_epv = epv; -} - -static void -executive_summary_class_init (ExecutiveSummaryClass *es_class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) es_class; - - object_class->destroy = executive_summary_destroy; - - parent_class = gtk_type_class (PARENT_TYPE); - - summary_signals[UPDATE] = gtk_signal_new ("update", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, update), - gtk_marshal_NONE__POINTER_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER); - summary_signals[SET_TITLE] = gtk_signal_new ("set_title", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, set_title), - gtk_marshal_NONE__POINTER_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER); - summary_signals[SET_ICON] = gtk_signal_new ("set_icon", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, set_icon), - gtk_marshal_NONE__POINTER_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER); - summary_signals[FLASH] = gtk_signal_new ("flash", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, flash), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, summary_signals, LAST_SIGNAL); - - corba_class_init (); -} - -static void -executive_summary_init (ExecutiveSummary *es) -{ - ExecutiveSummaryPrivate *priv; - - priv = g_new (ExecutiveSummaryPrivate, 1); - es->private = priv; -} - -E_MAKE_TYPE (executive_summary, "ExecutiveSummary", ExecutiveSummary, - executive_summary_class_init, executive_summary_init, PARENT_TYPE); - -void -executive_summary_construct (ExecutiveSummary *es, - GNOME_Evolution_Summary_ViewFrame corba_object) -{ - bonobo_object_construct (BONOBO_OBJECT (es), corba_object); -} - -BonoboObject * -executive_summary_new (void) -{ - POA_GNOME_Evolution_Summary_ViewFrame *servant; - GNOME_Evolution_Summary_ViewFrame corba_object; - ExecutiveSummary *es; - - servant = create_servant (); - if (servant == NULL) - return NULL; - - es = gtk_type_new (executive_summary_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (es), - servant); - executive_summary_construct (es, corba_object); - - return BONOBO_OBJECT (es); -} diff --git a/executive-summary/evolution-services/executive-summary.h b/executive-summary/evolution-services/executive-summary.h deleted file mode 100644 index 704da9a721..0000000000 --- a/executive-summary/evolution-services/executive-summary.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* executive-summary.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _EXECUTIVE_SUMMARY_H__ -#define _EXECUTIVE_SUMMARY_H__ - -#include <gtk/gtksignal.h> -#include <bonobo.h> -#include "Executive-Summary.h" - -#define EXECUTIVE_SUMMARY_TYPE (executive_summary_get_type ()) -#define EXECUTIVE_SUMMARY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummary)) -#define EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummaryClass)) -#define IS_EXECUTIVE_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE)) -#define IS_EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE)) - -typedef struct _ExecutiveSummaryPrivate ExecutiveSummaryPrivate; -typedef struct _ExecutiveSummary ExecutiveSummary; -typedef struct _ExecutiveSummaryClass ExecutiveSummaryClass; - -struct _ExecutiveSummary { - BonoboObject parent; - - ExecutiveSummaryPrivate *private; -}; - -struct _ExecutiveSummaryClass { - BonoboObjectClass parent_class; - - void (* update) (ExecutiveSummary *summary, - const GNOME_Evolution_Summary_Component component, - const char *html); - void (* set_title) (ExecutiveSummary *summary, - const GNOME_Evolution_Summary_Component component, - const char *title); - void (* set_icon) (ExecutiveSummary *summary, - const GNOME_Evolution_Summary_Component component, - const char *icon); - void (* flash) (ExecutiveSummary *summary, - const GNOME_Evolution_Summary_Component component); -}; - -GtkType executive_summary_get_type (void); -void executive_summary_construct (ExecutiveSummary *es, - GNOME_Evolution_Summary_ViewFrame corba_object); -BonoboObject *executive_summary_new (void); -#endif - diff --git a/executive-summary/idl/.cvsignore b/executive-summary/idl/.cvsignore deleted file mode 100644 index b840c21800..0000000000 --- a/executive-summary/idl/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile
\ No newline at end of file diff --git a/executive-summary/idl/Executive-Summary.idl b/executive-summary/idl/Executive-Summary.idl deleted file mode 100644 index a564e90fe6..0000000000 --- a/executive-summary/idl/Executive-Summary.idl +++ /dev/null @@ -1,4 +0,0 @@ -#include <Bonobo.idl> -#include <SummaryComponent.idl> -#include <Summary.idl> -#include <HtmlView.idl> diff --git a/executive-summary/idl/HtmlView.idl b/executive-summary/idl/HtmlView.idl deleted file mode 100644 index 627873563f..0000000000 --- a/executive-summary/idl/HtmlView.idl +++ /dev/null @@ -1,25 +0,0 @@ -/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * CORBA interface for an HTML view. - * - * Authors: - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - */ - -#include <Bonobo.idl> - -module GNOME { -module Evolution { -module Summary { - - interface HTMLView : Bonobo::Unknown { - string getHtml (); - - void handleURI (in string uri); - }; -}; -}; -}; - diff --git a/executive-summary/idl/Makefile.am b/executive-summary/idl/Makefile.am deleted file mode 100644 index 29a35f43cf..0000000000 --- a/executive-summary/idl/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -EXTRA_DIST = $(IDLS) - -IDLS = \ - Executive-Summary.idl \ - HtmlView.idl \ - Summary.idl \ - SummaryComponent.idl
\ No newline at end of file diff --git a/executive-summary/idl/Summary.idl b/executive-summary/idl/Summary.idl deleted file mode 100644 index c460b856ab..0000000000 --- a/executive-summary/idl/Summary.idl +++ /dev/null @@ -1,20 +0,0 @@ -/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * CORBA interface for the Evolution shell. - * - * Authors: - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - */ - -#include <Bonobo.idl> - -module GNOME { -module Evolution { -module Summary { - interface ViewFrame: Bonobo::Unknown { - }; -}; -}; -}; diff --git a/executive-summary/idl/SummaryComponent.idl b/executive-summary/idl/SummaryComponent.idl deleted file mode 100644 index f6aab37469..0000000000 --- a/executive-summary/idl/SummaryComponent.idl +++ /dev/null @@ -1,36 +0,0 @@ -/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * CORBA interface for the Evolution Executive Summary Components. - * - * Authors: - * Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - */ - -/* TODO: Needs Exceptions */ - -#include <Bonobo.idl> -#include <oaf-factory.idl> - -module GNOME { -module Evolution { -module Summary { - interface ViewFrame; - - interface Component: Bonobo::Unknown { - }; - - interface ComponentFactory: Bonobo::Unknown { - /** - * createView: - * - * Creates a new Component object. - * - * Returns: A Component object. - **/ - Component createView (); - }; -}; -}; -}; diff --git a/executive-summary/summary.html b/executive-summary/summary.html deleted file mode 100644 index 16602da2a6..0000000000 --- a/executive-summary/summary.html +++ /dev/null @@ -1,45 +0,0 @@ -<html> -<head> -<Title>Evolution Executive Summary</title> -</head> - -<body bgcolor="#ffffff" background="executive-summary-bg.png"> -<table cellpadding="0" cellspacing="0" numcols="3" width="100%" height="100%" border="0"> -<tr> -<td bgcolor="#9aadbf" height="102"> -<img src="butterfly.png"></td> -<td width="100%" colspan="2" align="middle" bgcolor="#9aadbf"> -E V O L U T I O N -</td></tr> -<!-- Hmmmm. -<tr><td bgcolor="#9aadbf"> </td> -<td valign="top" width="100"><img src="executive-summary-curve.png"></td> -<td width="95%"> - -<table border="0" align="middle"> -<tr> -<td align="left"> - <form method="get" action="/search" name="f"> - <b>Search On Google</b> - <input type="text" size="15" name=q> - <input type="submit" name"submit"> - </form> -</td> -</tr> ---> -<tr> -<td colspan="2"> -<!-- EVOLUTION EXECUTIVE SUMMARY SERVICES DO NOT REMOVE --> -</td> -</tr> - -</table> - -</td> -</tr> - -</table> -</body> -</html> - - diff --git a/executive-summary/test-service/.cvsignore b/executive-summary/test-service/.cvsignore deleted file mode 100644 index e9a7d4280b..0000000000 --- a/executive-summary/test-service/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile.in -Makefile -core -.deps -.libs -test-service -rdf-summary -GNOME_Evolution_Summary_test.oaf -GNOME_Evolution_Summary_rdf.oaf diff --git a/executive-summary/test-service/Makefile.am b/executive-summary/test-service/Makefile.am deleted file mode 100644 index 458b015c1e..0000000000 --- a/executive-summary/test-service/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -bin_PROGRAMS = test-service rdf-summary - -CFLAGS += -g -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/executive-summary \ - $(EXTRA_GNOME_CFLAGS) \ - $(BONOBO_HTML_GNOME_CFLAGS) \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" - -test_service_SOURCES = \ - main.c - -test_service_LDADD = \ - $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(EXTRA_GNOME_LIBS) - -#test_bonobo_service_SOURCES = \ -# test-bonobo.c - -#test_bonobo_service_LDADD = \ -# $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \ -# $(BONOBO_VFS_GNOME_LIBS) \ -# $(EXTRA_GNOME_LIBS) - -rdf_summary_SOURCES = \ - rdf-summary.c - -rdf_summary_LDADD = \ - $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(EXTRA_GNOME_LIBS) - -oafdir = $(datadir)/oaf -oaf_in_files = \ - GNOME_Evolution_Summary_test.oaf.in \ - GNOME_Evolution_Summary_rdf.oaf.in -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) - -@XML_I18N_MERGE_OAF_RULE@ - -EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) diff --git a/executive-summary/test-service/main.c b/executive-summary/test-service/main.c deleted file mode 100644 index b80f3e6a89..0000000000 --- a/executive-summary/test-service/main.c +++ /dev/null @@ -1,296 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* main.c - * Test Service that counts the number of seconds since it was started. - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-generic-factory.h> -#include <bonobo/bonobo-persist-stream.h> -#include <bonobo/bonobo-property-bag.h> -#include <evolution-services/executive-summary-component.h> -#include <evolution-services/executive-summary-html-view.h> - -#include <liboaf/liboaf.h> - -enum { - PROPERTY_TITLE, - PROPERTY_ICON -}; - -struct _UserData { - char *title; - char *icon; -}; -typedef struct _UserData UserData; - -static int running_views = 0; - -#define TEST_SERVICE_ID "OAFIID:GNOME_Evolution_Summary_test_ComponentFactory" - -static BonoboGenericFactory *factory = NULL; - -/* PersistStream callbacks */ -static void -load_from_stream (BonoboPersistStream *ps, - Bonobo_Stream stream, - Bonobo_Persist_ContentType type, - gpointer data, - CORBA_Environment *ev) -{ - char *str; - - if (*type && g_strcasecmp (type, "application/x-test-service") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - bonobo_stream_client_read_string (stream, &str, ev); - if (ev->_major != CORBA_NO_EXCEPTION || str == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - g_print ("Restoring with :%s\n", str); - g_free (str); -} - -static void -save_to_stream (BonoboPersistStream *ps, - const Bonobo_Stream stream, - Bonobo_Persist_ContentType type, - gpointer data, - CORBA_Environment *ev) -{ - - if (*type && g_strcasecmp (type, "application/x-test-service") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - bonobo_stream_client_printf (stream, TRUE, ev, "Yo yo yo"); - if (ev->_major != CORBA_NO_EXCEPTION) - return; -} - -static Bonobo_Persist_ContentTypeList * -content_types (BonoboPersistStream *ps, - void *closure, - CORBA_Environment *ev) -{ - return bonobo_persist_generate_content_types (1, "application/x-test-service"); -} - -/* PropertyControl callback */ - -/* Propertybag set/get functions */ -static void -set_property (BonoboPropertyBag *bag, - const BonoboArg *arg, - guint arg_id, - CORBA_Environment *ev, - gpointer user_data) -{ - switch (arg_id) { - case PROPERTY_TITLE: - g_print ("Setting title.\n"); - break; - - case PROPERTY_ICON: - g_print ("Setting icon.\n"); - break; - - default: - break; - } -} - -static void -get_property (BonoboPropertyBag *bag, - BonoboArg *arg, - guint arg_id, - CORBA_Environment *ev, - gpointer user_data) -{ - UserData *ud = (UserData *) user_data; - - switch (arg_id) { - case PROPERTY_TITLE: - BONOBO_ARG_SET_STRING (arg, ud->title); - break; - - case PROPERTY_ICON: - BONOBO_ARG_SET_STRING (arg, ud->icon); - break; - - default: - break; - } -} - -static void -component_destroyed (GtkObject *object, - gpointer data) -{ - UserData *ud = (UserData *) data; - /* Free the UserData structure */ - g_free (ud->title); - g_free (ud->icon); - g_free (ud); - - running_views--; - - g_print ("Destroy!\n"); - if (running_views <= 0) { - bonobo_object_unref (BONOBO_OBJECT (factory)); - gtk_main_quit (); - } -} - -static BonoboObject * -create_view (ExecutiveSummaryComponentFactory *_factory, - void *closure) -{ - BonoboObject *component, *view; - BonoboPersistStream *stream; - BonoboPropertyBag *bag; - BonoboEventSource *event_source; - UserData *ud; - - /* Create the component object */ - component = executive_summary_component_new (); - - /* Create the UserData structure and fill it */ - ud = g_new (UserData, 1); - ud->title = g_strdup ("Hello World!"); - ud->icon = g_strdup ("apple-red.png"); - - gtk_signal_connect (GTK_OBJECT (component), "destroy", - GTK_SIGNAL_FUNC (component_destroyed), ud); - - /* Now create the aggregate objects. For a "service" - either a Summary::HTMLView or Bonobo::Control are required. - Other supported agreggate objects are - PersistStream: For saving and restoring the component. - PropertyBag: To set the icon and title and other properties - PropertyControl: To produce a control to configure the service. - - To aggregate the objects - i) Create the objects using their creation functions - ii) Use bonobo_object_add_interface (). - */ - - /* Create an event source to share with all the interfaces, - as we can only aggregate one onto the ExecutiveSummaryComponent */ - event_source = bonobo_event_source_new (); - - /* The Summary::HTMLView interface */ - view = executive_summary_html_view_new_full (event_source); - /* Set the default HTML */ - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (view), - "<B>Hello World</b>"); - - bonobo_object_add_interface (component, view); - - /* Add the Bonobo::PropertyBag interface */ - bag = bonobo_property_bag_new_full (get_property, set_property, - event_source, ud); - /* Add the properties. There should be 2: - window_title: For the window title. - window_icon: For the window icon. - */ - bonobo_property_bag_add (bag, - "window_title", PROPERTY_TITLE, - BONOBO_ARG_STRING, - NULL, - "The title of this components window", 0); - bonobo_property_bag_add (bag, - "window_icon", PROPERTY_ICON, - BONOBO_ARG_STRING, - NULL, - "The icon for this component's window", 0); - - /* Now add the interface */ - bonobo_object_add_interface (component, BONOBO_OBJECT(bag)); - - /* Add the Bonobo::PersistStream interface */ - stream = bonobo_persist_stream_new (load_from_stream, save_to_stream, - NULL, content_types, NULL); - bonobo_object_add_interface (component, BONOBO_OBJECT(stream)); - - running_views++; - /* Return the ExecutiveSummaryComponent object */ - return component; -} - -static BonoboObject * -factory_fn (BonoboGenericFactory *generic_factory, - void *closure) -{ - BonoboObject *_factory; - - /* Create an executive summary component factory */ - _factory = executive_summary_component_factory_new (create_view, NULL); - return _factory; -} - -void -test_service_factory_init (void) -{ - if (factory != NULL) - return; - - /* Register the factory creation function and the IID */ - factory = bonobo_generic_factory_new (TEST_SERVICE_ID, factory_fn, NULL); - if (factory == NULL) { - g_warning ("Cannot initialize test service"); - exit (0); - } -} - -int -main (int argc, char **argv) -{ - CORBA_ORB orb; - - /* Init GNOME, oaf and bonobo */ - gnome_init_with_popt_table ("Test service", VERSION, - argc, argv, oaf_popt_options, 0, NULL); - orb = oaf_init (argc, argv); - - if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - g_error ("Could not initialize Bonobo"); - } - - /* Register the factory */ - test_service_factory_init (); - - /* Enter main */ - bonobo_main (); - - return 0; -} - diff --git a/executive-summary/test-service/rdf-summary.c b/executive-summary/test-service/rdf-summary.c deleted file mode 100644 index 301ededea2..0000000000 --- a/executive-summary/test-service/rdf-summary.c +++ /dev/null @@ -1,984 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* RDF viewer Evolution Executive Summary Component. - * Bonoboised by Iain Holmes <iain@ximian.com> - * Copyright (C) 2000 Ximian, Inc. - * - * Based on code from Portaloo - * Channel retrieval tool - * - * (C) 1998 Alan Cox. - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <glib.h> -#include <gnome-xml/parser.h> -#include <gnome-xml/xmlmemory.h> - -#include <bonobo/bonobo-generic-factory.h> -#include <bonobo/bonobo-persist-stream.h> -#include <bonobo/bonobo-property.h> -#include <bonobo/bonobo-property-bag.h> -#include <bonobo/bonobo-property-control.h> -#include <evolution-services/executive-summary-component.h> -#include <evolution-services/executive-summary-html-view.h> -#include <liboaf/liboaf.h> -#include <libgnomevfs/gnome-vfs.h> - -int xmlSubstituteEntitiesDefaultValue = 1; /* DV thinks of everything */ - -static int wipe_trackers = FALSE; -static int running_views = 0; - -static BonoboGenericFactory *factory = NULL; -#define RDF_SUMMARY_ID "OAFIID:GNOME_Evolution_Summary_rdf_SummaryComponentFactory" - -enum { - PROPERTY_TITLE, - PROPERTY_ICON -}; - -struct _RdfSummary { - BonoboObject *component; - BonoboObject *view; - BonoboPropertyBag *bag; - BonoboPropertyControl *property_control; - - GtkWidget *rdf; - GtkWidget *g_limit; - GtkWidget *g_title; - GtkWidget *g_update; - GtkWidget *g_update_container; - GtkAdjustment *adjustment; - - char *title; - char *icon; - char *location; - int limit; - gboolean showtitle; - - gboolean usetimer; - int time; - int timer; - - GString *str; - char *buffer; - - GnomeVFSAsyncHandle *handle; - - xmlDocPtr cache; -}; -typedef struct _RdfSummary RdfSummary; - -/************ RDF Parser *******************/ - -static char * -layer_find (xmlNodePtr node, - char *match, - char *fail) -{ - while (node!=NULL) { -#ifdef RDF_DEBUG - xmlDebugDumpNode (stdout, node, 32); - printf("%s.\n", node->name); -#endif - if (strcasecmp (node->name, match)==0) { - if (node->childs != NULL && node->childs->content != NULL) { - return node->childs->content; - } else { - return fail; - } - } - node = node->next; - } - return fail; -} - -static char * -layer_find_url (xmlNodePtr node, - char *match, - char *fail) -{ - char *p = layer_find (node, match, fail); - char *r = p; - static char *wb = NULL; - char *w; - - if (wb) { - free (wb); - } - - wb = w = malloc (3 * strlen (p)); - - if (w == NULL) { - fprintf(stderr, "Out of memory\n"); - exit(1); - } - - if (*r == ' ') r++; /* Fix UF bug */ - - while (*r) { - if (memcmp (r, "&", 5) == 0) { - *w++ = '&'; - r += 5; - continue; - } - if (memcmp (r, "<", 4) == 0) { - *w++ = '<'; - r += 4; - continue; - } - if (memcmp (r, ">", 4) == 0) { - *w++ = '>'; - r += 4; - continue; - } - if (*r == '"' || *r == ' '){ - *w++ = '%'; - *w++ = "0123456789ABCDEF"[*r/16]; - *w++ = "0123456789ABCDEF"[*r&15]; - r++; - continue; - } - *w++ = *r++; - } - *w = 0; - return wb; -} - -static void -tree_walk (xmlNodePtr root, - RdfSummary *summary, - GString *html) -{ - BonoboArg *arg; - xmlNodePtr walk; - xmlNodePtr rewalk = root; - xmlNodePtr channel = NULL; - xmlNodePtr image = NULL; - xmlNodePtr item[16]; - int items = 0; - int limit = summary->limit; - int i; - char *t; - char n[512]; - char *tmp; - - do { - walk = rewalk; - rewalk = NULL; - - while (walk!=NULL){ -#ifdef RDF_DEBUG - printf ("%p, %s\n", walk, walk->name); -#endif - if (strcasecmp (walk->name, "rdf") == 0) { - rewalk = walk->childs; - walk = walk->next; - continue; - } - if (strcasecmp (walk->name, "rss") == 0){ - rewalk = walk->childs; - walk = walk->next; - continue; - } - /* This is the channel top level */ -#ifdef RDF_DEBUG - printf ("Top level '%s'.\n", walk->name); -#endif - if (strcasecmp (walk->name, "channel") == 0) { - channel = walk; - rewalk = channel->childs; - } - if (strcasecmp (walk->name, "image") == 0) { - image = walk; - g_print ("Image\n"); - } - if (strcasecmp (walk->name, "item") == 0 && items < 16) { - item[items++] = walk; - } - walk = walk->next; - } - } - while (rewalk); - - if (channel == NULL) { - fprintf(stderr, "No channel definition.\n"); - exit(1); - } - - t = layer_find(channel->childs, "title", "No title"); - - arg = bonobo_arg_new (BONOBO_ARG_STRING); - - if (summary->showtitle) { - BONOBO_ARG_SET_STRING (arg, t); - } else { - BONOBO_ARG_SET_STRING (arg, ""); - } - - bonobo_property_bag_set_value (summary->bag, - "window_title", - (const BonoboArg *) arg, NULL); - bonobo_arg_release (arg); - - if (image && !wipe_trackers) { - char *icon; - - icon = layer_find_url (image->childs, "url", "apple-red.png"); - arg = bonobo_arg_new (BONOBO_ARG_STRING); - BONOBO_ARG_SET_STRING (arg, icon); - bonobo_property_bag_set_value (summary->bag, - "window_icon", - (const BonoboArg *) arg, NULL); - bonobo_arg_release (arg); - - } - - g_string_append (html, "<br clear=all><FONT size=\"-1\" face=\"helvetica\"><P><UL>\n"); - - items = MIN (limit, items); - for (i = 0; i < items; i++) { - char *p = layer_find (item[i]->childs, "title", "No information"); - - if (wipe_trackers) { - char *p = layer_find_url (item[i]->childs, "link", ""); - char *x = strchr (p, '?'); - unsigned char *r, *w; - int n; - if (x == NULL) - continue; - x++; - r = x; - w = x; - while (*r) { - if (*r == '+') { - *w++ = ' '; - } else if (*r == '%') { - sscanf (r+1, "%02x", &n); - *w++ = n; - r += 2; - } else { - *w++ = *r; - } - r++; - } - *w = 0; - tmp = g_strdup_printf ("<LI><A href=\"%s\">\n", x+4); - g_string_append (html, tmp); - g_free (tmp); - } - else { - tmp = g_strdup_printf ("<LI><A href=\"%s\">\n", layer_find_url(item[i]->childs, "link", "")); - g_string_append (html, tmp); - g_free (tmp); - } - - tmp = g_strdup_printf ("%s\n</A>\n", p); - g_string_append (html, tmp); - g_free (tmp); - } - g_string_append (html, "</UL></FONT>\n"); -} - -/********* ExecutiveSummaryComponent section **************/ -static void -view_destroyed (GtkObject *object, - gpointer data) -{ - RdfSummary *summary = (RdfSummary *) data; - - g_warning ("RDF: Point 1"); - if (summary->handle) - gnome_vfs_async_cancel (summary->handle); - - g_warning ("RDF: Point 2"); - - if (summary->cache != NULL) - xmlFreeDoc (summary->cache); - - g_free (summary->title); - g_free (summary->icon); - g_free (summary); - - running_views--; - g_print ("Running_views: %d\n", running_views); - if (running_views <= 0) { - gtk_main_quit (); - } - g_warning ("RDF: Point 3"); -} - -/* PersistStream callbacks */ -static void -load_from_stream (BonoboPersistStream *ps, - Bonobo_Stream stream, - Bonobo_Persist_ContentType type, - gpointer data, - CORBA_Environment *ev) -{ - RdfSummary *summary = (RdfSummary *) data; - char *str; - xmlChar *xml_str; - xmlDocPtr doc; - xmlNodePtr root, children; - - if (*type && g_strcasecmp (type, "application/x-rdf-summary") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - bonobo_stream_client_read_string (stream, &str, ev); - if (ev->_major != CORBA_NO_EXCEPTION || str == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - doc = xmlParseDoc ((xmlChar *) str); - - if (doc == NULL) { - g_warning ("Bad data: %s!", str); - g_free (str); - return; - } - - g_free (str); - - root = doc->root; - children = root->childs; - while (children) { - if (strcasecmp (children->name, "location") == 0) { - xml_str = xmlNodeListGetString (doc, children->childs, 1); - summary->location = g_strdup (xml_str); - xmlFree (xml_str); - - children = children->next; - continue; - } - - if (strcasecmp (children->name, "limit") == 0) { - xml_str = xmlNodeListGetString (doc, children->childs, 1); - summary->limit = atoi (xml_str); - xmlFree (xml_str); - - children = children->next; - continue; - } - - if (strcasecmp (children->name, "showtitle") == 0) { - xml_str = xmlNodeListGetString (doc, children->childs, 1); - summary->showtitle = atoi (xml_str); - xmlFree (xml_str); - - children = children->next; - continue; - } - - if (strcasecmp (children->name, "usetimer") == 0) { - xml_str = xmlNodeListGetString (doc, children->childs, 1); - summary->usetimer = atoi (xml_str); - xmlFree (xml_str); - - children = children->next; - continue; - } - - if (strcasecmp (children->name, "timer") == 0) { - xml_str = xmlNodeListGetString (doc, children->childs, 1); - summary->time = atoi (xml_str); - xmlFree (xml_str); - - children = children->next; - continue; - } - - g_print ("Unknown name: %s\n", children->name); - children = children->next; - } - xmlFreeDoc (doc); -} - -static char * -summary_to_string (RdfSummary *summary) -{ - xmlChar *out_str; - int out_len = 0; - xmlDocPtr doc; - xmlNodePtr root; - xmlNsPtr ns; - char *tmp_str; - - doc = xmlNewDoc ("1.0"); - ns = xmlNewGlobalNs (doc, "www.ximian.com", "rdf"); - - doc->root = xmlNewDocNode (doc, ns, "rdf-summary", NULL); - - xmlNewChild (doc->root, ns, "location", summary->location); - tmp_str = g_strdup_printf ("%d", summary->limit); - xmlNewChild (doc->root, ns, "limit", tmp_str); - g_free (tmp_str); - - tmp_str = g_strdup_printf ("%d", summary->showtitle); - xmlNewChild (doc->root, ns, "showtitle", tmp_str); - g_free (tmp_str); - - tmp_str = g_strdup_printf ("%d", summary->usetimer); - xmlNewChild (doc->root, ns, "usetimer", tmp_str); - g_free (tmp_str); - - tmp_str = g_strdup_printf ("%d", summary->time); - xmlNewChild (doc->root, ns, "timer", tmp_str); - g_free (tmp_str); - - xmlDocDumpMemory (doc, &out_str, &out_len); - - return out_str; -} - -static void -save_to_stream (BonoboPersistStream *ps, - const Bonobo_Stream stream, - Bonobo_Persist_ContentType type, - gpointer data, - CORBA_Environment *ev) -{ - RdfSummary *summary = (RdfSummary *) data; - char *str; - - if (*type && g_strcasecmp (type, "application/x-rdf-summary") != 0) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Bonobo_Persist_WrongDataType, NULL); - return; - } - - str = summary_to_string (summary); - if (str) - bonobo_stream_client_printf (stream, TRUE, ev, str); - xmlFree (str); - - return; -} - -static Bonobo_Persist_ContentTypeList * -content_types (BonoboPersistStream *ps, - void *closure, - CORBA_Environment *ev) -{ - return bonobo_persist_generate_content_types (1, "application/x-rdf-summary"); -} - -static void -display_doc (RdfSummary *summary) -{ - GString *html; - - html = g_string_new (""); - - tree_walk (summary->cache->root, summary, html); - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), html->str); - g_string_free (html, TRUE); -} - -static void -close_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - RdfSummary *summary) -{ - xmlDocPtr doc; - char *xml; - - if (summary == NULL) - return; - - summary->handle = NULL; - g_free (summary->buffer); - xml = summary->str->str; - g_string_free (summary->str, FALSE); - - if (summary->cache != NULL) - xmlFreeDoc (summary->cache); - - doc = xmlParseMemory (xml, strlen (xml)); - if (doc == NULL) { - char *emsg; - BonoboArg *arg; - - arg = bonobo_arg_new (BONOBO_ARG_STRING); - BONOBO_ARG_SET_STRING (arg, _("Error")); - bonobo_property_bag_set_value (summary->bag, - "window_title", - (const BonoboArg *) arg, - NULL); - bonobo_arg_release (arg); - - emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>", - summary->location); - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg); - g_free (emsg); - g_free (xml); - return; - } - - g_free (xml); - - /* Cache it for later */ - summary->cache = doc; - - /* Draw it */ - display_doc (summary); -} - -static void -read_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - gpointer buffer, - GnomeVFSFileSize bytes_requested, - GnomeVFSFileSize bytes_read, - RdfSummary *summary) -{ - if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { - char *emsg; - BonoboArg *arg; - - arg = bonobo_arg_new (BONOBO_ARG_STRING); - BONOBO_ARG_SET_STRING (arg, _("Error")); - bonobo_property_bag_set_value (summary->bag, - "window_title", - (const BonoboArg *) arg, - NULL); - bonobo_arg_release (arg); - - emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>", - summary->location); - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg); - g_free (emsg); - gnome_vfs_async_close (handle, - (GnomeVFSAsyncCloseCallback) close_callback, - NULL); - g_print ("NULLING\n"); - summary->handle = NULL; - } - - if (bytes_read == 0) { - /* EOF */ - gnome_vfs_async_close (handle, - (GnomeVFSAsyncCloseCallback) close_callback, - summary); - } else { - *((char *) buffer + bytes_read) = 0; - g_string_append (summary->str, (const char *) buffer); - gnome_vfs_async_read (handle, buffer, 4095, - (GnomeVFSAsyncReadCallback) read_callback, - summary); - } -} - -static void -open_callback (GnomeVFSAsyncHandle *handle, - GnomeVFSResult result, - RdfSummary *summary) -{ - GList *uri; - char *buffer; - - if (result != GNOME_VFS_OK) { - char *emsg; - BonoboArg *arg; - - arg = bonobo_arg_new (BONOBO_ARG_STRING); - BONOBO_ARG_SET_STRING (arg, _("Error")); - bonobo_property_bag_set_value (summary->bag, - "window_title", - (const BonoboArg *) arg, - NULL); - bonobo_arg_release (arg); - - emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>", - summary->location); - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg); - g_free (emsg); - summary->handle = NULL; - return; - } - - summary->str = g_string_new (""); - summary->buffer = g_new (char, 4096); - - gnome_vfs_async_read (handle, summary->buffer, 4095, - (GnomeVFSAsyncReadCallback) read_callback, - summary); -} - -static int -download (RdfSummary *summary) -{ - GnomeVFSAsyncHandle *handle; - char *html = "<b>Loading RDF file. . .<br>Please wait</b>"; - - executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), - html); - - gnome_vfs_async_open (&handle, summary->location, GNOME_VFS_OPEN_READ, - (GnomeVFSAsyncOpenCallback) open_callback, - summary); - - summary->handle = handle; - return FALSE; -} - -static void -download_cb (GtkWidget *w, - RdfSummary *summary) -{ - download (summary); -} - -static void -get_prop (BonoboPropertyBag *bag, - BonoboArg *arg, - guint arg_id, - CORBA_Environment *ev, - gpointer user_data) -{ - RdfSummary *summary = (RdfSummary *) user_data; - - switch (arg_id) { - case PROPERTY_TITLE: - BONOBO_ARG_SET_STRING (arg, summary->title); - break; - - case PROPERTY_ICON: - BONOBO_ARG_SET_STRING (arg, summary->icon); - break; - - default: - break; - } -} - -static void -set_prop (BonoboPropertyBag *bag, - const BonoboArg *arg, - guint arg_id, - CORBA_Environment *ev, - gpointer user_data) -{ - RdfSummary *summary = (RdfSummary *) user_data; - - switch (arg_id) { - case PROPERTY_TITLE: - if (summary->title) - g_free (summary->title); - - summary->title = g_strdup (BONOBO_ARG_GET_STRING (arg)); - g_print ("Notify listener!\n"); - bonobo_property_bag_notify_listeners (bag, "window_title", - arg, NULL); - break; - - case PROPERTY_ICON: - if (summary->icon) - g_free (summary->icon); - - summary->icon = g_strdup (BONOBO_ARG_GET_STRING (arg)); - g_print ("Notify listener 2\n"); - bonobo_property_bag_notify_listeners (bag, "window_icon", - arg, NULL); - break; - - default: - break; - } -} - -static void -item_changed (GtkWidget *widget, - RdfSummary *summary) -{ - if (widget == summary->g_update) { - summary->usetimer = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); - gtk_widget_set_sensitive (summary->g_update_container, - summary->usetimer); - } - - bonobo_property_control_changed (summary->property_control, NULL); -} - -static BonoboControl * -property_control (BonoboPropertyControl *property_control, - int page_num, - gpointer user_data) -{ - BonoboControl *control; - RdfSummary *summary = (RdfSummary *) user_data; - GtkWidget *container, *label, *hbox, *spinner, *button; - char *climit; - - container = gtk_vbox_new (FALSE, 2); - gtk_container_set_border_width (GTK_CONTAINER (container), 2); - hbox = gtk_hbox_new (FALSE, 2); - - label = gtk_label_new ("Location:"); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - summary->rdf = gtk_entry_new (); - if (summary->location) - gtk_entry_set_text (GTK_ENTRY (summary->rdf), summary->location); - - gtk_signal_connect (GTK_OBJECT (summary->rdf), "changed", - GTK_SIGNAL_FUNC (item_changed), summary); - - gtk_box_pack_start (GTK_BOX (hbox), summary->rdf, TRUE, TRUE, 0); - - gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0); - - hbox = gtk_hbox_new (FALSE, 2); - - label = gtk_label_new ("Maximum number of entries:"); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - summary->g_limit = gtk_entry_new (); - climit = g_strdup_printf ("%d", summary->limit); - gtk_entry_set_text (GTK_ENTRY (summary->g_limit), climit); - g_free (climit); - - gtk_signal_connect (GTK_OBJECT (summary->g_limit), "changed", - GTK_SIGNAL_FUNC (item_changed), summary); - - gtk_box_pack_start (GTK_BOX (hbox), summary->g_limit, TRUE, TRUE, 0); - - hbox = gtk_hbox_new (FALSE, 2); - - /* FIXME: Do this better? */ - label = gtk_label_new ("Show window title"); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - summary->g_title = gtk_check_button_new (); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->g_title), - summary->showtitle); - - gtk_signal_connect (GTK_OBJECT (summary->g_title), "toggled", - GTK_SIGNAL_FUNC (item_changed), summary); - - gtk_box_pack_start (GTK_BOX (hbox), summary->g_title, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0); - - hbox = gtk_hbox_new (FALSE, 2); - - /* Update */ - hbox = gtk_hbox_new (FALSE, 2); - label = gtk_label_new (_("Update automatically")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - summary->g_update = gtk_check_button_new (); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->g_update), - summary->usetimer); - - gtk_signal_connect (GTK_OBJECT (summary->g_update), "toggled", - GTK_SIGNAL_FUNC (item_changed), summary); - gtk_box_pack_start (GTK_BOX (hbox), summary->g_update, TRUE, TRUE, 0); - - button = gtk_button_new_with_label (_("Update now")); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (download_cb), summary); - gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0); - - /* Timer */ - hbox = gtk_hbox_new (FALSE, 2); - summary->g_update_container = hbox; - - label = gtk_label_new (_("Update every ")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - summary->adjustment = GTK_ADJUSTMENT(gtk_adjustment_new (summary->time / 1000 / 60, - 1.0, 1000.0, 1.0, 10.0, 1.0)); - spinner = gtk_spin_button_new (summary->adjustment, 1.0, 0); - gtk_signal_connect (GTK_OBJECT (spinner), "changed", - GTK_SIGNAL_FUNC (item_changed), summary); - - gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0); - - label = gtk_label_new (_("minutes")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0); - gtk_widget_set_sensitive (hbox, summary->usetimer); - - gtk_widget_show_all (container); - - control = bonobo_control_new (container); - return control; -} - -static void -property_action (GtkObject *property_control, - int page_num, - Bonobo_PropertyControl_Action action, - RdfSummary *summary) -{ - gboolean changed = FALSE; - char *old_location; - - switch (action) { - case Bonobo_PropertyControl_APPLY: - old_location = summary->location; - summary->showtitle = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (summary->g_title)); - summary->location = g_strdup (gtk_entry_get_text (GTK_ENTRY (summary->rdf))); - if (strcmp (old_location, summary->location) != 0) - changed = TRUE; - - summary->limit = atoi (gtk_entry_get_text (GTK_ENTRY (summary->g_limit))); - summary->time = summary->adjustment->value * 60 * 1000; - if (summary->timer) - gtk_timeout_remove (summary->timer); - summary->timer = gtk_timeout_add (summary->time, - (GSourceFunc)download, summary); - - if (changed) - g_idle_add ((GSourceFunc) download, summary); - else - g_idle_add ((GSourceFunc) display_doc, summary); - - g_free (old_location); - break; - - case Bonobo_PropertyControl_HELP: - g_print ("HELP: Page %d!\n", page_num); - break; - - default: - break; - } -} - -static BonoboObject * -create_view (ExecutiveSummaryComponentFactory *_factory, - void *closure) -{ - RdfSummary *summary; - BonoboObject *component, *view; - BonoboEventSource *event_source; - BonoboPersistStream *stream; - BonoboPropertyBag *bag; - BonoboPropertyControl *property; - - summary = g_new (RdfSummary, 1); - summary->icon = g_strdup ("apple-green.png"); - summary->title = g_strdup ("Downloading..."); - summary->location = g_strdup ("http://news.gnome.org/gnome-news/rdf"); - summary->limit = 10; - summary->showtitle = TRUE; - - summary->cache = NULL; - - summary->usetimer = TRUE; - summary->time = 600000; /* 10 minutes */ - summary->timer = gtk_timeout_add (summary->time, (GSourceFunc) download, - summary); - - component = executive_summary_component_new (); - gtk_signal_connect (GTK_OBJECT (component), "destroy", - GTK_SIGNAL_FUNC (view_destroyed), summary); - - summary->component = component; - - /* Share the event source between the ExecutiveSummaryHtmlView and the - BonoboPropertyControl as we can only have one Bonobo::EventSource - interface aggregated */ - event_source = bonobo_event_source_new (); - - /* Summary::HtmlView */ - view = executive_summary_html_view_new_full (event_source); - - summary->view = view; - bonobo_object_add_interface (component, view); - - /* Bonobo::PropertyBag */ - bag = bonobo_property_bag_new_full (get_prop, set_prop, - event_source, summary); - - summary->bag = bag; - bonobo_property_bag_add (bag, - "window_title", PROPERTY_TITLE, - BONOBO_ARG_STRING, NULL, - "The title of this component's window", 0); - bonobo_property_bag_add (bag, - "window_icon", PROPERTY_ICON, - BONOBO_ARG_STRING, NULL, - "The icon for this component's window", 0); - bonobo_object_add_interface (component, BONOBO_OBJECT(bag)); - - /* Bonobo::PropertyControl */ - property = bonobo_property_control_new_full (property_control, 1, - event_source, - summary); - summary->property_control = property; - - gtk_signal_connect (GTK_OBJECT (property), "action", - GTK_SIGNAL_FUNC (property_action), summary); - - bonobo_object_add_interface (component, BONOBO_OBJECT(property)); - - /* Bonobo::PersistStream */ - stream = bonobo_persist_stream_new (load_from_stream, save_to_stream, - NULL, content_types, summary); - bonobo_object_add_interface (component, BONOBO_OBJECT (stream)); - - running_views++; - gtk_idle_add ((GSourceFunc) download, summary); - - return component; -} - -static BonoboObject * -factory_fn (BonoboGenericFactory *_factory, - void *closure) -{ - BonoboObject *component_factory; - - component_factory = executive_summary_component_factory_new (create_view, NULL); - return component_factory; -} - -static void -factory_init (void) -{ - if (factory != NULL) { - return; - } - - factory = bonobo_generic_factory_new (RDF_SUMMARY_ID, factory_fn, NULL); - if (factory == NULL) { - g_error ("Cannot initialize factory"); - } -} - -int -main (int argc, - char *argv[]) -{ - CORBA_ORB orb; - - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - - gnome_init_with_popt_table ("RDF-Summary", VERSION, - argc, argv, oaf_popt_options, 0, NULL); - orb = oaf_init (argc, argv); - gnome_vfs_init (); - - if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - g_error ("Could not initialize Bonobo"); - } - - factory_init (); - bonobo_main (); - - return 0; -} - diff --git a/executive-summary/widgets/.cvsignore b/executive-summary/widgets/.cvsignore deleted file mode 100644 index ddca354b6d..0000000000 --- a/executive-summary/widgets/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -esummary-window-test
\ No newline at end of file diff --git a/executive-summary/widgets/Makefile.am b/executive-summary/widgets/Makefile.am deleted file mode 100644 index f83d956d63..0000000000 --- a/executive-summary/widgets/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -I$(includedir) \ - $(GNOME_INCLUDEDIR) \ - -DG_LOG_DOMAIN=\"Executive-Summary-Widgets\" \ - -g \ - -Wall \ - -Wmissing-prototypes \ - -Wmissing-declarations - -noinst_LIBRARIES = libesummary-widgets.a - -libesummary_widgets_a_SOURCES = \ - e-summary-subwindow.c \ - e-summary-subwindow.h \ - e-summary-titlebar.c \ - e-summary-titlebar.h \ - e-summary-title-button.c \ - e-summary-title-button.h - -noinst_PROGRAMS = \ - esummary-window-test - -esummary_window_test_SOURCES = \ - esummary-window-test.c - -esummary_window_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - libesummary-widgets.a \ - $(BONOBO_GNOME_LIBS) \ - $(top_builddir)/e-util/libeutil.la - diff --git a/executive-summary/widgets/e-summary-subwindow.c b/executive-summary/widgets/e-summary-subwindow.c deleted file mode 100644 index 336b73bb76..0000000000 --- a/executive-summary/widgets/e-summary-subwindow.c +++ /dev/null @@ -1,300 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtkframe.h> -#include <gal/util/e-util.h> -#include <gal/widgets/e-font.h> -#include <gal/e-text/e-text.h> -#include <libgnomeui/gnome-canvas.h> -#include <libgnomeui/gnome-canvas-widget.h> - -#include "e-summary-subwindow.h" -#include "e-summary-titlebar.h" - -#define PARENT_TYPE (gnome_canvas_group_get_type ()) -#define TITLEBAR_BORDER_WIDTH 2 - -static void e_summary_subwindow_destroy (GtkObject *object); -static void e_summary_subwindow_class_init (GtkObjectClass *object_class); -static void e_summary_subwindow_init (GtkObject *object); - -static GnomeCanvasGroupClass *parent_class; - -struct _ESummarySubwindowPrivate { - GnomeCanvasItem *titlebar; - GnomeCanvasItem *contents; - - GtkWidget *container; - - char *title; -}; - -enum { - ARG_0, - ARG_X, - ARG_Y, - ARG_WIDTH, - ARG_HEIGHT, - ARG_STATE -}; - -enum { - CLOSE_CLICKED, - SHADE_CLICKED, - EDIT_CLICKED, - LAST_SIGNAL -}; - -static guint32 e_summary_subwindow_signals[LAST_SIGNAL] = { 0 }; - -static void -e_summary_subwindow_destroy (GtkObject *object) -{ - ESummarySubwindow *subwindow = E_SUMMARY_SUBWINDOW (object); - ESummarySubwindowPrivate *priv; - - priv = subwindow->private; - - if (priv == NULL) - return; - - if (priv->container) { - gtk_widget_destroy (priv->container); - priv->container = NULL; - } - - if (priv->title) { - g_free (priv->title); - priv->title = NULL; - } - - g_free (subwindow->private); - subwindow->private = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -e_summary_subwindow_realize (GnomeCanvasItem *item) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item); -} - -static void -e_summary_subwindow_unrealize (GnomeCanvasItem *item) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item); -} - -static void -e_summary_subwindow_class_init (GtkObjectClass *object_class) -{ - GnomeCanvasItemClass *item_class; - - item_class = (GnomeCanvasItemClass *) object_class; - - object_class->destroy = e_summary_subwindow_destroy; - - item_class->realize = e_summary_subwindow_realize; - item_class->unrealize = e_summary_subwindow_unrealize; - - parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -e_summary_subwindow_init (GtkObject *object) -{ - ESummarySubwindow *subwindow = E_SUMMARY_SUBWINDOW (object); - ESummarySubwindowPrivate *priv; - - subwindow->private = g_new0 (ESummarySubwindowPrivate, 1); - priv = subwindow->private; - - priv->title = NULL; -} - -E_MAKE_TYPE (e_summary_subwindow, "ESummarySubwindow", ESummarySubwindow, - e_summary_subwindow_class_init, e_summary_subwindow_init, - PARENT_TYPE); - -static void -container_size_allocate (GtkWidget *widget, - GtkAllocation *allocation, - ESummarySubwindow *subwindow) -{ - ESummarySubwindowPrivate *priv; - - g_return_if_fail (subwindow != NULL); - g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow)); - - priv = subwindow->private; - - gnome_canvas_item_set (priv->titlebar, - "width", (double) allocation->width - 1, - NULL); - -} - -static void -edit_cb (GnomeCanvasItem *item, - ESummarySubwindow *subwindow) -{ - g_print ("EDIT!\n"); -} - -static void -shade_cb (GnomeCanvasItem *item, - ESummarySubwindow *subwindow) -{ - g_print ("SHADE!\n"); -} - -static void -close_cb (GnomeCanvasItem *item, - ESummarySubwindow *subwindow) -{ - g_print ("CLOSE!\n"); - gtk_object_destroy (GTK_OBJECT (subwindow)); -} - -void -e_summary_subwindow_construct (GnomeCanvasItem *item) -{ - GnomeCanvasGroup *group; - ESummarySubwindow *subwindow; - ESummarySubwindowPrivate *priv; - EFont *font; - int titlebar_height; - - g_return_if_fail (item != NULL); - g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (item)); - - subwindow = E_SUMMARY_SUBWINDOW (item); - priv = subwindow->private; - - group = GNOME_CANVAS_GROUP (item); - - font = e_font_from_gdk_font ( ((GtkWidget *) item->canvas)->style->font); - - titlebar_height = 18 + 2 * TITLEBAR_BORDER_WIDTH; /* FIXME: Not hardcoded */ - - priv->titlebar = gnome_canvas_item_new (group, - e_summary_titlebar_get_type (), - "text", "Titlebar", - "width", 100.0, - NULL); - gtk_signal_connect (GTK_OBJECT (priv->titlebar), "edit", - GTK_SIGNAL_FUNC (edit_cb), subwindow); - gtk_signal_connect (GTK_OBJECT (priv->titlebar), "shade", - GTK_SIGNAL_FUNC (shade_cb), subwindow); - gtk_signal_connect (GTK_OBJECT (priv->titlebar), "close", - GTK_SIGNAL_FUNC (close_cb), subwindow); - - priv->container = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (priv->container), GTK_SHADOW_ETCHED_IN); - gtk_widget_show (priv->container); - - priv->contents = gnome_canvas_item_new (group, - gnome_canvas_widget_get_type (), - "x", (double) 0, - "y", (double) titlebar_height + 1, - "widget", priv->container, - NULL); - gtk_signal_connect (GTK_OBJECT (priv->container), "size_allocate", - GTK_SIGNAL_FUNC (container_size_allocate), subwindow); - -} - -GnomeCanvasItem * -e_summary_subwindow_new (GnomeCanvasGroup *parent, - double x, - double y) -{ - GnomeCanvasItem *item; - - item = gnome_canvas_item_new (parent, e_summary_subwindow_get_type (), - "x", x, - "y", y, - NULL); - e_summary_subwindow_construct (item); - - return item; -} - -/* These functions mimic the GtkContainer methods */ - -void -e_summary_subwindow_add (ESummarySubwindow *subwindow, - GtkWidget *widget) -{ - ESummarySubwindowPrivate *priv; - - g_return_if_fail (subwindow != NULL); - g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow)); - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_WIDGET (widget)); - - priv = subwindow->private; - - gtk_container_add (GTK_CONTAINER (priv->container), widget); - -} - -void -e_summary_subwindow_remove (ESummarySubwindow *subwindow, - GtkWidget *widget) -{ - ESummarySubwindowPrivate *priv; - - g_return_if_fail (subwindow != NULL); - g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow)); - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_WIDGET (widget)); - - priv = subwindow->private; - - gtk_container_remove (GTK_CONTAINER (priv->container), widget); -} - -void -e_summary_subwindow_set_title (ESummarySubwindow *subwindow, - const char *title) -{ - ESummarySubwindowPrivate *priv; - - g_return_if_fail (subwindow != NULL); - g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow)); - g_return_if_fail (title != NULL); - - priv = subwindow->private; - if (priv->title) - g_free (priv->title); - - priv->title = g_strdup (title); -} diff --git a/executive-summary/widgets/e-summary-subwindow.h b/executive-summary/widgets/e-summary-subwindow.h deleted file mode 100644 index 27771d296d..0000000000 --- a/executive-summary/widgets/e-summary-subwindow.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-subwindow.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_SUBWINDOW_H__ -#define _E_SUMMARY_SUBWINDIW_H__ - -#include <gtk/gtksignal.h> -#include <libgnomeui/gnome-canvas.h> - -#define E_SUMMARY_SUBWINDOW_TYPE (e_summary_subwindow_get_type ()) -#define E_SUMMARY_SUBWINDOW(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_SUBWINDOW_TYPE, ESummarySubwindow)) -#define E_SUMMARY_SUBWINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_SUBWINDOW_TYPE, ESummarySubwindowClass)) -#define IS_E_SUMMARY_SUBWINDOW(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_SUBWINDOW_TYPE)) -#define IS_E_SUMMARY_SUBWINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_SUBWINDOW_TYPE)) - -typedef struct _ESummarySubwindowPrivate ESummarySubwindowPrivate; -typedef struct _ESummarySubwindow ESummarySubwindow; -typedef struct _ESummarySubwindowClass ESummarySubwindowClass; - -struct _ESummarySubwindow { - GnomeCanvasGroup parent; - - ESummarySubwindowPrivate *private; -}; - -struct _ESummarySubwindowClass { - GnomeCanvasGroupClass parent_class; - - void (*close_clicked) (ESummarySubwindow *window); - void (*shade_clicked) (ESummarySubwindow *window); - void (*edit_clicked) (ESummarySubwindow *window); -}; - -GtkType e_summary_subwindow_get_type (void); - -void e_summary_subwindow_construct (GnomeCanvasItem *subwindow); -GnomeCanvasItem *e_summary_subwindow_new (GnomeCanvasGroup *parent, - double x, - double y); - -void e_summary_subwindow_add (ESummarySubwindow *subwindow, - GtkWidget *widget); -void e_summary_subwindow_remove (ESummarySubwindow *subwindow, - GtkWidget *widget); -void e_summary_subwindow_set_title (ESummarySubwindow *subwindow, - const char *title); - -#endif diff --git a/executive-summary/widgets/e-summary-title-button.c b/executive-summary/widgets/e-summary-title-button.c deleted file mode 100644 index 518ce692c6..0000000000 --- a/executive-summary/widgets/e-summary-title-button.c +++ /dev/null @@ -1,402 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-title-buttons.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <libgnomeui/gnome-canvas-rect-ellipse.h> -#include <gal/util/e-util.h> - -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include "e-summary-title-button.h" - -#define PARENT_TYPE (gnome_canvas_rect_get_type ()) - -enum { - ARG_0, - ARG_PIXBUF, - ARG_X, - ARG_Y -}; - -enum { - CLICKED, - LAST_SIGNAL -}; - -static void e_summary_title_button_destroy (GtkObject *object); -static void e_summary_title_button_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void e_summary_title_button_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void e_summary_title_button_class_init (ESummaryTitleButtonClass *estb_class); -static void e_summary_title_button_init (ESummaryTitleButton *estb); -static double e_summary_title_button_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item); -static void e_summary_title_button_update (GnomeCanvasItem *item, - double affine[6], - ArtSVP *clip_path, - gint flags); -static void e_summary_title_button_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, int y, - int width, int height); -static gint e_summary_title_button_event (GnomeCanvasItem *item, - GdkEvent *event); - -static GnomeCanvasRectClass *parent_class; -static guint estb_signals[LAST_SIGNAL] = { 0 }; - -struct _ESummaryTitleButtonPrivate { - GdkPixbuf *pixbuf; - double x, y; - int width, height; - - int in_button : 1; - int button_down : 1; -}; - -static void -e_summary_title_button_destroy (GtkObject *object) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - - estb = E_SUMMARY_TITLE_BUTTON (object); - priv = estb->private; - - if (priv == NULL) - return; - - gdk_pixbuf_unref (priv->pixbuf); - - g_free (priv); - estb->private = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -e_summary_title_button_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - gboolean update = FALSE; - - estb = E_SUMMARY_TITLE_BUTTON (object); - priv = estb->private; - - switch (arg_id) { - case ARG_PIXBUF: - if (priv->pixbuf) - gdk_pixbuf_unref (priv->pixbuf); - - priv->pixbuf = GTK_VALUE_POINTER (*arg); - gdk_pixbuf_ref (priv->pixbuf); - - priv->width = gdk_pixbuf_get_width (priv->pixbuf); - priv->height = gdk_pixbuf_get_height (priv->pixbuf); - - update = TRUE; - break; - - case ARG_X: - priv->x = GTK_VALUE_DOUBLE (*arg); - break; - - case ARG_Y: - priv->y = GTK_VALUE_DOUBLE (*arg); - break; - - default: - break; - - } - - if (update) - gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (estb)); - -} - -static void -e_summary_title_button_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - - estb = E_SUMMARY_TITLE_BUTTON (object); - priv = estb->private; - - switch (arg_id) { - case ARG_PIXBUF: - GTK_VALUE_POINTER (*arg) = priv->pixbuf; - break; - - case ARG_X: - GTK_VALUE_DOUBLE (*arg) = priv->x; - break; - - case ARG_Y: - GTK_VALUE_DOUBLE (*arg) = priv->y; - break; - - default: - arg->type = GTK_TYPE_INVALID; - break; - - } -} - -static void -e_summary_title_button_init (ESummaryTitleButton *estb) -{ - estb->private = g_new0 (ESummaryTitleButtonPrivate, 1); -} - -static void -e_summary_title_button_class_init (ESummaryTitleButtonClass *estb_class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass *) estb_class; - item_class = (GnomeCanvasItemClass *) estb_class; - - object_class->destroy = e_summary_title_button_destroy; - object_class->set_arg = e_summary_title_button_set_arg; - object_class->get_arg = e_summary_title_button_get_arg; - - item_class->draw = e_summary_title_button_draw; - item_class->point = e_summary_title_button_point; - item_class->update = e_summary_title_button_update; - item_class->event = e_summary_title_button_event; - - gtk_object_add_arg_type ("ESummaryTitleButton::pixbuf", - GTK_TYPE_POINTER, - GTK_ARG_READWRITE, - ARG_PIXBUF); - gtk_object_add_arg_type ("ESummaryTitleButton::x", - GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, - ARG_X); - gtk_object_add_arg_type ("ESummaryTitleButton::y", - GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, - ARG_Y); - estb_signals[CLICKED] = gtk_signal_new ("clicked", GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ESummaryTitleButtonClass, - clicked), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, estb_signals, LAST_SIGNAL); - - parent_class = gtk_type_class (PARENT_TYPE); -} - -E_MAKE_TYPE (e_summary_title_button, "ESummaryTitleButton", - ESummaryTitleButton, e_summary_title_button_class_init, - e_summary_title_button_init, PARENT_TYPE); - -static double -e_summary_title_button_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - double d = 1.0; - - estb = E_SUMMARY_TITLE_BUTTON (item); - priv = estb->private; - - if (x >= priv->x && x <= priv->x + gdk_pixbuf_get_width (priv->pixbuf) - && y >= priv->y && y <= priv->y + gdk_pixbuf_get_height (priv->pixbuf)) { - d = 0.0; - *actual_item = item; - } - - return d; -} - -static void -get_bounds (ESummaryTitleButton *estb, - double *px1, double *py1, - double *px2, double *py2) -{ - GnomeCanvasItem *item; - ESummaryTitleButtonPrivate *priv; - double x1, y1, x2, y2; - int cx1, cy1, cx2, cy2; - - item = GNOME_CANVAS_ITEM (estb); - priv = estb->private; - - x1 = priv->x; - y1 = priv->y; - x2 = x1 + priv->width; - y2 = y1 + priv->height; - - gnome_canvas_item_i2w (item, &x1, &y1); - gnome_canvas_item_i2w (item, &x2, &x2); - gnome_canvas_w2c (item->canvas, x1, y1, &cx1, &cy1); - gnome_canvas_w2c (item->canvas, x2, y2, &cx2, &cy2); - - *px1 = cx1; - *py1 = cy1; - *px2 = cx2; - *py2 = cy2; -} - -static void -e_summary_title_button_update (GnomeCanvasItem *item, - double affine[6], - ArtSVP *clip_path, - gint flags) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - double x1, y1, x2, y2; - - estb = E_SUMMARY_TITLE_BUTTON (item); - priv = estb->private; - - get_bounds (estb, &x1, &y1, &x2, &y2); - gnome_canvas_update_bbox (item, (int) x1, (int) y1, (int) x2, (int) y2); -} - -static void -e_summary_title_button_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, int y, - int width, int height) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - double i2w[6], w2c[6], i2c[6]; - int x1, x2, y1, y2; - ArtPoint i1, i2; - ArtPoint c1, c2; - GdkGC *gc; - - estb = E_SUMMARY_TITLE_BUTTON (item); - priv = estb->private; - - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->draw) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->draw) (item, drawable, x, y, width, height); - - gnome_canvas_item_i2w_affine (item, i2w); - gnome_canvas_w2c_affine (item->canvas, w2c); - art_affine_multiply (i2c, i2w, w2c); - - i1.x = priv->x; - i1.y = priv->y; - i2.x = i1.x + priv->width + 4; - i2.y = i1.y + priv->height + 4; - art_affine_point (&c1, &i1, i2c); - art_affine_point (&c2, &i2, i2c); - x1 = c1.x; - y1 = c1.y; - x2 = c2.x; - y2 = c2.y; - - gc = gdk_gc_new (item->canvas->layout.bin_window); - gdk_draw_rectangle (drawable, gc, - FALSE, x1 - x, - y1 - y, - x2 - x1, - y2 - y1); - gdk_gc_unref (gc); - - gdk_pixbuf_render_to_drawable_alpha (priv->pixbuf, - drawable, - 0, 0, - x1 + 2, y1 + 2, - priv->width, priv->height, - GDK_PIXBUF_ALPHA_BILEVEL, - 127, - GDK_RGB_DITHER_NORMAL, - 0, 0); -} - -static gint -e_summary_title_button_event (GnomeCanvasItem *item, - GdkEvent *event) -{ - ESummaryTitleButton *estb; - ESummaryTitleButtonPrivate *priv; - - estb = E_SUMMARY_TITLE_BUTTON (item); - priv = estb->private; - - switch (event->type) { - case GDK_ENTER_NOTIFY: - priv->in_button = TRUE; - break; - - case GDK_LEAVE_NOTIFY: - priv->in_button = FALSE; - break; - - case GDK_BUTTON_PRESS: - if (priv->in_button) { - priv->button_down = TRUE; - gnome_canvas_item_grab (item, - GDK_LEAVE_NOTIFY_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK, - NULL, event->button.time); - } - break; - - case GDK_BUTTON_RELEASE: - priv->button_down = FALSE; - gnome_canvas_item_ungrab (item, event->button.time); - - if (priv->in_button) { - gtk_signal_emit (GTK_OBJECT (estb), estb_signals[CLICKED]); - } - break; - - default: - return TRUE; - } - - return FALSE; -} diff --git a/executive-summary/widgets/e-summary-title-button.h b/executive-summary/widgets/e-summary-title-button.h deleted file mode 100644 index 59b9e92445..0000000000 --- a/executive-summary/widgets/e-summary-title-button.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-title-button.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_TITLE_BUTTON_H__ -#define _E_SUMMARY_TITLE_BUTTON_H__ - -#include <gtk/gtksignal.h> -#include <libgnomeui/gnome-canvas.h> -#include <libgnomeui/gnome-canvas-rect-ellipse.h> - -#define E_SUMMARY_TITLE_BUTTON_TYPE (e_summary_title_button_get_type ()) -#define E_SUMMARY_TITLE_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TITLE_BUTTON_TYPE, ESummaryTitleButton)) -#define E_SUMMARY_TITLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TITLE_BUTTON_TYPE, ESummaryTitleButtonClass)) -#define IS_E_SUMMARY_TITLE_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TITLE_BUTTON_TYPE)) -#define IS_E_SUMMARY_TITLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TITLE_BUTTON_TYPE)) - -typedef struct _ESummaryTitleButtonPrivate ESummaryTitleButtonPrivate; -typedef struct _ESummaryTitleButton ESummaryTitleButton; -typedef struct _ESummaryTitleButtonClass ESummaryTitleButtonClass; - -struct _ESummaryTitleButton { - GnomeCanvasRect parent; - - ESummaryTitleButtonPrivate *private; -}; - -struct _ESummaryTitleButtonClass { - GnomeCanvasRectClass parent_class; - - void (*clicked) (ESummaryTitleButton *estb); -}; - -GtkType e_summary_title_button_get_type (void); - -#endif diff --git a/executive-summary/widgets/e-summary-titlebar.c b/executive-summary/widgets/e-summary-titlebar.c deleted file mode 100644 index fa76661a78..0000000000 --- a/executive-summary/widgets/e-summary-titlebar.c +++ /dev/null @@ -1,411 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-titlebar.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/util/e-util.h> -#include <gal/widgets/e-font.h> - -#include <gal/e-text/e-text.h> - -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include "e-summary-titlebar.h" -#include "e-summary-title-button.h" - -/* XPMS */ -#include "edit.xpm" -#include "x.xpm" -#include "shade.xpm" - -#define PARENT_TYPE (gnome_canvas_group_get_type ()) -#define TITLEBAR_BORDER_WIDTH 2 - -enum { - ARG_0, - ARG_TEXT, - ARG_WIDTH, - ARG_HEIGHT -}; - -enum { - EDIT, - SHADE, - CLOSE, - LAST_SIGNAL -}; - -static void e_summary_titlebar_destroy (GtkObject *object); -static void e_summary_titlebar_class_init (GtkObjectClass *object_class); -static void e_summary_titlebar_init (GtkObject *object); - -static GnomeCanvasGroupClass *parent_class; -static guint titlebar_signals[LAST_SIGNAL] = { 0 }; - -struct _ESummaryTitlebarPrivate { - GnomeCanvasItem *rect; - GnomeCanvasItem *titletext; - - GnomeCanvasItem *edit; - GnomeCanvasItem *shade; - GnomeCanvasItem *close; - - char *text; - double width, height; -}; - -static void -e_summary_titlebar_destroy (GtkObject *object) -{ - ESummaryTitlebar *titlebar; - ESummaryTitlebarPrivate *priv; - - titlebar = E_SUMMARY_TITLEBAR (object); - priv = titlebar->private; - - if (priv == NULL) - return; - - g_free (priv); - titlebar->private = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -edit_cb (GnomeCanvasItem *item, - ESummaryTitlebar *titlebar) -{ - gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[EDIT]); -} - -static void -shade_cb (GnomeCanvasItem *item, - ESummaryTitlebar *titlebar) -{ - gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[SHADE]); -} - -static void -close_cb (GnomeCanvasItem *item, - ESummaryTitlebar *titlebar) -{ - gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[CLOSE]); -} - -static void -e_summary_titlebar_realize (GnomeCanvasItem *item) -{ - GnomeCanvasGroup *group; - ESummaryTitlebar *titlebar; - ESummaryTitlebarPrivate *priv; - GdkPixbuf *pb; - EFont *font; - int font_height; - - group = GNOME_CANVAS_GROUP (item); - titlebar = E_SUMMARY_TITLEBAR (item); - priv = titlebar->private; - - font = e_font_from_gdk_font (GTK_WIDGET (item->canvas)->style->font); - font_height = e_font_height (font); - priv->height = 18 + 2 * TITLEBAR_BORDER_WIDTH; /* FIXME: Not hardcoded */ - - priv->rect = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type (), - "x1", 0.0, - "y1", 0.0, - "y2", (double) priv->height, - "x2", priv->width, - "fill_color_rgba", 0x88AAFFFF, - NULL); - - pb = gdk_pixbuf_new_from_xpm_data ((const char**) x_xpm); - priv->close = gnome_canvas_item_new (group, - e_summary_title_button_get_type (), - "x", (double) priv->width - TITLEBAR_BORDER_WIDTH - 18, - "y", (double) TITLEBAR_BORDER_WIDTH, - "pixbuf", pb, - NULL); - gdk_pixbuf_unref (pb); - gtk_signal_connect (GTK_OBJECT (priv->close), "clicked", - GTK_SIGNAL_FUNC (close_cb), titlebar); - - pb = gdk_pixbuf_new_from_xpm_data ((const char**) shade_xpm); - priv->shade = gnome_canvas_item_new (group, - e_summary_title_button_get_type (), - "x", (double) priv->width - (TITLEBAR_BORDER_WIDTH * 2) - 36, - "y", (double) TITLEBAR_BORDER_WIDTH, - "pixbuf", pb, - NULL); - gdk_pixbuf_unref (pb); - gtk_signal_connect (GTK_OBJECT (priv->shade), "clicked", - GTK_SIGNAL_FUNC (shade_cb), titlebar); - - pb = gdk_pixbuf_new_from_xpm_data ((const char**) edit_xpm); - priv->edit = gnome_canvas_item_new (group, - e_summary_title_button_get_type (), - "x", (double) priv->width - (TITLEBAR_BORDER_WIDTH * 3) - 54, - "y", (double) TITLEBAR_BORDER_WIDTH, - "pixbuf", pb, - NULL); - gdk_pixbuf_unref (pb); - gtk_signal_connect (GTK_OBJECT (priv->edit), "clicked", - GTK_SIGNAL_FUNC (edit_cb), titlebar); - - priv->titletext = gnome_canvas_item_new (group, - e_text_get_type (), - "text", priv->text, - "font_gdk", GTK_WIDGET (item->canvas)->style->font, - "clip_width", (double) priv->width - - (TITLEBAR_BORDER_WIDTH*4)- 50, - "clip_height", (double) e_font_height (font), - - "clip", TRUE, - "use_ellipsis", TRUE, - "fill_color", "black", - "anchor", GTK_ANCHOR_NW, - "draw_background", FALSE, - NULL); - gnome_canvas_item_move (priv->titletext, TITLEBAR_BORDER_WIDTH, - (priv->height - font_height) / 2); - - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item); -} - -static void -e_summary_titlebar_unrealize (GnomeCanvasItem *item) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item); -} - -static void -e_summary_titlebar_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id) -{ - ESummaryTitlebar *titlebar; - ESummaryTitlebarPrivate *priv; - - titlebar = E_SUMMARY_TITLEBAR (object); - priv = titlebar->private; - - switch (arg_id) { - case ARG_TEXT: - if (priv->text) - g_free (priv->text); - - priv->text = g_strdup (GTK_VALUE_STRING (*arg)); - - if (priv->titletext) - gnome_canvas_item_set (priv->titletext, - "text", priv->text, - NULL); - break; - - case ARG_WIDTH: - priv->width = GTK_VALUE_DOUBLE (*arg); - - if (priv->rect) - gnome_canvas_item_set (priv->rect, - "x2", priv->width, - NULL); - if (priv->titletext) - gnome_canvas_item_set (priv->titletext, - "clip_width", priv->width - - (TITLEBAR_BORDER_WIDTH* 4) - 42, - NULL); - break; - - default: - break; - } -} - -static void -e_summary_titlebar_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id) -{ - ESummaryTitlebar *titlebar; - ESummaryTitlebarPrivate *priv; - - titlebar = E_SUMMARY_TITLEBAR (object); - priv = titlebar->private; - - switch (arg_id) { - case ARG_TEXT: - GTK_VALUE_STRING (*arg) = priv->text; - break; - - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = priv->width; - break; - - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = priv->height; - break; - - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static gint -e_summary_titlebar_event (GnomeCanvasItem *item, - GdkEvent *event) -{ - if (event->type == GDK_2BUTTON_PRESS && - event->button.button == 1) { - gtk_signal_emit (GTK_OBJECT (item), titlebar_signals[SHADE]); - return FALSE; - } else { - return TRUE; - } -} - -static double -e_summary_titlebar_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item) -{ - ESummaryTitlebar *est; - ESummaryTitlebarPrivate *priv; - GnomeCanvasItem *ret_item; - double d; - - est = E_SUMMARY_TITLEBAR (item); - priv = est->private; - - d = (* GNOME_CANVAS_ITEM_CLASS - (GTK_OBJECT (priv->edit)->klass)->point) (priv->edit, - x, y, - cx, cy, - &ret_item); - if (d == 0.0) { - *actual_item = ret_item; - return 0.0; - } - - d = (* GNOME_CANVAS_ITEM_CLASS - (GTK_OBJECT (priv->shade)->klass)->point) (priv->shade, - x, y, - cx, cy, - &ret_item); - if (d == 0.0) { - *actual_item = ret_item; - return 0.0; - } - - d = (* GNOME_CANVAS_ITEM_CLASS - (GTK_OBJECT (priv->close)->klass)->point) (priv->close, - x, y, - cx, cy, - &ret_item); - if (d == 0.0) { - *actual_item = ret_item; - return 0.0; - } - - *actual_item = item; - return 0.0; -} - -static void -e_summary_titlebar_class_init (GtkObjectClass *object_class) -{ - GnomeCanvasItemClass *item_class; - - item_class = (GnomeCanvasItemClass *) object_class; - - object_class->destroy = e_summary_titlebar_destroy; - object_class->set_arg = e_summary_titlebar_set_arg; - object_class->get_arg = e_summary_titlebar_get_arg; - - item_class->realize = e_summary_titlebar_realize; - item_class->unrealize = e_summary_titlebar_unrealize; - item_class->event = e_summary_titlebar_event; - item_class->point = e_summary_titlebar_point; - - gtk_object_add_arg_type ("ESummaryTitlebar::text", - GTK_TYPE_STRING, GTK_ARG_READWRITE, - ARG_TEXT); - gtk_object_add_arg_type ("ESummaryTitlebar::width", - GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, - ARG_WIDTH); - gtk_object_add_arg_type ("ESummaryTitlebar::height", - GTK_TYPE_DOUBLE, GTK_ARG_READABLE, - ARG_HEIGHT); - - titlebar_signals[EDIT] = gtk_signal_new ("edit", GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ESummaryTitlebarClass, - edit), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - titlebar_signals[SHADE] = gtk_signal_new ("shade", GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ESummaryTitlebarClass, - shade), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - titlebar_signals[CLOSE] = gtk_signal_new ("close", GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ESummaryTitlebarClass, - close), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, titlebar_signals, - LAST_SIGNAL); - - parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -e_summary_titlebar_init (GtkObject *object) -{ - ESummaryTitlebar *titlebar; - ESummaryTitlebarPrivate *priv; - - titlebar = E_SUMMARY_TITLEBAR (object); - titlebar->private = g_new0 (ESummaryTitlebarPrivate, 1); - priv = titlebar->private; - - priv->width = 100.0; - priv->text = NULL; - - gdk_rgb_init (); -} - -E_MAKE_TYPE (e_summary_titlebar, "ESummaryTitlebar", ESummaryTitlebar, - e_summary_titlebar_class_init, e_summary_titlebar_init, - PARENT_TYPE); - diff --git a/executive-summary/widgets/e-summary-titlebar.h b/executive-summary/widgets/e-summary-titlebar.h deleted file mode 100644 index b754fd9108..0000000000 --- a/executive-summary/widgets/e-summary-titlebar.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-titlebar.h - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _E_SUMMARY_TITLEBAR_H__ -#define _E_SUMMARY_TITLEBAR_H__ - -#include <gtk/gtksignal.h> -#include <libgnomeui/gnome-canvas.h> - -#define E_SUMMARY_TITLEBAR_TYPE (e_summary_titlebar_get_type ()) -#define E_SUMMARY_TITLEBAR(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TITLEBAR_TYPE, ESummaryTitlebar)) -#define E_SUMMARY_TITLEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TITLEBAR_TYPE, ESummaryTitlebarClass)) -#define IS_E_SUMMARY_TITLEBAR(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TITLEBAR_TYPE)) -#define IS_E_SUMMARY_TITLEBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TITLEBAR_TYPE)) - -typedef struct _ESummaryTitlebarPrivate ESummaryTitlebarPrivate; -typedef struct _ESummaryTitlebar ESummaryTitlebar; -typedef struct _ESummaryTitlebarClass ESummaryTitlebarClass; - -struct _ESummaryTitlebar { - GnomeCanvasGroup parent; - - ESummaryTitlebarPrivate *private; -}; - -struct _ESummaryTitlebarClass { - GnomeCanvasGroupClass parent_class; - - void (*close) (ESummaryTitlebar *window); - void (*shade) (ESummaryTitlebar *window); - void (*edit) (ESummaryTitlebar *window); -}; - -GtkType e_summary_titlebar_get_type (void); - -#endif diff --git a/executive-summary/widgets/edit.xpm b/executive-summary/widgets/edit.xpm deleted file mode 100644 index 7f2deb1525..0000000000 --- a/executive-summary/widgets/edit.xpm +++ /dev/null @@ -1,19 +0,0 @@ -/* XPM */ -static char * edit_xpm[] = { -"14 14 2 1", -" g None", -". g #000000", -" ", -" ", -" ... ", -" . . ", -" . . ", -" . ", -" . ", -" .. ", -" .. ", -" .. ", -" ", -" .. ", -" .. ", -" "}; diff --git a/executive-summary/widgets/esummary-window-test.c b/executive-summary/widgets/esummary-window-test.c deleted file mode 100644 index 7928e8b6f9..0000000000 --- a/executive-summary/widgets/esummary-window-test.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <gal/widgets/e-canvas.h> -#include "e-summary-subwindow.h" -#include "e-summary-titlebar.h" - - -void close_test (GtkWidget *widget, gpointer data); - -void -close_test (GtkWidget *widget, - gpointer data) -{ - gtk_main_quit (); -} - -int -main (int argc, - char **argv) -{ - GtkWidget *window, *canvas; - ESummarySubwindow *subwindow; - GtkWidget *control; - - gnome_init ("Executive Summary Subwindow Test", "1.0", argc, argv); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - GTK_SIGNAL_FUNC (close_test), NULL); - - canvas = e_canvas_new (); - - subwindow = e_summary_subwindow_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas)->root), 100, 100); - - control = gtk_button_new_with_label ("A big button"); - gtk_widget_set_usize (control, 400, 200); - - e_summary_subwindow_add (subwindow, control); - gtk_widget_show (control); - - gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0.0, 0.0, 1000.0, 1300.0); - gtk_container_add (GTK_CONTAINER (window), canvas); - gtk_widget_show_all (window); - - gtk_main (); - - exit(0); -} diff --git a/executive-summary/widgets/shade.xpm b/executive-summary/widgets/shade.xpm deleted file mode 100644 index 349212e906..0000000000 --- a/executive-summary/widgets/shade.xpm +++ /dev/null @@ -1,19 +0,0 @@ -/* XPM */ -static char * shade_xpm[] = { -"14 14 2 1", -" g None", -". g #000000", -" ", -" ............ ", -" ............ ", -" ............ ", -" ............ ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" ............ ", -" "}; diff --git a/executive-summary/widgets/x.xpm b/executive-summary/widgets/x.xpm deleted file mode 100644 index ce9e9f19dc..0000000000 --- a/executive-summary/widgets/x.xpm +++ /dev/null @@ -1,19 +0,0 @@ -/* XPM */ -static char * x_xpm[] = { -"14 14 2 1", -" g None", -". g #000000", -" ", -" .. .. ", -" ... ... ", -" ... ... ", -" ... ... ", -" ...... ", -" .... ", -" .... ", -" ...... ", -" ... ... ", -" ... ... ", -" ... ... ", -" .. .. ", -" "}; diff --git a/my-evolution/.cvsignore b/my-evolution/.cvsignore deleted file mode 100644 index bfafd22e89..0000000000 --- a/my-evolution/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -Mailer-stubs.c -Mailer-skels.c -Mailer-common.c -Mailer.h -evolution-executive-summary -evolution-executive-summary.pure -GNOME_Evolution_Summary.server -GNOME_Evolution_Summary.server.in diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog deleted file mode 100644 index 6f24d9b0d4..0000000000 --- a/my-evolution/ChangeLog +++ /dev/null @@ -1,85 +0,0 @@ -2003-10-09 Jeffrey Stedfast <fejj@ximian.com> - - * Makefile.am: INCLUDE path fixes for changes made to libical - build. - - * e-summary-calendar.h: #include <libical/ical.h> - - * e-summary.h: #include <libical/ical.h> - -2003-09-08 Calvin Liu <calvin.liu@sun.com> - - ** For bug #48175 - * e-summary-tasks.c: set default value for colour if it's empty - -2003-08-26 Rodrigo Moya <rodrigo@ximian.com> - - * e-summary-tasks.c: - * e-summary-calendar.c (uids_to_array): use correct type for arguments - to cal_client_get_object. - -2003-08-19 Harry Lu <harry.lu@sun.com> - - ** For bug #47461. - - * e-summary-calendar.c: (generate_html): Change "%P" to "%p" so that - strftime() can work under solaris. - -2003-08-12 Jack Jia <jack.jia@sun.com> - - [Fixed bug #47563] - - * e-summary-tasks.c (setup_task_folder) : set a default value for - the tasks->due_today_colour and tasks->overdue_colour, if the key - in gconf is NULL. and change the key name from TasksDueTodayi to - due_today, from TasksOverdue to overdue, in order to coincide with - the key in e-summary-tasks.c (setup_task_folder).In this way, it - can avoid crash on solaris. - -2003-08-11 Ettore Perazzoli <ettore@ximian.com> - - Patch from Lorenzo Gil Sanchez <lgs@sicem.biz> - - * Locations: Added Bermuda to the list of countries under the - 'Central and South America' region. [#21879] - -2003-07-23 Dan Winship <danw@ximian.com> - - * e-summary-factory.c (e_summary_factory_new_control): Fix a - warning. - - * e-summary-rdf.c (tree_walk): Fix a warning - - * e-summary-weather.c (e_summary_weather_get_html): Remove an - unused variable. - (weather_make_html): Likewise. - -2003-06-23 Dan Winship <danw@ximian.com> - - * e-summary-calendar.c (setup_gconf_client): Don't call - setup_calendar from here, since e_summary_calendar_init will call - it immediately after setup_gconf_client, which will result in a - calendar being quickly created and destroyed. - -2003-06-19 Ettore Perazzoli <ettore@ximian.com> - - * e-summary.c (do_summary_print): Do not destroy preview_widget - when returning from gtk_dialog_run() since it's unset at that - point. [#44798] - -2003-06-13 Larry Ewing <lewing@ximian.com> - - * e-summary.c (e_summary_url_requested): free the filename. - -2003-06-05 Not Zed <NotZed@Ximian.com> - - ** For #42691. - - * Makefile.am (%.server.in): use implicit rule. - (BUILT_SOURCES): added server_DATA - -2003-06-09 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-mail.c (e_summary_mail_get_info): Protect against - folder_store being NULL. [#44111] - diff --git a/my-evolution/ChangeLog.pre-1-4 b/my-evolution/ChangeLog.pre-1-4 deleted file mode 100644 index d5f831e97f..0000000000 --- a/my-evolution/ChangeLog.pre-1-4 +++ /dev/null @@ -1,2572 +0,0 @@ -2003-05-27 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-tasks.c: New member gconf_value_changed_handler_id in - ESummaryTasks. - (setup_gconf_client): Set it to the ID of the signal connection. - - * e-summary-calendar.c: New member gconf_value_changed_handler_id - in ESummaryCalendar. - (setup_gconf_client): Set it to the ID of the signal connection. - - * e-summary-tasks.c (generate_html): Remove unused variable. - -2003-05-19 Anna Marie Dirks <anna@ximian.com> - - * e-summary-preferences.c: This patch HIG-ifies the "New News Feed" - dialog, by using a table with appropriate spacing instead of hboxes. - Also fixes an invalid cast of gtk_dialog->gnome_dialog. - - * my-evolution.glade: * my-evolution.glade: HIG-ified this - dialog by adding proper spacing/padding/stock buttons/etc. - Fixes bugs #41131, #41133. - -2003-05-16 Ettore Perazzoli <ettore@ximian.com> - - * e-summary.c (destroy): Remove the weak pointer on priv->control. - [#43117] - -2003-05-16 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c (setup_calendar): Fix typo, celendar_path - -> calendar_path. - -2003-05-15 JP Rosevear <jpr@ximian.com> - - Fixes #43101 - - * e-summary-mail.c (e_summary_folder_unregister_storage): unref - the storage after use not before - -2003-05-15 Ettore Perazzoli <ettore@ximian.com> - - * e-summary.c (do_summary_print): Remove preview arg. Also, make - it destroy the dialog after a button has been clicked. - (e_summary_set_control): Add casts to avoid compiler warnings. - -2003-05-14 JP Rosevear <jpr@ximian.com> - - * e-summary.h: fix up protos - - * e-summary.c (e_summary_get_control): accessor - (e_summary_set_control): ditto - (retrieve_shell_view_interface): util to get the shell view - (e_summary_change_current_view): use it - (e_summary_set_message): ditto - (e_summary_unset_message): ditto - - * e-summary-mail.h: add proto - - * e-summary-mail.c (e_summary_mail_get_info): use the objref of - the listener - (e_summary_folder_unregister_storage): clean up a registered - storage - (e_summary_folder_register_storages): store the listener directly - (folder_info_pb_changed): unref the listener once we are notified - (lazy_register_storages): release and unref the property bag, - event and listener - (e_summary_folder_init_folder_store): track the listener - (e_summary_folder_clear_folder_store): cleanup the folder store - - * e-summary-factory.c (control_activate_cb): we don't get the - shell view here any more - (e_summary_factory_new_control): don't pass in the shell, set the - control on the summary - - * component-factory.c (owner_unset_cb): clear the folder store on - destruction - -2003-05-02 Not Zed <NotZed@Ximian.com> - - [#41849] - - * e-summary-rdf.c (tree_walk): check the in-memory charset, not - the transport charset when creating output. - -2003-04-18 Rodney Dawes <dobey@ximian.com> - - [#21499] - - * Makefile.am: - * e-summary-factory.c: - Use PREFIX instead of EVOLUTION_DATADIR for bonobo_ui_util_set_ui () - -2003-04-16 Ettore Perazzoli <ettore@ximian.com> - - [#39693] - - * e-summary-shown.c (SPEC): Sort by the first column. - -2003-04-16 Ettore Perazzoli <ettore@ximian.com> - - [#40902] - - * e-summary-preferences.c: Removed members new_url_entry, - new_name_entry from struct PropertyData. - (rdf_new_url_clicked_cb): Port to - GtkDialog and fix button order. Also, use gtk_dialog_run() - instead of using callbacks. - (add_dialog_clicked_cb): Removed. - -2003-04-12 Rodney Dawes <dobey@ximian.com> - - * e-summary-shown.c: Remove construct_pixmap_button (), use stock - buttons. - -2003-04-09 Larry Ewing <lewing@ximian.com> - - * e-summary.c (e_summary_init): remove call to - gtkhtml_set_default_background_color - -2003-04-08 Not Zed <NotZed@Ximian.com> - - * GNOME_Evolution_Summary.server.in.in: Properly terminate the - "name" attribute tag added in the last change. - -2003-04-07 Dan Winship <danw@ximian.com> - - * Locations: Add Darwin, Australia [#12066]. Fix Vilnius - and Riga [#15740]. Fix spelling of Gardermoen, Norway [#18015]. - Add Goetsenhoven and Spa, Belgium [#32027] - - * GNOME_Evolution_Summary.server.in.in: clean up server names - -2003-03-31 Larry Ewing <lewing@ximian.com> - - * e-summary-factory.c: make the verbs static so they don't enter - the global namespace. - -2003-03-27 Ettore Perazzoli <ettore@ximian.com> - - [#40358] - - * e-summary.c (e_summary_init): Likewise. - - * e-summary-weather.c (e_summary_weather_get_html): Likewise. - (weather_make_html): Likewise. - - * e-summary-mail.c (e_summary_mail_generate_html): Fix so it - handles the fact that the translated strings are already in UTF8. - * e-summary-rdf.c (tree_walk): Likewise. - (display_doc): Likewise. - -2003-03-27 Not Zed <NotZed@Ximian.com> - - ** see bug #40141 - - * e-summary-preferences.c (config_control_destroy_cb): Dont save - prefs here, but restore the last saved. - (config_control_apply_cb): save preferences here. - -2003-03-26 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-mail.c: New member physical_uri in struct - ESummaryMailFolder. - (new_folder_cb): Set it. - (remove_folder_cb): Free it. - (make_pretty_foldername): Rewritten to honour the display_name. - [#7153] - - * e-summary.c (destroy): Only remove the source with ID - tomorrow_timeout_id if the ID is nonzero. - -2003-03-25 Dan Winship <danw@ximian.com> - - * e-summary.c: Update for e_notice move - (do_summary_print): Pass a parent_window to e_notice - -2003-03-19 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c (generate_html): Add a %P in the strftime - string for the case when the user wants am/pm format. [#19957] - -2003-03-13 Mike Kestner <mkestner@ximian.com> - - * e-summary-preferences.c (fill_rdf_etable): pass FALSE for - expand to e_summary_shown_add_node. - * e-summary-shown.c (make_table): ditto, set_expanded_default to FALSE. - (add_node): only call e_tree_node_set_expanded is expanded != default. - * e-summary-weather.c (*_fill_etable): pass FALSE for expand to - e_summary_shown_add_node. - -2003-03-13 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c (generate_html): Changed so its printf()s - are protected against default_uri being NULL. Also, no need to do - e_utf8_from_locale_string() anymore. - -2003-03-12 Dan Winship <danw@ximian.com> - - * e-summary-shown.c (e_summary_shown_freeze, - e_summary_shown_thaw): New, to free/thaw the ETree models. - (e_summary_shown_add_node): Don't freeze/thaw around the single - add here. That doesn't really help much. - - * e-summary-preferences.c (fill_rdf_etable): Freeze/thaw the - ESummaryShown while filling it in. - - * e-summary-weather.c (e_summary_weather_fill_etable): Likewise. - -2003-03-07 Ettore Perazzoli <ettore@ximian.com> - - * Locations (name): Add some escapes to the newly added locations - so they get split properly. - - * e-summary-weather.c (e_summary_weather_init_locations): Fetch - the Locations file from the right path. If you find an invalid - entry in the Locations file, complain with an informative - g_warning() instead of just returning FALSE. - (e_summary_weather_fill_etable): Do the same thing here. - -2003-03-06 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c (generate_html): Added the AM/PM part when - not in "wants24hr" mode; moved the date before the time instead of - vice versa. Also, do not check the boolean value against TRUE! - -2003-03-06 Ettore Perazzoli <ettore@ximian.com> - - * Locations: Added more Swedish locations, submitted by Marten - Woxberg. [See #5344] - -2003-03-06 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c (e_summary_calendar_protocol): Use - G_GNUC_FUNCTION instead of __FUNCTION__. - * e-summary-rdf.c (e_summary_rdf_update): Likewise. - * e-summary-tasks.c (e_summary_tasks_protocol): Likewise. - (e_summary_tasks_protocol): Likewise. - * e-summary-weather.c (e_summary_weather_update): Likewise. - ->>>>>>> 1.264 -2003-03-05 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-weather.c (e_summary_weather_set_online): Likewise, - assume weather_refresh_time of zero means "never update the - weather". - (e_summary_weather_init): Likewise here. - (e_summary_weather_reconfigure): And here. - - * e-summary-rdf.c (e_summary_rdf_init): Don't add the news feeds - here -- it should be handled with a GConf schema. Also, assume - that prefs is always not NULL (as is the case with the current - code), and interpret a timeout value of zero as "never update - automatically". - (e_summary_rdf_reconfigure): Likewise here. If rdf->timeout is - zero, assume there is no pending timeout. - (e_summary_rdf_set_online): Likewise here. Sigh, so much - duplication in this code. - -2003-03-05 Not Zed <NotZed@Ximian.com> - - * component-factory.c (owner_unset_cb): dont call bonobo_main_quit - anymore now we're shlib'ised. - -2003-02-28 Dan Winship <danw@ximian.com> - - * e-summary.c (e_summary_init): Don't need to use libalarm to set - a timeout to change the date. We know how many seconds away it is, - so we can just set a timeout for then. - - * Makefile.am (summary_libs): Remove libalarm.a - -2003-02-21 Dan Winship <danw@ximian.com> - - * Makefile.am (summary_libs): clean up - -2003-02-20 Dan Winship <danw@ximian.com> - - * Makefile.am (summary_libs): - s/libemiscwidgets.a/libemiscwidgets.la/ - -2003-02-19 Dan Winship <danw@ximian.com> - - * e-summary-rdf.c: Declare xmlSubstituteEntitiesDefaultValue - extern. - (message_finished): And set its value here. Fixes a duplicate - symbol error on OS X. - -2003-02-10 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Split the IDL generated rules so ${ORBIT_IDL} - doesn't get invoked multiple times in parallel. - (BUILT_SOURCES): Added this. - (CLEANFILES): And this. - -2003-02-06 Dan Winship <danw@ximian.com> - - * Makefile.am (INCLUDES): Fix typo in previous commit - -2003-02-06 Dan Winship <danw@ximian.com> - - * Makefile.am: clean up, update, etc - - * component-factory.c: #include string.h - - * e-summary.c (e_pixmap_file): s/IMAGEDIR/IMAGESDIR/ - - * e-summary-rdf.c: Fix some warnings - -2003-02-05 Dan Winship <danw@ximian.com> - - * e-summary-offline-handler.c: s/BonoboXObject/BonoboObject/ - -2003-01-23 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am (componentdir): Removed definition; this is now - defined in configure.in. - -2003-01-22 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-factory.c (control_activate): Get my-evolution.xml - from EVOLUTION_UI_DIRECTORY. - - * e-summary.c (e_pixmap_file): Use EVOLUTION_IMAGEDIR. - (e_pixmap_file): Use EVOLUTION_BUTTONSDIR. - - * e-summary-weather.c (e_summary_weather_init_locations): Use - LOCATIONDIR. - (e_summary_weather_fill_etable): Likewise. - - * Makefile.am (Locationdir): Version using $(BASE_VERSION). - (gladedir): Likewise. - (INCLUDES): Define EVOLUTION_IMAGEDIR. - -2003-01-20 Ettore Perazzoli <ettore@ximian.com> - - * Locations: Updated locations for EU_FI, contributed by Pekka - Pietikainen <Pekka.Pietikainen@nixu.com>. - -2003-01-14 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am (EXTRA_DIST): Add $(schema_DATA). - -2003-01-13 Not Zed <NotZed@Ximian.com> - - * e-summary-preferences.c (e_summary_preferences_save): fix a - past-o with the physical_uri_list prepend. - -2003-01-10 Not Zed <NotZed@Ximian.com> - - * e-summary-mail.c (new_folder_cb): glist->gslist for - display_folders list - (mail_change_notify): " - (e_summary_mail_reconfigure): ", and also traverse the list - forwards, since we can't go backwards since its now an slist. - - * e-summary-preferences.c (e_summary_preferences_restore): append - new folder entries to the folders list. - (config_control_apply_cb): display_folders is a list of folders, - not a list of strings, treat accordingly. - -2003-01-09 Chris Toshok <toshok@ximian.com> - - * e-summary-preferences.c (e_summary_preferences_create_control): - change gtk_widget_show to gtk_widget_show_all so all the various - custom widgets are displayed. - -2003-01-08 Ettore Perazzoli <ettore@ximian.com> - - * e-summary.c (e_pixmap_file): Update to use - $(datadir)/evolution/images/ instead of - $(datadir)/images/evolution to fetch the icons. - -2002-12-16 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-shown.c (make_table): Do not ref/sink the ETreeMemory - object. - -2002-12-11 Kevin Breit <mrproper@ximian.com> - - * Locations: Removed Marquette from the listing, it is no longer - listed by METAR. This is per bug 29693. - - * Locations.h: Removed Marquette from the listing, it is no longer - listed by METAR. - -2002-12-06 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c: Change description passed to - BONOBO_ACTIVATION_SHLIB_FACTORY to correctly say we are a factroy. - -2002-12-04 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am (componentdir): Install in $(COMPONENT_DIR), not in - ${prefix}/evolution/components. - -2002-12-04 Ettore Perazzoli <ettore@ximian.com> - - * GNOME_Evolution_Summary.server.in.in: Updated to be a shared - library. - - * main.c: Removed. - - * Makefile.am: Update to compile as a shared library. - - * component-factory.c: Changed to be a shared library factory, for - both the ShellComponent and the ConfigControl objects. - - * e-summary-preferences.c - (e_summary_preferences_init_config_control): Renamed from - e_summary_preferences_register_config_control_factory. - (e_summary_preferences_create_control): Renamed from factory_fn - and removed all args. - -2002-11-27 Not Zed <NotZed@Ximian.com> - - * e-summary-shown.c (e_summary_shown_init): GNOME_STOCK_*NEXT/PREV -> - GTK_STOCK_*GO_BACK/FORWARD. - - * e-summary.[ch]: ran fix.sh over this. - -2002-11-25 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c (component_destroy): Removed. - (create_component): Do not connect. - -2002-11-20 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c (owner_unset_cb): bonobo_main_quit() instead - of gtk_main_quit(). - (component_destroy): Likewise. - -2002-11-20 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c: Removed unused #define - COMPONENT_FACTORY_ID. - (component_factory_init): Removed unused variable. - - * GNOME_Evolution_Summary.server.in.in: Updated to not use a - factory, which is what the code actually expects. - -2002-11-20 Ettore Perazzoli <ettore@ximian.com> - - * e-summary.c (e_summary_init): Use GConf. - - * e-summary-tasks.c: Replaced member config_listener in - ESummaryTasks with a gconf_client. - (setup_gconf_client): Renamed from setup_config_listener(). Set - up the GConf client and invoke gconf_client_add_dir() on the - interesting namespaces. - (gconf_client_value_changed_cb): Renamed from - config_listener_value_changed_cb and changed prototype to match - that of the "value_changed" signal in GConfClient. - (setup_task_folder): Updated to use GConf. - - * e-summary-calendar.c: Replaced member config_listener with a - gconf_listener. - (setup_calendar): Use GConf. - (setup_gconf_client): Renamed from setup_config_listener. Set up - a GConf client and invoke gconf_client_add_dir() on the - interesting namespaces. - (gconf_client_value_changed_cb): Renamed from - config_listener_key_changed_cb() and changed prototype to match - that of the "value_changed" signal in GConfClient. - (locale_uses_24h_time_format): Removed. - (e_summary_calendar_free): g_object_unref() the gconf_client. - - * Makefile.am: Add rules to install the schemas. - - * apps_evolution_summary.schemas: New. - - * e-summary-preferences.c: Did a global GList -> GSList switch. - (e_summary_preferences_restore): Use GConfClient instead of - EConfigListener. - (vector_from_folder_list): Removed since GConf makes this useless. - (folder_list_from_vector): Likewise. - (str_list_from_vector): Likewise. - (vector_from_str_list): Likewise. - (make_initial_weather_list): Likewise. - (make_initial_rdf_list): Likewise. - (make_initial_mail_list): Likewise. - (e_summary_preferences_save): Use GConf. - (e_summary_preferences_init): No need to set up defaults here. - - * e-summary.h: Changed members display_folders, rdf_urls, stations - in ESummaryPrefs to be GSLists instead of GLists; updated all the - functions that use them accordingly. - -2002-11-14 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Added rule to generate - GNOME_Evolution_Summary.server.in from - GNOME_Evolution_Summary.server.in.in, substituting @LIBEXECDIR@. - Also, install evolution-executive-summary in $libexecdir instead - of $bindir. - - * GNOME_Evolution_Summary.server.in.in: Removed the @OAF_SHLIB_*@ - stuff and added @LIBEXECDIR@/ to the executable's name instead. - -2002-11-14 Ettore Perazzoli <ettore@ximian.com> - - * my-evolution.glade: Converted to Glade 2. - -2002-11-14 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-calendar.c: Replaced all gtk_signal_connect() calls - with g_signal_connect() ones. - * e-summary-mail.c: Likewise. - * e-summary-offline-handler.c: Likewise. - * e-summary-preferences.c: Likewise. - * e-summary-shown.c: Likewise. - * e-summary-tasks.c: Likewise. - * e-summary.c: Likewise. - -2002-11-11 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-factory.c (control_destroy_cb): gtk_widget_destroy() - instead of gtk_object_destroy(). - (e_summary_factory_new_control): Likewise. - - * e-summary-calendar.c: Use g_object_ref()/g_object_unref() - instead of gtk_object_ref()/gtk_object_unref(). - * e-summary-preferences.c: Likewise. - * e-summary-shown.c: Likewise. - * e-summary-table.c: Likewise. - * e-summary-tasks.c: Likewise. - * e-summary.c: Likewise. - - * e-summary-preferences.c (e_summary_preferences_make_mail_table): - g_object_set_data() instead of gtk_object_set_data(). - (make_property_dialog): g_object_get_data() instead of - gtk_object_get_data(). - (get_folders_from_view): Likewise. - - * component-factory.c (create_view): Use - evolution_shell_client_corba_objref() instead of - bonobo_object_corba_objref() on the EvolutionShellClient object. - Also, use g_object_get_data() instead of gtk_object_get_data(). - (owner_set_cb): Likewise. - (create_component): Use g_object_set_data() instead of - gtk_object_set_data(). - -2002-11-11 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-rdf.c: Convert to use libxml2. - -2002-11-11 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-offline-handler.c: Convert from GtkObject to GObject. - -2002-11-07 Ettore Perazzoli <ettore@ximian.com> - - * GNOME_Evolution_Summary.server.in.in: Renamed from - GNOME_Evolution_Summary.oaf.in.in. - - * Makefile.am: GNOME_Evolution_Summary.server instead of .oaf. - -2002-11-05 Ettore Perazzoli <ettore@ximian.com> - - * metar.c: #include <string.h>. - - * main.c (main): Use gnome_program_init(). - - * e-summary-tasks.c (e_summary_tasks_protocol): Use - bonobo-activation. - - * e-summary-table.c (set_value_at): Use g_signal_emit() instead of - gtk_signal_emit(). - - * e-summary-shown.c (e_summary_shown_class_init): GObjectified. - (construct_pixmap_button): Use gtk_image_new_from_stock() instead - of gnome_stock_pixmap_new(). - - * e-summary-preferences.c (e_summary_preferences_restore): Use - EConfigListener. - (add_dialog_clicked_cb): Add some missing consts. - (factory_fn): Pass NULL as the domain arg to glade_xml_new(). - (factory_fn): Add id arg. - (e_summary_preferences_register_config_control_factory): - - * e-summary-mail.c (e_summary_folder_init_folder_store): Use - bonobo-activation. - - * e-summary-factory.c (control_activate): Pass NULL ev arg to - bonobo functions that now need it. - (control_deactivate): Likewise. - (control_activate_cb): Likewise. - (e_summary_factory_new_control): Use g_signal_connect() instead of - gtk_signal_connect(). - - * e-summary-calendar.c (e_summary_calendar_protocol): Use - bonobo_activation. - - * e-summary.c: Update gnome-print #includes. Added some missing - #includes. - (e_summary_url_clicked): Pass NULL as the error arg to - gnome_url_show(). - (do_summary_print): Use GnomePrintConfig instead of GnomePrinter - et al. - - * e-cell-tri.h: Removed BEGIN_GNOME_DECLS/END_GNOME_DECLS. - - * e-summary.c: Removed #include <libgnome/gnome-defs.h>. Ported - to e-config-listener.c. - - * e-cell-tri.h: Removed #include <libgnome/gnome-defs.h>. - - * component-factory.c: #include <gtk/gtkmain.h>. - (create_component): Use g_signal_connect. Match prototype with - the one required by bonobo_generic_factory(). - - * Makefile.am: Add @INTLTOOL_SERVER_RULE@. - ($(MAIL_GENERATED)): Update with new ORBit rules. - -2002-10-25 Ettore Perazzoli <ettore@ximian.com> - - * e-cell-tri.c (set_value): Removed debugging message. - - * e-summary-factory.c (control_activate): Removed the call to - e_summary_thaw(). - (control_deactivate): Removed the call to e_summary_freeze(). - - * e-summary-mail.c (folder_gen_html): Removed debugging message. - (insert_path_recur): Likewise. - (add_storage_to_table): Likewise. - (folder_info_pb_changed): Likewise. - (lazy_register_storages): Likewise. - - * e-summary-weather.c: #include "e-summary-preferences.h". - (e_summary_weather_update): Removed debugging message. - - * e-summary-offline-handler.c: #include <gtk/gtksignal.h>. - - * main.c: #include <gconf/gconf.h> and <gal/widgets/e-cursors.h>. - - * e-summary-preferences.c (free_rdf_info): Removed unused - function. - (find_name_for_url): Likewise. - (mail_etable_item_changed_cb): Likewise. - (maybe_add_to_shown): Likewise. - (get_folders_from_view): Removed debugging messages. - - * e-summary-rdf.c (tree_walk): Removed debugging message. - (e_summary_rdf_update): Likewise. - - * e-summary-shown.c (find_entry_from_location): Removed unused - function. - (maybe_move_to_shown): Removed debugging message. - - * e-summary-tasks.c: New members cal_open_reload_timeout_id and - reload_count in ESummaryTasks. - (generate_html): Return if the load_state of the cal_client is not - CAL_CLIENT_LOAD_LOADED. - (cal_open_reload_timeout): New; timeout function for attempting to - reload the calendar if the first attempt failed. - (cal_opened_cb): If the load failed, register - cal_open_reload_timeout to try again after one second. - (setup_task_folder): If there is a pending timeout callback - [cal_open_reload_timeout_id nonzero], remove it. - (e_summary_tasks_init): Call setup_task_folder(). - (e_summary_tasks_free): If there is a pending timeout callback - [cal_open_reload_timeout_id nonzero], remove it. - - * e-summary-calendar.c: New members cal_open_reload_timeout_id and - reload_count in ESummaryCalendar. - (e_cal_comp_util_compare_event_timezones): Renamed to - compare_event_timezones() and made static. - (generate_html): Return if the load_state of the cal_client is not - CAL_CLIENT_LOAD_LOADED. Call e_summary_draw() before returning. - (cal_open_reload_timeout): New; timeout function for attempting to - reload the calendar if the first attempt failed. - (cal_opened_cb): Return if the load_state of the cal_client is not - CAL_CLIENT_LOAD_LOADED. - (e_summary_calendar_reconfigure): Call setup_calendar() so that, - if the default folder has changed, it gets reloaded. - (setup_calendar): If there is a pending timeout callback - [cal_open_reload_timeout_id nonzero], remove it. - (e_summary_calendar_free): Likewise. - - * e-summary.c: New member queue_draw_idle_id in ESummaryPrivate. - Removed member redraw_pending. - (destroy): If queue_draw_idle_id is nonzero, remove the - corresponding glib mainloop source. - (draw_idle_cb): New function to regenerate the HTML in the idle - loop; moved all the code from e_summary_draw() in here. - (e_summary_draw): Set up draw_idle_cb as an idle callback. - (e_summary_init): Initialize queued_draw_idle_id. - (e_summary_reload_timeout): Call e_summary_calendar_reconfigure() - and e_summary_tasks_reconfigure(). Removed debugging message. - (e_summary_set_online): Removed debugging message. - (e_summary_freeze): Removed. - (e_summary_thaw): Removed. - -2002-10-23 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c: Replace Gnotices with Footnotes. - [#31581] - -2002-10-23 Ettore Perazzoli <ettore@ximian.com> - - [#31607 and #31616] - - * e-summary-tasks.c: New member config_listener in ESummaryTasks. - (e_summary_tasks_free): Unref the config_listener. - (config_listener_key_changed_cb): New, callback for the - config_listener. - (setup_task_folder): New helper function to set up access to the - task folder. - (setup_config_listener): New. - (e_summary_tasks_init): Use setup_config_listener() and - setup_task_folder(). - - * e-summary-calendar: New member config_listener in - ESummaryCalendar. - (setup_config_listener): New. - (config_listener_key_changed_cb): New callback for the - config_listener. - (setup_calendar): New. - (e_summary_calendar_init): Use setup_config_listener() and - setup_calendar(). - -2002-10-21 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-weather.c (e_summary_weather_reconfigure): NULL the - ->weathers member before freeing the list items. Otherwise - soup_message_cancel() might invoke the refresh function while we - are freeing things on the list, and crash. [#31639] - -2002-09-26 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-mail.c (e_summary_mail_generate_html): Generate HTML - for the folder even if the unread count is zero. - -2002-09-26 Ettore Perazzoli <ettore@ximian.com> - - [#28903] - - * e-summary-mail.c: Add member physical_uri to ESummaryMailFolder. - Removed member name. Renamed FolderStore.folders to - FolderStore.path_to_folder and added - FolderStore.physical_uri_to_folder. - (new_folder_cb): Set physical_uri member. - (update_folder_cb): Likewise. - (new_folder_cb): Pass physical_uri to - e_summary_mail_idle_get_info(). Also g_strdup() it since that's - what it expects. - (remove_folder_cb): Free physical_uri. - (mail_change_notify): Compare against folder->physical_uri, not - ->path. - (e_summary_mail_reconfigure): Pass folder->physical_uri to - e_summary_mail_get_info, not ->path. - (e_summary_mail_uri_to_name): Removed. - (e_summary_folder_init_folder_store): Initialize path_to_folder - and physical_uri_to_folder. - (new_folder_cb): Add the folder to the physical_uri_to_folder hash - too. - (mail_change_notify): Use physical_uri_to_folder to figure out the - folder from the uri. - (e_summary_mail_reconfigure): Here as well. - -2002-09-26 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (vector_from_folder_list): Remove - debugging message. - -2002-09-26 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (folder_list_from_vector): Do some - sanity checking so we don't crash miserably as in #28481. - -2002-09-26 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c: Take out CNN and DebianPlanet, which do - not seem to work for me. - -2002-09-23 Dan Winship <danw@ximian.com> - - * e-summary-offline-handler.c (impl_goOffline): Pass ev, not &ev - to CORBA_Object_duplicate since ev is already a pointer. - -2002-09-23 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-weather.c (e_summary_weather_get_html): Don't add any - header if there are no weather stations. [#15101] - (make_anchor): Removed unused function. - -2002-09-17 Ettore Perazzoli <ettore@ximian.com> - - * Locations: Add Israel. [Patch by Sam Popper - <shmuelp@bigfoot.com>.] - -2002-09-13 Dan Winship <danw@ximian.com> - - * Makefile.am (IDLS, MAIL_GENERATED): Update for Mailer.idl rename - - * e-summary.c, e-summary-mail.c: Likewise - -2002-09-05 Anna Dirks <anna@ximian.com> - - * GNOME_Evolution_Summary.oaf.in.in : Changed the description of the - summary page of the settings dialog to be less wordy. - -2002-09-04 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c (create_component): Pass NULL as - @unpopulate_folder_context_menu_fn to - evolution_shell_component_new(). - -2002-08-29 Dan Winship <danw@ximian.com> - - * GNOME_Evolution_Summary.oaf.in.in: Oops. Take two. - - * GNOME_Evolution_Summary.oaf.in: Remove this. It's autogenerated. - -2002-08-28 Dan Winship <danw@ximian.com> - - * GNOME_Evolution_Summary.oaf.in: Add an - evolution:shell_component_launch_order and rename - evolution:shell_component_icon. - -2002-08-28 Jeffrey Stedfast <fejj@ximian.com> - - * main.c (main): Use e-util/e-proxy.c's e_proxy_init(). - -2002-08-21 Iain <iain@ximian.com> - - * e-summary-tasks.c (get_todays_uids): Count overdue tasks as tasks - due today. - -2002-08-14 Iain <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Use the default uris for the - links. - (e_summary_calendar_init): Get the default uri from bonobo config - (e_summary_calendar_free): Free default uri. - - * e-summary-tasks.c (generate_html): Use the default uris for the - links. - (e_summary_tasks_init): Get the default uri. - (e_summary_tasks_free): Free default uri. - -2002-08-14 Iain <iain@ximian.com> - - * e-summary-tasks.c (sort_uids): Sort the tasks in the correct order. - -2002-08-14 Iain <iain@ximian.com> - - * e-summary-tasks.c (get_task_colour): Return the stored task colour. - (e_summary_tasks_init): Get the colour for overdue and todays tasks - from the wombat. - (e_summary_tasks_free): Free the stored colours. - -2002-08-12 Iain <iain@ximian.com> - - * e-summary-preferences.c: Removed duff URIs - (set_selected_folders): Comment out the set_release call, as it's - crashing, and I have no idea what it's supposed to do. - -2002-08-07 Dan Winship <danw@ximian.com> - - * e-summary-mail.c (update_folder_cb): Only get folder info if - this is a folder we're displaying. - -2002-08-07 Anna Marie Dirks <anna@ximian.com> - - * e-summary-shown.c (e_summary_shown_init): Added an alignment to - make button position be the same as the other buttons of this type - in evo. - (add_clicked): make this buttons sensitive when there is no proper - selection - (remove_clicked): same thing with the button - - * my-evolution.glade: Capitalized "Weather Settings" properly. - - -2002-07-26 Peter Williams <peterw@ximian.com> - - * e-summary-mail.c (update_folder_cb): Don't use the folder's path - as the physical URI; use CORBA Magic (TM) to figure it out. - -2002-07-29 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (get_task_colour): Get the colour for a task: Red - if overdue, blue if todays task, black otherwise. - (generate_html): Get the task colour, and shuffle the HTML around so - the colour gets preference over the link. - -2002-07-29 Iain Holmes <iain@ximian.com> - - * Locations: Fixed typo according to bug #18963 - - * Locations.h: Updated. - - * e-summary-tasks.c (e_summary_tasks_get_html): Return on NULL. - -2002-07-11 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (set_selected_folders): Actually pass - the evolution URI, not the path, in Folder.evolutionUri (since now - the shell StorageSetView implementation has been fixed to handle - this field properly). - -2002-07-11 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (set_selected_folders): Set the - customIconName part to the empty string. [#27616] - Also, set_release on the sequence to TRUE. - -2002-06-28 Dan Winship <danw@ximian.com> - - * e-summary-mail.c (e_summary_mail_idle_get_info): Add this, to - call e_summary_mail_get_info from an idle handler. - (new_folder_cb, update_folder_cb): Use idle_get_info rather than - making another corba call from inside the corba handler. (Fixes a - three-way deadlock between mail, summary, and exchange.) - -2002-06-26 Iain <iain@ximian.com> - - * e-summary-rdf.c (layer_find_url): If w == NULL return. Fixes crash - if RDF has no link tags. - -2002-06-26 Iain <iain@ximian.com> - - * Locations: Fix a typo and remove Latvia, cos I couldn't find the - correct code for it. - - * Locations.h: Regenerated. - -2002-06-26 Iain <iain@ximian.com> - - * e-summary-weather.c (e_summary_weather_fill_etable): Count the - states from 0 up. - - * e-summary-shown.c (e_summary_shown_append): Use -1 instead of the - children count. - -2002-06-26 Iain <iain@ximian.com> - - * component-factory.c (owner_set_cb): Pass the shell. - - * e-summary-mail.c (new_folder_cb): Use the ESummaryPrefsFolder stuff. - Remove some debugging spew. - - * e-summary-preferences.c (make_initial_mail_list): Make a mail list - using the ESummaryPrefsFolder stuff. - (folder_list_from_vector): Given a vector make ESummaryPrefsFolders. - (vector_from_folder_list): Given ESummaryPrefsFolders, make a vector. - (e_summary_preferences_restore): Use a new ident. - (free_folder_list): Free a list of ESummaryPrefsFolders. - (copy_folder_list): Copy a list of ESummaryPrefsFolders. - (fill_rdf_etable): Store the RDFInfo struct in the model. - (fill_mail_etable): Remove. - (add_dialog_clicked_cb): Cast some stuff and add a new entry. - (rdf_delete_url_cb): Delete the selected urls. - (rdf_etable_selection_cb): Change the Delete button depending on what - rdfs are selected. - (storage_set_changed): Pass the changed signal to the control. - (make_property_data): Use the StorageSetView and hook up the new - button. - (set_selected_folders): Set the checkboxes inthe StorageSetView. - (e_summary_preferences_make_mail_table): Get the StorageSetView - widget and hook it up. - (get_folders_from_view): Get the list of checked folders and make - ESummaryPrefsFolders for them. - - * e-summary-shown.c: Add a selection_changed signal. - (real_selected_count): Add the path to the selected list. - (make_list): Make a list from the selection. - (e_summary_shown_get_selection): Get the selection as a list. - - * my-evolution.glade: Add a Delete New Feed button. - -2002-06-21 Iain Holmes <iain@ximian.com> - - * main.c (main): Init GConf, and set the proxy. - (set_proxy): Get all the proxy stuff and set Soup to use it. - (proxy_setting_changed): Listen to GConf stuff being changed. - (init_soup_proxy): Set up GConf to listen to changes in gnome-vfs - -2002-06-05 Christopher James Lahey <clahey@ximian.com> - - * e-summary-shown.c (maybe_move_to_shown, add_clicked, - remove_from_shown, remove_clicked): Avoid reentrancy during - e_tree_selection_model_foreach. Fixes Ximian bug #24987. - -2002-05-23 JP Rosevear <jpr@ximian.com> - - * GNOME_Evolution_Summary.oaf.in.in: correct typo - -2002-05-20 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (add_dialog_clicked_cb): Add a new summary - to the All table. - (make_property_dialog): Hook up the new button. - - * e-summary-shown.c (e_summary_shown_init): Add some spacing. - -2002-05-20 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-table.c: Don't show the headers in the folder table. - - * e-summary-shown.c (e_summary_shown_init): Set the spacing to 3. - -2002-05-15 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c (create_component): Pass NULL as - @request_quit_fn. - -2002-05-14 Christopher James Lahey <clahey@ximian.com> - - * e-summary-mail.c (folder_gen_html): Use the uri stored in the - ESummaryMailFolder object here. - (e_summary_mail_generate_html): Only show email folders if they - have > 0 unread messages. - (new_folder_cb): Save the evolutionUri here. - -2002-04-08 Iain Holmes <iain@ximian.com> - - * e-summary-shown.c (construct_pixmap_butto): Create a button with a - label and a pixmap. - (e_summary_shown_init): Use the pixmap buttons. - -2002-04-08 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (mail_change_notify): Don't use an ESummary object, - get the prefs from the global preferences. - (e_summary_mail_init): Don't connect to the listener. - (e_summary_mail_free): Don't disconnect the listener. - (folder_info_pb_changed): Register the storages. - (lazy_register_storages): Get the property bag, and check if the - folder-info is ready. If so register the storages, otherwise get the - propertybag listener and listen for changes. - (e_summary_folder_inif_folder_store): Listen to changes in the stores - and register the storages only when the folder info is ready for it. - -2002-04-22 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c: Remove the shown and mode bits from the - ESummaryMail structure. - (e_summary_mail_generate_html): USe the folder_store list instead - of the blank one in mail-> - (new_folder_cb): Allow all mail folders now. - (update_folder_cb): Get the uri correctly. - (mail_change_notify): Remove debugging spew. - (e_summary_mail_reconfigure): Comment out the part that adds a - protocol to the front of a uri. - (insert_path_recur): If there is no toplevel, guess if from the - folder path. Not sure if it works for everything. - (add_storage_to_table): Store the whole of the sorted list, - and resort it every time. - (make_toplevel): I18n the titles, and remove the debugging. - (e_summary_mail_fill_list): Store the sortewd list. - - * e-summary_preferences.c (fill_rdf_etable): Create a new entry - to add to the shown list. - - * e-summary-shown.c (make_table): take a title for the table. - Generate the spec from that table. - (e_tree_model_node_append): Freeze the tree before adding the - node. - (e_summary_shown_add_node): Take an expanded boolean. - - * e-summary-table.c: Make the SPEC set the width correctly. - (e_summary_table_add_node): Freeze the table. - - * e-summary-weather.c (is_weather_shown): Search the global_prefs - to see if the node is shown. - (e_summary_weather_fill_etable): Set the expanded state on all to - FALSE except for leaf nodes.. - Create a new entry for shown rows. - -2002-04-08 Dan Winship <danw@ximian.com> - - * component-factory.c (create_view): Add view_info arg but don't - do anything with it. - -2002-04-06 JP Rosevear <jpr@ximian.com> - - * GNOME_Evolution_Summary.oaf.in.in: add config_item:priority - -2002-04-05 JP Rosevear <jpr@ximian.com> - - * Makefile.am: dist the relevant xpms - -2002-04-04 JP Rosevear <jpr@ximian.com> - - * Makefile.am: fix substitution typo - -2002-03-30 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Added support for the ENABLE_SHLIB_COMPONENTS - conditional. - - * GNOME_Evolution_Summary.oaf.in.in: New. - - * e-summary-mail.c (update_folder_cb): Protect against - summary->mail being NULL. - - * component-factory.c: Add a shlib factory. - (create_component): Get a @factory and @data. - (component_factory_init): Actually make it use a - BonoboGenericFactory again. - -2002-03-29 Ettore Perazzoli <ettore@ximian.com> - - * GNOME_Evolution_Summary.oaf.in: Add priority. - -2002-03-19 Dan Winship <danw@ximian.com> - - * Makefile.am (evolution_executive_summary_LDADD): - s/libversit.la/libversit.a/ - -2002-03-19 Iain Holmes <iain@ximian.com> - - * component-factory.c: Create a global_preferences structure. - (create_view): Pass in the global_preferences to the view. - (create_component): Initialise the preferences. - - * e-summary-factory.[ch] (e_summary_factory_new_control): Take a prefs - structure and pass it to the view creation. - - * e-summary-mail: Remove some debug spew. - - * e-summary-preferences.[ch]: Create a global_preferences structure. - (e_summary_preferences_init): just return the prefs instead of adding - a pointer to it. - (config_control_destroy_cb): Remove the old_prefs stuff. - (factory_fn): Ditto. - - * e-summary.[ch] (e_summary_init): Don't initialise the preferences - here. - (e_summary_new): Take a preferences structure and keep a pointer to - it. - -2002-03-15 Iain Holmes <iain@ximian.com> - - * Makefile.am: Add the e-summary-shown.[ch] files. - - * e-summary-mail.c: Add entries for the Storages in the private - struct. - (new_folder_cb): Only allow mail folders that are local or vfolders. - Store the StorageInfo that the folder belongs to in the folder struct - Add the folder to the list of folders in the storage. - (update_folder_cb): Update the signature. - (mail_change_notify): Simplify the check to see if we are displaying - the folder. - (e_summary_mail_register_storage): Take a name argument. - Create a StorageInfo structure, connect the signals and add the - listener. - (e_summary_mail_register_local_storage): Get the local storage from - the shell and register it with e_summary_mail_register_storage. - (storage_notify): Receive notifications when a new storage is created - or destroyed or changed. Stuff only happens when a storage is - created, currently. - (e_summary_mail_register_storages): Don't register local storage - here. Get the StorageRegistry from the corba_shell, create a new - BonoboListener and add it to the registry. - (e_summary_mail_init): Free a CORBA_Environment. - (e_summary_mail_reconfigure): Add a check for the uri being a - vfolder. - (str_compare): Compare ESummaryMailFolders instead of MailRowDatas. - (sort_storages): Compare 2 storage names. - (get_parent_path): Special case for the vfolders. - (insert_path_recur): Remove the toplevel creation. - Create a toplevel node if the uri is a storage toplevel. - Special case the name finder for vfolders. - Get the number of children in the parent so that we can add the new - child after the rest. - (add_storage_to_table): For each folder in a storage, add it to the - table. - (make_toplevel): Generate the toplevel name for each storage. - (e_summary_mail_fill_list): For each storage, add the folders. - - * e-summary-preferences.c (fill_rdf_etable): Put the entries into an - ESummaryShown instead of an ESummaryTable. - (make_property_dialog): Hook up to the Showns. - (add_shown_to_list): Add the locations to the list. - (property_box_clicked_cb): Create a new list for the RDFs and - weathers. - (e_summary_preferences_make_rdf_table): Make an ESummaryShown. - (e_summary_preferences_make_weather_table): Make an ESummaryShown. - - * e-summary-table.c: Use ECellTri. - (value_at): Get the right value for the TriCell. - (set_value_at): Set the right value for the TriCell. - (e_summary_table_init): Use the ECellTri. - (e_summary_table_get_num_children): Get the number of children a - path has. - - * e-summary-weather.c (e_summary_weather_fill_etable): Use an - ESummaryShown instead of ESummaryTable. - - * e-summary.[ch]: Store the GNOME_Evolution_Shell in the nonprivate - structure. - - * e-summary-shown.[ch]: Widget to do Add-> <-Remove with two tables. - -2002-02-22 Iain Holmes <iain@ximian.com> - - * e-summary-factory.c: Use the new configure icon. - -2002-02-13 Iain Holmes <iain@ximian.com> - - * Makefile.am: Add the e-cell-tri.[ch] files - - * e-summary-table.c - -2002-03-14 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-factory.c (e_summary_factory_new_control): Call - `e_summary_preferences_register_config_control_factory()'. - - * e-summary-preferences.c: Remove member `box' from struct - PropertyData. Added member `config_control'. - (e_summary_configure): Removed. - (property_box_destroy_cb): Removed. - (property_box_clicked_cb): Removed. - (property_box_apply_cb): New. - (config_control_destroy_cb): New. - (factory_fn): New, factory function for the - EvolutionConfigControl. - (e_summary_preferences_register_config_control_factory): New. - (mail_show_full_path_toggled_cb): Invoke ::changed on - pd->config_control. - (add_dialog_clicked_cb): Likewise. - (rdf_refresh_value_changed_cb): Likewise. - (rdf_limit_value_changed_cb): Likewise. - (mail_etable_item_changed_cb): Likewise. - (rdf_etable_item_changed_cb): Likewise. - (weather_etable_item_changed_cb): Likewise. - (weather_refresh_value_changed_cb): Likewise. - (weather_metric_toggled_cb): Likewise. - (weather_imperial_toggled_cb): Likewise. - (calendar_one_toggled_cb): Likewise. - (calendar_five_toggled_cb): Likewise. - (calendar_week_toggled_cb): Likewise. - (calendar_month_toggled_cb): Likewise. - (calendar_all_toggled_cb): Likewise. - (calendar_today_toggled_cb): Likewise. - (config_control_destroy_cb): Don't set ->prefs_window to NULL. - - * my-evolution.glade: Renamed "notebook2" to "notebook". Also - change its parent into a GtkWindow as libglade seems to have some - kind of problem with the GnomePropertyBox [glade_xml_get_widget() - for "notebook" always returned NULL]. - - * e-summary.h: Remove member `prefs_window' from `ESummary'. - -2002-02-14 Radek Doulik <rodo@ximian.com> - - * e-summary-tasks.c (sort_uids): fix case when priority is - undefined and pri_a or pri_b is returned as NULL, also fixes - memory leak - -2002-02-08 Damon Chaplin <damon@ximian.com> - - * e-summary-calendar.c (e_cal_comp_util_compare_event_timezones): - updated to new version from calendar/gui/comp-util.c - -2002-02-04 Iain Holmes <iain@ximian.com> - - * Makefile.am: Add the e-summary-table.[ch] files. - - * e-summary-mail.c: Move the headers. - (e_summary_mail_get_html): Regenerate the HTML. - (update_folder_cb): Make the file:// part static as it's the same - every time. - (mail_change_notify): Don't recalculate the HTML here. - (e_summary_mail_reconfigure): Don't add file:// if it's already there. - (get_parent_path): Given a path, return it's parent. - (is_folder_shown): Check all the shown folders to see if the given one - is shown. - (insert_path_recur): Recursively add a path to the tree. - (free_path_hash): Free the key of the hash table. - (e_summary_mail_fill_list): Add all the folders to the tree. - - * e-summary-preferences.c: Move the headers - (rdf_is_shown): Check if an RDF is shown. - (fill_rdf_etable): Fill the etable with all the RDFs - (fill_weather_etable): Fill the weather etable. - (fill_mail_etable): Ditto (with mail) - (make_property_dialog): Use the etables. - (free_property_dialog): Free the new lists. - (maybe_add_to_shown): Check if the item is clicked and if so add it to - the list. - (property_box_clicked_cb): Set all the new properties - (e_summary_preferences_make_*_table): Make the etables - - * e-summary-rdf.c (e_summary_rdf_update): Don't cancel the message, - just keep using the previous one. - - * e-summary-weather.c (message_finished): Better error message. - (e_summary_weather_update): Just continue if a message is already - going. - (is_weather_shown): Find out if a station is shown. - (e_summary_weather_fill_etable): Fill the etable. - - * main.c (main): Init the cursors. - - * my-evolution.glade: Add the custom widgets. - -2002-02-02 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-offline-handler.c (create_connection_list): Allocate - the ConnectionList list with the right number of entries instead - of zero. - -2002-02-01 Ettore Perazzoli <ettore@ximian.com> - - [Fix a crash that can happen if you have opened multiple views of - the summary and try to go off-line. This is not the correct fix, - as the code should really be changed to only use one set of - connections for all the views, instead of binding the connections - to the view.] - - * e-summary-factory.c (e_summary_factory_new_control): Call - `e_summary_offline_handler_add_summary()' instead of - e_summary_offline_handler_set_summary()'. - - * e-summary-offline-handler.c: Replace member `summary' with - `summaries' in the ESummaryOfflineHandlerPriv. This way, instead - of assuming that there is only one summary, we keep a list of the - summaries. - (impl_destroy): Free ->summaries. - (e_summary_offline_handler_set_summary): Removed. - (e_summary_offline_handler_add_summary): New. Add the summary to - ->summaries. Also, connect to the ::destroy handler so we can - bookkeep them correctly. - (create_connection_list): Made private from - e_summary_offline_handler_create_connection_list(). Get a GSList - instead of just one summary, and sum up all the connections from - it. - (impl_prepareForOffline): Use it. - (impl__get_isOffline): Return %FALSE if any of the summaries are - online, %TRUE otherwise. - (impl_goOffline): Call ::set_online on all the summaries. Pass - CORBA_OBJECT_NIL for the progress_listener as it doesn't really - get used anyways. - (impl_goOnline): Likewise. Pass CORBA_OBJECT_NIL, not NULL, for - the progress CORBA_Object pointer. - -2002-01-24 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Use EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS and - EVOLUTION_EXECUTIVE_SUMMARY_LIBS. - -2002-01-24 Iain Holmes <iain@ximian.com> - - * Locations: Applied the Ukraine patch from Leonid Kanter - - * Locations.h: Re-generated to get the UK stations added. - -2002-01-22 Iain Holmes <iain@ximian.com> - - * e-summary-mail (e_summary_mail_reconfigure): Do the list backwards. - - * e-summary-preferences.c (fill_mail_shown_clist): Prepend items. - (mail_add_clicked_cb): Prepend items. - -2002-01-04 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (message_finished): Made the Weather message - more verbose, and say which station data could not be retrieved for. - -2002-01-03 Iain Holmes <iain@ximian.com> - - * Makefile.am: Use SOUP_CFLAGS and SOUP_LIBS - - * e-summary-rdf.c: Include soup.h - (close_callback): Remove. - (message_finished): Generate the cache and other stuff and redraw. - (read_callback): Remove. - (open_callback): Remove. - (e_summary_rdf_update): Replace gnome-vfs with Soup stuff. - (e_summary_rdf_count): Replace gnome-vfs with soup. - (rdf_free): ditto - (e_summary_rdf_set_online): Ditto - - * e-summary-weather.c: Include soup.h - (close_callback): Remove. - (message_finished): Parse all the downloaded html. - (read_callback): Remove. - (open_callback): Remove. - (e_summary_weather_update): Use soup instead of gnome-vfs - (weather_free): Ditto. - (e_summary_weather_count): Ditto. - (e_summary_weather_add): ditto; - (e_summary_weather_set_online): Ditto. - - * e-summary.c (close_callback): Remove. - (read_callback): Remove. - (open_callback): Remove. - (e_read_file_with_length): Read a file. - (e_summary_url_requested): Create the images cache. Load the image - with e_read_file_with_length instead of gnome-vfs. - - * main.c (main): Remove gnome_vfs_init. - - * weather.h: Replace gnome-vfs stuff. - -2002-01-03 Iain Holmes <iain@ximian.com> - - * e-summary-offline-handler.c (impl_prepareForOffline): Create an - empty list if the summary == NULL. Fixes bug 18025 - -2001-12-20 Ettore Perazzoli <ettore@ximian.com> - - [Fixes #17377, Evolution doesn't work on multi-depth displays.] - - * main.c (main): Push GdkRGB visual and colormap. - -2001-12-19 JP Rosevear <jpr@ximian.com> - - * e-summary-tasks.c (e_summary_tasks_init): use - cal_client_open_default_tasks - - * e-summary-calendar.c (e_summary_calendar_init): use - cal_client_open_default_calendar - -2001-12-14 Iain Holmes <iain@ximian.com> - - * Location-translation-script: shell script to convert Locations to - Locations.h - - * Locations.h: Translatable file for the weather stations. - - * Makefile.am: Add these files to the dist. - -2001-12-14 Iain Holmes <iain@ximian.com> - - * metar.c: Remove the degree symbol. - -2001-12-14 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_init): Create a translatable string for the - default HTML, that says "Please wait..." - -2001-12-14 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_freeze): Check that priv != NULL - (e_summary_thaw): Check that priv != NULL - (e_summary_count_connections): Check that summary is a Summary. - (e_summary_add_connections): Check that the summary is a Summary. - (e_summary_set_online): Check that the summary is a Summary. - - * e-summary-offline-handler.c (impl__get_isOffline): Only check - summary if it's not NULL. - (impl_prepareForOffline): Ditto. - (impl_goOnline): Only go online if summary isn't NULL. - -2001-12-13 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Check that text.value isn't - NULL. - -2001-12-10 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (e_summary_rdf_init): Set the initial sites to - Linux Today and Salon. - - * e-summary-preferences.c (make_initial_rdf_list): Ditto - -2001-12-10 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Apply damon's change. - -2001-12-06 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (rdfs): Remove the perl.com one. - -2001-11-14 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Spell celsius right. - -2001-11-13 Damon Chaplin <damon@ximian.com> - - * e-summary.c (e_summary_init): make the timezone default to UTC. - -2001-11-08 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c: Removed `morons.org'. - -2001-11-06 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (make_initial_weather_list): Don't free the - vector. Doh! - -2001-10-31 Iain Holmes <iain@ximian.com> - - * Locations: Removed Frobisher. - -2001-10-31 Iain Holmes <iain@ximian.com> - - * Locations: Fixed a spelling mistake. - -2001-10-31 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (make_initial_rdf_list): Put this back. - (make_initial_weather_list): This too plus fixed a memory leak. - (vector_from_str_list): Allow a NULL list. Return "" instead of NULL. - (e_summary_preferences_restore): Allow the display_folders, rdf_urls, - and stations to be NULL. - - * e-summary-weather.c (e_summary_weather_init): Revert the last changes - - * e-summary-rdf.c (e_summary_rdf_init): Same. - -2001-10-30 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (find_name_from_url): Check a for NULL values - -2001-10-29 Damon Chaplin <damon@ximian.com> - - * Makefile.am (evolution_executive_summary_LDADD): use - libical-evolution.la - -2001-10-29 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (make_initial_rdf_list): Set list to NULL. - (make_initial_weather_list): Set list to NULL. - - * e-summary-weather.c (e_summary_weather_init): Check if the prefs are - NULL or if the weather stations are NULL. - - * e-summary-rdf.c (e_summary_rdf_init): Check if the prefs or the list - of news feeds is NULL. - -2001-10-29 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (fill_rdf_all_clist): Open the new location. - If it doesn't exist try the old location. - (save_known_rdfs): Save to the new location. - -2001-10-29 Rodrigo Moya <rodrigo@ximian.com> - - * e-summary-calendar.c (e_summary_calendar_init): retrieve the - default URI for calendars from the configuration instead of - hard-coding it - - * e-summary-tasks.c (e_summary_tasks_init): likewise for tasks - -2001-10-29 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (make_initial_weather_list): We only - want KBOS by default. - - * e-summary-weather.c (e_summary_weather_init): We only want KBOS - by default. - -2001-10-27 Jon Trowbridge <trow@ximian.com> - - * e-summary.c (e_summary_reload): Slow down reload requests - to work around a bug in gnome-vfs. Ugly, but it works. - (Bug #12956) - -2001-10-26 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (open_callback): NULL the handle after a failed - open so the offline handler won't think they're still open. - (e_summary_rdf_set_online): Cancel all the open connections when the - summary goes offline. - - * e-summary-weather.c (open_callback): NULL the handle after a failed - open so the offline handler won't think they're still open. - (e_summary_weather_set_online): Cancel all the open connections when the - summary goes offline. - - * e-summary.c (e_summary_set_online): Call the callback if it's not - NULL. - -2001-10-25 Jon Trowbridge <trow@ximian.com> - - * e-summary-tasks.c (sort_uids): It is possible for - start_foo.value to be NULL after a call to - cal_component_get_dtstart, so we need to check for this before - dereferencing it. (Bug #13259) - -2001-10-24 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (e_summary_mail_init): Don't free the mail part. - Allows the summary to still function without the mail part. - -2001-10-22 Anna Marie Dirks <anna@ximian.com> - - * my-evolution.glade: Changed "Add new feed" to "Add news feed". - -2001-10-22 Damon Chaplin <damon@ximian.com> - - * e-summary-tasks.c (generate_html): set the default timezone on the - server. - - * e-summary-calendar.c (e_cal_comp_util_compare_event_timezones): - update to check for DATE values. - (uids_to_array): pass the default timezone - to cal_recur_generate_instances. - (generate_html): set the default timezone on the server. - -2001-10-22 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-preferences.c (e_summary_configure): Remove the - help_button in the property box. - -2001-10-19 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (e_summary_mail_init): set the summary->mail to - NULL after freeing it. - (mail_change_notify): Return if mail == NULL. - - -2001-10-18 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_reload): Only reload the views, don't do an - entire reconfigure. - - * e-summary-rdf.c (e_summary_rdf_update): Free stuff and update. - - * e-summary-weather.c (e_summary_weather_update): Ditto - -2001-10-16 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_new): Don't call a draw. - - * e-summary-mail.c (e_summary_mail_init): Make sure html is NULL. - -2001-10-14 Zbigniew Chyla <cyba@gnome.pl> - - * e-summary-calendar.c (generate_html): Made temporary buffer for - strftime much bigger (it was too small for Polish month names), added - missing colon and conversion to UTF-8. - -2001-10-12 Iain Holmes <iain@ximian.com> - - * component-factory.c (component_factory_init): Fix message. - - * metar.c: Fix some names. - Made the weather descriptions easier on the eyes. - -2001-10-11 Dan Winship <danw@ximian.com> - - * e-summary-mail.c (update_folder_cb): Update the signature to - match the new signal. - -2001-10-10 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (e_summary_weather_update): Return a value. - Only repoll if the summary is online. - - * e-summary-rdf.c (e_summary_rdf_update): Only poll if online - -2001-10-10 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Set the minimum length of time for updates to - 5 minutes. - -2001-10-06 Carlos Perelló Marín <carlos@gnome-db.org> - - * e-summary-preferences.c: Added HispaLinux - -2001-10-05 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (e_summary_rdf_reconfigure): Set the RDF list to - NULL before destroying it to fix a race condition. - -2001-10-04 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Capitalise stuff - -2001-10-03 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (e_summary_weather_init): Swap Xiamen for Tokyo - -2001-10-01 Damon Chaplin <damon@ximian.com> - - * e-summary-calendar.c (generate_html): used time_add_day/week/month - _with_zone() functions rather than the old versions. - - * e-summary.c (alarm_fn): use time_day_end_with_zone (). - - * e-summary-tasks.c (generate_html): removed day_begin and day_end - since they aren't used, and the calls to time_day_begin/end(). - -2001-10-02 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (uids_to_array): Handle recurrances correctly. - (add_recurrances): Function to generate occurrances - -2001-10-02 Rodrigo Moya <rodrigo@ximian.com> - - * Makefile.am: add $(BONOBO_GNOME_CFLAGS) to make it compile with - latest Bonobo, which does not install headers in - $(gnome_prefix)/include - -2001-10-01 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c: Applied patch from Takuo Kitame for using charset - from the rdf. - -2001-09-27 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (generate_html): Pass the summary to - get_todays_uids. - (get_todays_uids): Use the timezone stuff and use the due date instead - of the end time. - -2001-09-27 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: (rdfs[]): Removed the broken RDFs - (mail_all_select_row_cb): Don't turn on the -> button if the folder is - already added. - (rdf_all_select_row_cb): Ditto - (weather_all_select_row_cb): Ditto - -2001-09-26 Iain Holmes <iain@ximian.com> - - * *.[ch]: Add correct approved copyright notices. - -2001-09-25 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_draw): Check if the summary is frozen, if so - just set redraw_pending. - (e_summary_freeze): Freeze the summary. - (e_summary_thaw): Thaw the summary and redraw if needed. - - * e-summary-factory.c (control_activate): Thaw summary. - (control_deactivate): Freeze summary. - -2001-09-25 Iain Holmes <iain@ximian.com> - - * Misc warnings cleanups. - - * e-summary.c (e_summary_url_requested): Check in the cache for the - image before spawning a new thread to download it. - (close_callback): Create a cache first time, add images to it. - - * e-summary-tasks.c (generate_html): Use task.png - -2001-09-21 Dan Winship <danw@ximian.com> - - * e-summary-weather.c (weather_make_html): Add missing - width/height tags to the sunny/cloudy/etc images to make the page - render more smoothly. - -2001-09-21 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): If the appointment is in a - different timezone set a timezone icon. - -2001-09-20 Iain Holmes <iain@ximian.com> - - * e-summary-preferences: Add Red Carpet RDF - -2001-09-19 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): If the appointment has an alarm - display a bell icon. - -2001-09-19 Iain Holmes <iain@ximian.com> - - * component-factory.c (create_view): Remove spew. - - * e-summary-mail.c (e_summary_mail_reconfigure): Get mail info if we - don't already have it. - (new_folder_cb): Only get mail info if the folder is being displayed. - -2001-09-19 Larry Ewing <lewing@ximian.com> - - * e-summary-tasks.c (generate_html): be sure to unref the - component. - -2001-09-19 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (e_summary_tasks_protocol): Open a task editor. - (generate_html): Embed the uid of the task in the url. - - * e-summary-calendar.c (e_summary_calendar_protocol): Open a calendar - editor. - (generate_html): Embed the uid of the task in the url. - -2001-09-19 Larry Ewing <lewing@ximian.com> - - * e-summary-rdf.c (read_callback): remove redundant if. - (open_callback): free the previous html even if we get an error. - (rdf_free): remove redundant null checks. - -2001-09-19 Dan Winship <danw@ximian.com> - - * e-summary.c (read_callback, etc): Hack around gdkpixbuf lossage - by not trying to display the images incrementall. Instead, just - wait until we've read the whole file, then display it all at once. - Prevents garbage when rendering the icons. - -2001-09-18 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (weather_remove_clicked_cb): Select the next - row. - (rdf_remove_clicked_cb): Select the next row. - -2001-09-18 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (mail_remove_clicked_cb): Select the next - folder for removal. - - * e-summary-mail.c (e_summary_mail_reconfigure): Don't do the hashtable - thing to get folders. Just iterate through the list lookuping the - folders instead. This keeps the required order. - -2001-09-18 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (mail_add_clicked_cb): Don't add folders that - are already in the list - -2001-09-18 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (display_doc): Verbose error reporting. - (read_callback): Same. - (open_callback): Same. - -2001-09-18 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (e_summary_weather_add_location): Append the - weather locations so they are in the right order. - - * e-summary-tasks.c (generate_html): If the text is null, don't print - (null). Print "No description" instead. - - * e-summary-rdf.c (e_summary_rdf_add_uri): Append here as well. - - * e-summary-mail.c (maybe_add_to_shown): Append ici. - -2001-09-17 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (weather_make_html): Don't make the confusing - url for the city name. - -2001-09-17 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (mail_change_notify): Only redraw the display when - we receive a notify about a folder we are displaying - -2001-09-17 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (uids_to_array): Correctly use qsort. - (e_summary_calendar_event_sort_func): Dereference the e1 and e2. - -2001-09-17 Federico Mena Quintero <federico@ximian.com> - - * e-summary.c (e_summary_init): There is no need to initialize the - alarm system now. - -2001-09-14 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (uids_to_array): Create ESummaryCalEvents and - put them in an array to get the timezone stuff right. - (e_summary_calendar_event_sort_func): Sort the array. - (generate_html): Use the timezone formats of things. - -2001-09-13 Iain Holmes <iain@ximian.com> - - * Locations: Removed duff Norway station - -2001-09-13 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Fix slashdot problem. - -2001-09-10 Dan Winship <danw@ximian.com> - - Purification. - - * e-summary.c (destroy): free the protocol hash. - - * e-summary-rdf.c (tree_walk): plug a leak. - - * e-summary-weather.c (e_summary_weather_init_locations): Don't - insert duplicates into the hash table. - - * e-summary-mail.c (e_summary_mail_generate_html): free old html - before setting new - - * e-summary.c (e_summary_draw): free weather and rdf html strings. - - * e-summary-preferences.c (save_known_rdfs): free strings. - -2001-09-10 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Add Memepool RDF. - -2001-09-06 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (e_summary_configure): Don't allow dialogs to - be opened more than once. - (property_box_destory_cb): NULL the window var. - -2001-09-05 Ettore Perazzoli <ettore@ximian.com> - - [Fix #958, ShellComponents should not be created by factories, for - the Summary.] - - * component-factory.c (COMPONENT_FACTORY_IID): Removed. - (COMPONENT_ID): New. - (create_component): Renamed from `factory_fn'. No args. - (component_factory_init): Create the BonoboObject with - `create_component' and register it on OAF. - - * GNOME_Evolution_Summary.oaf.in: Remove the - ShellComponentFactory. - -2001-09-05 Iain Holmes <iain@ximian.com> - - * Locations: Added some Caracas fixes from Mayly Sanchez. - -2001-09-05 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_draw): Hack to stop the display jumping to the - top when it is redrawn. - -2001-09-05 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Check if we need to use 24hr - format. Don't try to do fancy things with the date and time of an - appointment. - (locale_uses_24h_time_format): Cut and pasted from calendar. - (e_summary_calendar_init): Get the 24hour preferences from the calendar. - -2001-09-04 Iain Holmes <iain@ximian.com> - - * Locations: Applied patch from Evert Verhellen to fix the Belgium - stations - -2001-09-04 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Fix some accelerator clashes - -2001-09-04 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (add_dialog_clicked_cb): When the feed is - added make the Apply button activate. - -2001-09-04 Iain Holmes <iain@ximian.com> - - * metar.c (weather_conditions_string): Don't return '-' if there is no - condition, as it makes the temperature look negative. - -2001-08-27 Ettore Perazzoli <ettore@ximian.com> - - * e-summary-weather.c (weather_make_html): Make local variable - `icon_name' const. Remove unused variable `uri'. - - * e-summary.h: Reformatted in GTK+ style. - (e_summary_remove_online_connection): Added prototype. - - * e-summary-preferences.c (fill_mail_shown_clist): Constify local - variable `name'. - - * e-summary-mail.c: #include "e-util/e-path.h". Updated to match - the new studlyCapsification in shell/Evolution*.idl. - -2001-08-23 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (rdfs): Remove the 4 that don't work. - -2001-08-22 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (generate_html): Skip the task if it's completed. - -2001-08-22 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (mail_show_full_path_toggled): Set the - property box to changed. - -2001-08-22 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (make_pretty_foldername): If show_full_path is TRUE - then return the full path. Take in the ESummary as well. - (folder_gen_html): Pass ESummary to make_pretty_foldername. - (e_summary_mail_generate_html): Pass the ESummary to folder_gen_html. - - * e-summary-rdf.c (e_summary_rdf_set_online): Take in a - GNOME_Evolution_OfflineProgressListener in case we want to do - individual reporting of rdf's being destroyed. - (make_connection): Call the RDF Feed a News Feed instead. - - * e-summary-weather.c (e_summary_weather_set_online): Same. - - * e-summary.c (e_summary_set_online): Pass in the - GNOME_Evolution_OfflineProgressListener to the set_online callback. - - * e-summary-offline-handler.c (impl_goOffline): Pass the listener to the - callback. - (impl_goOnline): Pass NULL for the listener. - -2001-08-21 Iain Holmes <iain@ximian.com> - - * my-evolution-html.h: Set the text colour to black. - -2001-08-21 Damon Chaplin <damon@ximian.com> - - * e-summary-calendar.c (generate_html): - * e-summary-tasks.c (generate_html): changed the icons. For calendar - events we use the 'new appointment' icon from the menu. For tasks we - use the task icon from the ETable - I wasn't sure about using the - 'New Task' icon as it has a tick in it which may make people think it - is complete. - -2001-08-19 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c: Change the type from "Summary" to "summary" - for consistency with the other folder types. - -2001-08-17 Zbigniew Chyla <cyba@gnome.pl> - - * my-evolution/e-summary-rdf.c (make_connection): - Marked string for translation (connection type). - - * my-evolution/e-summary-weather.c - (make_url): Split into two functions: make_url and make_anchor. - (weather_make_html): s/make_url/make_anchor/ - (make_connection): Marked connection type string for franslation, - assign the real URI to ->hostname (using make_url), not location code. - -2001-08-12 Zbigniew Chyla <cyba@gnome.pl> - - * e-summary-preferences.c (make_initial_weather_list), - e-summary-weather.c (e_summary_weather_init): - Don't hardcode the default list of stations, let translators define it - per locale/country. - -2001-08-17 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (weather_all_select_row_cb): Unselect the - row if it isn't a leaf node. - (weather_add_clicked_cb): Return if location == NULL. - -2001-08-15 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_draw): Use the US format for dates (Yeeech) - -2001-08-15 Iain Holmes <iain@ximian.com> - - * e-summary.c: s/My Evolution/Summary/ - - * e-summary-preferences.c: s/My Evolution/Summary/ - - * component-factory.c: s/My Evolution/Summary/ - -2001-08-13 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c: Set the default weather stations to Boston (boo) - and Xiamen (Yey) - -2001-08-13 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c: Set the default RDF to CNN - -2001-08-13 Jason Leach <jleach@ximian.com> - - * e-summary-mail.c (e_summary_mail_free): Disconnect our callbacks - when we are freeing the ESummaryMail. Fixes #6712. - -2001-08-09 Anna Marie Dirks <anna@ximian.com> - - * my-evolution-html.h : added more padding between the vertical - spacer and the icons for the mail/appointments/tasks summaries. - -2001-08-09 Anna Marie Dirks <anna@ximian.com> - - * my-evolution.glade : added accelerators to all useful widgets - in this file such that this dialog can now be fully navigated from - the keyboard. - - * e-summary-preferences.c : changed the construct_pixmap_button - function to take glade xml, an hbox and pixmap, making it possible - to use glade to define and change the keyboard accelerators, instead - of trying to do this in the c code. - -2001-08-06 Damon Chaplin <damon@ximian.com> - - * e-summary-tasks.c (sort_uids): - (get_todays_uids): - (generate_html): - * e-summary-calendar.c (sort_uids): free the CalComponentDateTime - and icaltimetype values after finishing with them. - -2001-08-03 Jason Leach <jleach@ximian.com> - - * e-summary-mail.c (update_folder_cb): Callback for the - EvolutionStorageListener::update_folder signal, so we can update - mail summaries when they change. Bug #4686. - -2001-08-02 Jason Leach <jleach@ximian.com> - - * e-summary-calendar.c (generate_html): Use the new and beautiful - icon from Jakub. - - * e-summary-mail.c (e_summary_mail_generate_html): Ditto. - - * e-summary-tasks.c (generate_html): Ditto. - -2001-07-23 Zbigniew Chyla <cyba@gnome.pl> - - * e-summary-rdf.c (display_doc): Convert translated string to UTF8. - -2001-07-30 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Remove the Wipe Trackers references. - - * e-summary-rdf.c: Remove the wip trackers as I'm not 100% sure what it - does, and it didn't work. - - * e-summary.h: Remove the wipe_trackers boolean - - * my-evolution.glade: Remove the wipe trackers and shrink the New Feed - button - -2001-07-30 Iain Holmes <iain@ximian.com> - - * e-sumary-calendar.c (generate_html): Correct the URL for the links. - -2001-07-27 Iain Holmes <iain@ximian.com> - - * Locations: Add some more German cities from s.kost@webmacher.de. - -2001-07-23 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (add_dialog_clicked_cb): Add the new RDF to - the shown clist as well. - -2001-07-23 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (e_summary_mail_init): Move the storage register out - of here into a seperate function. - (e_summary_mail_register_storages): Register the local storage. - (e_summary_mail_register_storage): Register a single storage. - -2001-07-23 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Fix the KDE and Newsforge things. Change the - KDE rdf to the one that the KDE person told me :) - -2001-07-23 Jason Leach <jleach@ximian.com> - - * e-summary-preferences.c: Update the url (and site name) for the - KDE rdf. Bug #5145. - -2001-07-21 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c: Make the "My Evolution" folder - non-creatable by setting the `user_creatable' member of - `EvolutionShellComponentFolderType' to %FALSE. - -2001-07-20 Jason Leach <jleach@ximian.com> - - * e-summary-tasks.c: Revert last changes, URIs are now back to - original in shell. - -2001-07-19 Jason Leach <jleach@ximian.com> - - * e-summary-tasks.c: Update the evolution:/local/ URI's to - evolution:/Local Folders/ to go along with todays shell changes. - - * e-summary-mail.c: Ditto. - - * e-summary-calendar.c: Ditto. - -2001-07-19 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (display_doc): Fix HTML - - * e-summary-mail.c (folder_gen_html): correct the folder name. - -2001-07-19 Iain Holmes <iain@ximian.com> - - * my-evolution-html.h: Set the text colour to black. Frank was claiming - it picked the default colour from the GTK+ theme, and if it was white - bad things happened. - -2001-07-18 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (weather_make_html): Remove the (more) link. - - * e-summary.c (e_summary_draw): Don't append NULL to the GString. - - * e-summary-tasks.c: Remove spewage. - -2001-07-18 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (weather_make_html): Remove spewage. - -2001-07-18 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_reconfigure): Reconfigure the tasks. - - * e-summary-tasks.c (generate_html): Obtain todays tasks. - (get_todays_uids): Make a list of todays uids. - -2001-07-18 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (make_property_dialog): Create the image - buttons. - (construct_pixmap_button): Create a box with an image and text. - -2001-07-18 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (e_summary_configure): Set the title on the - window. Just do a g_return_if_fail if the XML file couldn't be loaded. - -2001-07-16 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (display_doc): Nicer error reporting. - - * e-summary-weather.c: Nicer error reporting. - -2001-07-13 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c: Fix the name of the icon. - -2001-07-13 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (mail_add_clicked_cb): Set the property box - to changed. - -2001-07-13 Zbigniew Chyla <cyba@gnome.pl> - - * e-summary.c (e_summary_draw): Convert the date string to utf8 before - appending it to HTML. - -2001-07-12 Iain Holmes <iain@ximian.com> - - * metar.c: #include <config.h> - -2001-07-12 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_draw): put _() around the date string. - - * metar.c: Put some _() around things. - -2001-07-12 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Made the weather a single selection clist. - -2001-07-11 Iain Holmes <iain@ximian.com> - - * e-summary-mail.c (e_summary_mail_generate_html): Protect with - g_return_if_fail - -2001-07-11 Iain Holmes <iain@ximian.com> - - * e-summary.c (destroy): Destroy the alarm. - (e_summary_init): Init the alarm. - - * e-summary-mail.c (free_folder): Don't free the value. - -2001-07-11 Iain Holmes <iain@ximian.com> - - * e-summary.c (destroy): Destroy all the subcomponents. - - * e-summary-rdf.c (e_summary_rdf_free): Free and stop all tranfsers - - * e-summary-weather.c (e_summary_weather_free): Same. - - * e-summary-mail.c (e_summary_mail_free): Same. - - * e-summary-calendar.c (e_summary_calendar_free): Same. - - * e-summary-tasks.c (e_summary_tasks_free): Guess what. - -2001-07-10 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Correct the Register RDF url. - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_init): Connect a calendar alarm to be notified - of when the day changes. - - * Makefile.am: Link with libalarm.a - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-weather.c (weather_make_html): Get an icon for the weather. - - * metar.[ch] (icon_from_weather): Work out what icon for a specific - weather type. - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (tree_walk): Fix HTML so it doesn't give the big black - line - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (generate_html): Fix same HTML bug as in calendar. - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Show varying times depending - on how soon the appointment is. - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-calendar.c (generate_html): Fix up the HTML so having - appointments doesn't mess up the display. Set the correct length of - time to show appointments. - -2001-07-09 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.c (generate_html): Make the tasks switch to the - tasks folder when you click on them. - -2001-07-09 Kjartan Maraas <kmaraas@gnome.org> - - * e-summary-preferences.c: Added #include <config.h> to get - translations working. - -2001-07-06 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (str_list_from_vector): Change the delimiter - (vector_from_str_list): Change the delimiter. - (fill_mail_all_clist): Fill the mail folder clist. - (fill_mail_shown_clist): Use nicer names. - (mail_add_clicked_cb): Add folders to the shown list. - - * e-summary-mail.c (e_summary_mail_fill_list): Flatten the hashtable - into the CList. - (e_summary_mail_uri_to_name): Get the pretty name for a uri. - -2001-07-06 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (fill_rdf_shown_list): Attach data - (rdf_add_clicked_cb): Allow multiple rows to be removed. - (rdf_remove_clicked_cb): Use the data. - - * my-evolution.glade: Allow multiple selection in the RDF all clist. - Only allow single selection in the shown rdf list. - -2001-07-05 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (rdf_new_url_clicked_cb): Change RDF to - news feed. - -2001-07-05 Iain Holmes <iain@ximian.com> - - * my-evolution.glade: Replace a table with a vbox so that the text - of the radio buttons can be clicked. Change RDF to News Feed - -2001-07-05 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (add_dialog_clicked_cb): Fix warning - (fill_rdf_shown_clist): Fix warning. - (calendar_one_toggled_cb): Set preferences to the right toggle button. - (calendar_five_toggled_cb): Ditto - (calendar_week_toggled_cb): Ditto ditto - (calendar_month_toggled_cb): Ditto dotto - (calendar_all_toggled_cb): Set the amount of Tasks to be shown - (calendar_today_toggled_cb): Ditto - (make_property_dialog): Hook up the calendar radio buttons. - (e_summary_preferences_restore): Pass NULL as opt_default, not &ev. - -2001-07-05 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (e_summary_preferences_restore): Add - My-Evolution to the namespace. - (e_summary_preferences_save): Ditto. - -2001-07-05 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (e_summary_preferences_restore): Re-enabled. - Bonobo-conf doesn't seem to like NULL for opt_ev. - -2001-07-03 Iain Holmes <iain@ximian.com> - - * e-summary-prefences.c (e_summary_preferences_restore): Disabled until - memory corruption thing is found. - - * my-evolution.glade: Fix the radio button problem. - -2001-07-03 Iain Holmes <iain@ximian.com> - - * e-summary-factory.c: Fixed the Bonobo warning. - -2001-07-03 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (e_summary_preferences_restore): Ditch - gnome-config and replace it with bonobo-conf. - (e_summary_preferences_save): Ditto. - - * e-summary-factory.c: Use the new print.png icon. - - * Makefile.am: Add bonobo conf CFLAGS and LIBS - -2001-07-03 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_set_online): Return if summary == NULL. - (e_summary_add_connections): Return NULL if summary == NULL. - (e_summary_count_connections): Return 0 if summary == NULL. - -2001-07-02 Iain Holmes <iain@ximian.com> - - * e-summary-tasks.[ch]: New files for tasks. - - * e-summary.c: USe the tasks. - -2001-07-02 Iain Holmes <iain@ximian.com> - - * Makefile.am: Add the glade files to the EXTRA_DIST - -2001-07-02 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am (evolution_executive_summary_SOURCES): Add - `e-summary-preferences.h'. - -2001-06-30 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (fill_rdf_all_clist): Load the URLs from a - file. - (save_known_urls): Save the known URLs. - (add_dialog_clicked_cb): Close the dialog on Cancel. Save the URLs on - Ok. - (rdf_new_url_clicked_cb): Add some labels and an entry for the name. - -2001-06-30 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (fill_rdf_all_clist): Fill with names - instead of URLs. - (find_name_for_url): Given a URL find a name for it if we know it. - (rdf_add_clicked_cb): Add the name to the clist and the url to the - list. - -2001-06-30 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (add_dialog_clicked_cb): Add the new url to - the list. - (rdf_new_url_clicked_cb): Create a dialog and allow the user to add - new urls. - -2001-06-30 Iain Holmes <iain@ximian.com> - - * e-summary-rdf.c (tree_walk): Remove spewage. - (e_summary_rdf_count): - (e_summary_rdf_add): - (make_connection): - (e_summary_rdf_set_online): Callbacks for the online_handler stuff. - (e_summary_rdf_init): Setup the offline handler stuff. - (close_callback): Update the number of onlines there are. - - * e-summary-weather.c (close_callback): Update the number of onlines. - (e_summary_weather_count): Count the number of active downloads. - (e_summary_weather_add): Make a list of active downloads. - (make_connection): Make connection data. - (e_summary_weather_set_online): Set if the component is online or not. - (e_summary_weather_init): Setup the offline handler stuff. - - * e-summary.c (e_summary_count_connections): Call all the callbacks - in the various modules that have online data and count the number of - connections. - (e_summary_add_connections): Make a list of them all. - (e_summary_set_online): Set the online status for each registered - module. - (e_summary_add_online_connection): Register a new module. - - * e-summary-offline-handler.[ch]: BonoboXObject implementing the - GNOME::Evolution::Offline interface. - - * e-summary-factory.c (factory_fn): Create an offline handler. - - * Makefile.am: Compile e-summary-offline-handler.[ch] - -2001-06-30 Zbigniew Chyla <cyba@gnome.pl> - - * e-summary-calendar.c (generate_html): - Marked strings for translation + conversion to utf8. - - * e-summary-mail.c - Added missing #include <config.h> - (e_summary_mail_generate_html): - Marked strings for translation + conversion to utf8. - - * e-summary-weather.c - (e_summary_weather_get_html, open_callback): - Marked strings for translation + conversion to utf8. - (weather_make_html): Fixed leaks. - - * e-summary-rdf.c - (tree_walk): Fixed leaks. - (read_callback): Marked strings for translation. - -2001-06-29 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_draw): Resurrect the hack to stop GtkHTML from - returning to the top when it's redrawn. - -2001-06-29 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c (property_box_destroy_cb): Hook up the saving. - (str_list_from_vector): Fix memory corruption. - (e_summary_preferences_save): Write the preferences out to disk. - I *always* forget that. - - * e-summary-mail.c (e_summary_mail_init): Init ->shown to NULL. - -2001-06-29 Iain Holmes <iain@ximian.com> - - * e-summary-preferences.c: Do everything preferences related. - - * my-evolution.glade: Glade file for the preferences box. - - * e-summary-calendar.c (e_summary_calendar_reconfigure): Stub for later - - * e-summary-calendar.h: Some enums for settings. - - * e-summary-mail.c (folder_gen_html): Change the prototype so it - doesn't work as a hash table foreach function. - (new_folder_cb): Fix typo in comment :) - Create a list of folders we display. - (remove_folder_cb): Remove the folder from the display folder list. - (maybe_add_to_shown): Hash table foreach function to create a display - folder list. - (e_summary_mail_reconfigure): Recreate the mail HTML. - - * e-summary-rdf.c (tree_walk): Obey preferences. - (e_summary_rdf_update): Separate the updating and downloading logic. - (e_summary_rdf_init): Start an updating timeout. - (e_summary_rdf_reconfigure): Recreate the RDF html. - - * e-summary-weather.c (e_summary_weather_update): Separate the updating - and downloading logic. - (e_summary_weather_init): Start timeout. - (e_summary_weather_code_to_name): Convert code to location name. - (e_summary_weather_ctree_fill): Fill a CTree with the location data. - (e_summary_weather_reconfigure): Regenerate the HTML. - - * e-summary.c (e_summary_init): Create the preferences. - (e_summary_reconfigure): Reconfigure the whole summary. - - * metar.c: Obey preferences. - -2001-06-27 Iain Holmes <iain@ximian.com> - - * e-summary-factory.c: Add the pixmaps to the menus. - Add a new menu item for the configuration stuff. - -2001-06-27 Ettore Perazzoli <ettore@ximian.com> - - * component-factory.c (factory_fn): Pass NULL as the - @external_uri_schemas argument to - `evolution_shell_component_new()'. - -2001-06-21 Rodrigo Moya <rodrigo@ximian.com> - - * Makefile.am: added libwombat to LDADD - -2001-06-15 JP Rosevear <jpr@ximian.com> - - * Makefile.am: Get weather.h disted - -2001-06-15 JP Rosevear <jpr@ximian.com> - - * Makefile.am: Fix includes so that libical need not be installed - -2001-06-14 JP Rosevear <jpr@ximian.com> - - * Makefile.am: add my-evolution-html.h to the sources - -2001-06-13 JP Rosevear <jpr@ximian.com> - - * Makefile.am: Make e-summary-type.h a source so it gets disted - -2001-06-08 Iain Holmes <iain@ximian.com> - - * e-summary.c (e_summary_init): Allow horizontal scrollbars. - - * e-summary-weather.c (e_summary_weather_init): Change the name of the - protocol registered. - (weather_make_html): Use the weather protocol instead of more. diff --git a/my-evolution/GNOME_Evolution_Summary.server.in.in b/my-evolution/GNOME_Evolution_Summary.server.in.in deleted file mode 100644 index 1c8a4be7e1..0000000000 --- a/my-evolution/GNOME_Evolution_Summary.server.in.in +++ /dev/null @@ -1,62 +0,0 @@ -<oaf_info> - - <oaf_server iid="OAFIID:GNOME_Evolution_Summary_ComponentFactory" - type="shlib" - location="@COMPONENTDIR@/libevolution-executive-summary.so"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:Bonobo/GenericFactory:1.0"/> - </oaf_attribute> - - <oaf_attribute name="name" type="string" - _value="Evolution Summary"/> - - </oaf_server> - - <oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponent" - type="factory" - location="OAFIID:GNOME_Evolution_Summary_ComponentFactory"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/Evolution/ShellComponent:1.0"/> - </oaf_attribute> - - <oaf_attribute name="name" type="string" - _value="Evolution Summary component"/> - - <oaf_attribute name="evolution:shell_component_icon" type="string" - value="evolution-today.png"/> - <oaf_attribute name="evolution:shell_component_launch_order" type="number" - value="4"/> - - </oaf_server> - - <oaf_server iid="OAFIID:GNOME_Evolution_Summary_ConfigControl" - type="factory" - location="OAFIID:GNOME_Evolution_Summary_ComponentFactory"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> - </oaf_attribute> - - <oaf_attribute name="evolution:config_item:title" type="string" - _value="Summary Preferences"/> - - <oaf_attribute name="evolution:config_item:description" type="string" - _value="Configure the appearance of the Evolution Summary here"/> - - <oaf_attribute name="evolution:config_item:icon_name" type="string" - value="evolution-today.png"/> - - <oaf_attribute name="evolution:config_item:type" type="stringv"> - <item value="summary"/> - </oaf_attribute> - - <oaf_attribute name="evolution:config_item:priority" type="string" value="-5"/> - - <oaf_attribute name="name" type="string" - _value="Evolution Summary configuration control"/> - - </oaf_server> - -</oaf_info> diff --git a/my-evolution/Location-translation-script b/my-evolution/Location-translation-script deleted file mode 100755 index 77c4ddba88..0000000000 --- a/my-evolution/Location-translation-script +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -grep name Locations | cut -b 6- > Locations.h -grep loc Locations | sed "s/ .... ...... ...$//"| sed "s/ .... :...... ...$//" | cut -d = -f 2 | sed "s/\\\\//g" >> Locations.h - -sed -e "s/^/N_(\"/" -e "s/$/\")/" Locations.h > Locations.h.tmp -sort Locations.h.tmp | uniq > Locations.h -rm Locations.h.tmp diff --git a/my-evolution/Locations b/my-evolution/Locations deleted file mode 100644 index 21184bc337..0000000000 --- a/my-evolution/Locations +++ /dev/null @@ -1,3057 +0,0 @@ -[Main] -regions=US CA MX EU AF OZ ME AS M_ AT - -[ME] -name=Middle East -states=DZ BH IR IL KW LB OM QA SA AE YE - -[ME_IL] -name=Israel -loc0=Ben\\ Gurion LLBG ------ --- -loc1=Eilat LLET ------ --- -loc2=Ovda LLOV ------ --- - -[ME_AE] -name=United Arab Emirates -loc0=Abu\\ Dhabi\\ -\\ Bateen OMAD ------ --- -loc1=Abu\\ Dhabi OMAA ------ --- -loc2=Al\\ Ain OMAL ------ --- -loc3=Dubai OMDB ------ --- -loc4=Fujairah OMFJ ------ --- -loc5=Ras\\ Al\\ Khaimah OMRK ------ --- -loc6=Sharjah OMSJ ------ --- - -[ME_QA] -name=Qatar -loc0=Doha OTBD ------ --- - -[ME_OM] -name=Oman -loc0=Masirah OOMA ------ --- -loc1=Saiq OOSQ ------ --- -loc2=Salalah OOSA ------ --- -loc3=Seeb OOMS ------ --- -loc4=Thumrait OOTH ------ --- - -[ME_YE] -name=Yemen -loc0=Aden OYAA ------ --- -loc1=Hodeidah OYHD ------ --- -loc2=Marib OYMB ------ --- -loc3=Sana'A OYSN ------ --- -loc4=Sayun OYSY ------ --- -loc5=Socotra OYSQ ------ --- -loc6=Taiz OYTZ ------ --- - -[ME_SA] -name=Saudi Arabia -loc0=Abha OEAB ------ --- -loc1=Al\\ Ahsa OEAH ------ --- -loc2=Al\\ Baha OEBA ------ --- -loc3=Al\\ Qaysumah OEPA ------ --- -loc4=Al-Jouf OESK ------ --- -loc5=Arar OERR ------ --- -loc6=Bisha OEBH ------ --- -loc7=Dawadmi OEDW ------ --- -loc8=Dhahran OEDR ------ --- -loc9=Gassim OEGS ------ --- -loc10=Gizan OEGN ------ --- -loc11=Guriat OEGT ------ --- -loc12=Hafr\\ Al-Batin OEKK ------ --- -loc13=Hail OEHL ------ --- -loc14=Jeddah\\ King\\ Abdul\\ Aziz\\ International\\ Airport OEJN ------ --- -loc15=Khamis\\ Mushait OEKM ------ --- -loc16=King\\ Khaled\\ International\\ Airport OERK ------ --- -loc17=Madinah OEMA ------ --- -loc18=Makkah OEMK ------ --- -loc19=Najran OENG ------ --- -loc20=Rafha OERF ------ --- -loc21=Riyadh OERY ------ --- -loc22=Sharurah OESH ------ --- -loc23=Tabuk OETB ------ --- -loc24=Taif OETF ------ --- -loc25=Turaif OETR ------ --- -loc26=Wadi\\ Al\\ Dawasser\\ Airport OEWD ------ --- -loc27=Wejh OEWJ ------ --- -loc28=Yenbo OEYN ------ --- - -[ME_DZ] -name=Algeria -loc0=Adrar DAUA ------ --- -loc1=Annaba DABB ------ --- -loc2=Constantine DABC ------ --- -loc3=Dar-El-Beida DAAG ------ --- -loc4=Ghardaia DAUG ------ --- -loc5=Hassi-Messaoud DAUH ------ --- -loc6=In\\ Amenas DAUZ ------ --- -loc7=Oran/Es\\ Senia DAOO ------ --- -loc8=Tamanrasset/Aguenna DAAT ------ --- -loc9=Tebessa DABS ------ --- -loc10=Tlemcen\\ Zenata DAON ------ --- - -[ME_BH] -name=Bahrain -loc0=Bahrain OBBI ------ --- - -[ME_LB] -name=Lebanon -loc0=Beirut OLBA ------ --- - -[ME_IR] -name=Iran, Islamic Republic of -loc0=Ahwaz OIAW ------ --- -loc1=Bandarabbass OIKB ------ --- -loc2=Esfahan OIFM ------ --- -loc3=Kerman OIKK ------ --- -loc4=Mashhad OIMM ------ --- -loc5=Shiraz OISS ------ --- -loc6=Tabriz OITT ------ --- -loc7=Tehran-Mehrabad OIII ------ --- - -[ME_KW] -name=Kuwait -loc0=Kuwait OKBK ------ --- - -[US] -name=United States -states=AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MA MD MI MS MN MO MT NE NH NM NV NY ND NJ NC OH OK OR PA RI SC SD TN TX UT VT VA WA WI WV WY - -[US_AK] -name=Alaska -loc0=Adak PADK AKZ020 --- -loc1=Ambl\\er PAFM AKZ003 --- -loc2=Anaktuvuk PAKP AKZ001 --- -loc3=Anchorage PANC AKZ015 --- -loc4=Anchorage\\ -\\ Elmendorf\\ AFB PAED AKZ015 --- -loc5=Aniak PANI AKZ010 --- -loc6=Annette PANT ------ --- -loc7=Barrow PABR AKZ001 --- -loc8=Barter\\ Island PABA ------ --- -loc9=Bethel PABE AKZ010 --- -loc10=Bettles PABT AKZ004 --- -loc11=Big\\ River\\ Lake PALV AKZ001 --- -loc12=Cantwell PATW AKZ004 --- -loc13=Cape\\ Lisburne PALU ------ --- -loc14=Cape\\ Newenham PAEH ------ --- -loc15=Cape\\ Romanzoff PACZ ------ --- -loc16=Chandalar\\ Lake PALR AKZ004 --- -loc17=Chulitna PAEC ------ --- -loc18=Circle\\ City PACR AKZ004 --- -loc19=Cold\\ Bay PACD AKZ020 --- -loc20=Cordova PACV AKZ017 --- -loc21=Dead\\ Horse PASC AKZ001 --- -loc22=Dillingham PADL AKZ010 --- -loc23=Dutch\\ Harbor PADU AKZ020 --- -loc24=Elfin\\ Cove PAEL AKZ022 --- -loc25=Emmonak PAEM ------ --- -loc26=Fairbanks PAFA AKZ007 --- -loc27=Farbanks/Eielson\\ AFB PAEI AKZ007 --- -loc28=Fort\\ Greely/Allen\\ AAF PABI ------ --- -loc29=Galbraith\\ Lake PAGB ------ --- -loc30=Galena PAGA ------ --- -loc31=Gambell PAGM AKZ006 --- -loc32=Gulkana PAGK AKZ015 --- -loc33=Gustavus PAGS AKZ024 --- -loc34=Haines PAHN AKZ002 --- -loc35=Hayes\\ River PAHZ ------ --- -loc36=Healy\\ River PAHV AKZ004 --- -loc37=Homer PAHO AKZ017 --- -loc38=Hoonah PAOH AKZ026 --- -loc39=Iliamna PAIL AKZ010 --- -loc40=Juneau PAJN AKZ025 --- -loc41=Kake PAFE AKZ026 --- -loc42=Kenai PAEN AKZ017 --- -loc43=Ketchikan PAKT AKZ027 --- -loc44=King\\ Salmon PAKN AKZ016 --- -loc45=Klawock PAKW ------ --- -loc46=Kodiak PADQ AKZ018 --- -loc47=Kotzebue PAOT AKZ003 --- -loc48=Lake\\ Hood PALH ------ --- -loc49=McCarthy PAMX AKZ017 --- -loc50=McGrath PAMC AKZ004 --- -loc51=Mekoryuk PAMY AKZ010 --- -loc52=Merril\\ Field PAMR ------ --- -loc53=Middleton\\ Island PAMD ------ --- -loc54=Minchumina PAMH ------ --- -loc55=Nabesna/Devil\\ Mt. PABN ------ --- -loc56=Nenana PANN AKZ004 --- -loc57=Nome PAOM AKZ006 --- -loc58=Northway PAOR AKZ007 --- -loc59=Palmer PAAQ AKZ015 --- -loc60=Paxson PAXK AKZ017 --- -loc61=Petersburg PAPG AKZ026 --- -loc62=Point\\ Hope PAPO AKZ001 --- -loc63=Point\\ Lay PPIZ AKZ001 --- -loc64=Port\\ Alexander PAAP AKZ026 --- -loc65=Port\\ Alsworth PALJ ------ --- -loc66=Port\\ Heiden PAPH AKZ010 --- -loc67=Puntilla\\ Lake PAPT ------ --- -loc68=Saint\\ Mary's PASM AKZ010 --- -loc69=Saint\\ Paul PASN ------ --- -loc70=Sand\\ Point PASD AKZ020 --- -loc71=Selanik PASK AKZ003 --- -loc72=Seward PAWD AKZ017 --- -loc73=Shishmaref PASH AKZ006 --- -loc74=Sitka PASI AKZ023 --- -loc75=Skagway PAGY AKZ026 --- -loc76=Skwentna PASW AKZ015 --- -loc77=Slana PADT ------ --- -loc78=Snowshoe\\ Lake PALK ------ --- -loc79=Soldotna PASX AKZ017 --- -loc80=Sparrevohn PASV ------ --- -loc81=Sutton PAJV ------ --- -loc82=Talkeetna PATK AKZ015 --- -loc83=Tanana PATA AKZ004 --- -loc84=Tatalina PATL ------ --- -loc85=Tin\\ City PATC ------ --- -loc86=Togiak\\ Village PATG AKZ010 --- -loc87=Umiat PAUM AKZ001 --- -loc88=Unalakleet PAUN AKZ006 --- -loc89=Valdez\\ 2 PAVD AKZ017 --- -loc90=Wainwright PAFB AKZ001 --- -loc91=Whittier PAWR AKZ015 --- -loc92=Willow\\ Airport PAUO AKZ015 --- -loc93=Wrangell PAWG AKZ026 --- -loc94=Yakutat PAYA AKZ022 --- - -[US_AR] -name=Arkansas -loc0=Batesville KBVX ARZ016 --- -loc1=Bentonville KVBT ARZ001 --- -loc2=El\\ Dorado KELD ARZ073 --- -loc3=Fayetteville KFYV ARZ010 085 -loc4=Flippin KFLP ARZ004 --- -loc5=Fort\\ Smith KFSM ------ 085 -loc6=Harrison KHRO ARZ003 085 -loc7=Hot\\ Springs KHOT ARZ042 --- -loc8=Jonesboro KJBR ARZ026 085 -loc9=Little\\ Rock KLIT ARZ044 --- -loc10=Little\\ Rock\\ AFB KLRF ARZ044 --- -loc11=Pine\\ Bluff KPBF ARZ056 --- -loc12=Rogers KROG ARZ001 --- -loc13=Siloam\\ Springs KSLG ARZ001 --- -loc14=Stuttgart KSGT ARZ057 --- -loc15=Texarkana KTXK ARZ070 --- -loc16=Walnut\\ Ridge KARG ARZ017 --- - -[US_DC] -name=District of Columbia -loc0=Washington/Dulles KIAD DCZ013 dca -loc1=Washington KDCA DCZ013 dca - -[US_ID] -name=Idaho -loc0=Boise KBOI IDZ014 --- -loc1=Burley KBYI IDZ022 --- -loc2=Challis KU15 IDZ018 --- -loc3=Coeur\\ d'Alene KCOE IDZ002 --- -loc4=Elk\\ City KP69 IDZ006 --- -loc5=Grangeville KS80 IDZ007 --- -loc6=Hailey-Sun\\ Valley KSUN IDZ018 --- -loc7=Idaho\\ Falls KIDA IDZ020 --- -loc8=Lewiston KLWS IDZ003 --- -loc9=Malad\\ City KMLD IDZ022 --- -loc10=Malta K77M IDZ022 --- -loc11=McCall KMYL IDZ011 --- -loc12=Mountain\\ Home KMUO IDZ014 --- -loc13=Mullan KS06 IDZ004 --- -loc14=Pocatello KPIH IDZ021 --- -loc15=Salmon KSMN IDZ009 --- -loc16=Salmon\\ (2) K27U IDZ009 --- -loc17=Soda\\ Springs KU78 IDZ023 --- -loc18=Strevell K4SV ------ --- -loc19=Twin\\ Falls KTWF IDZ015 --- - -[US_IA] -name=Iowa -loc0=Algona KAXA IAZ005 043 -loc1=Ames KAMW IAZ048 043 -loc2=Atlantic KAIO IAZ070 --- -loc3=Boone KBNW IAZ047 --- -loc4=Burlington KBRL IAZ089 058 -loc5=Carroll KCIN IAZ045 --- -loc6=Cedar\\ Rapids KCID IAZ052 --- -loc7=Chariton KCNC IAZ084 --- -loc8=Charles\\ City KCCY IAZ018 --- -loc9=Clarinda KICL IAZ091 --- -loc10=Clarion KCAV IAZ025 --- -loc11=Clinton KCWI IAZ066 --- -loc12=Council\\ Bluffs KCBF IAZ069 --- -loc13=Creston KCSQ IAZ082 --- -loc14=Davenport KDVN IAZ068 --- -loc15=Decorah KDEH IAZ010 --- -loc16=Denison KDNS IAZ044 --- -loc17=Des\\ Moines KDSM IAZ060 057 -loc18=Dubuque KDBQ IAZ042 --- -loc19=Estherville KEST IAZ004 --- -loc20=Fairfield KFFL IAZ087 --- -loc21=Fort\\ Dodge KFOD IAZ035 043 -loc22=Fort\\ Madison KFSW IAZ099 --- -loc23=Iowa\\ City KIOW IAZ064 --- -loc24=Keokuk KEOK ------ --- -loc25=Knoxville KOXV ------ --- -loc26=Lamoni K0Y7 IAZ094 057 -loc27=Le\\ Marine KLRJ ------ --- -loc28=Marshalltown KMIW IAZ049 --- -loc29=Mason\\ City KMCW IAZ017 044 -loc30=Monticello KMXO IAZ053 --- -loc31=Muscatine KMUT IAZ067 --- -loc32=Newton KTNU IAZ061 --- -loc33=Oelwen KOLZ IAZ029 --- -loc34=Orange\\ City KORC IAZ012 --- -loc35=Ottumwa KOTM IAZ086 058 -loc36=Red\\ Oak KRDK IAZ080 --- -loc37=Sheldon KSHL IAZ012 --- -loc38=Shenandoah KSDA IAZ091 --- -loc39=Sioux\\ City KSUX IAZ031 043 -loc40=Spencer KSPW IAZ014 043 -loc41=Storm\\ Lake KSLB IAZ022 --- -loc42=Washington KAWG IAZ077 --- -loc43=Waterloo KALO IAZ039 044 -loc44=Webster\\ City KEBS ------ --- - -[US_KS] -name=Kansas -loc0=Chanute KCNU KSZ096 084 -loc1=Concordia KCNK KSZ020 071 -loc2=Dodge\\ City KDDC KSZ078 070 -loc3=Elkhart K1K5 KSZ084 --- -loc4=Emporia KEMP KSZ054 071 -loc5=Fort\\ Riley KFRI KSZ036 --- -loc6=Garden\\ City KGCK KSZ063 070 -loc7=Goodland KGLD KSZ013 070 -loc8=Hays KHYS KSZ031 --- -loc9=Hill\\ City KHLC KSZ016 070 -loc10=Hutchinson KHUT KSZ067 084 -loc11=Liberal KLBL KSZ086 --- -loc12=Manhattan KMHK KSZ022 071 -loc13=Medicine\\ Lodge KP28 KSZ090 --- -loc14=Olathe KOJC KSZ105 071 -loc15=Olathe/Ind. KIXD KSZ105 071 -loc16=Russell KRSL KSZ032 070 -loc17=Salina KSLN KSZ049 071 -loc18=Topeka KTOP KSZ039 071 -loc19=Topeka-Forbes\\ Field KFOE KSZ039 071 -loc20=Wichita KICT KSZ083 084 -loc21=Wichita-Jabara K3KM KSZ083 084 -loc22=Wichita-McConnell\\ AFB KIAB KSZ083 084 - -[US_KY] -name=Kentucky -loc0=Bowling\\ Green KBWG KYZ071 087 -loc1=Covington KCVG KYZ092 074 -loc2=Fort\\ Campbell KHOP KYZ017 --- -loc3=Fort\\ Knox KFTK KYZ028 --- -loc4=Frankfort KFFT KYZ035 --- -loc5=Henderson KEHR KYZ018 --- -loc6=Jackson KJKL KYZ112 087 -loc7=Lexington KLEX KYZ041 074 -loc8=London KLOZ ------ 087 -loc9=Louisville KLOU KYZ030 073 -loc10=Louisville-Standiford\\ Field KSDF KYZ030 073 -loc11=Owensboro KOWB KYZ019 086 -loc12=Paducah KPAH KYZ005 --- -loc13=Pikeville K5I3 KYZ120 --- -loc14=Somerset KSME KYZ079 --- - -[US_LA] -name=Lousiana -loc0=Alexandria KAEX LAZ028 115 -loc1=Alexandria-Esler KESF LAZ028 115 -loc2=Amelia K7R3 ------ --- -loc3=Barksdale KBAD ------ --- -loc4=Baton\\ Rouge KBTR LAZ048 121 -loc5=Cameron K7R5 LAZ051 --- -loc6=Fort\\ Polk-Leesville KPOE LAZ027 115 -loc7=Fourchon K9F2 ------ --- -loc8=Grand\\ Isle KAXO LAZ061 --- -loc9=Houma KHUM LAZ066 --- -loc10=Intracoastal K7R4 LAZ052 --- -loc11=Lafayette KLFT LAZ044 121 -loc12=Lake\\ Charles KLCH LAZ041 121 -loc13=Monroe KMLU LAZ014 --- -loc14=New\\ Iberia KARA LAZ053 --- -loc15=New\\ Orleans KMSY LAZ062 121 -loc16=New\\ Orleans\\ NAS KNBG LAZ062 121 -loc17=New\\ Orleans-Lakefront KNEW LAZ062 121 -loc18=Patterson KPTN ------ --- -loc19=Salt\\ point KP92 ------ --- -loc20=Shreveport\\ Downtown KDTN LAZ001 107 -loc21=Shreveport\\ Regional KSHV LAZ001 107 -loc22=South\\ Marsh\\ Island K7R8 LAZ053 --- -loc23=South\\ Timbalier KS58 ------ --- -loc24=Venice K7R1 ------ 121 -loc25=Vermillion K9R9 ------ --- -loc26=Vicksburg KTVR ------ --- - -[US_ME] -name=Maine -loc0=Augusta KAUG MEZ021 034 -loc1=Bangor KBGR MEZ015 034 -loc2=Bar\\ Harbor KBHB MEZ029 --- -loc3=Brunswick KNHZ MEZ024 049 -loc4=Caribou KCAR MEZ002 --- -loc5=Clayton\\ Lake K40B ------ --- -loc6=Frenchville KFVE MEZ002 --- -loc7=Fryeburg KIZG ------ --- -loc8=Greenville K3B1 MEZ010 034 -loc9=Houlton KHUL MEZ002 --- -loc10=Lewiston KLEW MEZ020 --- -loc11=Millinocket KMLT MEZ015 --- -loc12=Portland KPWM MEZ024 049 -loc13=Presque\\ Isle KPQI MEZ002 --- -loc14=Rockland KRKD MEZ027 --- -loc15=Sanford KSFM MEZ023 --- -loc16=Turin K3B5 ------ --- -loc17=Waterville KWVL MEZ021 --- -loc18=Wiscasset KIWI MEZ026 --- - -[US_MS] -name=Mississippi -loc0=Columbus KGTR MSZ031 109 -loc1=Columbus-W\\ Point-Starkville KCBM MSZ031 109 -loc2=Greenville KGLH ------ 108 -loc3=Greenwood KGWO MSZ025 108 -loc4=Gulfport KGPT MSZ081 --- -loc5=Jackson KJAN MSZ048 108 -loc6=Laurel KPIB MSZ066 --- -loc7=McComb KMCB MSZ070 --- -loc8=Meridian KMEI MSZ052 109 -loc9=Meridian-Lauderdale KNMM MSZ052 109 -loc10=Natchez KHEZ MSZ060 --- -loc11=Tupelo KTUP MSZ016 098 -loc12=Vicksburg KTVR MSZ047 --- - -[US_MO] -name=Missouri -loc0=Cape\\ Girardeau KCGI MOZ087 --- -loc1=Columbia KCOU MOZ041 072 -loc2=Fort\\ Leonard KTBN MOZ070 072 -loc3=Grandview KGVW MOZ037 --- -loc4=Jefferson\\ City KJEF MOZ048 072 -loc5=Joplin KJLN MOZ088 084 -loc6=Kansas\\ City KMKC MOZ037 071 -loc7=Kansas\\ City-Gladstone KMCI MOZ029 071 -loc8=Kirksville KIRK MOZ017 058 -loc9=Poplar\\ Bluff KP02 MOZ109 --- -loc10=Sedalia KSZL MOZ045 --- -loc11=Spickard KP35 MOZ015 --- -loc12=Springfield KSGF MOZ095 084 -loc13=St\\ Joseph KSTJ MOZ020 057 -loc14=St\\ Louis KSTL MOZ064 stl -loc15=St\\ Louis-Spirit KSUS MOZ064 stl -loc16=Vichy-Rolla KVIH MOZ058 072 - -[US_MT] -name=Montana -loc0=Billings KBIL MTZ035 --- -loc1=Bozeman KBZN MTZ015 013 -loc2=Broadus K4BQ MTZ036 --- -loc3=Butte KBTM MTZ007 013 -loc4=Cut\\ Bank KCTB MTZ010 004 -loc5=Dillon KDLN MTZ008 025 -loc6=Drummond K3DU MTZ006 013 -loc7=Glasgow KGGW MTZ017 --- -loc8=Glendive KGDV MTZ025 --- -loc9=Great\\ Falls KGFA MTZ012 004 -loc10=Harlowton K3HT MTZ028 --- -loc11=Havre KHVR MTZ011 004 -loc12=Helena KHLN MTZ014 013 -loc13=Jordan KJDN MTZ022 --- -loc14=Kalispell KFCA MTZ003 004 -loc15=Lewistown KLWT MTZ013 013 -loc16=Livingston KLVM MTZ028 013 -loc17=Miles\\ City KMLS MTZ032 --- -loc18=Missoula KMSO MTZ005 013 -loc19=Monida KMQM ------ --- -loc20=Sidney KSDY MTZ024 --- -loc21=Thompson\\ Falls K3TH MTZ004 --- -loc22=West\\ Yellowstone KWYS MTZ015 025 -loc23=West\\ Yellowstone\\ (2) KWEY MTZ015 025 -loc24=Wolf\\ Point KOLF MTZ020 --- - -[US_NE] -name=Nebraska -loc0=Ainsworth KANW NEZ008 042 -loc1=Alliance KAIA NEZ003 --- -loc2=Beatrice KBIE NEZ089 057 -loc3=Broken\\ Bow KBBW NEZ038 056 -loc4=Burwell KK20 ------ --- -loc5=Chadron KCDR NEZ002 041 -loc6=Columbus KOLU NEZ042 --- -loc7=Falls\\ City KFNB NEZ093 057 -loc8=Grand\\ Island KGRI NEZ062 056 -loc9=Hastings KHSI NEZ075 056 -loc10=Imperial KIML NEZ069 055 -loc11=Imperial\\ (2) K6V1 NEZ069 055 -loc12=Kearney KEAR NEZ061 --- -loc13=Lincoln KLNK NEZ066 057 -loc14=McCook KMCK NEZ081 056 -loc15=Mullen KMHN NEZ007 042 -loc16=Norfolk KOFK NEZ031 042 -loc17=North\\ Platte KLBF NEZ059 --- -loc18=O'Neill KONL NEZ010 042 -loc19=Omaha KOMA NEZ052 057 -loc20=Omaha-Bellevue KOFF NEZ052 057 -loc21=Ord-Sharp KODX NEZ039 --- -loc22=Scottsbluff KBFF NEZ019 041 -loc23=Sidney KSNY NEZ055 055 -loc24=Valentine KVTN NEZ005 042 - -[US_NH] -name=New Hampshire -loc0=Berlin KBML NHZ002 034 -loc1=Concord KCON NHZ008 049 -loc2=Jaffrey KAFN NHZ011 --- -loc3=Keene KEEN NHZ011 049 -loc4=Laconia KLCI NHZ009 049 -loc5=Lebanon KLEB NHZ003 049 -loc6=Manchester KMHT NHZ012 049 -loc7=Mt\\ Washington KMWN ------ 034 -loc8=Nashua KASH NHZ012 --- -loc9=North\\ Conway KCWN ------ --- -loc10=Portsmouth KPSM NHZ013 049 -loc11=Whitefield KHIE ------ --- - -[US_NM] -name=New Mexico -loc0=Alamogordo KHMN NMZ024 --- -loc1=Albuquerque KABQ NMZ009 abq -loc2=Carlsbad KCNM NMZ028 --- -loc3=Clayton KCAO NMZ007 --- -loc4=Clovis-Cannon\\ AFB KCVS NMZ021 --- -loc5=Corona K4CR NMZ016 --- -loc6=Cuba\\ Awrs K4SL NMZ002 --- -loc7=Deming KDMN NMZ031 --- -loc8=Farmington KFMN NMZ001 081 -loc9=Gallup KGUP NMZ008 093 -loc10=Grants KGNT NMZ008 093 -loc11=Hobbs KHOB NMZ029 --- -loc12=Las\\ Vegas KLVS NMZ005 abq -loc13=Los\\ Alamos KLAM NMZ002 081 -loc14=Moriarty K4MY NMZ011 --- -loc15=Roswell KROW NMZ019 --- -loc16=Ruidoso-Sierra\\ Blanca KRUI NMZ016 --- -loc17=Santa\\ Fe KSAF NMZ011 abq -loc18=Silver\\ City KSVC NMZ022 --- -loc19=Socorro KONM NMZ015 --- -loc20=Taos KE23 NMZ004 --- -loc21=Truth\\ or\\ Consequences KTCS NMZ023 --- -loc22=Tucumcari KTCC NMZ013 --- -loc23=Zuni\\ Pueblo KZUN ------ --- - -[US_ND] -name=North Dakota -loc0=Bismark KBIS NDZ035 016 -loc1=Devils\\ Lake KDVL NDZ015 007 -loc2=Devils\\ Lake\\ (2) KP11 NDZ015 007 -loc3=Dickinson KDIK NDZ033 015 -loc4=Fargo KFAR NDZ039 --- -loc5=Grand\\ Forks KGFK NDZ027 007 -loc6=Jamestown KJMS NDZ037 016 -loc7=Lidgerwood KP67 NDZ053 --- -loc8=Minot KMOT NDZ011 007 -loc9=Minot\\ AFB KMIB NDZ011 007 -loc10=Roseglen KP24 NDZ021 --- -loc11=Williston KISN NDZ009 006 - -[US_OK] -name=Oklahoma -loc0=Altus KLTS OKZ036 --- -loc1=Ardmore KADM OKZ046 --- -loc2=Bartlesville KBVO OKZ054 084 -loc3=Clinton KCSM OKZ016 --- -loc4=Enid KEND OKZ012 --- -loc5=Enid/Woodring KWDG OKZ012 084 -loc6=Fort\\ Sill KFSI OKZ038 --- -loc7=Gage KGAG OKZ009 --- -loc8=Guymon KGUY ------ 082 -loc9=Hobart KHBR OKZ035 095 -loc10=Lawton KLAW OKZ038 --- -loc11=McAlester KMLC OKZ073 --- -loc12=Oklahoma\\ City KOKC OKZ025 095 -loc13=Oklahoma\\ City-Bethany KPWA OKZ025 095 -loc14=Oklahoma\\ City-Midwest\\ City KTIK OKZ025 095 -loc15=Page KPGO OKZ076 --- -loc16=Ponca\\ City KPNC OKZ008 084 -loc17=Stillwater KSWO OKZ020 084 -loc18=Tulsa KTUL OKZ060 084 - -[US_SD] -name=South Dakota -loc0=Aberdeen KABR SDZ006 --- -loc1=Brookings KBKX SDZ040 --- -loc2=Chamberlain K9V9 SDZ057 --- -loc3=Custer K0V1 SDZ029 --- -loc4=Huron KHON SDZ038 028 -loc5=Lemmon KY22 SDZ002 --- -loc6=Mitchell KMHE SDZ059 028 -loc7=Mobridge KY26 SDZ009 028 -loc8=Philip KPHP SDZ032 028 -loc9=Pierre KPIR SDZ035 028 -loc10=Rapid\\ City KRAP SDZ031 027 -loc11=Rapid\\ City-Ellsworth\\ AFB KRCA SDZ031 027 -loc12=Redig KREJ SDZ001 --- -loc13=Sioux\\ Falls KFSD SDZ062 043 -loc14=Watertown KATY SDZ020 --- -loc15=Yankton KYKN SDZ069 043 - -[US_UT] -name=Utah -loc0=Blanding K4BL UTZ022 067 -loc1=Bryce\\ Canyon KBCE UTZ020 080 -loc2=Bullfrog KU17 UTZ021 --- -loc3=Cedar\\ City KCDC UTZ016 080 -loc4=Delta KU24 UTZ015 --- -loc5=Dugway KDPG UTZ005 slc -loc6=Eagle\\ Range KU16 ------ --- -loc7=Green\\ River KU28 UTZ013 --- -loc8=Hanksville K4HV UTZ013 067 -loc9=Logan KLGU UTZ001 --- -loc10=Milford KMLF UTZ016 --- -loc11=Ogden KOGD UTZ002 slc -loc12=Ogden-Hill\\ AFB KHIF UTZ002 slc -loc13=Price-Carbon KPUC UTZ012 067 -loc14=Provo KPVU UTZ004 slc -loc15=Roosevelt KU67 UTZ011 --- -loc16=St.\\ George KSGU UTZ019 080 -loc17=Salt\\ Lake\\ City KSLC UTZ003 slc -loc18=Vernal KVEL UTZ024 --- -loc19=Wendover KENV UTZ005 slc - -[US_VT] -name=Vermont -loc0=Ball\\ Mountain K8B3 ------ --- -loc1=Burlington KBTV VTZ005 --- -loc2=Canaan KVT1 ------ --- -loc3=Enosburg\\ Falls K3B8 ------ --- -loc4=Montpelier KMPV VTZ008 034 -loc5=Newport KNPV VTZ003 034 -loc6=Pownal K5B5 ------ --- -loc7=Rutland KRUT VTZ011 --- -loc8=Springfield KVSF VTZ012 --- -loc9=St\\ Johnsbury K9B2 VTZ007 --- -loc10=Waterbury K5B1 ------ --- -loc11=West\\ Burke KVT2 ------ --- -loc12=Wilmington K0B0 VTZ014 049 - -[US_WY] -name=Wyoming -loc0=Big\\ Piney KBPI WYZ020 --- -loc1=Casper KCPR WYZ064 --- -loc2=Cheyenne KCYS WYZ069 --- -loc3=Cody KCOD WYZ002 026 -loc4=Douglas K4DG WYZ059 --- -loc5=Evanston KEVW WYZ021 --- -loc6=Gillette KGCC WYZ054 026 -loc7=Jackson KJAC WYZ006 --- -loc8=Lander KLND WYZ012 040 -loc9=Laramie KLAR WYZ066 --- -loc10=Rawlins KRWL WYZ061 040 -loc11=Riverton KRIW WYZ013 040 -loc12=Rock\\ Springs KRKS WYZ022 --- -loc13=Sheridan KSHR WYZ099 --- -loc14=Worland KWRL WYZ009 026 -loc15=Yellowstone KP60 WYZ001 --- - - -[US_PA] -name=Pennsylvania -loc0=Allentown KABE PAZ061 062 -loc1=Altoona KAOO PAZ025 061 -loc2=Bradford KBFD PAZ005 047 -loc3=Du\\ Bois KDUJ PAZ017 061 -loc4=Erie KERI PAZ002 047 -loc5=Franklin KFKL PAZ008 061 -loc6=Harrisburg KCXY PAZ057 062 -loc7=Johnstown KJST PAZ024 pit -loc8=Lancaster KLNS PAZ066 phl -loc9=Latrobe KLBE PAZ030 pit -loc10=Middletown KMDT PAZ057 062 -loc11=Muir KMUI PAZ058 062 -loc12=Northeast\\ Philadelphia KPNE PAZ071 phl -loc13=Philadelphia KPHL PAZ071 phl -loc14=Philipsburg KPSB PAZ019 061 -loc15=Pittsburgh KPIT PAZ021 pit -loc16=Pittsburgh-West\\ Mifflin KAGC PAZ021 pit -loc17=Reading KRDG PAZ060 phl -loc18=Scranton KAVP PAZ047 062 -loc19=State\\ College KUNV PAZ019 061 -loc20=Wilkes\\ -\\ Barre KAVP PAZ047 062 -loc21=Williamsport KIPT PAZ046 062 - -[US_CA] -name=California -loc0=Alturas KS11 CAZ012 --- -loc1=Arcata KACV CAZ001 --- -loc2=Avalon KAVX ------ --- -loc3=Bakersfield KBFL CAZ021 --- -loc4=Beaumont KBUO CAZ056 --- -loc5=Bicycle\\ Lake KBYS ------ --- -loc6=Bishop KBIH CAZ026 --- -loc7=Blue\\ Canyon KBLU ------ --- -loc8=Blythe KBLH CAZ031 --- -loc9=Burbank KBUR CAZ047 --- -loc10=Camarillo KCMA CAZ040 --- -loc11=Campo KCZZ CAZ058 --- -loc12=Carlsbad KCRQ CAZ043 --- -loc13=Chico KCIC CAZ016 --- -loc14=China\\ Lake KNID CAZ028 --- -loc15=Chino KCNO CAZ048 --- -loc16=Concord KCCR CAZ007 --- -loc17=Crescent\\ City KCEC CAZ001 --- -loc18=Daggett KDAG CAZ028 --- -loc19=Edwards\\ AFB KEDW CAZ025 --- -loc20=El\\ Centro KNJK CAZ033 --- -loc21=El\\ Monte KEMT CAZ047 --- -loc22=Fairfield KSUU CAZ018 --- -loc23=Fresno KFAT CAZ020 078 -loc24=Fresno-Chandler KFCH CAZ020 078 -loc25=Fullerton KFUL CAZ042 --- -loc26=Hawthorne KHHR CAZ041 --- -loc27=Hayward KHWD CAZ007 --- -loc28=Imperial KIPL CAZ033 --- -loc29=Imperial\\ Beach KNRS CAZ043 --- -loc30=Inyokern KIYK CAZ025 --- -loc31=La\\ Verne KPOC CAZ047 --- -loc32=Lake\\ Tahoe KTVL CAZ072 --- -loc33=Lancaster KWJF CAZ059 --- -loc34=Lemoore KNLC CAZ021 --- -loc35=Livermore KLVK CAZ007 --- -loc36=Lompoc KLPC CAZ035 --- -loc37=Long\\ Beach KLGB CAZ041 lax -loc38=Los\\ Angeles KLAX CAZ041 lax -loc39=Mammoth\\ Lakes KMMH CAZ073 --- -loc40=Marysville KMYV CAZ016 --- -loc41=Marysville-Beale\\ AFB KBAB CAZ016 --- -loc42=McClellan KMCC ------ --- -loc43=Merced KMCE CAZ020 --- -loc44=Modesto KMOD CAZ019 --- -loc45=Mojave KMHV CAZ024 --- -loc46=Montague KSIY CAZ011 --- -loc47=Monterey KMRY CAZ009 --- -loc48=Mount\\ Shasta KMHS CAZ011 --- -loc49=Mount\\ Wilson KMWS CAZ047 --- -loc50=Mountain\\ View KNUQ CAZ006 sfo -loc51=Napa KAPC CAZ064 --- -loc52=Needles KEED CAZ029 --- -loc53=Oakland KOAK CAZ007 sfo -loc54=Oceanside KNFG CAZ043 --- -loc55=Ontario KONT CAZ048 lax -loc56=Oxnard KOXR CAZ040 --- -loc57=Palm\\ Springs KPSP CAZ061 --- -loc58=Palmdale KPMD CAZ054 --- -loc59=Palo\\ Alto KPAO CAZ006 sfo -loc60=Paso\\ Robles KPRB CAZ037 --- -loc61=Point\\ Mugu KNTD ------ --- -loc62=Point\\ Piedras\\ Blanca K87Q ------ --- -loc63=Porterville KPTV CAZ021 --- -loc64=Red\\ Bluff KRBL CAZ015 --- -loc65=Redding KRDD CAZ013 --- -loc66=Riverside KRAL CAZ048 --- -loc67=Riverside/March\\ AFB KRIV CAZ061 --- -loc68=Sacramento KSAC CAZ017 --- -loc69=Sacramento-Woodland KSMF CAZ017 --- -loc70=Salinas KSNS CAZ009 --- -loc71=San\\ Carlos KSQL CAZ006 --- -loc72=San\\ Diego KSAN CAZ043 san -loc73=San\\ Diego-Santee KSEE CAZ050 san -loc74=San\\ Diego-Brown KSDM CAZ050 san -loc75=San\\ Diego-Miramar KNKX CAZ043 san -loc76=San\\ Diego-Montgomery KMYF CAZ043 san -loc77=San\\ Diego-North\\ Island KNZY ------ san -loc78=San\\ Francisco KSFO CAZ006 sfo -loc79=San\\ Jose-Santa\\ Clara KSJC CAZ008 sfo -loc80=San\\ Luis\\ Obispo KSBP CAZ034 --- -loc81=San\\ Nicholas\\ Island KNSI CAZ039 --- -loc82=Sandberg KSDB ------ --- -loc83=Santa\\ Ana KSNA CAZ042 lax -loc84=Santa\\ Barbara KSBA CAZ039 lax -loc85=Santa\\ Maria KSMX CAZ035 090 -loc86=Santa\\ Monica KSMO CAZ041 --- -loc87=Santa\\ Rosa KSTS CAZ005 --- -loc88=Shelter\\ Cove KO87 CAZ001 --- -loc89=Stockton KSCK CAZ019 --- -loc90=Tahoe\\ Valley KTVL ------ --- -loc91=Torrance KTOA CAZ042 lax -loc92=Truckee KTRK CAZ072 --- -loc93=Twentynine\\ Palms KNXP CAZ028 --- -loc94=Ukiah KUKI CAZ003 --- -loc95=Van\\ Nuys KVNY CAZ047 --- -loc96=Vandenberg\\ AFB KVBG CAZ039 --- -loc97=Vandenberg\\ Range KVBG CAZ039 --- -loc98=Visalia KVIS CAZ021 --- - -[US_AL] -name=Alabama -loc0=Anniston KANB ALZ019 --- -loc1=Auburn KAUO ALZ047 --- -loc2=Birmingham KBHM ALZ024 019 -loc3=Decatur KDCU ------ --- -loc4=Dothan KDHN ALZ066 --- -loc5=Evergreen KGZH ------ --- -loc6=Gadsden KGAD ALZ018 --- -loc7=Huntsville KHSV ALZ006 --- -loc8=Mobile\\ Regional\\ Airport KMOB ALZ061 --- -loc9=Mobile\\ Downtown KBFM ALZ061 --- -loc10=Montgomery KMGM ALZ044 109 -loc11=Montgomery-Maxwell\\ AFB KMXF ALZ044 109 -loc12=Muscle\\ Shoals KMSL ALZ002 --- -loc13=Ozark KOZR ALZ066 --- -loc14=Tuscaloosa KTCL ALZ023 --- - -[US_AZ] -name=Arizona -loc0=Casa\\ Granda KCGZ AZZ028 --- -loc1=Chandler KIWA AZZ015 --- -loc2=Douglas KDUG AZZ030 --- -loc3=Flagstaff KFLG AZZ015 092 -loc4=Fort\\ Huachuca KFHU AZZ035 --- -loc5=Gila\\ Bend KGBN AZZ027 --- -loc6=Grand\\ Canyon KGCN AZZ006 --- -loc7=Kingman KIGM AZZ003 --- -loc8=Mesa-Falcon\\ Field KFFZ AZZ023 --- -loc9=Nogales K13A AZZ034 --- -loc10=Page KPGA AZZ005 --- -loc11=Payson K0E4 AZZ018 --- -loc12=Phoenix KPHX AZZ023 phx -loc13=Phoenix-Deer\\ Valley KDVT AZZ023 phx -loc14=Phoenix-Goodyear KGYR AZZ023 phx -loc15=Phoenix-Luke\\ AFB KLUF AZZ023 phx -loc16=Prescott KPRC AZZ008 --- -loc17=Safford-Municipal\\ Airport KSAD AZZ030 --- -loc18=Scottsdale KSDL AZZ023 --- -loc19=Show\\ Low KSOW AZZ017 --- -loc20=Tucson KTUS AZZ033 103 -loc21=Tucson-Davis\\ AFB KDMA AZZ033 103 -loc22=Winslow KINW AZZ013 --- -loc23=Yuma\\ MCAS KNYL AZZ025 --- - -[US_CO] -name=Colorado -loc0=Air\\ Force KAFF COZ071 --- -loc1=Akron KAKO COZ049 --- -loc2=Alamosa KALS COZ063 --- -loc3=Aspen KASE COZ010 068 -loc4=Colorado\\ Springs KCOS COZ071 --- -loc5=Cortez KCEZ COZ021 --- -loc6=Craig KCAG COZ002 --- -loc7=Denver KDEN COZ040 den -loc8=Denver-Aurora KAPA COZ040 den -loc9=Denver-Broomfield KBKF COZ040 den -loc10=Denver-Cherry\\ Knolls KBJC COZ040 den -loc11=Durango KDRO COZ022 --- -loc12=Durango\\ Awrs K4V5 COZ022 --- -loc13=Eagle KEGE COZ010 --- -loc14=Fort\\ Carson KFCS COZ071 --- -loc15=Fort\\ Collins KFCL COZ035 --- -loc16=Fort\\ Collins/Lovel KFNL COZ035 --- -loc17=Grand\\ Junction KGJT COZ006 --- -loc18=Greeley KGXY COZ043 --- -loc19=Gunnison KGUC COZ012 --- -loc20=Gunnison\\ (2) K2V9 COZ012 --- -loc21=Hayden KHDN COZ005 --- -loc22=La\\ Junta KLHX COZ076 --- -loc23=Lamar K4LJ COZ080 --- -loc24=Leadville KLXV COZ012 --- -loc25=Limon KLIC COZ047 --- -loc26=Montrose KMTJ COZ017 --- -loc27=Montrose\\ (2) K6V8 COZ017 --- -loc28=Pueblo KPUB COZ073 --- -loc29=Rifle K1V1 COZ003 --- -loc30=Salida KS29 COZ069 --- -loc31=Salida-Harriet K0V2 COZ069 --- -loc32=Steamboat\\ Springs KSBS COZ005 --- -loc33=Trinidad KTAD COZ077 --- -loc34=Winter\\ Park KC96 COZ033 --- - -[US_CT] -name=Connecticut -loc0=Bridgeport KBDR CTZ009 hfd -loc1=Danbury KDXR CTZ009 --- -loc2=Groton KGON CTZ012 hfd -loc3=Hartford KHFD CTZ002 hfd -loc4=New\\ Haven KHVN CTZ010 --- -loc5=Oxford KOXC CTZ010 --- -loc6=Windsor\\ Locks KBDL CTZ002 --- - -[US_DE] -name=Delaware -loc0=Dover KDOV DEZ002 076 -loc1=Wilmington KILG DEZ001 076 - -[US_FL] -name=Florida -loc0=Apalachicola KAQQ FLZ015 --- -loc1=Bartow KBOW ------ --- -loc2=Brooksville KBKV FLZ048 --- -loc3=Cecil\\ NAS KNZC FLZ025 --- -loc4=Cocoa\\ Beach KCOF FLZ047 --- -loc5=Crestview KCEW FLZ006 --- -loc6=Cross\\ City KCTY FLZ034 --- -loc7=Daytona\\ Beach KDAB FLZ041 --- -loc8=Destin KDTS ------ --- -loc9=Eglin KEGI FLZ006 --- -loc10=Fort\\ Lauderdale\\ (International) KFLL FLZ072 --- -loc11=Fort\\ Lauderdale KFXE FLZ072 --- -loc12=Fort\\ Myers\\ (Page\\ Field) KFMY FLZ065 --- -loc13=Fort\\ Myers\\ (Southwest\\ Florida\\ International) KRSW FLZ065 --- -loc14=Gainesville KGNV FLZ036 --- -loc15=Homestead\\ AFB KHST FLZ074 --- -loc16=Hurlburt KHRT ------ --- -loc17=Jacksonville KJAX FLZ025 --- -loc18=Jacksonville\\ NAS KNIP FLZ025 --- -loc19=Jacksonville-Craig\\ Airport KCRG FLZ025 --- -loc20=Key\\ West KEYW FLZ075 --- -loc21=Key\\ West\\ NAS KNQX FLZ075 --- -loc22=Lakeland KLAL FLZ052 --- -loc23=Leesburg KLEE ------ --- -loc24=Marathon KMTH FLZ075 --- -loc25=Marianna KMAI FLZ011 --- -loc26=Mayport KNRB FLZ025 --- -loc27=Melbourne KMLB FLZ047 --- -loc28=Miami KMIA FLZ074 mia -loc29=Miami-Kendall KTMB FLZ074 mia -loc30=Miami-Opa\\ Locka KOPF FLZ074 mia -loc31=Milton KNSE FLZ004 --- -loc32=Nasa\\ Shuttle KTTS ------ --- -loc33=Naples KAPF FLZ069 --- -loc34=New\\ Port\\ Richey KRRF FLZ051 --- -loc35=Ocala KOCF FLZ040 --- -loc36=Orlando KORL FLZ045 --- -loc37=Orlando\\ (Orlando\\ International) KMCO FLZ045 --- -loc38=Panama\\ City KPFN FLZ012 --- -loc39=Pensacola KPNS FLZ002 --- -loc40=Pensacola\\ NAS KNPA FLZ002 --- -loc41=Perry-Foley K40J ------ --- -loc42=Pompano\\ Beach KPMP ------ --- -loc43=Punta\\ Gorda KPGD ------ --- -loc44=Sanford KSFB FLZ046 --- -loc45=Sarasota KSRQ FLZ060 --- -loc46=St\\ Petersburg KSPG FLZ050 --- -loc47=St\\ Petersburg\\ /\\ Clearwater KPIE FLZ050 --- -loc48=Tallahassee KTLH FLZ017 --- -loc49=Tampa KTPA FLZ051 --- -loc50=Tampa-Macdill\\ AFB KMCF FLZ051 --- -loc51=Titusville KTIX FLZ047 --- -loc52=Tyndall\\ AFB KPAM ------ --- -loc53=Valparaiso KVPS FLZ006 --- -loc54=Valparaiso-Eglin\\ AFB KEGI FLZ006 --- -loc55=Vero\\ Beach KVRB FLZ054 --- -loc56=West\\ Palm\\ Beach KPBI FLZ068 --- -loc57=Winter\\ Haven KGIF ------ --- - -[US_GA] -name=Georgia -loc0=Albany KABY GAZ125 --- -loc1=Alma KAMG GAZ134 --- -loc2=Athens KAHN GAZ036 atl -loc3=Atlanta KATL GAZ033 atl -loc4=Augusta KAGS GAZ065 --- -loc5=Brunswick KSSI GAZ154 --- -loc6=Columbus KCSG GAZ089 --- -loc7=Columbus-Fort\\ Benning KLSF GAZ089 --- -loc8=Dekalb/Peachtree KPDK ------ --- -loc9=Hinesville KLHW ------ --- -loc10=Fort\\ Benning KLSF GAZ090 --- -loc11=Fort\\ Stewart KLHW GAZ138 --- -loc12=Macon KMCN GAZ082 --- -loc13=Marietta KMGE GAZ032 --- -loc14=Moultrie KMGR ------ --- -loc15=Rome-Russell KRMG GAZ019 atl -loc16=Savannah KSAV GAZ119 --- -loc17=Savannah-Hunter\\ AAF KSVN GAZ119 --- -loc18=St\\ Simon's\\ Island KSSI GAZ154 --- -loc19=Valdosta KVLD GAZ160 --- -loc20=Valdosta-Moody\\ AFB KVAD GAZ160 --- -loc21=Warner\\ Robins KWRB GAZ095 --- -loc22=West\\ Atlanta KFTY GAZ033 --- -loc23=Waycross KAYS GAZ151 --- - -[US_HI] -name=Hawaii -loc0=Barbers\\ Point PHNA HIZ002 --- -loc1=Barking\\ Sand PHBK ------ --- -loc2=Bradshaw\\ Field PHSF ------ --- -loc3=Hilo PHTO HIZ004 --- -loc4=Honolulu PHNL HIZ002 --- -loc5=Kahului PHOG HIZ003 --- -loc6=Kailua-Kona PHKO HIZ002 --- -loc7=Kaneohe PHNG HIZ002 --- -loc8=Lahaina PHJH HIZ003 --- -loc9=Lanai PHNY HIZ003 --- -loc10=Lihue PHLI HIZ001 --- -loc11=Molokai PHMK HIZ005 --- -loc12=Oahu PHHI HIZ002 --- - -[US_IL] -name=Illinois -loc0=Alton KALN ILZ100 --- -loc1=Aurora KARR ILZ013 --- -loc2=Belleville KBLV ILZ101 --- -loc3=Bloomington KBMI ILZ038 --- -loc4=Cairo KCIR ILZ092 --- -loc5=Carbondale KMDH ILZ084 --- -loc6=Champaign KCMI ILZ045 059 -loc7=Chicago-DuPage KDPA ILZ014 ord -loc8=Chicago-O'Hare KORD ILZ013 ord -loc9=Chicago-Lakefront KCGX ILZ014 ord -loc10=Chicago-Midway KMDW ILZ014 ord -loc11=Danville KDNV ILZ046 --- -loc12=Decatur KDEC ILZ053 --- -loc13=East\\ St\\ Louis KCPS ILZ101 --- -loc14=Galesburg KGBG ILZ027 --- -loc15=Marion KMWA ILZ085 --- -loc16=Marseilles KMMO ILZ019 --- -loc17=Mattoon KMTO ILZ056 --- -loc18=Moline-Quad\\ Cities KMLI ILZ015 --- -loc19=Mount\\ Vernon KMVN ILZ075 --- -loc20=Peoria KPIA ILZ029 --- -loc21=Quincy KUIN ILZ095 --- -loc22=Rockford KRFD ILZ003 --- -loc23=Salem KSLO ILZ070 --- -loc24=Springfield KSPI ILZ051 --- - -[US_IN] -name=Indiana -loc0=Bloomington KBMG INZ062 --- -loc1=Elkhart KEKM INZ005 --- -loc2=Evansville KEVV INZ086 --- -loc3=Fort\\ Wayne KFWA INZ018 --- -loc4=Gary KGYY INZ001 --- -loc5=Indianapolis KIND INZ047 --- -loc6=Lafayette KLAF INZ029 --- -loc7=Marion KMZZ ------ --- -loc8=Muncie KMIE INZ041 --- -loc9=Peru KGUS INZ023 --- -loc10=South\\ Bend KSBN INZ004 --- -loc11=Terre\\ Haute KHUF INZ051 --- - -[US_MD] -name=Maryland -loc0=Aberdeen KAPG ------ --- -loc1=Andrews\\ AFB KADW MDZ013 --- -loc2=Baltimore KMTN MDZ011 dca -loc3=Baltimore-Glen\\ Burnie KBWI MDZ014 dca -loc4=Cumberland KCBE ------ --- -loc5=Fort\\ Meade KFME MDZ014 --- -loc6=Hagerstown KHGR MDZ003 --- -loc7=Oakland K2G4 ------ 075 -loc8=Patuxent\\ River KNHK MDZ014 --- -loc9=Salisbury KSBY MDZ022 --- - -[US_MI] -name=Michigan -loc0=Ann\\ Arbor KARB MIZ075 dtw -loc1=Alpena KAPN MIZ024 --- -loc2=Battle\\ Creek KBTL MIZ073 --- -loc3=Benton\\ Harbor KBEH ------ --- -loc4=Chippewa\\ County KCIU MIZ008 --- -loc5=Copper\\ Harbor KP59 MIZ003 --- -loc6=Detroit KDET MIZ076 dtw -loc7=Detroit-Taylor KDTW MIZ076 dtw -loc8=Detroit/Ypsilanti KYIP MIZ075 dtw -loc9=Escanaba KESC MIZ013 --- -loc10=Flint KFNT MIZ061 dtw -loc11=Grand\\ Rapids KGRR MIZ057 --- -loc12=Hancock KCMX MIZ003 --- -loc13=Harbor\\ Beach KP58 MIZ049 --- -loc14=Houghton\\ Lake KHTL MIZ034 --- -loc15=Iron\\ Mountain KIMT MIZ011 --- -loc16=Ironwood KIWD MIZ009 --- -loc17=Jackson KJXN MIZ074 dtw -loc18=Kalamazoo KAZO MIZ072 045 -loc19=Lansing KLAN MIZ066 --- -loc20=Manistee KMBL MIZ031 --- -loc21=Menominee KMNM MIZ012 --- -loc22=Mount\\ Clemens KMTC MIZ070 --- -loc23=Muskegon KMKG MIZ050 --- -loc24=Oscoda KOSC MIZ036 --- -loc25=Pellston KPLN MIZ016 --- -loc26=Pontiac KPTK MIZ069 --- -loc27=Saginaw KMBS MIZ053 --- -loc28=Sault\\ Ste\\ Marie KSSM MIZ008 --- -loc29=Sawyer\\ AFB KSAW MIZ077 --- -loc30=Seul\\ Choix\\ Pt KP75 ------ --- -loc31=Traverse\\ City KTVC MIZ020 --- -loc32=Ypsilanti KYIP MIZ075 dtw - -[US_MN] -name=Minnesota -loc0=Alexandria KAXN MNZ041 --- -loc1=Bemidji KBJI MNZ009 --- -loc2=Brainerd KBRD MNZ034 --- -loc3=Detroit\\ Lakes KDTL MNZ027 --- -loc4=Duluth KDLH MNZ019 --- -loc5=Ely KELO MNZ019 --- -loc6=Fairmont KFRM MNZ091 --- -loc7=Fergus\\ Falls KFFM MNZ031 --- -loc8=Grand\\ Marais KP61 MNZ021 --- -loc9=Grand\\ Rapids KGPZ MNZ026 --- -loc10=Hibbing KHIB MNZ019 --- -loc11=International\\ Falls KINL MNZ010 --- -loc12=Litchfield KY69 MNZ058 --- -loc13=Mankato KMKT MNZ083 --- -loc14=Marshall KMML MNZ072 --- -loc15=Minneapolis KMSP MNZ060 msp -loc16=Minneapolis\\ [2] KFCM MNZ060 msp -loc17=Minneapolis\\ [3] KMIC MNZ060 msp -loc18=Pequot\\ Lakes KP39 MNZ034 --- -loc19=Redwood\\ Falls KRWF MNZ073 --- -loc20=Rochester KRST MNZ087 030 -loc21=St\\ Cloud KSTC MNZ051 --- -loc22=St\\ Paul KSTP MNZ062 --- -loc23=Thief\\ River\\ Falls KTVF MNZ013 --- -loc24=Warroad KD45 MNZ005 --- -loc25=Worthington KOTG MNZ089 --- - -[US_NV] -name=Nevada -loc0=Austin KU31 NVZ012 --- -loc1=Battle\\ Mountain KBAM NVZ012 --- -loc2=Caliente KP38 NVZ015 --- -loc3=Desert\\ Rock KDRA ------ --- -loc4=Elko KEKO NVZ008 --- -loc5=Ely KELY NVZ011 --- -loc6=Eureka KP68 NVZ012 --- -loc7=Fallon KNFL NVZ004 --- -loc8=Hawthorne KHTH NVZ001 --- -loc9=Indian\\ Springs KL63 NVZ017 --- -loc10=Las\\ Vegas KLAS NVZ020 079 -loc11=N\\ Las\\ Vegas KLSV NVZ020 079 -loc12=Lovelock KLOL NVZ004 --- -loc13=Owyhee KOWY NVZ007 --- -loc14=Reno KRNO NVZ003 065 -loc15=Tonopah KTPH NVZ014 --- -loc16=Winnemucca KWMC NVZ006 --- - -[US_NJ] -name=New Jersey -loc0=Atlantic\\ City KACY NJZ022 --- -loc1=Belmar-Farmingdale KBLM NJZ013 --- -loc2=Caldwell KCDW NJZ005 --- -loc3=Lakehurst KNEL ------ --- -loc4=Millville KMIV NJZ021 --- -loc5=Morristown KMMU NJZ008 --- -loc6=Mount\\ Holly KVAY ------ --- -loc7=Newark KEWR NJZ005 --- -loc8=Teterboro KTEB NJZ003 --- -loc9=Trenton KTTN NJZ015 --- -loc10=Wildwood KWWD NJZ024 --- -loc11=Wrightstown\\ /\\ Mcguire\\ AFB KWRI NJZ019 --- - -[US_NC] -name=North Carolina -loc0=Asheville KAVL NCZ053 --- -loc1=Cape\\ Hatteras KHAT NCZ047 --- -loc2=Charlotte KCLT NCZ071 100 -loc3=Cherry\\ Point KNKT ------ --- -loc4=Elizabeth\\ City KECG NCZ016 --- -loc5=Fayetteville KFAY NCZ088 100 -loc6=Fort\\ Bragg KFBG NCZ088 --- -loc7=Goldsboro KGSB NCZ078 --- -loc8=Greensboro KGSO NCZ022 rdu -loc9=Hickory KHKY NCZ056 --- -loc10=Hoffman KHFF ------ --- -loc11=Hot\\ Springs KHSS NCZ048 --- -loc12=Jacksonville KOAJ NCZ098 --- -loc13=Kinston KISO NCZ091 --- -loc14=New\\ Bern KEWN NCZ093 --- -loc15=New\\ River KNCA NCZ098 --- -loc16=Pope\\ AFB KPOB NCZ088 --- -loc17=Raleigh-Durham KRDU NCZ041 rdu -loc18=Rocky\\ Mount KRWI NCZ028 rdu -loc19=Stumpy\\ Point K2DP ------ --- -loc20=Wilmington KILM NCZ101 --- -loc21=Winston-Salem KINT NCZ021 --- - -[US_OH] -name=Ohio -loc0=Akron KCAK OHZ021 --- -loc1=Cincinnati KLUK OHZ077 074 -loc2=Cleveland KCLE OHZ011 cle -loc3=Cleveland-Lakefront KBKL OHZ011 cle -loc4=Cleveland/Cuyahoga KCGF OHZ011 cle -loc5=Columbus-Gahanna KCMH OHZ055 --- -loc6=Columbus-OSU KOSU OHZ055 --- -loc7=Dayton KDAY OHZ061 074 -loc8=Dayton-Fairborn KFFO OHZ061 --- -loc9=Dayton-South\\ Airport KMGY OHZ061 --- -loc10=Findlay KFDY OHZ017 --- -loc11=Hamilton KHAO OHZ070 --- -loc12=Lancaster KLHQ OHZ067 --- -loc13=Mansfield KMFD OHZ029 --- -loc14=Rickenbacker KLCK OHZ070 --- -loc15=Toledo KTOL OHZ003 --- -loc16=Willoughby KLNN OHZ012 --- -loc17=Wilmington KILN OHZ072 --- -loc18=Wooster KBJJ OHZ031 --- -loc19=Youngstown KYNG OHZ033 --- -loc20=Zanesville KZZV OHZ057 --- - -[US_OR] -name=Oregon -loc0=Astoria KAST ORZ001 --- -loc1=Aurora K3S2 ORZ005 --- -loc2=Baker\\ City KBKE ORZ020 --- -loc3=Brookings K4BK ORZ003 --- -loc4=Burns KBNO ORZ022 --- -loc5=Cascade KCZK ORZ015 --- -loc6=Eugene KEUG ORZ006 --- -loc7=Hillsboro KHIO ORZ004 --- -loc8=Klamath\\ Falls KLMT ORZ012 --- -loc9=Lakeview K4LW ORZ015 --- -loc10=Meacham KMEH ORZ017 --- -loc11=Medford KMFR ORZ008 --- -loc12=Newport KONP ORZ002 --- -loc13=North\\ Bend KOTH ORZ003 --- -loc14=Ontario KONO ORZ021 --- -loc15=Pendleton KPDT ORZ017 --- -loc16=Portland KPDX ORZ004 --- -loc17=Redmond KRDM ORZ014 --- -loc18=Roseburg KRBG ORZ007 --- -loc19=Salem KSLE ORZ005 --- -loc20=Sexton\\ Summit KSXT ORZ008 --- -loc21=The\\ Dalles KDLS ORZ010 --- -loc22=Troutdale KTTD ORZ004 --- - -[US_RI] -name=Rhode Island -loc0=Block\\ Island KBID RIZ006 --- -loc1=North\\ Kingstown KOQU RIZ006 --- -loc2=Providence KPVD RIZ002 bos - -[US_SC] -name=South Carolina -loc0=Anderson KAND SCZ010 099 -loc1=Beaufort KNBC SCZ048 --- -loc2=Charleston KCHS SCZ050 --- -loc3=Columbia KCAE SCZ028 100 -loc4=Columbia-McEntire KMMT SCZ028 100 -loc5=Florence KFLO SCZ032 --- -loc6=Greenville KGMU SCZ006 099 -loc7=Greenville-Spartanburg KGSP SCZ007 099 -loc8=Myrtle\\ Beach KMYR SCZ034 --- -loc9=N\\ Myrtle\\ Beach KCRE SCZ034 --- -loc10=Sumter KSSC SCZ031 --- -loc11=Sumter\\ (2) K2PJ SCZ031 --- - -[US_TN] -name=Tennessee -loc0=Bristol KTRI TNZ017 --- -loc1=Chattanooga KCHA TNZ099 --- -loc2=Crossville KCSV TNZ066 --- -loc3=Dyersburg KDYR TNZ019 --- -loc4=Jackson KMKL TNZ052 --- -loc5=Knoxville KTYS TNZ069 087 -loc6=Knoxville-Downtown KDKX TNZ069 087 -loc7=Memphis KMEM TNZ088 097 -loc8=Memphis-NAS KNQA TNZ088 097 -loc9=Nashville KBNA TNZ027 --- -loc10=Smyrna KMQY TNZ062 --- - -[US_TX] -name=Texas -loc0=Abilene KABI TXZ127 --- -loc1=Alice KALI TXZ241 --- -loc2=Amarillo KAMA TXZ017 --- -loc3=Angleton KLBX ------ --- -loc4=Arlington KF54 TXZ119 --- -loc5=Austin KAUS TXZ192 113 -loc6=Beaumont-Port\\ Arthur KBPT TXZ215 --- -loc7=Bergstrom\\ AFB KBSM TXZ192 --- -loc8=Borger KBGD TXZ008 --- -loc9=Brownsville KBRO TXZ255 --- -loc10=Burnet KBMQ ------ --- -loc11=Childress KCDS TXZ026 --- -loc12=College\\ Station KCLL TXZ196 --- -loc13=Conroe KCXO ------ --- -loc14=Corpus\\ Christi KCRP TXZ243 --- -loc15=Corpus\\ Christi\\ NAS KNGP TXZ243 --- -loc16=Corsicana KCRS TXZ146 --- -loc17=Cotulla KCOT TXZ229 119 -loc18=Dalhart KDHT TXZ001 --- -loc19=Dallas-Addison KADS TXZ119 --- -loc20=Dallas-Fort\\ Worth KDFW TXZ119 --- -loc21=Dallas-Love\\ Field KDAL TXZ119 --- -loc22=Dallas-Redbird KRBD TXZ119 --- -loc23=Del\\ Rio KDRT TXZ183 --- -loc24=Denton KDTO ------ --- -loc25=El\\ Paso KELP TXZ055 --- -loc26=Fort\\ Stockton KFST TXZ075 --- -loc27=Fort\\ Worth-Meacham KFTW TXZ118 --- -loc28=Fort\\ Worth\\ NAS KNFW TXZ118 --- -loc29=Fort\\ Worth-Alliance KAFW TXZ118 --- -loc30=Galveston KGLS TXZ238 --- -loc31=Georgetown KGTU TXZ173 --- -loc32=Greenville KGVT ------ --- -loc33=Guadalupe\\ Pass KGDP TXZ234 --- -loc34=Harlingen KHRL TXZ255 --- -loc35=Hondo KHDO TXZ204 --- -loc36=Houston-Bush KIAH TXZ213 hou -loc37=Houston-Hooks KDWH TXZ213 hou -loc38=Houston-Ellington\\ Field KEFD TXZ213 hou -loc39=Houston-Clover KT02 TXZ213 hou -loc40=Houston-Hobby KHOU TXZ213 hou -loc41=Huntsville KUTS ------ --- -loc42=Junction KJCT TXZ169 --- -loc43=Killeen KILE TXZ158 113 -loc44=Killeen-Ft\\ Hood KHLR TXZ158 113 -loc45=Killeen-Gray\\ AAF KGRK TXZ158 113 -loc46=Kingsville KNQI TXZ242 --- -loc47=Laredo KLRD TXZ239 --- -loc48=Laughlin KDLF ------ --- -loc49=Longview KGGG TXZ138 --- -loc50=Lubbock KLBB TXZ035 --- -loc51=Lufkin KLFK TXZ165 --- -loc52=Mc\\ Gregor KPWG ------ --- -loc53=McAllen KMFE TXZ253 --- -loc54=Midland KMAF TXZ062 --- -loc55=Mineral\\ Wells KMWL TXZ117 --- -loc56=Nacogdoches KOCH TXZ152 --- -loc57=New\\ Braunfels K3R5 TXZ207 --- -loc58=Palacios KPSX TXZ236 --- -loc59=Paris KPRX TXZ095 --- -loc60=Randolph\\ AFB KRND ------ --- -loc61=Rockport KRKP TXZ245 --- -loc62=Sabine\\ Pass KRPE ------ --- -loc63=San\\ Angelo KSJT TXZ072 --- -loc64=San\\ Antonio KSAT TXZ205 119 -loc65=San\\ Antonio-Kelly\\ AFB KSKF TXZ205 119 -loc66=San\\ Antonio-Stinson KSSF TXZ205 119 -loc67=Sanderson KP07 TXZ082 --- -loc68=Sherman-Denison KF39 TXZ093 --- -loc69=Temple KTPL TXZ158 --- -loc70=Terrell KTRL ------ --- -loc71=Tyler KTYR TXZ136 --- -loc72=Victoria KVCT TXZ234 --- -loc73=Waco KACT TXZ159 --- -loc74=Wichita\\ Falls KSPS TXZ086 --- -loc75=Wink KINK TXZ060 --- - -[US_VA] -name=Virginia -loc0=Abingdon KVJI VAZ008 --- -loc1=Ashland KOFP VAZ063 --- -loc2=Charlottesville KCHO VAZ037 --- -loc3=Danville KDAN VAZ044 --- -loc4=Dublin KPSK VAZ013 --- -loc5=Farmville KFVX VAZ061 --- -loc6=Fort\\ Belvoir KDAA VAZ053 --- -loc7=Fort\\ Eustis KFAF ------ --- -loc8=Franklin KFKN VAZ092 --- -loc9=Galax-Hillsville KHLX VAZ016 --- -loc10=Hampton KLFI VAZ094 --- -loc11=Hot\\ Springs KHSP VAZ020 --- -loc12=Langley\\ AFB KLFI VAZ094 --- -loc13=Leesburg KJYO VAZ042 --- -loc14=Lynchburg KLYH VAZ045 --- -loc15=Manassas KHEF VAZ052 --- -loc16=Marion-Wytheville KMKJ VAZ009 --- -loc17=Martinsville KMTV VAZ043 --- -loc18=Melfa KMFV VAZ099 --- -loc19=Newport\\ News KPHF VAZ093 --- -loc20=Norfolk KORF VAZ093 089 -loc21=Norfolk\\ NAS KNGU VAZ093 089 -loc22=Petersburg KPTB VAZ081 --- -loc23=Quantico KNYG VAZ052 --- -loc24=Richmond KRIC VAZ071 089 -loc25=Roanoke KROA VAZ022 --- -loc26=Shannon KEZF ------ --- -loc27=Staunton KSHD VAZ025 --- -loc28=Virginia\\ Beach KNTU VAZ098 --- -loc29=Virginia\\ Tech\\ Airport KBCB VAZ014 --- -loc30=Wakefield KAKQ VAZ088 --- -loc31=Wallops\\ Island KWAL ------ --- -loc32=Waynesboro KSHD VAZ025 --- -loc33=Winchester KOKV VAZ028 --- -loc34=Wise KLNP VAZ002 --- - -[US_WV] -name=West Virginia -loc0=Beckley KBKW WVZ035 --- -loc1=Bluefield KBLF WVZ042 --- -loc2=Charleston KCRW WVZ015 074 -loc3=Clarksburg KCKB WVZ031 --- -loc4=Elkins KEKN WVZ047 --- -loc5=Huntington KHTS WVZ006 --- -loc6=Lewisburg KLWB WVZ045 --- -loc7=Martinsburg KMRB WVZ052 --- -loc8=Morgantown KMGW WVZ022 075 -loc9=Parkersburg KPKB WVZ009 --- -loc10=Wheeling KHLG WVZ004 --- -loc11=White\\ Sulphur KSSU WVZ045 --- - -[US_WI] -name=Wisconsin -loc0=Antigo KAIG WIZ019 --- -loc1=Appleton KATW WIZ038 --- -loc2=Eau\\ Claire KEAU WIZ028 --- -loc3=Fond\\ Du\\ Lac KFLD WIZ051 --- -loc4=Green\\ Bay KGRB WIZ039 --- -loc5=Hayward KHYR WIZ008 --- -loc6=Janesville KJVL WIZ069 --- -loc7=Kenosha KENW WIZ072 --- -loc8=La\\ Crosse KLSE WIZ041 --- -loc9=Lone\\ Rock KLNR WIZ055 --- -loc10=Madison KMSN WIZ063 045 -loc11=Manitowoc KMTW WIZ050 --- -loc12=Marshfield KMFI WIZ035 --- -loc13=Milwaukee KMKE WIZ066 045 -loc14=Milwaukee-Timmerman KMWC WIZ066 045 -loc15=Minocqua KARV WIZ010 --- -loc16=Mosinee KCWA WIZ030 --- -loc17=Oshkosh KOSH WIZ048 --- -loc18=Phillips KPBH WIZ009 --- -loc19=Rhinelander KRHI WIZ010 --- -loc20=Sheboygan KSBM WIZ052 045 -loc21=Sturgeon\\ Bay KSUE WIZ022 --- -loc22=Superior KSUW WIZ001 --- -loc23=Volk\\ Field KVOK ------ --- -loc24=Waukesha KUES WIZ065 --- -loc25=Wausau KAUW WIZ030 --- -loc26=Wisconsin\\ Rapids KISW WIZ035 --- - - -[US_MA] -name=Massachusetts -loc0=Ashburnam K9B4 ------ --- -loc1=Ashfield K2B5 ------ --- -loc2=Bedford KBED MAZ005 --- -loc3=Beverly KBVY MAZ007 --- -loc4=Boston KBOS MAZ015 bos -loc5=Chatham KCQX MAZ022 bos -loc6=Chicopee\\ Falls KCEF ------ --- -loc7=Falmouth-Otis\\ AFB KFMH MAZ022 --- -loc8=Fitchburg KFIT ------ --- -loc9=Hyannis KHYA MAZ022 --- -loc10=Lawrence KLWM MAZ007 --- -loc11=Marthas\\ Vineyard KMVY MAZ023 --- -loc12=Nantucket KACK MAZ024 --- -loc13=New\\ Bedford KEWB MAZ017 --- -loc14=North\\ Adams K2B6 MAZ001 --- -loc15=Norwood KOWD MAZ013 --- -loc16=Orange KORE ------ --- -loc17=Plymouth KPYM MAZ018 --- -loc18=Provincetown KPVC ------ --- -loc19=Taunton K9B0 ------ --- -loc20=Westfield KBAF MAZ011 --- -loc21=Worcester KORH MAZ012 bos - -[US_NY] -name=New York -loc0=Albany KALB NYZ052 048 -loc1=Binghamton KBGM NYZ056 --- -loc2=Buffalo KBUF NYZ010 047 -loc3=Elmira KELM NYZ024 --- -loc4=Farmingdale KFRG NYZ077 --- -loc5=Fort\\ Drum KGTB NYZ007 --- -loc6=Glens\\ Falls KGFL NYZ042 --- -loc7=Griffiss\\ AFB KRME ------ --- -loc8=Islip KISP NYZ080 --- -loc9=Ithaca KITH NYZ025 048 -loc10=Jamestown KJHW NYZ019 047 -loc11=Massena KMSS NYZ026 --- -loc12=Montgomery KMGJ NYZ067 --- -loc13=Monticello KMSV NYZ062 --- -loc14=New\\ York-JFK\\ Arpt KJFK NYZ076 lga -loc15=New\\ York-La\\ Guardia KLGA NYZ076 lga -loc16=Newburgh KSWF NYZ067 --- -loc17=Niagara\\ Falls KIAG NYZ001 047 -loc18=Ogdensburg KOGS NYZ026 --- -loc19=Penn\\ Yan KPEO ------ --- -loc20=Plattsburg KPBG NYZ031 --- -loc21=Poughkeepsie KPOU NYZ065 --- -loc22=Rochester KROC NYZ003 047 -loc23=Saranac\\ Lake KSLK NYZ027 --- -loc24=Schenectady KSCH NYZ049 --- -loc25=Syracuse KSYR NYZ018 048 -loc26=Utica KUCA NYZ037 --- -loc27=Watertown KART NYZ007 --- -loc28=Westhampton KFOK NYZ080 --- -loc29=White\\ Plains KHPN NYZ070 --- - -[US_WA] -name=Washington -loc0=Bellingham KBLI WAZ002 --- -loc1=Bremerton KPWT WAZ010 --- -loc2=Burlington K75S WAZ005 --- -loc3=Colville K63S WAZ035 --- -loc4=Ephrata KEPH WAZ033 --- -loc5=Everett KPAE WAZ006 sea -loc6=Fairchild KSKA ------ --- -loc7=Fort\\ Lewis KGRF WAZ008 --- -loc8=Friday\\ Harbor KFHR WAZ001 --- -loc9=Hoquiam KHQM WAZ016 --- -loc10=Moses\\ Lake KMWH WAZ033 --- -loc11=Oak\\ Harbor K76S WAZ009 --- -loc12=Olympia KOLM WAZ008 sea -loc13=Omak K4OM WAZ038 --- -loc14=Pasco KPSC WAZ028 --- -loc15=Port\\ Angeles KCLM WAZ013 --- -loc16=Pullman KPUW WAZ032 --- -loc17=Quillayute KUIL ------ --- -loc18=Renton KRNT WAZ007 --- -loc19=Seattle KSEA WAZ007 sea -loc20=Seattle-Boeing KBFI WAZ007 sea -loc21=Shelton KSHN WAZ010 --- -loc22=Spokane KGEG WAZ034 002 -loc23=Spokane-Parkwater KSFF WAZ034 002 -loc24=Stampede\\ Pass KSMP ------ --- -loc25=Tacoma KTIW WAZ007 sea -loc26=Tacoma-Lakewood KTCM WAZ007 sea -loc27=Toledo KTDO WAZ020 --- -loc28=Walla\\ Walla KALW WAZ029 --- -loc29=Wenatchee KEAT WAZ038 --- -loc30=Whidbey\\ Island KNUW WAZ009 --- -loc31=Yakima KYKM WAZ025 --- - -[CA] -name=Canada -states=AB BC MB NB NF NS NT ON QC SK YK - -[CA_AB] -name=Alberta -loc0=Calgary CYYC ------ --- -loc1=Edmonton CYEG ------ --- -loc2=Edmonton/Villeneuve CZVL ------ --- - -[CA_BC] -name=British Columbia -loc0=Abbotsford CYXX ------ --- -loc1=Comox CYQQ ------ --- -loc2=Port\\ Hardy CYZT ------ --- -loc3=Smithers CYYD ------ --- -loc4=Vancouver CYVR ------ --- -loc5=Victoria CYYJ ------ --- - -[CA_MB] -name=Manitoba -loc0=Churchill CYYQ ------ --- -loc1=Winnipeg CYWG ------ --- - -[CA_NB] -name=New Brunswick -loc0=Chatham CYCH ------ --- -loc1=Fredericton CYFC ------ --- -loc2=Moncton CYQM ------ --- - -[CA_NF] -name=Newfoundland -loc0=Churchill\\ Falls KZUM ------ --- -loc1=Gander CYQX ------ --- -loc2=Goose\\ Bay CYYR ------ --- -loc3=Saint\\ Anthony CYAY ------ --- -loc4=St.\\ John's CYYT ------ --- -loc5=Stephenville CYJT ------ --- - -[CA_NS] -name=Nova Scotia -loc0=Greenwood CYZX ------ --- -loc1=Halifax CYHZ ------ --- -loc2=Shearwater CYAW ------ --- -loc3=Sydney CYQY ------ --- - -[CA_NT] -name=Northwest Territories -loc0=Iqaluit CYFB ------ --- -loc1=Yellowknife CYZF ------ --- - -[CA_ON] -name=Ontario -loc0=Ottawa CYOW ------ --- -loc1=Toronto CYYZ ------ 047 -loc2=Trenton CYTR ------ --- -loc3=Windsor CYQG ------ --- - -[CA_QC] -name=Quebec -loc0=Bagotville CYBG ------ --- -loc1=Gatineau CYND ------ --- -loc2=La\\ Grande CYGL ------ --- -loc3=Montreal\\ Saint-Hubert CYHU ------ --- -loc4=Montreal\\ Mirabel CYMX ------ --- -loc5=Montreal\\ Dorval CYUL ------ --- -loc6=Quebec\\ City CYQB ------ --- -loc7=Sept-Iles CYZV ------ --- - -[CA_SK] -name=Saskatchewan -loc0=Nipawin CYBU ------ --- -loc1=Regina CYQR ------ --- -loc2=Saskatoon CYXE ------ --- -loc3=Swift\\ Current CYYN ------ --- - -[CA_YK] -name=Yukon -loc0=Shingle\\ Point CYUA ------ --- - -[MX] -name=Mexico -states=MX - -[MX_MX] -name=Mexico -loc0=Acapulco MMAA ------ --- -loc1=Aeropuerto\\ del\\ Norte MMAN ------ --- -loc2=Aguascaliantes MMAS ------ --- -loc3=Bahias\\ de\\ Huatulco MMBT ------ --- -loc4=Campeche MMCP ------ --- -loc5=Cancun MMUN ------ --- -loc6=Chetumal MMCM ------ --- -loc7=Chihuahua MMCU ------ --- -loc8=Ciudad\\ del\\ Carmen MMCE ------ --- -loc9=Ciudad\\ Juarez MMCS ------ --- -loc10=Ciudad\\ Obregon MMCN ------ --- -loc11=Ciudad\\ Victoria MMCV ------ --- -loc12=Colima MMIA ------ --- -loc13=Cozumel MMCZ ------ --- -loc14=Cuernavaca MMCB ------ --- -loc15=Culiacan MMCL ------ --- -loc16=Del\\ Bajio MMLO ------ --- -loc17=Durango MMDO ------ --- -loc18=Guadalajara MMGL ------ --- -loc19=Guaymas MMGM ------ --- -loc20=Hermosillo MMHO ------ --- -loc21=Ixtapa MMZH ------ --- -loc22=La\\ Paz MMLP ------ --- -loc23=Los\\ Mochis MMLM ------ --- -loc24=Manzanillo MMZO ------ --- -loc25=Matamoros MMMA ------ --- -loc26=Mazatlan MMMZ ------ --- -loc27=Merida MMMD ------ --- -loc28=Mexicali MMML ------ --- -loc29=Mexico MMMX ------ --- -loc30=Minatitlan MMMT ------ --- -loc31=Monclova MMMV ------ --- -loc32=Morelia MMMM ------ --- -loc33=Monterrey MMMY ------ --- -loc34=Nuevo\\ Laredo MMNL ------ --- -loc35=Oaxaca MMOX ------ --- -loc36=Piedras\\ Negras MMPG ------ --- -loc37=Poza\\ Rica MMPA ------ --- -loc38=Puebla MMPB ------ --- -loc39=Puerto\\ Vallarta MMPR ------ --- -loc40=Puerto\\ Escondido MMPS ------ --- -loc41=Queretaro MMQT ------ --- -loc42=Reynosa MMRX ------ --- -loc43=Saltillo MMIO ------ --- -loc44=San\\ Jose\\ del\\ Cabo MMSD ------ --- -loc45=San\\ Luis\\ Potosi MMSP ------ --- -loc46=Tampico MMTM ------ --- -loc47=Tapachula MMTP ------ --- -loc48=Tepic MMEP ------ --- -loc49=Tijuana MMTJ ------ --- -loc50=Toluca MMTO ------ --- -loc51=Torreon MMTC ------ --- -loc52=Tulancingo MMTL ------ --- -loc53=Tuxtla\\ Gutierrez MMTG ------ --- -loc54=Uruapan MMPN ------ --- -loc55=Veracruz MMVR ------ --- -loc56=Villahermosa MMVA ------ --- -loc57=Zacatecas MMZC ------ --- - -[EU] -name=Europe -states=AB OS BE BA BG CZ HR CY DK EE FI FR MK DE GI GR HU IE IS IT LV LU MT MD NL NO PL PT RO RU SK SI SP SE CH TR UA UK YU - -[EU_AB] -name=Albania -loc0=Tirana LATI ------ --- - -[EU_OS] -name=Austria -loc0=Voslau LOAV ------ --- -loc1=Hohenems LOIH ------ --- -loc2=Graz LOWG ------ --- -loc3=Innsbruck LOWI ------ --- -loc4=Klagenfurt LOWK ------ --- -loc5=Linz LOWL ------ --- -loc6=Salzburg LOWS ------ --- -loc7=Wien LOWW ------ --- -loc8=Zell\\ Am\\ See LOWZ ------ --- - -[EU_BE] -name=Belgium -loc0=Antwerpen/Deurne EBAW ------ --- -loc1=Beauvechain EBBE ------ --- -loc2=Brasschaat EBBT ------ --- -loc3=Brussels-National\\ Airport EBBR ------ --- -loc4=Charleroi-Brussels\\ South EBCI ------ --- -loc5=Chievres EBCV ------ --- -loc6=Elsenborn EBLB ------ --- -loc7=Florennes EBFS ------ --- -loc8=Goetsenhoven EBTN ------ --- -loc9=Kleine\\ Brogel EBBL ------ --- -loc10=Koksijde EBFN ------ --- -loc11=Liege EBLG ------ --- -loc12=Oostende EBOS ------ --- -loc13=Schaffen EBDT ------ --- -loc14=Spa/La\\ Sauveniere EBSP ------ --- - -[EU_BA] -name=Bosnia-Herzegovina -loc0=Sarajevo LQSA ------ --- - -[EU_BG] -name=Bulgaria -loc0=Burgas LBBG ------ --- -loc1=Plovdiv LBPD ------ --- -loc2=Sofia LBSF ------ --- -loc3=Varna LBWN ------ --- - -[EU_CZ] -name=Czech Republic -loc0=Brno LKTB ------ --- -loc1=Ostrava LKMT ------ --- -loc2=Praha LKPR ------ --- - -[EU_HR] -name=Croatia -loc0=Dubrovnik LDDU ------ --- -loc1=Pula LDPL ------ --- -loc2=Rijeka LDRI ------ --- -loc3=Split LDSP ------ --- -loc4=Zadar LDZD ------ --- -loc5=Zagreb LDZA ------ --- - -[EU_DK] -name=Denmark -loc0=Aarhus EKAH ------ --- -loc1=Billund EKBI ------ --- -loc2=Esbjerg EKEB ------ --- -loc3=Karup EKKA ------ --- -loc4=Kobenhavn/Kastrup EKCH ------ --- -loc5=Kobenhavn/Roskilde EKRK ------ --- -loc6=Lolland\\ Falster EKMB ------ --- -loc7=Odense EKOD ------ --- -loc8=Bornholm EKRN ------ --- -loc9=Sonderborg EKSB ------ --- -loc10=Sindal EKSN ------ --- -loc11=Vojens/Skrydstrup EKSP ------ --- -loc12=Skive EKSV ------ --- -loc13=Thisted EKTS ------ --- -loc14=Vandel EKVA ------ --- -loc15=Kolding/Vandrup EKVD ------ --- -loc16=Vagar EKVG ------ --- -loc17=Stauning EKVJ ------ --- -loc18=Vaerlose EKVL ------ --- -loc19=Alborg EKYT ------ --- - -[EU_EE] -name=Estonia -loc0=Tallinn EETN ------ --- - -[EU_GI] -name=Gibraltar -loc0=Gibraltar LXGB ------ --- - -[EU_IS] -name=Iceland -loc0=Egilsstadir BIEG ------ --- -loc1=Keflavik BIKF ------ --- -loc2=Reykjavik BIRK ------ --- - -[EU_LA] -name=Latvia -loc0=Riga EVRA ------ --- - -[EU_LT] -name=Lithuania -loc0=Vilnius EYVI ------ --- - -[EU_LU] -name=Luxembourg -loc0=Luxembourg ELLX ------ --- - -[EU_MK] -name=FYR Macedonia -loc0=Ohrid LWOH ------ --- -loc1=Skopje LWSK ------ --- - -[EU_MT] -name=Malta -loc0=Luqa LMML ------ --- - -[EU_MD] -name=Moldova -loc0=Kishineu LUKK ------ --- - -[EU_NO] -name=Norway -loc0=Alesund ENAL ------ --- -loc1=Andoya ENAN ------ --- -loc2=Alta ENAT ------ --- -loc3=Forde/Bringeland ENBL ------ --- -loc4=Bronnoysund ENBN ------ --- -loc5=Bodo ENBO ------ --- -loc6=Bergen ENBR ------ --- -loc7=Berlevag ENBV ------ --- -loc8=Kristiansand/Kjevik ENCN ------ --- -loc9=Dagali ENDI ------ --- -loc10=Bardufoss ENDU ------ --- -loc11=Ekofisk ENEK ------ --- -loc12=Harstad/Narvik/Evenes ENEV ------ --- -loc13=Fagernes ENFG ------ --- -loc14=Floro ENFL ------ --- -loc15=Frigg ENFR ------ --- -loc16=Gullfax\\ C ENGC ------ --- -loc17=Oslo/Gardermoen ENGM ------ --- -loc18=Haugesund ENHD ------ --- -loc19=Hammerfest ENHF ------ --- -loc20=Honningsvag ENHV ------ --- -loc21=Kristiansund/Kvernberget ENKB ------ --- -loc22=Kirkenes ENKR ------ --- -loc23=Lista ENLI ------ --- -loc24=Leknes ENLK ------ --- -loc25=Mehamn ENMH ------ --- -loc26=Molde ENML ------ --- -loc27=Mosjoen ENMS ------ --- -loc28=Banak ENNA ------ --- -loc29=Narvik ENNK ------ --- -loc30=Namsos ENNM ------ --- -loc31=Notodden ENNO ------ --- -loc32=Oseberg\\ A ENOA ------ --- -loc33=Orland ENOL ------ --- -loc34=Orsta-Volda ENOV ------ --- -loc35=Mo\\ I\\ Rana ENRA ------ --- -loc36=Rorvik/Ryum ENRM ------ --- -loc37=Roros ENRO ------ --- -loc38=Rost ENRS ------ --- -loc39=Rygge ENRY ------ --- -loc40=Svalbard ENSB ------ --- -loc41=Sandane ENSD ------ --- -loc42=Sogndal ENSG ------ --- -loc43=Svolvaer/Helle ENSH ------ --- -loc44=Stokmarknes/Skagen ENSK ------ --- -loc45=Skien/Geiteryggen ENSN ------ --- -loc46=Stord/Sorstokken ENSO ------ --- -loc47=Sorkjosen ENSR ------ --- -loc48=Sandnessjoen/Stokka ENST ------ --- -loc49=Tromso/Langnes ENTC ------ --- -loc50=Torp ENTO ------ --- -loc51=Trondheim/Vaernes ENVA ------ --- -loc52=Vadso ENVD ------ --- -loc53=Stavanger/Sola ENZV ------ --- - -[EU_PL] -name=Poland -loc0=Gdansk EPGD ------ --- -loc1=Krakow EPKK ------ --- -loc2=Katowice EPKT ------ --- -loc3=Poznan EPPO ------ --- -loc4=Rzeszow EPRZ ------ --- -loc5=Szczecin EPSC ------ --- -loc6=Warszawa EPWA ------ --- - -[EU_PT] -name=Portugal -loc0=Beja LPBJ ------ --- -loc1=Faro LPFR ------ --- -loc2=Funchal LPFU ------ --- -loc3=Lajes LPLA ------ --- -loc4=Lisboa LPPT ------ --- -loc5=Porto LPPR ------ --- -loc6=Porto\\ Santo LPPS ------ --- -loc7=Santa\\ Maria LPAZ ------ --- - -[EU_RO] -name=Romania -loc0=Arad LRAR ------ --- -loc1=Bucuresti LRBS ------ --- -loc2=Bucuresti-Otopeni LROP ------ --- -loc3=Iasi LRIA ------ --- -loc4=Kogalniceanu LRCK ------ --- -loc5=Timisoara LRTR ------ --- -loc6=Tirgu\\ Mures LRTM ------ --- -loc7=Tulcea LRTC ------ --- - -[EU_RU] -name=Russia -loc0=Abakan UNAA ------ --- -loc1=Anadyr UHMA ------ --- -loc2=Anapa URKA ------ --- -loc3=Arkhangelsk ULAA ------ --- -loc4=Astrakhan URWA ------ --- -loc5=Barnaul UNBB ------ --- -loc6=Belgorod UUOB ------ --- -loc7=Blagoveschensk UHBB ------ --- -loc8=Bratsk UIBB ------ --- -loc9=Bryansk UUBP ------ --- -loc10=Cheboksary UWKS ------ --- -loc11=Chelyabinsk USCC ------ --- -loc12=Chita UIAA ------ --- -loc13=Kliningrad UMKK ------ --- -loc14=Kazan UWKD ------ --- -loc15=Khabarovsk UHHH ------ --- -loc16=Kogalym USRK ------ --- -loc17=Krasnodar URKK ------ --- -loc18=Krasnoyarsk UNKL ------ --- -loc19=Magadan UHMM ------ --- -loc20=Makhachkala URML ------ --- -loc21=Mineralnye\\ Vody URMM ------ --- -loc22=Moscow\\ Domodedovo UUDD ------ --- -loc23=Moscow\\ Sheremetyevo UUEE ------ --- -loc24=Murmansk ULMM ------ --- -loc25=Nalchik URMN ------ --- -loc26=Nizhny\\ Novgorod UWGG ------ --- -loc27=Novosibirsk UNNT ------ --- -loc28=Omsk UNOO ------ --- -loc29=Orenburg UWOO ------ --- -loc30=Perm USPP ------ --- -loc31=Petropavlovsk-Kamchatsky UHPP ------ --- -loc32=Petrozavodsk ULPB ------ --- -loc33=Pskov ULOO ------ --- -loc34=Raduzhny USNR ------ --- -loc35=Rostov-Na-Donu URRR ------ --- -loc36=Samara UWWW ------ --- -loc37=Sankt-Peterburg ULLI ------ --- -loc38=Saratov UWSS ------ --- -loc39=Sochi URSS ------ --- -loc40=Stavropol URMT ------ --- -loc41=Syktyvkar UUYY ------ --- -loc42=Tyumen USTR ------ --- -loc43=Ufa UWUU ------ --- -loc44=Ulan-Ude UIUU ------ --- -loc45=Ulyanovsk UWLW ------ --- -loc46=Vladikavkaz URMO ------ --- -loc47=Vladivostok UHWW ------ --- -loc48=Volgograd URWW ------ --- -loc49=Voronezh UUOO ------ --- -loc50=Yakutsk UEEE ------ --- -loc51=Yekaterinburg USSS ------ --- -loc52=Yuzhno-Sakhalinsk UHSS ------ --- - -[EU_UA] -name=Ukraine -loc0=Dnipropetrovsk UKDD ------ --- -loc1=Donetsk UKCC ------ --- -loc2=Ivano-Frankivsk UKLI ------ --- -loc3=Kharkiv UKHH ------ --- -loc4=Kyiv/Boryspil UKBB ------ --- -loc5=Kyiv/Zhulyany UKKK ------ --- -loc6=Kryviy\\ Rig/Lozovatka UKDR ------ --- -loc7=Lviv UKLL ------ --- -loc8=Odesa UKOO ------ --- -loc9=Rivne UKLR ------ --- -loc10=Sympheropol UKFF ------ --- -loc11=Uzhgorod UKLU ------ --- - -[EU_SK] -name=Slovakia -loc0=Bratislava LZIB ------ --- -loc1=Poprad LZTT ------ --- - -[EU_SI] -name=Slovenia -loc0=Ljubljana LJLJ ------ --- -loc1=Maribor LJMB ------ --- -loc2=Portoroz LJPZ ------ --- - -[EU_SE] -name=Sweden -loc0=Borlange ESSD ------ -- -loc1=Gavle\\ Sandviken ESSK ------ -- -loc2=Gallivare ESNG ------ -- -loc3=Goteborg\\ (Landvetter) ESGG ------ -- -loc4=Goteborg\\ (Save) ESGP ------ -- -loc5=Hagshult ESMV ------ -- -loc6=Halmstad\\ (Swedish\\ Air\\ Force\\ Base) ESMT ------ -- -loc7=Hultsfred\\ (Swedish\\ Air\\ Force\\ Base) ESSF ------ -- -loc8=Jonkoping ESGJ ------ --- -loc9=Kiruna ESNQ ------ --- -loc10=Linkoping\\ (Malmen) ESCF ------ -- -loc11=Linkoping\\ (Saab) ESSL ------ -- -loc12=Lulea\\ (Kallax) ESPA ------ -- -loc13=Malmo\\ (Sturup) ESMS ------ -- -loc14=Norrkoping ESSP ------ --- -loc15=Ronneby ESDF ------ --- -loc16=Stockholm\\ (Arlanda) ESSA ------ -- -loc17=Stockholm\\ (Bromma) ESSB ------ -- -loc18=Sundsvall-Harnosand ESNN ------ -- -loc19=Umea ESNU ------ --- -loc20=Vasteras ESOW ------ --- -loc21=Vaxjo ESMX ------ --- -loc22=Visby ESSV ------ -- -loc23=Angelholm ESDB ------ -- -loc24=Ornskoldsvik ESNO ------ -- -loc25=Ostersund\\ (Froson) ESPC ------ -- - -[EU_CH] -name=Switzerland -loc0=Bern LSZB ------ --- -loc1=Geneve LSGG ------ --- -loc2=Lugano LSZA ------ --- -loc3=Zurich LSZH ------ --- - -[EU_TR] -name=Turkey -loc0=Adana LTAF ------ --- -loc1=Adana/Incirlik LTAG ------ --- -loc2=Afyon LTAH ------ --- -loc3=Amasya LTAP ------ --- -loc4=Ankara/Esenboga LTAC ------ --- -loc5=Ankara/Etimesgut LTAD ------ --- -loc6=Antalya LTAI ------ --- -loc7=Balikesir LTBF ------ --- -loc8=Balikesir/Bandirma LTBG ------ --- -loc9=Batman LTCJ ------ --- -loc10=Bursa LTBE ------ --- -loc11=Diyarbakir LTCC ------ --- -loc12=Elazig LTCA ------ --- -loc13=Erzurum LTCE ------ --- -loc14=Eskisehir LTBI ------ --- -loc15=Gaziantep LTAJ ------ --- -loc16=Istanbul LTBA ------ --- -loc17=Izmir/Adnan\\ Menderes LTBJ ------ --- -loc18=Izmir/Cigli LTBL ------ --- -loc19=Izmit LTBQ ------ --- -loc20=Kayseri LTAU ------ --- -loc21=Konya LTAN ------ --- -loc22=Malatya LTAT ------ --- -loc23=Manisa LTBT ------ --- -loc24=Mugla/Dalaman LTBS ------ --- -loc25=Mus LTCK ------ --- -loc26=Samsun LTAQ ------ --- -loc27=Sanliurfa LTCH ------ --- -loc28=Sivas LTAR ------ --- -loc29=Sivrihisar LTAV ------ --- -loc30=Trabzon LTCG ------ --- -loc31=Van LTCI ------ --- - -[EU_CY] -name=Cyprus -loc0=Akrotiri LCRA ------ --- -loc1=Ercan LCEN ------ --- -loc2=Larnaka LCLK ------ --- -loc3=Paphos LCPH ------ --- - -[EU_FI] -name=Finland -loc0=Helsinki-Malmi EFHF ------ --- -loc1=Helsinki-Vantaa EFHK ------ --- -loc2=Ivalo EFIV ------ --- -loc3=Jyvaskyla EFJY ------ --- -loc4=Kemi EFKE ------ --- -loc5=Kruunupyy EFKK ------ --- -loc6=Kuopio EFKU ------ --- -loc7=Mariehamn EFMA ------ --- -loc8=Oulu EFOU ------ --- -loc9=Pori EFPO ------ --- -loc10=Rovaniemi EFRO ------ --- -loc11=Tampere EFTP ------ --- -loc12=Turku EFTU ------ --- -loc13=Vaasa EFVA ------ --- - -[EU_FR] -name=France -loc0=Agen LFBA ------ --- -loc1=Ajaccio/Campo\\ dell'Oro LFKJ ------ --- -loc2=Bale-Mulhouse LFSB ------ --- -loc3=Bastia LFKB ------ --- -loc4=Beauvais-Tille LFOB ------ --- -loc5=Biarritz-Bayonne LFBZ ------ --- -loc6=Bordeaux LFBD ------ --- -loc7=Bourges LFLD ------ --- -loc8=Brest LFRB ------ --- -loc9=Caen-Carpiquet LFRK ------ --- -loc10=Calvi-Ste-Catherine LFKC ------ --- -loc11=Cannes-Mandelieu LFMD ------ --- -loc12=Cazaux LFBC ------ --- -loc13=Chambery LFLB ------ --- -loc14=Cherbourg LFRC ------ --- -loc15=Clermont-Ferrand LFLC ------ --- -loc16=Colmar-Meyenheim LFSC ------ --- -loc17=Deauville-Saint-Gatien LFRG ------ --- -loc18=Dijon LFSD ------ --- -loc19=Dinard LFRD ------ --- -loc20=Dole LFGJ ------ --- -loc21=Evreux-Fauville LFOE ------ --- -loc22=Figari LFKF ------ --- -loc23=Grenoble-Saint-Geoirs LFLS ------ --- -loc24=Hyeres-Le\\ Palyvestre LFTH ------ --- -loc25=Lannion LFRO ------ --- -loc26=Le\\ Havre-Octeville LFOH ------ --- -loc27=Le\\ Mans LFRM ------ --- -loc28=Le\\ Touquet LFAT ------ --- -loc29=Lille-Lesquin LFQQ ------ --- -loc30=Limoges LFBL ------ --- -loc31=Lorient-Lann-Bihoue LFRH ------ --- -loc32=Lyon-Bron LFLY ------ --- -loc33=Lyon-Satolas LFLL ------ --- -loc34=Luxeuil LFSX ------ --- -loc35=Marseille-Provence LFML ------ --- -loc36=Metz-Frescaty LFSF ------ --- -loc37=Monpellier-Mediterrannee LFMT ------ --- -loc38=Mont-de-Marsan LFBM ------ --- -loc39=Nancy-Essey LFSN ------ --- -loc40=Nancy-Ochey LFSO ------ --- -loc41=Nantes\\ Adlantique LFRS ------ --- -loc42=Nice-Cote\\ d'Azur LFMN ------ --- -loc43=Nimes-Garons LFTW ------ --- -loc44=Paris/Charles\\ De\\ Gaulle LFPG ------ --- -loc45=Paris/Le\\ Bourget LFPB ------ --- -loc46=Paris/Orly LFPO ------ --- -loc47=Pau/Pyrenees LFBP ------ --- -loc48=Perpignan-Rivesaltes LFMP ------ --- -loc49=Poitiers LFBI ------ --- -loc50=Quimper LFRQ ------ --- -loc51=Reims-Champagne LFSR ------ --- -loc52=Rennes LFRN ------ --- -loc53=Rouen-Valle\\ de\\ Seine LFOP ------ --- -loc54=Saint-Brieuc-Armor LFRT ------ --- -loc55=Saint-Dizier-Robinson LFSI ------ --- -loc56=Saint-Etienne-Boutheon LFMH ------ --- -loc57=Saint-Nazaire-Montoir LFRZ ------ --- -loc58=Strasbourg LFST ------ --- -loc59=Tarbes LFBT ------ --- -loc60=Toul-Rosieres LFSL ------ --- -loc61=Toulouse LFBO ------ --- -loc62=Tours-St-Symphorien LFOT ------ --- -loc63=Toussus-Le\\ Noble LFPN ------ --- -loc64=Troyes/Barberey LFQB ------ --- -loc65=Vichy-Charmeil LFLV ------ --- -loc66=Villacoublay LFPV ------ --- - -[EU_DE] -name=Germany -loc0=Augsburg EDMA ------ --- -loc1=Bayreuth EDQD ------ --- -loc2=Berlin-Tegel EDDT ------ --- -loc3=Berlin-Tempelhof EDDI ------ --- -loc4=Braunschweig EDVE ------ --- -loc5=Bremen EDDW ------ --- -loc6=Dortmund-Wickede EDLW ------ --- -loc7=Dusseldorf EDDL ------ --- -loc8=Frankfurt/Main EDDF ------ --- -loc9=Friedrichshafen EDNY ------ --- -loc10=Hamburg EDDH ------ --- -loc11=Hamburg-Finkenwerder EDHI ------ --- -loc12=Hannover EDDV ------ --- -loc13=Hof EDQM ------ --- -loc14=Kassel-Calden EDVK ------ --- -loc15=Koln/Bonn EDDK ------ --- -loc16=Lubeck-Blankensee EDHL ------ --- -loc17=Monchengladbach EDLN ------ --- -loc18=Munchen EDDM ------ --- -loc19=Munster/Osnabruck EDDG ------ --- -loc20=Nurnberg EDDN ------ --- -loc21=Oberpfaffenhofen EDMO ------ --- -loc22=Paderborn-Haxterberg EDLP ------ --- -loc23=Saarbrucken EDDR ------ --- -loc24=Stuttgart EDDS ------ --- -loc25=Westerland EDXW ------ --- -loc26=Dresden-Klotzsche EDDC ------ --- -loc27=Leipzig-Schkeuditz EDDP ------ --- - -[EU_GR] -name=Greece -loc0=Andravida LGAD ------ --- -loc1=Alexandroupolis LGAL ------ --- -loc2=Araxos LGRX ------ --- -loc3=Athinai LGAT ------ --- -loc4=Chania LGSA ------ --- -loc5=Elefsis LGEL ------ --- -loc6=Iraklion LGIR ------ --- -loc7=Kalamata LGKL ------ --- -loc8=Kavala LGKV ------ --- -loc9=Kefallinia LGKF ------ --- -loc10=Kerkira LGKR ------ --- -loc11=Kos LGKO ------ --- -loc12=Kozani LGKZ ------ --- -loc13=Limnos LGLM ------ --- -loc14=Mitilini LGMT ------ --- -loc15=Mykonos LGMK ------ --- -loc16=Preveza LGPZ ------ --- -loc17=Rodos LGRP ------ --- -loc18=Samos LGSM ------ --- -loc19=Santorini LGSR ------ --- -loc20=Skiathos LGSK ------ --- -loc21=Thessaloniki LGTS ------ --- -loc22=Zakinthos LGZA ------ --- - -[EU_HU] -name=Hungary -loc0=Budapest LHBP ------ --- -loc1=Papa LHPA ------ --- -loc2=Szombathely LHSY ------ --- - -[EU_IE] -name=Ireland -loc0=Connaught EIKN ------ --- -loc1=Cork EICK ------ --- -loc2=Dublin EIDW ------ --- -loc3=Shannon EINN ------ --- - -[EU_IT] -name=Italy -loc0=Albenga LIMG ------ --- -loc1=Alghero LIEA ------ --- -loc2=Amendola LIBA ------ --- -loc3=Ancona LIPY ------ --- -loc4=Aviano LIPA ------ --- -loc5=Bari LIBD ------ --- -loc6=Bergamo LIME ------ --- -loc7=Bologna LIPE ------ --- -loc8=Bolzano LIPB ------ --- -loc9=Brindisi LIBR ------ --- -loc10=Cagliari LIEE ------ --- -loc11=Capo\\ Mele LIMU ------ --- -loc12=Catania LICC ------ --- -loc13=Cervia LIPC ------ --- -loc14=Crotone LIBC ------ --- -loc15=Dobbiaco LIVD ------ --- -loc16=Decimomannu LIED ------ --- -loc17=Ferrara LIPF ------ --- -loc18=Firenze LIRQ ------ --- -loc19=Forli LIPK ------ --- -loc20=Frontone LIVF ------ --- -loc21=Frosinone LIRH ------ --- -loc22=Genova LIMJ ------ --- -loc23=Ghedi LIPL ------ --- -loc24=Gioia\\ del\\ Colle LIBV ------ --- -loc25=Grosseto LIRS ------ --- -loc26=Guidonia LIRG ------ --- -loc27=Lamezia LICA ------ --- -loc28=Lampedusa LICD ------ --- -loc29=Latina LIRL ------ --- -loc30=Lecce LIBN ------ --- -loc31=Marino\\ di\\ Ravenna LIVM ------ --- -loc32=Milano/Linate LIML ------ --- -loc33=Milano/Malpensa LIMC ------ --- -loc34=Monte\\ Argentario LIQO ------ --- -loc35=Monte\\ Bisbino LIMO ------ --- -loc36=Monte\\ Calamita LIRX ------ --- -loc37=Monte\\ Cimone LIVC ------ --- -loc38=Monte\\ Malanotte LIMY ------ --- -loc39=Monte\\ Scuro LIBQ ------ --- -loc40=Monte\\ Terminillo LIRK ------ --- -loc41=Napoli LIRN ------ --- -loc42=Novara/Cameri LIMN ------ --- -loc43=Olbia LIEO ------ --- -loc44=Padova LIPU ------ --- -loc45=Paganella LIVP ------ --- -loc46=Palermo LICJ ------ --- -loc47=Pantelleria LICG ------ --- -loc48=Passo\\ della\\ Cisa LIMT ------ --- -loc49=Passo\\ dei\\ Giovi LIMV ------ --- -loc50=Passo\\ Resia LIVE ------ --- -loc51=Passo\\ Rolle LIVR ------ --- -loc52=Perugia LIRZ ------ --- -loc53=Pescara LIBP ------ --- -loc54=Piacenza LIMS ------ --- -loc55=Pian\\ Rosa LIMH ------ --- -loc56=Pisa LIRP ------ --- -loc57=Pratica\\ di\\ Mare LIRE ------ --- -loc58=Reggio\\ Calabria LICR ------ --- -loc59=Rieti LIQN ------ --- -loc60=Rimini LIPR ------ --- -loc61=Rivolto LIPI ------ --- -loc62=Roma/Ciampino LIRA ------ --- -loc63=Roma/Fiumicino LIRF ------ --- -loc64=Roma/Urbe LIRU ------ --- -loc65=Ronchi\\ de'\\ Legionari LIPQ ------ --- -loc66=Sarzana LIQW ------ --- -loc67=Sigonella LICZ ------ --- -loc68=Taranto LIBG ------ --- -loc69=Tarvisio LIVO ------ --- -loc70=Trapani LICT ------ --- -loc71=Torino/Bric\\ Della\\ Croce LIMK ------ --- -loc72=Torino/Caselle LIMF ------ --- -loc73=Trevico LIRT ------ --- -loc74=Treviso/S.Angelo LIPH ------ --- -loc75=Treviso/Istrana LIPS ------ --- -loc76=Trieste LIVT ------ --- -loc77=Venezia LIPZ ------ --- -loc78=Vicenza LIPT ------ --- -loc79=Villafranca LIPX ------ --- -loc80=Viterbo LIRV ------ --- - -[EU_NL] -name=Netherlands -loc0=Amsterdam EHAM ------ --- -loc1=Deelen EHDL ------ --- -loc2=Den\\ Helder/De\\ Kooy EHKD ------ --- -loc3=Eindhoven EHEH ------ --- -loc4=Gilze-Rijen EHGR ------ --- -loc5=Groningen EHGG ------ --- -loc6=Leeuwarden EHLW ------ --- -loc7=Maastricht EHBK ------ --- -loc8=Rotterdam EHRD ------ --- -loc9=Twenthe EHTW ------ --- -loc10=Utrecht/Soesterberg EHSB ------ --- -loc11=Valkenburg EHVB ------ --- -loc12=Vlieland EHVL ------ --- -loc13=Volkel EHVK ------ --- -loc14=Woensdrecht EHWO ------ --- - -[EU_SP] -name=Spain -loc0=Alicante LEAL ------ --- -loc1=Almeria LEAM ------ --- -loc2=Asturias LEAS ------ --- -loc3=Barcelona LEBL ------ --- -loc4=Bilbao LEBB ------ --- -loc5=Canarias/Fuerteventura GCFV ------ --- -loc6=Canarias/Gran\\ Canaria GCLP ------ --- -loc7=Canarias/Hierro GCHI ------ --- -loc8=Canarias/La\\ Palma GCLA ------ --- -loc9=Canarias/Lanzarote GCRR ------ --- -loc10=Canarias/Tenerife\\ Sur GCTS ------ --- -loc11=Canarias/Tenerife\\ Norte GCXO ------ --- -loc12=Girona LEGE ------ --- -loc13=Granada LEGR ------ --- -loc14=Ibiza LEIB ------ --- -loc15=Jerez LEJR ------ --- -loc16=La\\ Coruna LECO ------ --- -loc17=Madrid\\ (Barajas) LEMD ------ --- -loc18=Madrid\\ (Cuatro\\ Vientos) LEVS ------ --- -loc19=Malaga LEMG ------ --- -loc20=Melilla GEML ------ --- -loc21=Menorca LEMH ------ --- -loc22=Murcia LELC ------ --- -loc23=Palma\\ de\\ Mallorca LEPA ------ --- -loc24=Pamplona LEPP ------ --- -loc25=Reus LERS ------ --- -loc26=San\\ Sebastian LESO ------ --- -loc27=Santander LEXJ ------ --- -loc28=Santiago LEST ------ --- -loc29=Sevilla LEZL ------ --- -loc30=Valencia LEVC ------ --- -loc31=Vigo LEVX ------ --- -loc32=Vitoria LEVT ------ --- -loc33=Zaragoza LEZG ------ --- - -[EU_UK] -name=United Kingdom -loc0=Aberdeen EGPD :RQPMS --- -loc1=Alderney EGJA ------ --- -loc2=Belfast/Aldergrove EGAA :AAPMS --- -loc3=Belfast/Harbour EGAC :AAPMS --- -loc4=Benbecula EGPL :RAPMS --- -loc5=Biggin\\ Hill EGKB :RBPMS --- -loc6=Birmingham EGBB :BBPMS --- -loc7=Blackpool EGNH :RCPMS --- -loc8=Boscombe\\ Down EGDM ------ --- -loc9=Boulmer EGQM :RTPMS --- -loc10=Bournemouth EGHH :RIPMS --- -loc11=Bristol EGGD :RDPMS --- -loc12=Cambridge EGSC :RNPMS- --- -loc13=Cardiff EGFF :RGPMS --- -loc14=Carlisle EGNC :RCPMS --- -loc15=Coventry EGBE :BBPMS --- -loc16=Cranfield EGTC :RIPMS --- -loc17=Culdrose EGDR :RD2PMS --- -loc18=Dundee EGPN :RAPMS --- -loc19=East\\ Midlands EGNX :BBPMS --- -loc20=Edinburgh EGPH :RAPMS --- -loc21=Eglington/Londonderry EGAE :AAPMS --- -loc22=Exeter EGTE :RD2PMS --- -loc23=Glasgow EGPF :RAPMS --- -loc24=Guernsey EGJB ------ --- -loc25=Humberside EGNJ :RTPMS --- -loc26=Inverness EGPE :RQPMS --- -loc27=Isle\\ of\\ Man EGNS :RCPMS --- -loc28=Jersey EGJJ ------ --- -loc29=Kinloss EGQK :RQPMS --- -loc30=Leeds\\ and\\ Bradford EGNM :RYPMS --- -loc31=Leuchars EGQL :RQPMS --- -loc32=Liverpool EGGP :RCPMS --- -loc33=London/City EGLC :RBPMS --- -loc34=London/Gatwick EGKK :RBPMS --- -loc35=London/Heathrow EGLL :RBPMS --- -loc36=London/Stansted EGSS :RBPMS --- -loc37=Lossiemouth EGQS :RQPMS --- -loc38=Luton EGGW :RBPMS --- -loc39=Lyneham EGDL :BBPMS --- -loc40=Manchester EGCC :RCPMS --- -loc41=Newcastle EGNT :RTPMS --- -loc42=Norwich EGSH :RNPMS --- -loc43=Plymouth EGHD :RD2PMS --- -loc44=Portland EGDP :RIPMS --- -loc45=Prestwick EGPK :RAPMS --- -loc46=Saint\\ Mawgan EGDG :RD2PMS --- -loc47=Scatsta EGPM :RQPMS --- -loc48=Scilly\\ Isles EGHE :RD2PMS --- -loc49=Shawbury EGOS :BBPMS --- -loc50=Shoreham EGKA :RBPMS --- -loc51=Southampton EGHI :RIPMS --- -loc52=Southend EGMC :RBPMS --- -loc53=Staverton EGBJ :RDPMS --- -loc54=Stornoway EGPO :RQPMS --- -loc55=Sumburgh EGPB :RQPMS --- -loc56=Tees-Side EGNV :RTPMS --- -loc57=Tiree EGPU :RQPMS --- -loc58=Unst EGPW :RQPMS --- -loc59=Valley EGOV ------ --- -loc60=Wick EGPC :RQPMS --- -loc61=Yeovilton EGDY :RDPMS --- - -[EU_YU] -name=Yugoslavia -loc0=Beograd LYBE ------ --- -loc1=Nis LYNI ------ --- -loc2=Podgorica\\ Titograd LYTI ------ --- -loc3=Podgorica LYPG ------ --- -loc4=Pristina LYPR ------ --- -loc5=Tivat LYTU ------ --- - -[AF] -name=Africa -states=DZ EG LY MO ZA - -[AF_MO] -name=Morocco -loc0=Rabat GMME ------ --- - -[AF_ZA] -name=South Africa -loc0=Bethlehem\\ Airport FABM ------ --- -loc1=Bloemfontein\\ J.\\ B.\\ M.\\ Hertzog FABL ------ --- -loc2=Cape\\ Town\\ D.\\ F.\\ Malan FACT ------ --- -loc3=Durban\\ Louis\\ Botha FADN ------ --- -loc4=East\\ London FAEL ------ --- -loc5=George\\ Airport FAGG ------ --- -loc6=Jan\\ Smuts FAJS ------ --- -loc7=Langebaanweg FALW ------ --- -loc8=Lichtenburg FALT ------ --- -loc9=Pietersburg FAPB ------ --- -loc10=Port\\ Elizabeth FAPE ------ --- -loc11=Pretoria FAPR ------ --- -loc12=Springbok FASB ------ --- -loc13=Upington FAUP ------ --- - -[AF_LY] -name=Libya -loc0=Benina HLLB ------ --- -loc1=Tripoli HLLT ------ --- - -[AF_EG] -name=Egypt -loc0=Alexandria/Nouzha HEAX ------ --- -loc1=Asswan HESN ------ --- -loc2=Cairo HECA ------ --- -loc3=Luxor HELX ------ --- -loc4=Mersa\\ Matruh HEMM ------ --- -loc5=Port\\ Said HEPS ------ --- -loc6=Sharm\\ El\\ Sheikhintl HESH ------ --- - -[AF_DZ] -name=Algeria -loc0=Annaba DABB ------ --- -loc1=Constantine DABC ------ --- -loc2=Dar-El-Beida DAAG ------ --- -loc3=Ghardaia DAUG ------ --- -loc4=Hassi-Messaoud DAUH ------ --- -loc5=In\\ Amenas DAUZ ------ --- -loc6=Oran DAOO ------ --- -loc7=Tamanrasset DAAT ------ --- -loc8=Tebessa DABS ------ --- -loc9=Tlemcen\\ Zenata DAON ------ --- - -[OZ] -name=Australasia -states=AU NZ AN - -[OZ_AU] -name=Australia -loc0=Adelaide YPAD ------ --- -loc1=Alice\\ Springs YBAS ------ --- -loc2=Brisbane YBBN ------ --- -loc3=Broome YBRM ------ --- -loc4=Cairns YBCS ------ --- -loc5=Canberra YSCB ------ --- -loc6=Christmas\\ Island YPXM ------ --- -loc7=Cocos\\ Island YPCC ------ --- -loc8=Darwin YPDN ------ --- -loc9=Dubbo YSDU ------ --- -loc10=Hobart YMHB ------ --- -loc11=Learmouth YPLM ------ --- -loc12=Melbourne YMML ------ --- -loc13=Norfolk\\ Island YSNF ------ --- -loc14=Perth YPPH ------ --- -loc15=Port\\ Hedland YPPD ------ --- -loc16=Sydney YSSY ------ --- -loc17=Townsville YBTL ------ --- - -[OZ_NZ] -name=New Zealand -loc0=Auckland NZAA ------ --- -loc1=Christchurch NZCH ------ --- -loc2=Wellington NZWN ------ --- - -[OZ_AN] -name=Antartica -loc0=Williams\\ Field NZCM ------ --- - -[AS] -name=Asia -states=CN HK IN JP KR KP PK SG TW VN - -[AS_VN] -name=Viet Nam -loc=Da\\ Nang VVDN ------ --- -loc=Ha\\ Noi VVNB ------ --- -loc=Ho\\ Chi\\ Minh VVTS ------ --- - -[AS_KR] -name=Korea, Republic of -loc0=Camp\\ Stanley/H-207 RKSX ------ --- -loc1=Cheju RKPC ------ --- -loc2=Chongju\\ Ab RKTU ------ --- -loc3=Mangilsan\\ Ab RKTM ------ --- -loc4=Osan\\ Ab RKSO ------ --- -loc5=Paekado RKTB ------ --- -loc6=Paengnyongdo\\ Ab RKSP ------ --- -loc7=Pohang\\ Ab RKTH ------ --- -loc8=Pusan/Kimhae RKPK ------ --- -loc9=Pyongtaek\\ Ab RKSG ------ --- -loc10=Sangju RKTS ------ --- -loc11=Seoul/Kimp'O\\ International\\ Airport RKSS ------ --- -loc12=Seoul/Yongdungp'O\\ Rokaf\\ Wc RKSF ------ --- -loc13=Seoul\\ E\\ Ab RKSM ------ --- -loc14=Songmu\\ Ab RKTE ------ --- -loc15=Suwon\\ Ab RKSW ------ --- -loc16=Taegu RKTT ------ --- -loc17=Taegu\\ Ab RKTN ------ --- -loc18=Taejon RKTF ------ --- -loc19=Ulsan RKPU ------ --- -loc20=Woong\\ Cheon RKTW ------ --- -loc21=Yechon\\ Ab RKTY ------ --- -loc22=Yeoju\\ Range RKSU ------ --- -loc23=Yeonpyeungdo RKSQ ------ --- -loc24=Yongsan/H-208\\ Hp RKSY ------ --- -loc25=Yosu RKJY ------ --- - -[AS_KP] -name=Korea, Democratic People's Republic of -loc0=Pyongyang ZKPY ------ --- - -[AS_HK] -name=Hong Kong -loc=Hong\\ Kong VHHH ------ --- - -[AS_PK] -name=Pakistan -loc0=Islamabad OPRN ------ --- -loc1=Karachi OPKC ------ --- -loc2=Lahore OPLA ------ --- -loc3=Nawabshah OPNH ------ --- - -[AS_IN] -name=India -loc0=Ahmadabad VAAH ------ --- -loc1=Amritsar VIAR ------ --- -loc2=Bombay/Santacruz VABB ------ --- -loc3=Calcutta/Dum\\ Dum VECC ------ --- -loc4=Hyderabad VOHY ------ --- -loc5=Madras/Minambakkam VOMM ------ --- -loc6=Nagpur\\ Sonegaon VANP ------ --- -loc7=New\\ Delhi/Palam VIDP ------ --- -loc8=Patna VEPT ------ --- -loc9=Thiruvananthapuram VOTV ------ --- -loc10=Tiruchchirapalli VOTR ------ --- -loc11=Varanasi/Babatpur VIBN ------ --- - -[AS_CN] -name=People's Republic of China -loc0=Beijing ZBAA ------ --- -loc1=Chengdu ZUUU ------ --- -loc2=Dalian ZYTL ------ --- -loc3=Guangzhou ZGGG ------ --- -loc4=Hangzhou ZSHC ------ --- -loc5=Hong\\ Kong VHHH ------ --- -loc6=Kunming ZPPP ------ --- -loc7=Lanzhou ZLLL ------ --- -loc8=Nanning ZGNN ------ --- -loc9=Shanghai ZSSS ------ --- -loc10=Taiyuan ZBYN ------ --- -loc11=Tianjin ZBTJ ------ --- -loc12=Urumqi ZWWW ------ --- -loc13=Xiamen ZSAM ------ --- - -[AS_JP] -name=Japan -loc0=Akeno\\ Ab RJOE ------ --- -loc1=Akita\\ Airport RJSK ------ --- -loc2=Amami\\ Airport RJKA ------ --- -loc3=Aomori\\ Airport RJSA ------ --- -loc4=Asahikawa\\ Ab RJCA ------ --- -loc5=Asahikawa\\ Airport RJEC ------ --- -loc6=Ashiya\\ Ab RJFA ------ --- -loc7=Atsugi\\ US\\ NAS RJTA ------ --- -loc8=Chichijima RJAO ------ --- -loc9=Chitose\\ Ab RJCC ------ --- -loc10=Chitose\\ ASDF RJCJ ------ --- -loc11=Chofu\\ Airport RJTF ------ --- -loc12=Fuji\\ Ab RJAT ------ --- -loc13=Fukue\\ Airport RJFE ------ --- -loc14=Fukui\\ Airport RJNF ------ --- -loc15=Fukuoka\\ Airport RJFF ------ --- -loc16=Gifu\\ Ab RJNG ------ --- -loc17=Hachijojima\\ Airport RJTH ------ --- -loc18=Hachinohe\\ Ab RJSH ------ --- -loc19=Hakodate\\ Airport RJCH ------ --- -loc20=Hamamatsu\\ Ab RJNH ------ --- -loc21=Hanamaki\\ Airport RJSI ------ --- -loc22=Hiroshima\\ Airport RJOA ------ --- -loc23=Hofu\\ Ab RJOF ------ --- -loc24=Hyakuri\\ Ab RJAH ------ --- -loc25=Ichikawa RJAI ------ --- -loc26=Iki\\ Airport RJDB ------ --- -loc27=Iruma\\ Ab RJTJ ------ --- -loc28=Iwakuni\\ MCAS RJOI ------ --- -loc29=Iwojima RJAW ------ --- -loc30=Izumo\\ Airport RJOC ------ --- -loc31=Kadena\\ Ab RODN ------ --- -loc32=Kagoshima\\ Airport RJFK ------ --- -loc33=Kamigoto RJDK ------ --- -loc34=Kanoya\\ Ab RJFY ------ --- -loc35=Kansai\\ International\\ Airport RJBB ------ --- -loc36=Kasumigaura\\ Ab RJAK ------ --- -loc37=Kasuminome\\ Ab RJSU ------ --- -loc38=Kikai\\ Island RJKI ------ --- -loc39=Kisarazu\\ Ab RJTK ------ --- -loc40=Kitakyushu\\ Airport RJFR ------ --- -loc41=Kochi\\ Airport RJOK ------ --- -loc42=Komatsu\\ Ab RJNK ------ --- -loc43=Komatsujima\\ Ab RJOP ------ --- -loc44=Kumamoto\\ Airport RJFT ------ --- -loc45=Kushiro\\ Airport RJCK ------ --- -loc46=Matsumoto\\ Airport RJAF ------ --- -loc47=Matsushima\\ Ab RJST ------ --- -loc48=Matsuyama\\ Airport RJOM ------ --- -loc49=Memambetsu\\ Airport RJCM ------ --- -loc50=Metabaru\\ Ab RJDM ------ --- -loc51=Miho\\ Ab RJOH ------ --- -loc52=Minamitorishima RJAM ------ --- -loc53=Misawa\\ Ab RJSM ------ --- -loc54=Miyakejima\\ Airport RJTQ ------ --- -loc55=Miyazaki\\ Airport RJFM ------ --- -loc56=Mombetsu\\ Airport RJEB ------ --- -loc57=Nagasaki\\ Airport RJFU ------ --- -loc58=Nagoya\\ Airport RJNN ------ --- -loc59=Naha\\ Airport ROAH ------ --- -loc60=Nakashibetsu\\ Airport RJCN ------ --- -loc61=Nankishirahama\\ Airport RJBD ------ --- -loc62=New\\ Tokyo\\ International\\ Airport RJAA ------ --- -loc63=Niigata\\ Airport RJSN ------ --- -loc64=Nyutabaru\\ Ab RJFN ------ --- -loc65=Obihiro\\ Airport RJCB ------ --- -loc66=Oita\\ Airport RJFO ------ --- -loc67=Ojika\\ Island RJDO ------ --- -loc68=Okayama\\ Airport RJOB ------ --- -loc69=Oki\\ Airport RJNO ------ --- -loc70=Okinoerabu RJKB ------ --- -loc71=Okushiri\\ Island RJEO ------ --- -loc72=Ominato\\ Ab RJSO ------ --- -loc73=Osaka\\ International\\ Airport RJOO ------ --- -loc74=Oshima\\ Airport RJTO ------ --- -loc75=Ozuki\\ Ab RJOZ ------ --- -loc76=Rebun\\ Island RJCR ------ --- -loc77=Rishiri\\ Island RJER ------ --- -loc78=Sapporo\\ Ab RJCO ------ --- -loc79=Sendai\\ Airport RJSS ------ --- -loc80=Shimofusa\\ Ab RJTL ------ --- -loc81=Shizuhama\\ Ab RJNY ------ --- -loc82=Tachikawa\\ Ab RJTC ------ --- -loc83=Tajima RJBT ------ --- -loc84=Takamatsu\\ Airport RJOT ------ --- -loc85=Tanegashima\\ Airport RJFG ------ --- -loc86=Tateyama\\ Ab RJTE ------ --- -loc87=Tokachi\\ GSDF RJCT ------ --- -loc88=Tokunoshima\\ Island RJKN ------ --- -loc89=Tokushima\\ Ab RJOS ------ --- -loc90=Tokyo\\ Heliport RJTI ------ --- -loc91=Tokyo\\ International\\ Airport RJTT ------ --- -loc92=Tokyo\\ New\\ International\\ Airport RJAA ------ --- -loc93=Tottori\\ Airport RJOR ------ --- -loc94=Toyama\\ Airport RJNT ------ --- -loc95=Tsuiki\\ Ab RJFZ ------ --- -loc96=Tsushima\\ Airport RJDT ------ --- -loc97=Utsunomiya\\ Ab RJTU ------ --- -loc98=Wakkanai\\ Airport RJCW ------ --- -loc99=Yakushima RJFC ------ --- -loc100=Yamagata\\ Airport RJSC ------ --- -loc101=Yamaguchi\\ Ube\\ Airport RJDC ------ --- -loc102=Yao\\ Airport RJOY ------ --- -loc103=Yokosuka\\ Fwf RJTX ------ --- -loc104=Yokota\\ Ab RJTY ------ --- -loc105=Zama\\ Airfield RJTR ------ --- - -[AS_SG] -name=Singapore -loc0=Singapore WSSS ------ --- - -[AS_TW] -name=Taiwan -loc0=Chia\\ Tung RCFS ------ --- -loc1=Chiang\\ Kai\\ Shek RCTP ------ --- -loc2=Chiayi RCKU ------ --- -loc3=Chihhang RCQS ------ --- -loc4=Chinmem/Shatou RCBS ------ --- -loc5=Dongsha RCLM ------ --- -loc6=Dongshi RCNO ------ --- -loc7=Feng\\ Nin RCFN ------ --- -loc8=Hengchun RCKW ------ --- -loc9=Hsinchu RCPO ------ --- -loc10=Hulien RCYU ------ --- -loc11=Ilan RCMS ------ --- -loc12=Kangshan RCAY ------ --- -loc13=Kaohsiung RCKH ------ --- -loc14=Makung RCQC ------ --- -loc15=Mazu RCFG ------ --- -loc16=Pa\\ Kuei/Bakuai RCUK ------ --- -loc17=Pingtung\\ North RCSQ ------ --- -loc18=Pingtung\\ South RCDC ------ --- -loc19=Sungshan/Taipei RCSS ------ --- -loc20=Taichung RCLG ------ --- -loc21=Tainan RCNN ------ --- -loc22=Taoyuan RCGM ------ --- -loc23=Wuchia\\ Observatory RCMQ ------ --- - -[M_] -name=Central and South America -states=BS BZ KY CU CR DO SV GT HT HN JM NI PA AR BR BO CL CO EC PY PE SR UY VE - -[M__BS] -name=Bahamas -loc0=Freeport MYGF ------ --- -loc1=Nassau MYNN ------ --- - -[M__BZ] -name=Belize -loc0=Belize MZBZ ------ --- - -[M__BM] -name=Bermuda -loc0=Bermuda TXKF ------ --- - -[M__KY] -name=Cayman Islands -loc0=Grand\\ Cayman MWCR ------ --- - -[M__CU] -name=Cuba -loc0=Baracoa MUBA ------ --- -loc1=Bayamo MUBY ------ --- -loc2=Camaguey MUCM ------ --- -loc3=Cayo\\ Largo\\ del\\ Sur MUCL ------ --- -loc4=Guantanamo MUGT ------ --- -loc5=Habana MUHA ------ --- -loc6=Holguin MUHG ------ --- -loc7=Las\\ Tunas MUVT ------ --- -loc8=Manzanillo MUMZ ------ --- -loc9=Moa MUMO ------ --- -loc10=Nueva\\ Gerona MUNG ------ --- -loc11=Santiago\\ de\\ Cuba MUCU ------ --- -loc12=Varadero MUVR ------ --- -loc13=Venezuela MUCA ------ --- - -[M__CR] -name=Costa Rica -loc0=Chacarita MRCH ------ --- -loc1=Juan\\ Santamaria MROC ------ --- -loc2=Liberia MRLB ------ --- -loc3=Puerto\\ Limon MRLM ------ --- -loc4=Tobias\\ Bolanos MRPV ------ --- - -[M__DO] -name=Dominican Republic -loc0=La\\ Romana MDLR ------ --- -loc1=Las\\ Americas MDSD ------ --- -loc2=Puerto\\ Plata MDPP ------ --- -loc3=Punta\\ Cana MDPC ------ --- -loc4=Santiago MDST ------ --- - -[M__SV] -name=El Salvador -loc0=Acajutla MSAC ------ --- -loc1=El\\ Salvador\\ Int. MSLP ------ --- -loc2=San\\ Miguel MSSM ------ --- -loc3=San\\ Salvador MSSS ------ --- -loc4=Santa\\ Ana MSSA ------ --- - -[M__GT] -name=Guatemala -loc0=Flores MGFL ------ --- -loc1=Guatemala MGGT ------ --- -loc2=Huehuetenango MGHT ------ --- -loc3=Puerto\\ Barrios MGPB ------ --- -loc4=San\\ Jose MGSJ ------ --- - -[M__HT] -name=Haiti -loc0=Port-Au-Prince MTPP ------ --- - -[M__HN] -name=Honduras -loc0=Amapala MHAM ------ --- -loc1=Catacamas MHCA ------ --- -loc2=Choluteca MHCH ------ --- -loc3=La\\ Ceiba MHLC ------ --- -loc4=La\\ Esperanza MHLE ------ --- -loc5=La\\ Mesa MHLM ------ --- -loc6=Nueva\\ Ocotepeque MHSC ------ --- -loc7=Puerto\\ Lempira MHPL ------ --- -loc8=Roatan MHRO ------ --- -loc9=Santa\\ Rosa\\ de\\ Copan MHSR ------ --- -loc10=Tegucigalpa MHTG ------ --- -loc11=Tela MHTE ------ --- -loc12=Yoro MHYR ------ --- - -[M__JM] -name=Jamaica -loc0=Kingston MKJP ------ --- -loc1=Montego\\ Bay MKJA ------ --- - -[M__NI] -name=Nicaragua -loc0=Bluefields MNBL ------ --- -loc1=Chinandega MNCH ------ --- -loc2=Jinotega MNJG ------ --- -loc3=Juigalpa MNJU ------ --- -loc4=Managua MNMG ------ --- -loc5=Puerto\\ Cabezas MNPC ------ --- -loc6=Rivas MNRS ------ --- - -[M__PA] -name=Panama -loc0=Bocas\\ del\\ Toro MPBO ------ --- -loc1=David MPDA ------ --- -loc2=Howard\\ AFB MPHO ------ --- -loc3=Panama MPMG ------ --- -loc4=Santiago MPSA ------ --- -loc5=Tocumen MPTO ------ --- - -[M__BO] -name=Bolivia -loc0=Camiri SLCA ------ --- -loc1=Cobija SLCO ------ --- -loc2=Cochabamba SLCB ------ --- -loc3=Concepcion SLCP ------ --- -loc4=La\\ Paz/Alto SLLP ------ --- -loc5=Magdalena SLMG ------ --- -loc6=Oruro SLOR ------ --- -loc7=Potosi SLPO ------ --- -loc8=Puerto\\ Suarez SLPS ------ --- -loc9=Reyes SLRY ------ --- -loc10=Riberalta SLRI ------ --- -loc11=Robore SLRB ------ --- -loc12=Rurrenabaque SLRQ ------ --- -loc13=San\\ Ignacio\\ De\\ Velasco SLSI ------ --- -loc14=San\\ Joaquin SLJO ------ --- -loc15=San\\ Jose\\ De\\ Chiquitos SLJE ------ --- -loc16=Santa\\ Ana SLSA ------ --- -loc17=Sucre SLSU ------ --- -loc18=Tarija SLTJ ------ --- -loc19=Trinidad SLTR ------ --- -loc20=Villamontes SLVM ------ --- -loc21=Viru-Viru SLVR ------ --- -loc22=Yacuiba SLYA ------ --- - -[M__CL] -name=Chile -loc0=Antofagasta SCFA ------ --- -loc1=Arica SCAR ------ --- -loc2=Concepcion SCIE ------ --- -loc3=Iquique/Diego\\ Arac SCDA ------ --- -loc4=Pudahuel SCEL ------ --- -loc5=Puerto\\ Montt SCTE ------ --- -loc6=Punta\\ Arenas SCCI ------ --- - -[M__CO] -name=Colombia -loc0=Barranquilla/Ernestocortissoz SKBQ ------ --- -loc1=Bogota/Eldorado SKBO ------ --- -loc2=Bucaramanga/Palonegro SKBG ------ --- -loc3=Cali/Alfonso\\ Bonillaaragon SKCL ------ --- -loc4=Cartagena/Rafael\\ Nunez SKCG ------ --- -loc5=Leticia/Vasquez\\ Cobo SKLT ------ --- -loc6=Pereira/Matecana SKPE ------ --- -loc7=Rionegro/J.M.Cordova SKRG ------ --- -loc8=San\\ Andres\\ Isla/Sesquicentenario SKSP ------ --- -loc9=Santa\\ Marta/Simon\\ Bolivar SKSM ------ --- - -[M__EC] -name=Ecuador -loc0=Guayaquil/Simon\\ Bolivar SEGU ------ --- -loc1=Manta SEMT ------ --- -loc2=Quito/Mariscal\\ Sucre SEQU ------ --- - -[M__PY] -name=Paraguay -loc0=Asuncion SGAS ------ --- -loc1=Guarany SGES ------ --- - -[M__PE] -name=Peru -loc0=Andahuayla SPHY ------ --- -loc1=Arequipa SPQU ------ --- -loc2=Ayacucho SPHO ------ --- -loc3=Chiclayo SPHI ------ --- -loc4=Cuzco SPZO ------ --- -loc5=Huanuco SPNC ------ --- -loc6=Iquitos SPQT ------ --- -loc7=Juanjui SPJI ------ --- -loc8=Juliaca SPJL ------ --- -loc9=Lima-Callao SPIM ------ --- -loc10=Pisco SPSO ------ --- -loc11=Pucallpa SPCL ------ --- -loc12=Puerto\\ Maldonado SPTU ------ --- -loc13=Rioja SPJA ------ --- -loc14=Tacna SPTN ------ --- -loc15=Talara SPYL ------ --- -loc16=Yurimaguas SPMS ------ --- - -[M__SR] -name=Suriname -loc0=Johan\\ A.\\ Pengel SMJP ------ --- - -[M__UY] -name=Uruguay -loc0=Artigas SUAG ------ --- -loc1=Capitan\\ Corbeta SULS ------ --- -loc2=Colonia SUCA ------ --- -loc3=Durazno SUDU ------ --- -loc4=Maldonado/Punta\\ Est SUPE ------ --- -loc5=Melilla SUAA ------ --- -loc6=Montevideo/Carrasco SUMU ------ --- -loc7=Paysandu SUPU ------ --- -loc8=Rivera SURV ------ --- -loc9=Salto SUSO ------ --- -loc10=Tacuarembo SUTB ------ --- - -[M__VE] -name=Venezuela -loc0=Acarigua SVAC ------ --- -loc1=Barcelona SVBC ------ --- -loc2=Barinas SVBI ------ --- -loc3=Barquisimeto SVBM ------ --- -loc4=Calabozo SVCL ------ --- -loc5=Caracas\\ Maiquetia SVMI ------ --- -loc6=Ciudad\\ Bolivar SVCB ------ --- -loc7=Coro SVCR ------ --- -loc8=Cumana SVCU ------ --- -loc9=Guanare SVGU ------ --- -loc10=Maracaibo-La\\ Chinita SVMC ------ --- -loc11=Maracay-B.A.Sucre SVBS ------ --- -loc12=Margarita SVMG ------ --- -loc13=Mene\\ Grande SVMN ------ --- -loc14=Merida SVMD ------ --- -loc15=San\\ Antonio\\ Del\\ Tachira SVSA ------ --- -loc16=San\\ Fernando\\ De\\ Apure SVSR ------ --- -loc17=Valera* SVVL ------ --- -loc18=Caracas\\ La\\ Carlota SVFM ------ --- - -[M__AR] -name=Argentina -loc0=Aeroparque SABE ------ --- -loc1=Bahia\\ Blanca SAZB ------ --- -loc2=Bariloche SAZS ------ --- -loc3=Comodoro\\ Rivadavia SAVC ------ --- -loc4=Concordia SAAC ------ --- -loc5=Cordoba SACO ------ --- -loc6=Corrientes SARC ------ --- -loc7=Don\\ Torcuato SADD ------ --- -loc8=Ezeiza SAEZ ------ --- -loc9=Formosa SARF ------ --- -loc10=Iguazu SARI ------ --- -loc11=Jujuy SASJ ------ --- -loc12=Mar\\ Del\\ Plata SAZM ------ --- -loc13=Mendoza SAME ------ --- -loc14=Neuquen SAZN ------ --- -loc15=Paso\\ De\\ Los\\ Libres SARL ------ --- -loc16=Posadas SARP ------ --- -loc17=Resistencia SARE ------ --- -loc18=Rio\\ Gallegos SAWG ------ --- -loc19=Rio\\ Grande SAWE ------ --- -loc20=Rosario SAAR ------ --- -loc21=Salta SASA ------ --- -loc22=San\\ Juan SANU ------ --- -loc23=Santiago\\ Del\\ Estero SANE ------ --- -loc24=Sauce\\ Viejo SAAV ------ --- -loc25=Trelew SAVT ------ --- -loc26=Tucuman SANT ------ --- -loc27=Villa\\ Reynolds SAOR ------ --- - -[M__BR] -name=Brazil -loc0=Afonsos SBAF ------ --- -loc1=Altamira SBHT ------ --- -loc2=Aracaju SBAR ------ --- -loc3=Bage SBBG ------ --- -loc4=Bauru SBBU ------ --- -loc5=Belem SBBE ------ --- -loc6=Belo\\ Horizonte SBCF ------ --- -loc7=Belo\\ Horizonte\\ Apt SBBH ------ --- -loc8=Boa\\ Vista SBBV ------ --- -loc9=Brasilia SBBR ------ --- -loc10=Campinas SBKP ------ --- -loc11=Campo\\ Grande SBCG ------ --- -loc12=Caravelas SBCV ------ --- -loc13=Conceicao\\ Do\\ Araguaia SBAA ------ --- -loc14=Corumba SBCR ------ --- -loc15=Cuiaba SBCY ------ --- -loc16=Curitiba SBBI ------ --- -loc17=Curitiba\\ Apt SBCT ------ --- -loc18=Eduardo\\ Gomes\\ International SBEG ------ --- -loc19=Fernando\\ De\\ Noronha SBFN ------ --- -loc20=Florianopolis SBFL ------ --- -loc21=Fortaleza SBFZ ------ --- -loc22=Foz\\ Do\\ Iguacu SBFI ------ --- -loc23=Galeao SBGL ------ --- -loc24=Goiania SBGO ------ --- -loc25=Guaratingueta SBGW ------ --- -loc26=Guarulhos SBGR ------ --- -loc27=Itaituba SBIH ------ --- -loc28=Londrina SBLO ------ --- -loc29=Macae SBME ------ --- -loc30=Macapa SBMQ ------ --- -loc31=Maceio SBMO ------ --- -loc32=Manaus SBMN ------ --- -loc33=Maraba SBMA ------ --- -loc34=Marte SBMT ------ --- -loc35=Natal SBNT ------ --- -loc36=Pelotas SBPK ------ --- -loc37=Pirassununga SBYS ------ --- -loc38=Pocos\\ De\\ Caldas SBPC ------ --- -loc39=Ponta\\ Pora SBPP ------ --- -loc40=Porto\\ Alegre SBCO ------ --- -loc41=Porto\\ Alegre\\ Apt SBPA ------ --- -loc42=Porto\\ Velho SBPV ------ --- -loc43=Presidente\\ Prudente SBDN ------ --- -loc44=Recife SBRF ------ --- -loc45=Rio\\ /\\ Jacarepagua SBJR ------ --- -loc46=Rio\\ De\\ Janeiro SBRJ ------ --- -loc47=Salvador SBSV ------ --- -loc48=Santa\\ Cruz SBSC ------ --- -loc49=Santa\\ Maria SBSM ------ --- -loc50=Santarem SBSN ------ --- -loc51=Santos SBST ------ --- -loc52=Sao\\ Jose\\ Dos\\ Campo SBSJ ------ --- -loc53=Sao\\ Luiz SBSL ------ --- -loc54=Sao\\ Paulo SBSP ------ --- -loc55=Tabatinga SBTT ------ --- -loc56=Teresina SBTE ------ --- -loc57=Tucurui SBTU ------ --- -loc58=Uberaba SBUR ------ --- -loc59=Uruguaiana SBUG ------ --- -loc60=Vilhena SBVH ------ --- -loc61=Vitoria SBVT ------ --- - -[AT] -name=Atlantic -states=AG PR - -[AT_PR] -name=Puerto Rico -loc0=Aquadilla TJBQ ------ --- -loc1=San\\ Juan TJSJ ------ --- -loc2=Mayaguez TJMZ ------ --- -loc3=Ponce TJPS ------ --- - -[AT_AG] -name=Antigua and Barbuda -loc0=Antigua TAPA ------ --- - diff --git a/my-evolution/Locations.h b/my-evolution/Locations.h deleted file mode 100644 index 9da9d69b6b..0000000000 --- a/my-evolution/Locations.h +++ /dev/null @@ -1,2535 +0,0 @@ -N_("Aarhus") -N_("Abakan") -N_("Abbotsford") -N_("Aberdeen") -N_("Abha") -N_("Abilene") -N_("Abingdon") -N_("Abu Dhabi") -N_("Abu Dhabi - Bateen") -N_("Acajutla") -N_("Acapulco") -N_("Acarigua") -N_("Adak") -N_("Adana") -N_("Adana/Incirlik") -N_("Adelaide") -N_("Aden") -N_("Adrar") -N_("Aeroparque") -N_("Aeropuerto del Norte") -N_("Afonsos") -N_("Africa") -N_("Afyon") -N_("Agen") -N_("Aguascaliantes") -N_("Ahmadabad") -N_("Ahwaz") -N_("Ainsworth") -N_("Air Force") -N_("Ajaccio/Campo dell'Oro") -N_("Akeno Ab") -N_("Akita Airport") -N_("Akron") -N_("Akrotiri") -N_("Alabama") -N_("Al Ahsa") -N_("Al Ain") -N_("Alamogordo") -N_("Alamosa") -N_("Alaska") -N_("Al Baha") -N_("Albania") -N_("Albany") -N_("Albenga") -N_("Alberta") -N_("Alborg") -N_("Albuquerque") -N_("Alderney") -N_("Alesund") -N_("Alexandria") -N_("Alexandria-Esler") -N_("Alexandria/Nouzha") -N_("Alexandroupolis") -N_("Algeria") -N_("Alghero") -N_("Algona") -N_("Alicante") -N_("Alice") -N_("Alice Springs") -N_("Al-Jouf") -N_("Allentown") -N_("Alliance") -N_("Alma") -N_("Almeria") -N_("Alpena") -N_("Al Qaysumah") -N_("Alta") -N_("Altamira") -N_("Alton") -N_("Altoona") -N_("Alturas") -N_("Altus") -N_("Amami Airport") -N_("Amapala") -N_("Amarillo") -N_("Amasya") -N_("Ambler") -N_("Amelia") -N_("Amendola") -N_("Ames") -N_("Amritsar") -N_("Amsterdam") -N_("Anadyr") -N_("Anaktuvuk") -N_("Anapa") -N_("Anchorage") -N_("Anchorage - Elmendorf AFB") -N_("Ancona") -N_("Andahuayla") -N_("Anderson") -N_("Andoya") -N_("Andravida") -N_("Andrews AFB") -N_("Angleton") -N_("Aniak") -N_("Ankara/Esenboga") -N_("Ankara/Etimesgut") -N_("Annaba") -N_("Ann Arbor") -N_("Annette") -N_("Anniston") -N_("Antalya") -N_("Antartica") -N_("Antigo") -N_("Antigua") -N_("Antigua and Barbuda") -N_("Antofagasta") -N_("Antwerpen/Deurne") -N_("Aomori Airport") -N_("Apalachicola") -N_("Appleton") -N_("Aquadilla") -N_("Aracaju") -N_("Arad") -N_("Arar") -N_("Araxos") -N_("Arcata") -N_("Ardmore") -N_("Arequipa") -N_("Argentina") -N_("Arica") -N_("Arizona") -N_("Arkansas") -N_("Arkhangelsk") -N_("Arlington") -N_("Artigas") -N_("Asahikawa Ab") -N_("Asahikawa Airport") -N_("Ashburnam") -N_("Asheville") -N_("Ashfield") -N_("Ashiya Ab") -N_("Ashland") -N_("Asia") -N_("Aspen") -N_("Asswan") -N_("Astoria") -N_("Astrakhan") -N_("Asturias") -N_("Asuncion") -N_("Athens") -N_("Athinai") -N_("Atlanta") -N_("Atlantic") -N_("Atlantic City") -N_("Atsugi US NAS") -N_("Auburn") -N_("Auckland") -N_("Augsburg") -N_("Augusta") -N_("Aurora") -N_("Austin") -N_("Australasia") -N_("Australia") -N_("Austria") -N_("Avalon") -N_("Aviano") -N_("Ayacucho") -N_("Bage") -N_("Bagotville") -N_("Bahamas") -N_("Bahia Blanca") -N_("Bahias de Huatulco") -N_("Bahrain") -N_("Baker City") -N_("Bakersfield") -N_("Bale-Mulhouse") -N_("Balikesir") -N_("Balikesir/Bandirma") -N_("Ball Mountain") -N_("Baltimore") -N_("Baltimore-Glen Burnie") -N_("Banak") -N_("Bandarabbass") -N_("Bangor") -N_("Baracoa") -N_("Barbers Point") -N_("Barcelona") -N_("Bardufoss") -N_("Bar Harbor") -N_("Bari") -N_("Bariloche") -N_("Barinas") -N_("Barking Sand") -N_("Barksdale") -N_("Barnaul") -N_("Barquisimeto") -N_("Barranquilla/Ernestocortissoz") -N_("Barrow") -N_("Barter Island") -N_("Bartlesville") -N_("Bartow") -N_("Bastia") -N_("Batesville") -N_("Batman") -N_("Baton Rouge") -N_("Battle Creek") -N_("Battle Mountain") -N_("Bauru") -N_("Bayamo") -N_("Bayreuth") -N_("Beatrice") -N_("Beaufort") -N_("Beaumont") -N_("Beaumont-Port Arthur") -N_("Beauvais-Tille") -N_("Beauvechain") -N_("Beckley") -N_("Bedford") -N_("Beijing") -N_("Beirut") -N_("Beja") -N_("Belem") -N_("Belfast/Aldergrove") -N_("Belfast/Harbour") -N_("Belgium") -N_("Belgorod") -N_("Belize") -N_("Belleville") -N_("Bellingham") -N_("Belmar-Farmingdale") -N_("Belo Horizonte") -N_("Belo Horizonte Apt") -N_("Bemidji") -N_("Benbecula") -N_("Benina") -N_("Benton Harbor") -N_("Bentonville") -N_("Beograd") -N_("Bergamo") -N_("Bergen") -N_("Bergstrom AFB") -N_("Berlevag") -N_("Berlin") -N_("Berlin-Tegel") -N_("Berlin-Tempelhof") -N_("Bern") -N_("Bethel") -N_("Bethlehem Airport") -N_("Bettles") -N_("Beverly") -N_("Biarritz-Bayonne") -N_("Bicycle Lake") -N_("Biggin Hill") -N_("Big Piney") -N_("Big River Lake") -N_("Bilbao") -N_("Billings") -N_("Billund") -N_("Binghamton") -N_("Birmingham") -N_("Bisha") -N_("Bishop") -N_("Bismark") -N_("Blackpool") -N_("Blagoveschensk") -N_("Blanding") -N_("Block Island") -N_("Bloemfontein J. B. M. Hertzog ") -N_("Bloomington") -N_("Blue Canyon") -N_("Bluefield") -N_("Bluefields") -N_("Blythe") -N_("Boa Vista") -N_("Bocas del Toro") -N_("Bodo") -N_("Bogota/Eldorado") -N_("Boise") -N_("Bolivia") -N_("Bologna") -N_("Bolzano") -N_("Bombay/Santacruz") -N_("Boone") -N_("Bordeaux") -N_("Borger") -N_("Bornholm") -N_("Boscombe Down") -N_("Bosnia-Herzegovina") -N_("Boston") -N_("Boulmer") -N_("Bourges") -N_("Bournemouth") -N_("Bowling Green") -N_("Bozeman") -N_("Bradford") -N_("Bradshaw Field") -N_("Brainerd") -N_("Brasilia") -N_("Brasschaat") -N_("Bratislava") -N_("Bratsk") -N_("Braunschweig") -N_("Brazil") -N_("Bremen") -N_("Bremerton") -N_("Brest") -N_("Bridgeport") -N_("Brindisi") -N_("Brisbane") -N_("Bristol") -N_("British Columbia") -N_("Brno") -N_("Broadus") -N_("Broken Bow") -N_("Bronnoysund") -N_("Brookings") -N_("Brooksville") -N_("Broome") -N_("Brownsville") -N_("Brunswick") -N_("Brussels-National Airport") -N_("Bryansk") -N_("Bryce Canyon") -N_("Bucaramanga/Palonegro") -N_("Bucuresti") -N_("Bucuresti-Otopeni") -N_("Budapest") -N_("Buffalo") -N_("Bulgaria") -N_("Bullfrog") -N_("Burbank") -N_("Burgas") -N_("Burley") -N_("Burlington") -N_("Burnet") -N_("Burns") -N_("Bursa") -N_("Burwell") -N_("Butte") -N_("Caen-Carpiquet") -N_("Cagliari") -N_("Cairns") -N_("Cairo") -N_("Calabozo") -N_("Calcutta/Dum Dum") -N_("Caldwell") -N_("Calgary") -N_("Cali/Alfonso Bonillaaragon") -N_("Caliente") -N_("California") -N_("Calvi-Ste-Catherine") -N_("Camaguey") -N_("Camarillo") -N_("Cambridge") -N_("Cameron") -N_("Camiri") -N_("Campeche") -N_("Campinas") -N_("Campo") -N_("Campo Grande") -N_("Camp Stanley/H-207") -N_("Canaan") -N_("Canada") -N_("Canarias/Fuerteventura") -N_("Canarias/Gran Canaria") -N_("Canarias/Hierro") -N_("Canarias/Lanzarote") -N_("Canarias/La Palma") -N_("Canarias/Tenerife Norte") -N_("Canarias/Tenerife Sur") -N_("Canberra") -N_("Cancun") -N_("Cannes-Mandelieu") -N_("Cantwell") -N_("Cape Girardeau") -N_("Cape Hatteras") -N_("Cape Lisburne") -N_("Cape Newenham") -N_("Cape Romanzoff") -N_("Cape Town D. F. Malan ") -N_("Capitan Corbeta") -N_("Capo Mele") -N_("Caracas La Carlota") -N_("Caracas Maiquetia") -N_("Caravelas") -N_("Carbondale") -N_("Cardiff") -N_("Caribou") -N_("Carlisle") -N_("Carlsbad") -N_("Carroll") -N_("Cartagena/Rafael Nunez") -N_("Casa Granda") -N_("Cascade") -N_("Casper") -N_("Catacamas") -N_("Catania") -N_("Cayman Islands") -N_("Cayo Largo del Sur") -N_("Cazaux") -N_("Cecil NAS") -N_("Cedar City") -N_("Cedar Rapids") -N_("Central and South America") -N_("Cervia") -N_("Chacarita") -N_("Chadron") -N_("Challis") -N_("Chamberlain") -N_("Chambery") -N_("Champaign") -N_("Chandalar Lake") -N_("Chandler") -N_("Chania") -N_("Chanute") -N_("Chariton") -N_("Charleroi-Brussels South") -N_("Charles City") -N_("Charleston") -N_("Charlotte") -N_("Charlottesville") -N_("Chatham") -N_("Chattanooga") -N_("Cheboksary") -N_("Cheju") -N_("Chelyabinsk") -N_("Chengdu") -N_("Cherbourg") -N_("Cherry Point") -N_("Chetumal") -N_("Cheyenne") -N_("Chiang Kai Shek") -N_("Chia Tung") -N_("Chiayi") -N_("Chicago-DuPage") -N_("Chicago-Lakefront") -N_("Chicago-Midway") -N_("Chicago-O'Hare") -N_("Chichijima") -N_("Chiclayo") -N_("Chico") -N_("Chicopee Falls") -N_("Chievres") -N_("Chihhang") -N_("Chihuahua") -N_("Childress") -N_("Chile") -N_("China Lake") -N_("Chinandega") -N_("Chinmem/Shatou") -N_("Chino") -N_("Chippewa County") -N_("Chita") -N_("Chitose Ab") -N_("Chitose ASDF") -N_("Chofu Airport") -N_("Choluteca") -N_("Chongju Ab") -N_("Christchurch") -N_("Christmas Island") -N_("Chulitna") -N_("Churchill") -N_("Churchill Falls") -N_("Cincinnati") -N_("Circle City") -N_("Ciudad Bolivar") -N_("Ciudad del Carmen") -N_("Ciudad Juarez") -N_("Ciudad Obregon") -N_("Ciudad Victoria") -N_("Clarinda") -N_("Clarion") -N_("Clarksburg") -N_("Clayton") -N_("Clayton Lake") -N_("Clermont-Ferrand") -N_("Cleveland") -N_("Cleveland/Cuyahoga") -N_("Cleveland-Lakefront") -N_("Clinton") -N_("Clovis-Cannon AFB") -N_("Cobija") -N_("Cochabamba") -N_("Cocoa Beach") -N_("Cocos Island") -N_("Cody") -N_("Coeur d'Alene") -N_("Cold Bay") -N_("Colima") -N_("College Station") -N_("Colmar-Meyenheim") -N_("Colombia") -N_("Colonia") -N_("Colorado") -N_("Colorado Springs") -N_("Columbia") -N_("Columbia-McEntire") -N_("Columbus") -N_("Columbus-Fort Benning") -N_("Columbus-Gahanna") -N_("Columbus-OSU") -N_("Columbus-W Point-Starkville") -N_("Colville") -N_("Comodoro Rivadavia") -N_("Comox") -N_("Conceicao Do Araguaia") -N_("Concepcion") -N_("Concord") -N_("Concordia") -N_("Connaught") -N_("Connecticut") -N_("Conroe") -N_("Constantine") -N_("Copper Harbor") -N_("Cordoba") -N_("Cordova") -N_("Cork") -N_("Coro") -N_("Corona") -N_("Corpus Christi") -N_("Corpus Christi NAS") -N_("Corrientes") -N_("Corsicana") -N_("Cortez") -N_("Corumba") -N_("Costa Rica") -N_("Cotulla") -N_("Council Bluffs") -N_("Coventry") -N_("Covington") -N_("Cozumel") -N_("Craig") -N_("Cranfield") -N_("Crescent City") -N_("Creston") -N_("Crestview") -N_("Croatia") -N_("Cross City") -N_("Crossville") -N_("Crotone") -N_("Cuba") -N_("Cuba Awrs") -N_("Cuernavaca") -N_("Cuiaba") -N_("Culdrose") -N_("Culiacan") -N_("Cumana") -N_("Cumberland") -N_("Curitiba") -N_("Curitiba Apt") -N_("Custer") -N_("Cut Bank") -N_("Cuzco") -N_("Cyprus") -N_("Czech Republic") -N_("Dagali") -N_("Daggett") -N_("Dalhart") -N_("Dalian") -N_("Dallas-Addison") -N_("Dallas-Fort Worth") -N_("Dallas-Love Field") -N_("Dallas-Redbird") -N_("Da Nang") -N_("Danbury") -N_("Danville") -N_("Dar-El-Beida") -N_("Davenport") -N_("David") -N_("Dawadmi") -N_("Dayton") -N_("Daytona Beach") -N_("Dayton-Fairborn") -N_("Dayton-South Airport") -N_("Dead Horse") -N_("Deauville-Saint-Gatien") -N_("Decatur") -N_("Decimomannu") -N_("Decorah") -N_("Deelen") -N_("Dekalb/Peachtree") -N_("Delaware") -N_("Del Bajio") -N_("Del Rio") -N_("Delta") -N_("Deming") -N_("Den Helder/De Kooy") -N_("Denison") -N_("Denmark") -N_("Denton") -N_("Denver") -N_("Denver-Aurora") -N_("Denver-Broomfield") -N_("Denver-Cherry Knolls") -N_("Desert Rock") -N_("Des Moines") -N_("Destin") -N_("Detroit") -N_("Detroit Lakes") -N_("Detroit-Taylor") -N_("Detroit/Ypsilanti") -N_("Devils Lake") -N_("Devils Lake (2)") -N_("Dhahran") -N_("Dickinson") -N_("Dijon") -N_("Dillingham") -N_("Dillon") -N_("Dinard") -N_("District of Columbia") -N_("Diyarbakir") -N_("Dnipropetrovsk") -N_("Dobbiaco") -N_("Dodge City") -N_("Doha") -N_("Dole") -N_("Dominican Republic") -N_("Donetsk") -N_("Dongsha") -N_("Dongshi") -N_("Don Torcuato") -N_("Dortmund-Wickede") -N_("Dothan") -N_("Douglas") -N_("Dover") -N_("Dresden-Klotzsche") -N_("Drummond") -N_("Dubai") -N_("Dubbo") -N_("Dublin") -N_("Du Bois") -N_("Dubrovnik") -N_("Dubuque") -N_("Dugway") -N_("Duluth") -N_("Dundee") -N_("Durango") -N_("Durango Awrs") -N_("Durazno") -N_("Durban Louis Botha ") -N_("Dusseldorf") -N_("Dutch Harbor") -N_("Dyersburg") -N_("Eagle") -N_("Eagle Range") -N_("East London") -N_("East Midlands") -N_("East St Louis") -N_("Eau Claire") -N_("Ecuador") -N_("Edinburgh") -N_("Edmonton") -N_("Edmonton/Villeneuve") -N_("Eduardo Gomes International") -N_("Edwards AFB") -N_("Egilsstadir") -N_("Eglin") -N_("Eglington/Londonderry") -N_("Egypt") -N_("Eindhoven") -N_("Ekofisk") -N_("Elazig") -N_("El Centro") -N_("El Dorado") -N_("Elefsis") -N_("Elfin Cove") -N_("Elizabeth City") -N_("Elk City") -N_("Elkhart") -N_("Elkins") -N_("Elko") -N_("Elmira") -N_("El Monte") -N_("El Paso") -N_("El Salvador") -N_("El Salvador Int.") -N_("Elsenborn") -N_("Ely") -N_("Emmonak") -N_("Emporia") -N_("Enid") -N_("Enid/Woodring") -N_("Enosburg Falls") -N_("Ephrata") -N_("Ercan") -N_("Erie") -N_("Erzurum") -N_("Esbjerg") -N_("Escanaba") -N_("Esfahan") -N_("Eskisehir") -N_("Estherville") -N_("Estonia") -N_("Eugene") -N_("Eureka") -N_("Europe") -N_("Evanston") -N_("Evansville") -N_("Everett") -N_("Evergreen") -N_("Evreux-Fauville") -N_("Exeter") -N_("Ezeiza") -N_("Fagernes") -N_("Fairbanks") -N_("Fairchild") -N_("Fairfield") -N_("Fairmont") -N_("Fallon") -N_("Falls City") -N_("Falmouth-Otis AFB") -N_("Farbanks/Eielson AFB") -N_("Fargo") -N_("Farmingdale") -N_("Farmington") -N_("Farmville") -N_("Faro") -N_("Fayetteville") -N_("Feng Nin") -N_("Fergus Falls") -N_("Fernando De Noronha") -N_("Ferrara") -N_("Figari") -N_("Findlay") -N_("Finland") -N_("Firenze") -N_("Fitchburg") -N_("Flagstaff") -N_("Flint") -N_("Flippin") -N_("Florence") -N_("Florennes") -N_("Flores") -N_("Florianopolis") -N_("Florida") -N_("Floro") -N_("Fond Du Lac") -N_("Forde/Bringeland") -N_("Forli") -N_("Formosa") -N_("Fortaleza") -N_("Fort Belvoir") -N_("Fort Benning") -N_("Fort Bragg") -N_("Fort Campbell") -N_("Fort Carson") -N_("Fort Collins") -N_("Fort Collins/Lovel") -N_("Fort Dodge") -N_("Fort Drum") -N_("Fort Eustis") -N_("Fort Greely/Allen AAF") -N_("Fort Huachuca") -N_("Fort Knox") -N_("Fort Lauderdale") -N_("Fort Lauderdale (International)") -N_("Fort Leonard") -N_("Fort Lewis") -N_("Fort Madison") -N_("Fort Meade") -N_("Fort Myers (Page Field)") -N_("Fort Myers (Southwest Florida International)") -N_("Fort Polk-Leesville") -N_("Fort Riley") -N_("Fort Sill") -N_("Fort Smith") -N_("Fort Stewart") -N_("Fort Stockton") -N_("Fort Wayne") -N_("Fort Worth-Alliance") -N_("Fort Worth-Meacham") -N_("Fort Worth NAS") -N_("Fourchon") -N_("Foz Do Iguacu") -N_("France") -N_("Frankfort") -N_("Frankfurt/Main") -N_("Franklin") -N_("Fredericton") -N_("Freeport") -N_("Frenchville") -N_("Fresno") -N_("Fresno-Chandler") -N_("Friday Harbor") -N_("Friedrichshafen") -N_("Frigg") -N_("Frontone") -N_("Frosinone") -N_("Fryeburg") -N_("Fujairah") -N_("Fuji Ab") -N_("Fukue Airport") -N_("Fukui Airport") -N_("Fukuoka Airport") -N_("Fullerton") -N_("Funchal") -N_("FYR Macedonia") -N_("Gadsden") -N_("Gage") -N_("Gainesville") -N_("Galax-Hillsville") -N_("Galbraith Lake") -N_("Galeao") -N_("Galena") -N_("Galesburg") -N_("Gallup") -N_("Galveston") -N_("Gambell") -N_("Gander") -N_("Garden City") -N_("Gary") -N_("Gassim") -N_("Gatineau") -N_("Gaziantep") -N_("Gdansk") -N_("Geneve") -N_("Genova") -N_("George Airport") -N_("Georgetown") -N_("Georgia") -N_("Germany") -N_("Ghardaia") -N_("Ghedi") -N_("Gibraltar") -N_("Gifu Ab") -N_("Gila Bend") -N_("Gillette") -N_("Gilze-Rijen") -N_("Gioia del Colle") -N_("Girona") -N_("Gizan") -N_("Glasgow") -N_("Glendive") -N_("Glens Falls") -N_("Goiania") -N_("Goldsboro") -N_("Goodland") -N_("Goose Bay") -N_("Goteborg (Landvetter)") -N_("Goteborg (Save)") -N_("Granada") -N_("Grand Canyon") -N_("Grand Cayman") -N_("Grand Forks") -N_("Grand Island") -N_("Grand Isle") -N_("Grand Junction") -N_("Grand Marais") -N_("Grand Rapids") -N_("Grandview") -N_("Grangeville") -N_("Grants") -N_("Graz") -N_("Great Falls") -N_("Greece") -N_("Greeley") -N_("Green Bay") -N_("Green River") -N_("Greensboro") -N_("Greenville") -N_("Greenville-Spartanburg") -N_("Greenwood") -N_("Grenoble-Saint-Geoirs") -N_("Griffiss AFB") -N_("Groningen") -N_("Grosseto") -N_("Groton") -N_("Guadalajara") -N_("Guadalupe Pass") -N_("Guanare") -N_("Guangzhou") -N_("Guantanamo") -N_("Guarany") -N_("Guaratingueta") -N_("Guarulhos") -N_("Guatemala") -N_("Guayaquil/Simon Bolivar") -N_("Guaymas") -N_("Guernsey") -N_("Guidonia") -N_("Gulfport") -N_("Gulkana") -N_("Gullfax C") -N_("Gunnison") -N_("Gunnison (2)") -N_("Guriat") -N_("Gustavus") -N_("Guymon") -N_("Habana") -N_("Hachijojima Airport") -N_("Hachinohe Ab") -N_("Hafr Al-Batin") -N_("Hagerstown") -N_("Hail") -N_("Hailey-Sun Valley") -N_("Haines") -N_("Haiti") -N_("Hakodate Airport") -N_("Halifax") -N_("Hamamatsu Ab") -N_("Hamburg") -N_("Hamburg-Finkenwerder") -N_("Hamilton") -N_("Hammerfest") -N_("Hampton") -N_("Hanamaki Airport") -N_("Hancock") -N_("Hangzhou") -N_("Hanksville") -N_("Hannover") -N_("Ha Noi") -N_("Harbor Beach") -N_("Harlingen") -N_("Harlowton") -N_("Harrisburg") -N_("Harrison") -N_("Harstad/Narvik/Evenes") -N_("Hartford") -N_("Hassi-Messaoud") -N_("Hastings") -N_("Haugesund") -N_("Havre") -N_("Hawaii") -N_("Hawthorne") -N_("Hayden") -N_("Hayes River") -N_("Hays") -N_("Hayward") -N_("Healy River") -N_("Helena") -N_("Helsinki") -N_("Henderson") -N_("Hengchun") -N_("Hermosillo") -N_("Hibbing") -N_("Hickory") -N_("Hill City") -N_("Hillsboro") -N_("Hilo") -N_("Hinesville") -N_("Hiroshima Airport") -N_("Hobart") -N_("Hobbs") -N_("Ho Chi Minh") -N_("Hodeidah") -N_("Hof") -N_("Hoffman") -N_("Hofu Ab") -N_("Hohenems") -N_("Holguin") -N_("Homer") -N_("Homestead AFB") -N_("Hondo") -N_("Honduras") -N_("Hong Kong") -N_("Honningsvag") -N_("Honolulu") -N_("Hoonah") -N_("Hoquiam") -N_("Hot Springs") -N_("Houghton Lake") -N_("Houlton") -N_("Houma") -N_("Houston-Bush") -N_("Houston-Clover") -N_("Houston-Ellington Field") -N_("Houston-Hobby") -N_("Houston-Hooks") -N_("Howard AFB") -N_("Hsinchu") -N_("Huanuco") -N_("Huehuetenango") -N_("Hulien") -N_("Humberside") -N_("Hungary") -N_("Huntington") -N_("Huntsville") -N_("Hurlburt") -N_("Huron") -N_("Hutchinson") -N_("Hyakuri Ab") -N_("Hyannis") -N_("Hyderabad") -N_("Hyeres-Le Palyvestre") -N_("Iasi") -N_("Ibiza") -N_("Iceland") -N_("Ichikawa") -N_("Idaho") -N_("Idaho Falls") -N_("Iguazu") -N_("Iki Airport") -N_("Ilan") -N_("Iliamna") -N_("Illinois") -N_("Imperial") -N_("Imperial (2)") -N_("Imperial Beach") -N_("In Amenas") -N_("India") -N_("Indiana") -N_("Indianapolis") -N_("Indian Springs") -N_("Innsbruck") -N_("International Falls") -N_("Intracoastal") -N_("Inverness") -N_("Inyokern") -N_("Iowa") -N_("Iowa City") -N_("Iqaluit") -N_("Iquique/Diego Arac") -N_("Iquitos") -N_("Iraklion") -N_("Iran, Islamic Republic of") -N_("Ireland") -N_("Iron Mountain") -N_("Ironwood") -N_("Iruma Ab") -N_("Islamabad") -N_("Isle of Man") -N_("Islip") -N_("Istanbul") -N_("Itaituba") -N_("Italy") -N_("Ithaca") -N_("Ivano-Frankivsk") -N_("Iwakuni MCAS") -N_("Iwojima") -N_("Ixtapa") -N_("Izmir/Adnan Menderes") -N_("Izmir/Cigli") -N_("Izmit") -N_("Izumo Airport") -N_("Jackson") -N_("Jacksonville") -N_("Jacksonville-Craig Airport") -N_("Jacksonville NAS") -N_("Jaffrey") -N_("Jamaica") -N_("Jamestown") -N_("Janesville") -N_("Jan Smuts") -N_("Japan") -N_("Jeddah King Abdul Aziz International Airport") -N_("Jefferson City") -N_("Jerez") -N_("Jersey") -N_("Jinotega") -N_("Johan A. Pengel") -N_("Johnstown") -N_("Jonesboro") -N_("Jonkoping") -N_("Joplin") -N_("Jordan") -N_("Juanjui") -N_("Juan Santamaria") -N_("Juigalpa") -N_("Jujuy") -N_("Juliaca") -N_("Junction") -N_("Juneau") -N_("Kadena Ab") -N_("Kagoshima Airport") -N_("Kahului") -N_("Kailua-Kona") -N_("Kake") -N_("Kalamata") -N_("Kalamazoo") -N_("Kalispell") -N_("Kamigoto") -N_("Kaneohe") -N_("Kangshan") -N_("Kanoya Ab") -N_("Kansai International Airport") -N_("Kansas") -N_("Kansas City") -N_("Kansas City-Gladstone") -N_("Kaohsiung") -N_("Karachi") -N_("Karup") -N_("Kassel-Calden") -N_("Kasumigaura Ab") -N_("Kasuminome Ab") -N_("Katowice") -N_("Kavala") -N_("Kayseri") -N_("Kazan") -N_("Kearney") -N_("Keene") -N_("Kefallinia") -N_("Keflavik") -N_("Kenai") -N_("Kenosha") -N_("Kentucky") -N_("Keokuk") -N_("Kerkira") -N_("Kerman") -N_("Ketchikan") -N_("Key West") -N_("Key West NAS") -N_("Khabarovsk") -N_("Khamis Mushait") -N_("Kharkiv") -N_("Kikai Island") -N_("Killeen") -N_("Killeen-Ft Hood") -N_("Killeen-Gray AAF") -N_("King Khaled International Airport") -N_("Kingman") -N_("King Salmon") -N_("Kingston") -N_("Kingsville") -N_("Kinloss") -N_("Kinston") -N_("Kirkenes") -N_("Kirksville") -N_("Kiruna") -N_("Kisarazu Ab") -N_("Kishineu") -N_("Kitakyushu Airport") -N_("Klagenfurt") -N_("Klamath Falls") -N_("Klawock") -N_("Kleine Brogel") -N_("Kliningrad") -N_("Knoxville") -N_("Knoxville-Downtown") -N_("Kobenhavn/Kastrup") -N_("Kobenhavn/Roskilde") -N_("Kochi Airport") -N_("Kodiak") -N_("Kogalniceanu") -N_("Kogalym") -N_("Koksijde") -N_("Kolding/Vandrup") -N_("Koln/Bonn") -N_("Komatsu Ab") -N_("Komatsujima Ab") -N_("Konya") -N_("Korea, Democratic People's Republic of") -N_("Korea, Republic of") -N_("Kos") -N_("Kotzebue") -N_("Kozani") -N_("Krakow") -N_("Krasnodar") -N_("Krasnoyarsk") -N_("Kristiansand/Kjevik") -N_("Kristiansund/Kvernberget") -N_("Kryviy Rig/Lozovatka") -N_("Kumamoto Airport") -N_("Kunming") -N_("Kushiro Airport") -N_("Kuwait") -N_("Kyiv/Boryspil") -N_("Kyiv/Zhulyany") -N_("La Ceiba") -N_("Laconia") -N_("La Coruna") -N_("La Crosse") -N_("La Esperanza") -N_("Lafayette") -N_("La Grande") -N_("Lahaina") -N_("Lahore") -N_("Lajes") -N_("La Junta") -N_("Lake Charles") -N_("Lake Hood") -N_("Lakehurst") -N_("Lakeland") -N_("Lake Tahoe") -N_("Lakeview") -N_("Lamar") -N_("La Mesa") -N_("Lamezia") -N_("Lamoni") -N_("Lampedusa") -N_("Lanai") -N_("Lancaster") -N_("Lander") -N_("Langebaanweg") -N_("Langley AFB") -N_("Lannion") -N_("Lansing") -N_("Lanzhou") -N_("La Paz") -N_("La Paz/Alto") -N_("Laramie") -N_("Laredo") -N_("Larnaka") -N_("La Romana") -N_("Las Americas") -N_("Las Tunas") -N_("Las Vegas") -N_("Latina") -N_("Latrobe") -N_("Laughlin") -N_("Laurel") -N_("La Verne") -N_("Lawrence") -N_("Lawton") -N_("Leadville") -N_("Learmouth") -N_("Lebanon") -N_("Lecce") -N_("Leeds and Bradford") -N_("Leesburg") -N_("Leeuwarden") -N_("Le Havre-Octeville") -N_("Leipzig-Schkeuditz") -N_("Leknes") -N_("Le Mans") -N_("Le Marine") -N_("Lemmon") -N_("Lemoore") -N_("Leticia/Vasquez Cobo") -N_("Le Touquet") -N_("Leuchars") -N_("Lewisburg") -N_("Lewiston") -N_("Lewistown") -N_("Lexington") -N_("Liberal") -N_("Liberia") -N_("Libya") -N_("Lichtenburg") -N_("Lidgerwood") -N_("Liege") -N_("Lihue") -N_("Lille-Lesquin") -N_("Lima-Callao") -N_("Limnos") -N_("Limoges") -N_("Limon") -N_("Lincoln") -N_("Linz") -N_("Lisboa") -N_("Lista") -N_("Litchfield") -N_("Lithuania") -N_("Little Rock") -N_("Little Rock AFB") -N_("Livermore") -N_("Liverpool") -N_("Livingston") -N_("Ljubljana") -N_("Logan") -N_("Lolland Falster") -N_("Lompoc") -N_("London") -N_("London/City") -N_("London/Gatwick") -N_("London/Heathrow") -N_("London/Stansted") -N_("Londrina") -N_("Lone Rock") -N_("Long Beach") -N_("Longview") -N_("Lorient-Lann-Bihoue") -N_("Los Alamos") -N_("Los Angeles") -N_("Los Mochis") -N_("Lossiemouth") -N_("Louisville") -N_("Louisville-Standiford Field") -N_("Lousiana") -N_("Lovelock") -N_("Lubbock") -N_("Lubeck-Blankensee") -N_("Lufkin") -N_("Lugano") -N_("Luqa") -N_("Luton") -N_("Luxembourg") -N_("Luxeuil") -N_("Luxor") -N_("Lviv") -N_("Lynchburg") -N_("Lyneham") -N_("Lyon-Bron") -N_("Lyon-Satolas") -N_("Maastricht") -N_("Macae") -N_("Macapa") -N_("Maceio") -N_("Macon") -N_("Madinah") -N_("Madison") -N_("Madras/Minambakkam") -N_("Madrid (Barajas)") -N_("Madrid (Cuatro Vientos)") -N_("Magadan") -N_("Magdalena") -N_("Maine") -N_("Makhachkala") -N_("Makkah") -N_("Makung") -N_("Malad City") -N_("Malaga") -N_("Malatya") -N_("Maldonado/Punta Est") -N_("Malmo/Sturup") -N_("Malta") -N_("Mammoth Lakes") -N_("Managua") -N_("Manassas") -N_("Manaus") -N_("Manchester") -N_("Mangilsan Ab") -N_("Manhattan") -N_("Manisa") -N_("Manistee") -N_("Manitoba") -N_("Manitowoc") -N_("Mankato") -N_("Mansfield") -N_("Manta") -N_("Manzanillo") -N_("Maraba") -N_("Maracaibo-La Chinita") -N_("Maracay-B.A.Sucre") -N_("Marathon") -N_("Mar Del Plata") -N_("Margarita") -N_("Marianna") -N_("Marib") -N_("Maribor") -N_("Marietta") -N_("Marino di Ravenna") -N_("Marion") -N_("Marion-Wytheville") -N_("Marseille-Provence") -N_("Marseilles") -N_("Marshall") -N_("Marshalltown") -N_("Marshfield") -N_("Marte") -N_("Marthas Vineyard") -N_("Martinsburg") -N_("Martinsville") -N_("Maryland") -N_("Marysville") -N_("Marysville-Beale AFB") -N_("Mashhad") -N_("Masirah") -N_("Mason City") -N_("Massachusetts") -N_("Massena") -N_("Matamoros") -N_("Matsumoto Airport") -N_("Matsushima Ab") -N_("Matsuyama Airport") -N_("Mattoon") -N_("Mayaguez") -N_("Mayport") -N_("Mazatlan") -N_("Mazu") -N_("McAlester") -N_("McAllen") -N_("McCall") -N_("McCarthy") -N_("McClellan") -N_("McComb") -N_("McCook") -N_("McGrath") -N_("Mc Gregor") -N_("Meacham") -N_("Medford") -N_("Medicine Lodge") -N_("Mehamn") -N_("Mekoryuk") -N_("Melbourne") -N_("Melfa") -N_("Melilla") -N_("Memambetsu Airport") -N_("Memphis") -N_("Memphis-NAS") -N_("Mendoza") -N_("Mene Grande") -N_("Menominee") -N_("Menorca") -N_("Merced") -N_("Merida") -N_("Meridian") -N_("Meridian-Lauderdale") -N_("Merril Field") -N_("Mersa Matruh") -N_("Mesa-Falcon Field") -N_("Metabaru Ab") -N_("Metz-Frescaty") -N_("Mexicali") -N_("Mexico") -N_("Miami") -N_("Miami-Kendall") -N_("Miami-Opa Locka") -N_("Michigan") -N_("Middle East") -N_("Middleton Island") -N_("Middletown") -N_("Midland") -N_("Miho Ab") -N_("Milano/Linate") -N_("Milano/Malpensa") -N_("Miles City") -N_("Milford") -N_("Millinocket") -N_("Millville") -N_("Milton") -N_("Milwaukee") -N_("Milwaukee-Timmerman") -N_("Minamitorishima") -N_("Minatitlan") -N_("Minchumina") -N_("Mineralnye Vody") -N_("Mineral Wells") -N_("Minneapolis") -N_("Minneapolis [2]") -N_("Minneapolis [3]") -N_("Minnesota") -N_("Minocqua") -N_("Minot") -N_("Minot AFB") -N_("Misawa Ab") -N_("Mississippi") -N_("Missoula") -N_("Missouri") -N_("Mitchell") -N_("Mitilini") -N_("Miyakejima Airport") -N_("Miyazaki Airport") -N_("Moa") -N_("Mobile Downtown") -N_("Mobile Regional Airport") -N_("Mobridge") -N_("Modesto") -N_("Mo I Rana") -N_("Mojave") -N_("Molde") -N_("Moldova") -N_("Moline-Quad Cities") -N_("Molokai") -N_("Mombetsu Airport") -N_("Monchengladbach") -N_("Monclova") -N_("Moncton") -N_("Monida") -N_("Monpellier-Mediterrannee") -N_("Monroe") -N_("Montague") -N_("Montana") -N_("Mont-de-Marsan") -N_("Monte Argentario") -N_("Monte Bisbino") -N_("Monte Calamita") -N_("Monte Cimone") -N_("Montego Bay") -N_("Monte Malanotte") -N_("Monterey") -N_("Monterrey") -N_("Monte Scuro") -N_("Monte Terminillo") -N_("Montevideo/Carrasco") -N_("Montgomery") -N_("Montgomery-Maxwell AFB") -N_("Monticello") -N_("Montpelier") -N_("Montreal Dorval") -N_("Montreal Mirabel") -N_("Montreal Saint-Hubert") -N_("Montrose") -N_("Montrose (2)") -N_("Morelia") -N_("Morgantown") -N_("Moriarty") -N_("Morocco") -N_("Morristown") -N_("Moscow Domodedovo") -N_("Moscow Sheremetyevo") -N_("Moses Lake") -N_("Mosinee") -N_("Mosjoen") -N_("Moultrie") -N_("Mountain Home") -N_("Mountain View") -N_("Mount Clemens") -N_("Mount Holly") -N_("Mount Shasta") -N_("Mount Vernon") -N_("Mount Wilson") -N_("Mt Washington") -N_("Mugla/Dalaman") -N_("Muir") -N_("Mullan") -N_("Mullen") -N_("Munchen") -N_("Muncie") -N_("Munster/Osnabruck") -N_("Murcia") -N_("Murmansk") -N_("Mus") -N_("Muscatine") -N_("Muscle Shoals") -N_("Muskegon") -N_("Mykonos") -N_("Myrtle Beach") -N_("Nabesna/Devil Mt.") -N_("Nacogdoches") -N_("Nagasaki Airport") -N_("Nagoya Airport") -N_("Nagpur Sonegaon") -N_("Naha Airport") -N_("Najran") -N_("Nakashibetsu Airport") -N_("Nalchik") -N_("Namsos") -N_("Nancy-Essey") -N_("Nancy-Ochey") -N_("Nankishirahama Airport") -N_("Nanning") -N_("Nantes Adlantique") -N_("Nantucket") -N_("Napa") -N_("Naples") -N_("Napoli") -N_("Narvik") -N_("Nasa Shuttle") -N_("Nashua") -N_("Nashville") -N_("Nassau") -N_("Natal") -N_("Natchez") -N_("Nawabshah") -N_("Nebraska") -N_("Needles") -N_("Nenana") -N_("Netherlands") -N_("Neuquen") -N_("Nevada") -N_("Newark") -N_("New Bedford") -N_("New Bern") -N_("New Braunfels") -N_("New Brunswick") -N_("Newburgh") -N_("Newcastle") -N_("New Delhi/Palam") -N_("Newfoundland") -N_("New Hampshire") -N_("New Haven") -N_("New Iberia") -N_("New Jersey") -N_("New Mexico") -N_("New Orleans") -N_("New Orleans-Lakefront") -N_("New Orleans NAS") -N_("Newport") -N_("Newport News") -N_("New Port Richey") -N_("New River") -N_("New Tokyo International Airport") -N_("Newton") -N_("New York") -N_("New York-JFK Arpt") -N_("New York-La Guardia") -N_("New Zealand") -N_("Niagara Falls") -N_("Nicaragua") -N_("Nice-Cote d'Azur") -N_("Niigata Airport") -N_("Nimes-Garons") -N_("Nipawin") -N_("Nis") -N_("Nizhny Novgorod") -N_("N Las Vegas") -N_("N Myrtle Beach") -N_("Nogales") -N_("Nome") -N_("Norfolk") -N_("Norfolk Island") -N_("Norfolk NAS") -N_("Norrkoping") -N_("North Adams") -N_("North Bend") -N_("North Carolina") -N_("North Conway") -N_("North Dakota") -N_("Northeast Philadelphia") -N_("North Kingstown") -N_("North Platte") -N_("Northway") -N_("Northwest Territories") -N_("Norway") -N_("Norwich") -N_("Norwood") -N_("Notodden") -N_("Novara/Cameri") -N_("Nova Scotia") -N_("Novosibirsk") -N_("Nueva Gerona") -N_("Nueva Ocotepeque") -N_("Nuevo Laredo") -N_("Nurnberg") -N_("Nyutabaru Ab") -N_("Oahu") -N_("Oak Harbor") -N_("Oakland") -N_("Oaxaca") -N_("Oberpfaffenhofen") -N_("Obihiro Airport") -N_("Ocala") -N_("Oceanside") -N_("Odense") -N_("Odesa") -N_("Oelwen") -N_("Ogden") -N_("Ogden-Hill AFB") -N_("Ogdensburg") -N_("Ohio") -N_("Ohrid") -N_("Oita Airport") -N_("Ojika Island") -N_("Okayama Airport") -N_("Oki Airport") -N_("Okinoerabu") -N_("Oklahoma") -N_("Oklahoma City") -N_("Oklahoma City-Bethany") -N_("Oklahoma City-Midwest City") -N_("Okushiri Island") -N_("Olathe") -N_("Olathe/Ind.") -N_("Olbia") -N_("Olympia") -N_("Omaha") -N_("Omaha-Bellevue") -N_("Omak") -N_("Oman") -N_("Ominato Ab") -N_("Omsk") -N_("O'Neill") -N_("Ontario") -N_("Oostende") -N_("Oran") -N_("Oran/Es Senia") -N_("Orange") -N_("Orange City") -N_("Ord-Sharp") -N_("Oregon") -N_("Orenburg") -N_("Orland") -N_("Orlando") -N_("Orlando (Orlando International)") -N_("Orsta-Volda") -N_("Oruro") -N_("Osaka International Airport") -N_("Osan Ab") -N_("Oscoda") -N_("Oseberg A") -N_("Oshima Airport") -N_("Oshkosh") -N_("Oslo/Gardenmoen") -N_("Ostrava") -N_("Ottawa") -N_("Ottumwa") -N_("Owensboro") -N_("Owyhee") -N_("Oxford") -N_("Oxnard") -N_("Ozark") -N_("Ozuki Ab") -N_("Paderborn-Haxterberg") -N_("Padova") -N_("Paducah") -N_("Paekado") -N_("Paengnyongdo Ab") -N_("Paganella") -N_("Page") -N_("Pakistan") -N_("Pa Kuei/Bakuai") -N_("Palacios") -N_("Palermo") -N_("Palma de Mallorca") -N_("Palmdale") -N_("Palmer") -N_("Palm Springs") -N_("Palo Alto") -N_("Pamplona") -N_("Panama") -N_("Panama City") -N_("Pantelleria") -N_("Papa") -N_("Paphos") -N_("Paraguay") -N_("Paris") -N_("Paris/Charles De Gaulle") -N_("Paris/Le Bourget") -N_("Paris/Orly") -N_("Parkersburg") -N_("Pasco") -N_("Paso De Los Libres") -N_("Paso Robles") -N_("Passo dei Giovi") -N_("Passo della Cisa") -N_("Passo Resia") -N_("Passo Rolle") -N_("Patna") -N_("Patterson") -N_("Patuxent River") -N_("Pau/Pyrenees") -N_("Paxson") -N_("Paysandu") -N_("Payson") -N_("Pellston") -N_("Pelotas") -N_("Pendleton") -N_("Pennsylvania") -N_("Penn Yan") -N_("Pensacola") -N_("Pensacola NAS") -N_("People's Republic of China") -N_("Peoria") -N_("Pequot Lakes") -N_("Pereira/Matecana") -N_("Perm") -N_("Perpignan-Rivesaltes") -N_("Perry-Foley") -N_("Perth") -N_("Peru") -N_("Perugia") -N_("Pescara") -N_("Petersburg") -N_("Petropavlovsk-Kamchatsky") -N_("Petrozavodsk") -N_("Philadelphia") -N_("Philip") -N_("Philipsburg") -N_("Phillips") -N_("Phoenix") -N_("Phoenix-Deer Valley") -N_("Phoenix-Goodyear") -N_("Phoenix-Luke AFB") -N_("Piacenza") -N_("Pian Rosa") -N_("Piedras Negras") -N_("Pierre") -N_("Pietersburg") -N_("Pikeville") -N_("Pine Bluff") -N_("Pingtung North") -N_("Pingtung South") -N_("Pirassununga") -N_("Pisa") -N_("Pisco") -N_("Pittsburgh") -N_("Pittsburgh-West Mifflin") -N_("Plattsburg") -N_("Plovdiv") -N_("Plymouth") -N_("Pocatello") -N_("Pocos De Caldas") -N_("Podgorica") -N_("Podgorica Titograd") -N_("Pohang Ab") -N_("Point Hope") -N_("Point Lay") -N_("Point Mugu") -N_("Point Piedras Blanca") -N_("Poitiers") -N_("Poland") -N_("Pompano Beach") -N_("Ponca City") -N_("Ponce") -N_("Ponta Pora") -N_("Pontiac") -N_("Pope AFB") -N_("Poplar Bluff") -N_("Poprad") -N_("Port Alexander") -N_("Port Alsworth") -N_("Port Angeles") -N_("Port-Au-Prince") -N_("Port Elizabeth") -N_("Porterville") -N_("Port Hardy") -N_("Port Hedland") -N_("Port Heiden") -N_("Portland") -N_("Porto") -N_("Porto Alegre") -N_("Porto Alegre Apt") -N_("Portoroz") -N_("Porto Santo") -N_("Porto Velho") -N_("Port Said") -N_("Portsmouth") -N_("Portugal") -N_("Posadas") -N_("Potosi") -N_("Poughkeepsie") -N_("Pownal") -N_("Poza Rica") -N_("Poznan") -N_("Praha") -N_("Pratica di Mare") -N_("Prescott") -N_("Presidente Prudente") -N_("Presque Isle") -N_("Prestwick") -N_("Pretoria") -N_("Preveza") -N_("Price-Carbon") -N_("Pristina") -N_("Providence") -N_("Provincetown") -N_("Provo") -N_("Pskov") -N_("Pucallpa") -N_("Pudahuel") -N_("Puebla") -N_("Pueblo") -N_("Puerto Barrios") -N_("Puerto Cabezas") -N_("Puerto Escondido") -N_("Puerto Lempira") -N_("Puerto Limon") -N_("Puerto Maldonado") -N_("Puerto Montt") -N_("Puerto Plata") -N_("Puerto Rico") -N_("Puerto Suarez") -N_("Puerto Vallarta") -N_("Pula") -N_("Pullman") -N_("Punta Arenas") -N_("Punta Cana") -N_("Punta Gorda") -N_("Puntilla Lake") -N_("Pusan/Kimhae") -N_("Pyongtaek Ab") -N_("Pyongyang") -N_("Qatar") -N_("Quantico") -N_("Quebec") -N_("Quebec City") -N_("Queretaro") -N_("Quillayute") -N_("Quimper") -N_("Quincy") -N_("Quito/Mariscal Sucre") -N_("Rabat") -N_("Raduzhny") -N_("Rafha") -N_("Raleigh-Durham") -N_("Randolph AFB") -N_("Rapid City") -N_("Rapid City-Ellsworth AFB") -N_("Ras Al Khaimah") -N_("Rawlins") -N_("Reading") -N_("Rebun Island") -N_("Recife") -N_("Red Bluff") -N_("Redding") -N_("Redig") -N_("Redmond") -N_("Red Oak") -N_("Redwood Falls") -N_("Reggio Calabria") -N_("Regina") -N_("Reims-Champagne") -N_("Rennes") -N_("Reno") -N_("Renton") -N_("Resistencia") -N_("Reus") -N_("Reyes") -N_("Reykjavik") -N_("Reynosa") -N_("Rhinelander") -N_("Rhode Island") -N_("Riberalta") -N_("Richmond") -N_("Rickenbacker") -N_("Rieti") -N_("Rifle") -N_("Rijeka") -N_("Rimini") -N_("Rio De Janeiro") -N_("Rio Gallegos") -N_("Rio Grande") -N_("Rioja") -N_("Rio / Jacarepagua") -N_("Rionegro/J.M.Cordova") -N_("Rishiri Island") -N_("Rivas") -N_("Rivera") -N_("Riverside") -N_("Riverside/March AFB") -N_("Riverton") -N_("Rivne") -N_("Rivolto") -N_("Riyadh") -N_("Roanoke") -N_("Roatan") -N_("Robore") -N_("Rochester") -N_("Rockford") -N_("Rockland") -N_("Rockport") -N_("Rock Springs") -N_("Rocky Mount") -N_("Rodos") -N_("Rogers") -N_("Roma/Ciampino") -N_("Roma/Fiumicino") -N_("Romania") -N_("Roma/Urbe") -N_("Rome-Russell") -N_("Ronchi de' Legionari") -N_("Ronneby") -N_("Roosevelt") -N_("Roros") -N_("Rorvik/Ryum") -N_("Rosario") -N_("Roseburg") -N_("Roseglen") -N_("Rost") -N_("Rostov-Na-Donu") -N_("Roswell") -N_("Rotterdam") -N_("Rouen-Valle de Seine") -N_("Ruidoso-Sierra Blanca") -N_("Rurrenabaque") -N_("Russell") -N_("Russia") -N_("Rutland") -N_("Rygge") -N_("Rzeszow") -N_("Saarbrucken") -N_("Sabine Pass") -N_("Sacramento") -N_("Sacramento-Woodland") -N_("Safford-Municipal Airport") -N_("Saginaw") -N_("Saint Anthony") -N_("Saint-Brieuc-Armor") -N_("Saint-Dizier-Robinson") -N_("Saint-Etienne-Boutheon") -N_("Saint Mary's") -N_("Saint Mawgan") -N_("Saint-Nazaire-Montoir") -N_("Saint Paul") -N_("Saiq") -N_("Salalah") -N_("Salem") -N_("Salida") -N_("Salida-Harriet") -N_("Salina") -N_("Salinas") -N_("Salisbury") -N_("Salmon") -N_("Salmon (2)") -N_("Salta") -N_("Saltillo") -N_("Salt Lake City") -N_("Salto") -N_("Salt point") -N_("Salvador") -N_("Salzburg") -N_("Samara") -N_("Samos") -N_("Samsun") -N_("Sana'A") -N_("San Andres Isla/Sesquicentenario") -N_("San Angelo") -N_("San Antonio") -N_("San Antonio Del Tachira") -N_("San Antonio-Kelly AFB") -N_("San Antonio-Stinson") -N_("San Carlos") -N_("Sandane") -N_("Sandberg") -N_("Sanderson") -N_("San Diego") -N_("San Diego-Brown") -N_("San Diego-Miramar") -N_("San Diego-Montgomery") -N_("San Diego-North Island") -N_("San Diego-Santee") -N_("Sandnessjoen/Stokka") -N_("Sand Point") -N_("San Fernando De Apure") -N_("Sanford") -N_("San Francisco") -N_("Sangju") -N_("San Ignacio De Velasco") -N_("San Joaquin") -N_("San Jose") -N_("San Jose De Chiquitos") -N_("San Jose del Cabo") -N_("San Jose-Santa Clara") -N_("San Juan") -N_("Sankt-Peterburg") -N_("Sanliurfa") -N_("San Luis Obispo") -N_("San Luis Potosi") -N_("San Miguel") -N_("San Nicholas Island") -N_("San Salvador") -N_("San Sebastian") -N_("Santa Ana") -N_("Santa Barbara") -N_("Santa Cruz") -N_("Santa Fe") -N_("Santa Maria") -N_("Santa Marta/Simon Bolivar") -N_("Santa Monica") -N_("Santander") -N_("Santarem") -N_("Santa Rosa") -N_("Santa Rosa de Copan") -N_("Santiago") -N_("Santiago de Cuba") -N_("Santiago Del Estero") -N_("Santorini") -N_("Santos") -N_("Sao Jose Dos Campo") -N_("Sao Luiz") -N_("Sao Paulo") -N_("Sapporo Ab") -N_("Sarajevo") -N_("Saranac Lake") -N_("Sarasota") -N_("Saratov") -N_("Sarzana") -N_("Saskatchewan") -N_("Saskatoon") -N_("Sauce Viejo") -N_("Saudi Arabia") -N_("Sault Ste Marie") -N_("Savannah") -N_("Savannah-Hunter AAF") -N_("Sawyer AFB") -N_("Sayun") -N_("Scatsta") -N_("Schaffen") -N_("Schenectady") -N_("Scilly Isles") -N_("Scottsbluff") -N_("Scottsdale") -N_("Scranton") -N_("Seattle") -N_("Seattle-Boeing") -N_("Sedalia") -N_("Seeb") -N_("Selanik") -N_("Sendai Airport") -N_("Seoul E Ab") -N_("Seoul/Kimp'O International Airport") -N_("Seoul/Yongdungp'O Rokaf Wc") -N_("Sept-Iles") -N_("Seul Choix Pt") -N_("Sevilla") -N_("Seward") -N_("Sexton Summit") -N_("Shanghai") -N_("Shannon") -N_("Sharjah") -N_("Sharm El Sheikhintl") -N_("Sharurah") -N_("Shawbury") -N_("Shearwater") -N_("Sheboygan") -N_("Sheldon") -N_("Shelter Cove") -N_("Shelton") -N_("Shenandoah") -N_("Sheridan") -N_("Sherman-Denison") -N_("Shimofusa Ab") -N_("Shingle Point") -N_("Shiraz") -N_("Shishmaref") -N_("Shizuhama Ab") -N_("Shoreham") -N_("Show Low") -N_("Shreveport Downtown") -N_("Shreveport Regional") -N_("Sidney") -N_("Sigonella") -N_("Siloam Springs") -N_("Silver City") -N_("Sindal") -N_("Singapore") -N_("Sioux City") -N_("Sioux Falls") -N_("Sitka") -N_("Sivas") -N_("Sivrihisar") -N_("Skagway") -N_("Skiathos") -N_("Skien/Geiteryggen") -N_("Skive") -N_("Skopje") -N_("Skwentna") -N_("Slana") -N_("Slovakia") -N_("Slovenia") -N_("Smithers") -N_("Smyrna") -N_("Snowshoe Lake") -N_("Sochi") -N_("Socorro") -N_("Socotra") -N_("Soda Springs") -N_("Sofia") -N_("Sogndal") -N_("Soldotna") -N_("Somerset") -N_("Sonderborg") -N_("Songmu Ab") -N_("Sorkjosen") -N_("South Africa") -N_("Southampton") -N_("South Bend") -N_("South Carolina") -N_("South Dakota") -N_("Southend") -N_("South Marsh Island") -N_("South Timbalier") -N_("Spain") -N_("Sparrevohn") -N_("Spencer") -N_("Spickard") -N_("Split") -N_("Spokane") -N_("Spokane-Parkwater") -N_("Springbok") -N_("Springfield") -N_("Stampede Pass") -N_("State College") -N_("Stauning") -N_("Staunton") -N_("Stavanger/Sola") -N_("Staverton") -N_("Stavropol") -N_("St Cloud") -N_("Steamboat Springs") -N_("Stephenville") -N_("St. George") -N_("Stillwater") -N_("St. John's") -N_("St Johnsbury") -N_("St Joseph") -N_("St Louis") -N_("St Louis-Spirit") -N_("Stockholm (Arlanda)") -N_("Stockholm (Bromma)") -N_("Stockton") -N_("Stokmarknes/Skagen") -N_("Stord/Sorstokken") -N_("Storm Lake") -N_("Stornoway") -N_("St Paul") -N_("St Petersburg") -N_("St Petersburg / Clearwater") -N_("Strasbourg") -N_("Strevell") -N_("St Simon's Island") -N_("Stumpy Point") -N_("Sturgeon Bay") -N_("Stuttgart") -N_("Sucre") -N_("Sumburgh") -N_("Sumter") -N_("Sumter (2)") -N_("Sundsvall-Harnosand") -N_("Sungshan/Taipei") -N_("Superior") -N_("Suriname") -N_("Sutton") -N_("Suwon Ab") -N_("Svalbard") -N_("Svolvaer/Helle") -N_("Sweden") -N_("Swift Current") -N_("Switzerland") -N_("Sydney") -N_("Syktyvkar") -N_("Sympheropol") -N_("Syracuse") -N_("Szczecin") -N_("Szombathely") -N_("Tabatinga") -N_("Tabriz") -N_("Tabuk") -N_("Tachikawa Ab") -N_("Tacna") -N_("Tacoma") -N_("Tacoma-Lakewood") -N_("Tacuarembo") -N_("Taegu") -N_("Taegu Ab") -N_("Taejon") -N_("Tahoe Valley") -N_("Taichung") -N_("Taif") -N_("Tainan") -N_("Taiwan") -N_("Taiyuan") -N_("Taiz") -N_("Tajima") -N_("Takamatsu Airport") -N_("Talara") -N_("Talkeetna") -N_("Tallahassee") -N_("Tallinn") -N_("Tamanrasset") -N_("Tamanrasset/Aguenna") -N_("Tampa") -N_("Tampa-Macdill AFB") -N_("Tampere") -N_("Tampico") -N_("Tanana") -N_("Tanegashima Airport") -N_("Taos") -N_("Taoyuan") -N_("Tapachula") -N_("Taranto") -N_("Tarbes") -N_("Tarija") -N_("Tarvisio") -N_("Tatalina") -N_("Tateyama Ab") -N_("Taunton") -N_("Tebessa") -N_("Tees-Side") -N_("Tegucigalpa") -N_("Tehran-Mehrabad") -N_("Tela") -N_("Temple") -N_("Tennessee") -N_("Tepic") -N_("Teresina") -N_("Terre Haute") -N_("Terrell") -N_("Teterboro") -N_("Texarkana") -N_("Texas") -N_("The Dalles") -N_("Thessaloniki") -N_("Thief River Falls") -N_("Thiruvananthapuram") -N_("Thisted") -N_("Thompson Falls") -N_("Thumrait") -N_("Tianjin") -N_("Tijuana") -N_("Timisoara") -N_("Tin City") -N_("Tirana") -N_("Tiree") -N_("Tirgu Mures") -N_("Tiruchchirapalli") -N_("Titusville") -N_("Tivat") -N_("Tlemcen Zenata") -N_("Tobias Bolanos") -N_("Tocumen") -N_("Togiak Village") -N_("Tokachi GSDF") -N_("Tokunoshima Island") -N_("Tokushima Ab") -N_("Tokyo Heliport") -N_("Tokyo International Airport") -N_("Tokyo New International Airport") -N_("Toledo") -N_("Toluca") -N_("Tonopah") -N_("Topeka") -N_("Topeka-Forbes Field") -N_("Torino/Bric Della Croce") -N_("Torino/Caselle") -N_("Toronto") -N_("Torp") -N_("Torrance") -N_("Torreon") -N_("Tottori Airport") -N_("Toulouse") -N_("Toul-Rosieres") -N_("Tours-St-Symphorien") -N_("Toussus-Le Noble") -N_("Townsville") -N_("Toyama Airport") -N_("Trabzon") -N_("Trapani") -N_("Traverse City") -N_("Trelew") -N_("Trenton") -N_("Trevico") -N_("Treviso/Istrana") -N_("Treviso/S.Angelo") -N_("Trieste") -N_("Trinidad") -N_("Tripoli") -N_("Tromso/Langnes") -N_("Trondheim/Vaernes") -N_("Troutdale") -N_("Troyes/Barberey") -N_("Truckee") -N_("Truth or Consequences") -N_("Tsuiki Ab") -N_("Tsushima Airport") -N_("Tucson") -N_("Tucson-Davis AFB") -N_("Tucuman") -N_("Tucumcari") -N_("Tucurui") -N_("Tulancingo") -N_("Tulcea") -N_("Tulsa") -N_("Tupelo") -N_("Turaif") -N_("Turin") -N_("Turkey") -N_("Turku") -N_("Tuscaloosa") -N_("Tuxtla Gutierrez") -N_("Twenthe") -N_("Twentynine Palms") -N_("Twin Falls") -N_("Tyler") -N_("Tyndall AFB") -N_("Tyumen") -N_("Uberaba") -N_("Ufa") -N_("Ukiah") -N_("Ukraine") -N_("Ulan-Ude") -N_("Ulsan") -N_("Ulyanovsk") -N_("Umea") -N_("Umiat") -N_("Unalakleet") -N_("United Arab Emirates ") -N_("United Kingdom") -N_("United States") -N_("Unst") -N_("Upington") -N_("Uruapan") -N_("Uruguaiana") -N_("Uruguay") -N_("Urumqi") -N_("Utah") -N_("Utica") -N_("Utrecht/Soesterberg") -N_("Utsunomiya Ab") -N_("Uzhgorod") -N_("Vadso") -N_("Vaerlose") -N_("Vagar") -N_("Valdez 2") -N_("Valdosta") -N_("Valdosta-Moody AFB") -N_("Valencia") -N_("Valentine") -N_("Valera*") -N_("Valkenburg") -N_("Valley") -N_("Valparaiso") -N_("Valparaiso-Eglin AFB") -N_("Van") -N_("Vancouver") -N_("Vandel") -N_("Vandenberg AFB") -N_("Vandenberg Range") -N_("Van Nuys") -N_("Varadero") -N_("Varanasi/Babatpur") -N_("Varna") -N_("Vasteras") -N_("Vaxjo") -N_("Venezia") -N_("Venezuela") -N_("Venice") -N_("Veracruz") -N_("Vermillion") -N_("Vermont") -N_("Vernal") -N_("Vero Beach") -N_("Vicenza") -N_("Vichy-Charmeil") -N_("Vichy-Rolla") -N_("Vicksburg") -N_("Victoria") -N_("Viet Nam") -N_("Vigo") -N_("Vilhena") -N_("Villacoublay") -N_("Villafranca") -N_("Villahermosa") -N_("Villamontes") -N_("Villa Reynolds") -N_("Vilnius") -N_("Virginia") -N_("Virginia Beach") -N_("Virginia Tech Airport") -N_("Viru-Viru") -N_("Visalia") -N_("Visby") -N_("Viterbo") -N_("Vitoria") -N_("Vladikavkaz") -N_("Vladivostok") -N_("Vlieland") -N_("Vojens/Skrydstrup") -N_("Volgograd") -N_("Volkel") -N_("Volk Field") -N_("Voronezh") -N_("Voslau") -N_("Waco") -N_("Wadi Al Dawasser Airport") -N_("Wainwright") -N_("Wakefield") -N_("Wakkanai Airport") -N_("Walla Walla") -N_("Wallops Island") -N_("Walnut Ridge") -N_("Warner Robins") -N_("Warroad") -N_("Warszawa") -N_("Washington") -N_("Washington/Dulles") -N_("Waterbury") -N_("Waterloo") -N_("Watertown") -N_("Waterville") -N_("Waukesha") -N_("Wausau") -N_("Waycross") -N_("Waynesboro") -N_("Webster City") -N_("Wejh") -N_("Wellington") -N_("Wenatchee") -N_("Wendover") -N_("West Atlanta") -N_("West Burke") -N_("Westerland") -N_("Westfield") -N_("Westhampton") -N_("West Palm Beach") -N_("West Virginia") -N_("West Yellowstone") -N_("West Yellowstone (2)") -N_("Wheeling") -N_("Whidbey Island") -N_("Whitefield") -N_("White Plains") -N_("White Sulphur") -N_("Whittier") -N_("Wichita") -N_("Wichita Falls") -N_("Wichita-Jabara") -N_("Wichita-McConnell AFB") -N_("Wick") -N_("Wien") -N_("Wildwood") -N_("Wilkes - Barre") -N_("Williams Field") -N_("Williamsport") -N_("Williston") -N_("Willoughby") -N_("Willow Airport") -N_("Wilmington") -N_("Winchester") -N_("Windsor") -N_("Windsor Locks") -N_("Wink") -N_("Winnemucca") -N_("Winnipeg") -N_("Winslow") -N_("Winston-Salem") -N_("Winter Haven") -N_("Winter Park") -N_("Wiscasset") -N_("Wisconsin") -N_("Wisconsin Rapids") -N_("Wise") -N_("Woensdrecht") -N_("Wolf Point") -N_("Woong Cheon") -N_("Wooster") -N_("Worcester") -N_("Worland") -N_("Worthington") -N_("Wrangell") -N_("Wrightstown / Mcguire AFB") -N_("Wuchia Observatory") -N_("Wyoming") -N_("Xiamen") -N_("Yacuiba") -N_("Yakima") -N_("Yakushima") -N_("Yakutat") -N_("Yakutsk") -N_("Yamagata Airport") -N_("Yamaguchi Ube Airport") -N_("Yankton") -N_("Yao Airport") -N_("Yechon Ab") -N_("Yekaterinburg") -N_("Yellowknife") -N_("Yellowstone") -N_("Yemen") -N_("Yenbo") -N_("Yeoju Range") -N_("Yeonpyeungdo") -N_("Yeovilton") -N_("Yokosuka Fwf") -N_("Yokota Ab") -N_("Yongsan/H-208 Hp") -N_("Yoro") -N_("Yosu") -N_("Youngstown") -N_("Ypsilanti") -N_("Yugoslavia") -N_("Yukon") -N_("Yuma MCAS") -N_("Yurimaguas") -N_("Yuzhno-Sakhalinsk") -N_("Zacatecas") -N_("Zadar") -N_("Zagreb") -N_("Zakinthos") -N_("Zama Airfield") -N_("Zanesville") -N_("Zaragoza") -N_("Zell Am See") -N_("Zuni Pueblo") -N_("Zurich") diff --git a/my-evolution/Makefile.am b/my-evolution/Makefile.am deleted file mode 100644 index 0e727d62b2..0000000000 --- a/my-evolution/Makefile.am +++ /dev/null @@ -1,130 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/shell \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/calendar \ - -I$(top_builddir)/calendar/cal-client \ - -I$(top_srcdir)/libical/src \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \ - -DEVOLUTION_BUTTONSDIR=\""$(buttonsdir)"\" \ - -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \ - -DLOCATIONDIR=\""$(Locationdir)"\" \ - -DPREFIX=\""$(prefix)"\" \ - -DG_LOG_DOMAIN=\"evolution-executive-summary\" \ - $(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS) - -IDLS = \ - $(top_srcdir)/mail/Mailer.idl - -IDL_GENERATED_H = \ - Mailer.h -IDL_GENERATED_C = \ - Mailer-common.c \ - Mailer-skels.c \ - Mailer-stubs.c -IDL_GENERATED = $(IDL_GENERATED_C) $(IDL_GENERATED_H) - -$(IDL_GENERATED_H): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(top_srcdir)/mail/Mailer.idl -$(IDL_GENERATED_C): $(IDL_GENERATED_H) - -summary_sources = \ - $(IDL_GENERATED) \ - component-factory.c \ - component-factory.h \ - e-cell-tri.c \ - e-cell-tri.h \ - e-summary.c \ - e-summary.h \ - e-summary-calendar.c \ - e-summary-calendar.h \ - e-summary-factory.c \ - e-summary-factory.h \ - e-summary-mail.c \ - e-summary-mail.h \ - e-summary-offline-handler.c \ - e-summary-offline-handler.h \ - e-summary-preferences.c \ - e-summary-preferences.h \ - e-summary-rdf.c \ - e-summary-rdf.h \ - e-summary-shown.c \ - e-summary-shown.h \ - e-summary-table.c \ - e-summary-table.h \ - e-summary-tasks.c \ - e-summary-tasks.h \ - e-summary-type.h \ - e-summary-weather.c \ - e-summary-weather.h \ - metar.c \ - metar.h \ - my-evolution-html.h \ - weather.h - -summary_libs = \ - $(top_builddir)/shell/libeshell.la \ - $(top_builddir)/widgets/misc/libemiscwidgets.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/calendar/cal-client/libcal-client.la \ - $(top_builddir)/calendar/cal-util/libcal-util.la \ - $(EVOLUTION_EXECUTIVE_SUMMARY_LIBS) - -component_LTLIBRARIES = libevolution-executive-summary.la -libevolution_executive_summary_la_SOURCES = $(summary_sources) -libevolution_executive_summary_la_LIBADD = $(summary_libs) -libevolution_executive_summary_la_LDFLAGS = -module -avoid-version - -Locationdir = $(privdatadir) -Location_DATA = Locations - -# .server files - -server_in_files = GNOME_Evolution_Summary.server.in.in - -server_DATA = $(server_in_files:.server.in.in=.server) -%.server.in: %.server.in.in - sed -e "s|\@COMPONENTDIR\@|$(componentdir)|" $< > $@ - -@INTLTOOL_SERVER_RULE@ - - -# Glade - -glade_DATA = my-evolution.glade - -# GConf schemas - -schemadir = $(GCONF_SCHEMA_FILE_DIR) -schema_DATA = apps_evolution_summary.schemas - -install-data-local: - if test -z "$(DESTDIR)" ; then \ - for p in $(schema_DATA) ; do \ - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p; \ - done \ - fi - -# Extra - -EXTRA_DIST = \ - $(schema_DATA) \ - $(summary_sources) \ - $(server_in_files) \ - $(server_DATA) \ - $(Location_DATA) \ - $(glade_DATA) \ - ChangeLog.pre-1-4 \ - Locations.h \ - Location-translation-script \ - check-empty.xpm \ - check-filled.xpm \ - check-none.xpm - -BUILT_SOURCES = $(IDL_GENERATED) $(server_DATA) -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/my-evolution/apps_evolution_summary.schemas b/my-evolution/apps_evolution_summary.schemas deleted file mode 100644 index 840ff00b37..0000000000 --- a/my-evolution/apps_evolution_summary.schemas +++ /dev/null @@ -1,141 +0,0 @@ -<gconfschemafile> - <schemalist> - - <!-- Mail section --> - - <schema> - <key>/schemas/apps/evolution/summary/mail/folder_evolution_uris</key> - <applyto>/apps/evolution/summary/mail/folder_evolution_uris</applyto> - <owner>evolution</owner> - <type>list</type> - <list_type>string</list_type> - <default>[]</default> - <locale name="C"> - <short>evolution: URIs of the folders to display in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/mail/folder_physical_uris</key> - <applyto>/apps/evolution/summary/mail/folder_physical_uris</applyto> - <owner>evolution</owner> - <type>list</type> - <list_type>string</list_type> - <default>[]</default> - <locale name="C"> - <short>Physical URIs of the folders to display in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/mail/show_full_paths</key> - <applyto>/apps/evolution/summary/mail/show_full_paths</applyto> - <owner>evolution</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short>Whether to show the full paths to the mail folders displayed in the summary</short> - </locale> - </schema> - - <!-- Calendar section --> - - <schema> - <key>/schemas/apps/evolution/summary/calendar/days_shown</key> - <applyto>/apps/evolution/summary/calendar/days_shown</applyto> - <owner>evolution</owner> - <type>int</type> - <default>0</default> - <locale name="C"> - <short>Number of days shown in the calendar section</short> - <long>Use '0' to display one day, '1' to display five days, '2' to display a full week, '3' to display a full month.</long> - </locale> - </schema> - - <!-- Tasks section --> - - <schema> - <key>/schemas/apps/evolution/summary/tasks/show_all</key> - <applyto>/apps/evolution/summary/tasks/show_all</applyto> - <owner>evolution</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short>Whether to display all pending tasks instead of only today's tasks</short> - </locale> - </schema> - - <!-- RDF section --> - - <schema> - <key>/schemas/apps/evolution/summary/rdf/uris</key> - <applyto>/apps/evolution/summary/rdf/uris</applyto> - <owner>evolution</owner> - <type>list</type> - <list_type>string</list_type> - <default>[http://linuxtoday.com/backend/my-netscape.rdf,http://www.salon.com/feed/RDF/salon_use.rdf]</default> - <locale name="C"> - <short>URIs of the RDF feeds to display in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/rdf/refresh_time</key> - <applyto>/apps/evolution/summary/rdf/refresh_time</applyto> - <owner>evolution</owner> - <type>int</type> - <default>600</default> - <locale name="C"> - <short>Number of seconds between updates of the RDF feeds in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/rdf/max_items</key> - <applyto>/apps/evolution/summary/rdf/max_items</applyto> - <owner>evolution</owner> - <type>int</type> - <default>10</default> - <locale name="C"> - <short>Maximum number of recent items to display for each RDF feed</short> - </locale> - </schema> - - <!-- Weather section --> - - <schema> - <key>/schemas/apps/evolution/summary/weather/stations</key> - <applyto>/apps/evolution/summary/weather/stations</applyto> - <owner>evolution</owner> - <type>list</type> - <list_type>string</list_type> - <default>[KBOS]</default> - <locale name="C"> - <short>List of weather stations to display in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/weather/use_metric</key> - <applyto>/apps/evolution/summary/weather/use_metric</applyto> - <owner>evolution</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short>Whether to use metric (instead of imperial) units in the summary</short> - </locale> - </schema> - - <schema> - <key>/schemas/apps/evolution/summary/weather/refresh_time</key> - <applyto>/apps/evolution/summary/weather/refresh_time</applyto> - <owner>evolution</owner> - <type>int</type> - <default>600</default> - <locale name="C"> - <short>Number of seconds between updates of the weather section of the summary</short> - </locale> - </schema> - - </schemalist> -</gconfschemafile> diff --git a/my-evolution/check-empty.xpm b/my-evolution/check-empty.xpm deleted file mode 100644 index 746b20234e..0000000000 --- a/my-evolution/check-empty.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * check_empty_xpm[] = { -"16 16 2 1", -" c None", -". c #000000", -" ", -" ", -" ............ ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" ............ ", -" ", -" "}; diff --git a/my-evolution/check-filled.xpm b/my-evolution/check-filled.xpm deleted file mode 100644 index c0468fc25b..0000000000 --- a/my-evolution/check-filled.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * check_filled_xpm[] = { -"16 16 2 1", -" c None", -". c #000000", -" ", -" ", -" ............ ", -" . . ", -" . . . ", -" . .. . ", -" . ... . ", -" . . ... . ", -" . .. ... . ", -" . ..... . ", -" . ... . ", -" . . . ", -" . . ", -" ............ ", -" ", -" "}; diff --git a/my-evolution/check-none.xpm b/my-evolution/check-none.xpm deleted file mode 100644 index 7213f1c565..0000000000 --- a/my-evolution/check-none.xpm +++ /dev/null @@ -1,20 +0,0 @@ -/* XPM */ -static const char * check_none_xpm[] = { -"16 16 1 1", -" c None", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c deleted file mode 100644 index 5e93d7f3f8..0000000000 --- a/my-evolution/component-factory.c +++ /dev/null @@ -1,168 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <string.h> - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-generic-factory.h> -#include <bonobo/bonobo-context.h> -#include <bonobo/bonobo-shlib-factory.h> -#include <bonobo/bonobo-main.h> - -#include <shell/evolution-shell-component.h> -#include <shell/Evolution.h> - -#include <gal/widgets/e-gui-utils.h> - -#include "e-summary-factory.h" -#include "e-summary-offline-handler.h" -#include "e-summary.h" -#include "e-summary-preferences.h" - -#include "component-factory.h" - -#define FACTORY_ID "OAFIID:GNOME_Evolution_Summary_ComponentFactory" - -#define COMPONENT_ID "OAFIID:GNOME_Evolution_Summary_ShellComponent" -#define PREFERENCES_CONTROL_ID "OAFIID:GNOME_Evolution_Summary_ConfigControl" - -static gint running_objects = 0; -static ESummaryPrefs *global_preferences = NULL; - -static const EvolutionShellComponentFolderType folder_types[] = { - { "summary", "evolution-today.png", N_("Summary"), N_("Folder containing the Evolution Summary"), FALSE, NULL, NULL }, - { NULL, NULL } -}; - -static char *evolution_dir = NULL; - -/* EvolutionShellComponent methods and signals */ - -static EvolutionShellComponentResult -create_view (EvolutionShellComponent *shell, - const char *physical_uri, - const char *folder_type, - const char *view_info, - BonoboControl **control_return, - void *closure) -{ - EvolutionShellClient *shell_client; - ESummaryOfflineHandler *offline_handler; - GNOME_Evolution_Shell corba_shell; - BonoboControl *control; - - if (g_strcasecmp (folder_type, "Summary") != 0) { - return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; - } - - offline_handler = g_object_get_data (G_OBJECT (shell), "offline-handler"); - shell_client = evolution_shell_component_get_owner (shell); - corba_shell = evolution_shell_client_corba_objref (shell_client); - control = e_summary_factory_new_control (physical_uri, corba_shell, - offline_handler, global_preferences); - if (!control) - return EVOLUTION_SHELL_COMPONENT_NOTFOUND; - - *control_return = control; - - return EVOLUTION_SHELL_COMPONENT_OK; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - EvolutionShellClient *shell_client, - const char *evolution_homedir, - gpointer user_data) -{ - GNOME_Evolution_Shell corba_shell; - - if (evolution_dir != NULL) { - evolution_dir = g_strdup (evolution_homedir); - } - - corba_shell = evolution_shell_client_corba_objref (shell_client); - - e_summary_folder_init_folder_store (corba_shell); - e_summary_preferences_init_control (corba_shell); -} - -static void -owner_unset_cb (EvolutionShellComponent *shell_component, - gpointer user_data) -{ - g_free (evolution_dir); - evolution_dir = NULL; - - e_summary_folder_clear_folder_store (); -} - -static BonoboObject * -create_shell_component (void) -{ - EvolutionShellComponent *shell_component; - ESummaryOfflineHandler *offline_handler; - - running_objects++; - - if (global_preferences == NULL) { - global_preferences = e_summary_preferences_init (); - } - - shell_component = evolution_shell_component_new (folder_types, - NULL, - create_view, - NULL, NULL, - NULL, NULL, - NULL, NULL, - NULL, NULL); - - g_signal_connect (shell_component, "owner_set", G_CALLBACK (owner_set_cb), NULL); - g_signal_connect (shell_component, "owner_unset", G_CALLBACK (owner_unset_cb), NULL); - - offline_handler = e_summary_offline_handler_new (); - g_object_set_data (G_OBJECT (shell_component), "offline-handler", offline_handler); - bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (offline_handler)); - - return BONOBO_OBJECT (shell_component); -} - -static BonoboObject * -factory (BonoboGenericFactory *this, - const char *object_id, - void *data) -{ - if (strcmp (object_id, COMPONENT_ID) == 0) - return create_shell_component (); - - if (strcmp (object_id, PREFERENCES_CONTROL_ID) == 0) - return e_summary_preferences_create_control (); - - g_warning (FACTORY_ID ": Don't know anything about %s", object_id); - - return NULL; -} - -BONOBO_ACTIVATION_SHLIB_FACTORY (FACTORY_ID, "Evolution Summary component factory", factory, NULL) diff --git a/my-evolution/component-factory.h b/my-evolution/component-factory.h deleted file mode 100644 index f15b012009..0000000000 --- a/my-evolution/component-factory.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifndef __COMPONENT_FACTORY_H__ -#define __COMPONENT_FACTORY_H__ - -void component_factory_init (void); - -#endif diff --git a/my-evolution/e-cell-tri.c b/my-evolution/e-cell-tri.c deleted file mode 100644 index d08845f680..0000000000 --- a/my-evolution/e-cell-tri.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximain, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gdk/gdkkeysyms.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <gal/util/e-util.h> -#include <gal/e-table/e-table-item.h> - -#include "e-cell-tri.h" - -#include "check-none.xpm" -#include "check-empty.xpm" -#include "check-filled.xpm" - -#define PARENT_TYPE e_cell_toggle_get_type () - -static GdkPixbuf *checks[3]; - -static void -set_value (ECellView *view, - int model_col, - int view_col, - int row, - int value) -{ - ECell *ecell = view->ecell; - ECellToggle *toggle = E_CELL_TOGGLE (ecell); - - if (value >= toggle->n_states) - value = 1; - - e_table_model_set_value_at (view->e_table_model, - model_col, row, GINT_TO_POINTER (value)); -} - -static gint -event (ECellView *ecell_view, - GdkEvent *event, - int model_col, - int view_col, - int row, - ECellFlags flags, - ECellActions *actions) -{ - void *_value = e_table_model_value_at (ecell_view->e_table_model, model_col, row); - const int value = GPOINTER_TO_INT (_value); - - switch (event->type) { - case GDK_KEY_PRESS: - if (event->key.keyval != GDK_space) { - return FALSE; - } - /* Fall through */ - case GDK_BUTTON_PRESS: - if (e_table_model_is_cell_editable (ecell_view->e_table_model, model_col, row) == FALSE) { - return FALSE; - } - if (value == 0) { - return FALSE; - } - - set_value (ecell_view, model_col, view_col, row, value + 1); - return TRUE; - - default: - return FALSE; - } - - return TRUE; -} - -static void -e_cell_tri_class_init (GtkObjectClass *object_class) -{ - ECellClass *e_cell_class = E_CELL_CLASS (object_class); - - e_cell_class->event = event; - - checks[0] = gdk_pixbuf_new_from_xpm_data (check_none_xpm); - checks[1] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm); - checks[2] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm); - -} - -E_MAKE_TYPE (e_cell_tri, "ECellTri", ECellTri, e_cell_tri_class_init, NULL, PARENT_TYPE); - -ECell * -e_cell_tri_new (void) -{ - ECellTri *ect = gtk_type_new (e_cell_tri_get_type ()); - - e_cell_toggle_construct (E_CELL_TOGGLE (ect), 2, 3, checks); - - return (ECell *) ect; -} - diff --git a/my-evolution/e-cell-tri.h b/my-evolution/e-cell-tri.h deleted file mode 100644 index 413abcd556..0000000000 --- a/my-evolution/e-cell-tri.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximain, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef __E_CELL_TRI_H__ -#define __E_CELL_TRI_H__ - -#include <gal/e-table/e-cell-toggle.h> - -typedef struct _ECellTri { - ECellToggle parent; -} ECellTri; - -typedef struct _ECellTriClass { - ECellToggleClass parent_class; -} ECellTriClass; - -GtkType e_cell_tri_get_type (void); -ECell *e_cell_tri_new (void); - -#endif diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c deleted file mode 100644 index dbc2472b9e..0000000000 --- a/my-evolution/e-summary-calendar.c +++ /dev/null @@ -1,633 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-calendar.c - * - * Copyright (C) 2001, 2002, 2003 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gnome.h> -#include <gal/widgets/e-unicode.h> - -#include "e-summary-calendar.h" -#include "e-summary.h" - -#include <cal-client/cal-client.h> -#include <cal-util/timeutil.h> - -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-moniker-util.h> - -#include <gconf/gconf-client.h> - -#include <libical/ical.h> - -#define MAX_RELOAD_TRIES 10 - -struct _ESummaryCalendar { - CalClient *client; - - char *html; - gboolean wants24hr; - - char *default_uri; - - GConfClient *gconf_client; - int gconf_value_changed_handler_id; - - int cal_open_reload_timeout_id; - int reload_count; -}; - -const char * -e_summary_calendar_get_html (ESummary *summary) -{ - if (summary->calendar == NULL) { - return NULL; - } - - return summary->calendar->html; -} - -typedef struct { - char *uid; - CalComponent *comp; - CalComponentDateTime dt; - icaltimezone *zone; -} ESummaryCalEvent; - -/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */ -static gboolean -cal_component_compare_tzid (const char *tzid1, const char *tzid2) -{ - gboolean retval = TRUE; - - if (tzid1) { - if (!tzid2 || strcmp (tzid1, tzid2)) - retval = FALSE; - } else { - if (tzid2) - retval = FALSE; - } - - return retval; -} - -static gboolean -compare_event_timezones (CalComponent *comp, - CalClient *client, - icaltimezone *zone) -{ - CalClientGetStatus status; - CalComponentDateTime start_datetime, end_datetime; - const char *tzid; - gboolean retval = FALSE; - icaltimezone *start_zone, *end_zone; - int offset1, offset2; - - tzid = icaltimezone_get_tzid (zone); - - cal_component_get_dtstart (comp, &start_datetime); - cal_component_get_dtend (comp, &end_datetime); - - /* If either the DTSTART or the DTEND is a DATE value, we return TRUE. - Maybe if one was a DATE-TIME we should check that, but that should - not happen often. */ - if ((start_datetime.value && start_datetime.value->is_date) - || (end_datetime.value && end_datetime.value->is_date)) { - retval = TRUE; - goto out; - } - - /* If the event uses UTC for DTSTART & DTEND, return TRUE. Outlook - will send single events as UTC, so we don't want to mark all of - these. */ - if ((!start_datetime.value || start_datetime.value->is_utc) - && (!end_datetime.value || end_datetime.value->is_utc)) { - retval = TRUE; - goto out; - } - - /* If the event uses floating time for DTSTART & DTEND, return TRUE. - Imported vCalendar files will use floating times, so we don't want - to mark all of these. */ - if (!start_datetime.tzid && !end_datetime.tzid) { - retval = TRUE; - goto out; - } - - /* FIXME: DURATION may be used instead. */ - if (cal_component_compare_tzid (tzid, start_datetime.tzid) - && cal_component_compare_tzid (tzid, end_datetime.tzid)) { - /* If both TZIDs are the same as the given zone's TZID, then - we know the timezones are the same so we return TRUE. */ - retval = TRUE; - } else { - /* If the TZIDs differ, we have to compare the UTC offsets - of the start and end times, using their own timezones and - the given timezone. */ - status = cal_client_get_timezone (client, - start_datetime.tzid, - &start_zone); - if (status != CAL_CLIENT_GET_SUCCESS) - goto out; - - if (start_datetime.value) { - offset1 = icaltimezone_get_utc_offset (start_zone, - start_datetime.value, - NULL); - offset2 = icaltimezone_get_utc_offset (zone, - start_datetime.value, - NULL); - if (offset1 != offset2) - goto out; - } - - status = cal_client_get_timezone (client, - end_datetime.tzid, - &end_zone); - if (status != CAL_CLIENT_GET_SUCCESS) - goto out; - - if (end_datetime.value) { - offset1 = icaltimezone_get_utc_offset (end_zone, - end_datetime.value, - NULL); - offset2 = icaltimezone_get_utc_offset (zone, - end_datetime.value, - NULL); - if (offset1 != offset2) - goto out; - } - - retval = TRUE; - } - - out: - - cal_component_free_datetime (&start_datetime); - cal_component_free_datetime (&end_datetime); - - return retval; -} - -static int -e_summary_calendar_event_sort_func (const void *e1, - const void *e2) -{ - ESummaryCalEvent *event1, *event2; - - event1 = *(ESummaryCalEvent **) e1; - event2 = *(ESummaryCalEvent **) e2; - - if (event1->dt.value == NULL || event2->dt.value == NULL) { - return 0; - } - - return icaltime_compare (*(event1->dt.value), *(event2->dt.value)); -} - -struct _RecurData { - ESummary *summary; - GPtrArray *array; - ESummaryCalEvent *event; -}; - -static gboolean -add_recurrances (CalComponent *comp, - time_t start, - time_t end, - gpointer data) -{ - struct _RecurData *recur = data; - struct icaltimetype v, *p; - ESummaryCalEvent *event; - - event = g_new (ESummaryCalEvent, 1); - v = icaltime_from_timet_with_zone (start, FALSE, recur->summary->tz); - p = g_new (struct icaltimetype, 1); - - event->dt.value = p; - - p->year = v.year; - p->month = v.month; - p->day = v.day; - p->hour = v.hour; - p->minute = v.minute; - p->second = v.second; - p->is_utc = v.is_utc; - p->is_date = v.is_date; - p->is_daylight = v.is_daylight; - p->zone = v.zone; - - event->dt.tzid = recur->summary->timezone; - event->comp = comp; - event->uid = g_strdup (recur->event->uid); - event->zone = recur->summary->tz; - - g_object_ref (comp); - - g_ptr_array_add (recur->array, event); - return TRUE; -} - -static GPtrArray * -uids_to_array (ESummary *summary, - CalClient *client, - GList *uids, - time_t begin, - time_t end) -{ - GList *p; - GPtrArray *array; - - g_return_val_if_fail (IS_E_SUMMARY (summary), NULL); - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (uids != NULL, NULL); - - array = g_ptr_array_new (); - for (p = uids; p; p = p->next) { - ESummaryCalEvent *event; - CalClientGetStatus status; - icalcomponent *icalcomp; - - event = g_new (ESummaryCalEvent, 1); - - event->uid = g_strdup (p->data); - status = cal_client_get_object (client, p->data, &icalcomp); - if (status != CAL_CLIENT_GET_SUCCESS) { - g_free (event); - continue; - } - - event->comp = cal_component_new (); - cal_component_set_icalcomponent (event->comp, icalcomp); - if (cal_component_has_recurrences (event->comp) == TRUE) { - struct _RecurData *recur; - - recur = g_new (struct _RecurData, 1); - recur->event = event; - recur->array = array; - recur->summary = summary; - cal_recur_generate_instances (event->comp, begin, end, - add_recurrances, recur, - cal_client_resolve_tzid_cb, client, - recur->summary->tz); - g_free (recur); - g_free (event->uid); - g_free (event); - } else { - cal_component_get_dtstart (event->comp, &event->dt); - - status = cal_client_get_timezone (client, event->dt.tzid, &event->zone); - if (status != CAL_CLIENT_GET_SUCCESS) { - g_object_unref (event->comp); - g_free (event); - continue; - } - - icaltimezone_convert_time (event->dt.value, event->zone, summary->tz); - g_ptr_array_add (array, event); - } - } - - qsort (array->pdata, array->len, sizeof (ESummaryCalEvent *), e_summary_calendar_event_sort_func); - - return array; -} - -static void -free_event_array (GPtrArray *array) -{ - int i; - - for (i = 0; i < array->len; i++) { - ESummaryCalEvent *event; - - event = array->pdata[i]; - g_free (event->uid); - g_object_unref (event->comp); - } - - g_ptr_array_free (array, TRUE); -} - -static gboolean -generate_html (gpointer data) -{ - ESummary *summary = data; - ESummaryCalendar *calendar = summary->calendar; - GList *uids; - GString *string; - char *tmp; - time_t t, begin, end, f; - - if (cal_client_get_load_state (calendar->client) != CAL_CLIENT_LOAD_LOADED) - return FALSE; - - /* Set the default timezone on the server. */ - if (summary->tz) { - cal_client_set_default_timezone (calendar->client, - summary->tz); - } - - t = time (NULL); - begin = time_day_begin_with_zone (t, summary->tz); - switch (summary->preferences->days) { - case E_SUMMARY_CALENDAR_ONE_DAY: - end = time_day_end_with_zone (t, summary->tz); - break; - - case E_SUMMARY_CALENDAR_FIVE_DAYS: - f = time_add_day_with_zone (t, 5, summary->tz); - end = time_day_end_with_zone (f, summary->tz); - break; - - case E_SUMMARY_CALENDAR_ONE_WEEK: - f = time_add_week_with_zone (t, 1, summary->tz); - end = time_day_end_with_zone (f, summary->tz); - break; - - case E_SUMMARY_CALENDAR_ONE_MONTH: - default: - f = time_add_month_with_zone (t, 1, summary->tz); - end = time_day_end_with_zone (f, summary->tz); - break; - } - - uids = cal_client_get_objects_in_range (calendar->client, - CALOBJ_TYPE_EVENT, begin, end); - string = g_string_new ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" " - "alt=\"\" width=\"48\" height=\"48\"> <b>"); - - if (calendar->default_uri != NULL) - g_string_append_printf (string, "<a href=\"%s\">", calendar->default_uri); - - g_string_append (string, _("Appointments")); - - if (calendar->default_uri != NULL) - g_string_append (string, "</a>"); - - g_string_append (string, "</b></dt><dd>"); - - if (uids == NULL) { - g_string_append (string, _("No appointments.")); - } else { - GPtrArray *uidarray; - int i; - - uidarray = uids_to_array (summary, calendar->client, uids, begin, end); - for (i = 0; i < uidarray->len; i++) { - ESummaryCalEvent *event; - CalComponentText text; - struct tm start_tm; - char start_str[64], *start_str_utf, *img; - - event = uidarray->pdata[i]; - cal_component_get_summary (event->comp, &text); - - start_tm = icaltimetype_to_tm (event->dt.value); - if (calendar->wants24hr == TRUE) { - strftime (start_str, sizeof start_str, _("%k:%M %d %B"), &start_tm); - } else { - strftime (start_str, sizeof start_str, _("%l:%M%p %d %B"), &start_tm); - } - - if (cal_component_has_alarms (event->comp)) { - img = "es-appointments.png"; - } else if (compare_event_timezones (event->comp, - calendar->client, - summary->tz) == FALSE) { - img = "timezone-16.xpm"; - } else { - img = "new_appointment.xpm"; - } - - start_str_utf = e_utf8_from_locale_string (start_str); - tmp = g_strdup_printf ("<img align=\"middle\" src=\"%s\" " - "alt=\"\" width=\"16\" height=\"16\">   " - "<font size=\"-1\"><a href=\"calendar:/%s\">%s, %s</a></font><br>", - img, - event->uid, start_str_utf, text.value ? text.value : _("No description")); - g_free (start_str_utf); - - g_string_append (string, tmp); - g_free (tmp); - } - - free_event_array (uidarray); - } - - g_string_append (string, "</dd></dl>"); - - if (calendar->html) { - g_free (calendar->html); - } - calendar->html = string->str; - g_string_free (string, FALSE); - - e_summary_draw (summary); - return FALSE; -} - -static gboolean -cal_open_reload_timeout (void *data) -{ - ESummary *summary = (ESummary *) data; - - summary->calendar->cal_open_reload_timeout_id = 0; - - if (++ summary->calendar->reload_count >= MAX_RELOAD_TRIES) { - summary->calendar->reload_count = 0; - return FALSE; - } - - cal_client_open_default_calendar (summary->calendar->client, FALSE); - return FALSE; -} - -static void -cal_opened_cb (CalClient *client, - CalClientOpenStatus status, - ESummary *summary) -{ - if (status == CAL_CLIENT_OPEN_SUCCESS) { - g_idle_add (generate_html, summary); - } else { - summary->calendar->cal_open_reload_timeout_id = g_timeout_add (1000, - cal_open_reload_timeout, - summary); - } -} - -static void -obj_changed_cb (CalClient *client, - const char *uid, - gpointer data) -{ - g_idle_add (generate_html, data); -} - -static void -e_summary_calendar_protocol (ESummary *summary, - const char *uri, - void *closure) -{ - ESummaryCalendar *calendar; - CORBA_Environment ev; - const char *comp_uri; - GNOME_Evolution_Calendar_CompEditorFactory factory; - - calendar = (ESummaryCalendar *) closure; - - comp_uri = cal_client_get_uri (calendar->client); - - /* Get the factory */ - CORBA_exception_init (&ev); - factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &ev); - if (BONOBO_EX (&ev)) { - g_message ("%s: Could not activate the component editor factory (%s)", - G_GNUC_FUNCTION, CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return; - } - - GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, comp_uri, (char *)uri + 10, &ev); - - if (BONOBO_EX (&ev)) { - g_message ("%s: Execption while editing the component (%s)", G_GNUC_FUNCTION, - CORBA_exception_id (&ev)); - } - - CORBA_exception_free (&ev); - bonobo_object_release_unref (factory, NULL); -} - -static void -setup_calendar (ESummary *summary) -{ - ESummaryCalendar *calendar; - - calendar = summary->calendar; - g_assert (calendar != NULL); - - if (calendar->cal_open_reload_timeout_id != 0) { - g_source_remove (calendar->cal_open_reload_timeout_id); - calendar->cal_open_reload_timeout_id = 0; - calendar->reload_count = 0; - } - - if (calendar->client != NULL) - g_object_unref (calendar->client); - - calendar->client = cal_client_new (); - - g_signal_connect (calendar->client, "cal-opened", G_CALLBACK (cal_opened_cb), summary); - g_signal_connect (calendar->client, "obj-updated", G_CALLBACK (obj_changed_cb), summary); - g_signal_connect (calendar->client, "obj-removed", G_CALLBACK (obj_changed_cb), summary); - - if (! cal_client_open_default_calendar (calendar->client, FALSE)) - g_message ("Open calendar failed"); - - calendar->wants24hr = gconf_client_get_bool (calendar->gconf_client, - "/apps/evolution/calendar/display/use_24h_format", NULL); - calendar->default_uri = gconf_client_get_string (calendar->gconf_client, - "/apps/evolution/shell/default_folders/calendar_path", - NULL); -} - -static void -gconf_client_value_changed_cb (GConfClient *client, - const char *key, - GConfValue *value, - void *user_data) -{ - setup_calendar (E_SUMMARY (user_data)); - generate_html (user_data); -} - -static void -setup_gconf_client (ESummary *summary) -{ - ESummaryCalendar *calendar; - - calendar = summary->calendar; - g_assert (calendar != NULL); - - calendar->gconf_client = gconf_client_get_default (); - - calendar->gconf_value_changed_handler_id - = g_signal_connect (calendar->gconf_client, "value_changed", - G_CALLBACK (gconf_client_value_changed_cb), summary); - - gconf_client_add_dir (calendar->gconf_client, "/apps/evolution/calendar", FALSE, NULL); - gconf_client_add_dir (calendar->gconf_client, "/apps/evolution/shell/default_folders", FALSE, NULL); -} - -void -e_summary_calendar_init (ESummary *summary) -{ - ESummaryCalendar *calendar; - - g_return_if_fail (summary != NULL); - - calendar = g_new0 (ESummaryCalendar, 1); - summary->calendar = calendar; - calendar->html = NULL; - - setup_gconf_client (summary); - setup_calendar (summary); - - e_summary_add_protocol_listener (summary, "calendar", e_summary_calendar_protocol, calendar); -} - -void -e_summary_calendar_reconfigure (ESummary *summary) -{ - setup_calendar (summary); - generate_html (summary); -} - -void -e_summary_calendar_free (ESummary *summary) -{ - ESummaryCalendar *calendar; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - calendar = summary->calendar; - - if (calendar->cal_open_reload_timeout_id != 0) - g_source_remove (calendar->cal_open_reload_timeout_id); - - g_object_unref (calendar->client); - g_free (calendar->html); - g_free (calendar->default_uri); - - if (calendar->gconf_value_changed_handler_id != 0) - g_signal_handler_disconnect (calendar->gconf_client, - calendar->gconf_value_changed_handler_id); - g_object_unref (calendar->gconf_client); - - g_free (calendar); - summary->calendar = NULL; -} diff --git a/my-evolution/e-summary-calendar.h b/my-evolution/e-summary-calendar.h deleted file mode 100644 index ab15e3d2a9..0000000000 --- a/my-evolution/e-summary-calendar.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-calendar.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifndef __E_SUMMARY_CALENDAR_H__ -#define __E_SUMMARY_CALENDAR_H__ - -#include "e-summary-type.h" - -typedef enum _ESummaryCalendarDays { - E_SUMMARY_CALENDAR_ONE_DAY, - E_SUMMARY_CALENDAR_FIVE_DAYS, - E_SUMMARY_CALENDAR_ONE_WEEK, - E_SUMMARY_CALENDAR_ONE_MONTH -} ESummaryCalendarDays; - -typedef enum _ESummaryCalendarNumTasks { - E_SUMMARY_CALENDAR_ALL_TASKS, - E_SUMMARY_CALENDAR_TODAYS_TASKS -} ESummaryCalendarNumTasks; - -typedef struct _ESummaryCalendar ESummaryCalendar; - -const char *e_summary_calendar_get_html (ESummary *summary); -void e_summary_calendar_init (ESummary *summary); -void e_summary_calendar_reconfigure (ESummary *summary); -void e_summary_calendar_free (ESummary *summary); -#endif diff --git a/my-evolution/e-summary-factory.c b/my-evolution/e-summary-factory.c deleted file mode 100644 index 3637d358e4..0000000000 --- a/my-evolution/e-summary-factory.c +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-factory.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtk.h> -#include <bonobo/bonobo-control.h> -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-ui-util.h> - -#include "e-util/e-gui-utils.h" - -#include "e-summary.h" -#include "e-summary-factory.h" -#include "e-summary-offline-handler.h" -#include "e-summary-preferences.h" -#include "evolution-shell-component-utils.h" /* For E_PIXMAP */ - -static BonoboUIVerb summary_verbs[] = { - BONOBO_UI_VERB ("PrintMyEvolution", e_summary_print), - BONOBO_UI_VERB ("Reload", e_summary_reload), - BONOBO_UI_VERB_END -}; - - -static EPixmap pixmaps [] = { - E_PIXMAP ("/commands/PrintMyEvolution", "print.xpm"), - E_PIXMAP ("/Toolbar/PrintMyEvolution", "buttons/print.png"), - E_PIXMAP_END -}; - -static void -control_activate (BonoboControl *control, - BonoboUIComponent *ui_component, - ESummary *summary) -{ - Bonobo_UIContainer container; - - container = bonobo_control_get_remote_ui_container (control, NULL); - bonobo_ui_component_set_container (ui_component, container, NULL); - bonobo_object_release_unref (container, NULL); - - bonobo_ui_component_add_verb_list_with_data (ui_component, summary_verbs, summary); - bonobo_ui_component_freeze (ui_component, NULL); - - bonobo_ui_util_set_ui (ui_component, PREFIX, - EVOLUTION_UIDIR "/my-evolution.xml", "my-evolution", NULL); - e_pixmaps_update (ui_component, pixmaps); - - bonobo_ui_component_thaw (ui_component, NULL); -} - -static void -control_deactivate (BonoboControl *control, - BonoboUIComponent *ui_component, - ESummary *summary) -{ - bonobo_ui_component_unset_container (ui_component, NULL); -} - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - ESummary *summary) -{ - BonoboUIComponent *ui_component; - - ui_component = bonobo_control_get_ui_component (control); - - if (activate) - control_activate (control, ui_component, summary); - else - control_deactivate (control, ui_component, summary); -} - -static void -control_destroy_cb (BonoboControl *control, - ESummary *summary) -{ - gtk_widget_destroy (GTK_WIDGET (summary)); -} - -BonoboControl * -e_summary_factory_new_control (const char *uri, - const GNOME_Evolution_Shell shell, - ESummaryOfflineHandler *handler, - ESummaryPrefs *global_preferences) -{ - BonoboControl *control; - GtkWidget *summary; - - summary = e_summary_new (global_preferences); - if (summary == NULL) { - return NULL; - } - - e_summary_offline_handler_add_summary (handler, E_SUMMARY (summary)); - gtk_widget_show (summary); - - control = bonobo_control_new (summary); - - if (control == NULL) { - gtk_widget_destroy (summary); - return NULL; - } - - e_summary_set_control (E_SUMMARY (summary), control); - - g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), summary); - g_signal_connect (control, "destroy", G_CALLBACK (control_destroy_cb), summary); - - /* FIXME: We register the factory here as it needs the summary object. - Sigh, this is really wrong. */ - - return control; -} diff --git a/my-evolution/e-summary-factory.h b/my-evolution/e-summary-factory.h deleted file mode 100644 index f159d55f0d..0000000000 --- a/my-evolution/e-summary-factory.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-factory.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifndef __E_SUMMARY_FACTORY_H__ -#define __E_SUMMARY_FACTORY_H__ - -#include "e-summary-offline-handler.h" -#include "e-summary.h" - -BonoboControl *e_summary_factory_new_control (const char *uri, - const GNOME_Evolution_Shell shell, - ESummaryOfflineHandler *handler, - ESummaryPrefs *preferences); - -#endif diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c deleted file mode 100644 index a2a6e9fd65..0000000000 --- a/my-evolution/e-summary-mail.c +++ /dev/null @@ -1,783 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-mail.c - * - * Copyright (C) 2001, 2002, 2003 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gal/widgets/e-unicode.h> - -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */ - -#include <gtk/gtksignal.h> - -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-listener.h> -#include <bonobo/bonobo-property-bag-client.h> - -#include <Evolution.h> -#include <evolution-storage-listener.h> - -#include <string.h> - -#include "Mailer.h" -#include "e-summary.h" -#include "e-summary-mail.h" -#include "e-summary-table.h" -#include "e-summary-preferences.h" - -#include "e-util/e-path.h" - -#define MAIL_IID "OAFIID:GNOME_Evolution_FolderInfo" - -typedef struct _FolderStore { - GNOME_Evolution_Shell shell; - GNOME_Evolution_FolderInfo folder_info; - GNOME_Evolution_StorageRegistry registry; - BonoboListener *registry_listener; - BonoboListener *listener; - EvolutionStorageListener *storage_listener; - - GSList *storage_list; - - GHashTable *path_to_folder; - GHashTable *physical_uri_to_folder; - - GList *shown; -} FolderStore; - -struct _ESummaryMail { - char *html; -}; - -typedef struct _StorageInfo { - char *name; - char *toplevel; - - GNOME_Evolution_Storage storage; - EvolutionStorageListener *listener; - - GList *folders; -} StorageInfo; - -typedef struct _ESummaryMailFolder { - char *path; - char *uri; - char *physical_uri; - char *display_name; - - int count; - int unread; - - gboolean init; /* Has this folder been initialised? */ - StorageInfo *si; -} ESummaryMailFolder; - -static FolderStore *folder_store = NULL; - - -static char * -make_pretty_foldername (ESummary *summary, - const ESummaryMailFolder *folder) -{ - GString *pretty_path; - const char *p, *previous_p; - char *retval; - - if (! summary->preferences->show_full_path) - return g_strdup (folder->display_name); - - g_assert (folder->path[0] == '/'); - - pretty_path = g_string_new (""); - - previous_p = folder->path; - while (previous_p != NULL) { - const ESummaryMailFolder *ancestor_folder; - char *path; - - g_string_append (pretty_path, "/"); - - p = strchr (previous_p + 1, '/'); - - if (p == NULL) - path = g_strdup (folder->path); - else - path = g_strndup (folder->path, p - folder->path); - - ancestor_folder = g_hash_table_lookup (folder_store->path_to_folder, path); - - if (ancestor_folder != NULL) { - g_string_append (pretty_path, ancestor_folder->display_name); - } else { - char *path_element; - - if (p == NULL) - path_element = g_strdup (previous_p + 1); - else - path_element = g_strndup (previous_p + 1, p - (previous_p + 1)); - - g_string_append (pretty_path, path_element); - g_free (path_element); - } - - g_free (path); - - previous_p = p; - } - - retval = pretty_path->str; - g_string_free (pretty_path, FALSE); - - return retval; -} - -static void -folder_gen_html (ESummary *summary, - ESummaryMailFolder *folder, - GString *string) -{ - char *str, *pretty_name; - - pretty_name = make_pretty_foldername (summary, folder); - str = g_strdup_printf ("<tr><td><a href=\"%s\">" - "<pre>%s</pre></a></td><td align=\"Left\">" - "<pre>%d/%d</pre>" - "</td></tr>", - folder->uri, pretty_name, - folder->unread, folder->count); - g_string_append (string, str); - g_free (pretty_name); - g_free (str); -} - -static void -e_summary_mail_generate_html (ESummary *summary) -{ - ESummaryMail *mail; - GString *string; - GList *p; - char *old; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - mail = summary->mail; - string = g_string_new ("<dl><dt><img src=\"myevo-mail-summary.png\" " - "align=\"middle\" alt=\"\" width=\"48\" " - "height=\"48\"> <b><a href=\"evolution:/local/Inbox\">"); - g_string_append (string, _("Mail summary")); - g_string_append (string, "</a></b></dt><dd><table numcols=\"2\" width=\"100%\">"); - - for (p = folder_store->shown; p; p = p->next) { - ESummaryMailFolder *mail_folder = p->data; - - folder_gen_html (summary, mail_folder, string); - } - - g_string_append (string, "</table></dd></dl>"); - - old = mail->html; - mail->html = string->str; - - g_free (old); - - g_string_free (string, FALSE); -} - -const char * -e_summary_mail_get_html (ESummary *summary) -{ - /* Only regenerate HTML when it's needed */ - e_summary_mail_generate_html (summary); - - if (summary->mail == NULL) { - return NULL; - } - - return summary->mail->html; -} - -static void -e_summary_mail_get_info (const char *uri) -{ - CORBA_Environment ev; - - if (folder_store == NULL) - return; - - g_return_if_fail (folder_store->folder_info != CORBA_OBJECT_NIL); - - CORBA_exception_init (&ev); - GNOME_Evolution_FolderInfo_getInfo (folder_store->folder_info, uri ? uri : "", - BONOBO_OBJREF (folder_store->listener), &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting info for %s:\n%s", uri, - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return; - } - - CORBA_exception_free (&ev); - return; -} - -static gboolean -e_summary_mail_idle_get_info (gpointer user_data) -{ - char *uri = user_data; - - e_summary_mail_get_info (uri); - g_free (uri); - return FALSE; -} - -static void -new_folder_cb (EvolutionStorageListener *listener, - const char *path, - const GNOME_Evolution_Folder *folder, - StorageInfo *si) -{ - ESummaryPrefs *global_preferences; - ESummaryMailFolder *mail_folder; - GSList *p; - - if (strcmp (folder->type, "mail") != 0) - return; - - if (strncmp (folder->evolutionUri, "evolution:", 10) != 0) - return; - - mail_folder = g_new (ESummaryMailFolder, 1); - mail_folder->si = si; - mail_folder->uri = g_strdup (folder->evolutionUri); - mail_folder->physical_uri = g_strdup (folder->physicalUri); - mail_folder->path = g_strdup (path); - mail_folder->display_name = g_strdup (folder->displayName); - mail_folder->count = -1; - mail_folder->unread = -1; - mail_folder->init = FALSE; - - g_hash_table_insert (folder_store->path_to_folder, mail_folder->path, mail_folder); - g_hash_table_insert (folder_store->physical_uri_to_folder, mail_folder->physical_uri, mail_folder); - - si->folders = g_list_prepend (si->folders, mail_folder); - - global_preferences = e_summary_preferences_get_global (); - for (p = global_preferences->display_folders; p; p = p->next) { - ESummaryPrefsFolder *f = p->data; - - if (strcmp (f->physical_uri, folder->physicalUri) == 0) { - folder_store->shown = g_list_append (folder_store->shown, mail_folder); - g_idle_add (e_summary_mail_idle_get_info, - g_strdup (mail_folder->physical_uri)); - } - } -} - -static void -update_folder_cb (EvolutionStorageListener *listener, - const char *path, - int unread_count, - StorageInfo *si) -{ - ESummaryMailFolder *mail_folder; - GList *p; - - mail_folder = g_hash_table_lookup (folder_store->path_to_folder, path); - if (mail_folder == NULL) { - return; - } - - for (p = folder_store->shown; p; p = p->next) { - if (p->data == mail_folder) { - g_idle_add (e_summary_mail_idle_get_info, - g_strdup (mail_folder->physical_uri)); - return; - } - } -} - -static void -remove_folder_cb (EvolutionStorageListener *listener, - const char *path, - StorageInfo *si) -{ - ESummaryMailFolder *mail_folder; - GList *p; - - mail_folder = g_hash_table_lookup (folder_store->path_to_folder, path); - if (mail_folder == NULL) { - return; - } - - /* Check if we're displaying it, because we can't display it if it - doesn't exist :) */ - for (p = folder_store->shown; p; p = p->next) { - if (p->data == mail_folder) { - folder_store->shown = g_list_remove_link (folder_store->shown, p); - g_list_free (p); - } - } - - g_hash_table_remove (folder_store->path_to_folder, path); - g_free (mail_folder->path); - g_free (mail_folder->uri); - g_free (mail_folder->physical_uri); - g_free (mail_folder->display_name); - g_free (mail_folder); -} - -static void -mail_change_notify (BonoboListener *listener, - const char *name, - const BonoboArg *arg, - CORBA_Environment *ev, - gpointer data) -{ - GNOME_Evolution_FolderInfo_MessageCount *count; - ESummaryMailFolder *folder; - ESummaryPrefs *global_preferences; - GSList *p; - - count = arg->_value; - folder = g_hash_table_lookup (folder_store->physical_uri_to_folder, count->path); - - if (folder == NULL) { - return; - } - - folder->count = count->count; - folder->unread = count->unread; - folder->init = TRUE; - - /* Are we displaying this folder? */ - global_preferences = e_summary_preferences_get_global (); - for (p = global_preferences->display_folders; p; p = p->next) { - ESummaryPrefsFolder *f = p->data; - if (strcmp (f->physical_uri, folder->physical_uri) == 0) { - e_summary_redraw_all (); /* All summaries should be redrawn, not just this one */ - return; - } - } -} - -static void -e_summary_mail_protocol (ESummary *summary, - const char *uri, - void *closure) -{ -} - - - -static gboolean -e_summary_folder_register_storage (const char *name, - GNOME_Evolution_Storage corba_storage) -{ - GNOME_Evolution_StorageListener corba_listener; - StorageInfo *si; - CORBA_Environment ev; - - si = g_new (StorageInfo, 1); - si->name = g_strdup (name); - si->toplevel = NULL; - si->storage = corba_storage; - si->listener = evolution_storage_listener_new (); - si->folders = NULL; - - folder_store->storage_list = g_slist_prepend (folder_store->storage_list, si); - - g_signal_connect (si->listener, "new-folder", G_CALLBACK (new_folder_cb), si); - g_signal_connect (si->listener, "removed-folder", G_CALLBACK (remove_folder_cb), si); - g_signal_connect (si->listener, "update_folder", G_CALLBACK (update_folder_cb), si); - - corba_listener = evolution_storage_listener_corba_objref (si->listener); - - CORBA_exception_init (&ev); - GNOME_Evolution_Storage_addListener (corba_storage, corba_listener, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Exception adding listener: %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - - return FALSE; - } - - CORBA_exception_free (&ev); - - return TRUE; -} - -static gboolean -e_summary_folder_unregister_storage (StorageInfo *si, gboolean remove) -{ - GNOME_Evolution_StorageListener corba_listener; - CORBA_Environment ev; - - g_free (si->name); - - corba_listener = evolution_storage_listener_corba_objref (si->listener); - - CORBA_exception_init (&ev); - GNOME_Evolution_Storage_removeListener (si->storage, corba_listener, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Exception removing listener: %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - - return FALSE; - } - CORBA_exception_free (&ev); - - g_signal_handlers_disconnect_matched (si->listener, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, si); - g_object_unref (si->listener); - - bonobo_object_release_unref (si->storage, NULL); - - /* FIXME Folders */ - - if (remove) - folder_store->storage_list = g_slist_remove (folder_store->storage_list, si); - - g_free (si); - - return TRUE; -} - -static void -e_summary_folder_register_local_storage (void) -{ - GNOME_Evolution_Storage local_storage; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - local_storage = GNOME_Evolution_Shell_getLocalStorage (folder_store->shell, &ev); - if (BONOBO_EX (&ev) || local_storage == CORBA_OBJECT_NIL) { - g_warning ("Error getting local storage: %s", CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return; - } - CORBA_exception_free (&ev); - - e_summary_folder_register_storage (_("Local Folders"), local_storage); -} - -static void -storage_notify (BonoboListener *listener, - const char *name, - const BonoboArg *arg, - CORBA_Environment *ev, - gpointer data) -{ - GNOME_Evolution_StorageRegistry_NotifyResult *nr; - GNOME_Evolution_Storage corba_storage; - CORBA_Environment ev2; - - nr = arg->_value; - - switch (nr->type) { - case GNOME_Evolution_StorageRegistry_STORAGE_CREATED: - /* These need to be special cased because they're special */ - if (strcmp (nr->name, "summary") == 0) { - break; - } - - if (strcmp (nr->name, "local") == 0) { - e_summary_folder_register_local_storage (); - break; - } - - CORBA_exception_init (&ev2); - corba_storage = GNOME_Evolution_StorageRegistry_getStorageByName (folder_store->registry, - nr->name, &ev2); - if (BONOBO_EX (&ev2) || corba_storage == CORBA_OBJECT_NIL) { - g_warning ("Error getting storage %s\n%s", nr->name, - CORBA_exception_id (&ev2)); - CORBA_exception_free (&ev2); - return; - } - - CORBA_exception_free (&ev2); - e_summary_folder_register_storage (nr->name, corba_storage); - break; - - case GNOME_Evolution_StorageRegistry_STORAGE_DESTROYED: - g_print ("%s removed\n", nr->name); - break; - - default: - g_print ("Unknown response %d\n", nr->type); - break; - } -} - -static gboolean -e_summary_folder_register_storages (GNOME_Evolution_Shell corba_shell) -{ - Bonobo_Listener corba_listener; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - folder_store->registry = Bonobo_Unknown_queryInterface (corba_shell, - "IDL:GNOME/Evolution/StorageRegistry:1.0", - &ev); - if (BONOBO_EX (&ev) || folder_store->registry == NULL) { - g_warning ("No storage registry: %s", CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return FALSE; - } - - folder_store->registry_listener = bonobo_listener_new (NULL, NULL); - g_signal_connect (folder_store->registry_listener, "event-notify", G_CALLBACK (storage_notify), NULL); - corba_listener = BONOBO_OBJREF (folder_store->registry_listener); - - /* Storages will be added whenever the listener gets an event. */ - GNOME_Evolution_StorageRegistry_addListener (folder_store->registry, corba_listener, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Cannot add listener\n%s", CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - return TRUE; -} - -void -e_summary_mail_init (ESummary *summary) -{ - ESummaryMail *mail; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - g_return_if_fail (folder_store != NULL); - - mail = g_new0 (ESummaryMail, 1); - summary->mail = mail; - - mail->html = NULL; - - e_summary_add_protocol_listener (summary, "mail", e_summary_mail_protocol, mail); - return; -} - -void -e_summary_mail_reconfigure (void) -{ - ESummaryPrefs *preferences; - GList *old; - GSList *p; - - old = folder_store->shown; - folder_store->shown = NULL; - - preferences = e_summary_preferences_get_global (); - for (p = preferences->display_folders; p; p = p->next) { - ESummaryMailFolder *folder; - ESummaryPrefsFolder *f = p->data; - char *uri; - -#if 0 - if (strncmp (p->data, "file://", 7) == 0 || - strncmp (p->data, "vfolder:", 8) == 0) { - uri = g_strdup (p->data); - } else { - uri = g_strconcat ("file://", p->data, NULL); - } -#endif - uri = g_strdup (f->physical_uri); - folder = g_hash_table_lookup (folder_store->physical_uri_to_folder, uri); - if (folder != NULL) { - if (folder->init == FALSE) { - e_summary_mail_get_info (folder->physical_uri); - } - folder_store->shown = g_list_append (folder_store->shown, folder); - } - - g_free (uri); - } - - /* Free the old list */ - g_list_free (old); - -/* e_summary_redraw_all (); */ -} - - -void -e_summary_mail_free (ESummary *summary) -{ - ESummaryMail *mail; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - mail = summary->mail; - -#if 0 - g_hash_table_foreach (mail->folders, free_folder, NULL); - g_hash_table_destroy (mail->folders); -#endif - g_free (mail->html); - -#if 0 - g_signal_handlers_disconnect_by_func (mail->storage_listener, G_CALLBACK (new_folder_cb), summary); - g_signal_handlers_disconnect_by_func (mail->storage_listener, G_CALLBACK (remove_folder_cb), summary); - g_signal_handlers_disconnect_by_func (mail->storage_listener, G_CALLBACK (update_folder_cb), summary); -#endif - - g_free (mail); - summary->mail = NULL; -} - -static void -folder_info_pb_changed (BonoboListener *listener, - const char *name, - const BonoboArg *arg, - CORBA_Environment *ev, - gpointer data) -{ - e_summary_folder_register_storages (folder_store->shell); - bonobo_object_unref (listener); -} - -static void -lazy_register_storages (void) -{ - Bonobo_PropertyBag pb; - Bonobo_EventSource event; - BonoboListener *listener; - CORBA_Environment ev; - gboolean ready; - - /* Get the PropertyBag */ - CORBA_exception_init (&ev); - pb = Bonobo_Unknown_queryInterface (folder_store->folder_info, - "IDL:Bonobo/PropertyBag:1.0", &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting propertybag interface: %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return; - } - - /* Check the initial value */ - ready = bonobo_property_bag_client_get_value_gboolean (pb, - "folder-info-ready", - NULL); - if (ready == TRUE) { - /* Register storages */ - e_summary_folder_register_storages (folder_store->shell); - bonobo_object_release_unref (pb, NULL); - return; - } - - /* Get thh event source for the bag */ - event = Bonobo_Unknown_queryInterface (pb, - "IDL:Bonobo/EventSource:1.0", &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting event source interface: %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - bonobo_object_release_unref (pb, NULL); - return; - } - - /* Connect a listener to it */ - listener = bonobo_listener_new (NULL, NULL); - g_signal_connect (listener, "event-notify", G_CALLBACK (folder_info_pb_changed), NULL); - - Bonobo_EventSource_addListener (event, BONOBO_OBJREF (listener), &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error adding listener: %s\n", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - bonobo_object_unref (BONOBO_OBJECT (listener)); - } - - bonobo_object_release_unref (pb, NULL); - bonobo_object_release_unref (event, NULL); -} - -gboolean -e_summary_folder_init_folder_store (GNOME_Evolution_Shell shell) -{ - CORBA_Environment ev; - - if (folder_store != NULL) { - return TRUE; - } - - folder_store = g_new0 (FolderStore, 1); - folder_store->shell = shell; - - CORBA_exception_init (&ev); - folder_store->folder_info = bonobo_activation_activate_from_id (MAIL_IID, 0, NULL, &ev); - if (BONOBO_EX (&ev) || folder_store->folder_info == NULL) { - g_warning ("Exception creating folderinfo: %s\n", - CORBA_exception_id (&ev) ? CORBA_exception_id (&ev) : "(null)"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - folder_store->listener = bonobo_listener_new (NULL, NULL); - g_signal_connect (folder_store->listener, "event-notify", G_CALLBACK (mail_change_notify), NULL); - - /* Create a hash table for the folders */ - folder_store->path_to_folder = g_hash_table_new (g_str_hash, g_str_equal); - folder_store->physical_uri_to_folder = g_hash_table_new (g_str_hash, g_str_equal); - - /* Wait for the mailer to tell us we're ready to register */ - lazy_register_storages (); - return TRUE; -} - - -gboolean -e_summary_folder_clear_folder_store (void) -{ - GSList *l; - - if (folder_store == NULL) { - return TRUE; - } - - bonobo_object_release_unref (folder_store->folder_info, NULL); - bonobo_object_release_unref (folder_store->registry, NULL); - bonobo_object_unref (folder_store->registry_listener); - bonobo_object_unref (folder_store->listener); - - for (l = folder_store->storage_list; l != NULL; l = l->next) - e_summary_folder_unregister_storage (l->data, FALSE); - g_slist_free (folder_store->storage_list); - - g_free (folder_store); - folder_store = NULL; - - return TRUE; -} diff --git a/my-evolution/e-summary-mail.h b/my-evolution/e-summary-mail.h deleted file mode 100644 index acf9321692..0000000000 --- a/my-evolution/e-summary-mail.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-mail.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifndef __E_SUMMARY_MAIL_H__ -#define __E_SUMMARY_MAIL_H__ - -#include <Evolution.h> - -#include "e-summary-type.h" -#include "e-summary-table.h" - -typedef enum _ESummaryMailMode ESummaryMailMode; -enum _ESummaryMailMode { - E_SUMMARY_MAIL_MODE_ONLY, - E_SUMMARY_MAIL_MODE_EXCLUDING -}; - -typedef struct _ESummaryMailRowData ESummaryMailRowData; -typedef struct _ESummaryMail ESummaryMail; - -struct _ESummaryMailRowData { - char *name; - char *uri; -}; - -const char *e_summary_mail_get_html (ESummary *summary); -void e_summary_mail_init (ESummary *summary); -void e_summary_mail_reconfigure (void); -void e_summary_mail_free (ESummary *summary); -const char *e_summary_mail_uri_to_name (const char *uri); -void e_summary_mail_fill_list (ESummaryTable *est); - -/* Folder stuff */ -gboolean e_summary_folder_init_folder_store (GNOME_Evolution_Shell shell); -gboolean e_summary_folder_clear_folder_store (void); -#endif diff --git a/my-evolution/e-summary-offline-handler.c b/my-evolution/e-summary-offline-handler.c deleted file mode 100644 index 846b3245fb..0000000000 --- a/my-evolution/e-summary-offline-handler.c +++ /dev/null @@ -1,286 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-offline-handler.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Ettore Perazzoli <ettore@ximian.com> - * Dan Winship <danw@ximian.com> - * Iain Holmes <iain@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "e-summary-offline-handler.h" -#include "e-summary.h" - -#include <bonobo/bonobo-exception.h> -#include <gtk/gtkmain.h> -#include <gtk/gtksignal.h> -#include <gal/util/e-util.h> - -#define PARENT_TYPE bonobo_object_get_type () -static BonoboObjectClass *parent_class = NULL; - -struct _ESummaryOfflineHandlerPriv { - GSList *summaries; - GNOME_Evolution_OfflineProgressListener listener_interface; -}; - -/* ::destroy handler for the bookkeeping of the list of summary views. */ - -static void -summary_destroy_callback (GtkObject *object, - void *data) -{ - ESummaryOfflineHandler *offline_handler; - ESummaryOfflineHandlerPriv *priv; - ESummary *summary; - - summary = E_SUMMARY (object); - offline_handler = E_SUMMARY_OFFLINE_HANDLER (data); - priv = offline_handler->priv; - - priv->summaries = g_slist_remove (priv->summaries, summary); -} - -static GNOME_Evolution_ConnectionList * -create_connection_list (GSList *summaries) -{ - GNOME_Evolution_ConnectionList *list; - GList *connections, *p; - GSList *sp; - - list = GNOME_Evolution_ConnectionList__alloc (); - list->_length = 0; - list->_maximum = 0; - - /* Count the total number of connections first to make CORBA happy. */ - for (sp = summaries; sp != NULL; sp = sp->next) - list->_maximum += e_summary_count_connections (E_SUMMARY (sp->data)); - - list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum); - - for (sp = summaries; sp != NULL; sp = sp->next) { - ESummary *summary; - - summary = E_SUMMARY (sp->data); - connections = e_summary_add_connections (summary); - for (p = connections; p != NULL; p = p->next) { - ESummaryConnectionData *data; - - data = p->data; - list->_buffer[list->_length].hostName = CORBA_string_dup (data->hostname); - list->_buffer[list->_length].type = CORBA_string_dup (data->type); - list->_length++; - - g_free (data->hostname); - g_free (data->type); - g_free (data); - } - g_list_free (connections); - } - - return list; -} - -/* GNOME::Evolution::Offline methods. */ -static CORBA_boolean -impl__get_isOffline (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - ESummaryOfflineHandler *offline_handler; - GSList *sp; - - offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant)); - - /* We are offline if all of the views are offline. */ - for (sp = offline_handler->priv->summaries; sp != NULL; sp = sp->next) { - ESummary *summary; - - summary = E_SUMMARY (sp->data); - if (summary->online) - return FALSE; - } - - return TRUE; -} - -static void -impl_prepareForOffline (PortableServer_Servant servant, - GNOME_Evolution_ConnectionList **active_connection_list, - CORBA_Environment *ev) -{ - ESummaryOfflineHandler *offline_handler; - ESummaryOfflineHandlerPriv *priv; - - offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant)); - priv = offline_handler->priv; - - *active_connection_list = create_connection_list (priv->summaries); -} - -static void -went_offline (ESummary *summary, - void *data) -{ - ESummaryOfflineHandler *offline_handler = data; - ESummaryOfflineHandlerPriv *priv; - CORBA_Environment ev; - GNOME_Evolution_ConnectionList *connection_list; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - g_return_if_fail (offline_handler != NULL); - - priv = offline_handler->priv; - connection_list = create_connection_list (priv->summaries); - - CORBA_exception_init (&ev); - - g_warning ("Went offline"); - GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error updating offline progress: %s", - CORBA_exception_id (&ev)); - } - - CORBA_exception_free (&ev); -} - -static void -impl_goOffline (PortableServer_Servant servant, - const GNOME_Evolution_OfflineProgressListener progress_listener, - CORBA_Environment *ev) -{ - ESummaryOfflineHandler *offline_handler; - ESummaryOfflineHandlerPriv *priv; - GSList *sp; - - offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant)); - priv = offline_handler->priv; - - /* FIXME: If we have a progress already, then something is wrong and we - should raise an exception. */ - priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev); - - for (sp = priv->summaries; sp != NULL; sp = sp->next) { - ESummary *summary; - - summary = E_SUMMARY (sp->data); - e_summary_set_online (summary, CORBA_OBJECT_NIL, FALSE, went_offline, offline_handler); - } -} - -static void -impl_goOnline (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - ESummaryOfflineHandler *offline_handler; - GSList *sp; - - offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant)); - - for (sp = offline_handler->priv->summaries; sp != NULL; sp = sp->next) { - ESummary *summary; - - summary = E_SUMMARY (sp->data); - e_summary_set_online (summary, CORBA_OBJECT_NIL, TRUE, NULL, NULL); - } -} - -/* GObject methods */ - -static void -impl_finalize (GObject *object) -{ - ESummaryOfflineHandler *offline_handler; - ESummaryOfflineHandlerPriv *priv; - - offline_handler = E_SUMMARY_OFFLINE_HANDLER (object); - priv = offline_handler->priv; - - if (priv->listener_interface != CORBA_OBJECT_NIL) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - CORBA_Object_release (priv->listener_interface, &ev); - CORBA_exception_free (&ev); - } - - g_slist_free (priv->summaries); - - g_free (priv); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); -} - -static void -e_summary_offline_handler_class_init (ESummaryOfflineHandlerClass *klass) -{ - GObjectClass *object_class; - POA_GNOME_Evolution_Offline__epv *epv; - - object_class = G_OBJECT_CLASS (klass); - object_class->finalize = impl_finalize; - - epv = &klass->epv; - epv->_get_isOffline = impl__get_isOffline; - epv->prepareForOffline = impl_prepareForOffline; - epv->goOffline = impl_goOffline; - epv->goOnline = impl_goOnline; - - parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -e_summary_offline_handler_init (ESummaryOfflineHandler *offline_handler) -{ - ESummaryOfflineHandlerPriv *priv; - - priv = g_new0 (ESummaryOfflineHandlerPriv, 1); - - offline_handler->priv = priv; -} - -ESummaryOfflineHandler * -e_summary_offline_handler_new (void) -{ - ESummaryOfflineHandler *new; - - new = g_object_new (e_summary_offline_handler_get_type (), NULL); - - return new; -} - -void -e_summary_offline_handler_add_summary (ESummaryOfflineHandler *handler, - ESummary *summary) -{ - g_return_if_fail (handler != NULL); - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - handler->priv->summaries = g_slist_prepend (handler->priv->summaries, - summary); - - g_signal_connect (summary, "destroy", G_CALLBACK (summary_destroy_callback), handler); -} - -BONOBO_TYPE_FUNC_FULL (ESummaryOfflineHandler, GNOME_Evolution_Offline, PARENT_TYPE, e_summary_offline_handler); diff --git a/my-evolution/e-summary-offline-handler.h b/my-evolution/e-summary-offline-handler.h deleted file mode 100644 index 1a4f25e2ff..0000000000 --- a/my-evolution/e-summary-offline-handler.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-offline-handler.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Ettore Perazzoli <ettore@ximian.com> - * Dan Winship <danw@ximian.com> - * Iain Holmes <iain@ximian.com> - */ - -#ifndef __E_SUMMARY_OFFLINE_HANDLER_H__ -#define __E_SUMMARY_OFFLINE_HANDLER_H__ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-object.h> -#include "e-summary.h" -#include "Evolution.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif - -#define E_SUMMARY_TYPE_OFFLINE_HANDLER (e_summary_offline_handler_get_type ()) -#define E_SUMMARY_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandler)) -#define E_SUMMARY_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandlerClass)) - - -typedef struct _ESummaryOfflineHandler ESummaryOfflineHandler; -typedef struct _ESummaryOfflineHandlerPriv ESummaryOfflineHandlerPriv; -typedef struct _ESummaryOfflineHandlerClass ESummaryOfflineHandlerClass; - -struct _ESummaryOfflineHandler { - BonoboObject parent; - - ESummaryOfflineHandlerPriv *priv; -}; - -struct _ESummaryOfflineHandlerClass { - BonoboObjectClass parent_class; - - POA_GNOME_Evolution_Offline__epv epv; -}; - - -GtkType e_summary_offline_handler_get_type (void); -ESummaryOfflineHandler *e_summary_offline_handler_new (void); - -void e_summary_offline_handler_add_summary (ESummaryOfflineHandler *handler, - ESummary *summary); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c deleted file mode 100644 index b427335e19..0000000000 --- a/my-evolution/e-summary-preferences.c +++ /dev/null @@ -1,1253 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-preferences.c - * - * Copyright (C) 2001, 2002 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtk.h> - -#include <libgnome/gnome-util.h> -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-config.h> - -#include <libgnomeui/gnome-propertybox.h> - -#include <glade/glade.h> -#include <stdio.h> - -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-generic-factory.h> -#include <bonobo/bonobo-moniker-util.h> -#include <bonobo/bonobo-shlib-factory.h> -#include <bonobo/bonobo-control.h> -#include <bonobo/bonobo-widget.h> - -#include <gconf/gconf-client.h> - -#include <shell/evolution-storage-set-view-listener.h> - -#include <string.h> - -#include "e-summary.h" -#include "e-summary-preferences.h" -#include "e-summary-table.h" -#include "e-summary-shown.h" - -#include "evolution-config-control.h" - -static ESummaryPrefs *global_preferences = NULL; -static GNOME_Evolution_Shell global_shell = NULL; - -gboolean -e_summary_preferences_restore (ESummaryPrefs *prefs) -{ - GConfClient *gconf_client; - GSList *path_list; - GSList *uri_list; - GSList *p, *q; - - g_return_val_if_fail (prefs != NULL, FALSE); - - gconf_client = gconf_client_get_default (); - - path_list = gconf_client_get_list (gconf_client, "/apps/evolution/summary/mail/folder_evolution_uris", - GCONF_VALUE_STRING, NULL); - uri_list = gconf_client_get_list (gconf_client, "/apps/evolution/summary/mail/folder_physical_uris", - GCONF_VALUE_STRING, NULL); - - prefs->display_folders = NULL; - for (p = path_list, q = uri_list; p != NULL && q != NULL; p = p->next, q = q->next) { - ESummaryPrefsFolder *folder; - - folder = g_new (ESummaryPrefsFolder, 1); - folder->evolution_uri = p->data; - folder->physical_uri = q->data; - prefs->display_folders = g_slist_append(prefs->display_folders, folder); - } - - g_slist_free (path_list); - g_slist_free (uri_list); - - prefs->show_full_path = gconf_client_get_bool (gconf_client, "/apps/evolution/summary/mail/show_full_paths", NULL); - - prefs->rdf_urls = gconf_client_get_list (gconf_client, "/apps/evolution/summary/rdf/uris", - GCONF_VALUE_STRING, NULL); - - prefs->rdf_refresh_time = gconf_client_get_int (gconf_client, "/apps/evolution/summary/rdf/refresh_time", NULL); - - prefs->limit = gconf_client_get_int (gconf_client, "/apps/evolution/summary/rdf/max_items", NULL); - - prefs->stations = gconf_client_get_list (gconf_client, "/apps/evolution/summary/weather/stations", - GCONF_VALUE_STRING, NULL); - - if (gconf_client_get_bool (gconf_client, "/apps/evolution/summary/weather/use_metric", NULL)) - prefs->units = UNITS_METRIC; - else - prefs->units = UNITS_IMPERIAL; - - prefs->weather_refresh_time = gconf_client_get_int (gconf_client, "/apps/evolution/summary/weather/refresh_time", - NULL); - - prefs->days = gconf_client_get_int (gconf_client, "/apps/evolution/summary/calendar/days_shown", NULL); - if (gconf_client_get_bool (gconf_client, "/apps/evolution/summary/tasks/show_all", NULL)) - prefs->show_tasks = E_SUMMARY_CALENDAR_ALL_TASKS; - else - prefs->show_tasks = E_SUMMARY_CALENDAR_ONE_DAY; - - g_object_unref (gconf_client); - return TRUE; -} - -void -e_summary_preferences_save (ESummaryPrefs *prefs) -{ - GConfClient *gconf_client; - GSList *evolution_uri_list, *physical_uri_list; - GSList *p; - - gconf_client = gconf_client_get_default (); - - evolution_uri_list = NULL; - physical_uri_list = NULL; - for (p = prefs->display_folders; p != NULL; p = p->next) { - const ESummaryPrefsFolder *folder; - - folder = (const ESummaryPrefsFolder *) p->data; - evolution_uri_list = g_slist_prepend (evolution_uri_list, folder->evolution_uri); - physical_uri_list = g_slist_prepend (physical_uri_list, folder->physical_uri); - } - evolution_uri_list = g_slist_reverse (evolution_uri_list); - physical_uri_list = g_slist_reverse (physical_uri_list); - - gconf_client_set_list (gconf_client, "/apps/evolution/summary/mail/folder_evolution_uris", - GCONF_VALUE_STRING, evolution_uri_list, NULL); - gconf_client_set_list (gconf_client, "/apps/evolution/summary/mail/folder_physical_uris", - GCONF_VALUE_STRING, physical_uri_list, NULL); - - g_slist_free (evolution_uri_list); - g_slist_free (physical_uri_list); - - gconf_client_set_bool (gconf_client, "/apps/evolution/summary/mail/show_full_paths", prefs->show_full_path, NULL); - - gconf_client_set_list (gconf_client, "/apps/evolution/summary/rdf/uris", - GCONF_VALUE_STRING, prefs->rdf_urls, NULL); - - gconf_client_set_int (gconf_client, "/apps/evolution/summary/rdf/refresh_time", prefs->rdf_refresh_time, NULL); - gconf_client_set_int (gconf_client, "/apps/evolution/summary/rdf/max_items", prefs->limit, NULL); - - gconf_client_set_list (gconf_client, "/apps/evolution/summary/weather/stations", - GCONF_VALUE_STRING, prefs->stations, NULL); - - gconf_client_set_bool (gconf_client, "/apps/evolution/summary/weather/use_metric", - prefs->units == UNITS_METRIC, NULL); - gconf_client_set_int (gconf_client, "/apps/evolution/summary/weather/refresh_time", - prefs->weather_refresh_time, NULL); - - gconf_client_set_int (gconf_client, "/apps/evolution/summary/calendar/days_shown", - prefs->days, NULL); - - gconf_client_set_bool (gconf_client, "/apps/evolution/summary/tasks/show_all", - prefs->show_tasks == E_SUMMARY_CALENDAR_ALL_TASKS, NULL); - - g_object_unref (gconf_client); -} - -static void -free_str_list (GSList *list) -{ - for (; list; list = list->next) { - g_free (list->data); - } -} - -static void -free_folder_list (GSList *list) -{ - for (; list; list = list->next) { - ESummaryPrefsFolder *f = list->data; - - g_free (f->evolution_uri); - g_free (f->physical_uri); - g_free (f); - } -} - -void -e_summary_preferences_free (ESummaryPrefs *prefs) -{ - if (prefs->display_folders) { - free_folder_list (prefs->display_folders); - g_slist_free (prefs->display_folders); - } - - if (prefs->rdf_urls) { - free_str_list (prefs->rdf_urls); - g_slist_free (prefs->rdf_urls); - } - - if (prefs->stations) { - free_str_list (prefs->stations); - g_slist_free (prefs->stations); - } - - g_free (prefs); -} - -static GSList * -copy_str_list (GSList *list) -{ - GSList *list_copy = NULL; - - for (; list; list = list->next) { - list_copy = g_slist_prepend (list_copy, g_strdup (list->data)); - } - - list_copy = g_slist_reverse (list_copy); - return list_copy; -} - -static GSList * -copy_folder_list (GSList *list) -{ - GSList *list_copy = NULL; - - for (; list; list = list->next) { - ESummaryPrefsFolder *f1, *f2; - - f1 = list->data; - f2 = g_new (ESummaryPrefsFolder, 1); - f2->evolution_uri = g_strdup (f1->evolution_uri); - f2->physical_uri = g_strdup (f1->physical_uri); - - list_copy = g_slist_prepend (list_copy, f2); - } - - list_copy = g_slist_reverse (list_copy); - return list_copy; -} - -ESummaryPrefs * -e_summary_preferences_copy (ESummaryPrefs *prefs) -{ - ESummaryPrefs *prefs_copy; - - prefs_copy = g_new (ESummaryPrefs, 1); - - prefs_copy->display_folders = copy_folder_list (prefs->display_folders); - prefs_copy->show_full_path = prefs->show_full_path; - - prefs_copy->rdf_urls = copy_str_list (prefs->rdf_urls); - prefs_copy->rdf_refresh_time = prefs->rdf_refresh_time; - prefs_copy->limit = prefs->limit; - - prefs_copy->stations = copy_str_list (prefs->stations); - prefs_copy->units = prefs->units; - prefs_copy->weather_refresh_time = prefs->weather_refresh_time; - - prefs_copy->days = prefs->days; - prefs_copy->show_tasks = prefs->show_tasks; - - return prefs_copy; -} - -ESummaryPrefs * -e_summary_preferences_init (void) -{ - ESummaryPrefs *prefs; - - if (global_preferences != NULL) { - return global_preferences; - } - - prefs = g_new0 (ESummaryPrefs, 1); - global_preferences = prefs; - - e_summary_preferences_restore (prefs); - - return prefs; -} - -ESummaryPrefs * -e_summary_preferences_get_global (void) -{ - g_assert(global_preferences); - - return global_preferences; -} - -struct _MailPage { - GtkWidget *storage_set_view; - GtkWidget *all, *shown; - GtkWidget *fullpath; - GtkWidget *add, *remove; - - GHashTable *model; - GSList *tmp_list; -}; - -struct _RDFPage { - GtkWidget *etable; - GtkWidget *refresh, *limit; - GtkWidget *new_button, *delete_url; - - GHashTable *default_hash, *model; - GSList *known, *tmp_list; -}; - -struct _WeatherPage { - GtkWidget *etable; - GtkWidget *refresh, *imperial, *metric; - GtkWidget *add, *remove; - - GHashTable *model; - GSList *tmp_list; -}; - -struct _CalendarPage { - GtkWidget *one, *five, *week, *month; - GtkWidget *all, *today; -}; - -typedef struct _PropertyData { - EvolutionConfigControl *config_control; - - GladeXML *xml; - - struct _MailPage *mail; - struct _RDFPage *rdf; - struct _WeatherPage *weather; - struct _CalendarPage *calendar; -} PropertyData; - -struct _RDFInfo { - char *url; - char *name; - - gboolean custom; -}; - -static struct _RDFInfo rdfs[] = { - {"http://advogato.org/rss/articles.xml", "Advogato", FALSE}, - {"http://barrapunto.com/barrapunto.rdf", "Barrapunto", FALSE}, - {"http://barrapunto.com/gnome.rdf", "Barrapunto GNOME", FALSE,}, - {"http://www.bsdtoday.com/backend/bt.rdf", "BSD Today", FALSE}, - {"http://beyond2000.com/b2k.rdf", "Beyond 2000", FALSE}, - {"http://www.dictionary.com/wordoftheday/wotd.rss", N_("Dictionary.com Word of the Day"), FALSE}, - {"http://www.dvdreview.com/rss/newschannel.rss", "DVD Review", FALSE}, - {"http://freshmeat.net/backend/fm.rdf", "Freshmeat", FALSE}, - {"http://www.gnomedesktop.org/backend.php", "Footnotes - GNOME News", FALSE}, - {"http://headlines.internet.com/internetnews/prod-news/news.rss", "Internet.com", FALSE}, - {"http://www.hispalinux.es/backend.php", "HispaLinux", FALSE}, - {"http://dot.kde.org/rdf", "KDE Dot News", FALSE}, - {"http://www.kuro5hin.org/backend.rdf", "Kuro5hin", FALSE}, - {"http://linuxgames.com/bin/mynetscape.pl", "Linux Games", FALSE}, - {"http://linuxtoday.com/backend/my-netscape.rdf", "Linux Today", FALSE}, - {"http://lwn.net/headlines/rss", "Linux Weekly News", FALSE}, - {"http://memepool.com/memepool.rss", "Memepool", FALSE}, - {"http://www.mozilla.org/news.rdf", "Mozilla", FALSE}, - {"http://www.mozillazine.org/contents.rdf", "Mozillazine", FALSE}, - {"http://www.fool.com/about/headlines/rss_headlines.asp", "The Motley Fool", FALSE}, - {"http://www.newsforge.com/newsforge.rss", "Newsforge", FALSE}, - {"http://www.pigdog.org/pigdog.rdf", "Pigdog", FALSE}, - {"http://www.python.org/channews.rdf", "Python.org", FALSE}, - {"http://www.quotationspage.com/data/mqotd.rss", N_("Quotes of the Day"), FALSE}, - {"http://www.salon.com/feed/RDF/salon_use.rdf", "Salon", FALSE}, - {"http://slashdot.org/slashdot.rdf", "Slashdot", FALSE}, - {"http://www.theregister.co.uk/tonys/slashdot.rdf", "The Register", FALSE}, - {"http://www.webreference.com/webreference.rdf", "Web Reference", FALSE}, - {"http://redcarpet.ximian.com/red-carpet.rdf", "Ximian Red Carpet News", FALSE}, - {NULL, NULL, FALSE} -}; - -static void -save_known_rdfs (GSList *rdfs) -{ - FILE *handle; - char *rdf_file; - - rdf_file = gnome_util_prepend_user_home ("evolution/RDF-urls.txt"); - handle = fopen (rdf_file, "w"); - g_free (rdf_file); - - if (handle == NULL) { - g_warning ("Error opening RDF-urls.txt"); - return; - } - - for (; rdfs; rdfs = rdfs->next) { - struct _RDFInfo *info; - char *line; - - info = rdfs->data; - if (info->custom == FALSE) { - continue; - } - - line = g_strconcat (info->url, ",", info->name, "\n", NULL); - fputs (line, handle); - g_free (line); - } - - fclose (handle); -} - -/* Yeah a silly loop, but p should be short enough that it doesn't matter much */ -static gboolean -rdf_is_shown (PropertyData *pd, - const char *url) -{ - GSList *p; - - for (p = global_preferences->rdf_urls; p; p = p->next) { - if (strcmp (p->data, url) == 0) { - return TRUE; - } - } - - return FALSE; -} - -static void -fill_rdf_etable (GtkWidget *widget, - PropertyData *pd) -{ - ESummaryShownModelEntry *entry; - ESummaryShown *ess; - FILE *handle; - int i, total; - char *rdf_file, line[4096]; - - if (pd->rdf->default_hash == NULL) { - pd->rdf->default_hash = g_hash_table_new (g_str_hash, g_str_equal); - } - - ess = E_SUMMARY_SHOWN (widget); - e_summary_shown_freeze (ess); - - /* Fill the defaults first */ - for (i = 0; rdfs[i].url; i++) { - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (rdfs[i].url); - entry->name = g_strdup (rdfs[i].name); - entry->showable = TRUE; - entry->data = &rdfs[i]; - - e_summary_shown_add_node (ess, TRUE, entry, NULL, FALSE, NULL); - - if (rdf_is_shown (pd, rdfs[i].url) == TRUE) { - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (rdfs[i].url); - entry->name = g_strdup (rdfs[i].name); - entry->showable = TRUE; - entry->data = &rdfs[i]; - - e_summary_shown_add_node (ess, FALSE, entry, NULL, FALSE, NULL); - } - - pd->rdf->known = g_slist_append (pd->rdf->known, &rdfs[i]); - - g_hash_table_insert (pd->rdf->default_hash, rdfs[i].url, &rdfs[i]); - } - - total = i; - - rdf_file = gnome_util_prepend_user_home ("evolution/RDF-urls.txt"); - handle = fopen (rdf_file, "r"); - g_free (rdf_file); - if (handle == NULL) { - /* Open the old location just so that users data isn't lost */ - rdf_file = gnome_util_prepend_user_home ("evolution/config/RDF-urls.txt"); - handle = fopen (rdf_file, "r"); - g_free (rdf_file); - } - - if (handle == NULL) { - e_summary_shown_thaw (ess); - return; - } - - while (fgets (line, 4095, handle)) { - char **tokens; - struct _RDFInfo *info; - int len; - - len = strlen (line); - if (line[len - 1] == '\n') { - line[len - 1] = 0; - } - - tokens = g_strsplit (line, ",", 2); - if (tokens == NULL) { - continue; - } - - if (g_hash_table_lookup (pd->rdf->default_hash, tokens[0]) != NULL) { - g_strfreev (tokens); - continue; - } - - info = g_new (struct _RDFInfo, 1); - info->url = g_strdup (tokens[0]); - info->name = g_strdup (tokens[1]); - info->custom = TRUE; - - pd->rdf->known = g_slist_append (pd->rdf->known, info); - - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (info->url); - entry->name = g_strdup (info->name); - entry->showable = TRUE; - entry->data = info; - - e_summary_shown_add_node (ess, TRUE, entry, NULL, FALSE, NULL); - - if (rdf_is_shown (pd, tokens[0]) == TRUE) { - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (info->url); - entry->name = g_strdup (info->name); - entry->showable = TRUE; - entry->data = info; - - e_summary_shown_add_node (ess, FALSE, entry, NULL, FALSE, NULL); - } - - g_strfreev (tokens); - } - - fclose (handle); - e_summary_shown_thaw (ess); -} - -static void -fill_weather_etable (ESummaryShown *ess, - PropertyData *pd) -{ - e_summary_weather_fill_etable (ess); -} - -static void -mail_show_full_path_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - global_preferences->show_full_path = gtk_toggle_button_get_active (tb); - - evolution_config_control_changed (pd->config_control); -} - -static void -rdf_new_url_clicked_cb (GtkButton *button, - PropertyData *pd) -{ - GtkWidget *add_dialog; - GtkWidget *name_label, *url_label, *table; - GtkWidget *new_name_entry, *new_url_entry; - - add_dialog = gtk_dialog_new_with_buttons (_("New News Feed"), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_default_response (GTK_DIALOG (add_dialog), GTK_RESPONSE_OK); - - table = gtk_table_new (2, 2, FALSE); - - name_label = gtk_label_new_with_mnemonic (_("_Name:")); - gtk_table_attach (GTK_TABLE (table), name_label, 0, 1, 0, 1, GTK_FILL, 0, 6, 6); - - new_name_entry = gtk_entry_new (); - gtk_table_attach (GTK_TABLE (table), new_name_entry, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 6, 6); - - url_label = gtk_label_new_with_mnemonic (_("_URL:")); - gtk_table_attach (GTK_TABLE (table), url_label, 0, 1, 1, 2, GTK_FILL, 0, 6, 6); - - new_url_entry = gtk_entry_new (); - gtk_table_attach (GTK_TABLE (table), new_url_entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 6, 6); - - - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (add_dialog)->vbox), table, FALSE, FALSE, 6); - gtk_widget_show_all (add_dialog); - - if (gtk_dialog_run (GTK_DIALOG (add_dialog)) == GTK_RESPONSE_OK) { - const char *url; - const char *name; - - name = gtk_entry_get_text (GTK_ENTRY (new_name_entry)); - url = gtk_entry_get_text (GTK_ENTRY (new_url_entry)); - - if (name != NULL && *name != 0 && url != NULL && *url != 0) { - ESummaryShownModelEntry *entry; - struct _RDFInfo *info; - - info = g_new (struct _RDFInfo, 1); - info->url = g_strdup (url); - info->name = g_strdup (name); - info->custom = TRUE; - - pd->rdf->known = g_slist_append (pd->rdf->known, info); - - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (info->url); - entry->name = g_strdup (info->name); - entry->showable = TRUE; - entry->data = info; - - e_summary_shown_add_node (E_SUMMARY_SHOWN (pd->rdf->etable), TRUE, - entry, NULL, FALSE, NULL); - - /* Should we add to shown? */ - - save_known_rdfs (pd->rdf->known); - - evolution_config_control_changed (pd->config_control); - } - } - - gtk_widget_destroy (add_dialog); -} - -static void -rdf_delete_url_cb (GtkButton *button, - PropertyData *pd) -{ - GList *selection; - - selection = e_summary_shown_get_selection (E_SUMMARY_SHOWN (pd->rdf->etable), TRUE); - - for (; selection; selection = selection->next) { - ETreePath path = selection->data; - ESummaryShownModelEntry *entry; - - entry = g_hash_table_lookup (E_SUMMARY_SHOWN (pd->rdf->etable)->all_model, path); - - if (entry == NULL) { - continue; - } - - e_summary_shown_remove_node (E_SUMMARY_SHOWN (pd->rdf->etable), TRUE, entry); - pd->rdf->known = g_slist_remove (pd->rdf->known, entry->data); - - /* FIXME: Remove from shown side as well */ - } - - save_known_rdfs (pd->rdf->known); -} - -static void -rdf_refresh_value_changed_cb (GtkAdjustment *adj, - PropertyData *pd) -{ - global_preferences->rdf_refresh_time = (int) adj->value; - evolution_config_control_changed (pd->config_control); -} - -static void -rdf_limit_value_changed_cb (GtkAdjustment *adj, - PropertyData *pd) -{ - global_preferences->limit = (int) adj->value; - evolution_config_control_changed (pd->config_control); -} - -static void -rdf_etable_item_changed_cb (ESummaryShown *ess, - PropertyData *pd) -{ - if (pd->config_control != NULL) { - evolution_config_control_changed (pd->config_control); - } -} - -static void -rdf_etable_selection_cb (ESummaryShown *ess, - GList *selection, - PropertyData *pd) -{ - if (pd->rdf->delete_url == NULL) { - return; - } - - if (selection != NULL) { - GList *p; - - for (p = selection; p; p = p->next) { - ESummaryShownModelEntry *entry; - struct _RDFInfo *info; - - entry = g_hash_table_lookup (E_SUMMARY_SHOWN (pd->rdf->etable)->all_model, p->data); - if (entry == NULL) { - g_warning ("Hmmm\n"); - continue; - } - - info = entry->data; - if (info->custom == TRUE) { - gtk_widget_set_sensitive (pd->rdf->delete_url, TRUE); - return; - } - } - } - - gtk_widget_set_sensitive (pd->rdf->delete_url, FALSE); -} - -static void -weather_etable_item_changed_cb (ESummaryShown *ess, - PropertyData *pd) -{ - if (pd->config_control != NULL) { - evolution_config_control_changed (pd->config_control); - } -} - -static void -weather_refresh_value_changed_cb (GtkAdjustment *adj, - PropertyData *pd) -{ - global_preferences->weather_refresh_time = (int) adj->value; - evolution_config_control_changed (pd->config_control); -} - -static void -weather_metric_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->units = UNITS_METRIC; - evolution_config_control_changed (pd->config_control); -} - -static void -weather_imperial_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->units = UNITS_IMPERIAL; - evolution_config_control_changed (pd->config_control); -} - - -static void -calendar_one_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->days = E_SUMMARY_CALENDAR_ONE_DAY; - evolution_config_control_changed (pd->config_control); -} - -static void -calendar_five_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->days = E_SUMMARY_CALENDAR_FIVE_DAYS; - evolution_config_control_changed (pd->config_control); -} - -static void -calendar_week_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->days = E_SUMMARY_CALENDAR_ONE_WEEK; - evolution_config_control_changed (pd->config_control); -} - -static void -calendar_month_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->days = E_SUMMARY_CALENDAR_ONE_MONTH; - evolution_config_control_changed (pd->config_control); -} - -static void -calendar_all_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->show_tasks = E_SUMMARY_CALENDAR_ALL_TASKS; - evolution_config_control_changed (pd->config_control); -} - -static void -calendar_today_toggled_cb (GtkToggleButton *tb, - PropertyData *pd) -{ - if (gtk_toggle_button_get_active (tb) == FALSE) { - return; - } - - global_preferences->show_tasks = E_SUMMARY_CALENDAR_TODAYS_TASKS; - evolution_config_control_changed (pd->config_control); -} - -static void -storage_set_changed (EvolutionStorageSetViewListener *listener, - PropertyData *pd) -{ - evolution_config_control_changed (pd->config_control); -} - -static gboolean -make_property_dialog (PropertyData *pd) -{ - struct _MailPage *mail; - struct _RDFPage *rdf; - struct _WeatherPage *weather; - struct _CalendarPage *calendar; - GtkWidget *listener; - - /* Mail */ - mail = pd->mail = g_new (struct _MailPage, 1); - mail->tmp_list = NULL; - - mail->storage_set_view = glade_xml_get_widget (pd->xml, "mail-custom"); - g_return_val_if_fail (mail->storage_set_view != NULL, FALSE); - - listener = g_object_get_data (G_OBJECT (mail->storage_set_view), "listener"); - g_signal_connect (listener, "folder-toggled", G_CALLBACK (storage_set_changed), pd); - - mail->fullpath = glade_xml_get_widget (pd->xml, "checkbutton1"); - g_return_val_if_fail (mail->fullpath != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mail->fullpath), - global_preferences->show_full_path); - g_signal_connect (mail->fullpath, "toggled", G_CALLBACK (mail_show_full_path_toggled_cb), pd); - - /* RDF */ - rdf = pd->rdf = g_new0 (struct _RDFPage, 1); - rdf->etable = glade_xml_get_widget (pd->xml, "rdf-custom"); - g_return_val_if_fail (rdf->etable != NULL, FALSE); - - g_signal_connect (rdf->etable, "item-changed", G_CALLBACK (rdf_etable_item_changed_cb), pd); - g_signal_connect (rdf->etable, "selection-changed", G_CALLBACK (rdf_etable_selection_cb), pd); - - fill_rdf_etable (rdf->etable, pd); - rdf->refresh = glade_xml_get_widget (pd->xml, "spinbutton1"); - g_return_val_if_fail (rdf->refresh != NULL, FALSE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (rdf->refresh), - (float) global_preferences->rdf_refresh_time); - g_signal_connect (GTK_SPIN_BUTTON (rdf->refresh)->adjustment, "value_changed", - G_CALLBACK (rdf_refresh_value_changed_cb), pd); - - rdf->limit = glade_xml_get_widget (pd->xml, "spinbutton4"); - g_return_val_if_fail (rdf->limit != NULL, FALSE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (rdf->limit), - (float) global_preferences->limit); - g_signal_connect (GTK_SPIN_BUTTON (rdf->limit)->adjustment, "value_changed", - G_CALLBACK (rdf_limit_value_changed_cb), pd); - - rdf->new_button = glade_xml_get_widget (pd->xml, "button11"); - g_return_val_if_fail (rdf->limit != NULL, FALSE); - g_signal_connect (rdf->new_button, "clicked", G_CALLBACK (rdf_new_url_clicked_cb), pd); - - rdf->delete_url = glade_xml_get_widget (pd->xml, "delete-button"); - g_return_val_if_fail (rdf->delete_url != NULL, FALSE); - g_signal_connect (rdf->delete_url, "clicked", G_CALLBACK (rdf_delete_url_cb), pd); - - /* Weather */ - weather = pd->weather = g_new (struct _WeatherPage, 1); - weather->tmp_list = NULL; - - weather->etable = glade_xml_get_widget (pd->xml, "weather-custom"); - g_return_val_if_fail (weather->etable != NULL, FALSE); - - g_signal_connect (weather->etable, "item-changed", G_CALLBACK (weather_etable_item_changed_cb), pd); - - fill_weather_etable (E_SUMMARY_SHOWN (weather->etable), pd); - - weather->refresh = glade_xml_get_widget (pd->xml, "spinbutton5"); - g_return_val_if_fail (weather->refresh != NULL, FALSE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (weather->refresh), - (float) global_preferences->weather_refresh_time); - g_signal_connect (GTK_SPIN_BUTTON (weather->refresh)->adjustment, "value-changed", - G_CALLBACK (weather_refresh_value_changed_cb), pd); - - weather->metric = glade_xml_get_widget (pd->xml, "radiobutton7"); - g_return_val_if_fail (weather->metric != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (weather->metric), - (global_preferences->units == UNITS_METRIC)); - g_signal_connect (weather->metric, "toggled", G_CALLBACK (weather_metric_toggled_cb), pd); - - weather->imperial = glade_xml_get_widget (pd->xml, "radiobutton8"); - g_return_val_if_fail (weather->imperial != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (weather->imperial), - (global_preferences->units == UNITS_IMPERIAL)); - g_signal_connect (weather->imperial, "toggled", G_CALLBACK (weather_imperial_toggled_cb), pd); - - /* Calendar */ - calendar = pd->calendar = g_new (struct _CalendarPage, 1); - calendar->one = glade_xml_get_widget (pd->xml, "radiobutton3"); - g_return_val_if_fail (calendar->one != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->one), - (global_preferences->days == E_SUMMARY_CALENDAR_ONE_DAY)); - g_signal_connect (calendar->one, "toggled", G_CALLBACK (calendar_one_toggled_cb), pd); - - calendar->five = glade_xml_get_widget (pd->xml, "radiobutton4"); - g_return_val_if_fail (calendar->five != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->five), - (global_preferences->days == E_SUMMARY_CALENDAR_FIVE_DAYS)); - g_signal_connect (calendar->five, "toggled", G_CALLBACK (calendar_five_toggled_cb), pd); - - calendar->week = glade_xml_get_widget (pd->xml, "radiobutton5"); - g_return_val_if_fail (calendar->week != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->week), - (global_preferences->days == E_SUMMARY_CALENDAR_ONE_WEEK)); - g_signal_connect (calendar->week, "toggled", G_CALLBACK (calendar_week_toggled_cb), pd); - - calendar->month = glade_xml_get_widget (pd->xml, "radiobutton6"); - g_return_val_if_fail (calendar->month != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->month), - (global_preferences->days == E_SUMMARY_CALENDAR_ONE_MONTH)); - g_signal_connect (calendar->month, "toggled", G_CALLBACK (calendar_month_toggled_cb), pd); - - calendar->all = glade_xml_get_widget (pd->xml, "radiobutton1"); - g_return_val_if_fail (calendar->all != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->all), - (global_preferences->show_tasks == E_SUMMARY_CALENDAR_ALL_TASKS)); - g_signal_connect (calendar->all, "toggled", G_CALLBACK (calendar_all_toggled_cb), pd); - - calendar->today = glade_xml_get_widget (pd->xml, "radiobutton2"); - g_return_val_if_fail (calendar->today != NULL, FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->today), - (global_preferences->show_tasks == E_SUMMARY_CALENDAR_TODAYS_TASKS)); - g_signal_connect (calendar->today, "toggled", G_CALLBACK (calendar_today_toggled_cb), pd); - - return TRUE; -} - -static void -free_property_dialog (PropertyData *pd) -{ - if (pd->rdf) { - g_slist_free (pd->rdf->known); - - free_str_list (pd->rdf->tmp_list); - g_slist_free (pd->rdf->tmp_list); - g_free (pd->rdf); - } - if (pd->mail) { - free_str_list (pd->mail->tmp_list); - g_slist_free (pd->mail->tmp_list); - g_free (pd->mail); - } - if (pd->weather) { - free_str_list (pd->weather->tmp_list); - g_slist_free (pd->weather->tmp_list); - g_free (pd->weather); - } - if (pd->calendar) { - g_free (pd->calendar); - } - - if (pd->xml) - g_object_unref (pd->xml); - - g_free (pd); -} - - -/* Prototypes to shut gcc up */ -GtkWidget *e_summary_preferences_make_mail_table (PropertyData *pd); -GtkWidget *e_summary_preferences_make_rdf_table (PropertyData *pd); -GtkWidget *e_summary_preferences_make_weather_table (PropertyData *pd); - -static void -set_selected_folders (GNOME_Evolution_StorageSetView view) -{ - GNOME_Evolution_FolderList *list; - CORBA_Environment ev; - GSList *l; - int i, count; - - for (count = 0, l = global_preferences->display_folders; l; - l = l->next, count++) - ; - - list = GNOME_Evolution_FolderList__alloc (); - list->_length = count; - list->_maximum = count; - list->_buffer = CORBA_sequence_GNOME_Evolution_Folder_allocbuf (count); - - for (i = 0, l = global_preferences->display_folders; l; i++, l = l->next) { - ESummaryPrefsFolder *folder = l->data; - - list->_buffer[i].type = CORBA_string_dup (""); - list->_buffer[i].description = CORBA_string_dup (""); - list->_buffer[i].displayName = CORBA_string_dup (""); - list->_buffer[i].evolutionUri = CORBA_string_dup (folder->evolution_uri); - list->_buffer[i].physicalUri = CORBA_string_dup (folder->physical_uri); - list->_buffer[i].unreadCount = 0; - list->_buffer[i].canSyncOffline = TRUE; - list->_buffer[i].sortingPriority = 0; - list->_buffer[i].customIconName = CORBA_string_dup (""); - } - - CORBA_exception_init (&ev); - GNOME_Evolution_StorageSetView__set_checkedFolders (view, list, &ev); - CORBA_exception_free (&ev); -} - -GtkWidget * -e_summary_preferences_make_mail_table (PropertyData *pd) -{ - CORBA_Environment ev; - Bonobo_Control control; - GNOME_Evolution_StorageSetView view; - EvolutionStorageSetViewListener *listener; - GNOME_Evolution_StorageSetViewListener corba_listener; - GtkWidget *widget; - - g_assert (global_shell != NULL); - - CORBA_exception_init (&ev); - control = GNOME_Evolution_Shell_createStorageSetView (global_shell, &ev); - if (BONOBO_EX (&ev) || control == CORBA_OBJECT_NIL) { - g_warning ("Error getting StorageSetView"); - CORBA_exception_free (&ev); - return NULL; - } - - view = Bonobo_Unknown_queryInterface (control, - "IDL:GNOME/Evolution/StorageSetView:1.0", &ev); - if (BONOBO_EX (&ev) || view == CORBA_OBJECT_NIL) { - g_warning ("Error querying %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return NULL; - } - - GNOME_Evolution_StorageSetView__set_showCheckboxes (view, TRUE, &ev); - - listener = evolution_storage_set_view_listener_new (); - - corba_listener = evolution_storage_set_view_listener_corba_objref (listener); - - GNOME_Evolution_StorageSetView_addListener (view, corba_listener, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error adding listener %s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - widget = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL); - g_object_set_data (G_OBJECT (widget), "listener", listener); - g_object_set_data (G_OBJECT (widget), "corba_view", view); - - set_selected_folders (view); - return widget; -} - -GtkWidget * -e_summary_preferences_make_rdf_table (PropertyData *pd) -{ - return e_summary_shown_new (); -} - -GtkWidget * -e_summary_preferences_make_weather_table (PropertyData *pd) -{ - return e_summary_shown_new (); -} - - -/* The factory for the ConfigControl. */ - -static void -add_shown_to_list (gpointer key, - gpointer value, - gpointer data) -{ - ESummaryShownModelEntry *item; - GSList **list; - - item = (ESummaryShownModelEntry *) value; - list = (GSList **) data; - - *list = g_slist_prepend (*list, g_strdup (item->location)); -} - -static GSList * -get_folders_from_view (GtkWidget *view) -{ - GNOME_Evolution_StorageSetView set_view; - GNOME_Evolution_FolderList *list; - CORBA_Environment ev; - GSList *out_list = NULL; - int i; - - set_view = g_object_get_data (G_OBJECT (view), "corba_view"); - CORBA_exception_init (&ev); - - list = GNOME_Evolution_StorageSetView__get_checkedFolders (set_view, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting checkedFolders\n%s", - CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - for (i = 0; i < list->_length; i++) { - GNOME_Evolution_Folder folder = list->_buffer[i]; - ESummaryPrefsFolder *f; - - f = g_new (ESummaryPrefsFolder, 1); - f->evolution_uri = g_strdup (folder.evolutionUri); - f->physical_uri = g_strdup (folder.physicalUri); - out_list = g_slist_append (out_list, f); - } - - return out_list; -} - -static void -config_control_apply_cb (EvolutionConfigControl *control, - void *data) -{ - PropertyData *pd; - - pd = (PropertyData *) data; - - if (pd->rdf->tmp_list) { - free_str_list (pd->rdf->tmp_list); - g_slist_free (pd->rdf->tmp_list); - pd->rdf->tmp_list = NULL; - } - /* Take each news feed which is on and add it - to the shown list */ - g_hash_table_foreach (E_SUMMARY_SHOWN (pd->rdf->etable)->shown_model, - add_shown_to_list, &pd->rdf->tmp_list); - - if (global_preferences->rdf_urls) { - free_str_list (global_preferences->rdf_urls); - g_slist_free (global_preferences->rdf_urls); - } - - global_preferences->rdf_urls = copy_str_list (pd->rdf->tmp_list); - - /* Weather */ - if (pd->weather->tmp_list) { - free_str_list (pd->weather->tmp_list); - g_slist_free (pd->weather->tmp_list); - pd->weather->tmp_list = NULL; - } - - g_hash_table_foreach (E_SUMMARY_SHOWN (pd->weather->etable)->shown_model, - add_shown_to_list, &pd->weather->tmp_list); - if (global_preferences->stations) { - free_str_list (global_preferences->stations); - g_slist_free (global_preferences->stations); - } - global_preferences->stations = copy_str_list (pd->weather->tmp_list); - - /* Folders */ - if (pd->mail->tmp_list) { - free_str_list (pd->mail->tmp_list); - g_slist_free (pd->mail->tmp_list); - pd->mail->tmp_list = NULL; - } - - if (global_preferences->display_folders) { - free_folder_list (global_preferences->display_folders); - g_slist_free (global_preferences->display_folders); - } - global_preferences->display_folders = get_folders_from_view(pd->mail->storage_set_view); - - e_summary_preferences_save (global_preferences); - - e_summary_reconfigure_all (); -} - -static void -config_control_destroy_cb (EvolutionConfigControl *config_control, void *data) -{ - e_summary_preferences_restore(global_preferences); - free_property_dialog ((PropertyData *)data); -} - -BonoboObject * -e_summary_preferences_create_control (void) -{ - PropertyData *pd; - GtkWidget *widget; - - pd = g_new0 (PropertyData, 1); - - pd->xml = glade_xml_new (EVOLUTION_GLADEDIR "/my-evolution.glade", NULL, NULL); - g_return_val_if_fail (pd->xml != NULL, NULL); - - widget = glade_xml_get_widget (pd->xml, "notebook"); - if (widget == NULL || ! make_property_dialog (pd)) { - g_warning ("Missing some part of XML file"); - free_property_dialog (pd); - return NULL; - } - - gtk_widget_ref (widget); - gtk_container_remove (GTK_CONTAINER (widget->parent), widget); - - gtk_widget_show_all (widget); - pd->config_control = evolution_config_control_new (widget); - - gtk_widget_unref (widget); - - g_signal_connect (pd->config_control, "apply", G_CALLBACK (config_control_apply_cb), pd); - g_signal_connect (pd->config_control, "destroy", G_CALLBACK (config_control_destroy_cb), pd); - - return BONOBO_OBJECT (pd->config_control); -} - -/* FIXME this kinda sucks. */ -void -e_summary_preferences_init_control (GNOME_Evolution_Shell corba_shell) -{ - global_shell = corba_shell; -} diff --git a/my-evolution/e-summary-preferences.h b/my-evolution/e-summary-preferences.h deleted file mode 100644 index 2a706af02e..0000000000 --- a/my-evolution/e-summary-preferences.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-preferences.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef __E_SUMMARY_PREFERENCES_H__ -#define __E_SUMMARY_PREFERENCES_H__ - -#include <bonobo/bonobo-ui-component.h> -#include <Evolution.h> - -gboolean e_summary_preferences_restore (ESummaryPrefs *prefs); -void e_summary_preferences_save (ESummaryPrefs *prefs); -void e_summary_preferences_free (ESummaryPrefs *prefs); -ESummaryPrefs *e_summary_preferences_copy (ESummaryPrefs *prefs); -ESummaryPrefs *e_summary_preferences_init (void); -ESummaryPrefs *e_summary_preferences_get_global (void); - -BonoboObject *e_summary_preferences_create_control (void); -void e_summary_preferences_init_control (GNOME_Evolution_Shell shell); - -#endif diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c deleted file mode 100644 index cfd3b74d29..0000000000 --- a/my-evolution/e-summary-rdf.c +++ /dev/null @@ -1,651 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-rdf.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <glib.h> -#include <gtk/gtkmain.h> - -#include <libxml/parser.h> -#include <libxml/xmlmemory.h> - -#include <libgnome/gnome-i18n.h> - -#include <gal/widgets/e-unicode.h> - -#include <libsoup/soup.h> - -#include <string.h> - -#include "e-summary.h" - -struct _ESummaryRDF { - ESummaryConnection *connection; - GList *rdfs; - - char *html; - guint32 timeout; - gboolean online; -}; - -typedef struct _RDF { - char *uri; - char *html; - - xmlDocPtr cache; - ESummary *summary; - - gboolean shown; - - /* Soup stuff */ - SoupMessage *message; -} RDF; - -extern int xmlSubstituteEntitiesDefaultValue; - -char * -e_summary_rdf_get_html (ESummary *summary) -{ - GList *rdfs; - char *html; - GString *string; - - if (summary->rdf == NULL) { - return NULL; - } - - string = g_string_new (""); - for (rdfs = summary->rdf->rdfs; rdfs; rdfs = rdfs->next) { - if (((RDF *)rdfs->data)->html == NULL) { - continue; - } - - g_string_append (string, ((RDF *)rdfs->data)->html); - } - - html = string->str; - g_string_free (string, FALSE); - return html; -} - -/************ RDF Parser *******************/ - -static char * -layer_find (xmlNodePtr node, - char *match, - char *fail) -{ - while (node!=NULL) { -#ifdef RDF_DEBUG - xmlDebugDumpNode (stdout, node, 32); - printf("%s.\n", node->name); -#endif - if (strcasecmp (node->name, match)==0) { - if (node->children != NULL && node->children->content != NULL) { - return node->children->content; - } else { - return fail; - } - } - node = node->next; - } - return fail; -} - -static char * -layer_find_url (xmlNodePtr node, - char *match, - char *fail) -{ - char *p = layer_find (node, match, fail); - char *r = p; - static char *wb = NULL; - char *w; - - if (wb) { - g_free (wb); - } - - wb = w = g_malloc (3 * strlen (p)); - - if (w == NULL) { - return fail; - } - - if (*r == ' ') r++; /* Fix UF bug */ - - while (*r) { - if (strncmp (r, "&", 5) == 0) { - *w++ = '&'; - r += 5; - continue; - } - if (strncmp (r, "<", 4) == 0) { - *w++ = '<'; - r += 4; - continue; - } - if (strncmp (r, ">", 4) == 0) { - *w++ = '>'; - r += 4; - continue; - } - if (*r == '"' || *r == ' '){ - *w++ = '%'; - *w++ = "0123456789ABCDEF"[*r/16]; - *w++ = "0123456789ABCDEF"[*r&15]; - r++; - continue; - } - *w++ = *r++; - } - *w = 0; - return wb; -} - -static void -tree_walk (xmlNodePtr root, - RDF *r, - GString *html) -{ - xmlNodePtr walk; - xmlNodePtr rewalk = root; - xmlNodePtr channel = NULL; - xmlNodePtr image = NULL; - xmlNodePtr item[16]; - int items = 0; - int limit; - int i; - char *t, *u; - char *tmp; - char *charset; - - if (r->summary->preferences == NULL) { - limit = 10; - } else { - limit = r->summary->preferences->limit; - } - - /* check in-memory encoding first, fallback to transport encoding, which may or may not be correct */ - if (r->cache->charset == XML_CHAR_ENCODING_UTF8 - || r->cache->charset == XML_CHAR_ENCODING_ASCII) { - charset = NULL; - } else { - /* bad/missing encoding, fallback to latin1 (locale?) */ - charset = r->cache->encoding ? (char *)r->cache->encoding : "iso-8859-1"; - } - - /* FIXME: Need arrows */ - if (r->shown == FALSE) { - char *p; - - /* FIXME: Hash table & UID */ - p = g_strdup_printf ("<a href=\"rdf://%d\" style=\"text-decoration: none; color: black\">▶</a>", GPOINTER_TO_INT (r)); - g_string_append (html, p); - g_free (p); - } else { - char *p; - - /* FIXME: Hash table & UID */ - p = g_strdup_printf ("<a href=\"rdf://%d\" style=\"text-decoration: none; color: black\">▼</a>", GPOINTER_TO_INT (r)); - g_string_append (html, p); - g_free (p); - } - - do { - walk = rewalk; - rewalk = NULL; - - while (walk!=NULL){ -#ifdef RDF_DEBUG - printf ("%p, %s\n", walk, walk->name); -#endif - if (strcasecmp (walk->name, "rdf") == 0) { - rewalk = walk->children; - walk = walk->next; - continue; - } - if (strcasecmp (walk->name, "rss") == 0){ - rewalk = walk->children; - walk = walk->next; - continue; - } - /* This is the channel top level */ -#ifdef RDF_DEBUG - printf ("Top level '%s'.\n", walk->name); -#endif - if (strcasecmp (walk->name, "channel") == 0) { - channel = walk; - rewalk = channel->children; - } - if (strcasecmp (walk->name, "image") == 0) { - image = walk; - } - if (strcasecmp (walk->name, "item") == 0 && items < 16) { - item[items++] = walk; - } - walk = walk->next; - } - } - while (rewalk); - - if (channel == NULL) { - fprintf(stderr, "No channel definition.\n"); - return; - } - - t = layer_find(channel->children, "title", ""); - u = layer_find(channel->children, "link", ""); - - if (*u != '\0') - g_string_sprintfa (html, "<a href=\"%s\" style=\"text-decoration: none; color: black;\"><b>", u); - - if (charset) { - char *tmp = e_utf8_from_charset_string (charset, t); - g_string_append (html, tmp); - g_free (tmp); - } else { - g_string_append (html, t); - } - - if (*u != '\0') - g_string_append (html, "</a>"); - g_string_append (html, "</b></dt>"); - - if (r->shown == FALSE) { - g_string_append (html, "</dl>"); - return; - } - - g_string_append (html, "<ul>"); - - items = MIN (limit, items); - for (i = 0; i < items; i++) { - char *p = layer_find (item[i]->children, "title", "No information"); - - tmp = g_strdup_printf ("<LI><font size=\"-1\"><A href=\"%s\" style=\"text-decoration: none; color: black;\">\n", layer_find_url(item[i]->children, "link", "")); - g_string_append (html, tmp); - g_free (tmp); - - if (charset) { - char *tmp = e_utf8_from_charset_string (charset, p); - g_string_append (html, tmp); - g_free (tmp); - } else { - g_string_append (html, p); - } - - g_string_append (html, "\n</A></font></li>"); - } - g_string_append (html, "</UL>"); -} - -static void -display_doc (RDF *r) -{ - GString *html; - - html = g_string_new ("<dl><dt><img src=\"ico-rdf.png\" align=\"middle\" " - "width=\"48\" height=\"48\">"); - - if (r->cache == NULL) { - g_string_append_printf (html, "<b>%s:</b><br>%s</dt>", - _("Error downloading RDF"), - r->uri); - } else { - tree_walk (xmlDocGetRootElement (r->cache), r, html); - } - - g_free (r->html); - g_string_append (html, "</dl>"); - r->html = html->str; - g_string_free (html, FALSE); - - e_summary_draw (r->summary); -} - -static void -message_finished (SoupMessage *msg, - gpointer userdata) -{ - xmlDocPtr doc; - RDF *r = (RDF *) userdata; - - if (SOUP_MESSAGE_IS_ERROR (msg)) { - g_warning ("Message failed: %d\n%s", msg->errorcode, - msg->errorphrase); - r->cache = NULL; - r->message = NULL; - - display_doc (r); - return; - } - - if (r->cache != NULL) { - xmlFreeDoc (r->cache); - r->cache = NULL; - } - - xmlSubstituteEntitiesDefaultValue = 1; - doc = xmlParseMemory (msg->response.body, msg->response.length); - r->cache = doc; - r->message = NULL; - - /* Display it */ - display_doc (r); -} - -gboolean -e_summary_rdf_update (ESummary *summary) -{ - GList *r; - - if (summary->rdf->online == FALSE) { - g_warning ("%s: Repolling but offline", G_GNUC_FUNCTION); - return TRUE; - } - - for (r = summary->rdf->rdfs; r; r = r->next) { - SoupContext *context; - RDF *rdf = r->data; - - if (rdf->message) { - continue; - } - - context = soup_context_get (rdf->uri); - if (context == NULL) { - g_warning ("Invalid URL: %s", rdf->uri); - soup_context_unref (context); - continue; - } - - rdf->message = soup_message_new (context, SOUP_METHOD_GET); - soup_context_unref (context); - soup_message_queue (rdf->message, message_finished, rdf); - } - - return TRUE; -} - -static void -e_summary_rdf_add_uri (ESummary *summary, - const char *uri) -{ - RDF *r; - - r = g_new0 (RDF, 1); - r->summary = summary; - r->uri = g_strdup (uri); - r->shown = TRUE; - summary->rdf->rdfs = g_list_append (summary->rdf->rdfs, r); -} - -static void -e_summary_rdf_protocol (ESummary *summary, - const char *uri, - void *closure) -{ - RDF *r; - int a; - - a = atoi (uri + 6); - if (a == 0) { - g_warning ("A == 0"); - return; - } - - r = (RDF *) GINT_TO_POINTER (a); - r->shown = !r->shown; - - display_doc (r); -} - -static int -e_summary_rdf_count (ESummary *summary, - void *data) -{ - ESummaryRDF *rdf; - GList *p; - int count = 0; - - rdf = summary->rdf; - for (p = rdf->rdfs; p; p = p->next) { - RDF *r = p->data; - - if (r->message != NULL) { - count++; - } - } - - return count; -} - -static ESummaryConnectionData * -make_connection (RDF *r) -{ - ESummaryConnectionData *d; - - d = g_new (ESummaryConnectionData, 1); - d->hostname = g_strdup (r->uri); - d->type = g_strdup (_("News Feed")); - - return d; -} - -static GList * -e_summary_rdf_add (ESummary *summary, - void *data) -{ - ESummaryRDF *rdf; - GList *p, *connections = NULL; - - rdf = summary->rdf; - for (p = rdf->rdfs; p; p = p->next) { - RDF *r = p->data; - - if (r->message != NULL) { - ESummaryConnectionData *d; - - d = make_connection (r); - connections = g_list_prepend (connections, d); - } - } - - return connections; -} - -static void -rdf_free (RDF *r) -{ - /* Stop the download */ - if (r->message) { - soup_message_cancel (r->message); - } - - g_free (r->uri); - g_free (r->html); - - if (r->cache) { - xmlFreeDoc (r->cache); - } - - g_free (r); -} - -static void -e_summary_rdf_set_online (ESummary *summary, - GNOME_Evolution_OfflineProgressListener progress, - gboolean online, - void *data) -{ - ESummaryRDF *rdf; - GList *p; - - rdf = summary->rdf; - if (rdf->online == online) { - return; - } - - if (online == TRUE) { - e_summary_rdf_update (summary); - - if (summary->preferences->rdf_refresh_time != 0) - rdf->timeout = gtk_timeout_add (summary->preferences->rdf_refresh_time * 1000, - (GtkFunction) e_summary_rdf_update, - summary); - } else { - for (p = rdf->rdfs; p; p = p->next) { - RDF *r; - - r = p->data; - if (r->message) { - soup_message_cancel (r->message); - r->message = NULL; - } - } - - gtk_timeout_remove (rdf->timeout); - rdf->timeout = 0; - } - - rdf->online = online; -} - -void -e_summary_rdf_init (ESummary *summary) -{ - ESummaryPrefs *prefs; - ESummaryRDF *rdf; - ESummaryConnection *connection; - GSList *p; - int timeout; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - prefs = summary->preferences; - g_assert (prefs != NULL); - - rdf = g_new0 (ESummaryRDF, 1); - summary->rdf = rdf; - - connection = g_new (ESummaryConnection, 1); - connection->count = e_summary_rdf_count; - connection->add = e_summary_rdf_add; - connection->set_online = e_summary_rdf_set_online; - connection->closure = NULL; - connection->callback = NULL; - connection->callback_closure = NULL; - - rdf->connection = connection; - rdf->online = TRUE; - e_summary_add_online_connection (summary, connection); - - e_summary_add_protocol_listener (summary, "rdf", e_summary_rdf_protocol, rdf); - - for (p = prefs->rdf_urls; p; p = p->next) { - e_summary_rdf_add_uri (summary, p->data); - } - timeout = prefs->rdf_refresh_time; - - e_summary_rdf_update (summary); - - if (rdf->timeout == 0) - rdf->timeout = 0; - else - rdf->timeout = gtk_timeout_add (timeout * 1000, - (GtkFunction) e_summary_rdf_update, summary); - - return; -} - -void -e_summary_rdf_reconfigure (ESummary *summary) -{ - ESummaryRDF *rdf; - GList *old, *p; - GSList *sp; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - rdf = summary->rdf; - - /* Stop timeout */ - if (rdf->timeout != 0) { - gtk_timeout_remove (rdf->timeout); - rdf->timeout = 0; - } - - old = rdf->rdfs; - rdf->rdfs = NULL; - for (p = old; p; p = p->next) { - RDF *r; - - r = p->data; - rdf_free (r); - } - g_list_free (old); - - for (sp = summary->preferences->rdf_urls; sp; sp = sp->next) { - e_summary_rdf_add_uri (summary, sp->data); - } - - if (summary->preferences->rdf_refresh_time != 0) - rdf->timeout = gtk_timeout_add (summary->preferences->rdf_refresh_time * 1000, - (GtkFunction) e_summary_rdf_update, summary); - - e_summary_rdf_update (summary); -} - -void -e_summary_rdf_free (ESummary *summary) -{ - ESummaryRDF *rdf; - GList *p; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - rdf = summary->rdf; - - if (rdf->timeout != 0) - gtk_timeout_remove (rdf->timeout); - - for (p = rdf->rdfs; p; p = p->next) { - RDF *r = p->data; - - rdf_free (r); - } - g_list_free (rdf->rdfs); - g_free (rdf->html); - - e_summary_remove_online_connection (summary, rdf->connection); - g_free (rdf->connection); - - g_free (rdf); - summary->rdf = NULL; -} diff --git a/my-evolution/e-summary-rdf.h b/my-evolution/e-summary-rdf.h deleted file mode 100644 index 0cf3b4236b..0000000000 --- a/my-evolution/e-summary-rdf.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-rdf.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef __E_SUMMARY_RDF_H__ -#define __E_SUMMARY_RDF_H__ - -#include "e-summary-type.h" - -typedef struct _ESummaryRDF ESummaryRDF; - -char *e_summary_rdf_get_html (ESummary *summary); -void e_summary_rdf_init (ESummary *summary); -void e_summary_rdf_reconfigure (ESummary *summary); -void e_summary_rdf_free (ESummary *summary); -gboolean e_summary_rdf_update (ESummary *summary); - -#endif diff --git a/my-evolution/e-summary-shown.c b/my-evolution/e-summary-shown.c deleted file mode 100644 index dfc9f3f449..0000000000 --- a/my-evolution/e-summary-shown.c +++ /dev/null @@ -1,663 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximian, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <string.h> - -#include <gtk/gtkalignment.h> -#include <gtk/gtkbutton.h> -#include <gtk/gtkenums.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtkimage.h> -#include <gtk/gtklabel.h> -#include <gtk/gtksignal.h> -#include <gtk/gtkstock.h> -#include <gtk/gtkvbox.h> - -#include <gal/util/e-util.h> -#include <gal/widgets/e-gui-utils.h> - -#include <gal/e-table/e-table-header.h> -#include <gal/e-table/e-table-header-item.h> -#include <gal/e-table/e-table-item.h> -#include <gal/e-table/e-cell-text.h> -#include <gal/e-table/e-cell-tree.h> -#include <gal/e-table/e-table.h> -#include <gal/e-table/e-tree.h> - -#include <gal/e-table/e-tree-scrolled.h> -#include <gal/e-table/e-tree-memory.h> -#include <gal/e-table/e-tree-memory-callbacks.h> -#include <gal/e-table/e-tree-table-adapter.h> - -#include <libgnome/gnome-i18n.h> - -#include "e-summary-shown.h" - -#define COLS 1 - -/* Needs to be filled in before use */ -#define SPEC "<ETableSpecification cursor-mode=\"line\" draw-focus=\"true\"> \ -<ETableColumn model_col=\"0\" _title=\"%s\" resizable=\"true\" cell=\"tree-string\" compare=\"string\"/> \ -<ETableState> \ -<column source=\"0\"/> \ -<grouping><leaf column=\"0\" ascending=\"true\"/></grouping> \ -</ETableState> \ -</ETableSpecification>" - -#define PARENT_TYPE (gtk_hbox_get_type ()) -static GtkObjectClass *e_summary_shown_parent_class; - -enum { - ITEM_CHANGED, - SELECTION_CHANGED, - LAST_SIGNAL -}; -static guint32 shown_signals[LAST_SIGNAL] = { 0 }; - -typedef struct _TableData { - ETreeModel *etm; - ETreePath *root; - - GtkWidget *etable; - GSList *contents; -} TableData; - -struct _ESummaryShownPrivate { - TableData *all, *shown; - GtkWidget *add, *remove; -}; - -static GdkPixbuf * -icon_at (ETreeModel *etm, - ETreePath path, - void *model_data) -{ - return NULL; -} - -static int -column_count (ETreeModel *etm, - void *data) -{ - return COLS; -} - -static void * -duplicate_value (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - return g_strdup (value); -} - -static void -free_value (ETreeModel *etm, - int col, - void *value, - void *data) -{ - g_free (value); -} - -static void * -initialise_value (ETreeModel *etm, - int col, - void *data) -{ - return g_strdup (""); -} - -static gboolean -value_is_empty (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - return !(value && *(char *)value); -} - -static char * -value_to_string (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - return g_strdup (value); -} - -static void * -value_at (ETreeModel *etm, - ETreePath path, - int col, - void *model_data) -{ - GHashTable *model = model_data; - ESummaryShownModelEntry *entry; - - if (e_tree_model_node_is_root (etm, path)) { - return "<Root>"; - } - - entry = g_hash_table_lookup (model, path); - if (entry == NULL) { - return "<None>"; - } else { - return entry->name; - } -} - -static gboolean -is_editable (ETreeModel *etm, - ETreePath path, - int col, - void *model_data) -{ - return FALSE; -} - -static void -destroy (GtkObject *object) -{ - ESummaryShown *shown; - ESummaryShownPrivate *priv; - - shown = E_SUMMARY_SHOWN (object); - priv = shown->priv; - - if (priv == NULL) { - return; - } - - g_free (priv); - shown->priv = NULL; - - e_summary_shown_parent_class->destroy (object); -} - -static void -e_summary_shown_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = destroy; - - e_summary_shown_parent_class = gtk_type_class (PARENT_TYPE); - - shown_signals[ITEM_CHANGED] = gtk_signal_new ("item-changed", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ESummaryShownClass, item_changed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - shown_signals[SELECTION_CHANGED] = gtk_signal_new ("selection-changed", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ESummaryShownClass, selection_changed), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); -} - -static gboolean -is_location_in_shown (ESummaryShown *shown, - const char *location) -{ - GSList *p; - - for (p = shown->priv->shown->contents; p; p = p->next) { - ESummaryShownModelEntry *entry = p->data; - if (entry->location == NULL) { - continue; - } - - if (strcmp (entry->location, location) == 0) { - return TRUE; - } - } - - return FALSE; -} - -struct _CountData { - ESummaryShown *shown; - GList *selected_list; - int count; -}; - -static void -real_selected_count (ETreePath path, - gpointer data) -{ - ESummaryShownModelEntry *entry; - struct _CountData *cd = data; - - entry = g_hash_table_lookup (cd->shown->all_model, path); - g_return_if_fail (entry != NULL); - - cd->selected_list = g_list_prepend (cd->selected_list, path); - if (entry->showable == FALSE) { - return; - } - - if (is_location_in_shown (cd->shown, entry->location)) { - return; - } - - cd->count++; -} - -static void -all_selection_changed (ETree *et, - ESummaryShown *shown) -{ - ESelectionModel *esm; - int count; - - esm = e_tree_get_selection_model (et); - - count = e_selection_model_selected_count (esm); - if (count == 0) { - gtk_widget_set_sensitive (shown->priv->add, FALSE); - - gtk_signal_emit (GTK_OBJECT (shown), shown_signals[SELECTION_CHANGED], 0, NULL); - } else { - struct _CountData *cd; - - cd = g_new (struct _CountData, 1); - cd->shown = shown; - cd->selected_list = NULL; - cd->count = 0; - - e_tree_selection_model_foreach (E_TREE_SELECTION_MODEL (esm), - real_selected_count, cd); - if (cd->count != 0) { - gtk_widget_set_sensitive (shown->priv->add, TRUE); - } else { - gtk_widget_set_sensitive (shown->priv->add, FALSE); - } - - gtk_signal_emit (GTK_OBJECT (shown), shown_signals[SELECTION_CHANGED], cd->selected_list); - - g_list_free (cd->selected_list); - g_free (cd); - } -} - -static void -shown_selection_changed (ETree *et, - ESummaryShown *shown) -{ - ESelectionModel *esm; - int count; - - esm = e_tree_get_selection_model (et); - - count = e_selection_model_selected_count (esm); - if (count == 0) { - gtk_widget_set_sensitive (shown->priv->remove, FALSE); - } else { - gtk_widget_set_sensitive (shown->priv->remove, TRUE); - } -} - -static void -maybe_move_to_shown (ETreePath path, - gpointer closure) -{ - gpointer *pair = closure; - ESummaryShown *shown = pair[0]; - GList **list = pair[1]; - ESummaryShownModelEntry *entry, *new_entry; - - entry = g_hash_table_lookup (shown->all_model, path); - g_return_if_fail (entry != NULL); - - /* Check is the entry can be shown */ - if (entry->showable == FALSE) { - return; - } - - /* check if the entry is already in the shown list */ - if (is_location_in_shown (shown, entry->location) == TRUE) { - return; - } - - new_entry = g_new (ESummaryShownModelEntry, 1); - new_entry->name = g_strdup (entry->name); - new_entry->location = g_strdup (entry->location); - new_entry->showable = entry->showable; - new_entry->ref_count = 0; - - *list = g_list_prepend (*list, new_entry); -} - -static void -add_clicked (GtkWidget *button, - ESummaryShown *shown) -{ - ESelectionModel *esm; - ETree *et; - gpointer pair[2]; - GList *list = NULL; - GList *iterator; - - et = e_tree_scrolled_get_tree (E_TREE_SCROLLED (shown->priv->all->etable)); - esm = e_tree_get_selection_model (et); - - pair[0] = shown; - pair[1] = &list; - e_tree_selection_model_foreach (E_TREE_SELECTION_MODEL (esm), - maybe_move_to_shown, pair); - - for (iterator = list; iterator; iterator = iterator->next) { - ESummaryShownModelEntry *new_entry = iterator->data; - e_summary_shown_add_node (shown, FALSE, new_entry, NULL, FALSE, NULL); - } - - g_list_free (list); - gtk_signal_emit (GTK_OBJECT (shown), shown_signals[ITEM_CHANGED]); - - gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE); -} - -static void -remove_from_shown (ETreePath path, - gpointer closure) -{ - gpointer *pair = closure; - ESummaryShown *shown = pair[0]; - GList **list = pair[1]; - ESummaryShownModelEntry *entry; - - entry = g_hash_table_lookup (shown->shown_model, path); - g_return_if_fail (entry != NULL); - - *list = g_list_prepend (*list, entry); -} - -static void -remove_clicked (GtkWidget *button, - ESummaryShown *shown) -{ - ESelectionModel *esm; - ETree *et; - gpointer pair[2]; - GList *list = NULL; - GList *iterator; - - et = e_tree_scrolled_get_tree (E_TREE_SCROLLED (shown->priv->shown->etable)); - esm = e_tree_get_selection_model (et); - - pair[0] = shown; - pair[1] = &list; - e_tree_selection_model_foreach (E_TREE_SELECTION_MODEL (esm), - remove_from_shown, pair); - - list = g_list_reverse (list); - - for (iterator = list; iterator; iterator = iterator->next) { - ESummaryShownModelEntry *entry = iterator->data; - e_summary_shown_remove_node (shown, FALSE, entry); - } - g_list_free (list); - - gtk_signal_emit (GTK_OBJECT (shown), shown_signals[ITEM_CHANGED]); - - gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE); -} - -static TableData * -make_table (GHashTable *data_model, - const char *title, - GtkSignalFunc callback, - gpointer closure) -{ - TableData *td; - ETreeMemory *etmm; - ETree *tree; - char *real_spec; - - td = g_new (TableData, 1); - td->etm = e_tree_memory_callbacks_new (icon_at, - column_count, - - NULL, - NULL, - - NULL, - NULL, - - value_at, - NULL, - is_editable, - - duplicate_value, - free_value, - initialise_value, - value_is_empty, - value_to_string, - - data_model); - etmm = E_TREE_MEMORY (td->etm); - e_tree_memory_set_expanded_default (etmm, FALSE); - - td->root = e_tree_memory_node_insert (etmm, NULL, 0, NULL); - - real_spec = g_strdup_printf (SPEC, title); - td->etable = e_tree_scrolled_new (td->etm, NULL, real_spec, NULL); - g_free (real_spec); - - tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (td->etable)); - e_tree_root_node_set_visible (tree, FALSE); - g_signal_connect (tree, "selection-change", callback, closure); - - td->contents = NULL; - return td; -} - -static void -e_summary_shown_init (ESummaryShown *shown) -{ - ESummaryShownPrivate *priv; - GtkWidget *vbox; - GtkWidget *align; - - gtk_box_set_spacing (GTK_BOX (shown), 3); - - shown->shown_model = g_hash_table_new (NULL, NULL); - shown->all_model = g_hash_table_new (NULL, NULL); - - priv = g_new (ESummaryShownPrivate, 1); - shown->priv = priv; - - priv->all = make_table (shown->all_model, _("All"), G_CALLBACK (all_selection_changed), shown); - - gtk_box_pack_start (GTK_BOX (shown), priv->all->etable, TRUE, TRUE, 2); - gtk_widget_show (priv->all->etable); - - vbox = gtk_vbox_new (TRUE, 9); - align = gtk_alignment_new (.5, .5, .5, 0.0); - gtk_container_add (GTK_CONTAINER (align), vbox); - - gtk_box_pack_start (GTK_BOX (shown), align, FALSE, FALSE, 3); - - /* Fixme: nice GFX version */ - priv->add = gtk_button_new_from_stock (GTK_STOCK_ADD); - gtk_widget_set_sensitive (priv->add, FALSE); - gtk_box_pack_start (GTK_BOX (vbox), priv->add, TRUE, FALSE, 0); - g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked), shown); - - /* Fixme: Ditto */ - priv->remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE); - gtk_widget_set_sensitive (priv->remove, FALSE); - gtk_box_pack_start (GTK_BOX (vbox), priv->remove, TRUE, FALSE, 0); - g_signal_connect (priv->remove, "clicked", G_CALLBACK (remove_clicked), shown); - - gtk_widget_show_all (align); - - priv->shown = make_table (shown->shown_model, _("Shown"), G_CALLBACK (shown_selection_changed), shown); - - gtk_box_pack_start (GTK_BOX (shown), priv->shown->etable, TRUE, TRUE, 2); - gtk_widget_show (priv->shown->etable); -} - -E_MAKE_TYPE (e_summary_shown, "ESummaryShown", ESummaryShown, - e_summary_shown_class_init, e_summary_shown_init, PARENT_TYPE); - -GtkWidget * -e_summary_shown_new (void) -{ - ESummaryShown *shown; - - shown = gtk_type_new (e_summary_shown_get_type ()); - return GTK_WIDGET (shown); -} - -ETreePath -e_summary_shown_add_node (ESummaryShown *shown, - gboolean all, - ESummaryShownModelEntry *entry, - ETreePath parent, - gboolean expanded, - gpointer data) -{ - TableData *td; - ETreePath path; - ETreeMemory *etmm; - ETree *tree; - GHashTable *model; - - g_return_val_if_fail (IS_E_SUMMARY_SHOWN (shown), NULL); - - if (all == TRUE) { - td = shown->priv->all; - model = shown->all_model; - } else { - td = shown->priv->shown; - model = shown->shown_model; - } - - if (parent == NULL) { - parent = td->root; - } - - etmm = E_TREE_MEMORY (td->etm); - path = e_tree_memory_node_insert (etmm, parent, -1, data); - - tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (td->etable)); - if (e_tree_model_get_expanded_default (E_TREE_MODEL(etmm)) != expanded) - e_tree_node_set_expanded (tree, path, expanded); - - entry->path = path; - - g_hash_table_insert (model, path, entry); - - if (all == FALSE) { - /* Add the location to the list */ - td->contents = g_slist_prepend (td->contents, entry); - } - - return path; -} - -void -e_summary_shown_remove_node (ESummaryShown *shown, - gboolean all, - ESummaryShownModelEntry *entry) -{ - TableData *td; - GHashTable *model; - ETreeMemory *etmm; - - g_return_if_fail (IS_E_SUMMARY_SHOWN (shown)); - - if (all == TRUE) { - td = shown->priv->all; - model = shown->all_model; - } else { - td = shown->priv->shown; - model = shown->shown_model; - } - - etmm = E_TREE_MEMORY (td->etm); - e_tree_memory_node_remove (etmm, entry->path); - - g_hash_table_remove (model, entry->path); - - if (all == FALSE) { - td->contents = g_slist_remove (td->contents, entry); - } - -} - -void -e_summary_shown_freeze (ESummaryShown *shown) -{ - g_return_if_fail (IS_E_SUMMARY_SHOWN (shown)); - - e_tree_memory_freeze (E_TREE_MEMORY (shown->priv->all->etm)); - e_tree_memory_freeze (E_TREE_MEMORY (shown->priv->shown->etm)); -} - -void -e_summary_shown_thaw (ESummaryShown *shown) -{ - g_return_if_fail (IS_E_SUMMARY_SHOWN (shown)); - - e_tree_memory_thaw (E_TREE_MEMORY (shown->priv->all->etm)); - e_tree_memory_thaw (E_TREE_MEMORY (shown->priv->shown->etm)); -} - -static void -make_list (ETreePath path, - gpointer data) -{ - GList **list = data; - - *list = g_list_prepend (*list, path); -} - -GList * -e_summary_shown_get_selection (ESummaryShown *shown, - gboolean all) -{ - ETree *et; - ESelectionModel *esm; - GList *list = NULL; - - if (all) { - et = e_tree_scrolled_get_tree (E_TREE_SCROLLED (shown->priv->all->etable)); - } else { - et = e_tree_scrolled_get_tree (E_TREE_SCROLLED (shown->priv->shown->etable)); - } - - esm = e_tree_get_selection_model (et); - - e_tree_selection_model_foreach (E_TREE_SELECTION_MODEL (esm), - make_list, &list); - - return list; -} diff --git a/my-evolution/e-summary-shown.h b/my-evolution/e-summary-shown.h deleted file mode 100644 index 4f6ffd4459..0000000000 --- a/my-evolution/e-summary-shown.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximain, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef __E_SUMMARY_SHOWN_H__ -#define __E_SUMMARY_SHOWN_H__ - -#include <gtk/gtkhbox.h> -#include <glib.h> -#include <gal/e-table/e-tree-memory.h> - -#define E_SUMMARY_SHOWN_TYPE (e_summary_shown_get_type ()) -#define E_SUMMARY_SHOWN(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_SHOWN_TYPE, ESummaryShown)) -#define E_SUMMARY_SHOWN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_SHOWN_TYPE, ESummaryShownClass)) -#define IS_E_SUMMARY_SHOWN(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_SHOWN_TYPE)) -#define IS_E_SUMMARY_SHOWN_CLASS(klass) (GTK_CHECK_TYPE ((klass), E_SUMMARY_SHOWN_TYPE)) - -typedef struct _ESummaryShownPrivate ESummaryShownPrivate; -typedef struct _ESummaryShownClass ESummaryShownClass; -typedef struct _ESummaryShown ESummaryShown; - -typedef struct _ESummaryShownModelEntry { - ETreePath path; - char *name; - char *location; - - gboolean showable; - int ref_count; - - gpointer data; -} ESummaryShownModelEntry; - -struct _ESummaryShown { - GtkHBox parent; - - GHashTable *all_model; - GHashTable *shown_model; - ESummaryShownPrivate *priv; -}; - -struct _ESummaryShownClass { - GtkHBoxClass parent_class; - - void (* item_changed) (ESummaryShown *shown); - void (* selection_changed) (ESummaryShown *shown, - GList *rows); -}; - -GtkType e_summary_shown_get_type (void); -GtkWidget *e_summary_shown_new (void); -ETreePath e_summary_shown_add_node (ESummaryShown *shown, - gboolean all, - ESummaryShownModelEntry *entry, - ETreePath parent, - gboolean expanded, - gpointer data); -void e_summary_shown_remove_node (ESummaryShown *shown, - gboolean all, - ESummaryShownModelEntry *entry); -void e_summary_shown_freeze (ESummaryShown *shown); -void e_summary_shown_thaw (ESummaryShown *shown); -GList *e_summary_shown_get_selection (ESummaryShown *shown, - gboolean all); - -#endif diff --git a/my-evolution/e-summary-table.c b/my-evolution/e-summary-table.c deleted file mode 100644 index 4439ec9684..0000000000 --- a/my-evolution/e-summary-table.c +++ /dev/null @@ -1,440 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximain, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <string.h> - -#include <gtk/gtkvbox.h> -#include <gtk/gtkenums.h> -#include <gtk/gtksignal.h> - -#include <gal/util/e-util.h> -#include <gal/widgets/e-gui-utils.h> - -#include <gal/e-table/e-table-header.h> -#include <gal/e-table/e-table-header-item.h> -#include <gal/e-table/e-table-item.h> -#include <gal/e-table/e-cell-text.h> -#include <gal/e-table/e-cell-tree.h> -#include <gal/e-table/e-cell-checkbox.h> -#include <gal/e-table/e-table.h> -#include <gal/e-table/e-tree-scrolled.h> -#include <gal/e-table/e-tree-memory.h> -#include <gal/e-table/e-tree-memory-callbacks.h> -#include <gal/e-table/e-tree-table-adapter.h> - -#include <libgnome/gnome-i18n.h> - -#include "e-summary-table.h" -#include "e-cell-tri.h" - -#define COLS 2 - -#if 0 /* For translators */ -char *headers[COLS] = { - N_("Shown"), - N_("Name") -}; -#endif - -#define SPEC "<ETableSpecification cursor-mode=\"line\" draw-focus=\"true\" no-headers=\"true\"> \ -<ETableColumn model_col=\"0\" _title=\"Shown\" minimum_width=\"20\" resizable=\"false\" cell=\"tricell\" compare=\"integer\"/> \ -<ETableColumn model_col=\"1\" _title=\"Name\" resizable=\"true\" minimum-width=\"32\" cell=\"render-name\" compare=\"string\"/> \ -<ETableState> \ -<column source=\"0\"/> \ -<column source=\"1\"/> \ -<grouping></grouping> \ -</ETableState> \ -</ETableSpecification>" - -#define PARENT_TYPE (gtk_vbox_get_type ()) - -static GtkObjectClass *e_summary_table_parent_class; - -struct _ESummaryTablePrivate { - GtkWidget *etable; - ETableExtras *extras; - ETreeTableAdapter *adapter; - ETreeModel *etm; - - ETreePath root_node; -}; - -enum { - ITEM_CHANGED, - LAST_SIGNAL -}; -static guint32 table_signals[LAST_SIGNAL] = { 0 }; - -/* ETree callbacks */ -static GdkPixbuf * -icon_at (ETreeModel *etm, - ETreePath path, - void *model_data) -{ - /* No icon, since the cell tree renderer takes care of +/- */ - return NULL; -} - -static int -column_count (ETreeModel *etm, - void *data) -{ - return COLS; -} - -static void * -duplicate_value (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - switch (col) { - case 0: - return (void *) value; - - case 1: - return g_strdup (value); - - default: - g_assert_not_reached (); - } - - return NULL; -} - -static void -free_value (ETreeModel *etm, - int col, - void *value, - void *data) -{ - if (col == 1) { - g_free (value); - } -} - -static void * -initialise_value (ETreeModel *etm, - int col, - void *data) -{ - switch (col) { - case 0: - return GINT_TO_POINTER (1); - - case 1: - return g_strdup ("2"); - - default: - g_assert_not_reached (); - - } - - return NULL; -} - -static gboolean -value_is_empty (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - if (col == 1) { - return !(value && *(char *)value); - } - - return FALSE; -} - -static char * -value_to_string (ETreeModel *etm, - int col, - const void *value, - void *data) -{ - switch (col) { - case 0: - return g_strdup_printf ("%d", GPOINTER_TO_INT (value)); - - case 1: - return g_strdup (value); - - default: - g_assert_not_reached (); - } - - return NULL; -} - -static void * -value_at (ETreeModel *etm, - ETreePath path, - int col, - void *model_data) -{ - GHashTable *table; - ESummaryTable *est = E_SUMMARY_TABLE (model_data); - ESummaryTableModelEntry *entry; - - table = est->model; - if (e_tree_model_node_is_root (etm, path)) { - if (col == 1) { - return "<Root>"; - } else { - return GINT_TO_POINTER (0); - } - } else { - entry = g_hash_table_lookup (table, path); - g_return_val_if_fail (entry != NULL, NULL); - - if (col == 1) { - return entry->name; - - } else { - if (entry->editable == TRUE) { - return GINT_TO_POINTER (entry->shown ? 2 : 1); - } else { - return GINT_TO_POINTER (0); - } - } - } -} - -static void -set_value_at (ETreeModel *etm, - ETreePath path, - int col, - const void *val, - void *model_data) -{ - GHashTable *table; - ESummaryTable *est = E_SUMMARY_TABLE (model_data); - ESummaryTableModelEntry *entry; - - if (e_tree_model_node_is_root (etm, path)) { - return; - } - - if (col != 0) { - return; - } - - table = est->model; - entry = g_hash_table_lookup (table, path); - g_return_if_fail (entry != NULL); - - if (entry->editable == TRUE) { - entry->shown = GPOINTER_TO_INT (val) == 1 ? FALSE : TRUE; - g_signal_emit (est, table_signals[ITEM_CHANGED], 0, path); - } -} - -static gboolean -is_editable (ETreeModel *etm, - ETreePath path, - int col, - void *model_data) -{ - GHashTable *table; - ESummaryTable *est = (ESummaryTable *) model_data; - ESummaryTableModelEntry *entry; - - if (e_tree_model_node_is_root (etm, path)) { - return FALSE; - } - - if (col == 1) { - return FALSE; - } - - table = est->model; - entry = g_hash_table_lookup (table, path); - g_return_val_if_fail (entry != NULL, FALSE); - - return entry->editable; -} - -/* GtkObject callbacks */ - -static void -free_model_entry (gpointer key, - gpointer value, - gpointer user_data) -{ - ESummaryTableModelEntry *entry; - - entry = value; - g_free (entry->location); - g_free (entry->name); - g_free (entry); -} - -static void -destroy (GtkObject *object) -{ - ESummaryTable *est; - ESummaryTablePrivate *priv; - - est = E_SUMMARY_TABLE (object); - priv = est->priv; - - if (priv == NULL) { - return; - } - - /* What do I need to free? */ - g_hash_table_foreach (est->model, free_model_entry, NULL); - g_hash_table_destroy (est->model); - est->model = NULL; - - g_free (priv); - est->priv = NULL; - - e_summary_table_parent_class->destroy (object); -} - -static void -e_summary_table_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = destroy; - - e_summary_table_parent_class = gtk_type_class (PARENT_TYPE); - - table_signals[ITEM_CHANGED] = gtk_signal_new ("item-changed", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (ESummaryTableClass, item_changed), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); -} - -static void -e_summary_table_init (ESummaryTable *est) -{ - ESummaryTablePrivate *priv; - ETreeMemory *etmm; - ECell *cell; - ETree *tree; - - priv = g_new (ESummaryTablePrivate, 1); - est->priv = priv; - - priv->etm = e_tree_memory_callbacks_new (icon_at, - column_count, - - NULL, - NULL, - - NULL, - NULL, - - value_at, - set_value_at, - is_editable, - - duplicate_value, - free_value, - initialise_value, - value_is_empty, - value_to_string, - est); - g_object_ref (priv->etm); - gtk_object_sink (GTK_OBJECT (priv->etm)); - - etmm = E_TREE_MEMORY (priv->etm); - e_tree_memory_set_expanded_default (etmm, TRUE); - - priv->root_node = e_tree_memory_node_insert (etmm, NULL, 0, est); - - cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); - priv->extras = e_table_extras_new (); - e_table_extras_add_cell (priv->extras, "render-name", e_cell_tree_new (NULL, NULL, FALSE, cell)); - e_table_extras_add_cell (priv->extras, "tricell", e_cell_tri_new ()); - - priv->etable = e_tree_scrolled_new (priv->etm, priv->extras, SPEC, NULL); - if (priv->etable == NULL) { - g_warning ("Could not create ETable for ESummaryTable"); - return; - } - - tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (priv->etable)); - e_tree_root_node_set_visible (tree, FALSE); - - gtk_box_pack_start (GTK_BOX (est), GTK_WIDGET (priv->etable), - TRUE, TRUE, 0); - gtk_widget_show (GTK_WIDGET (priv->etable)); -} - -E_MAKE_TYPE (e_summary_table, "ESummaryTable", ESummaryTable, - e_summary_table_class_init, e_summary_table_init, PARENT_TYPE); - -GtkWidget * -e_summary_table_new (GHashTable *model) -{ - ESummaryTable *table; - - table = gtk_type_new (e_summary_table_get_type ()); - table->model = model; - - return GTK_WIDGET (table); -} - -ETreePath -e_summary_table_add_node (ESummaryTable *table, - ETreePath path, - int position, - gpointer node_data) -{ - ETreeMemory *etmm; - ETreePath p; - - g_return_val_if_fail (IS_E_SUMMARY_TABLE (table), NULL); - - if (path == NULL) { - path = table->priv->root_node; - } - - etmm = E_TREE_MEMORY (table->priv->etm); - e_tree_memory_freeze (etmm); - p = e_tree_memory_node_insert (etmm, path, position, node_data); - e_tree_memory_thaw (etmm); - - return p; -} - -guint -e_summary_table_get_num_children (ESummaryTable *table, - ETreePath path) -{ - if (path == NULL) { - return e_tree_model_node_get_children (table->priv->etm, - table->priv->root_node, NULL); - } else { - return e_tree_model_node_get_children (table->priv->etm, path, NULL); - } -} diff --git a/my-evolution/e-summary-table.h b/my-evolution/e-summary-table.h deleted file mode 100644 index 859f8f7ec9..0000000000 --- a/my-evolution/e-summary-table.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright 2002 Ximain, Inc. (www.ximian.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef __E_SUMMARY_TABLE_H__ -#define __E_SUMMARY_TABLE_H__ - -#include <gtk/gtkvbox.h> -#include <glib.h> -#include <gal/e-table/e-tree-memory.h> - -#define E_SUMMARY_TABLE_TYPE (e_summary_table_get_type ()) -#define E_SUMMARY_TABLE(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TABLE_TYPE, ESummaryTable)) -#define E_SUMMARY_TABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TABLE_TYPE, ESummaryTableClass)) -#define IS_E_SUMMARY_TABLE(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TABLE_TYPE)) -#define IS_E_SUMMARY_TABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_SUMMARY_TABLE_TYPE)) - -typedef struct _ESummaryTablePrivate ESummaryTablePrivate; -typedef struct _ESummaryTableClass ESummaryTableClass; -typedef struct _ESummaryTable ESummaryTable; - -typedef struct _ESummaryTableModelEntry { - ETreePath path; - - char *location; - - gboolean editable; - gboolean removable; - - gboolean shown; - char *name; -} ESummaryTableModelEntry; - -struct _ESummaryTable { - GtkVBox parent; - - GHashTable *model; - ESummaryTablePrivate *priv; -}; - -struct _ESummaryTableClass { - GtkVBoxClass parent_class; - - void (* item_changed) (ESummaryTable *table, - ETreePath path); -}; - -GtkType e_summary_table_get_type (void); -GtkWidget *e_summary_table_new (GHashTable *model); -ETreePath e_summary_table_add_node (ESummaryTable *est, - ETreePath path, - int position, - gpointer node_data); -guint e_summary_table_get_num_children (ESummaryTable *est, - ETreePath path); -#endif diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c deleted file mode 100644 index e7c4ee6b07..0000000000 --- a/my-evolution/e-summary-tasks.c +++ /dev/null @@ -1,618 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-tasks.c - * - * Copyright (C) 2001 Ximian, Inc. - * Copyright (C) 2002 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gnome.h> -#include <gal/widgets/e-unicode.h> - -#include "e-summary-tasks.h" -#include "e-summary.h" - -#include <cal-client/cal-client.h> -#include <cal-util/timeutil.h> - -#include <bonobo/bonobo-event-source.h> -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-listener.h> -#include <bonobo/bonobo-moniker-util.h> -#include <bonobo/bonobo-object.h> - -#include <gconf/gconf-client.h> - - -#define MAX_RELOAD_TRIES 10 - -struct _ESummaryTasks { - CalClient *client; - - char *html; - char *due_today_colour; - char *overdue_colour; - - char *default_uri; - - GConfClient *gconf_client; - int gconf_value_changed_handler_id; - - int cal_open_reload_timeout_id; - int reload_count; -}; - -const char * -e_summary_tasks_get_html (ESummary *summary) -{ - if (summary == NULL) { - return NULL; - } - - if (summary->tasks == NULL) { - return NULL; - } - - return summary->tasks->html; -} - -/* list_sort_merge, and list_sort are copied from GNOME-VFS. - Author: Sven Oliver <sven.over@ob.kamp.net> - Modified by Ettore Perazzoli <ettore@comm2000.it> to let the compare - functions get an additional gpointer parameter. - - Included here as using gnome-vfs for 1 20 line function - seems a bit of overkill. -*/ - -typedef gint (* CalSummaryListCompareFunc) (gconstpointer a, - gconstpointer b, - gpointer data); -static GList * -cal_list_sort_merge (GList *l1, - GList *l2, - CalSummaryListCompareFunc compare_func, - gpointer data) -{ - GList list, *l, *lprev; - - l = &list; - lprev = NULL; - - while (l1 && l2) { - if (compare_func (l1->data, l2->data, data) < 0) { - l->next = l1; - l = l->next; - l->prev = lprev; - lprev = l; - l1 = l1->next; - } else { - l->next = l2; - l = l->next; - l->prev = lprev; - lprev = l; - l2 = l2->next; - } - } - - l->next = l1 ? l1 : l2; - l->next->prev = l; - - return list.next; -} - -static GList * -cal_list_sort (GList *list, - CalSummaryListCompareFunc compare_func, - gpointer data) -{ - GList *l1, *l2; - - if (!list) - return NULL; - if (!list->next) - return list; - - l1 = list; - l2 = list->next; - - while ((l2 = l2->next) != NULL) { - if ((l2 = l2->next) == NULL) - break; - l1 = l1->next; - } - - l2 = l1->next; - l1->next = NULL; - - return cal_list_sort_merge (cal_list_sort (list, compare_func, data), - cal_list_sort (l2, compare_func, data), - compare_func, data); -} - -static int -sort_uids (gconstpointer a, - gconstpointer b, - gpointer user_data) -{ - icalcomponent *icalcomp_a, *icalcomp_b; - CalComponent *comp_a, *comp_b; - CalClient *client = user_data; - CalClientGetStatus status; - /* let undefined priorities be lowest ones */ - int lowest = 10, rv; - int *pri_a, *pri_b; - - /* a after b then return > 0 */ - - status = cal_client_get_object (client, a, &icalcomp_a); - if (status != CAL_CLIENT_GET_SUCCESS) - return -1; - - status = cal_client_get_object (client, b, &icalcomp_b); - if (status != CAL_CLIENT_GET_SUCCESS) - return 1; - - comp_a = cal_component_new (); - cal_component_set_icalcomponent (comp_a, icalcomp_a); - comp_b = cal_component_new (); - cal_component_set_icalcomponent (comp_b, icalcomp_b); - - cal_component_get_priority (comp_a, &pri_a); - cal_component_get_priority (comp_b, &pri_b); - - if (pri_a == NULL) - pri_a = &lowest; - if (pri_b == NULL) - pri_b = &lowest; - - if (*pri_a == 0) { - *pri_a = lowest; - } - - if (*pri_b == 0) { - *pri_b = lowest; - } - - rv = *pri_a - *pri_b; - - if (pri_a != &lowest) - cal_component_free_priority (pri_a); - if (pri_b != &lowest) - cal_component_free_priority (pri_b); - - g_object_unref (comp_a); - g_object_unref (comp_b); - - return rv; -} - -static GList * -get_todays_uids (ESummary *summary, - CalClient *client, - GList *uids) -{ - GList *today = NULL, *p; - time_t todays_end, todays_start, t; - - t = time (NULL); - todays_start = time_day_begin_with_zone (t, summary->tz); - todays_end = time_day_end_with_zone (t, summary->tz); - - for (p = uids; p; p = p->next) { - char *uid; - icalcomponent *icalcomp; - CalComponent *comp; - CalClientGetStatus status; - CalComponentDateTime due; - icaltimezone *zone; - time_t endt; - - uid = p->data; - status = cal_client_get_object (client, uid, &icalcomp); - if (status != CAL_CLIENT_GET_SUCCESS) { - continue; - } - - comp = cal_component_new (); - cal_component_set_icalcomponent (comp, icalcomp); - - cal_component_get_due (comp, &due); - - cal_client_get_timezone (client, due.tzid, &zone); - if (due.value != 0) { - icaltimezone_convert_time (due.value, zone, summary->tz); - endt = icaltime_as_timet (*due.value); - - if (endt <= todays_end) { - today = g_list_append (today, g_strdup (uid)); - } - } - - cal_component_free_datetime (&due); - g_object_unref (comp); - } - - if (today == NULL) { - return NULL; - } - - today = cal_list_sort (today, sort_uids, client); - return today; -} - -static const char * -get_task_colour (ESummary *summary, - CalClient *client, - const char *uid) -{ - icalcomponent *icalcomp; - CalComponent *comp; - CalClientGetStatus status; - CalComponentDateTime due; - icaltimezone *zone; - char *ret; - time_t end_t, t, todays_start, todays_end; - - t = time (NULL); - todays_start = time_day_begin_with_zone (t, summary->tz); - todays_end = time_day_end_with_zone (t, summary->tz); - - status = cal_client_get_object (client, uid, &icalcomp); - if (status != CAL_CLIENT_GET_SUCCESS) { - return "black"; - } - - comp = cal_component_new (); - cal_component_set_icalcomponent (comp, icalcomp); - - cal_component_get_due (comp, &due); - - cal_client_get_timezone (client, due.tzid, &zone); - if (due.value != 0) { - icaltimezone_convert_time (due.value, zone, summary->tz); - end_t = icaltime_as_timet (*due.value); - - if (end_t >= todays_start && end_t <= todays_end) { - ret = summary->tasks->due_today_colour; - } else if (end_t < t) { - ret = summary->tasks->overdue_colour; - } else { - ret = "black"; - } - } else { - ret = "black"; - } - - cal_component_free_datetime (&due); - g_object_unref (comp); - - return (const char *)ret; -} - -static gboolean -generate_html (gpointer data) -{ - ESummary *summary = data; - ESummaryTasks *tasks = summary->tasks; - GList *uids, *l; - GString *string; - char *tmp; - time_t t; - - if (cal_client_get_load_state (tasks->client) != CAL_CLIENT_LOAD_LOADED) - return FALSE; - - /* Set the default timezone on the server. */ - if (summary->tz) { - cal_client_set_default_timezone (tasks->client, - summary->tz); - } - - t = time (NULL); - - uids = cal_client_get_uids (tasks->client, CALOBJ_TYPE_TODO); - if (summary->preferences->show_tasks == E_SUMMARY_CALENDAR_TODAYS_TASKS && uids != NULL) { - GList *tmp; - - tmp = get_todays_uids (summary, tasks->client, uids); - cal_obj_uid_list_free (uids); - - uids = tmp; - } - - if (uids == NULL) { - g_free (tasks->html); - tasks->html = g_strconcat ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" " - "alt=\"\" width=\"48\" height=\"48\"> " - "<b><a href=\"", tasks->default_uri, "\">", - _("Tasks"), - "</a></b></dt><dd><b>", _("No tasks"), "</b></dd></dl>", - NULL); - return FALSE; - } else { - uids = cal_list_sort (uids, sort_uids, tasks->client); - string = g_string_new (NULL); - g_string_sprintf (string, "<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" " - "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"%s\">", tasks->default_uri); - g_string_append (string, _("Tasks")); - g_string_append (string, "</a></b></dt><dd>"); - - for (l = uids; l; l = l->next) { - char *uid; - icalcomponent *icalcomp; - CalComponent *comp; - CalComponentText text; - CalClientGetStatus status; - struct icaltimetype *completed; - const char *colour; - - uid = l->data; - status = cal_client_get_object (tasks->client, uid, &icalcomp); - if (status != CAL_CLIENT_GET_SUCCESS) { - continue; - } - - comp = cal_component_new (); - cal_component_set_icalcomponent (comp, icalcomp); - - cal_component_get_summary (comp, &text); - cal_component_get_completed (comp, &completed); - - colour = get_task_colour (summary, tasks->client, uid); - - if (completed == NULL) { - tmp = g_strdup_printf ("<img align=\"middle\" src=\"task.png\" " - "alt=\"\" width=\"16\" height=\"16\">   " - "<a href=\"tasks:/%s\"><font size=\"-1\" color=\"%s\">%s</font></a><br>", - uid, colour ? colour : _("blue"), text.value ? text.value : _("(No Description)")); - } else { -#if 0 - tmp = g_strdup_printf ("<img align=\"middle\" src=\"task.xpm\" " - "alt=\"\" width=\"16\" height=\"16\">   " - "<font size=\"-1\"><strike><a href=\"evolution:/local/Tasks\">%s</a></strike></font><br>", - text.value); -#endif - cal_component_free_icaltimetype (completed); - g_object_unref (comp); - continue; - } - - g_object_unref (comp); - g_string_append (string, tmp); - g_free (tmp); - } - - cal_obj_uid_list_free (uids); - g_string_append (string, "</dd></dl>"); - } - - if (tasks->html) { - g_free (tasks->html); - } - tasks->html = string->str; - g_string_free (string, FALSE); - - e_summary_draw (summary); - return FALSE; -} - -static gboolean -cal_open_reload_timeout (void *data) -{ - ESummary *summary = (ESummary *) data; - - summary->tasks->cal_open_reload_timeout_id = 0; - - if (++ summary->tasks->reload_count >= MAX_RELOAD_TRIES) { - summary->tasks->reload_count = 0; - return FALSE; - } - - cal_client_open_default_tasks (summary->tasks->client, FALSE); - return FALSE; -} - -static void -cal_opened_cb (CalClient *client, - CalClientOpenStatus status, - ESummary *summary) -{ - if (status == CAL_CLIENT_OPEN_SUCCESS) - g_idle_add (generate_html, summary); - else - summary->tasks->cal_open_reload_timeout_id = g_timeout_add (1000, - cal_open_reload_timeout, - summary); -} - -static void -obj_changed_cb (CalClient *client, - const char *uid, - gpointer data) -{ - g_idle_add (generate_html, data); -} - -static void -e_summary_tasks_protocol (ESummary *summary, - const char *uri, - void *closure) -{ - ESummaryTasks *tasks; - CORBA_Environment ev; - const char *comp_uri; - GNOME_Evolution_Calendar_CompEditorFactory factory; - - tasks = (ESummaryTasks *) closure; - - comp_uri = cal_client_get_uri (tasks->client); - - /* Get the factory */ - CORBA_exception_init (&ev); - factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &ev); - if (BONOBO_EX (&ev)) { - g_message ("%s: Could not activate the component editor factory (%s)", - G_GNUC_FUNCTION, CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - return; - } - - GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, comp_uri, (char *)uri + 7, &ev); - - if (BONOBO_EX (&ev)) { - g_message ("%s: Execption while editing the component (%s)", - G_GNUC_FUNCTION, CORBA_exception_id (&ev)); - } - - CORBA_exception_free (&ev); - bonobo_object_release_unref (factory, NULL); -} - -static void -setup_task_folder (ESummary *summary) -{ - ESummaryTasks *tasks; - - tasks = summary->tasks; - g_assert (tasks != NULL); - g_assert (tasks->gconf_client != NULL); - - if (tasks->cal_open_reload_timeout_id != 0) { - g_source_remove (tasks->cal_open_reload_timeout_id); - tasks->cal_open_reload_timeout_id = 0; - tasks->reload_count = 0; - } - - g_free (tasks->due_today_colour); - g_free (tasks->overdue_colour); - g_free (tasks->default_uri); - - tasks->due_today_colour = gconf_client_get_string (tasks->gconf_client, - "/apps/evolution/calendar/tasks/colors/due_today", NULL); - if (!tasks->due_today_colour) - tasks->due_today_colour = g_strdup ("blue"); - - tasks->overdue_colour = gconf_client_get_string (tasks->gconf_client, - "/apps/evolution/calendar/tasks/colors/overdue", NULL); - if (!tasks->overdue_colour) - tasks->overdue_colour = g_strdup ("red"); - - tasks->default_uri = gconf_client_get_string (tasks->gconf_client, - "/apps/evolution/shell/default_folders/tasks_path", NULL); - - if (tasks->client != NULL) - g_object_unref (tasks->client); - - tasks->client = cal_client_new (); - if (tasks->client == NULL) { - g_warning ("Error making the client"); - return; - } - - g_signal_connect (tasks->client, "cal-opened", G_CALLBACK (cal_opened_cb), summary); - g_signal_connect (tasks->client, "obj-updated", G_CALLBACK (obj_changed_cb), summary); - g_signal_connect (tasks->client, "obj-removed", G_CALLBACK (obj_changed_cb), summary); - - if (! cal_client_open_default_tasks (tasks->client, FALSE)) - g_message ("Open tasks failed"); -} - -static void -gconf_client_value_changed_cb (GConfClient *gconf_client, - const char *key, - GConfValue *value, - void *user_data) -{ - setup_task_folder (E_SUMMARY (user_data)); - generate_html (user_data); -} - -static void -setup_gconf_client (ESummary *summary) -{ - ESummaryTasks *tasks; - - tasks = summary->tasks; - g_assert (tasks != NULL); - - tasks->gconf_client = gconf_client_get_default (); - - gconf_client_add_dir (tasks->gconf_client, "/apps/evolution/calendar/tasks/colors", FALSE, NULL); - gconf_client_add_dir (tasks->gconf_client, "/apps/evolution/shell/default_folders", FALSE, NULL); - - tasks->gconf_value_changed_handler_id - = g_signal_connect (tasks->gconf_client, "value_changed", - G_CALLBACK (gconf_client_value_changed_cb), summary); -} - -void -e_summary_tasks_init (ESummary *summary) -{ - ESummaryTasks *tasks; - - g_return_if_fail (summary != NULL); - - tasks = g_new0 (ESummaryTasks, 1); - - summary->tasks = tasks; - - setup_gconf_client (summary); - setup_task_folder (summary); - - e_summary_add_protocol_listener (summary, "tasks", e_summary_tasks_protocol, tasks); -} - -void -e_summary_tasks_reconfigure (ESummary *summary) -{ - setup_task_folder (summary); - generate_html (summary); -} - -void -e_summary_tasks_free (ESummary *summary) -{ - ESummaryTasks *tasks; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - tasks = summary->tasks; - - if (tasks->cal_open_reload_timeout_id != 0) - g_source_remove (tasks->cal_open_reload_timeout_id); - - g_object_unref (tasks->client); - g_free (tasks->html); - g_free (tasks->due_today_colour); - g_free (tasks->overdue_colour); - g_free (tasks->default_uri); - - if (tasks->gconf_value_changed_handler_id != 0) - g_signal_handler_disconnect (tasks->gconf_client, - tasks->gconf_value_changed_handler_id); - g_object_unref (tasks->gconf_client); - - g_free (tasks); - summary->tasks = NULL; -} diff --git a/my-evolution/e-summary-tasks.h b/my-evolution/e-summary-tasks.h deleted file mode 100644 index a9d3d6b698..0000000000 --- a/my-evolution/e-summary-tasks.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-tasks.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef __E_SUMMARY_TASKS_H__ -#define __E_SUMMARY_TASKS_H__ - -#include "e-summary-type.h" - -typedef struct _ESummaryTasks ESummaryTasks; - -const char *e_summary_tasks_get_html (ESummary *summary); -void e_summary_tasks_init (ESummary *summary); -void e_summary_tasks_reconfigure (ESummary *summary); -void e_summary_tasks_free (ESummary *summary); - -#endif diff --git a/my-evolution/e-summary-type.h b/my-evolution/e-summary-type.h deleted file mode 100644 index 8a40dfe991..0000000000 --- a/my-evolution/e-summary-type.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-type.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef __E_SUMMARY_TYPE_H__ -#define __E_SUMMARY_TYPE_H__ - -typedef struct _ESummary ESummary; - -#endif diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c deleted file mode 100644 index 53b5be12b6..0000000000 --- a/my-evolution/e-summary-weather.c +++ /dev/null @@ -1,823 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-weather.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <glib.h> -#include <gtk/gtkctree.h> -#include <gtk/gtkmain.h> - -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-config.h> - -#include <gal/widgets/e-unicode.h> - -#include <string.h> - -#include "e-summary.h" -#include "e-summary-shown.h" -#include "e-summary-weather.h" -#include "e-summary-preferences.h" -#include "weather.h" -#include "metar.h" - -struct _ESummaryWeather { - ESummaryConnection *connection; - GList *weathers; - - char *html; - guint32 timeout; - - gboolean online; - gboolean errorshown; -}; - -static GHashTable *locations_hash = NULL; - -char * -e_summary_weather_get_html (ESummary *summary) -{ - GList *weathers; - GString *string; - char *html; - - if (summary->weather == NULL || summary->weather->weathers == NULL) { - return NULL; - } - - string = g_string_new ("<dl><img src=\"ico-weather.png\" align=\"middle\" " - "alt=\"\" width=\"48\" height=\"48\"><b>" - "<a href=\"http://www.metoffice.gov.uk\">"); - g_string_append (string, _("My Weather")); - g_string_append (string, "</a></b>"); - - for (weathers = summary->weather->weathers; weathers; weathers = weathers->next) { - if (((Weather *)weathers->data)->html == NULL) { - continue; - } - - g_string_append (string, ((Weather *)weathers->data)->html); - } - - g_string_append (string, "</dl>"); - - html = string->str; - g_string_free (string, FALSE); - - return html; -} - -static char * -make_url (const char *code) -{ - return g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", code); -} - -static void -weather_make_html (Weather *w) -{ - GString *string; - ESummaryWeatherLocation *location; - char *sky, *temp, *cond; - const char *icon_name; - - icon_name = icon_from_weather (w); - string = g_string_new (""); - g_string_sprintf (string, "<dd><img align=\"middle\" " - "src=\"%s\" width=\"16\" height=\"16\"> <b>", - icon_name); - location = g_hash_table_lookup (locations_hash, w->location); -#if 0 - if (location == NULL) { - url = make_anchor (w->location, w->location); - } else { - url = make_anchor (location->name, w->location); - } -#endif - if (location == NULL) { - g_string_append (string, w->location); - } else { - g_string_append (string, location->name); - } - -#if 0 - g_string_append (string, url); - g_free (url); -#endif - - g_string_append (string, "</b>:<blockquote><font size=\"-1\">"); - sky = (char *) weather_sky_string (w); - temp = weather_temp_string (w); - cond = (char *) weather_conditions_string (w); - - g_string_append (string, sky); - g_string_append_c (string, ' '); - g_string_append (string, cond); - g_string_append_c (string, ' '); - g_string_append (string, temp); - - g_free (temp); - -#if 0 - g_string_append (string, "<font size=\"-1\">"); - - uri = g_strdup_printf ("<a href=\"weather://%p\">", w); - g_string_append (string, uri); - g_free (uri); - g_string_append (string, "(More)</a></font></font></blockquote></dd>"); -#else - g_string_append (string, "</font></blockquote></dd>"); -#endif - if (w->html != NULL) { - g_free (w->html); - } - w->html = string->str; - g_string_free (string, FALSE); - - e_summary_draw (w->summary); -} - -static ESummaryWeatherLocation * -weather_location_new (char **locdata) -{ - ESummaryWeatherLocation *location; - - location = g_new (ESummaryWeatherLocation, 1); - location->name = g_strdup (locdata[0]); - location->code = g_strdup (locdata[1]); - location->zone = g_strdup (locdata[2]); - location->radar = g_strdup (locdata[3]); - - return location; -} - -static void -parse_metar_token (const char *token, - gboolean in_comment, - Weather *w) -{ - if (in_comment == FALSE) { - if (metar_tok_time ((char *) token, w)) { - return; - } else if (metar_tok_wind ((char *) token, w)) { - return; - } else if (metar_tok_vis ((char *) token, w)) { - return; - } else if (metar_tok_cloud ((char *) token, w)) { - return; - } else if (metar_tok_temp ((char *) token, w)) { - return; - } else if (metar_tok_pres ((char *) token, w)) { - return; - } else if (metar_tok_cond ((char *) token, w)) { - return; - } - } -} - -static void -parse_metar (const char *metar, - Weather *w) -{ - char *metar_dup; - char **toks; - gint ntoks; - gint i; - gboolean in_remark = FALSE; - - metar_dup = g_strdup (metar + 6); - - metar_init_re (); - - toks = g_strsplit (metar, " ", 0); - - for (ntoks = 0; toks[ntoks]; ntoks++) { - if (strcmp (toks[ntoks], "RMK") == 0) { - in_remark = TRUE; - } - } - - for (i = ntoks - 1; i >= 0; i--) { - if (*toks[i] != '\0') { - if (strcmp (toks[i], "RMK") == 0) { - in_remark = FALSE; - } else { - parse_metar_token (toks[i], in_remark, w); - } - } - } - - g_strfreev (toks); - g_free (metar_dup); - weather_make_html (w); -} - -static void -message_finished (SoupMessage *msg, - gpointer userdata) -{ - Weather *w = (Weather *) userdata; - ESummary *summary; - char *html, *metar, *end; - char *search_str; - - summary = w->summary; - if (summary->weather->connection->callback) { - ESummaryConnection *connection = summary->weather->connection; - connection->callback (summary, connection->callback_closure); - } - - if (SOUP_MESSAGE_IS_ERROR (msg)) { - ESummaryWeatherLocation *location; - - g_warning ("Message failed: %d\n%s", msg->errorcode, - msg->errorphrase); - w->message = NULL; - - location = g_hash_table_lookup (locations_hash, w->location); - - w->html = g_strdup_printf ("<br><b>%s %s</b></br>", - _("There was an error downloading data for"), - location ? location->name : w->location); - - e_summary_draw (w->summary); - return; - } - - html = g_strdup (msg->response.body); - w->message = NULL; - - /* Find the metar data */ - search_str = g_strdup_printf ("\n%s", w->location); - metar = strstr (html, search_str); - if (metar == NULL) { - g_free (search_str); - return; - } - - metar++; - end = strchr (metar, '\n'); - if (end == NULL) { - g_free (search_str); - return; - } - *end = '\0'; - - parse_metar (metar, w); - g_free (search_str); - return; -} - -gboolean -e_summary_weather_update (ESummary *summary) -{ - GList *w; - - if (summary->weather->online == FALSE) { - g_warning ("%s: Repolling but offline", G_GNUC_FUNCTION); - return TRUE; - } - - summary->weather->errorshown = FALSE; - for (w = summary->weather->weathers; w; w = w->next) { - SoupContext *context; - char *uri; - Weather *weather = w->data; - - if (weather->message != NULL) { - continue; - } - - uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location); - context = soup_context_get (uri); - if (context == NULL) { - g_warning ("Invalid URL: %s", uri); - soup_context_unref (context); - g_free (uri); - continue; - } - - weather->message = soup_message_new (context, SOUP_METHOD_GET); - soup_context_unref (context); - soup_message_queue (weather->message, message_finished, weather); - - g_free (uri); - } - - return TRUE; -} - -static void -weather_free (Weather *w) -{ - g_return_if_fail (w != NULL); - - if (w->message != NULL) { - soup_message_cancel (w->message); - } - - g_free (w->location); - g_free (w->html); - g_free (w); -} - -static void -e_summary_weather_add_location (ESummary *summary, - const char *location) -{ - Weather *w; - - w = g_new0 (Weather, 1); - w->summary = summary; - w->location = g_strdup (location); - summary->weather->weathers = g_list_append (summary->weather->weathers, w); -} - -static gboolean -e_summary_weather_init_locations (void) -{ - int nregions, iregions; - char **regions; - - if (locations_hash != NULL) { - return TRUE; - } - - locations_hash = g_hash_table_new (g_str_hash, g_str_equal); - - gnome_config_push_prefix ("=" LOCATIONDIR "/Locations=/"); - - gnome_config_get_vector ("Main/regions", &nregions, ®ions); - for (iregions = nregions - 1; iregions >= 0; iregions--) { - int nstates, istates; - char **states; - char *region_name; - char *region_name_key; - char *states_key; - - region_name_key = g_strconcat (regions[iregions], "/name", NULL); - states_key = g_strconcat (regions[iregions], "/states", NULL); - region_name = gnome_config_get_string (region_name_key); - - gnome_config_get_vector (states_key, &nstates, &states); - - for (istates = nstates - 1; istates >= 0; istates--) { - void *iter; - char *iter_key, *iter_val; - char *state_path, *state_name_key, *state_name; - - state_path = g_strconcat (regions[iregions], "_", states[istates], "/", NULL); - state_name_key = g_strconcat (state_path, "name", NULL); - state_name = gnome_config_get_string (state_name_key); - - iter = gnome_config_init_iterator (state_path); - - while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) { - if (strstr ((const char *) iter_key, "loc") != NULL) { - char **locdata; - int nlocdata; - ESummaryWeatherLocation *location; - - gnome_config_make_vector (iter_val, - &nlocdata, - &locdata); - - if (nlocdata != 4) { - g_warning ("Invalid location in Locations file: %s\n", iter_val); - g_free (iter_key); - g_free (iter_val); - continue; - } - - if (!g_hash_table_lookup (locations_hash, locdata[1])) { - location = weather_location_new (locdata); - g_hash_table_insert (locations_hash, - g_strdup (locdata[1]), - location); - } - - g_strfreev (locdata); - } - - g_free (iter_key); - g_free (iter_val); - } - - g_free (state_name); - g_free (state_path); - g_free (state_name_key); - } - - g_strfreev (states); - g_free (region_name); - g_free (region_name_key); - g_free (states_key); - } - - g_strfreev (regions); - gnome_config_pop_prefix (); - - return TRUE; -} - -static void -e_summary_weather_protocol (ESummary *summary, - const char *uri, - void *closure) -{ -} - -static int -e_summary_weather_count (ESummary *summary, - void *data) -{ - ESummaryWeather *weather; - GList *p; - int count = 0; - - weather = summary->weather; - for (p = weather->weathers; p; p = p->next) { - Weather *w = p->data; - - if (w->message != NULL) { - count++; - } - } - - return count; -} - -static ESummaryConnectionData * -make_connection (Weather *w) -{ - ESummaryConnectionData *data; - - data = g_new (ESummaryConnectionData, 1); - data->hostname = make_url (w->location); - data->type = g_strdup (_("Weather")); - - return data; -} - -static GList * -e_summary_weather_add (ESummary *summary, - void *data) -{ - ESummaryWeather *weather; - GList *p, *connections = NULL; - - weather = summary->weather; - for (p = weather->weathers; p; p = p->next) { - Weather *w = p->data; - - if (w->message != NULL) { - ESummaryConnectionData *d; - - d = make_connection (w); - connections = g_list_prepend (connections, d); - } - } - - return connections; -} - -static void -e_summary_weather_set_online (ESummary *summary, - GNOME_Evolution_OfflineProgressListener listener, - gboolean online, - void *data) -{ - ESummaryWeather *weather; - GList *p; - - weather = summary->weather; - if (weather->online == online) { - return; - } - - if (online == TRUE) { - e_summary_weather_update (summary); - - if (summary->preferences->weather_refresh_time != 0) - weather->timeout = gtk_timeout_add (summary->preferences->weather_refresh_time * 1000, - (GtkFunction) e_summary_weather_update, - summary); - } else { - for (p = weather->weathers; p; p = p->next) { - Weather *w; - - w = p->data; - if (w->message) { - soup_message_cancel (w->message); - w->message = NULL; - } - } - - gtk_timeout_remove (weather->timeout); - weather->timeout = 0; - } - - weather->online = online; -} - -void -e_summary_weather_init (ESummary *summary) -{ - ESummaryPrefs *prefs; - ESummaryWeather *weather; - ESummaryConnection *connection; - int timeout; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - if (e_summary_weather_init_locations () == FALSE) { - return; - } - - prefs = summary->preferences; - weather = g_new0 (ESummaryWeather, 1); - weather->online = TRUE; - summary->weather = weather; - - connection = g_new (ESummaryConnection, 1); - connection->count = e_summary_weather_count; - connection->add = e_summary_weather_add; - connection->set_online = e_summary_weather_set_online; - connection->closure = NULL; - connection->callback = NULL; - connection->callback_closure = NULL; - - weather->connection = connection; - e_summary_add_online_connection (summary, connection); - - e_summary_add_protocol_listener (summary, "weather", e_summary_weather_protocol, weather); - - if (prefs == NULL) { - /* translators: Put here a list of codes for locations you want to - see in My Evolution by default. You can find the list of all - stations and their codes in Evolution sources - (evolution/my-evolution/Locations) */ - char *default_stations = _("KBOS"), **stations_v, **p; - - stations_v = g_strsplit (default_stations, ":", 0); - g_assert (stations_v != NULL); - for (p = stations_v; *p != NULL; p++) { - e_summary_weather_add_location (summary, *p); - } - g_strfreev (stations_v); - timeout = 600; - } else { - GSList *p; - - for (p = prefs->stations; p; p = p->next) { - e_summary_weather_add_location (summary, p->data); - } - timeout = prefs->weather_refresh_time; - } - - e_summary_weather_update (summary); - - if (timeout == 0) - weather->timeout = 0; - else - weather->timeout = gtk_timeout_add (timeout * 1000, - (GtkFunction) e_summary_weather_update, - summary); - return; -} - -const char * -e_summary_weather_code_to_name (const char *code) -{ - ESummaryWeatherLocation *location; - - if (locations_hash == NULL) { - if (e_summary_weather_init_locations () == FALSE) { - return code; - } - } - - location = g_hash_table_lookup (locations_hash, code); - if (location == NULL) { - return code; - } else { - return location->name; - } -} - -static gboolean -is_weather_shown (const char *code) -{ - GSList *p; - ESummaryPrefs *global_preferences; - - global_preferences = e_summary_preferences_get_global (); - for (p = global_preferences->stations; p; p = p->next) { - if (strcmp (p->data, code) == 0) { - return TRUE; - } - } - - return FALSE; -} - -void -e_summary_weather_fill_etable (ESummaryShown *ess) -{ - ETreePath region, state, location; - ESummaryShownModelEntry *entry; - int nregions, iregions; - char **regions; - - gnome_config_push_prefix ("=" LOCATIONDIR "/Locations=/"); - - gnome_config_get_vector ("Main/regions", &nregions, ®ions); - region = NULL; - - e_summary_shown_freeze (ess); - for (iregions = nregions - 1; iregions >= 0; iregions--) { - int nstates, istates; - char **states; - char *region_name; - char *region_name_key; - char *states_key; - - region_name_key = g_strconcat (regions[iregions], "/name", NULL); - states_key = g_strconcat (regions[iregions], "/states", NULL); - region_name = gnome_config_get_string (region_name_key); - - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = NULL; - entry->name = g_strdup (region_name); - entry->showable = FALSE; - - region = e_summary_shown_add_node (ess, TRUE, entry, NULL, FALSE, NULL); - - gnome_config_get_vector (states_key, &nstates, &states); - - state = NULL; - for (istates = 0; istates < nstates; istates++) { - void *iter; - char *iter_key, *iter_val; - char *state_path, *state_name_key, *state_name; - - state_path = g_strconcat (regions[iregions], "_", states[istates], "/", NULL); - state_name_key = g_strconcat (state_path, "name", NULL); - state_name = gnome_config_get_string (state_name_key); - - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = NULL; - entry->name = g_strdup (state_name); - entry->showable = FALSE; - - state = e_summary_shown_add_node (ess, TRUE, entry, region, FALSE, NULL); - - location = NULL; - iter = gnome_config_init_iterator (state_path); - - while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) { - if (strncmp (iter_key, "loc", 3) == 0) { - char **locdata; - int nlocdata; - - gnome_config_make_vector (iter_val, - &nlocdata, - &locdata); - if (nlocdata != 4) { - g_warning ("Invalid location in Locations file: %s\n", iter_val); - g_free (iter_key); - g_free (iter_val); - continue; - } - - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (locdata[1]); - entry->name = g_strdup (locdata[0]); - entry->showable = TRUE; - - location = e_summary_shown_add_node (ess, TRUE, entry, state, FALSE, NULL); - if (is_weather_shown (locdata[1]) == TRUE) { - entry = g_new (ESummaryShownModelEntry, 1); - entry->location = g_strdup (locdata[1]); - entry->name = g_strdup (locdata[0]); - location = e_summary_shown_add_node (ess, FALSE, entry, NULL, FALSE, NULL); - } - g_strfreev (locdata); - } - - g_free (iter_key); - g_free (iter_val); - } - - g_free (state_name); - g_free (state_path); - g_free (state_name_key); - } - - g_strfreev (states); - g_free (region_name); - g_free (region_name_key); - g_free (states_key); - } - - g_strfreev (regions); - gnome_config_pop_prefix (); - e_summary_shown_thaw (ess); - - return; -} - -void -e_summary_weather_reconfigure (ESummary *summary) -{ - ESummaryWeather *weather; - GList *old; - GList *weather_list; - GSList *p; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - weather = summary->weather; - - /* Stop timeout so it doesn't occur while we're changing stuff*/ - gtk_timeout_remove (weather->timeout); - - /* Clear the weather list before doing weather_free() on each of them - because otherwise soup_message_cancel() could invoke the refresh - function just while we are freeing things. [#31639] */ - weather_list = weather->weathers; - weather->weathers = NULL; - - for (old = weather_list; old != NULL; old = old->next) { - Weather *w; - - w = old->data; - weather_free (w); - } - g_list_free (weather_list); - - for (p = summary->preferences->stations; p; p = p->next) { - e_summary_weather_add_location (summary, p->data); - } - - if (summary->preferences->weather_refresh_time == 0) - weather->timeout = 0; - else - weather->timeout = gtk_timeout_add (summary->preferences->weather_refresh_time * 1000, - (GtkFunction) e_summary_weather_update, summary); - - e_summary_weather_update (summary); -} - -void -e_summary_weather_free (ESummary *summary) -{ - ESummaryWeather *weather; - GList *p; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - weather = summary->weather; - - if (weather->timeout != 0) { - gtk_timeout_remove (weather->timeout); - } - for (p = weather->weathers; p; p = p->next) { - Weather *w = p->data; - - weather_free (w); - } - g_list_free (weather->weathers); - g_free (weather->html); - - e_summary_remove_online_connection (summary, weather->connection); - g_free (weather->connection); - - g_free (weather); - summary->weather = NULL; -} - diff --git a/my-evolution/e-summary-weather.h b/my-evolution/e-summary-weather.h deleted file mode 100644 index 6933137ed2..0000000000 --- a/my-evolution/e-summary-weather.h +++ /dev/null @@ -1,153 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-weather.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef __E_SUMMARY_WEATHER_H__ -#define __E_SUMMARY_WEATHER_H__ - -#include <time.h> - -#include "e-summary-type.h" -#include "e-summary-shown.h" - -typedef struct _ESummaryWeather ESummaryWeather; - -#define WEATHER_LOCATION_NAME_MAX_LEN 100 -#define WEATHER_LOCATION_CODE_LEN 4 -#define WEATHER_LOCATION_ZONE_LEN 7 -#define WEATHER_LOCATION_RADAR_LEN 3 - -typedef struct _ESummaryWeatherLocation { - char *name; - char *code; - char *zone; - char *radar; -} ESummaryWeatherLocation; - -typedef enum _ESummaryWeatherWindDir { - WIND_VARIABLE, - WIND_N, - WIND_NNE, - WIND_NE, - WIND_ENE, - WIND_E, - WIND_ESE, - WIND_SE, - WIND_SSE, - WIND_S, - WIND_SSW, - WIND_SW, - WIND_WSW, - WIND_W, - WIND_WNW, - WIND_NW, - WIND_NNW -} ESummaryWeatherWindDir; - -typedef enum _ESummaryWeatherSky { - SKY_CLEAR, - SKY_BROKEN, - SKY_SCATTERED, - SKY_FEW, - SKY_OVERCAST -} ESummaryWeatherSky; - -typedef enum _ESummaryWeatherConditionPhenomenon { - PHENOMENON_NONE, - - PHENOMENON_DRIZZLE, - PHENOMENON_RAIN, - PHENOMENON_SNOW, - PHENOMENON_SNOW_GRAINS, - PHENOMENON_ICE_CRYSTALS, - PHENOMENON_ICE_PELLETS, - PHENOMENON_HAIL, - PHENOMENON_SMALL_HAIL, - PHENOMENON_UNKNOWN_PRECIPITATION, - - PHENOMENON_MIST, - PHENOMENON_FOG, - PHENOMENON_SMOKE, - PHENOMENON_VOLCANIC_ASH, - PHENOMENON_SAND, - PHENOMENON_HAZE, - PHENOMENON_SPRAY, - PHENOMENON_DUST, - - PHENOMENON_SQUALL, - PHENOMENON_SANDSTORM, - PHENOMENON_DUSTSTORM, - PHENOMENON_FUNNEL_CLOUD, - PHENOMENON_TORNADO, - PHENOMENON_DUST_WHIRLS -} ESummaryWeatherConditionPhenomenon; - -typedef enum _ESummaryWeatherConditionQualifier { - QUALIFIER_NONE, - - QUALIFIER_VICINITY, - - QUALIFIER_LIGHT, - QUALIFIER_MODERATE, - QUALIFIER_HEAVY, - QUALIFIER_SHALLOW, - QUALIFIER_PATCHES, - QUALIFIER_PARTIAL, - QUALIFIER_THUNDERSTORM, - QUALIFIER_BLOWING, - QUALIFIER_SHOWERS, - QUALIFIER_DRIFTING, - QUALIFIER_FREEZING -} ESummaryWeatherConditionQualifier; - -typedef struct _ESummaryWeatherConditions { - gboolean significant; - ESummaryWeatherConditionPhenomenon phenomenon; - ESummaryWeatherConditionQualifier qualifier; -} ESummaryWeatherConditions; - -typedef enum _ESummaryWeatherUnits { - UNITS_IMPERIAL, - UNITS_METRIC -} ESummaryWeatherUnits; - -typedef enum _ESummaryWeatherForecastType { - FORECAST_STATE, - FORECAST_ZONE -} ESummaryWeatherForecastType; - -typedef double ESummaryWeatherTemperature; -typedef int ESummaryWeatherHumidity; -typedef int ESummaryWeatherWindSpeed; -typedef double ESummaryWeatherPressure; -typedef double ESummaryWeatherVisibility; - -typedef time_t ESummaryWeatherUpdate; - -char *e_summary_weather_get_html (ESummary *summary); -void e_summary_weather_init (ESummary *summary); -void e_summary_weather_reconfigure (ESummary *summary); -void e_summary_weather_fill_etable (ESummaryShown *ess); -const char *e_summary_weather_code_to_name (const char *code); -void e_summary_weather_free (ESummary *summary); -gboolean e_summary_weather_update (ESummary *summary); - -#endif diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c deleted file mode 100644 index 1baba182ec..0000000000 --- a/my-evolution/e-summary.c +++ /dev/null @@ -1,967 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - -#include <glib.h> - -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-util.h> -#include <libgnome/gnome-url.h> - -#include <gtkhtml/gtkhtml.h> -#include <gtkhtml/gtkhtml-stream.h> -#include <gtkhtml/htmlengine.h> -#include <gtkhtml/htmlselection.h> - -#include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> - -#include <bonobo/bonobo-listener.h> -#include <bonobo/bonobo-exception.h> -#include <bonobo/bonobo-moniker-util.h> -#include <bonobo/bonobo-ui-component.h> - -#include <libgnome/gnome-url.h> - -#include <libgnomeprint/gnome-print-job.h> - -#include <libgnomeprintui/gnome-print-job-preview.h> -#include <libgnomeprintui/gnome-print-dialog.h> - -#include <gtk/gtkdialog.h> - -#include <cal-util/timeutil.h> - -#include <gtk/gtkmain.h> -#include <gtk/gtkscrolledwindow.h> - -#include <gconf/gconf-client.h> - -#include <string.h> -#include <unistd.h> - -#include "e-summary.h" -#include "e-summary-preferences.h" -#include "my-evolution-html.h" -#include "Mailer.h" - -#include <Evolution.h> -#include "e-util/e-dialog-utils.h" - -#include <time.h> - -#define PARENT_TYPE (gtk_vbox_get_type ()) - -extern char *evolution_dir; - -static GList *all_summaries = NULL; - -static GtkObjectClass *e_summary_parent_class; - -struct _ESummaryMailFolderInfo { - char *name; - - int count; - int unread; -}; - -struct _ESummaryPrivate { - BonoboControl *control; - - GtkWidget *html_scroller; - GtkWidget *html; - - GHashTable *protocol_hash; - - GList *connections; - - guint pending_reload_tag; - - guint tomorrow_timeout_id; - - gboolean frozen; - - int queued_draw_idle_id; -}; - -typedef struct _ProtocolListener { - ESummaryProtocolListener listener; - void *closure; -} ProtocolListener; - -static GHashTable *images_cache = NULL; - -static void -free_protocol (gpointer key, gpointer value, gpointer user_data) -{ - g_free (key); - g_free (value); -} - -static void -destroy (GtkObject *object) -{ - ESummary *summary; - ESummaryPrivate *priv; - - summary = E_SUMMARY (object); - priv = summary->priv; - - if (priv == NULL) { - return; - } - - all_summaries = g_list_remove (all_summaries, summary); - - if (priv->pending_reload_tag) { - gtk_timeout_remove (priv->pending_reload_tag); - priv->pending_reload_tag = 0; - } - - if (priv->queued_draw_idle_id != 0) { - g_source_remove (priv->queued_draw_idle_id); - priv->queued_draw_idle_id = 0; - } - - if (summary->mail) { - e_summary_mail_free (summary); - } - if (summary->calendar) { - e_summary_calendar_free (summary); - } - if (summary->rdf) { - e_summary_rdf_free (summary); - } - if (summary->weather) { - e_summary_weather_free (summary); - } - if (summary->tasks) { - e_summary_tasks_free (summary); - - } - - if (summary->priv->control) { - g_object_remove_weak_pointer (G_OBJECT (summary->priv->control), (void **) &summary->priv->control); - summary->priv->control = NULL; - } - - if (priv->tomorrow_timeout_id != 0) - g_source_remove (priv->tomorrow_timeout_id); - - if (priv->protocol_hash) { - g_hash_table_foreach (priv->protocol_hash, free_protocol, NULL); - g_hash_table_destroy (priv->protocol_hash); - } - - g_free (priv); - summary->priv = NULL; - - e_summary_parent_class->destroy (object); -} - -static gboolean -draw_idle_cb (void *data) -{ - ESummary *summary; - GString *string; - GtkHTMLStream *stream; - char *html; - char date[256], *date_utf; - time_t t; - - summary = E_SUMMARY (data); - - string = g_string_new (HTML_1); - t = time (NULL); - strftime (date, 255, _("%A, %B %e %Y"), localtime (&t)); - - date_utf = e_utf8_from_locale_string (date); - html = g_strdup_printf (HTML_2, date_utf); - g_free (date_utf); - g_string_append (string, html); - g_free (html); - g_string_append (string, HTML_3); - - /* Weather and RDF stuff here */ - html = e_summary_weather_get_html (summary); - if (html != NULL) { - g_string_append (string, html); - g_free (html); - } - - html = e_summary_rdf_get_html (summary); - if (html != NULL) { - g_string_append (string, html); - g_free (html); - } - - g_string_append (string, HTML_4); - - html = (char *) e_summary_mail_get_html (summary); - if (html != NULL) { - g_string_append (string, html); - } - - html = (char *) e_summary_calendar_get_html (summary); - if (html != NULL) { - g_string_append (string, html); - } - - html = (char *) e_summary_tasks_get_html (summary); - if (html != NULL) { - g_string_append (string, html); - } - - g_string_append (string, HTML_5); - - stream = gtk_html_begin (GTK_HTML (summary->priv->html)); - GTK_HTML (summary->priv->html)->engine->newPage = FALSE; - gtk_html_write (GTK_HTML (summary->priv->html), stream, string->str, strlen (string->str)); - gtk_html_end (GTK_HTML (summary->priv->html), stream, GTK_HTML_STREAM_OK); - - g_string_free (string, TRUE); - - summary->priv->queued_draw_idle_id = 0; - - return FALSE; -} - -void -e_summary_draw (ESummary *summary) -{ - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - if (summary->mail == NULL || summary->calendar == NULL - || summary->rdf == NULL || summary->weather == NULL - || summary->tasks == NULL) { - return; - } - - if (summary->priv->queued_draw_idle_id != 0) - return; - - summary->priv->queued_draw_idle_id = g_idle_add (draw_idle_cb, summary); -} - -void -e_summary_redraw_all (void) -{ - GList *p; - - for (p = all_summaries; p; p = p->next) { - e_summary_draw (E_SUMMARY (p->data)); - } -} - -static char * -e_pixmap_file (const char *filename) -{ - char *ret; - char *edir; - - if (g_file_exists (filename)) { - ret = g_strdup (filename); - - return ret; - } - - /* Try the evolution images dir */ - edir = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Try the evolution button images dir */ - edir = g_concat_dir_and_file (EVOLUTION_BUTTONSDIR, filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Fall back to the gnome_pixmap_file */ - ret = gnome_pixmap_file (filename); - if (ret == NULL) { - g_warning ("Could not find pixmap for %s", filename); - } - - return ret; -} - -struct _imgcache { - char *buffer; - int bufsize; -}; - -static void -e_summary_url_clicked (GtkHTML *html, - const char *url, - ESummary *summary) -{ - char *protocol, *protocol_end; - ProtocolListener *protocol_listener; - - protocol_end = strchr (url, ':'); - if (protocol_end == NULL) { - /* No url, let gnome work it out */ - gnome_url_show (url, NULL); - return; - } - - protocol = g_strndup (url, protocol_end - url); - - protocol_listener = g_hash_table_lookup (summary->priv->protocol_hash, - protocol); - g_free (protocol); - - if (protocol_listener == NULL) { - /* Again, let gnome work it out */ - gnome_url_show (url, NULL); - return; - } - - protocol_listener->listener (summary, url, protocol_listener->closure); -} - -static char * -e_read_file_with_length (const char *filename, - size_t *length) -{ - int fd; - struct stat stat_buf; - char *buf; - size_t bytes_read, size; - - g_return_val_if_fail (filename != NULL, NULL); - - fd = open (filename, O_RDONLY); - g_return_val_if_fail (fd != -1, NULL); - - fstat (fd, &stat_buf); - size = stat_buf.st_size; - buf = g_new (char, size + 1); - - bytes_read = 0; - while (bytes_read < size) { - ssize_t rc; - - rc = read (fd, buf + bytes_read, size - bytes_read); - if (rc < 0) { - if (errno != EINTR) { - close (fd); - g_free (buf); - - return NULL; - } - } else if (rc == 0) { - break; - } else { - bytes_read += rc; - } - } - - buf[bytes_read] = '\0'; - - if (length) { - *length = bytes_read; - } - - return buf; -} - -static void -e_summary_url_requested (GtkHTML *html, - const char *url, - GtkHTMLStream *stream, - ESummary *summary) -{ - char *filename; - struct _imgcache *img = NULL; - - if (strncasecmp (url, "file:", 5) == 0) { - url += 5; - filename = e_pixmap_file (url); - } else if (strchr (url, ':') >= strchr (url, '/')) { - filename = e_pixmap_file (url); - } else { - filename = g_strdup (url); - } - - if (filename == NULL) { - gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR); - return; - } - - if (images_cache != NULL) { - img = g_hash_table_lookup (images_cache, filename); - } else { - images_cache = g_hash_table_new (g_str_hash, g_str_equal); - } - - if (img == NULL) { - size_t length; - char *contents; - - contents = e_read_file_with_length (filename, &length); - if (contents == NULL) { - g_free (filename); - return; - } - - img = g_new (struct _imgcache, 1); - img->buffer = contents; - img->bufsize = length; - - g_hash_table_insert (images_cache, g_strdup (filename), img); - } - - gtk_html_stream_write (stream, img->buffer, img->bufsize); - gtk_html_stream_close (stream, GTK_HTML_STREAM_OK); - g_free (filename); -} - -static void -e_summary_evolution_protocol_listener (ESummary *summary, - const char *uri, - void *closure) -{ - e_summary_change_current_view (summary, uri); -} - -static void -e_summary_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = destroy; - - e_summary_parent_class = g_type_class_ref(PARENT_TYPE); -} - -static gboolean tomorrow_timeout (gpointer data); - -static void -reset_tomorrow_timeout (ESummary *summary) -{ - time_t now, day_end; - - now = time (NULL); - if (summary->tz) - day_end = time_day_end_with_zone (now, summary->tz); - else - day_end = time_day_end (now); - - /* (Yes, the number of milliseconds in a day is less than UINT_MAX) */ - summary->priv->tomorrow_timeout_id = - g_timeout_add ((day_end - now) * 1000, - tomorrow_timeout, summary); -} - -static gboolean -tomorrow_timeout (gpointer data) -{ - ESummary *summary = data; - - reset_tomorrow_timeout (summary); - e_summary_reconfigure (summary); - - return FALSE; -} - -#define DEFAULT_HTML "<html><head><title>Summary</title></head><body bgcolor=\"#ffffff\">%s</body></html>" - -static void -e_summary_init (ESummary *summary) -{ - GConfClient *gconf_client; - ESummaryPrivate *priv; - char *def; - - summary->priv = g_new (ESummaryPrivate, 1); - - priv = summary->priv; - - priv->control = NULL; - - priv->frozen = TRUE; - priv->pending_reload_tag = 0; - - priv->html_scroller = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - priv->html = gtk_html_new (); - gtk_html_set_editable (GTK_HTML (priv->html), FALSE); - gtk_html_set_default_content_type (GTK_HTML (priv->html), - "text/html; charset=utf-8"); - - def = g_strdup_printf (DEFAULT_HTML, _("Please wait...")); - gtk_html_load_from_string (GTK_HTML (priv->html), def, strlen (def)); - g_free (def); - - g_signal_connect (priv->html, "url-requested", G_CALLBACK (e_summary_url_requested), summary); - g_signal_connect (priv->html, "link-clicked", G_CALLBACK (e_summary_url_clicked), summary); - - gtk_container_add (GTK_CONTAINER (priv->html_scroller), priv->html); - gtk_widget_show_all (priv->html_scroller); - gtk_box_pack_start (GTK_BOX (summary), priv->html_scroller, - TRUE, TRUE, 0); - - priv->protocol_hash = NULL; - priv->connections = NULL; - - gconf_client = gconf_client_get_default (); - - summary->timezone = gconf_client_get_string (gconf_client, "/apps/evolution/calendar/display/timezone", NULL); - if (!summary->timezone || !summary->timezone[0]) { - g_free (summary->timezone); - summary->timezone = g_strdup ("UTC"); - } - summary->tz = icaltimezone_get_builtin_timezone (summary->timezone); - reset_tomorrow_timeout (summary); - - g_object_unref (gconf_client); - - priv->queued_draw_idle_id = 0; -} - -E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init, - e_summary_init, PARENT_TYPE); - -GtkWidget * -e_summary_new (ESummaryPrefs *prefs) -{ - ESummary *summary; - - summary = gtk_type_new (e_summary_get_type ()); - - /* Just get a pointer to the global preferences */ - summary->preferences = prefs; - - e_summary_add_protocol_listener (summary, "evolution", e_summary_evolution_protocol_listener, summary); - - e_summary_mail_init (summary); - e_summary_calendar_init (summary); - e_summary_tasks_init (summary); - e_summary_rdf_init (summary); - e_summary_weather_init (summary); - - all_summaries = g_list_prepend (all_summaries, summary); - return GTK_WIDGET (summary); -} - -BonoboControl * -e_summary_get_control (ESummary *summary) -{ - g_return_val_if_fail (summary != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_E_SUMMARY (summary), CORBA_OBJECT_NIL); - - return summary->priv->control; -} - -void -e_summary_set_control (ESummary *summary, BonoboControl *control) -{ - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - if (summary->priv->control) - g_object_remove_weak_pointer (G_OBJECT (summary->priv->control), (void **) &summary->priv->control); - - summary->priv->control = control; - - if (summary->priv->control) - g_object_add_weak_pointer (G_OBJECT (summary->priv->control), (void **) &summary->priv->control); -} - -static void -do_summary_print (ESummary *summary) -{ - GnomePrintContext *print_context; - GnomePrintJob *print_master; - GtkWidget *gpd; - GnomePrintConfig *config = NULL; - GtkWidget *preview_widget; - gboolean preview = FALSE; - - gpd = gnome_print_dialog_new (NULL, _("Print Summary"), GNOME_PRINT_DIALOG_COPIES); - - switch (gtk_dialog_run (GTK_DIALOG (gpd))) { - case GNOME_PRINT_DIALOG_RESPONSE_PRINT: - preview = FALSE; - break; - - case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW: - preview = TRUE; - break; - - default: - gtk_widget_destroy (gpd); - return; - } - - config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (gpd)); - - print_master = gnome_print_job_new (config); - - print_context = gnome_print_job_get_context (print_master); - gtk_html_print (GTK_HTML (summary->priv->html), print_context); - gnome_print_job_close (print_master); - - gtk_widget_destroy (gpd); - - if (preview) { - preview_widget = gnome_print_job_preview_new (print_master, _("Print Preview")); - gtk_widget_show (preview_widget); - } else { - int result = gnome_print_job_print (print_master); - - if (result == -1) - e_notice (gpd, GTK_MESSAGE_ERROR, _("Printing of Summary failed")); - } - - g_object_unref (print_master); -} - -void -e_summary_print (BonoboUIComponent *component, - gpointer userdata, - const char *cname) -{ - ESummary *summary = userdata; - - do_summary_print (summary); -} - -void -e_summary_add_protocol_listener (ESummary *summary, - const char *protocol, - ESummaryProtocolListener listener, - void *closure) -{ - ProtocolListener *old; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - g_return_if_fail (protocol != NULL); - g_return_if_fail (listener != NULL); - - if (summary->priv->protocol_hash == NULL) { - summary->priv->protocol_hash = g_hash_table_new (g_str_hash, - g_str_equal); - old = NULL; - } else { - old = g_hash_table_lookup (summary->priv->protocol_hash, protocol); - } - - if (old != NULL) { - return; - } - - old = g_new (ProtocolListener, 1); - old->listener = listener; - old->closure = closure; - - g_hash_table_insert (summary->priv->protocol_hash, g_strdup (protocol), old); -} - -static GNOME_Evolution_ShellView -retrieve_shell_view_interface (BonoboControl *control) -{ - Bonobo_ControlFrame control_frame; - GNOME_Evolution_ShellView shell_view_interface; - CORBA_Environment ev; - - control_frame = bonobo_control_get_control_frame (control, NULL); - - if (control_frame == NULL) - return CORBA_OBJECT_NIL; - - CORBA_exception_init (&ev); - shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, - "IDL:GNOME/Evolution/ShellView:1.0", - &ev); - - if (BONOBO_EX (&ev)) - shell_view_interface = CORBA_OBJECT_NIL; - - CORBA_exception_free (&ev); - - return shell_view_interface; -} - -void -e_summary_change_current_view (ESummary *summary, - const char *uri) -{ - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - svi = retrieve_shell_view_interface (summary->priv->control); - if (svi == CORBA_OBJECT_NIL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_changeCurrentView (svi, uri, &ev); - CORBA_exception_free (&ev); - - bonobo_object_release_unref (svi, NULL); -} - -void -e_summary_set_message (ESummary *summary, - const char *message, - gboolean busy) -{ - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - svi = retrieve_shell_view_interface (summary->priv->control); - if (svi == CORBA_OBJECT_NIL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_setMessage (svi, message ? message : "", busy, &ev); - CORBA_exception_free (&ev); - - bonobo_object_release_unref (svi, NULL); -} - -void -e_summary_unset_message (ESummary *summary) -{ - GNOME_Evolution_ShellView svi; - CORBA_Environment ev; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - - svi = retrieve_shell_view_interface (summary->priv->control); - if (svi == CORBA_OBJECT_NIL) - return; - - CORBA_exception_init (&ev); - GNOME_Evolution_ShellView_unsetMessage (svi, &ev); - CORBA_exception_free (&ev); - - bonobo_object_release_unref (svi, NULL); -} - -void -e_summary_reconfigure (ESummary *summary) -{ - if (summary->rdf != NULL) { - e_summary_rdf_reconfigure (summary); - } - - if (summary->weather != NULL) { - e_summary_weather_reconfigure (summary); - } - - if (summary->calendar != NULL) { - e_summary_calendar_reconfigure (summary); - } - - if (summary->tasks != NULL) { - e_summary_tasks_reconfigure (summary); - } - - e_summary_draw (summary); -} - -void -e_summary_reconfigure_all (void) -{ - GList *p; - - /* This is here, because it only needs to be done once for all summaries */ - e_summary_mail_reconfigure (); - - for (p = all_summaries; p; p = p->next) { - e_summary_reconfigure (E_SUMMARY (p->data)); - } -} - -static gint -e_summary_reload_timeout (gpointer closure) -{ - ESummary *summary = closure; - - if (summary->rdf != NULL) - e_summary_rdf_update (summary); - - if (summary->weather != NULL) - e_summary_weather_update (summary); - - if (summary->calendar != NULL) - e_summary_calendar_reconfigure (summary); - - if (summary->tasks != NULL) - e_summary_tasks_reconfigure (summary); - - summary->priv->pending_reload_tag = 0; - - return FALSE; -} - -void -e_summary_reload (BonoboUIComponent *component, - gpointer userdata, - const char *cname) -{ - ESummary *summary = userdata; - - /* - This is an evil hack to work around a bug in gnome-vfs: - gnome-vfs seems to not properly lock partially-constructed - objects, so if you gnome_vfs_async_open and then immediately - gnome_vfs_async_cancel, it is possible to start to destroy - an object before it is totally constructed. Hilarity ensures. - - This is an evil and stupid hack, but it slows down our reload - requests enough the gnome-vfs should be able to keep up. And - given that these are not instantaneous operations to begin - with, the users should be none the wiser. -JT - */ - - if (summary->priv->pending_reload_tag) { - gtk_timeout_remove (summary->priv->pending_reload_tag); - } - - summary->priv->pending_reload_tag = - gtk_timeout_add (80, e_summary_reload_timeout, summary); -} - -int -e_summary_count_connections (ESummary *summary) -{ - GList *p; - int count = 0; - - g_return_val_if_fail (IS_E_SUMMARY (summary), 0); - - for (p = summary->priv->connections; p; p = p->next) { - ESummaryConnection *c; - - c = p->data; - count += c->count (summary, c->closure); - } - - return count; -} - -GList * -e_summary_add_connections (ESummary *summary) -{ - GList *p; - GList *connections = NULL; - - g_return_val_if_fail (IS_E_SUMMARY (summary), NULL); - - for (p = summary->priv->connections; p; p = p->next) { - ESummaryConnection *c; - GList *r; - - c = p->data; - r = c->add (summary, c->closure); - - connections = g_list_concat (connections, r); - } - - return connections; -} - -void -e_summary_set_online (ESummary *summary, - GNOME_Evolution_OfflineProgressListener progress, - gboolean online, - ESummaryOnlineCallback callback, - void *closure) -{ - GList *p; - - g_return_if_fail (IS_E_SUMMARY (summary)); - - for (p = summary->priv->connections; p; p = p->next) { - ESummaryConnection *c; - - c = p->data; - c->callback = callback; - c->callback_closure = closure; - - c->set_online (summary, progress, online, c->closure); - - if (callback != NULL) - callback (summary, closure); - } -} - -void -e_summary_add_online_connection (ESummary *summary, - ESummaryConnection *connection) -{ - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - g_return_if_fail (connection != NULL); - - summary->priv->connections = g_list_prepend (summary->priv->connections, - connection); -} - -void -e_summary_remove_online_connection (ESummary *summary, - ESummaryConnection *connection) -{ - GList *p; - - g_return_if_fail (summary != NULL); - g_return_if_fail (IS_E_SUMMARY (summary)); - g_return_if_fail (connection != NULL); - - p = g_list_find (summary->priv->connections, connection); - g_return_if_fail (p != NULL); - - summary->priv->connections = g_list_remove_link (summary->priv->connections, p); - g_list_free (p); -} diff --git a/my-evolution/e-summary.h b/my-evolution/e-summary.h deleted file mode 100644 index 05bc6fb9bb..0000000000 --- a/my-evolution/e-summary.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes - */ - -#ifndef _E_SUMMARY_H__ -#define _E_SUMMARY_H__ - -#include <gtk/gtkvbox.h> -#include <bonobo/bonobo-ui-component.h> -#include <bonobo/bonobo-control.h> -#include "e-summary-type.h" -#include "e-summary-mail.h" -#include "e-summary-calendar.h" -#include "e-summary-rdf.h" -#include "e-summary-weather.h" -#include "e-summary-tasks.h" - -#include <libical/ical.h> - -#include <Evolution.h> - -#define E_SUMMARY_TYPE (e_summary_get_type ()) -#define E_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_SUMMARY_TYPE, ESummary)) -#define E_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE, ESummaryClass)) -#define IS_E_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_SUMMARY_TYPE)) -#define IS_E_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TYPE)) - -typedef struct _ESummaryPrivate ESummaryPrivate; -typedef struct _ESummaryClass ESummaryClass; -typedef struct _ESummaryPrefsFolder ESummaryPrefsFolder; -typedef struct _ESummaryPrefs ESummaryPrefs; -typedef struct _ESummaryConnection ESummaryConnection; -typedef struct _ESummaryConnectionData ESummaryConnectionData; - -typedef void (* ESummaryProtocolListener) (ESummary *summary, - const char *uri, - void *closure); -typedef int (* ESummaryConnectionCount) (ESummary *summary, - void *closure); -typedef GList *(* ESummaryConnectionAdd) (ESummary *summary, - void *closure); -typedef void (* ESummaryConnectionSetOnline) (ESummary *summary, - GNOME_Evolution_OfflineProgressListener progress, - gboolean online, - void *closure); -typedef void (*ESummaryOnlineCallback) (ESummary *summary, - void *closure); - -struct _ESummaryConnection { - ESummaryConnectionCount count; - ESummaryConnectionAdd add; - ESummaryConnectionSetOnline set_online; - ESummaryOnlineCallback callback; - - void *closure; - void *callback_closure; -}; - -struct _ESummaryConnectionData { - char *hostname; - char *type; -}; - -struct _ESummaryPrefsFolder { - char *physical_uri; - char *evolution_uri; -}; - -struct _ESummaryPrefs { - - /* Mail */ - GSList *display_folders; /* List of ESummaryPrefsFolder */ - gboolean show_full_path; - - /* RDF */ - GSList *rdf_urls; - int rdf_refresh_time; - int limit; - - /* Weather */ - GSList *stations; - ESummaryWeatherUnits units; - int weather_refresh_time; - - /* Schedule */ - ESummaryCalendarDays days; - ESummaryCalendarNumTasks show_tasks; -}; - -struct _ESummary { - GtkVBox parent; - - ESummaryPrefs *preferences; - - ESummaryMail *mail; - ESummaryCalendar *calendar; - ESummaryRDF *rdf; - ESummaryWeather *weather; - ESummaryTasks *tasks; - - ESummaryPrivate *priv; - - gboolean online; - - char *timezone; - icaltimezone *tz; -}; - -struct _ESummaryClass { - GtkVBoxClass parent_class; -}; - - -GtkType e_summary_get_type (void); -GtkWidget *e_summary_new (ESummaryPrefs *prefs); - -BonoboControl *e_summary_get_control (ESummary *summary); -void e_summary_set_control (ESummary *summary, - BonoboControl *control); - -void e_summary_print (BonoboUIComponent *component, - gpointer user_data, - const char *cname); -void e_summary_reload (BonoboUIComponent *component, - gpointer user_data, - const char *cname); -void e_summary_draw (ESummary *summary); -void e_summary_redraw_all (void); - -void e_summary_change_current_view (ESummary *summary, - const char *uri); - -void e_summary_set_message (ESummary *summary, - const char *message, - gboolean busy); -void e_summary_unset_message (ESummary *summary); - -void e_summary_add_protocol_listener (ESummary *summary, - const char *protocol, - ESummaryProtocolListener listener, - void *closure); - -void e_summary_reconfigure (ESummary *summary); -void e_summary_reconfigure_all (void); - -int e_summary_count_connections (ESummary *summary); -GList *e_summary_add_connections (ESummary *summary); -void e_summary_set_online (ESummary *summary, - GNOME_Evolution_OfflineProgressListener listener, - gboolean online, - ESummaryOnlineCallback callback, - void *closure); -void e_summary_add_online_connection (ESummary *summary, - ESummaryConnection *connection); -void e_summary_remove_online_connection (ESummary *summary, - ESummaryConnection *connection); - -void e_summary_freeze (ESummary *summary); -void e_summary_thaw (ESummary *summary); -#endif diff --git a/my-evolution/metar.c b/my-evolution/metar.c deleted file mode 100644 index c49d651954..0000000000 --- a/my-evolution/metar.c +++ /dev/null @@ -1,1017 +0,0 @@ -/* - * metar.c: Metar decoding routines. - * - * Originally written by Papadimitriou Spiros <spapadim+@cs.cmu.ed> - */ - -#include <config.h> -#include <glib.h> - -#include <unistd.h> -#include <stdlib.h> -#include <regex.h> -#include <math.h> - -#include <libgnome/gnome-i18n.h> - -#include <string.h> - -#include "e-summary.h" -#include "weather.h" - -#include "metar.h" - -static regex_t metar_re[RE_NUM]; - -/* Unit conversions and names */ - -#define TEMP_F_TO_C(f) (((f) - 32.0) * 0.555556) -#define TEMP_C_TO_F(c) (((c) * 1.8) + 32.0) -#define TEMP_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _(" F") : _(" C")) - -#define WINDSPEED_KNOTS_TO_KPH(knots) ((knots) * 1.851965) -#define WINDSPEED_KPH_TO_KNOTS(kph) ((kph) * 0.539967) -#define WINDSPEED_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("knots") : _("kph")) - -#define PRESSURE_INCH_TO_MM(inch) ((inch) * 25.4) -#define PRESSURE_MM_TO_INCH(mm) ((mm) * 0.03937) -#define PRESSURE_MBAR_TO_INCH(mbar) ((mbar) * 0.02963742) -#define PRESSURE_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("inHg") : _("mmHg")) -#define VISIBILITY_SM_TO_KM(sm) ((sm) * 1.609344) -#define VISIBILITY_KM_TO_SM(km) ((km) * 0.621371) -#define VISIBILITY_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("miles") : _("kilometers")) - -static const char *sky_str[] = { - N_("Clear sky"), - N_("Broken clouds"), - N_("Scattered clouds"), - N_("Few clouds"), - N_("Overcast") -}; - -const char * -weather_sky_string (Weather *w) -{ - if (w->sky < 0 || - w->sky >= (sizeof (sky_str) / sizeof (char *))) { - return _("Invalid"); - } - - return _(sky_str[(int)w->sky]); -} - -static const char *wind_direction_str[] = { - N_("Variable"), - N_("North"), N_("North - NorthEast"), N_("Northeast"), N_("East - NorthEast"), - N_("East"), N_("East - Southeast"), N_("Southeast"), N_("South - Southeast"), - N_("South"), N_("South - Southwest"), N_("Southwest"), N_("West - Southwest"), - N_("West"), N_("West - Northwest"), N_("Northwest"), N_("North - Northwest")}; - -const char * -weather_wind_direction_string (Weather *w) -{ - if (w->wind < 0 || - w->wind >= (sizeof (wind_direction_str) / sizeof (char *))) { - return _("Invalid"); - } - - return _(wind_direction_str[(int)w->wind]); -} - -/* - * Even though tedious, I switched to a 2D array for weather condition - * strings, in order to facilitate internationalization, esp. for languages - * with genders. - * - * I tried to come up with logical names for most phenomena, but I'm no - * meteorologist, so there will undoubtedly be some stupid mistakes. - * However, combinations that did not seem plausible (eg. I cannot imagine - * what a "light tornado" may be like ;-) were filled in with "??". If this - * ever comes up in the weather conditions field, let me know... - */ - -/* - * Note, magic numbers, when you change the size here, make sure to change - * the below function so that new values are recognized - */ -static const gchar *conditions_str[24][13] = { -/* NONE - VICINITY - LIGHT - MODERATE - HEAVY - SHALLOW - PATCHES - PARTIAL - THUNDERSTORM - BLOWING - SHOWERS - DRIFTING - FREEZING -*/ -/* NONE */ { - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", -}, -/* DRIZZLE */ { - N_("Drizzle"), - N_("Drizzle in the vicinity"), - N_("Light drizzle"), - N_("Moderate drizzle"), - N_("Heavy drizzle"), - N_("Shallow drizzle"), - N_("Patches of drizzle"), - N_("Partial drizzle"), - N_("Thunderstorm"), - N_("Windy drizzle"), - N_("Showers"), - N_("Drifting drizzle"), - N_("Freezing drizzle") -}, -/* RAIN */ { - N_("Rain"), - N_("Rain in the vicinity"), - N_("Light rain"), - N_("Moderate rain"), - N_("Heavy rain"), - N_("Shallow rain"), - N_("Patches of rain"), - N_("Partial rainfall"), - N_("Thunderstorm"), - N_("Blowing rainfall"), - N_("Rain showers"), - N_("Drifting rain"), - N_("Freezing rain") -}, -/* SNOW */ { - N_("Snow"), - N_("Snow in the vicinity"), - N_("Light snow"), - N_("Moderate snow"), - N_("Heavy snow"), - N_("Shallow snow"), - N_("Patches of snow"), - N_("Partial snowfall"), - N_("Snowstorm"), - N_("Blowing snowfall"), - N_("Snow showers"), - N_("Drifting snow"), - N_("Freezing snow") -}, -/* SNOW_GRAINS */ { - N_("Snow grains"), - N_("Snow grains in the vicinity"), - N_("Light snow grains"), - N_("Moderate snow grains"), - N_("Heavy snow grains"), - N_("Shallow snow grains"), - N_("Patches of snow grains"), - N_("Partial snow grains"), - N_("Snowstorm"), - N_("Blowing snow grains"), - N_("Snow grain showers"), - N_("Drifting snow grains"), - N_("Freezing snow grains") -}, -/* ICE_CRYSTALS */ { - N_("Ice crystals"), - N_("Ice crystals in the vicinity"), - N_("Few ice crystals"), - N_("Moderate ice crystals"), - N_("Heavy ice crystals"), - "??", - N_("Patches of ice crystals"), - N_("Partial ice crystals"), - N_("Ice crystal storm"), - N_("Blowing ice crystals"), - N_("Showers of ice crystals"), - N_("Drifting ice crystals"), - N_("Freezing ice crystals") -}, -/* ICE_PELLETS */ { - N_("Ice pellets"), - N_("Ice pellets in the vicinity"), - N_("Few ice pellets"), - N_("Moderate ice pellets"), - N_("Heavy ice pellets"), - N_("Shallow ice pellets"), - N_("Patches of ice pellets"), - N_("Partial ice pellets"), - N_("Ice pellet storm"), - N_("Blowing ice pellets"), - N_("Showers of ice pellets"), - N_("Drifting ice pellets"), - N_("Freezing ice pellets") -}, -/* HAIL */ { - N_("Hail"), - N_("Hail in the vicinity"), - N_("Light hail"), - N_("Moderate hail"), - N_("Heavy hail"), - N_("Shallow hail"), - N_("Patches of hail"), - N_("Partial hail"), - N_("Hailstorm"), - N_("Blowing hail"), - N_("Hail showers"), - N_("Drifting hail"), - N_("Freezing hail") -}, -/* SMALL_HAIL */ { - N_("Small hail"), - N_("Small hail in the vicinity"), - N_("Light hail"), - N_("Moderate small hail"), - N_("Heavy small hail"), - N_("Shallow small hail"), - N_("Patches of small hail"), - N_("Partial small hail"), - N_("Small hailstorm"), - N_("Blowing small hail"), - N_("Showers of small hail"), - N_("Drifting small hail"), - N_("Freezing small hail") -}, -/* PRECIPITATION */ { - N_("Unknown precipitation"), - N_("Precipitation in the vicinity"), - N_("Light precipitation"), - N_("Moderate precipitation"), - N_("Heavy precipitation"), - N_("Shallow precipitation"), - N_("Patches of precipitation"), - N_("Partial precipitation"), - N_("Unknown thunderstorm"), - N_("Blowing precipitation"), - N_("Showers, type unknown"), - N_("Drifting precipitation"), - N_("Freezing precipitation") -}, -/* MIST */ { - N_("Mist"), - N_("Mist in the vicinity"), - N_("Light mist"), - N_("Moderate mist"), - N_("Thick mist"), - N_("Shallow mist"), - N_("Patches of mist"), - N_("Partial mist"), - "??", - N_("Mist with wind"), - "??", - N_("Drifting mist"), - N_("Freezing mist") -}, -/* FOG */ { - N_("Fog"), - N_("Fog in the vicinity"), - N_("Light fog"), - N_("Moderate fog"), - N_("Thick fog"), - N_("Shallow fog"), - N_("Patches of fog"), - N_("Partial fog"), - "??", - N_("Fog with wind"), - "??", - N_("Drifting fog"), - N_("Freezing fog") -}, -/* SMOKE */ { - N_("Smoke"), - N_("Smoke in the vicinity"), - N_("Thin smoke"), - N_("Moderate smoke"), - N_("Thick smoke"), - N_("Shallow smoke"), - N_("Patches of smoke"), - N_("Partial smoke"), - N_("Thunderous smoke"), - N_("Smoke with wind"), - "??", - N_("Drifting smoke"), - "??" -}, -/* VOLCANIC_ASH */ { - N_("Volcanic ash"), - N_("Volcanic ash in the vicinity"), - "??", - N_("Moderate volcanic ash"), - N_("Thick volcanic ash"), - N_("Shallow volcanic ash"), - N_("Patches of volcanic ash"), - N_("Partial volcanic ash"), - N_("Thunderous volcanic ash"), - N_("Blowing volcanic ash"), - N_("Showers of volcanic ash"), - N_("Drifting volcanic ash"), - N_("Freezing volcanic ash") -}, -/* SAND */ { - N_("Sand"), - N_("Sand in the vicinity"), - N_("Light sand"), - N_("Moderate sand"), - N_("Heavy sand"), - "??", - N_("Patches of sand"), - N_("Partial sand"), - "??", - N_("Blowing sand"), - "", - N_("Drifting sand"), - "??" -}, -/* HAZE */ { - N_("Haze"), - N_("Haze in the vicinity"), - N_("Light haze"), - N_("Moderate haze"), - N_("Thick haze"), - N_("Shallow haze"), - N_("Patches of haze"), - N_("Partial haze"), - "??", - N_("Haze with wind"), - "??", - N_("Drifting haze"), - N_("Freezing haze") -}, -/* SPRAY */ { - N_("Spray"), - N_("Spray in the vicinity"), - N_("Light spray"), - N_("Moderate spray"), - N_("Heavy spray"), - N_("Shallow spray"), - N_("Patches of spray"), - N_("Partial spray"), - "??", - N_("Blowing spray"), - "??", - N_("Drifting spray"), - N_("Freezing spray") -}, -/* DUST */ { - N_("Dust"), - N_("Dust in the vicinity"), - N_("Light dust"), - N_("Moderate dust"), - N_("Heavy dust"), - "??", - N_("Patches of dust"), - N_("Partial dust"), - "??", - N_("Blowing dust"), - "??", - N_("Drifting dust"), - "??" -}, -/* SQUALL */ { - N_("Squall"), - N_("Squall in the vicinity"), - N_("Light squall"), - N_("Moderate squall"), - N_("Heavy squall"), - "??", - "??", - N_("Partial squall"), - N_("Thunderous squall"), - N_("Blowing squall"), - "??", - N_("Drifting squall"), - N_("Freezing squall") -}, -/* SANDSTORM */ { - N_("Sandstorm"), - N_("Sandstorm in the vicinity"), - N_("Light standstorm"), - N_("Moderate sandstorm"), - N_("Heavy sandstorm"), - N_("Shallow sandstorm"), - "??", - N_("Partial sandstorm"), - N_("Thunderous sandstorm"), - N_("Blowing sandstorm"), - "??", - N_("Drifting sandstorm"), - N_("Freezing sandstorm") -}, -/* DUSTSTORM */ { - N_("Duststorm"), - N_("Duststorm in the vicinity"), - N_("Light duststorm"), - N_("Moderate duststorm"), - N_("Heavy duststorm"), - N_("Shallow duststorm"), - "??", - N_("Partial duststorm"), - N_("Thunderous duststorm"), - N_("Blowing duststorm"), - "??", - N_("Drifting duststorm"), - N_("Freezing duststorm") -}, -/* FUNNEL_CLOUD */ { - N_("Funnel cloud"), - N_("Funnel cloud in the vicinity"), - N_("Light funnel cloud"), - N_("Moderate funnel cloud"), - N_("Thick funnel cloud"), - N_("Shallow funnel cloud"), - N_("Patches of funnel clouds"), - N_("Partial funnel clouds"), - "??", - N_("Funnel cloud w/ wind"), - "??", - N_("Drifting funnel cloud"), - "??" -}, -/* TORNADO */ { - N_("Tornado"), - N_("Tornado in the vicinity"), - "??", - N_("Moderate tornado"), - N_("Raging tornado"), - "??", - "??", - N_("Partial tornado"), - N_("Thunderous tornado"), - N_("Tornado"), - "??", - N_("Drifting tornado"), - N_("Freezing tornado") -}, -/* DUST_WHIRLS */ { - N_("Dust whirls"), - N_("Dust whirls in the vicinity"), - N_("Light dust whirls"), - N_("Moderate dust whirls"), - N_("Heavy dust whirls"), - N_("Shallow dust whirls"), - N_("Patches of dust whirls"), - N_("Partial dust whirls"), - "??", - N_("Blowing dust whirls"), - "??", - N_("Drifting dust whirls"), - "??" -} -}; - -const char * -weather_conditions_string (Weather *w) -{ - if (!w->cond.significant) { - return " "; - } else { - if (w->cond.phenomenon >= 0 && - w->cond.phenomenon < 24 && - w->cond.qualifier >= 0 && - w->cond.qualifier < 13) { - return _(conditions_str[(int)w->cond.phenomenon][(int)w->cond.qualifier]); - } else { - return _("Invalid"); - } - } -} - -char * -weather_temp_string (Weather *w) -{ - char *temp; - ESummaryWeatherUnits units; - - if (w->summary->preferences == NULL) { - units = UNITS_METRIC; - } else { - units = w->summary->preferences->units; - } - - temp = g_strdup_printf ("%.1f%s", w->temp, TEMP_UNIT_STR (units)); - return temp; -} - -void -metar_init_re (void) -{ - static gboolean initialized = FALSE; - if (initialized) - return; - initialized = TRUE; - - regcomp(&metar_re[TIME_RE], TIME_RE_STR, REG_EXTENDED); - regcomp(&metar_re[WIND_RE], WIND_RE_STR, REG_EXTENDED); - regcomp(&metar_re[VIS_RE], VIS_RE_STR, REG_EXTENDED); - regcomp(&metar_re[CLOUD_RE], CLOUD_RE_STR, REG_EXTENDED); - regcomp(&metar_re[TEMP_RE], TEMP_RE_STR, REG_EXTENDED); - regcomp(&metar_re[PRES_RE], PRES_RE_STR, REG_EXTENDED); - regcomp(&metar_re[COND_RE], COND_RE_STR, REG_EXTENDED); -} - -static inline gint -days_in_month (gint month, - gint year) -{ - if (month == 1) - return ((year % 4) == 0) ? 29 : 28; - else if (((month <= 6) && (month % 2 == 0)) || ((month >=7) && (month % 2 != 0))) - return 31; - else - return 30; -} - -/* FIX - there *must* be a simpler, less stupid way to do this!... */ -static time_t -make_time (gint date, - gint hour, - gint min) -{ - struct tm *tm; - struct tm tms; - time_t now; - gint loc_mday, loc_hour, gm_mday, gm_hour; - gint hour_diff; /* local time = UTC - hour_diff */ - gint is_dst; - - now = time(NULL); - - tm = gmtime(&now); - gm_mday = tm->tm_mday; - gm_hour = tm->tm_hour; - memcpy(&tms, tm, sizeof(struct tm)); - - tm = localtime(&now); - loc_mday = tm->tm_mday; - loc_hour = tm->tm_hour; - is_dst = tm->tm_isdst; - - /* Estimate timezone */ - if (gm_mday == loc_mday) - hour_diff = gm_hour - loc_hour; - else - if ((gm_mday == loc_mday + 1) || ((gm_mday == 1) && (loc_mday >= 27))) - hour_diff = gm_hour + (24 - loc_hour); - else - hour_diff = -((24 - gm_hour) + loc_hour); - - /* Make time */ - tms.tm_min = min; - tms.tm_sec = 0; - tms.tm_hour = hour - hour_diff; - tms.tm_mday = date; - tms.tm_isdst = is_dst; - if (tms.tm_hour < 0) { - tms.tm_hour += 24; - --tms.tm_mday; - if (tms.tm_mday < 1) { - --tms.tm_mon; - if (tms.tm_mon < 0) { - tms.tm_mon = 11; - --tms.tm_year; - } - tms.tm_mday = days_in_month(tms.tm_mon, tms.tm_year + 1900); - } - } else if (tms.tm_hour > 23) { - tms.tm_hour -= 24; - ++tms.tm_mday; - if (tms.tm_mday > days_in_month(tms.tm_mon, tms.tm_year + 1900)) { - ++tms.tm_mon; - if (tms.tm_mon > 11) { - tms.tm_mon = 0; - ++tms.tm_year; - } - tms.tm_mday = 1; - } - } - - return mktime(&tms); -} - -gboolean -metar_tok_time (char *token, - Weather *w) -{ - char sday[3], shr[3], smin[3]; - int day, hour, min; - - if (regexec (&metar_re[TIME_RE], token, 0, NULL, 0) == REG_NOMATCH) { - return FALSE; - } - - strncpy(sday, token, 2); - sday[2] = 0; - day = atoi (sday); - - strncpy (shr, token + 2, 2); - shr[2] = 0; - hour = atoi (shr); - - strncpy (smin, token + 4, 2); - smin[2] = 0; - min = atoi (smin); - - w->update = make_time (day, hour, min); - - return TRUE; -} - -#define CONST_DIGITS "0123456789" - -gboolean -metar_tok_wind (gchar *tokp, - Weather *w) -{ - char sdir[4], sspd[4], sgust[4]; - int dir, spd, gust = -1; - char *gustp; - - if (regexec(&metar_re[WIND_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - strncpy(sdir, tokp, 3); - sdir[3] = 0; - dir = (!strcmp(sdir, "VRB")) ? -1 : atoi(sdir); - - memset(sspd, 0, sizeof(sspd)); - strncpy(sspd, tokp+3, strspn(tokp+3, CONST_DIGITS)); - spd = atoi(sspd); - - gustp = strchr(tokp, 'G'); - if (gustp) { - memset(sgust, 0, sizeof(sgust)); - strncpy(sgust, gustp+1, strspn(gustp+1, CONST_DIGITS)); - gust = atoi(sgust); - } - - if ((349 <= dir) && (dir <= 11)) - w->wind = WIND_N; - else if ((12 <= dir) && (dir <= 33)) - w->wind = WIND_NNE; - else if ((34 <= dir) && (dir <= 56)) - w->wind = WIND_NE; - else if ((57 <= dir) && (dir <= 78)) - w->wind = WIND_ENE; - else if ((79 <= dir) && (dir <= 101)) - w->wind = WIND_E; - else if ((102 <= dir) && (dir <= 123)) - w->wind = WIND_ESE; - else if ((124 <= dir) && (dir <= 146)) - w->wind = WIND_SE; - else if ((147 <= dir) && (dir <= 168)) - w->wind = WIND_SSE; - else if ((169 <= dir) && (dir <= 191)) - w->wind = WIND_S; - else if ((192 <= dir) && (dir <= 213)) - w->wind = WIND_SSW; - else if ((214 <= dir) && (dir <= 236)) - w->wind = WIND_SW; - else if ((247 <= dir) && (dir <= 258)) - w->wind = WIND_WSW; - else if ((259 <= dir) && (dir <= 281)) - w->wind = WIND_W; - else if ((282 <= dir) && (dir <= 303)) - w->wind = WIND_WNW; - else if ((304 <= dir) && (dir <= 326)) - w->wind = WIND_NW; - else if ((327 <= dir) && (dir <= 348)) - w->wind = WIND_NNW; - - w->windspeed = (ESummaryWeatherWindSpeed)spd; - - return TRUE; -} - -gboolean -metar_tok_vis (gchar *tokp, - Weather *w) -{ - char *pfrac, *pend; - char sval[4]; - int val; - - if (regexec(&metar_re[VIS_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - pfrac = strchr(tokp, '/'); - pend = strstr(tokp, "SM"); - memset(sval, 0, sizeof(sval)); - - if (pfrac) { - strncpy(sval, pfrac + 1, pend - pfrac - 1); - val = atoi(sval); - w->visibility = (*tokp == 'M') ? 0.001 : (1.0 / ((ESummaryWeatherVisibility)val)); - } else { - strncpy(sval, tokp, pend - tokp); - val = atoi(sval); - w->visibility = (ESummaryWeatherVisibility)val; - } - - return TRUE; -} - -gboolean -metar_tok_cloud (gchar *tokp, - Weather *w) -{ - char stype[4], salt[4]; - int alt = -1; - - if (regexec(&metar_re[CLOUD_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - strncpy(stype, tokp, 3); - stype[3] = 0; - if (strlen(tokp) == 6) { - strncpy(salt, tokp+3, 3); - salt[3] = 0; - alt = atoi(salt); /* Altitude - currently unused */ - } - - if (!strcmp(stype, "CLR")) { - w->sky = SKY_CLEAR; - } else if (!strcmp(stype, "BKN")) { - w->sky = SKY_BROKEN; - } else if (!strcmp(stype, "SCT")) { - w->sky = SKY_SCATTERED; - } else if (!strcmp(stype, "FEW")) { - w->sky = SKY_FEW; - } else if (!strcmp(stype, "OVC")) { - w->sky = SKY_OVERCAST; - } - - return TRUE; -} - -gboolean -metar_tok_pres (gchar *tokp, - Weather *w) -{ - if (regexec(&metar_re[PRES_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - if (*tokp == 'A') { - char sintg[3], sfract[3]; - int intg, fract; - - strncpy(sintg, tokp+1, 2); - sintg[2] = 0; - intg = atoi(sintg); - - strncpy(sfract, tokp+3, 2); - sfract[2] = 0; - fract = atoi(sfract); - - w->pressure = (ESummaryWeatherPressure)intg + (((ESummaryWeatherPressure)fract)/100.0); - } else { /* *tokp == 'Q' */ - gchar spres[5]; - gint pres; - - strncpy(spres, tokp+1, 4); - spres[4] = 0; - pres = atoi(spres); - - w->pressure = PRESSURE_MBAR_TO_INCH((ESummaryWeatherPressure)pres); - } - - return TRUE; -} - -/* Relative humidity computation - thanks to <Olof.Oberg@modopaper.modogroup.com> */ - - -static inline gint -calc_humidity(gdouble temp, - gdouble dewp, - ESummaryWeatherUnits units) -{ - gdouble esat, esurf; - - if (units == UNITS_IMPERIAL) { - temp = TEMP_F_TO_C(temp); - dewp = TEMP_F_TO_C(dewp); - } - - esat = 6.11 * pow(10.0, (7.5 * temp) / (237.7 + temp)); - esurf = 6.11 * pow(10.0, (7.5 * dewp) / (237.7 + dewp)); - - return (gint)((esurf/esat) * 100.0); -} - -gboolean -metar_tok_temp (gchar *tokp, - Weather *w) -{ - ESummaryWeatherUnits units; - gchar *ptemp, *pdew, *psep; - - if (regexec(&metar_re[TEMP_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - if (w->summary->preferences == NULL) { - units = UNITS_METRIC; - } else { - units = w->summary->preferences->units; - } - - psep = strchr(tokp, '/'); - *psep = 0; - ptemp = tokp; - pdew = psep + 1; - - if (units == UNITS_IMPERIAL) { - w->temp = (*ptemp == 'M') ? TEMP_C_TO_F(-atoi(ptemp+1)) : - TEMP_C_TO_F(atoi(ptemp)); - w->dew = (*pdew == 'M') ? TEMP_C_TO_F(-atoi(pdew+1)) : - TEMP_C_TO_F(atoi(pdew)); - } else { - w->temp = (*ptemp == 'M') ? -atoi(ptemp+1) : atoi(ptemp); - w->dew = (*pdew == 'M') ? -atoi(pdew+1) : atoi (pdew); - } - - w->humidity = calc_humidity(w->temp, w->dew, units); - return TRUE; -} - -gboolean -metar_tok_cond (gchar *tokp, - Weather *w) -{ - char squal[3], sphen[4]; - char *pphen; - - if (regexec(&metar_re[COND_RE], tokp, 0, NULL, 0) == REG_NOMATCH) - return FALSE; - - if ((strlen(tokp) > 3) && ((*tokp == '+') || (*tokp == '-'))) - ++tokp; /* FIX */ - - if ((*tokp == '+') || (*tokp == '-')) - pphen = tokp + 1; - else if (strlen(tokp) < 4) - pphen = tokp; - else - pphen = tokp + 2; - - memset(squal, 0, sizeof(squal)); - strncpy(squal, tokp, pphen - tokp); - squal[pphen - tokp] = 0; - - memset(sphen, 0, sizeof(sphen)); - strncpy(sphen, pphen, sizeof(sphen)); - sphen[sizeof(sphen)-1] = '\0'; - - /* Defaults */ - w->cond.qualifier = QUALIFIER_NONE; - w->cond.phenomenon = PHENOMENON_NONE; - w->cond.significant = FALSE; - - if (!strcmp(squal, "")) { - w->cond.qualifier = QUALIFIER_MODERATE; - } else if (!strcmp(squal, "-")) { - w->cond.qualifier = QUALIFIER_LIGHT; - } else if (!strcmp(squal, "+")) { - w->cond.qualifier = QUALIFIER_HEAVY; - } else if (!strcmp(squal, "VC")) { - w->cond.qualifier = QUALIFIER_VICINITY; - } else if (!strcmp(squal, "MI")) { - w->cond.qualifier = QUALIFIER_SHALLOW; - } else if (!strcmp(squal, "BC")) { - w->cond.qualifier = QUALIFIER_PATCHES; - } else if (!strcmp(squal, "PR")) { - w->cond.qualifier = QUALIFIER_PARTIAL; - } else if (!strcmp(squal, "TS")) { - w->cond.qualifier = QUALIFIER_THUNDERSTORM; - } else if (!strcmp(squal, "BL")) { - w->cond.qualifier = QUALIFIER_BLOWING; - } else if (!strcmp(squal, "SH")) { - w->cond.qualifier = QUALIFIER_SHOWERS; - } else if (!strcmp(squal, "DR")) { - w->cond.qualifier = QUALIFIER_DRIFTING; - } else if (!strcmp(squal, "FZ")) { - w->cond.qualifier = QUALIFIER_FREEZING; - } else { - g_return_val_if_fail(FALSE, FALSE); - } - - if (!strcmp(sphen, "DZ")) { - w->cond.phenomenon = PHENOMENON_DRIZZLE; - } else if (!strcmp(sphen, "RA")) { - w->cond.phenomenon = PHENOMENON_RAIN; - } else if (!strcmp(sphen, "SN")) { - w->cond.phenomenon = PHENOMENON_SNOW; - } else if (!strcmp(sphen, "SG")) { - w->cond.phenomenon = PHENOMENON_SNOW_GRAINS; - } else if (!strcmp(sphen, "IC")) { - w->cond.phenomenon = PHENOMENON_ICE_CRYSTALS; - } else if (!strcmp(sphen, "PE")) { - w->cond.phenomenon = PHENOMENON_ICE_PELLETS; - } else if (!strcmp(sphen, "GR")) { - w->cond.phenomenon = PHENOMENON_HAIL; - } else if (!strcmp(sphen, "GS")) { - w->cond.phenomenon = PHENOMENON_SMALL_HAIL; - } else if (!strcmp(sphen, "UP")) { - w->cond.phenomenon = PHENOMENON_UNKNOWN_PRECIPITATION; - } else if (!strcmp(sphen, "BR")) { - w->cond.phenomenon = PHENOMENON_MIST; - } else if (!strcmp(sphen, "FG")) { - w->cond.phenomenon = PHENOMENON_FOG; - } else if (!strcmp(sphen, "FU")) { - w->cond.phenomenon = PHENOMENON_SMOKE; - } else if (!strcmp(sphen, "VA")) { - w->cond.phenomenon = PHENOMENON_VOLCANIC_ASH; - } else if (!strcmp(sphen, "SA")) { - w->cond.phenomenon = PHENOMENON_SAND; - } else if (!strcmp(sphen, "HZ")) { - w->cond.phenomenon = PHENOMENON_HAZE; - } else if (!strcmp(sphen, "PY")) { - w->cond.phenomenon = PHENOMENON_SPRAY; - } else if (!strcmp(sphen, "DU")) { - w->cond.phenomenon = PHENOMENON_DUST; - } else if (!strcmp(sphen, "SQ")) { - w->cond.phenomenon = PHENOMENON_SQUALL; - } else if (!strcmp(sphen, "SS")) { - w->cond.phenomenon = PHENOMENON_SANDSTORM; - } else if (!strcmp(sphen, "DS")) { - w->cond.phenomenon = PHENOMENON_DUSTSTORM; - } else if (!strcmp(sphen, "PO")) { - w->cond.phenomenon = PHENOMENON_DUST_WHIRLS; - } else if (!strcmp(sphen, "+FC")) { - w->cond.phenomenon = PHENOMENON_TORNADO; - } else if (!strcmp(sphen, "FC")) { - w->cond.phenomenon = PHENOMENON_FUNNEL_CLOUD; - } else { - g_return_val_if_fail(FALSE, FALSE); - } - - if ((w->cond.qualifier != QUALIFIER_NONE) || (w->cond.phenomenon != PHENOMENON_NONE)) - w->cond.significant = TRUE; - - return TRUE; -} - -const char * -icon_from_weather (Weather *w) -{ - ESummaryWeatherConditions cond = w->cond; - ESummaryWeatherSky sky = w->sky; - - switch (cond.phenomenon) { - case PHENOMENON_DRIZZLE: - case PHENOMENON_RAIN: - case PHENOMENON_UNKNOWN_PRECIPITATION: - case PHENOMENON_HAIL: - case PHENOMENON_SMALL_HAIL: - return "myweather-rain.png"; - case PHENOMENON_SNOW: - case PHENOMENON_SNOW_GRAINS: - case PHENOMENON_ICE_PELLETS: - case PHENOMENON_ICE_CRYSTALS: - return "myweather-snow.png"; - case PHENOMENON_TORNADO: - case PHENOMENON_SQUALL: - return "myweather-storm.png"; - case PHENOMENON_MIST: - case PHENOMENON_FOG: - case PHENOMENON_SMOKE: - case PHENOMENON_VOLCANIC_ASH: - case PHENOMENON_SAND: - case PHENOMENON_HAZE: - case PHENOMENON_SPRAY: - case PHENOMENON_DUST: - case PHENOMENON_SANDSTORM: - case PHENOMENON_DUSTSTORM: - case PHENOMENON_FUNNEL_CLOUD: - case PHENOMENON_DUST_WHIRLS: - return "myweather-fog.png"; - default: - break; - } - - switch (sky) { - case SKY_CLEAR: - return "myweather-sun.png"; - case SKY_BROKEN: - case SKY_SCATTERED: - case SKY_FEW: - return "myweather-suncloud.png"; - case SKY_OVERCAST: - return "myweather-clouds.png"; - default: - break; - } - - return "es-weather.png"; -} diff --git a/my-evolution/metar.h b/my-evolution/metar.h deleted file mode 100644 index 91ec15d2a1..0000000000 --- a/my-evolution/metar.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * metar.h - */ - -#ifndef __METAR_H__ -#define __METAR_H__ - -#define TIME_RE_STR "^([0-9]{6})Z$" -#define WIND_RE_STR "^(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?KT$" -#define VIS_RE_STR "^(([0-9]?[0-9])|(M?1/[0-9]?[0-9]))SM$" -#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC)([0-9]{3})?$" -#define TEMP_RE_STR "^(M?[0-9][0-9])/(M?[0-9][0-9])$" -#define PRES_RE_STR "^(A|Q)([0-9]{4})$" -#define COND_RE_STR "^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$" - -enum { - TIME_RE, - WIND_RE, - VIS_RE, - CLOUD_RE, - TEMP_RE, - PRES_RE, - COND_RE, - RE_NUM -}; - -const char *weather_sky_string (Weather *w); -char *weather_temp_string (Weather *w); -const char *weather_conditions_string (Weather *w); -const char *weather_wind_direction_string (Weather *w); -const char *icon_from_weather (Weather *w); - -void metar_init_re (void); -gboolean metar_tok_time (char *token, - Weather *w); -gboolean metar_tok_wind (char *tokp, - Weather *w); -gboolean metar_tok_vis (char *tokp, - Weather *w); -gboolean metar_tok_cloud (char *tokp, - Weather *w); -gboolean metar_tok_pres (char *tokp, - Weather *w); -gboolean metar_tok_temp (char *tokp, - Weather *w); -gboolean metar_tok_cond (char *tokp, - Weather *w); -#endif diff --git a/my-evolution/my-evolution-html.h b/my-evolution/my-evolution-html.h deleted file mode 100644 index 2e2300d002..0000000000 --- a/my-evolution/my-evolution-html.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-weather.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: Jakub Steiner <jimmac@ximian.com> - * Iain Holmes <iain@ximian.com> - */ - -#ifdef NOT_ETTORE -#define HTML_1 "<html><head></head><body background=\"bcg.png\" "\ -"bgcolor=\"white\" text=\"#000000\" link=\"#314e6c\" alink=\"black\" vlink=\"#314e6c\">"\ -"<img src=\"myevo.png\" alt=\"My Evolution\" width=\"200\" height=\"31\" border=\"0\"><br>"\ -"<img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\">"\ -"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"\ -"<tbody><tr>" -#else -#define HTML_1 "<html><head></head><body background=\"bcg.png\" "\ -"bgcolor=\"white\" text=\"#000000\" link=\"#314e6c\" alink=\"black\" vlink=\"#314e6c\">"\ -"<img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\">"\ -"<table border=\"0\" numcols=\"5\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"\ -"<tbody><tr>" -#endif - -/* Needs a stringified date */ -#define HTML_2 "<td align=\"Right\" colspan=\"5\"><b>%s</b><br> <img src=\"empty.gif\" width=\"1\" height=\"3\"></td>" - -#define HTML_3 "</tr><tr><td colspan=\"5\" bgcolor=\"#000000\"><img src=\"empty.gif\" width=\"1\" height=\"1\"></td></tr>"\ -"<tr valign=\"Top\">" \ -"<td width=\"100%\">"\ - -/* Weather stuff goes here */ - -/* RDF Stuff goes here */ - -#define HTML_4 "</td><td> </td><td width=\"1\" bgcolor=\"#000000\"><img src=\"empty.gif\" width=\"1\" height=\"1\"></td>"\ -"<td width=\"15\" background=\"pattern.png\">   </td>"\ -"<td width=\"0\" background=\"pattern.png\">" - -/* Mail stuff ici s'il vous plait */ - -/* And then the calendar stuff */ - -#ifdef NOT_ETTORE -#define HTML_5 "<p align=\"Center\"><img src=\"evologo-big.png\" width=\"200\" height=\"216\" alt=\"\"></p><p>"\ -"<img src=\"empty.gif\" alt=\"\" width=\"290\" height=\"1\"></p></td>"\ -"<tr bgcolor=\"#000000\"><td colspan=\"\"><img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\"></td></tr>"\ -"</tbody></table></body></html>" -#else -#define HTML_5 "<img src=\"empty.gif\" alt=\"\" width=\"290\" height=\"1\"></p></td>"\ -"<tr bgcolor=\"#000000\"><td colspan=\"5\"><img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"1\"></td></tr>"\ -"</tbody></table></body></html>" -#endif - diff --git a/my-evolution/my-evolution.glade b/my-evolution/my-evolution.glade deleted file mode 100644 index a3ed5f13f1..0000000000 --- a/my-evolution/my-evolution.glade +++ /dev/null @@ -1,890 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkWindow" id="window1"> - <property name="title" translatable="yes">window2</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - - <child> - <widget class="GtkNotebook" id="notebook"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> - - <child> - <widget class="GtkVBox" id="vbox3"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="Custom" id="mail-custom"> - <property name="visible">True</property> - <property name="creation_function">e_summary_preferences_make_mail_table</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Tue, 29 Jan 2002 15:52:46 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="checkbutton1"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Show full path for folders</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Mail</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox6"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="Custom" id="rdf-custom"> - <property name="visible">True</property> - <property name="creation_function">e_summary_preferences_make_rdf_table</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Tue, 29 Jan 2002 15:53:47 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame2"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkTable" id="table4"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">5</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label25"> - <property name="visible">True</property> - <property name="label" translatable="yes">R_efresh time (seconds):</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">spinbutton1</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label29"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Max number of items shown:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">spinbutton4</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="spinbutton1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">300 300 1e+06 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="spinbutton4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button11"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - - <child> - <widget class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-new</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label41"> - <property name="visible">True</property> - <property name="label" translatable="yes">_New Feed</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="delete-button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - - <child> - <widget class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - - <child> - <widget class="GtkHBox" id="hbox7"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-delete</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label42"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Delete Feed</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">5</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="label" translatable="yes">News Feed Settings</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="label" translatable="yes">News Feeds</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox8"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="Custom" id="weather-custom"> - <property name="visible">True</property> - <property name="creation_function">e_summary_preferences_make_weather_table</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Tue, 29 Jan 2002 15:54:10 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame3"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkVBox" id="vbox11"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkHBox" id="hbox4"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label37"> - <property name="visible">True</property> - <property name="label" translatable="yes">Show temperatures in:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton7"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">C_elsius</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton8"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Fahrenheit</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radiobutton7</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label38"> - <property name="visible">True</property> - <property name="label" translatable="yes">Refresh _time (seconds):</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">spinbutton5</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="spinbutton5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">300 300 1e+06 1 10 10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label30"> - <property name="visible">True</property> - <property name="label" translatable="yes">Weather Settings</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Weather</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox9"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkFrame" id="frame4"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkVBox" id="vbox10"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label32"> - <property name="visible">True</property> - <property name="label" translatable="yes">How many days should the calendar display at once?</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">7.45058e-09</property> - <property name="yalign">0.5</property> - <property name="xpad">3</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_One day</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Five days</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radiobutton3</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">One w_eek</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radiobutton3</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton6"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">One mont_h</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radiobutton3</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label39"> - <property name="visible">True</property> - <property name="label" translatable="yes">Calendar</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame5"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkHBox" id="hbox3"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkRadioButton" id="radiobutton1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show _all tasks</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show _today's tasks</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radiobutton1</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label40"> - <property name="visible">True</property> - <property name="label" translatable="yes">Tasks </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="label" translatable="yes">Schedule</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/my-evolution/weather.h b/my-evolution/weather.h deleted file mode 100644 index 196b9a8017..0000000000 --- a/my-evolution/weather.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* weather.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Iain Holmes <iain@ximian.com> - */ - -#ifndef __WEATHER_H__ -#define __WEATHER_H__ - -#include "e-summary-weather.h" - -#include <libsoup/soup.h> - -typedef struct _Weather { - char *location; - char *html; - - SoupMessage *message; - - ESummary *summary; - - gboolean valid; - ESummaryWeatherLocation *loc; - ESummaryWeatherUnits units; - ESummaryWeatherUpdate update; - ESummaryWeatherSky sky; - ESummaryWeatherConditions cond; - ESummaryWeatherTemperature temp; - ESummaryWeatherTemperature dew; - ESummaryWeatherHumidity humidity; - ESummaryWeatherWindDir wind; - ESummaryWeatherWindSpeed windspeed; - ESummaryWeatherPressure pressure; - ESummaryWeatherVisibility visibility; - char *forecast; -} Weather; - -#endif diff --git a/notes/.cvsignore b/notes/.cvsignore deleted file mode 100644 index 02b0523973..0000000000 --- a/notes/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile -Makefile.in -.deps -.libs diff --git a/notes/Makefile.am b/notes/Makefile.am deleted file mode 100644 index 37e2a7ea03..0000000000 --- a/notes/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -noinst_PROGRAMS = notes-test - -INCLUDES = \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/shell \ - -I$(top_srcdir)/widgets/e-text \ - $(BONOBO_HTML_GNOME_CFLAGS) \ - $(EXTRA_GNOME_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DG_LOG_DOMAIN=\"evolution-notes\" - -notes_test_SOURCES = \ - e-bevel-button.c \ - e-bevel-button.h \ - e-bevel-button-util.c \ - e-bevel-button-util.h \ - e-note.c \ - e-note.h \ - test-notes.c - -oafdir = $(datadir)/oaf -oaf_in_files = GNOME_Evolution_Notes.oaf.in -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) - -@XML_I18N_MERGE_OAF_RULE@ - -notes_test_LDADD = \ - $(BONOBO_HTML_GNOME_LIBS) \ - $(EXTRA_GNOME_LIBS) - -EXTRA_DIST= $(oaf_in_files) $(oaf_DATA) diff --git a/notes/component-factory.c b/notes/component-factory.c deleted file mode 100644 index 9b351db7b9..0000000000 --- a/notes/component-factory.c +++ /dev/null @@ -1,155 +0,0 @@ -#include <config.h> - -#include <gnome.h> -#include <bonobo.h> - -#include "Evolution.h" -#include "evolution-storage.h" - -#include "evolution-shell-component.h" - -#include "e-util/e-gui-utils.h" - -#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Notes_shellComponentFactory" - -static const EvolutionShellComponentFolderType folder_types[] = { - { "notes", "evolution-notes.png", TRUE, NULL, NULL }, - { NULL, NULL } -}; - -static void -new_note_cb (BonoboUIComponent *uih, void *user_data, const char *path) -{ - g_print ("new note!\n"); -} - -static GnomeUIInfo gnome_toolbar [] = { - GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new note"), new_note_cb, GNOME_STOCK_PIXMAP_NEW), - GNOMEUIINFO_END -}; - -#ifdef THIS_NEEDS_UPDATING_FOR_NEW_BONOBOS - -static void -control_deactivate (BonoboControl *control, BonoboUIComponent *uih) -{ - bonobo_ui_handler_dock_remove (uih, "/Toolbar"); -} - -static void -control_activate (BonoboControl *control, BonoboUIComponent *uih) -{ - Bonobo_UIContainer remote_uih; - GtkWidget *toolbar, *toolbar_frame; - BonoboControl *toolbar_control ; - - remote_uih = bonobo_control_get_remote_ui_handler (control); - bonobo_ui_handler_set_container (uih, remote_uih); - bonobo_object_release_unref (remote_uih, NULL); - - toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, - GTK_TOOLBAR_BOTH); - - gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar), - gnome_toolbar, - NULL, NULL); - - toolbar_frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (toolbar_frame), GTK_SHADOW_OUT); - gtk_container_add (GTK_CONTAINER (toolbar_frame), toolbar); - gtk_widget_show (toolbar_frame); - - gtk_widget_show_all (toolbar_frame); - - toolbar_control = bonobo_control_new (toolbar_frame); - bonobo_ui_handler_dock_add ( - uih, "/Toolbar", - bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)), - GNOME_DOCK_ITEM_BEH_EXCLUSIVE, - GNOME_DOCK_TOP, - 1, 1, 0); -} - - -static void -control_activate_cb (BonoboControl *control, - gboolean activate) -{ - BonoboUIComponent *uih; - - uih = bonobo_control_get_ui_handler (control); - g_assert (uih); - - if (activate) - control_activate (control, uih); - else - control_deactivate (control, uih); -} -#endif - -static BonoboControl * -create_view (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure) -{ - BonoboControl * control; - - control = notes_factory_new_control (); - -#ifdef THIS_CODE_IS_TOTALY_DEAD - g_signal_connect((control), "activate", - control_activate_cb, NULL); -#endif - - - return control; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - EvolutionShellClient shell_client, - gpointer user_data) -{ - g_print ("evolution-notes: Yeeeh! We have an owner!\n"); /* FIXME */ -} - -static void -owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data) -{ - g_print ("No owner anymore\n"); -} - -/* The factory function */ -static BonoboObject * -notes_component_factory (BonoboGenericFactory *factory, - void *closure) -{ - EvolutionShellComponent *shell_component; - - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); - - g_signal_connect((shell_component), "owner_set", - G_CALLBACK (owner_set_cb), NULL); - g_signal_connect((shell_component), "owner_unset", - G_CALLBACK (owner_unset_cb), NULL); - - return BONOBO_OBJECT (shell_component); -} - - -void -component_factory_init (void) -{ - static BonoboGenericFactory *factory = NULL; - - if (factory != NULL) - return; - - factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, notes_component_factory, NULL); - - if (factory == NULL) { - e_notice (NULL, GTK_MESSAGE_ERROR, - _("Cannot initialize Evolution's notes component.")); - exit (1); - } -} diff --git a/notes/component-factory.h b/notes/component-factory.h deleted file mode 100644 index 9535ccc4ae..0000000000 --- a/notes/component-factory.h +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -#ifndef COMPONENT_FACTORY_H -#define COMPONENT_FACTORY_H - -void component_factory_init (void); - -#endif diff --git a/notes/e-bevel-button-util.c b/notes/e-bevel-button-util.c deleted file mode 100644 index cfa01f71a2..0000000000 --- a/notes/e-bevel-button-util.c +++ /dev/null @@ -1,189 +0,0 @@ -#include <gtk/gtk.h> -#include "e-bevel-button-util.h" - -static void rgb_to_hls (gdouble *r, gdouble *g, gdouble *b); -static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s); - -void -e_bevel_button_util_shade (GdkColor *a, - GdkColor *b, - gdouble k) -{ - gdouble red; - gdouble green; - gdouble blue; - - red = (gdouble) a->red / 65535.0; - green = (gdouble) a->green / 65535.0; - blue = (gdouble) a->blue / 65535.0; - - rgb_to_hls (&red, &green, &blue); - - green *= k; - if (green > 1.0) - green = 1.0; - else if (green < 0.0) - green = 0.0; - - blue *= k; - if (blue > 1.0) - blue = 1.0; - else if (blue < 0.0) - blue = 0.0; - - hls_to_rgb (&red, &green, &blue); - - b->red = red * 65535.0; - b->green = green * 65535.0; - b->blue = blue * 65535.0; -} - -static void -rgb_to_hls (gdouble *r, - gdouble *g, - gdouble *b) -{ - gdouble min; - gdouble max; - gdouble red; - gdouble green; - gdouble blue; - gdouble h, l, s; - gdouble delta; - - red = *r; - green = *g; - blue = *b; - - if (red > green) - { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; - } - else - { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; - } - - l = (max + min) / 2; - s = 0; - h = 0; - - if (max != min) - { - if (l <= 0.5) - s = (max - min) / (max + min); - else - s = (max - min) / (2 - max - min); - - delta = max -min; - if (red == max) - h = (green - blue) / delta; - else if (green == max) - h = 2 + (blue - red) / delta; - else if (blue == max) - h = 4 + (red - green) / delta; - - h *= 60; - if (h < 0.0) - h += 360; - } - - *r = h; - *g = l; - *b = s; -} - -static void -hls_to_rgb (gdouble *h, - gdouble *l, - gdouble *s) -{ - gdouble hue; - gdouble lightness; - gdouble saturation; - gdouble m1, m2; - gdouble r, g, b; - - lightness = *l; - saturation = *s; - - if (lightness <= 0.5) - m2 = lightness * (1 + saturation); - else - m2 = lightness + saturation - lightness * saturation; - m1 = 2 * lightness - m2; - - if (saturation == 0) - { - *h = lightness; - *l = lightness; - *s = lightness; - } - else - { - hue = *h + 120; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - r = m1 + (m2 - m1) * hue / 60; - else if (hue < 180) - r = m2; - else if (hue < 240) - r = m1 + (m2 - m1) * (240 - hue) / 60; - else - r = m1; - - hue = *h; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - g = m1 + (m2 - m1) * hue / 60; - else if (hue < 180) - g = m2; - else if (hue < 240) - g = m1 + (m2 - m1) * (240 - hue) / 60; - else - g = m1; - - hue = *h - 120; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - b = m1 + (m2 - m1) * hue / 60; - else if (hue < 180) - b = m2; - else if (hue < 240) - b = m1 + (m2 - m1) * (240 - hue) / 60; - else - b = m1; - - *h = r; - *l = g; - *s = b; - } -} diff --git a/notes/e-bevel-button-util.h b/notes/e-bevel-button-util.h deleted file mode 100644 index 759a9025cc..0000000000 --- a/notes/e-bevel-button-util.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __E_BEVEL_BUTTON_UTIL_H__ -#define __E_BEVEL_BUTTON_UTIL_H__ - -#define LIGHTNESS_MULT 1.3 -#define DARKNESS_MULT 0.7 - -void -e_bevel_button_util_shade (GdkColor *a, - GdkColor *b, - gdouble k); - -#endif /* __E_BEVEL_BUTTON_UTIL_H__ */ diff --git a/notes/e-bevel-button.c b/notes/e-bevel-button.c deleted file mode 100644 index 03b0edf23d..0000000000 --- a/notes/e-bevel-button.c +++ /dev/null @@ -1,175 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - -#include <config.h> -#include <gtk/gtkbutton.h> - -#include <gal/util/e-util.h> - -#include "e-bevel-button.h" -#include "e-bevel-button-util.h" - -#define PARENT_TYPE GTK_TYPE_BUTTON - -static GtkButtonClass *parent_class = NULL; - -struct _EBevelButtonPrivate { - GdkColor base_color; - GdkColor dark_color; - GdkColor light_color; - GdkGC *gc; -}; - -static void -e_bevel_button_paint (GtkWidget *widget, GdkRectangle *area) -{ - EBevelButton *button; - - button = E_BEVEL_BUTTON (widget); - - if (GTK_WIDGET_DRAWABLE (widget)) { - gdk_window_set_back_pixmap (widget->window, NULL, TRUE); - gdk_window_clear_area (widget->window, area->x, area->y, area->width, area->height); - - gdk_gc_set_foreground (button->priv->gc, &button->priv->base_color); - gdk_draw_rectangle (widget->window, - button->priv->gc, - TRUE, - 0, 0, - widget->allocation.width, widget->allocation.height); - - if (GTK_BUTTON (button)->in_button) { - gdk_gc_set_foreground (button->priv->gc, - GTK_BUTTON (button)->button_down ? - &button->priv->dark_color : - &button->priv->light_color); - gdk_draw_line (widget->window, button->priv->gc, - 0, 0, 0, widget->allocation.height - 2); - gdk_draw_line (widget->window, button->priv->gc, - 0, 0, widget->allocation.width - 2, 0); - - gdk_gc_set_foreground (button->priv->gc, - GTK_BUTTON (button)->button_down ? - &button->priv->light_color : - &button->priv->dark_color); - gdk_draw_line (widget->window, button->priv->gc, - widget->allocation.width - 1 , 1, - widget->allocation.width - 1, widget->allocation.height - 1); - gdk_draw_line (widget->window, button->priv->gc, - 1, widget->allocation.height - 1, - widget->allocation.width - 1, widget->allocation.height - 1); - } - } -} - -static gint -e_bevel_button_expose (GtkWidget *widget, GdkEventExpose *event) -{ - GtkBin *bin; - GdkEventExpose child_event; - - if (GTK_WIDGET_DRAWABLE (widget)) { - bin = GTK_BIN (widget); - - e_bevel_button_paint (widget, &event->area); - - child_event = *event; - if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) && - gtk_widget_intersect (bin->child, &event->area, &child_event.area)) - gtk_widget_event (bin->child, (GdkEvent*) &child_event); - } - - return FALSE; -} - -static void -e_bevel_button_draw (GtkWidget *widget, GdkRectangle *area) -{ - GdkRectangle child_area; - GdkRectangle tmp_area; - - g_return_if_fail (widget != NULL); - g_return_if_fail (E_IS_BEVEL_BUTTON (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) { - tmp_area = *area; - tmp_area.x -= GTK_CONTAINER (widget)->border_width; - tmp_area.y -= GTK_CONTAINER (widget)->border_width; - - e_bevel_button_paint (widget, &tmp_area); - - if (GTK_BIN (widget)->child && gtk_widget_intersect (GTK_BIN (widget)->child, &tmp_area, &child_area)) - gtk_widget_draw (GTK_BIN (widget)->child, &child_area); - } -} - -static void -e_bevel_button_realize (GtkWidget *widget) -{ - EBevelButton *button = E_BEVEL_BUTTON (widget); - - GTK_WIDGET_CLASS (parent_class)->realize (widget); - - button->priv->gc = gdk_gc_new (widget->window); - - gdk_color_parse ("#d0d888", &button->priv->base_color); - e_bevel_button_util_shade (&button->priv->base_color, - &button->priv->light_color, - LIGHTNESS_MULT); - e_bevel_button_util_shade (&button->priv->base_color, - &button->priv->dark_color, - DARKNESS_MULT); - gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->base_color, FALSE, TRUE); - gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->light_color, FALSE, TRUE); - gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->dark_color, FALSE, TRUE); -} - -static void -e_bevel_button_class_init (EBevelButtonClass *klass) -{ - GtkWidgetClass *widget_class; - - widget_class = (GtkWidgetClass *)klass; - - parent_class = g_type_class_ref(PARENT_TYPE); - - widget_class->draw = e_bevel_button_draw; - widget_class->expose_event = e_bevel_button_expose; - widget_class->realize = e_bevel_button_realize; -} - -static void -e_bevel_button_init (EBevelButton *button) -{ - EBevelButtonPrivate *priv; - - GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS); - - priv = g_new (EBevelButtonPrivate, 1); - - button->priv = priv; -} - -GtkWidget * -e_bevel_button_new (void) -{ - EBevelButton *button; - - button = gtk_type_new (E_TYPE_BEVEL_BUTTON); - - return GTK_WIDGET (button); -} - -E_MAKE_TYPE (e_bevel_button, "EBevelButton", EBevelButton, e_bevel_button_class_init, e_bevel_button_init, PARENT_TYPE); - - - - - - - - - - - - diff --git a/notes/e-bevel-button.h b/notes/e-bevel-button.h deleted file mode 100644 index e9197c3b63..0000000000 --- a/notes/e-bevel-button.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -#ifndef __E_BEVEL_BUTTON_H__ -#define __E_BEVEL_BUTTON_H__ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <gtk/gtkbutton.h> - -#define E_TYPE_BEVEL_BUTTON (e_bevel_button_get_type ()) -#define E_BEVEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_BEVEL_BUTTON, EBevelButton)) -#define E_BEVEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_BEVEL_BUTTON, EBevelButtonClass)) -#define E_IS_BEVEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) -#define E_IS_BEVEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) - -typedef struct _EBevelButton EBevelButton; -typedef struct _EBevelButtonPrivate EBevelButtonPrivate; -typedef struct _EBevelButtonClass EBevelButtonClass; - -struct _EBevelButton { - GtkButton parent; - - EBevelButtonPrivate *priv; -}; - -struct _EBevelButtonClass { - GtkButtonClass parent_class; -}; - -GtkType e_bevel_button_get_type (void); - -GtkWidget *e_bevel_button_new (void); -void e_bevel_button_set_base_color (EBevelButton *button, GdkColor *color); - -#endif /* __E_BEVEL_BUTTON_H__ */ - diff --git a/notes/e-note.c b/notes/e-note.c deleted file mode 100644 index e7d84a8256..0000000000 --- a/notes/e-note.c +++ /dev/null @@ -1,382 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - -#include <config.h> -#include <gnome.h> -#include <gdk/gdkx.h> - -#include <gal/widgets/e-canvas.h> -#include <gal/widgets/e-canvas-utils.h> -#include <gal/util/e-util.h> -#include <gal/e-text/e-text.h> - -#include "e-note.h" -#include "e-bevel-button.h" -#include "e-bevel-button-util.h" - -#define PARENT_TYPE GTK_TYPE_WINDOW - -enum { - E_NOTE_TEXT_CHANGED, - E_NOTE_LAST_SIGNAL -}; - -static guint e_note_signals [E_NOTE_LAST_SIGNAL] = { 0 }; - -static GtkWindowClass *parent_class = NULL; - -struct _ENotePrivate { - GtkWidget *canvas; - - GnomeCanvasItem *frame; - GnomeCanvasItem *rect; - - GnomeCanvasItem *text_item; - - GnomeCanvasItem *move_button; - GnomeCanvasItem *close_button; - GnomeCanvasItem *resize_button; - - /* Used for moving and resizing */ - gint press_x, press_y; - gint resize_width, resize_height; - gboolean in_drag; -}; - -static void -e_note_text_changed (ETextModel *model, gpointer data) -{ - gtk_signal_emit (GTK_OBJECT (data), - e_note_signals [E_NOTE_TEXT_CHANGED]); -} - -static gint -e_note_resize_button_changed (GtkWidget *widget, GdkEventButton *event, gpointer data) -{ - ENote *note = E_NOTE (data); - - if (event->type == GDK_BUTTON_PRESS) { - note->priv->press_x = event->x_root; - note->priv->press_y = event->y_root; - - gdk_window_get_geometry (GTK_WIDGET (note)->window, NULL, NULL, - ¬e->priv->resize_width, ¬e->priv->resize_height, NULL); - - gdk_pointer_grab (widget->window, - FALSE, - (GDK_BUTTON1_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_RELEASE_MASK), - NULL, - NULL, - GDK_CURRENT_TIME); - note->priv->in_drag = TRUE; - - } - else { - if (note->priv->in_drag) { - if (event->window != widget->window) - return FALSE; - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - note->priv->in_drag = FALSE; - } - } - - return TRUE; -} - -static gint -e_note_resize_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer data) -{ - GtkWidget *window = GTK_WIDGET (data); - ENote *note = E_NOTE (data); - gint new_x, new_y; - gint width, height; - - if (note->priv->in_drag) { - gdk_window_get_pointer (GDK_ROOT_PARENT (), &new_x, &new_y, NULL); - - width = note->priv->resize_width + new_x - note->priv->press_x; - if (width < 60) - width = 60; - - height = note->priv->resize_height + new_y - note->priv->press_y; - if (height < 60) - height = 60; - - gdk_window_resize (window->window, width, height); - - return TRUE; - } - - return FALSE; -} - -static gint -e_note_move_button_changed (GtkWidget *widget, GdkEventButton *event, gpointer data) -{ - ENote *note = E_NOTE (data); - - if (event->button != 1) - return FALSE; - - if (event->type == GDK_BUTTON_PRESS) { - gint root_x, root_y; - - gdk_window_get_origin (widget->window, &root_x, &root_y); - note->priv->press_x = root_x - event->x_root; - note->priv->press_y = root_y - event->y_root; - - gdk_pointer_grab (widget->window, - FALSE, - (GDK_BUTTON1_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_RELEASE_MASK), - NULL, - NULL, - GDK_CURRENT_TIME); - - note->priv->in_drag = TRUE; - } - else { - if (note->priv->in_drag) { - if (event->window != widget->window) - return FALSE; - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - note->priv->in_drag = FALSE; - } - } - - return TRUE; -} - -static gint -e_note_move_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer data) -{ - gint new_x, new_y; - ENote *note = E_NOTE (data); - GtkWidget *window = GTK_WIDGET (data); - - if (note->priv->in_drag) { - gdk_window_get_pointer (GDK_ROOT_PARENT (), &new_x, &new_y, NULL); - - new_x += note->priv->press_x; - new_y += note->priv->press_y; - - gdk_window_move (window->window, new_x, new_y); - } - - return TRUE; -} - -static void -e_note_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer data) -{ - ENote *note; - gdouble height; - - note = E_NOTE (data); - - gnome_canvas_item_set (note->priv->text_item, - "width", (gdouble) allocation->width - 10, - NULL); - g_object_get((note->priv->text_item), - "height", &height, - NULL); - height = MAX (height, allocation->height); - gnome_canvas_set_scroll_region (GNOME_CANVAS (note->priv->canvas), 0, 0, - allocation->width, height); - gnome_canvas_item_set (note->priv->frame, - "x2", (gdouble) allocation->width - 1, - "y2", (gdouble) allocation->height - 1, - NULL); - gnome_canvas_item_set (note->priv->rect, - "x2", (gdouble) allocation->width - 1, - "y2", (gdouble) allocation->height - 1, - NULL); - gnome_canvas_item_set (note->priv->move_button, - "width", (gdouble) allocation->width - 29, - NULL); - gnome_canvas_item_set (note->priv->resize_button, - "x", (gdouble) allocation->width - 23, - "y", (gdouble) allocation->height - 23, - NULL); - gnome_canvas_item_set (note->priv->close_button, - "x", (gdouble) allocation->width - 23, - NULL); -} - -static void -e_note_realize (GtkWidget *widget) -{ - GTK_WIDGET_CLASS (parent_class)->realize (widget); - - gdk_window_set_decorations (widget->window, 0); -} - -static void -e_note_class_init (ENoteClass *klass) -{ - GtkWidgetClass *widget_class; - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *)klass; - widget_class = (GtkWidgetClass *)klass; - parent_class = g_type_class_ref(PARENT_TYPE); - - widget_class->realize = e_note_realize; - - e_note_signals [E_NOTE_TEXT_CHANGED] = - gtk_signal_new ("changed", - GTK_RUN_LAST, - object_class->type, - G_STRUCT_OFFSET (ENoteClass, text_changed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, e_note_signals, E_NOTE_LAST_SIGNAL); -} - -static void -e_note_init (ENote *note) -{ - ENotePrivate *priv; - GtkWidget *button; - - priv = g_new (ENotePrivate, 1); - - note->priv = priv; - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - priv->canvas = e_canvas_new (); - - gtk_widget_pop_visual (); - gtk_widget_pop_colormap (); - - g_signal_connect((priv->canvas), "size_allocate", - G_CALLBACK (e_note_canvas_size_allocate), note); - gtk_widget_show (priv->canvas); - gtk_container_add (GTK_CONTAINER (note), priv->canvas); - - priv->rect = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - gnome_canvas_rect_get_type (), - "x1", 0.0, - "y1", 0.0, - "x2", 100.0, - "y2", 100.0, - "fill_color_rgba", 0xf5ffa0ff, - NULL); - priv->frame = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - gnome_canvas_rect_get_type (), - "x1", 0.0, - "y1", 0.0, - "x2", 100.0, - "y2", 100.0, - "outline_color", "black", - NULL); - - priv->text_item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - e_text_get_type (), - "text", "", - "font_gdk", priv->canvas->style->font, - "fill_color", "black", - "anchor", GTK_ANCHOR_NW, - "clip", TRUE, - "editable", TRUE, - "line_wrap", TRUE, - "width", 150.0, - NULL); - e_canvas_item_move_absolute(priv->text_item, - 5.0, 25.0); - - g_signal_connect((E_TEXT (priv->text_item)->model), "changed", - G_CALLBACK (e_note_text_changed), note); - - button = e_bevel_button_new (); - g_signal_connect((button), "button_press_event", - G_CALLBACK (e_note_move_button_changed), note); - g_signal_connect((button), "button_release_event", - G_CALLBACK (e_note_move_button_changed), note); - g_signal_connect((button), "motion_notify_event", - G_CALLBACK (e_note_move_motion_event), note); - gtk_widget_show (button); - priv->move_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - gnome_canvas_widget_get_type (), - "widget", button, - "x", 3.0, - "y", 3.0, - "width", 20.0, - "height", 20.0, - NULL); - button = e_bevel_button_new (); - gtk_widget_show (button); - priv->close_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - gnome_canvas_widget_get_type (), - "widget", button, - "x", 3.0, - "y", 3.0, - "width", 20.0, - "height", 20.0, - NULL); - - button = e_bevel_button_new (); - g_signal_connect((button), "button_press_event", - G_CALLBACK (e_note_resize_button_changed), note); - g_signal_connect((button), "button_release_event", - G_CALLBACK (e_note_resize_button_changed), note); - g_signal_connect((button), "motion_notify_event", - G_CALLBACK (e_note_resize_motion_event), note); - gtk_widget_show (button); - priv->resize_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), - gnome_canvas_widget_get_type (), - "widget", button, - "x", 3.0, - "y", 3.0, - "width", 20.0, - "height", 20.0, - NULL); -} - -void -e_note_set_text (ENote *note, gchar *text) -{ - g_return_if_fail (note != NULL); - g_return_if_fail (E_IS_NOTE (note)); - g_return_if_fail (text != NULL); - - gnome_canvas_item_set (note->priv->text_item, - "text", text, - NULL); -} - -gchar * -e_note_get_text (ENote *note) -{ - gchar *text; - - g_return_val_if_fail (note != NULL, NULL); - g_return_val_if_fail (E_IS_NOTE (note), NULL); - g_return_val_if_fail (text != NULL, NULL); - - g_object_get((note->priv->text_item), - "text", &text, - NULL); - - return text; -} - - -GtkWidget * -e_note_new (void) -{ - ENote *note; - - note = gtk_type_new (E_TYPE_NOTE); - - return GTK_WIDGET (note); -} - -E_MAKE_TYPE (e_note, "ENote", ENote, e_note_class_init, e_note_init, PARENT_TYPE); diff --git a/notes/e-note.h b/notes/e-note.h deleted file mode 100644 index 1bf1273d01..0000000000 --- a/notes/e-note.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - -#ifndef __E_NOTE_H__ -#define __E_NOTE_H__ - -#include <config.h> -#include <gnome.h> -#include "e-bevel-button.h" - -#define E_TYPE_NOTE (e_note_get_type ()) -#define E_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_NOTE, ENote)) -#define E_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_NOTE, ENoteClass)) -#define E_IS_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_NOTE)) -#define E_IS_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_NOTE)) - -typedef struct _ENote ENote; -typedef struct _ENotePrivate ENotePrivate; -typedef struct _ENoteClass ENoteClass; - -struct _ENote { - GtkWindow parent; - - ENotePrivate *priv; -}; - -struct _ENoteClass { - GtkWindowClass parent_class; - - void (* text_changed) (ENote *note); -}; - -GtkType e_note_get_type (void); -GtkWidget *e_note_new (void); -void e_note_set_text (ENote *note, gchar *text); -gchar *e_note_get_text (ENote *note); - -#endif /* __E_NOTE_H__ */ diff --git a/notes/main.c b/notes/main.c deleted file mode 100644 index 340a09469b..0000000000 --- a/notes/main.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * Author: - * Anders Carlsson (andersca@gnu.org) - * - * (C) 2000 Ximian, Inc. - */ - -#include <config.h> -#include <gnome.h> -#include <bonobo.h> -#include <liboaf/liboaf.h> - -#include "e-util/e-gui-utils.h" -#include "component-factory.h" - -static void -init_corba (gint argc, gchar **argv) -{ - gnome_init_with_popt_table ("evolution-notes-component", VERSION, argc, argv, - oaf_popt_options, 0, NULL); - oaf_init (argc, argv); -} - -static void -init_bonobo (void) -{ - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - e_notice (NULL, GTK_MESSAGE_ERROR, - _("Notes Component: Could not initialize bonobo")); - exit (1); - } -} - -gint -main (gint argc, gchar **argv) -{ - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - - init_corba (argc, argv); - init_bonobo (); - - e_setup_base_dir (); - - notes_factory_init (); - component_factory_init (); - - bonobo_main (); - - return 0; -} diff --git a/notes/test-notes.c b/notes/test-notes.c deleted file mode 100644 index 1114b57e66..0000000000 --- a/notes/test-notes.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - -#include <config.h> -#include <gnome.h> -#include <gdk/gdkx.h> - -#include <gal/widgets/e-canvas.h> -#include <gal/e-text/e-text.h> - -#include "e-note.h" - -void -text_changed (GtkWidget *widget, gpointer data) -{ - g_print ("Text changed!\n"); -} - -gint -main (gint argc, gchar **argv) -{ - GtkWidget *note; - - gnome_init ("NotesTest", "0.0.1", argc, argv); - - note = e_note_new (); - e_note_set_text (E_NOTE (note), "This is a text note widget"); - g_signal_connect((note), "changed", - G_CALLBACK (text_changed), NULL); - - gtk_widget_show (note); - gtk_main (); - - return 0; -} |