diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-06 08:42:52 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-06 08:42:52 +0800 |
commit | f36f2d1fcf5851aa1d00ab8096ca0b362880475b (patch) | |
tree | 73738945116817106dec0cb73434994964c9d3d2 | |
parent | 75f89dc8698e1d6589c7f5e51c8fe3164584f583 (diff) | |
download | gsoc2013-evolution-f36f2d1fcf5851aa1d00ab8096ca0b362880475b.tar.gz gsoc2013-evolution-f36f2d1fcf5851aa1d00ab8096ca0b362880475b.tar.zst gsoc2013-evolution-f36f2d1fcf5851aa1d00ab8096ca0b362880475b.zip |
#include <string.h>.
* 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.
svn path=/trunk/; revision=18574
-rw-r--r-- | my-evolution/ChangeLog | 57 | ||||
-rw-r--r-- | my-evolution/Makefile.am | 8 | ||||
-rw-r--r-- | my-evolution/component-factory.c | 15 | ||||
-rw-r--r-- | my-evolution/e-cell-tri.h | 5 | ||||
-rw-r--r-- | my-evolution/e-summary-calendar.c | 5 | ||||
-rw-r--r-- | my-evolution/e-summary-factory.c | 20 | ||||
-rw-r--r-- | my-evolution/e-summary-mail.c | 9 | ||||
-rw-r--r-- | my-evolution/e-summary-preferences.c | 145 | ||||
-rw-r--r-- | my-evolution/e-summary-rdf.c | 4 | ||||
-rw-r--r-- | my-evolution/e-summary-shown.c | 23 | ||||
-rw-r--r-- | my-evolution/e-summary-table.c | 7 | ||||
-rw-r--r-- | my-evolution/e-summary-tasks.c | 4 | ||||
-rw-r--r-- | my-evolution/e-summary-weather.c | 5 | ||||
-rw-r--r-- | my-evolution/e-summary.c | 82 | ||||
-rw-r--r-- | my-evolution/main.c | 29 | ||||
-rw-r--r-- | my-evolution/metar.c | 3 |
16 files changed, 201 insertions, 220 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 226ae81ed9..f87c3624b7 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,60 @@ +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. diff --git a/my-evolution/Makefile.am b/my-evolution/Makefile.am index d7169f8d25..8d692a09d5 100644 --- a/my-evolution/Makefile.am +++ b/my-evolution/Makefile.am @@ -9,6 +9,10 @@ INCLUDES = \ -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ -DEVOLUTION_DATADIR=\""$(datadir)"\" \ + -DPREFIX=\"$(prefix)\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBDIR=\""$(datadir)"\" \ -DG_LOG_DOMAIN=\"evolution-executive-summary\" \ $(EVOLUTION_EXECUTIVE_SUMMARY_CFLAGS) @@ -22,7 +26,7 @@ MAIL_GENERATED = \ Mailer-stubs.c $(MAIL_GENERATED): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) `$(GNOME_CONFIG) --cflags idl` $(top_srcdir)/mail/Mailer.idl + $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(top_srcdir)/mail/Mailer.idl summary_sources = \ $(MAIL_GENERATED) \ @@ -109,7 +113,7 @@ oaf_DATA = $(oaf_files) gladedir = $(datadir)/evolution/glade glade_DATA = my-evolution.glade -@XML_I18N_MERGE_OAF_RULE@ +@INTLTOOL_SERVER_RULE@ EXTRA_DIST = \ $(summary_sources) \ diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c index eddc7ad82c..bb58f29c65 100644 --- a/my-evolution/component-factory.c +++ b/my-evolution/component-factory.c @@ -34,6 +34,8 @@ #include <gal/widgets/e-gui-utils.h> +#include <gtk/gtkmain.h> + #include "e-summary-factory.h" #include "e-summary-offline-handler.h" #include "e-summary.h" @@ -127,6 +129,7 @@ component_destroy (BonoboObject *factory, static BonoboObject * create_component (BonoboGenericFactory *factory, + const char *id, void *data) { EvolutionShellComponent *shell_component; @@ -145,12 +148,10 @@ create_component (BonoboGenericFactory *factory, NULL, NULL, NULL, NULL, NULL, NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "destroy", - GTK_SIGNAL_FUNC (component_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); + + g_signal_connect (shell_component, "destroy", G_CALLBACK (component_destroy), 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 (); gtk_object_set_data (GTK_OBJECT (shell_component), "offline-handler", @@ -174,5 +175,7 @@ component_factory_init (void) g_error ("Cannot register Evolution Summary component factory."); } +#if 0 /* Factory for the shlib case. */ BONOBO_OAF_SHLIB_FACTORY (COMPONENT_FACTORY_ID, "Evolution Summary component", create_component, NULL) +#endif diff --git a/my-evolution/e-cell-tri.h b/my-evolution/e-cell-tri.h index 52221e3cb6..413abcd556 100644 --- a/my-evolution/e-cell-tri.h +++ b/my-evolution/e-cell-tri.h @@ -24,9 +24,6 @@ #define __E_CELL_TRI_H__ #include <gal/e-table/e-cell-toggle.h> -#include <libgnome/gnome-defs.h> - -BEGIN_GNOME_DECLS typedef struct _ECellTri { ECellToggle parent; @@ -39,6 +36,4 @@ typedef struct _ECellTriClass { GtkType e_cell_tri_get_type (void); ECell *e_cell_tri_new (void); -END_GNOME_DECLS - #endif diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c index 7903c3642d..b218bd13c0 100644 --- a/my-evolution/e-summary-calendar.c +++ b/my-evolution/e-summary-calendar.c @@ -38,9 +38,6 @@ #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-moniker-util.h> -#include <bonobo-conf/bonobo-config-database.h> - -#include <liboaf/liboaf.h> #include <ical.h> @@ -510,7 +507,7 @@ e_summary_calendar_protocol (ESummary *summary, /* Get the factory */ CORBA_exception_init (&ev); - factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &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)", __FUNCTION__, CORBA_exception_id (&ev)); diff --git a/my-evolution/e-summary-factory.c b/my-evolution/e-summary-factory.c index 2a181aba74..a7a0018833 100644 --- a/my-evolution/e-summary-factory.c +++ b/my-evolution/e-summary-factory.c @@ -57,15 +57,14 @@ control_activate (BonoboControl *control, { Bonobo_UIContainer container; - container = bonobo_control_get_remote_ui_container (control); - bonobo_ui_component_set_container (ui_component, 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, verbs, summary); bonobo_ui_component_freeze (ui_component, NULL); - bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR, - "my-evolution.xml", "my-evolution"); + bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR, "my-evolution.xml", "my-evolution", NULL); e_pixmaps_update (ui_component, pixmaps); bonobo_ui_component_thaw (ui_component, NULL); @@ -76,7 +75,7 @@ control_deactivate (BonoboControl *control, BonoboUIComponent *ui_component, ESummary *summary) { - bonobo_ui_component_unset_container (ui_component); + bonobo_ui_component_unset_container (ui_component, NULL); } static void @@ -92,10 +91,9 @@ control_activate_cb (BonoboControl *control, Bonobo_ControlFrame control_frame; CORBA_Environment ev; - control_frame = bonobo_control_get_control_frame (control); - if (control_frame == NULL) { + control_frame = bonobo_control_get_control_frame (control, NULL); + if (control_frame == NULL) goto out; - } CORBA_exception_init (&ev); summary->shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, "IDL:GNOME/Evolution/ShellView:1.0", &ev); @@ -145,10 +143,8 @@ e_summary_factory_new_control (const char *uri, return NULL; } - gtk_signal_connect (GTK_OBJECT (control), "activate", - control_activate_cb, summary); - gtk_signal_connect (GTK_OBJECT (control), "destroy", - control_destroy_cb, summary); + 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. */ diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c index ef45d70d35..43235fc320 100644 --- a/my-evolution/e-summary-mail.c +++ b/my-evolution/e-summary-mail.c @@ -23,13 +23,14 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include <liboaf/liboaf.h> + #include <gal/widgets/e-unicode.h> -#include <libgnome/gnome-defs.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> @@ -37,6 +38,8 @@ #include <Evolution.h> #include <evolution-storage-listener.h> +#include <string.h> + #include "Mailer.h" #include "e-summary.h" #include "e-summary-mail.h" @@ -888,7 +891,7 @@ e_summary_folder_init_folder_store (GNOME_Evolution_Shell shell) folder_store->shell = shell; CORBA_exception_init (&ev); - folder_store->folder_info = oaf_activate_from_id (MAIL_IID, 0, NULL, &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)"); diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c index b231da9263..3f11ae4b4e 100644 --- a/my-evolution/e-summary-preferences.c +++ b/my-evolution/e-summary-preferences.c @@ -26,13 +26,11 @@ #include <gtk/gtk.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-config.h> #include <libgnomeui/gnome-propertybox.h> -#include <libgnomeui/gnome-stock.h> #include <glade/glade.h> #include <stdio.h> @@ -44,10 +42,12 @@ #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-widget.h> -#include <bonobo-conf/bonobo-config-database.h> - #include <shell/evolution-storage-set-view-listener.h> +#include <string.h> + +#include "e-util/e-config-listener.h" + #include "e-summary.h" #include "e-summary-preferences.h" #include "e-summary-table.h" @@ -238,98 +238,62 @@ vector_from_folder_list (GList *flist) gboolean e_summary_preferences_restore (ESummaryPrefs *prefs) { - Bonobo_ConfigDatabase db; - CORBA_Environment ev; + EConfigListener *config_listener; char *vector; + gboolean used_default; g_return_val_if_fail (prefs != NULL, FALSE); - CORBA_exception_init (&ev); - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Wombat. Using defaults"); - CORBA_exception_free (&ev); - return FALSE; - } + config_listener = e_config_listener_new (); - CORBA_exception_free (&ev); - vector = bonobo_config_get_string (db, "My-Evolution/Mail/display_folders-1.2", &ev); - if (BONOBO_EX (&ev)) { + vector = e_config_listener_get_string (config_listener, "My-Evolution/Mail/display_folders-1.2"); + if (vector == NULL) { g_warning ("Error getting Mail/display_folders. Using defaults"); - CORBA_exception_free (&ev); make_initial_mail_list (prefs); } else { prefs->display_folders = folder_list_from_vector (vector); g_free (vector); } - prefs->show_full_path = bonobo_config_get_boolean (db, "My-Evolution/Mail/show_full_path", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Mail/show_full_path. Using defaults"); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); - return FALSE; - } + prefs->show_full_path = e_config_listener_get_boolean (config_listener, "My-Evolution/Mail/show_full_path"); - - vector = bonobo_config_get_string (db, "My-Evolution/RDF/rdf_urls", &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting RDF/rdf_urls"); - CORBA_exception_free (&ev); - bonobo_object_release_unref (db, NULL); + vector = e_config_listener_get_string (config_listener, "My-Evolution/RDF/rdf_urls"); + if (vector == NULL) return FALSE; - } + prefs->rdf_urls = str_list_from_vector (vector); - g_free (vector); + g_free (vector); - prefs->rdf_refresh_time = bonobo_config_get_long_with_default (db, "My-Evolution/RDF/rdf_refresh_time", 600, NULL); + prefs->rdf_refresh_time = e_config_listener_get_long_with_default (config_listener, "My-Evolution/RDF/rdf_refresh_time", 600, NULL); - prefs->limit = bonobo_config_get_long_with_default (db, "My-Evolution/RDF/limit", 10, NULL); + prefs->limit = e_config_listener_get_long_with_default (config_listener, "My-Evolution/RDF/limit", 10, NULL); - vector = bonobo_config_get_string (db, "My-Evolution/Weather/stations", &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error getting Weather/stations"); - CORBA_exception_free (&ev); - bonobo_object_release_unref (db, NULL); + vector = e_config_listener_get_string (config_listener, "My-Evolution/Weather/stations"); + if (vector == NULL) return FALSE; - } + prefs->stations = str_list_from_vector (vector); - g_free (vector); + g_free (vector); - prefs->units = bonobo_config_get_long (db, "My-Evolution/Weather/units", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Weather/units. Using defaults"); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); + prefs->units = e_config_listener_get_long_with_default (config_listener, "My-Evolution/Weather/units", -1, &used_default); + if (used_default) return FALSE; - } - prefs->weather_refresh_time = bonobo_config_get_long (db, "My-Evolution/Weather/weather_refresh_time", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Weather/weather_refresh_time. Using defaults"); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); + prefs->weather_refresh_time = e_config_listener_get_long_with_default (config_listener, + "My-Evolution/Weather/weather_refresh_time", + -1, &used_default); + if (used_default) return FALSE; - } - - prefs->days = bonobo_config_get_long (db, "My-Evolution/Schedule/days", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Schedule/days. Using defaults"); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); + prefs->days = e_config_listener_get_long_with_default (config_listener, "My-Evolution/Schedule/days", -1, &used_default); + if (used_default) return FALSE; - } - prefs->show_tasks = bonobo_config_get_long (db, "My-Evolution/Schedule/show_tasks", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Error getting Schedule/show_tasks. Using defaults"); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); + prefs->show_tasks = e_config_listener_get_long_with_default (config_listener, "My-Evolution/Schedule/show_tasks", -1, &used_default); + if (&used_default) return FALSE; - } - bonobo_object_release_unref (db, NULL); + g_object_unref (config_listener); return TRUE; } @@ -337,49 +301,35 @@ e_summary_preferences_restore (ESummaryPrefs *prefs) void e_summary_preferences_save (ESummaryPrefs *prefs) { - Bonobo_ConfigDatabase db; - CORBA_Environment ev; + EConfigListener *config_listener; char *vector; - g_return_if_fail (prefs != NULL); - - CORBA_exception_init (&ev); - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - g_warning ("Cannot save preferences"); - CORBA_exception_free (&ev); - return; - } - CORBA_exception_free (&ev); + config_listener = e_config_listener_new (); vector = vector_from_folder_list (prefs->display_folders); - bonobo_config_set_string (db, "My-Evolution/Mail/display_folders-1.2", vector, NULL); + e_config_listener_set_string (config_listener, "My-Evolution/Mail/display_folders-1.2", vector); g_free (vector); - bonobo_config_set_boolean (db, "My-Evolution/Mail/show_full_path", prefs->show_full_path, NULL); + e_config_listener_set_boolean (config_listener, "My-Evolution/Mail/show_full_path", prefs->show_full_path); vector = vector_from_str_list (prefs->rdf_urls); - bonobo_config_set_string (db, "My-Evolution/RDF/rdf_urls", vector, NULL); + e_config_listener_set_string (config_listener, "My-Evolution/RDF/rdf_urls", vector); g_free (vector); - bonobo_config_set_long (db, "My-Evolution/RDF/rdf_refresh_time", prefs->rdf_refresh_time, NULL); - bonobo_config_set_long (db, "My-Evolution/RDF/limit", prefs->limit, NULL); + e_config_listener_set_long (config_listener, "My-Evolution/RDF/rdf_refresh_time", prefs->rdf_refresh_time); + e_config_listener_set_long (config_listener, "My-Evolution/RDF/limit", prefs->limit); vector = vector_from_str_list (prefs->stations); - bonobo_config_set_string (db, "My-Evolution/Weather/stations", vector, NULL); + e_config_listener_set_string (config_listener, "My-Evolution/Weather/stations", vector); g_free (vector); - bonobo_config_set_long (db, "My-Evolution/Weather/units", prefs->units, NULL); - bonobo_config_set_long (db, "My-Evolution/Weather/weather_refresh_time", prefs->weather_refresh_time, NULL); - - bonobo_config_set_long (db, "My-Evolution/Schedule/days", prefs->days, NULL); - bonobo_config_set_long (db, "My-Evolution/Schedule/show_tasks", prefs->show_tasks, NULL); + e_config_listener_set_long (config_listener, "My-Evolution/Weather/units", prefs->units); + e_config_listener_set_long (config_listener, "My-Evolution/Weather/weather_refresh_time", prefs->weather_refresh_time); - CORBA_exception_init (&ev); - Bonobo_ConfigDatabase_sync (db, &ev); - CORBA_exception_free (&ev); + e_config_listener_set_long (config_listener, "My-Evolution/Schedule/days", prefs->days); + e_config_listener_set_long (config_listener, "My-Evolution/Schedule/show_tasks", prefs->show_tasks); - bonobo_object_release_unref (db, NULL); + g_object_unref (config_listener); } static void @@ -786,8 +736,8 @@ add_dialog_clicked_cb (GtkWidget *widget, PropertyData *pd) { if (button == 0) { - char *url; - char *name; + const char *url; + const char *name; name = gtk_entry_get_text (GTK_ENTRY (pd->new_name_entry)); url = gtk_entry_get_text (GTK_ENTRY (pd->new_url_entry)); @@ -1482,6 +1432,7 @@ config_control_destroy_cb (EvolutionConfigControl *config_control, static BonoboObject * factory_fn (BonoboGenericFactory *generic_factory, + const char *id, void *data) { PropertyData *pd; @@ -1489,7 +1440,7 @@ factory_fn (BonoboGenericFactory *generic_factory, pd = g_new0 (PropertyData, 1); - pd->xml = glade_xml_new (EVOLUTION_GLADEDIR "/my-evolution.glade", NULL); + 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"); diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index f5ba7e2eaf..4dd5f05a69 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -31,14 +31,14 @@ #include <gnome-xml/parser.h> #include <gnome-xml/xmlmemory.h> -#include <libgnome/gnome-defs.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 { diff --git a/my-evolution/e-summary-shown.c b/my-evolution/e-summary-shown.c index 340488f2da..4896083198 100644 --- a/my-evolution/e-summary-shown.c +++ b/my-evolution/e-summary-shown.c @@ -27,9 +27,15 @@ #include <stdio.h> #include <string.h> -#include <gtk/gtkhbox.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> @@ -48,8 +54,6 @@ #include <gal/e-table/e-tree-table-adapter.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> -#include <libgnomeui/gnome-stock.h> #include "e-summary-shown.h" @@ -204,18 +208,17 @@ e_summary_shown_class_init (GtkObjectClass *object_class) shown_signals[ITEM_CHANGED] = gtk_signal_new ("item-changed", GTK_RUN_LAST, - object_class->type, + 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, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESummaryShownClass, selection_changed), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, shown_signals, LAST_SIGNAL); } static gboolean @@ -483,12 +486,12 @@ static GtkWidget * construct_pixmap_button (const char *text, const char *image) { - GtkWidget *box, *button, *pixmap, *label; + GtkWidget *box, *button, *image_widget, *label; box = gtk_hbox_new (FALSE, 1); - pixmap = gnome_stock_pixmap_widget (NULL, image); - gtk_box_pack_start (GTK_BOX (box), pixmap, FALSE, FALSE, 0); + image_widget = gtk_image_new_from_stock (image, 48); + gtk_box_pack_start (GTK_BOX (box), image_widget, FALSE, FALSE, 0); label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); @@ -683,5 +686,3 @@ e_summary_shown_get_selection (ESummaryShown *shown, return list; } - - diff --git a/my-evolution/e-summary-table.c b/my-evolution/e-summary-table.c index ac4bf7f49a..7edc82e0b4 100644 --- a/my-evolution/e-summary-table.c +++ b/my-evolution/e-summary-table.c @@ -29,6 +29,7 @@ #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> @@ -46,7 +47,6 @@ #include <gal/e-table/e-tree-table-adapter.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> #include "e-summary-table.h" #include "e-cell-tri.h" @@ -249,7 +249,7 @@ set_value_at (ETreeModel *etm, if (entry->editable == TRUE) { entry->shown = GPOINTER_TO_INT (val) == 1 ? FALSE : TRUE; - gtk_signal_emit (GTK_OBJECT (est), table_signals[ITEM_CHANGED], path); + g_signal_emit (est, table_signals[ITEM_CHANGED], 0, path); } } @@ -326,12 +326,11 @@ e_summary_table_class_init (GtkObjectClass *object_class) table_signals[ITEM_CHANGED] = gtk_signal_new ("item-changed", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESummaryTableClass, item_changed), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, table_signals, LAST_SIGNAL); } static void diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c index 84cbb9256f..854043afdb 100644 --- a/my-evolution/e-summary-tasks.c +++ b/my-evolution/e-summary-tasks.c @@ -41,8 +41,6 @@ #include <bonobo/bonobo-listener.h> #include <bonobo/bonobo-moniker-util.h> #include <bonobo/bonobo-object.h> -#include <bonobo-conf/bonobo-config-database.h> -#include <liboaf/liboaf.h> #define MAX_RELOAD_TRIES 10 @@ -454,7 +452,7 @@ e_summary_tasks_protocol (ESummary *summary, /* Get the factory */ CORBA_exception_init (&ev); - factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &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)", __FUNCTION__, CORBA_exception_id (&ev)); diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index b065527ead..286a910220 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -28,12 +28,13 @@ #include <gtk/gtkctree.h> #include <gtk/gtkmain.h> -#include <libgnome/gnome-defs.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" @@ -410,7 +411,7 @@ e_summary_weather_init_locations (void) iter = gnome_config_init_iterator (state_path); while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) { - if (strstr (iter_key, "loc") != NULL) { + if (strstr ((const char *) iter_key, "loc") != NULL) { char **locdata; int nlocdata; ESummaryWeatherLocation *location; diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 4c66167482..072e7c4d5f 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -31,9 +31,10 @@ #include <fcntl.h> #include <glib.h> -#include <libgnome/gnome-defs.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> @@ -48,17 +49,27 @@ #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-moniker-util.h> #include <bonobo/bonobo-ui-component.h> -#include <bonobo-conf/bonobo-config-database.h> -#include <libgnome/gnome-paper.h> #include <libgnome/gnome-url.h> #include <libgnomeprint/gnome-print-master.h> -#include <libgnomeprint/gnome-print-master-preview.h> + +#include <libgnomeprintui/gnome-print-master-preview.h> +#include <libgnomeprintui/gnome-print-dialog.h> + +#include <gtk/gtkdialog.h> #include <gui/alarm-notify/alarm.h> #include <cal-util/timeutil.h> +#include <gtk/gtkmain.h> +#include <gtk/gtkscrolledwindow.h> + +#include <string.h> +#include <unistd.h> + +#include "e-util/e-config-listener.h" + #include "e-summary.h" #include "e-summary-preferences.h" #include "my-evolution-html.h" @@ -327,7 +338,7 @@ e_summary_url_clicked (GtkHTML *html, protocol_end = strchr (url, ':'); if (protocol_end == NULL) { /* No url, let gnome work it out */ - gnome_url_show (url); + gnome_url_show (url, NULL); return; } @@ -339,7 +350,7 @@ e_summary_url_clicked (GtkHTML *html, if (protocol_listener == NULL) { /* Again, let gnome work it out */ - gnome_url_show (url); + gnome_url_show (url, NULL); return; } @@ -478,8 +489,7 @@ alarm_fn (gpointer alarm_id, static void e_summary_init (ESummary *summary) { - Bonobo_ConfigDatabase db; - CORBA_Environment ev; + EConfigListener *config_listener; ESummaryPrivate *priv; GdkColor bgcolor = {0, 0xffff, 0xffff, 0xffff}; time_t t, day_end; @@ -520,24 +530,18 @@ e_summary_init (ESummary *summary) priv->protocol_hash = NULL; priv->connections = NULL; - CORBA_exception_init (&ev); - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) { - CORBA_exception_free (&ev); - g_warning ("Error getting Wombat. Using defaults"); - return; - } + config_listener = e_config_listener_new (); - summary->timezone = bonobo_config_get_string_with_default (db, - "/Calendar/Display/Timezone", "UTC", NULL); + summary->timezone = e_config_listener_get_string_with_default (config_listener, + "/Calendar/Display/Timezone", "UTC", + NULL); if (!summary->timezone || !summary->timezone[0]) { g_free (summary->timezone); summary->timezone = g_strdup ("UTC"); } summary->tz = icaltimezone_get_builtin_timezone (summary->timezone); - bonobo_object_release_unref (db, NULL); - CORBA_exception_free (&ev); + g_object_unref (config_listener); t = time (NULL); if (summary->tz == NULL) { @@ -585,53 +589,39 @@ do_summary_print (ESummary *summary, { GnomePrintContext *print_context; GnomePrintMaster *print_master; - GnomePrintDialog *gpd; - GnomePrinter *printer = NULL; - int copies = 1; - int collate = FALSE; + GtkWidget *gpd; + GnomePrintConfig *config = NULL; - if (!preview) { - gpd = GNOME_PRINT_DIALOG (gnome_print_dialog_new (_("Print Summary"), GNOME_PRINT_DIALOG_COPIES)); - gnome_dialog_set_default (GNOME_DIALOG (gpd), GNOME_PRINT_PRINT); + if (! preview) { + gpd = gnome_print_dialog_new (_("Print Summary"), GNOME_PRINT_DIALOG_COPIES); - switch (gnome_dialog_run (GNOME_DIALOG (gpd))) { - case GNOME_PRINT_PRINT: + switch (gtk_dialog_run (GTK_DIALOG (gpd))) { + case GNOME_PRINT_DIALOG_RESPONSE_PRINT: break; - case GNOME_PRINT_PREVIEW: + case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW: preview = TRUE; break; - case -1: - return; - default: - gnome_dialog_close (GNOME_DIALOG (gpd)); + gtk_widget_destroy (gpd); return; } - gnome_print_dialog_get_copies (gpd, &copies, &collate); - printer = gnome_print_dialog_get_printer (gpd); - gnome_dialog_close (GNOME_DIALOG (gpd)); + config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (gpd)); } - print_master = gnome_print_master_new (); + print_master = gnome_print_master_new_from_config (config); - if (printer) { - gnome_print_master_set_printer (print_master, printer); - } - gnome_print_master_set_copies (print_master, copies, collate); print_context = gnome_print_master_get_context (print_master); gtk_html_print (GTK_HTML (summary->priv->html), print_context); gnome_print_master_close (print_master); if (preview) { - gboolean landscape = FALSE; - GnomePrintMasterPreview *preview; + GtkWidget *preview; - preview = gnome_print_master_preview_new_with_orientation ( - print_master, _("Print Preview"), landscape); - gtk_widget_show (GTK_WIDGET (preview)); + preview = gnome_print_master_preview_new (print_master, _("Print Preview")); + gtk_widget_show (preview); } else { int result = gnome_print_master_print (print_master); diff --git a/my-evolution/main.c b/my-evolution/main.c index 6932bce4f4..7ac3337ea1 100644 --- a/my-evolution/main.c +++ b/my-evolution/main.c @@ -32,12 +32,10 @@ #include <gdk/gdk.h> #include <gdk/gdkrgb.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> +#include <libgnomeui/gnome-ui-init.h> #include <bonobo/bonobo-main.h> -#include <liboaf/liboaf.h> #include <e-util/e-proxy.h> @@ -54,32 +52,19 @@ int main (int argc, char **argv) { - CORBA_ORB orb; + /* Make ElectricFence work. */ + free (malloc (10)); 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 (); - if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - g_error (_("Executive summary component could not initialize Bonobo.\n")); - exit (1); - } - - gconf_init (argc, argv, NULL); - - glade_gnome_init (); + gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution Summary"), + NULL); e_cursors_init (); - e_proxy_init (); - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - /* Start our component */ component_factory_init (); diff --git a/my-evolution/metar.c b/my-evolution/metar.c index 53d630eff4..c49d651954 100644 --- a/my-evolution/metar.c +++ b/my-evolution/metar.c @@ -12,9 +12,10 @@ #include <regex.h> #include <math.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> +#include <string.h> + #include "e-summary.h" #include "weather.h" |