diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-04 00:43:18 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-04 00:43:18 +0800 |
commit | 8691f8584f1c892c93db43d0a2633a5746b28258 (patch) | |
tree | 9696e644f35c8788f175cd957f94845598a267c8 /shell | |
parent | 0ff7c1f97322f3e0f2c4c1bca6c9bef7cf9453c6 (diff) | |
download | gsoc2013-evolution-8691f8584f1c892c93db43d0a2633a5746b28258.tar.gz gsoc2013-evolution-8691f8584f1c892c93db43d0a2633a5746b28258.tar.zst gsoc2013-evolution-8691f8584f1c892c93db43d0a2633a5746b28258.zip |
Renamed from GNOME_Evolution_Shell.oaf.in.
* GNOME_Evolution_Shell.server.in: Renamed from
GNOME_Evolution_Shell.oaf.in.
* Makefile.am: Port from OAF to bonobo-activation.
(INCLUDES): Define SYSCONFDIR, DATADIR, LIBDIR.
* main.c (main): Use gnome_program_init().
* e-corba-storage-registry.c (e_corba_storage_registry_new):
g_object_new(), not gtk_type_new().
(impl_finalize): New, ported over from destroy.
(destroy): Removed.
(class_init): Install finalize handler, not destroy handler, since
we are not a GtkObject anymore.
* e-corba-storage.c (e_corba_storage_new): g_object_new(), not
gtk_type_new().
* e-shell.c (class_init): Override finalize, not destroy.
(impl_finalize): Finalize implementation, basically the old
destroy renamed.
(e_shell_new): g_object_new(), not gtk_type_new().
(class_init): Use e_shell_marshal_NONE__INT for
line_status_changed instead of using an ENUM.
(e_shell_construct): Use g_signal_connect_object() instead of
gtk_signal_connect_while_alive().
* e-setup.c (e_setup): Do not unref local_folder if NULL.
* e-folder.c (init): Make not floating.
(e_folder_construct): No need to make it floating here anymore.
* e-shell.c (impl_Shell_selectUserFolder): For now don't set
dialog parent from xid.
* main.c (no_views_left_cb): Add missing GTK_SIGNAL_FUNC() cast.
(new_view_created_callback): Likewise.
(warning_dialog_clicked_callback): Update to use the
EConfigListener from the shell instead of bonobo-conf.
(show_development_warning): Likewise.
(upgrade_from_1_0_if_needed): BONOBO_EX_ID -> BONOBO_EX_REPOID.
(idle_cb): Use bonobo-activation and BONOBO_EX_REPOID().
(main): Cleaned up the various things that are unneeded in GNOME
2.
(upgrade_from_1_0_if_needed): Use EConfigListener.
* evolution-storage-set-view.h, evolution-storage-set-view.c:
BonoboXObjectified.
* e-storage.c (class_init): GLIB2-ified and made to use
e-shell-marshal.h.
(ES_CLASS): Use GTK_OBJECT_GET_CLASS().
(e_storage_new_folder): Added missing GTK_SIGNAL_FUNC() prototype.
* e-storage-set.c (class_init): GLIB2-ified and made to use
e-shell-marshal.h.
* e-storage-set-view.c (popup_folder_menu): For now, do not add
the pop-up since we lack bonobo_ui_container_get_win() and I am
not sure how to work around it.
(popup_folder_menu): Pass self as the for_widget arg to
gnome_popup_menu_do_popup_modal().
(class_init): GLIB2-ified, and got to use e-shell-marshal.h.
(marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING): Removed.
(impl_tree_drag_data_get): Don't set the selection for now -- we
have to fix the CORBA target stuff to match GTK 2.
(e_storage_set_view_construct): Pass NULL as the opt_ev arg to
bonobo_ui_component_set_container().
* e-splash.c: #include <libgnomecanvas/gnome-canvas-pixbuf.h>
instead of <gdk-pixbuf/gnome-canvas-pixbuf.h>.
(e_splash_new): Pass NULL as the error arg to
gdk_pixbuf_new_from_file().
* e-shortcuts.c (class_init): GLIB2-ified. Also use the
e-shell-marshal marshallers.
(e_shortcuts_new_view): Add missing GTK_SIGNAL_FUNC() cast.
* e-shortcuts-view.c: Use GTK_STOCK_* stuff instead of
GNOME_STOCK_* stuff.
(pop_up_right_click_menu_for_group): Pass self as the for_widget
arg to gnome_popup_menu_do_popup_modal().
(pop_up_right_click_menu_for_shortcut): Likewise.
(class_init): GLIB2-ified.
* e-shell.c: Do not #include <gal/util/e-unicode-i18n.h> or
#include <libgnome/gnome-defs.h>.
(set_interactive): Use BONOBO_EX_REPOID().
(setup_local_storage): Use _() not U_().
(destroy): Use gtk_widget_destroy() instead of
gtk_object_destroy() on priv->settings_dialog.
(class_init): GLIB2-ized.
(init): Initialize config_listener member.
(get_icon_path_for_component_info): Port to bonobo-activation from
OAF.
(setup_components): Likewise.
(destroy): Likewise.
(e_shell_construct): Use e_setup_check_config(), not
e_setup_check_db (). Use the e_config_listener instead of
bonobo-conf.
(save_settings_for_views): Likewise.
(save_misc_settings): Likewise.
(e_shell_restore_from_settings): Likewise.
(parse_default_uri): Likewise.
(e_shell_component_maybe_crashed): Pass NULL for opt_ev arg to
bonobo_unkown_ping()
(e_shell_component_maybe_crashed): Use
bonobo_engine_deregister_dead_components() instead of
bonobo_window_deregister_component_by_ref() which is no more.
(e_shell_send_receive): BONOBO_EX_REPOID() instead of
BONOBO_EX_ID().
(e_shell_get_config_listener): Return the config_listener.
* e-shell-view.c (find_inbox_in_storage): Use _() instead of U_().
(load_images): Pass NULL as the error arg to
gdk_pixbuf_new_from_file().
(load_images): Likewise.
(find_inbox_in_storage): Work around the lack of
g_utf8_strcasecmp() in glib-2.0.
(class_init): GLIB2-ified. Also, use the marshallers in
e-shell-marshal.h.
(pop_up_folder_bar): Use gtk_window_move()/gtk_widget_show()
instead gtk_widget_popup().
(unmerge_on_error): Work around the death of
bonobo_ui_component_get_win() and
bonobo_window_deregister_component_by_ref().
(e_shell_view_construct): Pass NULL as the uic arg to
bonobo_window_construct(). Add missing GTK_SIGNAL_FUNC() cast.
Match the new BonoboWindow behavior wrt the UIContainer and the
new opt_ev args.
(display_uri): Use bonobo_ui_engine_freeze() and
bonobo_ui_engine_thaw() since bonobo_window_freeze() and
bonobo_window_thaw() got axed [sigh].
(e_shell_view_save_settings): Use EConfigListener.
(e_shell_view_load_settings): Likewise.
(get_view_for_uri): Use bonobo_widget_new_control_from_objref()
instead of e_bonobo_widget_new_control_from_objref().
* e-shell-view-menu.c (command_help_faq): Pass NULL for the error
arg to gnome_url_show().
(command_about_box): Use GtkDialog instead of a GtkWindow of a
type GTK_WINDOW_DIALOG [which does not exist anymore].
(command_xml_dump): Removed.
(menu_do_misc): Do not add the corresponding verb.
* e-shell-user-creatable-items-handler.c (execute_verb): Use
BONOBO_EX_REPOID().
* e-shell-startup-wizard.c: Remove id member from SWData. Replace
member db with config_listener.
(e_shell_startup_wizard_create): Initialize config_listener.
(make_mail_dialog_pages): Do not set the listener id here.
(druid_event_notify_cb): Pass FALSE as the help_sensitive arg to
gnome_druid_set_buttons_sensitive().
(e_shell_startup_wizard_create): Likewise.
(make_mail_dialog_pages): Use bonobo-activation instead of OAF.
(get_intelligent_importers): Likewise.
(prepare_importer_page): Likewise.
(start_importers): Do nothing here for now.
(finish_func): Constify local variable displayname.
(finish_func): Updated to use the config_listener instead of the
bono-conf db.
(prepare_importer_page): Do not actually run the importer yet.
(e_shell_startup_wizard_create): Pass NULL as the domain arg to
glade_xml_new(). Use the config_listener.
* e-shell-shared-folder-picker-dialog.c (user_clicked):
BONOBO_EX_REPOID() instead of BONOBO_EX_ID().
(setup_name_selector): Likewise.
(setup_name_selector): Use bonobo-activation.
(show_dialog): Pass NULL as the domain arg to glade_xml_new().
(setup_name_selector): Add a missing GTK_SIGNAL_FUNC() cast.
* e-shell-settings-dialog.c: #include
<bonobo-activation/bonobo-activation.h>. Use
Bonobo_ActivationProperty instead of OAF_Property.
(set_dialog_size): Use gtk_style_get_font() to get the font from
the widget->style.
(load_pages): Converted to use bonobo-activation instead of OAF.
Pass NULL as the error arg to gdk_pixbuf_new_from_file().
* e-shell-offline-sync.c (sync_folder): BONOBO_EX_REPOID(), not
BONOBO_EX_ID().
(e_shell_offline_sync_all_folders): For now, avoid doing anything
[see changes to e-shell-config-offline.c below].
(setup_progress_listener): #if 0 for now.
(setup_dialog): Likewise.
(sync_folder): Likewise.
(cleanup): Likewise.
(progress_listener_servant_free): Likewise.
(progress_listener_servant_new): Likewise.
(impl_SyncFolderProgressListener_updateProgress): Likewise.
(impl_SyncFolderProgressListener_reportSuccess): Likewise.
(impl_SyncFolderProgressListener_reportFailure): Likewise.
(progress_dialog_close_callback): Likewise.
(progress_dialog_clicked_callback): Likewise.
* e-shell-offline-handler.c (prepare_for_offline): Use
BONOBO_EX_REPOID().
(pop_up_confirmation_dialog): Pass NULL as the domain arg to
glade_xml_new().
(class_init): GLIB2-ified.
* Makefile.am: Do not compile e-shell-importer.c,
e-shell-importer.h for now.
* e-shell-folder-title-bar.c (get_max_clipped_label_width): Use
gtk_style_get_font() to retrieve the font.
(class_init): GLIB2-ified.
(e_shell_folder_title_bar_construct): Get {x,y}thickness from
widget->style, not from widget->style->klass.
* e-shell-folder-selection-dialog.c: #include <string.h>,
<gtk/gtklabel.h> and <gtk/gtksignal.h>.
(class_init): GLIB2-ified.
* e-shell-folder-creation-dialog.c: No <libgnome/gnome-defs.h>,
add some GTK includes.
(e_shell_show_folder_creation_dialog): Pass NULL as the domain arg
to glade_xml_new(). Added missing GTK_SIGNAL_FUNC() cast.
* e-shell-folder-commands.c: Do not #include
<libgnomeui/gnome-stock.h> and #include
<bonobo-conf/Bonobo_Config.h>.
* e-shell-config-default-folders.c: Replace member db in
EvolutionDefaultFolderConfig with config_listener.
(e_shell_config_default_folders_create_widget): Init here.
(config_control_destroy_cb): Unref here.
(config_control_apply_cb): Use EConfigListener instead of
BonoboConf.
(setup_folder_selector): Likewise.
(e_shell_config_default_folders_create_widget): Pass NULL as the
domain arg to glade_xml_new().
* e-shell-config-offline.c (config_control_apply_callback): For
now, do not change the configuration. [Needs to be ported to
EConfigListener or something, but we were storing a sequence using
typecodes here and there is no trivial way to do that right now.]
(init_storage_set_view_status_from_config): Likewise, do not
retrieve the configuration here.
svn path=/trunk/; revision=18510
Diffstat (limited to 'shell')
37 files changed, 773 insertions, 542 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index ff25dda60f..b7ce8773a4 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,250 @@ +2002-11-03 Ettore Perazzoli <ettore@ximian.com> + + * GNOME_Evolution_Shell.server.in: Renamed from + GNOME_Evolution_Shell.oaf.in. + + * Makefile.am: Port from OAF to bonobo-activation. + (INCLUDES): Define SYSCONFDIR, DATADIR, LIBDIR. + + * main.c (main): Use gnome_program_init(). + + * e-corba-storage-registry.c (e_corba_storage_registry_new): + g_object_new(), not gtk_type_new(). + (impl_finalize): New, ported over from destroy. + (destroy): Removed. + (class_init): Install finalize handler, not destroy handler, since + we are not a GtkObject anymore. + + * e-corba-storage.c (e_corba_storage_new): g_object_new(), not + gtk_type_new(). + + * e-shell.c (class_init): Override finalize, not destroy. + (impl_finalize): Finalize implementation, basically the old + destroy renamed. + (e_shell_new): g_object_new(), not gtk_type_new(). + (class_init): Use e_shell_marshal_NONE__INT for + line_status_changed instead of using an ENUM. + (e_shell_construct): Use g_signal_connect_object() instead of + gtk_signal_connect_while_alive(). + + * e-setup.c (e_setup): Do not unref local_folder if NULL. + + * e-folder.c (init): Make not floating. + (e_folder_construct): No need to make it floating here anymore. + + * e-shell.c (impl_Shell_selectUserFolder): For now don't set + dialog parent from xid. + + * main.c (no_views_left_cb): Add missing GTK_SIGNAL_FUNC() cast. + (new_view_created_callback): Likewise. + (warning_dialog_clicked_callback): Update to use the + EConfigListener from the shell instead of bonobo-conf. + (show_development_warning): Likewise. + (upgrade_from_1_0_if_needed): BONOBO_EX_ID -> BONOBO_EX_REPOID. + (idle_cb): Use bonobo-activation and BONOBO_EX_REPOID(). + (main): Cleaned up the various things that are unneeded in GNOME + 2. + (upgrade_from_1_0_if_needed): Use EConfigListener. + + * evolution-storage-set-view.h, evolution-storage-set-view.c: + BonoboXObjectified. + + * e-storage.c (class_init): GLIB2-ified and made to use + e-shell-marshal.h. + (ES_CLASS): Use GTK_OBJECT_GET_CLASS(). + (e_storage_new_folder): Added missing GTK_SIGNAL_FUNC() prototype. + + * e-storage-set.c (class_init): GLIB2-ified and made to use + e-shell-marshal.h. + + * e-storage-set-view.c (popup_folder_menu): For now, do not add + the pop-up since we lack bonobo_ui_container_get_win() and I am + not sure how to work around it. + (popup_folder_menu): Pass self as the for_widget arg to + gnome_popup_menu_do_popup_modal(). + (class_init): GLIB2-ified, and got to use e-shell-marshal.h. + (marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING): Removed. + (impl_tree_drag_data_get): Don't set the selection for now -- we + have to fix the CORBA target stuff to match GTK 2. + (e_storage_set_view_construct): Pass NULL as the opt_ev arg to + bonobo_ui_component_set_container(). + + * e-splash.c: #include <libgnomecanvas/gnome-canvas-pixbuf.h> + instead of <gdk-pixbuf/gnome-canvas-pixbuf.h>. + (e_splash_new): Pass NULL as the error arg to + gdk_pixbuf_new_from_file(). + + * e-shortcuts.c (class_init): GLIB2-ified. Also use the + e-shell-marshal marshallers. + (e_shortcuts_new_view): Add missing GTK_SIGNAL_FUNC() cast. + + * e-shortcuts-view.c: Use GTK_STOCK_* stuff instead of + GNOME_STOCK_* stuff. + (pop_up_right_click_menu_for_group): Pass self as the for_widget + arg to gnome_popup_menu_do_popup_modal(). + (pop_up_right_click_menu_for_shortcut): Likewise. + (class_init): GLIB2-ified. + + * e-shell.c: Do not #include <gal/util/e-unicode-i18n.h> or + #include <libgnome/gnome-defs.h>. + (set_interactive): Use BONOBO_EX_REPOID(). + (setup_local_storage): Use _() not U_(). + (destroy): Use gtk_widget_destroy() instead of + gtk_object_destroy() on priv->settings_dialog. + (class_init): GLIB2-ized. + (init): Initialize config_listener member. + (get_icon_path_for_component_info): Port to bonobo-activation from + OAF. + (setup_components): Likewise. + (destroy): Likewise. + (e_shell_construct): Use e_setup_check_config(), not + e_setup_check_db (). Use the e_config_listener instead of + bonobo-conf. + (save_settings_for_views): Likewise. + (save_misc_settings): Likewise. + (e_shell_restore_from_settings): Likewise. + (parse_default_uri): Likewise. + (e_shell_component_maybe_crashed): Pass NULL for opt_ev arg to + bonobo_unkown_ping() + (e_shell_component_maybe_crashed): Use + bonobo_engine_deregister_dead_components() instead of + bonobo_window_deregister_component_by_ref() which is no more. + (e_shell_send_receive): BONOBO_EX_REPOID() instead of + BONOBO_EX_ID(). + (e_shell_get_config_listener): Return the config_listener. + + * e-shell-view.c (find_inbox_in_storage): Use _() instead of U_(). + (load_images): Pass NULL as the error arg to + gdk_pixbuf_new_from_file(). + (load_images): Likewise. + (find_inbox_in_storage): Work around the lack of + g_utf8_strcasecmp() in glib-2.0. + (class_init): GLIB2-ified. Also, use the marshallers in + e-shell-marshal.h. + (pop_up_folder_bar): Use gtk_window_move()/gtk_widget_show() + instead gtk_widget_popup(). + (unmerge_on_error): Work around the death of + bonobo_ui_component_get_win() and + bonobo_window_deregister_component_by_ref(). + (e_shell_view_construct): Pass NULL as the uic arg to + bonobo_window_construct(). Add missing GTK_SIGNAL_FUNC() cast. + Match the new BonoboWindow behavior wrt the UIContainer and the + new opt_ev args. + (display_uri): Use bonobo_ui_engine_freeze() and + bonobo_ui_engine_thaw() since bonobo_window_freeze() and + bonobo_window_thaw() got axed [sigh]. + (e_shell_view_save_settings): Use EConfigListener. + (e_shell_view_load_settings): Likewise. + (get_view_for_uri): Use bonobo_widget_new_control_from_objref() + instead of e_bonobo_widget_new_control_from_objref(). + + * e-shell-view-menu.c (command_help_faq): Pass NULL for the error + arg to gnome_url_show(). + (command_about_box): Use GtkDialog instead of a GtkWindow of a + type GTK_WINDOW_DIALOG [which does not exist anymore]. + (command_xml_dump): Removed. + (menu_do_misc): Do not add the corresponding verb. + + * e-shell-user-creatable-items-handler.c (execute_verb): Use + BONOBO_EX_REPOID(). + + * e-shell-startup-wizard.c: Remove id member from SWData. Replace + member db with config_listener. + (e_shell_startup_wizard_create): Initialize config_listener. + (make_mail_dialog_pages): Do not set the listener id here. + (druid_event_notify_cb): Pass FALSE as the help_sensitive arg to + gnome_druid_set_buttons_sensitive(). + (e_shell_startup_wizard_create): Likewise. + (make_mail_dialog_pages): Use bonobo-activation instead of OAF. + (get_intelligent_importers): Likewise. + (prepare_importer_page): Likewise. + (start_importers): Do nothing here for now. + (finish_func): Constify local variable displayname. + (finish_func): Updated to use the config_listener instead of the + bono-conf db. + (prepare_importer_page): Do not actually run the importer yet. + (e_shell_startup_wizard_create): Pass NULL as the domain arg to + glade_xml_new(). Use the config_listener. + + * e-shell-shared-folder-picker-dialog.c (user_clicked): + BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). + (setup_name_selector): Likewise. + (setup_name_selector): Use bonobo-activation. + (show_dialog): Pass NULL as the domain arg to glade_xml_new(). + (setup_name_selector): Add a missing GTK_SIGNAL_FUNC() cast. + + * e-shell-settings-dialog.c: #include + <bonobo-activation/bonobo-activation.h>. Use + Bonobo_ActivationProperty instead of OAF_Property. + (set_dialog_size): Use gtk_style_get_font() to get the font from + the widget->style. + (load_pages): Converted to use bonobo-activation instead of OAF. + Pass NULL as the error arg to gdk_pixbuf_new_from_file(). + + * e-shell-offline-sync.c (sync_folder): BONOBO_EX_REPOID(), not + BONOBO_EX_ID(). + (e_shell_offline_sync_all_folders): For now, avoid doing anything + [see changes to e-shell-config-offline.c below]. + (setup_progress_listener): #if 0 for now. + (setup_dialog): Likewise. + (sync_folder): Likewise. + (cleanup): Likewise. + (progress_listener_servant_free): Likewise. + (progress_listener_servant_new): Likewise. + (impl_SyncFolderProgressListener_updateProgress): Likewise. + (impl_SyncFolderProgressListener_reportSuccess): Likewise. + (impl_SyncFolderProgressListener_reportFailure): Likewise. + (progress_dialog_close_callback): Likewise. + (progress_dialog_clicked_callback): Likewise. + + * e-shell-offline-handler.c (prepare_for_offline): Use + BONOBO_EX_REPOID(). + (pop_up_confirmation_dialog): Pass NULL as the domain arg to + glade_xml_new(). + (class_init): GLIB2-ified. + + * Makefile.am: Do not compile e-shell-importer.c, + e-shell-importer.h for now. + + * e-shell-folder-title-bar.c (get_max_clipped_label_width): Use + gtk_style_get_font() to retrieve the font. + (class_init): GLIB2-ified. + (e_shell_folder_title_bar_construct): Get {x,y}thickness from + widget->style, not from widget->style->klass. + + * e-shell-folder-selection-dialog.c: #include <string.h>, + <gtk/gtklabel.h> and <gtk/gtksignal.h>. + (class_init): GLIB2-ified. + + * e-shell-folder-creation-dialog.c: No <libgnome/gnome-defs.h>, + add some GTK includes. + (e_shell_show_folder_creation_dialog): Pass NULL as the domain arg + to glade_xml_new(). Added missing GTK_SIGNAL_FUNC() cast. + + * e-shell-folder-commands.c: Do not #include + <libgnomeui/gnome-stock.h> and #include + <bonobo-conf/Bonobo_Config.h>. + + * e-shell-config-default-folders.c: Replace member db in + EvolutionDefaultFolderConfig with config_listener. + (e_shell_config_default_folders_create_widget): Init here. + (config_control_destroy_cb): Unref here. + (config_control_apply_cb): Use EConfigListener instead of + BonoboConf. + (setup_folder_selector): Likewise. + (e_shell_config_default_folders_create_widget): Pass NULL as the + domain arg to glade_xml_new(). + + * e-shell-config-offline.c (config_control_apply_callback): For + now, do not change the configuration. [Needs to be ported to + EConfigListener or something, but we were storing a sequence using + typecodes here and there is no trivial way to do that right now.] + (init_storage_set_view_status_from_config): Likewise, do not + retrieve the configuration here. + + * e-shell-marshal.list: Removed duplicates, added a bunch new + marshallers. + 2002-11-02 Ettore Perazzoli <ettore@ximian.com> * e-shell-config-autocompletion.c: No bonobo-conf; removed member diff --git a/shell/GNOME_Evolution_Shell.server.in b/shell/GNOME_Evolution_Shell.server.in new file mode 100644 index 0000000000..54d80530d9 --- /dev/null +++ b/shell/GNOME_Evolution_Shell.server.in @@ -0,0 +1,51 @@ +<oaf_info> + + <oaf_server iid="OAFIID:GNOME_Evolution_Shell" + type="exe" + location="evolution"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/Evolution/Shell:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + _value="The Evolution shell."/> + </oaf_server> + + <oaf_server iid="OAFIID:GNOME_Evolution_Shell_Config_Factory" + type="exe" + location="evolution-exchange-storage"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/GenericFactory:1.0"/> + </oaf_attribute> + </oaf_server> + + <oaf_server iid="OAFIID:GNOME_Evolution_Shell_Config_FolderSettings_Control" + type="factory" + location="OAFIID:GNOME_Evolution_Shell_Config_Factory"> + + <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="Folder Settings"/> + + <oaf_attribute name="evolution:config_item:description" type="string" + _value="Configure special folders and offline folder behavior here"/> + + <oaf_attribute name="evolution:config_item:icon_name" type="string" + value="folder-settings.png"/> + + <oaf_attribute name="evolution:config_item:priority" type="string" value="-9"/> + + <oaf_attribute name="evolution:config_item:type" type="stringv"> + <item value="shell"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + _value="Configuration control for Evolution folder settings."/> + </oaf_server> + +</oaf_info> diff --git a/shell/Makefile.am b/shell/Makefile.am index 8d92499d89..ee072d1854 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -14,6 +14,9 @@ INCLUDES = \ -DEVOLUTION_GLADEDIR=\"$(datadir)/evolution/glade\" \ -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ -DPREFIX=\"$(prefix)\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBDIR=\""$(datadir)"\" \ -DG_LOG_DOMAIN=\"evolution-shell\" \ $(SHELL_CFLAGS) @@ -174,8 +177,6 @@ evolution_SOURCES = \ e-shell-folder-selection-dialog.h \ e-shell-folder-title-bar.c \ e-shell-folder-title-bar.h \ - e-shell-importer.c \ - e-shell-importer.h \ e-shell-offline-handler.c \ e-shell-offline-handler.h \ e-shell-offline-sync.c \ @@ -224,42 +225,44 @@ evolution_SOURCES = \ evolution_LDADD = \ libeshell.la \ - importer/libevolution-importer.la \ $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.a \ $(top_builddir)/widgets/misc/libemiscwidgets.a \ $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/libical/src/libical/libical-evolution.la \ $(SHELL_LIBS) +# FIXME +# importer/libevolution-importer.la \ + # Test component -noinst_PROGRAMS = \ - evolution-test-component +# noinst_PROGRAMS = \ +# evolution-test-component -evolution_test_component_SOURCES = \ - evolution-test-component.c +# evolution_test_component_SOURCES = \ +# evolution-test-component.c -evolution_test_component_LDADD = \ - libeshell.la \ - $(SHELL_LIBS) +# evolution_test_component_LDADD = \ +# libeshell.la \ +# $(SHELL_LIBS) -install-test-component: evolution-test-component - $(mkinstalldirs) $(DESTDIR)$(bindir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-test-component $(DESTDIR)$(bindir)/evolution-test-component - $(mkinstalldirs) $(DESTDIR)$(oafdir) - $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.oaf $(DESTDIR)$(oafdir)/GNOME_Evolution_TestComponent.oaf +# install-test-component: evolution-test-component +# $(mkinstalldirs) $(DESTDIR)$(bindir) +# $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-test-component $(DESTDIR)$(bindir)/evolution-test-component +# $(mkinstalldirs) $(DESTDIR)$(serverdir) +# $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.server $(DESTDIR)$(serverdir)/GNOME_Evolution_TestComponent.server # Misc stuff -oafdir = $(datadir)/oaf -oaf_in_files = GNOME_Evolution_Shell.oaf.in -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) +serverdir = $(libdir)/bonobo/servers +server_in_files = GNOME_Evolution_Shell.server.in +server_DATA = $(server_in_files:.server.in=.server) etspecdir = $(datadir)/evolution/etspec/ etspec_DATA = \ e-storage-set-view.etspec -@XML_I18N_MERGE_OAF_RULE@ +@INTLTOOL_SERVER_RULE@ icons = \ check-empty.xpm \ @@ -285,11 +288,11 @@ MARSHAL_GENERATED = e-shell-marshal.c e-shell-marshal.h EXTRA_DIST = \ $(IDLS) \ - $(oaf_in_files) \ - $(oaf_DATA) \ + $(server_in_files) \ + $(server_DATA) \ $(etspec_DATA) \ $(icons) \ - GNOME_Evolution_TestComponent.oaf \ + GNOME_Evolution_TestComponent.server \ evolution-nognome.in # Purify support @@ -317,4 +320,8 @@ if HAVE_DTAPPINTEGRATE bin_SCRIPTS = evolution-nognome -endif
\ No newline at end of file +endif + +# FIXME TODO: +# e-shell-importer.c +# e-shell-importer.h diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c index d50dfa33ee..a867e47a44 100644 --- a/shell/e-corba-storage-registry.c +++ b/shell/e-corba-storage-registry.c @@ -387,10 +387,10 @@ impl_StorageRegistry_getFolderByUri (PortableServer_Servant servant, } -/* GtkObject methods. */ +/* GObject methods. */ static void -destroy (GtkObject *object) +impl_finalize (GObject *object) { ECorbaStorageRegistry *corba_storage_registry; ECorbaStorageRegistryPrivate *priv; @@ -402,7 +402,7 @@ destroy (GtkObject *object) gtk_object_unref (GTK_OBJECT (priv->storage_set)); g_free (priv); - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + (* G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -411,11 +411,11 @@ destroy (GtkObject *object) static void class_init (ECorbaStorageRegistryClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; POA_GNOME_Evolution_StorageRegistry__epv *epv; - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; + object_class = G_OBJECT_CLASS (klass); + object_class->finalize = impl_finalize; epv = & klass->epv; epv->addStorage = impl_StorageRegistry_addStorage; @@ -464,7 +464,7 @@ e_corba_storage_registry_new (EStorageSet *storage_set) g_return_val_if_fail (storage_set != NULL, NULL); g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - corba_storage_registry = gtk_type_new (e_corba_storage_registry_get_type ()); + corba_storage_registry = g_object_new (e_corba_storage_registry_get_type (), NULL); e_corba_storage_registry_construct (corba_storage_registry, storage_set); diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c index e90411b7d9..b94f796e8a 100644 --- a/shell/e-corba-storage.c +++ b/shell/e-corba-storage.c @@ -731,7 +731,7 @@ e_corba_storage_new (const GNOME_Evolution_Storage storage_interface, g_return_val_if_fail (storage_interface != CORBA_OBJECT_NIL, NULL); g_return_val_if_fail (name != NULL, NULL); - new = gtk_type_new (e_corba_storage_get_type ()); + new = g_object_new (e_corba_storage_get_type (), NULL); e_corba_storage_construct (E_CORBA_STORAGE (new), storage_interface, name); diff --git a/shell/e-folder.c b/shell/e-folder.c index 54587eac3a..bf129d44fe 100644 --- a/shell/e-folder.c +++ b/shell/e-folder.c @@ -181,6 +181,8 @@ init (EFolder *folder) priv->custom_icon_name = NULL; folder->priv = priv; + + GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (folder), GTK_FLOATING); } @@ -197,8 +199,6 @@ e_folder_construct (EFolder *folder, g_return_if_fail (name != NULL); g_return_if_fail (type != NULL); - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (folder), GTK_FLOATING); - priv = folder->priv; priv->name = g_strdup (name); diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c index 734246d28d..3da916f5fb 100644 --- a/shell/e-local-folder.c +++ b/shell/e-local-folder.c @@ -283,7 +283,7 @@ construct_loading_metadata (ELocalFolder *local_folder, } root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp (root->name, "efolder") != 0) { + if (root == NULL || root->name == NULL || strcmp (root->name, "efolder") != 0) { g_free (metadata_path); xmlFreeDoc (doc); return FALSE; diff --git a/shell/e-setup.c b/shell/e-setup.c index 220f68b4d5..5be3e16aef 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -402,7 +402,8 @@ e_setup (const char *evolution_directory) g_free (old); } - gtk_object_unref (GTK_OBJECT (local_folder)); + if (local_folder != NULL) + gtk_object_unref (GTK_OBJECT (local_folder)); } g_free (file); diff --git a/shell/e-shell-config-default-folders.c b/shell/e-shell-config-default-folders.c index 7875cb4128..333ec2c0a8 100644 --- a/shell/e-shell-config-default-folders.c +++ b/shell/e-shell-config-default-folders.c @@ -29,6 +29,8 @@ #include "evolution-folder-selector-button.h" +#include "e-util/e-config-listener.h" + #include <glade/glade-xml.h> #include <gtk/gtktogglebutton.h> #include <gtk/gtksignal.h> @@ -45,7 +47,7 @@ typedef struct { char *calendar_uri, *calendar_path; char *tasks_uri, *tasks_path; - Bonobo_ConfigDatabase db; + EConfigListener *config_listener; EvolutionShellClient *shell_client; } EvolutionDefaultFolderConfig; @@ -82,20 +84,22 @@ static void config_control_apply_cb (EvolutionConfigControl *control, EvolutionDefaultFolderConfig *dfc) { - bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_path", dfc->mail_path, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_uri", dfc->mail_uri, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_path", dfc->contacts_path, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_uri", dfc->contacts_uri, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_path", dfc->calendar_path, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_uri", dfc->calendar_uri, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_path", dfc->tasks_path, NULL); - bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_uri", dfc->tasks_uri, NULL); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/mail_path", dfc->mail_path); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/mail_uri", dfc->mail_uri); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/contacts_path", dfc->contacts_path); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/contacts_uri", dfc->contacts_uri); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/calendar_path", dfc->calendar_path); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/calendar_uri", dfc->calendar_uri); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/tasks_path", dfc->tasks_path); + e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/tasks_uri", dfc->tasks_uri); } static void config_control_destroy_cb (EvolutionConfigControl *config_control, EvolutionDefaultFolderConfig *dfc) { + g_object_unref (dfc->config_listener); + g_free (dfc->mail_uri); g_free (dfc->mail_path); g_free (dfc->contacts_uri); @@ -124,8 +128,8 @@ setup_folder_selector (EvolutionDefaultFolderConfig *dfc, { GtkWidget *button; - *path_ptr = bonobo_config_get_string (dfc->db, path_dbpath, NULL); - *uri_ptr = bonobo_config_get_string (dfc->db, uri_dbpath, NULL); + *path_ptr = e_config_listener_get_string_with_default (dfc->config_listener, path_dbpath, NULL, NULL); + *uri_ptr = e_config_listener_get_string_with_default (dfc->config_listener, uri_dbpath, NULL, NULL); button = glade_xml_get_widget (dfc->glade, widget_name); evolution_folder_selector_button_construct ( @@ -148,14 +152,15 @@ e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigCont GtkWidget *widget; dfc = g_new0 (EvolutionDefaultFolderConfig, 1); - dfc->db = e_shell_get_config_db (shell); + + dfc->config_listener = e_config_listener_new (); CORBA_exception_init (&ev); shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev); CORBA_exception_free (&ev); dfc->shell_client = evolution_shell_client_new (shell_dup); - dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL); + dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL, NULL); setup_folder_selector (dfc, "default_mail_button", &dfc->mail_path, "/DefaultFolders/mail_path", diff --git a/shell/e-shell-config-folder-settings.c b/shell/e-shell-config-folder-settings.c index 25a3d1a3ff..0805c00448 100644 --- a/shell/e-shell-config-folder-settings.c +++ b/shell/e-shell-config-folder-settings.c @@ -35,7 +35,6 @@ #include "Evolution.h" -#include <bonobo-conf/Bonobo_Config.h> #include <bonobo/bonobo-exception.h> #include <libgnome/gnome-i18n.h> diff --git a/shell/e-shell-config-offline.c b/shell/e-shell-config-offline.c index 638f7f7af5..205bb9d3f6 100644 --- a/shell/e-shell-config-offline.c +++ b/shell/e-shell-config-offline.c @@ -30,13 +30,16 @@ #include "evolution-config-control.h" #include "e-storage-set-view.h" +#include "e-util/e-config-listener.h" + #include "Evolution.h" -#include <bonobo-conf/Bonobo_Config.h> #include <bonobo/bonobo-exception.h> #include <gal/widgets/e-scroll-frame.h> + #include <gtk/gtkwidget.h> +#include <gtk/gtksignal.h> struct _PageData { @@ -64,6 +67,7 @@ static void config_control_apply_callback (EvolutionConfigControl *config_control, void *data) { +#if 0 CORBA_Environment ev; CORBA_sequence_CORBA_string *paths; CORBA_any any; @@ -98,6 +102,7 @@ config_control_apply_callback (EvolutionConfigControl *config_control, CORBA_exception_free (&ev); g_list_free (checked_paths); +#endif } static void @@ -117,6 +122,7 @@ static void init_storage_set_view_status_from_config (EStorageSetView *storage_set_view, EShell *shell) { +#if 0 Bonobo_ConfigDatabase config_db; CORBA_Environment ev; CORBA_any *any; @@ -155,6 +161,7 @@ init_storage_set_view_status_from_config (EStorageSetView *storage_set_view, CORBA_free (any); CORBA_exception_free (&ev); +#endif } static gboolean diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index 4af143c920..8fa237ae0b 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -28,22 +28,23 @@ #include "e-util/e-request.h" +#include "e-shell-constants.h" +#include "e-shell-folder-creation-dialog.h" +#include "e-shell-folder-selection-dialog.h" +#include "e-shell-utils.h" + #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-unicode.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-dialog.h> -#include <libgnomeui/gnome-stock.h> #include <gtk/gtklabel.h> #include <gtk/gtksignal.h> #include <gtk/gtkentry.h> -#include "e-shell-constants.h" -#include "e-shell-folder-creation-dialog.h" -#include "e-shell-folder-selection-dialog.h" -#include "e-shell-utils.h" +#include <string.h> /* Utility functions. */ diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index 40688966ac..7ee73563ec 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -25,9 +25,12 @@ #endif #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> + +#include <gtk/gtkoptionmenu.h> +#include <gtk/gtkmenuitem.h> + #include <glade/glade-xml.h> #include <gal/util/e-util.h> @@ -489,7 +492,7 @@ e_shell_show_folder_creation_dialog (EShell *shell, g_return_if_fail (shell != NULL); g_return_if_fail (E_IS_SHELL (shell)); - gui = glade_xml_new (GLADE_FILE_NAME, NULL); + gui = glade_xml_new (GLADE_FILE_NAME, NULL, NULL); if (gui == NULL) { g_warning ("Cannot load Glade description file for the folder creation dialog -- %s", GLADE_FILE_NAME); @@ -532,7 +535,7 @@ e_shell_show_folder_creation_dialog (EShell *shell, GTK_SIGNAL_FUNC (folder_name_entry_changed_cb), dialog_data); gtk_signal_connect (GTK_OBJECT (dialog_data->storage_set_view), "folder_selected", - storage_set_view_folder_selected_cb, dialog_data); + GTK_SIGNAL_FUNC (storage_set_view_folder_selected_cb), dialog_data); gtk_signal_connect_while_alive (GTK_OBJECT (shell), "destroy", GTK_SIGNAL_FUNC (shell_destroy_cb), dialog_data, diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c index 64884c4445..3c9df7cbce 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -24,7 +24,14 @@ #include <config.h> #endif -#include <libgnomeui/gnome-stock.h> +#include "e-shell-folder-selection-dialog.h" + +#include "e-shell-constants.h" +#include "e-storage-set-view.h" +#include "e-storage-set.h" + +#include "e-shell-folder-creation-dialog.h" + #include <libgnomeui/gnome-dialog.h> #include <libgnome/gnome-i18n.h> @@ -32,13 +39,10 @@ #include <gal/widgets/e-scroll-frame.h> #include <gal/widgets/e-gui-utils.h> -#include "e-shell-constants.h" -#include "e-storage-set-view.h" -#include "e-storage-set.h" +#include <gtk/gtksignal.h> +#include <gtk/gtklabel.h> -#include "e-shell-folder-creation-dialog.h" - -#include "e-shell-folder-selection-dialog.h" +#include <string.h> #define PARENT_TYPE (gnome_dialog_get_type ()) @@ -267,7 +271,7 @@ class_init (EShellFolderSelectionDialogClass *klass) signals[FOLDER_SELECTED] = gtk_signal_new ("folder_selected", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellFolderSelectionDialogClass, folder_selected), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, @@ -276,12 +280,10 @@ class_init (EShellFolderSelectionDialogClass *klass) signals[CANCELLED] = gtk_signal_new ("cancelled", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellFolderSelectionDialogClass, cancelled), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c index 80257a6d50..a5ed4ef7ff 100644 --- a/shell/e-shell-folder-title-bar.c +++ b/shell/e-shell-folder-title-bar.c @@ -29,7 +29,6 @@ #include <gtk/gtkrc.h> #include <gtk/gtksignal.h> #include <gtk/gtktogglebutton.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gdk-pixbuf/gdk-pixbuf.h> @@ -199,7 +198,7 @@ get_max_clipped_label_width (EClippedLabel *clipped_label) GdkFont *font; int width; - font = GTK_WIDGET (clipped_label)->style->font; + font = gtk_style_get_font (GTK_WIDGET (clipped_label)->style); width = gdk_string_width (font, clipped_label->label); width += 2 * GTK_MISC (clipped_label)->xpad; @@ -458,7 +457,7 @@ class_init (EShellFolderTitleBarClass *klass) signals[TITLE_TOGGLED] = gtk_signal_new ("title_toggled", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, title_toggled), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, @@ -466,19 +465,17 @@ class_init (EShellFolderTitleBarClass *klass) signals[BACK_CLICKED] = gtk_signal_new ("back_clicked", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, back_clicked), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[FORWARD_CLICKED] = gtk_signal_new ("forward_clicked", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellFolderTitleBarClass, forward_clicked), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -578,8 +575,8 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) as the padding is hardcoded in GtkButton too (see CHILD_SPACING in gtkbutton.c). */ gtk_misc_set_padding (GTK_MISC (priv->title_label), - GTK_WIDGET (priv->title_button)->style->klass->xthickness, - GTK_WIDGET (priv->title_button)->style->klass->ythickness + 2); + GTK_WIDGET (priv->title_button)->style->xthickness, + GTK_WIDGET (priv->title_button)->style->ythickness + 2); gtk_signal_connect (GTK_OBJECT (priv->title_button), "toggled", GTK_SIGNAL_FUNC (title_button_toggled_cb), folder_title_bar); diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index af16efb532..dc2e66d928 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -29,17 +29,12 @@ #include <unistd.h> #include <glib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnomeui/gnome-druid.h> -#include <libgnomeui/gnome-druid-page-finish.h> -#include <libgnomeui/gnome-druid-page-standard.h> -#include <libgnomeui/gnome-druid-page-start.h> #include <libgnomeui/gnome-file-entry.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-dialog.h> -#include <liboaf/liboaf.h> +#include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-widget.h> @@ -336,7 +331,7 @@ get_name_from_component_info (const OAF_ServerInfo *info) property = oaf_server_info_prop_find ((OAF_ServerInfo *) info, "evolution:menu-name"); - if (property == NULL || property->v._d != OAF_P_STRING) + if (property == NULL || property->v._d != Bonobo_ACTIVATION_P_STRING) return NULL; name = property->v._u.value_string; diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c index 99adcaa27c..034b722ded 100644 --- a/shell/e-shell-offline-handler.c +++ b/shell/e-shell-offline-handler.c @@ -41,6 +41,7 @@ #include <glade/glade-xml.h> #include <bonobo/bonobo-main.h> +#include <bonobo/bonobo-exception.h> #define GLADE_DIALOG_FILE_NAME EVOLUTION_GLADEDIR "/e-active-connection-dialog.glade" @@ -421,7 +422,8 @@ prepare_for_offline (EShellOfflineHandler *offline_handler) GNOME_Evolution_Offline_prepareForOffline (offline_interface, &active_connection_list, &ev); if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("Cannot prepare component component to go offline -- %s [%s]", id, ev._repo_id); + g_warning ("Cannot prepare component component to go offline -- %s [%s]", + id, BONOBO_EX_REPOID (&ev)); progress_listener_servant_free (progress_listener_servant); @@ -632,7 +634,7 @@ pop_up_confirmation_dialog (EShellOfflineHandler *offline_handler) priv = offline_handler->priv; if (priv->dialog_gui == NULL) { - priv->dialog_gui = glade_xml_new (GLADE_DIALOG_FILE_NAME, NULL); + priv->dialog_gui = glade_xml_new (GLADE_DIALOG_FILE_NAME, NULL, NULL); if (priv->dialog_gui == NULL) { g_warning ("Cannot load the active connection dialog (installation problem?) -- %s", GLADE_DIALOG_FILE_NAME); @@ -706,7 +708,7 @@ class_init (EShellOfflineHandlerClass *klass) signals[OFFLINE_PROCEDURE_STARTED] = gtk_signal_new ("offline_procedure_started", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellOfflineHandlerClass, offline_procedure_started), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -714,13 +716,11 @@ class_init (EShellOfflineHandlerClass *klass) signals[OFFLINE_PROCEDURE_FINISHED] = gtk_signal_new ("offline_procedure_finished", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellOfflineHandlerClass, offline_procedure_finished), gtk_marshal_NONE__BOOL, GTK_TYPE_NONE, 1, GTK_TYPE_BOOL); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } diff --git a/shell/e-shell-offline-sync.c b/shell/e-shell-offline-sync.c index f48b4a9eb6..7dc48bc6fa 100644 --- a/shell/e-shell-offline-sync.c +++ b/shell/e-shell-offline-sync.c @@ -39,7 +39,6 @@ #include <gtk/gtksignal.h> #include <libgnomeui/gnome-dialog.h> -#include <libgnomeui/gnome-stock.h> #include <libgnome/gnome-i18n.h> #include <bonobo/bonobo-main.h> @@ -85,6 +84,7 @@ struct _SyncData { /* The progress listener interface. */ +#if 0 /* FIXME */ static PortableServer_ServantBase__epv SyncFolderProgressListener_base_epv; static POA_GNOME_Evolution_SyncFolderProgressListener__epv SyncFolderProgressListener_epv; static POA_GNOME_Evolution_SyncFolderProgressListener__vepv SyncFolderProgressListener_vepv; @@ -209,10 +209,12 @@ setup_progress_listener (SyncData *sync_data) return TRUE; } +#endif /* Setting up the progress dialog. */ +#if 0 static int progress_dialog_close_callback (GnomeDialog *dialog, void *data) @@ -256,8 +258,10 @@ setup_dialog (SyncData *sync_data) gtk_widget_show_all (sync_data->dialog); } +#endif +#if 0 /* Sync the folder at the specified @folder_path. */ static void sync_folder (SyncData *sync_data, @@ -335,7 +339,7 @@ sync_folder (SyncData *sync_data, sync_data->progress_listener_objref, &ev); if (BONOBO_EX (&ev)) { - g_warning ("Error invoking ::syncFolder -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Error invoking ::syncFolder -- %s", BONOBO_EX_REPOID (&ev)); CORBA_free (corba_folder); CORBA_exception_free (&ev); return; @@ -364,7 +368,9 @@ sync_folder (SyncData *sync_data, CORBA_free (corba_folder); CORBA_exception_free (&ev); } +#endif +#if 0 /* Free up the data needed for syncing. */ static void cleanup (SyncData *sync_data) @@ -386,12 +392,14 @@ cleanup (SyncData *sync_data) CORBA_exception_free (&ev); } +#endif void e_shell_offline_sync_all_folders (EShell *shell, GtkWindow *parent_window) { +#if 0 /* FIXME */ Bonobo_ConfigDatabase config_db; CORBA_sequence_CORBA_string *folder_path_sequence; CORBA_any *any; @@ -443,10 +451,10 @@ e_shell_offline_sync_all_folders (EShell *shell, break; } } - done: cleanup (sync_data); CORBA_free (folder_path_sequence); CORBA_exception_free (&ev); +#endif } diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index 6034a7ea74..106e1c8e97 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -35,7 +35,8 @@ #include <bonobo/bonobo-widget.h> #include <bonobo/bonobo-exception.h> -#include <liboaf/liboaf.h> + +#include <bonobo-activation/bonobo-activation.h> #include <string.h> @@ -59,7 +60,7 @@ set_dialog_size (EShellSettingsDialog *dialog) GdkFont *font; int width, height; - font = GTK_WIDGET (dialog)->style->font; + font = gtk_style_get_font (GTK_WIDGET (dialog)->style); width = gdk_string_width (font, "M") * 72; height = (font->ascent + font->descent) * 35; @@ -73,7 +74,7 @@ struct _Page { char *title; char *description; GdkPixbuf *icon; - OAF_Property *type; + Bonobo_ActivationProperty *type; int priority; EConfigPage *page_widget; }; @@ -83,7 +84,7 @@ static Page * page_new (const char *title, const char *description, GdkPixbuf *icon, - OAF_Property *type, + Bonobo_ActivationProperty *type, int priority, EConfigPage *page_widget) { @@ -141,7 +142,7 @@ static void load_pages (EShellSettingsDialog *dialog) { EShellSettingsDialogPrivate *priv; - OAF_ServerInfoList *control_list; + Bonobo_ServerInfoList *control_list; CORBA_Environment ev; GSList *language_list; GList *page_list; @@ -152,9 +153,9 @@ load_pages (EShellSettingsDialog *dialog) CORBA_exception_init (&ev); - control_list = oaf_query ("defined(evolution:config_item:title)", NULL, &ev); + control_list = bonobo_activation_query ("defined(evolution:config_item:title)", NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION || control_list == NULL) { - g_warning ("Cannot load configuration pages -- %s", ev._repo_id); + g_warning ("Cannot load configuration pages -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); return; } @@ -164,45 +165,45 @@ load_pages (EShellSettingsDialog *dialog) page_list = NULL; for (i = 0; i < control_list->_length; i ++) { CORBA_Object corba_object; - OAF_ServerInfo *info; + Bonobo_ServerInfo *info; const char *title; const char *description; const char *icon_path; const char *priority_string; - OAF_Property *type; + Bonobo_ActivationProperty *type; int priority; GdkPixbuf *icon; info = & control_list->_buffer[i]; - title = oaf_server_info_prop_lookup (info, "evolution:config_item:title", language_list); - description = oaf_server_info_prop_lookup (info, "evolution:config_item:description", language_list); - icon_path = oaf_server_info_prop_lookup (info, "evolution:config_item:icon_name", NULL); - type = oaf_server_info_prop_find (info, "evolution:config_item:type"); - priority_string = oaf_server_info_prop_lookup (info, "evolution:config_item:priority", NULL); + title = bonobo_server_info_prop_lookup (info, "evolution:config_item:title", language_list); + description = bonobo_server_info_prop_lookup (info, "evolution:config_item:description", language_list); + icon_path = bonobo_server_info_prop_lookup (info, "evolution:config_item:icon_name", NULL); + type = bonobo_server_info_prop_find (info, "evolution:config_item:type"); + priority_string = bonobo_server_info_prop_lookup (info, "evolution:config_item:priority", NULL); if (icon_path == NULL) { icon = NULL; } else { if (g_path_is_absolute (icon_path)) { - icon = gdk_pixbuf_new_from_file (icon_path); + icon = gdk_pixbuf_new_from_file (icon_path, NULL); } else { char *real_icon_path; real_icon_path = g_concat_dir_and_file (EVOLUTION_IMAGES, icon_path); - icon = gdk_pixbuf_new_from_file (real_icon_path); + icon = gdk_pixbuf_new_from_file (real_icon_path, NULL); g_free (real_icon_path); } } - if (type != NULL && type->v._d != OAF_P_STRINGV) + if (type != NULL && type->v._d != Bonobo_ACTIVATION_P_STRINGV) type = NULL; if (priority_string == NULL) priority = 0xffff; else priority = atoi (priority_string); - corba_object = oaf_activate_from_id ((char *) info->iid, 0, NULL, &ev); + corba_object = bonobo_activation_activate_from_id ((char *) info->iid, 0, NULL, &ev); if (! BONOBO_EX (&ev)) { Page *page; @@ -212,7 +213,7 @@ load_pages (EShellSettingsDialog *dialog) page_list = g_list_prepend (page_list, page); } else { - g_warning ("Cannot activate %s -- %s", info->iid, BONOBO_EX_ID (&ev)); + g_warning ("Cannot activate %s -- %s", info->iid, BONOBO_EX_REPOID (&ev)); } if (icon != NULL) @@ -232,7 +233,7 @@ load_pages (EShellSettingsDialog *dialog) page->page_widget); if (page->type != NULL) { - GNOME_stringlist list = page->type->v._u.value_stringv; + Bonobo_StringList list = page->type->v._u.value_stringv; for (j = 0; j < list._length; j++) { if (g_hash_table_lookup (priv->types, list._buffer[j]) == NULL) diff --git a/shell/e-shell-shared-folder-picker-dialog.c b/shell/e-shell-shared-folder-picker-dialog.c index 2c9c9858bd..e9fb66f544 100644 --- a/shell/e-shell-shared-folder-picker-dialog.c +++ b/shell/e-shell-shared-folder-picker-dialog.c @@ -36,7 +36,6 @@ #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-unicode.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-dialog.h> #include <libgnome/gnome-i18n.h> #include <glade/glade.h> @@ -45,7 +44,10 @@ #include <bonobo/bonobo-listener.h> #include <bonobo/bonobo-widget.h> +#include <bonobo-activation/bonobo-activation.h> + #include <gtk/gtk.h> +#include <gtk/gtksignal.h> /* Timeout for showing the progress dialog (msecs). */ @@ -89,9 +91,9 @@ user_clicked (GtkWidget *button, GNOME_Evolution_Addressbook_SelectNames corba_i CORBA_exception_init (&ev); GNOME_Evolution_Addressbook_SelectNames_activateDialog (corba_iface, "User", &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Cannot activate SelectNames dialog -- %s", BONOBO_EX_ID (&ev)); - } + if (BONOBO_EX (&ev)) + g_warning ("Cannot activate SelectNames dialog -- %s", BONOBO_EX_REPOID (&ev)); + CORBA_exception_free (&ev); } @@ -110,23 +112,23 @@ setup_name_selector (GladeXML *glade_xml) CORBA_exception_init (&ev); - corba_iface = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Addressbook_SelectNames", - 0, NULL, &ev); + corba_iface = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Addressbook_SelectNames", + 0, NULL, &ev); if (corba_iface == CORBA_OBJECT_NIL || BONOBO_EX (&ev)) { - g_warning ("Cannot activate SelectNames -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot activate SelectNames -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); return CORBA_OBJECT_NIL; } GNOME_Evolution_Addressbook_SelectNames_addSectionWithLimit (corba_iface, "User", "User", 1, &ev); if (BONOBO_EX (&ev)) { - g_warning ("Cannot add SelectNames section -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot add SelectNames section -- %s", BONOBO_EX_REPOID (&ev)); goto err; } control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (corba_iface, "User", &ev); if (BONOBO_EX (&ev)) { - g_warning ("Cannot get SelectNames section -- %s", BONOBO_EX_ID (&ev)); + g_warning ("Cannot get SelectNames section -- %s", BONOBO_EX_REPOID (&ev)); goto err; } @@ -135,8 +137,7 @@ setup_name_selector (GladeXML *glade_xml) gtk_widget_show (control_widget); button = glade_xml_get_widget (glade_xml, "button-user"); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - user_clicked, corba_iface); + gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (user_clicked), corba_iface); CORBA_exception_free (&ev); return control_widget; @@ -221,7 +222,7 @@ show_dialog (EShell *shell, int button_num; glade_xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-shared-folder-picker-dialog.glade", - NULL); + NULL, NULL); g_assert (glade_xml != NULL); name_selector_widget = setup_name_selector (glade_xml); diff --git a/shell/e-shell-startup-wizard.c b/shell/e-shell-startup-wizard.c index 3de62204dc..dacf62ead1 100644 --- a/shell/e-shell-startup-wizard.c +++ b/shell/e-shell-startup-wizard.c @@ -32,22 +32,21 @@ #include <gtk/gtk.h> #include <gnome.h> #include <glade/glade.h> -#include <liboaf/liboaf.h> #include <bonobo/bonobo-object.h> #include <bonobo/bonobo-widget.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-moniker-util.h> -#include <bonobo-conf/bonobo-config-database.h> + +#include <bonobo-activation/bonobo-activation.h> #include <gal/widgets/e-gui-utils.h> #include <widgets/e-timezone-dialog/e-timezone-dialog.h> -#include "importer/GNOME_Evolution_Importer.h" - #include "e-timezone-dialog/e-timezone-dialog.h" #include "e-util/e-gtk-utils.h" +#include "e-util/e-config-listener.h" #include <evolution-wizard.h> #include "Evolution.h" @@ -96,9 +95,8 @@ typedef struct _SWData { CORBA_Object mailer; Bonobo_EventSource event_source; BonoboListener *listener; - int id; - Bonobo_ConfigDatabase db; + EConfigListener *config_listener; } SWData; typedef struct _IntelligentImporterData { @@ -134,7 +132,8 @@ druid_event_notify_cb (BonoboListener *listener, gnome_druid_set_buttons_sensitive (GNOME_DRUID (data->druid), (buttons & 4) >> 2, (buttons & 2) >> 1, - (buttons & 1)); + (buttons & 1), + FALSE); } else if (strcmp (name, EVOLUTION_WIZARD_SET_SHOW_FINISH) == 0) { gnome_druid_set_show_finish (GNOME_DRUID (data->druid), (gboolean) *((CORBA_boolean *) arg->_value)); @@ -153,7 +152,7 @@ make_mail_dialog_pages (SWData *data) CORBA_Object object; CORBA_exception_init (&ev); - data->mailer = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Mail_Wizard", 0, NULL, &ev); + data->mailer = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Mail_Wizard", 0, NULL, &ev); if (BONOBO_EX (&ev)) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Could not start the Evolution Mailer Assistant interface\n(%s)"), CORBA_exception_id (&ev)); @@ -177,8 +176,9 @@ make_mail_dialog_pages (SWData *data) gtk_signal_connect (GTK_OBJECT (data->listener), "event-notify", GTK_SIGNAL_FUNC (druid_event_notify_cb), data); object = bonobo_object_corba_objref (BONOBO_OBJECT (data->listener)); + CORBA_exception_init (&ev); - data->id = Bonobo_EventSource_addListener (data->event_source, object, &ev); + Bonobo_EventSource_addListener (data->event_source, object, &ev); CORBA_exception_free (&ev); } @@ -263,6 +263,7 @@ free_importers (SWData *data) static void start_importers (GList *p) { +#if 0 CORBA_Environment ev; for (; p; p = p->next) { @@ -276,6 +277,7 @@ start_importers (GList *p) } CORBA_exception_free (&ev); } +#endif } static void @@ -335,7 +337,8 @@ finish_func (GnomeDruidPage *page, SWData *data) { CORBA_Environment ev; - char *displayname, *tz; + const char *displayname; + char *tz; icaltimezone *zone; /* Notify mailer */ @@ -344,7 +347,6 @@ finish_func (GnomeDruidPage *page, CORBA_exception_free (&ev); /* Set Timezone */ - CORBA_exception_init (&ev); e_timezone_dialog_get_timezone (E_TIMEZONE_DIALOG (data->timezone_page->etd), &displayname); /* We know it is a builtin timezone, as that is all the user can change @@ -355,9 +357,8 @@ finish_func (GnomeDruidPage *page, else tz = g_strdup (icaltimezone_get_location (zone)); - bonobo_config_set_string (data->db, "/Calendar/Display/Timezone", tz, &ev); + e_config_listener_set_string (data->config_listener, "/Calendar/Display/Timezone", tz); g_free (tz); - CORBA_exception_free (&ev); do_import (data); @@ -598,17 +599,17 @@ make_timezone_page (SWData *data) static GList * get_intelligent_importers (void) { - OAF_ServerInfoList *info_list; + Bonobo_ServerInfoList *info_list; GList *iids_ret = NULL; CORBA_Environment ev; int i; CORBA_exception_init (&ev); - info_list = oaf_query ("repo_ids.has ('IDL:GNOME/Evolution/IntelligentImporter:1.0')", NULL, &ev); + info_list = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/IntelligentImporter:1.0')", NULL, &ev); CORBA_exception_free (&ev); for (i = 0; i < info_list->_length; i++) { - const OAF_ServerInfo *info; + const Bonobo_ServerInfo *info; info = info_list->_buffer + i; iids_ret = g_list_prepend (iids_ret, g_strdup (info->iid)); @@ -654,25 +655,27 @@ prepare_importer_page (GnomeDruidPage *page, if (importers == NULL) { /* No importers, go directly to finish, do not pass go Do not collect $200 */ - gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->finish)) -; + gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->finish)); gtk_widget_destroy (dialog); return TRUE; } table = gtk_table_new (g_list_length (importers), 2, FALSE); for (l = importers; l; l = l->next) { +#if 0 GtkWidget *label; - IntelligentImporterData *id; CORBA_Environment ev; gboolean can_run; char *str; +#endif + IntelligentImporterData *id; id = g_new0 (IntelligentImporterData, 1); id->iid = g_strdup (l->data); +#if 0 /* FIXME */ CORBA_exception_init (&ev); - id->object = oaf_activate_from_id ((char *) id->iid, 0, NULL, &ev); + id->object = bonobo_activation_activate_from_id ((char *) id->iid, 0, NULL, &ev); if (BONOBO_EX (&ev)) { g_warning ("Could not start %s:%s", id->iid, CORBA_exception_id (&ev)); @@ -775,6 +778,7 @@ prepare_importer_page (GnomeDruidPage *page, gtk_box_pack_start (GTK_BOX (data->import_page->vbox), table, FALSE, FALSE, 0); +#endif } if (running == 0) { @@ -838,31 +842,21 @@ gboolean e_shell_startup_wizard_create (void) { SWData *data; - CORBA_Environment ev; int num_accounts; data = g_new0 (SWData, 1); - CORBA_exception_init (&ev); - data->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || data->db == CORBA_OBJECT_NIL) { - g_warning ("Error starting wombat: (%s)", CORBA_exception_id (&ev)); - CORBA_exception_free (&ev); - g_free (data); - - return FALSE; - } + data->config_listener = e_config_listener_new(); - num_accounts = bonobo_config_get_long_with_default (data->db, "/Mail/Accounts/num", 0, NULL); - CORBA_exception_free (&ev); + num_accounts = e_config_listener_get_long_with_default (data->config_listener, "/Mail/Accounts/num", 0, NULL); if (num_accounts != 0) { - bonobo_object_release_unref (data->db, NULL); + g_object_unref (data->config_listener); g_free (data); return TRUE; } - data->wizard = glade_xml_new (EVOLUTION_GLADEDIR "/evolution-startup-wizard.glade", NULL); + data->wizard = glade_xml_new (EVOLUTION_GLADEDIR "/evolution-startup-wizard.glade", NULL, NULL); g_return_val_if_fail (data->wizard != NULL, FALSE); data->dialog = glade_xml_get_widget (data->wizard, "startup-wizard"); g_return_val_if_fail (data->dialog != NULL, FALSE); @@ -873,7 +867,7 @@ e_shell_startup_wizard_create (void) data->druid = glade_xml_get_widget (data->wizard, "startup-druid"); g_return_val_if_fail (data->druid != NULL, FALSE); gnome_druid_set_buttons_sensitive (GNOME_DRUID (data->druid), - FALSE, TRUE, FALSE); + FALSE, TRUE, FALSE, FALSE); gtk_signal_connect (GTK_OBJECT (data->druid), "cancel", GTK_SIGNAL_FUNC (startup_wizard_cancel), data); @@ -905,15 +899,13 @@ e_shell_startup_wizard_create (void) g_return_val_if_fail (data->timezone_page != NULL, TRUE); g_return_val_if_fail (data->import_page != NULL, TRUE); - gnome_druid_set_buttons_sensitive (GNOME_DRUID (data->druid), FALSE, TRUE, TRUE); + gnome_druid_set_buttons_sensitive (GNOME_DRUID (data->druid), FALSE, TRUE, TRUE, FALSE); gtk_widget_show_all (data->dialog); gtk_main (); - /* Sync database */ - Bonobo_ConfigDatabase_sync (data->db, &ev); - bonobo_object_release_unref (data->db, NULL); - CORBA_exception_free (&ev); + g_object_unref (data->config_listener); + data->config_listener = NULL; return !data->cancel; } diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c index 9e427f5b9f..8f48cb2ccc 100644 --- a/shell/e-shell-user-creatable-items-handler.c +++ b/shell/e-shell-user-creatable-items-handler.c @@ -35,6 +35,7 @@ #include <gal/util/e-util.h> #include <bonobo/bonobo-ui-util.h> +#include <bonobo/bonobo-exception.h> #include <libgnome/gnome-i18n.h> @@ -43,6 +44,7 @@ #include <stdlib.h> #include <ctype.h> +#include <string.h> #define PARENT_TYPE gtk_object_get_type () @@ -479,7 +481,7 @@ execute_verb (EShellUserCreatableItemsHandler *handler, &ev); if (ev._major != CORBA_NO_EXCEPTION) - g_warning ("Error in userCreateNewItem -- %s", ev._repo_id); + g_warning ("Error in userCreateNewItem -- %s", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); return; diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c index 7eb54d8218..37cd750169 100644 --- a/shell/e-shell-utils.c +++ b/shell/e-shell-utils.c @@ -27,7 +27,7 @@ #include <string.h> #include <glib.h> -#include <libgnome/gnome-defs.h> + #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index ad8733bde1..c9d55883d9 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -47,8 +47,8 @@ #include <gtk/gtksignal.h> #include <gtk/gtkmain.h> +#include <gtk/gtkdialog.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-exec.h> #include <libgnome/gnome-help.h> #include <libgnome/gnome-i18n.h> @@ -58,9 +58,6 @@ #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> -#include <liboaf/liboaf.h> -#include <bonobo/bonobo-moniker-util.h> - #include <gal/widgets/e-gui-utils.h> @@ -235,7 +232,7 @@ command_about_box (BonoboUIComponent *uih, about_box = e_shell_about_box_new (); gtk_widget_show (about_box); - about_box_window = gtk_window_new (GTK_WINDOW_DIALOG); + about_box_window = gtk_dialog_new (); gtk_window_set_policy (GTK_WINDOW (about_box_window), FALSE, FALSE, FALSE); gtk_signal_connect (GTK_OBJECT (about_box_window), "key_press_event", GTK_SIGNAL_FUNC (about_box_event_callback), &about_box_window); @@ -255,7 +252,7 @@ command_help_faq (BonoboUIComponent *uih, void *data, const char *path) { - gnome_url_show ("http://www.ximian.com/apps/evolution-faq.html"); + gnome_url_show ("http://www.ximian.com/apps/evolution-faq.html", NULL); /* FIXME use the error */ } static void @@ -529,13 +526,6 @@ command_create_folder (BonoboUIComponent *uih, e_shell_command_create_new_folder (shell, shell_view, get_path_for_folder_op (shell_view)); } -static void -command_xml_dump (gpointer dummy, - EShellView *view) -{ - bonobo_window_dump (BONOBO_WINDOW (view), "On demand"); -} - static void command_work_offline (BonoboUIComponent *uih, @@ -677,7 +667,7 @@ static BonoboUIVerb new_verbs [] = { }; static BonoboUIVerb file_verbs [] = { - BONOBO_UI_VERB ("FileImporter", (BonoboUIVerbFn) show_import_wizard), + /* BONOBO_UI_VERB ("FileImporter", (BonoboUIVerbFn) show_import_wizard), */ BONOBO_UI_VERB ("FileOpenOtherUsersFolder", command_open_other_users_folder), BONOBO_UI_VERB ("FileRemoveOtherUsersFolder", command_remove_other_users_folder), BONOBO_UI_VERB ("FileGoToFolder", command_goto_folder), @@ -766,8 +756,6 @@ menu_do_misc (BonoboUIComponent *component, (BonoboUIVerbFn) command_submit_bug, shell_view); bonobo_ui_component_add_verb (component, "HelpAbout", (BonoboUIVerbFn) command_about_box, shell_view); - bonobo_ui_component_add_verb (component, "DebugDumpXml", - (BonoboUIVerbFn) command_xml_dump, shell_view); } diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 1ba9eb466f..671d166249 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -31,6 +31,8 @@ #include "evolution-shell-view.h" +#include "e-shell-marshal.h" + #include "e-gray-bar.h" #include "e-history.h" #include "e-icon-factory.h" @@ -48,23 +50,29 @@ #include "widgets/misc/e-clipped-label.h" #include "widgets/misc/e-bonobo-widget.h" +#include <gtk/gtkwidget.h> + #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <ctype.h> #include <glib.h> + #include <libgnome/libgnome.h> #include <libgnomeui/gnome-window.h> #include <libgnomeui/gnome-window-icon.h> #include <libgnomeui/gnome-app.h> + #include <bonobo/bonobo-socket.h> #include <bonobo/bonobo-ui-util.h> +#include <bonobo/bonobo-ui-container.h> +#include <bonobo/bonobo-ui-engine.h> #include <bonobo/bonobo-widget.h> +#include <bonobo/bonobo-window.h> #include <gal/e-paned/e-hpaned.h> #include <gal/util/e-util.h> -#include <gal/util/e-unicode-i18n.h> #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-unicode.h> #include <gal/widgets/e-scroll-frame.h> @@ -235,7 +243,7 @@ load_images (void) { GdkPixbuf *pixbuf; - pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/offline.png"); + pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/offline.png", NULL); if (pixbuf == NULL) { g_warning ("Cannot load `%s'", EVOLUTION_IMAGES "/offline.png"); } else { @@ -243,7 +251,7 @@ load_images (void) gdk_pixbuf_unref (pixbuf); } - pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/online.png"); + pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/online.png", NULL); if (pixbuf == NULL) { g_warning ("Cannot load `%s'", EVOLUTION_IMAGES "/online.png"); } else { @@ -394,17 +402,29 @@ find_inbox_in_storage (EShellView *shell_view, subfolder_paths = e_storage_get_subfolder_paths (storage, "/"); for (p = subfolder_paths; p != NULL; p = p->next) { const char *path; + char *casefold_i18n_inbox_name; + char *casefold_path; path = (const char *) p->data; - if (g_utf8_strcasecmp (path, "/inbox") == 0 - || g_utf8_strcasecmp (path + 1, U_("Inbox")) == 0) { + + casefold_i18n_inbox_name = g_utf8_casefold (_("Inbox"), -1); + casefold_path = g_utf8_casefold (path + 1, -1); + + if (g_utf8_collate (casefold_path, "/inbox") == 0 + || g_utf8_collate (casefold_path + 1, _("Inbox")) == 0) { char *return_path; return_path = g_strconcat ("/", storage_name, "/", path, NULL); e_free_string_list (subfolder_paths); + + g_free (casefold_i18n_inbox_name); + g_free (casefold_path); return return_path; } + + g_free (casefold_i18n_inbox_name); + g_free (casefold_path); } e_free_string_list (subfolder_paths); @@ -739,7 +759,8 @@ pop_up_folder_bar (EShellView *shell_view) gtk_widget_show (priv->storage_set_view_box); - gtk_widget_popup (priv->folder_bar_popup, x, y); + gtk_window_move (GTK_WINDOW (priv->folder_bar_popup), x, y); + gtk_widget_show (priv->folder_bar_popup); /* Disable DnD or "interesting" things will happen. */ e_storage_set_view_set_allow_dnd (E_STORAGE_SET_VIEW (priv->storage_set_view), FALSE); @@ -1390,35 +1411,33 @@ class_init (EShellViewClass *klass) signals[SHORTCUT_BAR_VISIBILITY_CHANGED] = gtk_signal_new ("shortcut_bar_visibility_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellViewClass, shortcut_bar_visibility_changed), - gtk_marshal_NONE__INT, + e_shell_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[FOLDER_BAR_VISIBILITY_CHANGED] = gtk_signal_new ("folder_bar_visibility_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellViewClass, folder_bar_visibility_changed), - gtk_marshal_NONE__INT, + e_shell_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[VIEW_CHANGED] = gtk_signal_new ("view_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellViewClass, view_changed), - e_marshal_NONE__POINTER_POINTER_POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER, GTK_TYPE_NONE, 4, GTK_TYPE_STRING, GTK_TYPE_STRING, GTK_TYPE_STRING, GTK_TYPE_STRING); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - load_images (); } @@ -1561,12 +1580,18 @@ unmerge_on_error (BonoboObject *object, CORBA_Object cobject, CORBA_Environment *ev) { - BonoboWindow *win; +#if 0 + BonoboWindow *window; + BonoboUIEngine *ui_engine; - win = bonobo_ui_container_get_win (BONOBO_UI_CONTAINER (object)); + /* FIXME changes.txt says we should be able to do this but bonobo_ui_engine_get_view() + is marked as internal in bonoob-ui-engine.h! */ + ui_engine = bonobo_ui_container_get_engine (BONOBO_UI_CONTAINER (object)); + window = BONOBO_WINDOW (bonobo_ui_engine_get_view (ui_engine)); - if (win) - bonobo_window_deregister_component_by_ref (win, cobject); + if (window != NULL) + bonobo_ui_engine_deregister_component_by_ref (ui_engine, cobject); +#endif } static void @@ -1635,7 +1660,9 @@ e_shell_view_construct (EShellView *shell_view, priv = shell_view->priv; - view = E_SHELL_VIEW (bonobo_window_construct (BONOBO_WINDOW (shell_view), "evolution", "Ximian Evolution")); + view = E_SHELL_VIEW (bonobo_window_construct (BONOBO_WINDOW (shell_view), + bonobo_ui_container_new (), + "evolution", "Ximian Evolution")); if (!view) { gtk_object_unref (GTK_OBJECT (shell_view)); @@ -1649,21 +1676,21 @@ e_shell_view_construct (EShellView *shell_view, GTK_SIGNAL_FUNC (delete_event_cb), NULL); gtk_signal_connect_while_alive (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), - "updated_folder", updated_folder_cb, shell_view, - GTK_OBJECT (shell_view)); + "updated_folder", GTK_SIGNAL_FUNC (updated_folder_cb), + shell_view, GTK_OBJECT (shell_view)); - priv->ui_container = bonobo_ui_container_new (); - bonobo_ui_container_set_win (priv->ui_container, BONOBO_WINDOW (shell_view)); + priv->ui_container = bonobo_window_get_ui_container (BONOBO_WINDOW (view)); gtk_signal_connect (GTK_OBJECT (priv->ui_container), "system_exception", GTK_SIGNAL_FUNC (unmerge_on_error), NULL); priv->ui_component = bonobo_ui_component_new ("evolution"); bonobo_ui_component_set_container (priv->ui_component, - bonobo_object_corba_objref (BONOBO_OBJECT (priv->ui_container))); + bonobo_object_corba_objref (BONOBO_OBJECT (priv->ui_container)), + NULL); bonobo_ui_component_freeze (priv->ui_component, NULL); - bonobo_ui_util_set_ui (priv->ui_component, EVOLUTION_DATADIR, "evolution.xml", "evolution"); + bonobo_ui_util_set_ui (priv->ui_component, EVOLUTION_DATADIR, "evolution.xml", "evolution", NULL); setup_widgets (shell_view); @@ -2158,7 +2185,7 @@ get_view_for_uri (EShellView *shell_view, return NULL; container = bonobo_ui_component_get_container (priv->ui_component); - control = e_bonobo_widget_new_control_from_objref (corba_control, container); + control = bonobo_widget_new_control_from_objref (corba_control, container); socket = find_socket (GTK_CONTAINER (control)); destroy_connection_id = gtk_signal_connect (GTK_OBJECT (socket), "destroy", @@ -2268,7 +2295,7 @@ display_uri (EShellView *shell_view, if (priv->uri != NULL && uri != NULL && strcmp (priv->uri, uri) == 0) return TRUE; - bonobo_window_freeze (BONOBO_WINDOW (shell_view)); + bonobo_ui_engine_freeze (bonobo_window_get_ui_engine (BONOBO_WINDOW (shell_view))); if (uri == NULL) { gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), 0); @@ -2340,7 +2367,7 @@ display_uri (EShellView *shell_view, update_for_current_uri (shell_view); - bonobo_window_thaw (BONOBO_WINDOW (shell_view)); + bonobo_ui_engine_thaw (bonobo_window_get_ui_engine (BONOBO_WINDOW (shell_view))); gtk_signal_emit (GTK_OBJECT (shell_view), signals[VIEW_CHANGED], e_shell_view_get_current_path (shell_view), @@ -2638,7 +2665,7 @@ gboolean e_shell_view_save_settings (EShellView *shell_view, int view_num) { - Bonobo_ConfigDatabase db; + EConfigListener *config_listener; EShellViewPrivate *priv; EShortcutBar *shortcut_bar; const char *uri; @@ -2654,54 +2681,51 @@ e_shell_view_save_settings (EShellView *shell_view, priv = shell_view->priv; shortcut_bar = E_SHORTCUT_BAR (priv->shortcut_bar); - db = e_shell_get_config_db (priv->shell); - - g_return_val_if_fail (db != CORBA_OBJECT_NIL, FALSE); + config_listener = e_config_listener_new (); prefix = g_strdup_printf ("/Shell/Views/%d/", view_num); key = g_strconcat (prefix, "Width", NULL); - bonobo_config_set_long (db, key, GTK_WIDGET (shell_view)->allocation.width, NULL); + e_config_listener_set_long (config_listener, key, GTK_WIDGET (shell_view)->allocation.width); g_free (key); key = g_strconcat (prefix, "Height", NULL); - bonobo_config_set_long (db, key, GTK_WIDGET (shell_view)->allocation.height, NULL); + e_config_listener_set_long (config_listener, key, GTK_WIDGET (shell_view)->allocation.height); g_free (key); key = g_strconcat (prefix, "CurrentShortcutsGroupNum", NULL); - bonobo_config_set_long (db, key, - e_shell_view_get_current_shortcuts_group_num (shell_view), - NULL); + e_config_listener_set_long (config_listener, key, + e_shell_view_get_current_shortcuts_group_num (shell_view)); g_free (key); key = g_strconcat (prefix, "FolderBarShown", NULL); - bonobo_config_set_long (db, key, e_shell_view_folder_bar_shown (shell_view), NULL); + e_config_listener_set_long (config_listener, key, e_shell_view_folder_bar_shown (shell_view)); g_free (key); key = g_strconcat (prefix, "ShortcutBarShown", NULL); - bonobo_config_set_long (db, key, e_shell_view_shortcut_bar_shown (shell_view), NULL); + e_config_listener_set_long (config_listener, key, e_shell_view_shortcut_bar_shown (shell_view)); g_free (key); key = g_strconcat (prefix, "HPanedPosition", NULL); if (GTK_WIDGET_VISIBLE (priv->shortcut_frame)) - bonobo_config_set_long (db, key, E_PANED (priv->hpaned)->child1_size, NULL); + e_config_listener_set_long (config_listener, key, E_PANED (priv->hpaned)->child1_size); else - bonobo_config_set_long (db, key, priv->hpaned_position, NULL); + e_config_listener_set_long (config_listener, key, priv->hpaned_position); g_free (key); key = g_strconcat (prefix, "ViewHPanedPosition", NULL); if (GTK_WIDGET_VISIBLE (priv->storage_set_view_box)) - bonobo_config_set_long (db, key, E_PANED (priv->view_hpaned)->child1_size, NULL); + e_config_listener_set_long (config_listener, key, E_PANED (priv->view_hpaned)->child1_size); else - bonobo_config_set_long (db, key, priv->view_hpaned_position, NULL); + e_config_listener_set_long (config_listener, key, priv->view_hpaned_position); g_free (key); key = g_strconcat (prefix, "DisplayedURI", NULL); uri = e_shell_view_get_current_uri (shell_view); if (uri != NULL) - bonobo_config_set_string (db, key, uri, NULL); + e_config_listener_set_string (config_listener, key, uri); else - bonobo_config_set_string (db, key, E_SHELL_VIEW_DEFAULT_URI, NULL); + e_config_listener_set_string (config_listener, key, E_SHELL_VIEW_DEFAULT_URI); g_free (key); num_groups = e_shortcut_model_get_num_groups (shortcut_bar->model); @@ -2709,9 +2733,8 @@ e_shell_view_save_settings (EShellView *shell_view, for (group = 0; group < num_groups; group++) { key = g_strdup_printf ("%sShortcutBarGroup%dIconMode", prefix, group); - bonobo_config_set_long (db, key, - e_shortcut_bar_get_view_type (shortcut_bar, group), - NULL); + e_config_listener_set_long (config_listener, key, + e_shortcut_bar_get_view_type (shortcut_bar, group)); g_free (key); } @@ -2747,9 +2770,9 @@ gboolean e_shell_view_load_settings (EShellView *shell_view, int view_num) { - Bonobo_ConfigDatabase db; EShellViewPrivate *priv; EShortcutBar *shortcut_bar; + EConfigListener *config_listener; int num_groups, val; long width, height; char *stringval, *prefix, *filename, *key; @@ -2761,51 +2784,45 @@ e_shell_view_load_settings (EShellView *shell_view, priv = shell_view->priv; shortcut_bar = E_SHORTCUT_BAR (priv->shortcut_bar); - db = e_shell_get_config_db (priv->shell); - - g_return_val_if_fail (db != CORBA_OBJECT_NIL, FALSE); + config_listener = e_config_listener_new (); prefix = g_strdup_printf ("/Shell/Views/%d/", view_num); CORBA_exception_init (&ev); key = g_strconcat (prefix, "Width", NULL); - width = bonobo_config_get_long (db, key, &ev); + width = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); g_free (key); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - return FALSE; - } key = g_strconcat (prefix, "Height", NULL); - height = bonobo_config_get_long (db, key, NULL); + height = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); g_free (key); gtk_window_set_default_size (GTK_WINDOW (shell_view), width, height); key = g_strconcat (prefix, "CurrentShortcutsGroupNum", NULL); - val = bonobo_config_get_long (db, key, NULL); + val = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); e_shell_view_set_current_shortcuts_group_num (shell_view, val); g_free (key); key = g_strconcat (prefix, "FolderBarShown", NULL); - val = bonobo_config_get_long (db, key, NULL); + val = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); e_shell_view_show_folder_bar (shell_view, val); g_free (key); key = g_strconcat (prefix, "ShortcutBarShown", NULL); - val = bonobo_config_get_long (db, key, NULL); + val = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); e_shell_view_show_shortcut_bar (shell_view, val); g_free (key); key = g_strconcat (prefix, "HPanedPosition", NULL); - val = bonobo_config_get_long (db, key, NULL); + val = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); if (priv->shortcut_bar_shown) e_paned_set_position (E_PANED (priv->hpaned), val); priv->hpaned_position = val; g_free (key); key = g_strconcat (prefix, "ViewHPanedPosition", NULL); - val = bonobo_config_get_long (db, key, NULL); + val = e_config_listener_get_long_with_default (config_listener, key, 0, NULL); if (priv->folder_bar_shown) e_paned_set_position (E_PANED (priv->view_hpaned), val); priv->view_hpaned_position = val; @@ -2813,7 +2830,7 @@ e_shell_view_load_settings (EShellView *shell_view, if (priv->uri == NULL && priv->delayed_selection == NULL) { key = g_strconcat (prefix, "DisplayedURI", NULL); - stringval = bonobo_config_get_string (db, key, NULL); + stringval = e_config_listener_get_string_with_default (config_listener, key, NULL, NULL); if (stringval) { if (! e_shell_view_display_uri (shell_view, stringval, FALSE)) { e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI, FALSE); diff --git a/shell/e-shell.c b/shell/e-shell.c index b5d6cc5b97..76a23b4269 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -32,7 +32,6 @@ #include <X11/Xatom.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> @@ -45,7 +44,6 @@ #include <gal/widgets/e-gui-utils.h> #include <gal/util/e-util.h> -#include <gal/util/e-unicode-i18n.h> #include "Evolution.h" @@ -70,6 +68,8 @@ #include "e-splash.h" #include "e-uri-schema-registry.h" +#include "e-shell-marshal.h" + #include "evolution-shell-component-client.h" #include "evolution-shell-component-utils.h" #include "evolution-storage-set-view-factory.h" @@ -212,7 +212,7 @@ set_interactive (EShell *shell, GNOME_Evolution_ShellComponent_interactive (shell_component_objref, interactive, &ev); if (ev._major != CORBA_NO_EXCEPTION) g_warning ("Error changing interactive status of component %s to %s -- %s\n", - id, interactive ? "TRUE" : "FALSE", ev._repo_id); + id, interactive ? "TRUE" : "FALSE", BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); } @@ -553,7 +553,7 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant, the foreign parent window's. This way smartass window managers like Sawfish don't get confused. */ - e_set_dialog_parent_from_xid (GTK_WINDOW (folder_selection_dialog), parent_xid); + /* e_set_dialog_parent_from_xid (GTK_WINDOW (folder_selection_dialog), parent_xid); */ if (XGetClassHint (GDK_DISPLAY (), (Window) parent_xid, &class_hints)) { gtk_window_set_wmclass (GTK_WINDOW (folder_selection_dialog), @@ -745,7 +745,7 @@ setup_local_storage (EShell *shell) e_storage_set_add_storage (priv->storage_set, local_storage); priv->local_storage = E_LOCAL_STORAGE (local_storage); - summary_folder = e_folder_new (U_("Summary"), "summary", ""); + summary_folder = e_folder_new (_("Summary"), "summary", ""); e_folder_set_physical_uri (summary_folder, "/"); e_folder_set_is_stock (summary_folder, TRUE); priv->summary_storage = e_storage_new (E_SUMMARY_STORAGE_NAME, @@ -759,16 +759,15 @@ setup_local_storage (EShell *shell) /* Initialization of the components. */ static char * -get_icon_path_for_component_info (const OAF_ServerInfo *info) +get_icon_path_for_component_info (const Bonobo_ServerInfo *info) { - OAF_Property *property; + Bonobo_ActivationProperty *property; const char *shell_component_icon_value; - /* FIXME: liboaf is not const-safe. */ - property = oaf_server_info_prop_find ((OAF_ServerInfo *) info, - "evolution:shell_component_icon"); + property = bonobo_server_info_prop_find ((Bonobo_ServerInfo *) info, + "evolution:shell_component_icon"); - if (property == NULL || property->v._d != OAF_P_STRING) + if (property == NULL || property->v._d != Bonobo_ACTIVATION_P_STRING) return gnome_pixmap_file ("gnome-question.png"); shell_component_icon_value = property->v._u.value_string; @@ -786,7 +785,7 @@ setup_components (EShell *shell, { EShellPrivate *priv; char *const selection_order[] = { "0-evolution:shell_component_launch_order", NULL }; - OAF_ServerInfoList *info_list; + Bonobo_ServerInfoList *info_list; CORBA_Environment ev; int i; @@ -795,7 +794,7 @@ setup_components (EShell *shell, priv = shell->priv; priv->component_registry = e_component_registry_new (shell); - info_list = oaf_query ("repo_ids.has ('IDL:GNOME/Evolution/ShellComponent:1.0')", selection_order, &ev); + info_list = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/ShellComponent:1.0')", selection_order, &ev); if (ev._major != CORBA_NO_EXCEPTION) g_error ("Eeek! Cannot perform OAF query for Evolution components."); @@ -804,7 +803,7 @@ setup_components (EShell *shell, g_warning ("No Evolution components installed."); for (i = 0; i < info_list->_length; i++) { - const OAF_ServerInfo *info; + const Bonobo_ServerInfo *info; GdkPixbuf *icon_pixbuf; char *icon_path; @@ -812,7 +811,7 @@ setup_components (EShell *shell, icon_path = get_icon_path_for_component_info (info); - icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); + icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL); if (splash != NULL) e_splash_add_icon (splash, icon_pixbuf); @@ -826,7 +825,7 @@ setup_components (EShell *shell, gtk_main_iteration (); for (i = 0; i < info_list->_length; i++) { - const OAF_ServerInfo *info; + const Bonobo_ServerInfo *info; CORBA_Environment ev; info = info_list->_buffer + i; @@ -1023,10 +1022,10 @@ create_view (EShell *shell, } -/* GtkObject methods. */ +/* GObject methods. */ static void -destroy (GtkObject *object) +impl_finalize (GObject *object) { EShell *shell; EShellPrivate *priv; @@ -1038,7 +1037,7 @@ destroy (GtkObject *object) priv->is_initialized = FALSE; if (priv->iid != NULL) - oaf_active_server_unregister (priv->iid, bonobo_object_corba_objref (BONOBO_OBJECT (shell))); + bonobo_activation_active_server_unregister (priv->iid, bonobo_object_corba_objref (BONOBO_OBJECT (shell))); g_free (priv->local_directory); @@ -1097,18 +1096,18 @@ destroy (GtkObject *object) e_free_string_list (priv->crash_type_names); if (priv->settings_dialog != NULL) { - gtk_object_destroy (priv->settings_dialog); + gtk_widget_destroy (priv->settings_dialog); priv->settings_dialog = NULL; } if (priv->config_listener != NULL) { - g_object_unref (priv->config_listener); + /* g_object_unref (priv->config_listener); FIXME */ priv->config_listener = NULL; } g_free (priv); - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + (* G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -1117,18 +1116,18 @@ destroy (GtkObject *object) static void class_init (EShellClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; POA_GNOME_Evolution_Shell__epv *epv; parent_class = gtk_type_class (PARENT_TYPE); - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; + object_class = G_OBJECT_CLASS (klass); + object_class->finalize = impl_finalize; signals[NO_VIEWS_LEFT] = gtk_signal_new ("no_views_left", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellClass, no_views_left), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -1136,23 +1135,21 @@ class_init (EShellClass *klass) signals[LINE_STATUS_CHANGED] = gtk_signal_new ("line_status_changed", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellClass, line_status_changed), - gtk_marshal_NONE__ENUM, + e_shell_marshal_NONE__INT, GTK_TYPE_NONE, 1, - GTK_TYPE_ENUM); + GTK_TYPE_INT); signals[NEW_VIEW_CREATED] = gtk_signal_new ("new_view_created", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShellClass, new_view_created), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - epv = & klass->epv; epv->_get_displayName = impl_Shell__get_displayName; epv->getComponentByType = impl_Shell_getComponentByType; @@ -1191,7 +1188,7 @@ init (EShell *shell) priv->crash_type_names = NULL; priv->line_status = E_SHELL_LINE_STATUS_OFFLINE; priv->settings_dialog = NULL; - priv->db = CORBA_OBJECT_NIL; + priv->config_listener = e_config_listener_new(); priv->is_initialized = FALSE; priv->is_interactive = FALSE; priv->preparing_to_quit = FALSE; @@ -1223,7 +1220,6 @@ e_shell_construct (EShell *shell, GtkWidget *splash; EShellPrivate *priv; CORBA_Object corba_object; - CORBA_Environment ev; gchar *shortcut_path; gboolean start_online; @@ -1244,10 +1240,9 @@ e_shell_construct (EShell *shell, priv->uri_schema_registry = e_uri_schema_registry_new (); priv->storage_set = e_storage_set_new (priv->folder_type_registry); - gtk_signal_connect_while_alive (GTK_OBJECT (priv->storage_set), "moved_folder", - GTK_SIGNAL_FUNC (storage_set_moved_folder_callback), - shell, - GTK_OBJECT (shell)); + g_signal_connect_object (priv->storage_set, "moved_folder", + G_CALLBACK (storage_set_moved_folder_callback), + shell, 0); e_folder_type_registry_register_type (priv->folder_type_registry, "noselect", "empty.gif", @@ -1263,17 +1258,15 @@ e_shell_construct (EShell *shell, if (! setup_corba_storages (shell)) return FALSE; - e_setup_check_db (priv->config_listener, local_directory); + e_setup_check_config (priv->config_listener, local_directory); /* Now we can register into OAF. Notice that we shouldn't be registering into OAF until we are sure we can complete. */ /* FIXME: Multi-display stuff. */ corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); - if (oaf_active_server_register (iid, corba_object) != OAF_REG_SUCCESS) { - CORBA_exception_free (&ev); + if (bonobo_activation_active_server_register (iid, corba_object) != Bonobo_ACTIVATION_REG_SUCCESS) return E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER; - } if (! show_splash) { splash = NULL; @@ -1335,7 +1328,9 @@ e_shell_construct (EShell *shell, switch (startup_line_mode) { case E_SHELL_STARTUP_LINE_MODE_CONFIG: - start_online = ! bonobo_config_get_boolean_with_default (priv->db, "/Shell/StartOffline", FALSE, NULL); + start_online = ! e_config_listener_get_boolean_with_default (priv->config_listener, + "/Shell/StartOffline", FALSE, + NULL); break; case E_SHELL_STARTUP_LINE_MODE_ONLINE: start_online = TRUE; @@ -1379,7 +1374,7 @@ e_shell_new (const char *local_directory, g_return_val_if_fail (local_directory != NULL, NULL); g_return_val_if_fail (*local_directory != '\0', NULL); - new = gtk_type_new (e_shell_get_type ()); + new = g_object_new (e_shell_get_type (), NULL); construct_result = e_shell_construct (new, E_SHELL_OAFIID, @@ -1592,7 +1587,6 @@ e_shell_get_local_storage (EShell *shell) static gboolean save_settings_for_views (EShell *shell) { - CORBA_Environment ev; EShellPrivate *priv; GList *p; gboolean retval; @@ -1612,12 +1606,7 @@ save_settings_for_views (EShell *shell) } } - bonobo_config_set_long (priv->db, "/Shell/Views/NumberOfViews", - g_list_length (priv->views), NULL); - - CORBA_exception_init (&ev); - Bonobo_ConfigDatabase_sync (priv->db, &ev); - CORBA_exception_free (&ev); + e_config_listener_set_long (priv->config_listener, "/Shell/Views/NumberOfViews", g_list_length (priv->views)); return TRUE; } @@ -1699,7 +1688,7 @@ save_misc_settings (EShell *shell) priv = shell->priv; is_offline = ( e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_OFFLINE ); - bonobo_config_set_boolean (priv->db, "/Shell/StartOffline", is_offline, NULL); + e_config_listener_set_boolean (priv->config_listener, "/Shell/StartOffline", is_offline); return TRUE; } @@ -1757,7 +1746,8 @@ e_shell_restore_from_settings (EShell *shell, priv = shell->priv; - num_views = bonobo_config_get_long_with_default (priv->db, "/Shell/Views/NumberOfViews", 0, NULL); + num_views = e_config_listener_get_long_with_default (priv->config_listener, + "/Shell/Views/NumberOfViews", 0, NULL); for (i = 0; i < num_views; i++) { e_shell_create_view_from_uri_and_settings (shell, NULL, i); @@ -1841,7 +1831,7 @@ e_shell_component_maybe_crashed (EShell *shell, component = e_folder_type_registry_get_handler_for_type (priv->folder_type_registry, type_name); if (component != NULL - && bonobo_unknown_ping (bonobo_object_corba_objref (BONOBO_OBJECT (component)))) + && bonobo_unknown_ping (bonobo_object_corba_objref (BONOBO_OBJECT (component)), NULL)) return; /* See if that type has caused a crash already. */ @@ -1872,7 +1862,7 @@ e_shell_component_maybe_crashed (EShell *shell, type_name); if (shell_view) - bonobo_window_deregister_dead_components (BONOBO_WINDOW (shell_view)); + bonobo_ui_engine_deregister_dead_components (bonobo_window_get_ui_engine (BONOBO_WINDOW (shell_view))); /* FIXME: we should probably re-start the component here */ } @@ -2050,7 +2040,7 @@ e_shell_send_receive (EShell *shell) (bonobo_object_corba_objref (BONOBO_OBJECT (component_client)), TRUE, &ev); if (BONOBO_EX (&ev)) - g_warning ("Error invoking Send/Receive on %s -- %s", id, BONOBO_EX_ID (&ev)); + g_warning ("Error invoking Send/Receive on %s -- %s", id, BONOBO_EX_REPOID (&ev)); CORBA_exception_free (&ev); } @@ -2097,7 +2087,7 @@ e_shell_show_settings (EShell *shell, const char *type, EShellView *shell_view) } -Bonobo_ConfigDatabase +EConfigListener * e_shell_get_config_listener (EShell *shell) { g_return_val_if_fail (E_IS_SHELL (shell), CORBA_OBJECT_NIL); @@ -2152,11 +2142,11 @@ e_shell_disconnect_db (EShell *shell) priv = shell->priv; - if (priv->db == CORBA_OBJECT_NIL) + if (priv->config_listener == NULL) return; - bonobo_object_release_unref (priv->db, NULL); - priv->db = CORBA_OBJECT_NIL; + g_object_unref (priv->config_listener); + priv->config_listener = NULL; } @@ -2269,8 +2259,8 @@ parse_default_uri (EShell *shell, component = g_strndup (component_start, p - component_start); db_path = g_strdup_printf ("/DefaultFolders/%s_path", component); - path = bonobo_config_get_string_with_default (e_shell_get_config_db (shell), - db_path, NULL, &is_default); + path = e_config_listener_get_string_with_default (shell->priv->config_listener, + db_path, NULL, &is_default); /* We expect an evolution: URI here, if we don't get it then something is messed up. */ diff --git a/shell/e-shell.h b/shell/e-shell.h index 6f3edb93f6..246d301375 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -136,6 +136,7 @@ gboolean e_shell_restore_from_settings (EShell *shell, void e_shell_destroy_all_views (EShell *shell); void e_shell_unregister_all (EShell *shell); +void e_shell_disconnect_db (EShell *shell); void e_shell_component_maybe_crashed (EShell *shell, const char *uri, diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index c11af21b9e..51961afae6 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -36,18 +36,21 @@ #include <gtk/gtkcheckmenuitem.h> #include <gtk/gtkentry.h> #include <gtk/gtklabel.h> -#include <libgnome/gnome-defs.h> + #include <libgnome/gnome-i18n.h> + #include <libgnomeui/gnome-app.h> #include <libgnomeui/gnome-app-helper.h> #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-messagebox.h> #include <libgnomeui/gnome-popup-menu.h> -#include <libgnomeui/gnome-stock.h> #include <libgnomeui/gnome-uidefs.h> + #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> +#include <string.h> + #define PARENT_TYPE E_TYPE_SHORTCUT_BAR static EShortcutBarClass *parent_class = NULL; @@ -303,7 +306,7 @@ pop_up_right_click_menu_for_group (EShortcutsView *shortcuts_view, if (group_num == 0) gtk_widget_set_sensitive (right_click_menu_uiinfo[3].widget, FALSE); - gnome_popup_menu_do_popup_modal (popup_menu, NULL, NULL, event, menu_data); + gnome_popup_menu_do_popup_modal (popup_menu, NULL, NULL, event, menu_data, GTK_WIDGET (shortcuts_view)); g_free (menu_data); gtk_widget_unref (popup_menu); @@ -406,14 +409,14 @@ rename_shortcut_cb (GtkWidget *widget, static GnomeUIInfo shortcut_right_click_menu_uiinfo[] = { GNOMEUIINFO_ITEM_STOCK (N_("_Open"), N_("Open the folder linked to this shortcut"), - open_shortcut_cb, GNOME_STOCK_MENU_OPEN), + open_shortcut_cb, GTK_STOCK_OPEN), GNOMEUIINFO_ITEM_NONE (N_("Open in New _Window"), N_("Open the folder linked to this shortcut in a new window"), open_shortcut_in_new_window_cb), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_NONE (N_("_Rename"), N_("Rename this shortcut"), rename_shortcut_cb), GNOMEUIINFO_ITEM_STOCK (N_("Re_move"), N_("Remove this shortcut from the shortcut bar"), - remove_shortcut_cb, GNOME_STOCK_MENU_TRASH), + remove_shortcut_cb, GTK_STOCK_REMOVE), GNOMEUIINFO_END }; @@ -433,7 +436,7 @@ pop_up_right_click_menu_for_shortcut (EShortcutsView *shortcuts_view, popup_menu = gnome_popup_menu_new (shortcut_right_click_menu_uiinfo); - gnome_popup_menu_do_popup_modal (popup_menu, NULL, NULL, event, menu_data); + gnome_popup_menu_do_popup_modal (popup_menu, NULL, NULL, event, menu_data, GTK_WIDGET (shortcuts_view)); g_free (menu_data); gtk_widget_destroy (popup_menu); @@ -692,7 +695,7 @@ class_init (EShortcutsViewClass *klass) signals[ACTIVATE_SHORTCUT] = gtk_signal_new ("activate_shortcut", GTK_RUN_LAST | GTK_RUN_ACTION, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsViewClass, activate_shortcut), e_marshal_NONE__POINTER_POINTER_INT, GTK_TYPE_NONE, 3, @@ -703,13 +706,11 @@ class_init (EShortcutsViewClass *klass) signals[HIDE_REQUESTED] = gtk_signal_new ("hide_requested", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsViewClass, hide_requested), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index a1ccf6a8e9..262ed0f97e 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -55,8 +55,8 @@ #include <gnome-xml/parser.h> #include <gnome-xml/xmlmemory.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> + #include <gal/util/e-util.h> #include <gal/util/e-xml-utils.h> #include <gal/widgets/e-unicode.h> @@ -65,6 +65,7 @@ #include "e-shortcuts-view.h" #include "e-shell-constants.h" +#include "e-shell-marshal.h" #define PARENT_TYPE GTK_TYPE_OBJECT @@ -658,27 +659,27 @@ class_init (EShortcutsClass *klass) signals[NEW_GROUP] = gtk_signal_new ("new_group", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, new_group), - gtk_marshal_NONE__INT, + e_shell_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[REMOVE_GROUP] = gtk_signal_new ("remove_group", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, remove_group), - gtk_marshal_NONE__INT, + e_shell_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); signals[RENAME_GROUP] = gtk_signal_new ("rename_group", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, rename_group), - gtk_marshal_NONE__INT_POINTER, + e_shell_marshal_NONE__INT_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_STRING); @@ -686,9 +687,9 @@ class_init (EShortcutsClass *klass) signals[GROUP_CHANGE_ICON_SIZE] = gtk_signal_new ("group_change_icon_size", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, group_change_icon_size), - gtk_marshal_NONE__INT_INT, + e_shell_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -696,9 +697,9 @@ class_init (EShortcutsClass *klass) signals[NEW_SHORTCUT] = gtk_signal_new ("new_shortcut", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, new_shortcut), - gtk_marshal_NONE__INT_INT, + e_shell_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -706,9 +707,9 @@ class_init (EShortcutsClass *klass) signals[REMOVE_SHORTCUT] = gtk_signal_new ("remove_shortcut", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, remove_shortcut), - gtk_marshal_NONE__INT_INT, + e_shell_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -716,14 +717,12 @@ class_init (EShortcutsClass *klass) signals[UPDATE_SHORTCUT] = gtk_signal_new ("update_shortcut", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EShortcutsClass, update_shortcut), - gtk_marshal_NONE__INT_INT, + e_shell_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } @@ -871,7 +870,7 @@ e_shortcuts_new_view (EShortcuts *shortcuts) new = e_shortcuts_view_new (shortcuts); priv->views = g_slist_prepend (priv->views, new); - gtk_signal_connect (GTK_OBJECT (new), "destroy", view_destroyed_cb, shortcuts); + gtk_signal_connect (GTK_OBJECT (new), "destroy", GTK_SIGNAL_FUNC (view_destroyed_cb), shortcuts); return new; } diff --git a/shell/e-splash.c b/shell/e-splash.c index 90682e90af..dc752deca4 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -31,7 +31,7 @@ #include <gtk/gtkframe.h> #include <gtk/gtkmain.h> #include <gtk/gtksignal.h> -#include <gdk-pixbuf/gnome-canvas-pixbuf.h> +#include <libgnomecanvas/gnome-canvas-pixbuf.h> #include <libgnomeui/gnome-window-icon.h> #include <gal/util/e-util.h> @@ -351,7 +351,7 @@ e_splash_new (void) ESplash *new; GdkPixbuf *splash_image_pixbuf; - splash_image_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/splash.png"); + splash_image_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/splash.png", NULL); g_return_val_if_fail (splash_image_pixbuf != NULL, NULL); new = gtk_type_new (e_splash_get_type ()); diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index 7d0dab8141..a68c10b83f 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -33,6 +33,7 @@ #include "e-icon-factory.h" #include "e-folder-dnd-bridge.h" #include "e-shell-constants.h" +#include "e-shell-marshal.h" #include <gal/util/e-util.h> #include <gal/widgets/e-gui-utils.h> @@ -40,14 +41,16 @@ #include <gal/e-table/e-cell-text.h> #include <gal/e-table/e-cell-toggle.h> #include <gal/e-table/e-cell-tree.h> -#include <gal/unicode/gunicode.h> -#include <glib.h> -#include <gnome.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> +#include <libgnomeui/gnome-popup-menu.h> + +#include <bonobo/bonobo-window.h> #include <bonobo/bonobo-ui-util.h> -#include <libgnome/gnome-util.h> + +#include <gtk/gtksignal.h> + +#include <string.h> #include "check-empty.xpm" #include "check-filled.xpm" @@ -415,31 +418,6 @@ ui_container_destroy_notify (void *data) } -/* Custom marshalling function. */ - -typedef void (* GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING) (GtkObject *object, - GdkDragContext *action, - const char *, - const char *, - const char *); - -static void -marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING (GtkObject *object, - GtkSignalFunc func, - void *func_data, - GtkArg *args) -{ - GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING rfunc; - - rfunc = (GtkSignal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING) func; - (* rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_STRING (args[1]), - GTK_VALUE_STRING (args[2]), - GTK_VALUE_STRING (args[3])); -} - - /* DnD selection setup stuff. */ /* This will create an array of GtkTargetEntries from the specified list of DND @@ -791,8 +769,11 @@ popup_folder_menu (EStorageSetView *storage_set_view, handler = e_folder_type_registry_get_handler_for_type (folder_type_registry, e_folder_get_type_string (folder)); menu = gtk_menu_new (); + +#if 0 bonobo_window_add_popup (bonobo_ui_container_get_win (priv->ui_container), GTK_MENU (menu), "/popups/FolderPopup"); +#endif bonobo_ui_component_set (priv->ui_component, "/popups/FolderPopup/ComponentPlaceholder", @@ -808,7 +789,8 @@ popup_folder_menu (EStorageSetView *storage_set_view, gtk_widget_show (GTK_WIDGET (menu)); - gnome_popup_menu_do_popup_modal (GTK_WIDGET (menu), NULL, NULL, event, NULL); + gnome_popup_menu_do_popup_modal (GTK_WIDGET (menu), NULL, NULL, event, NULL, + GTK_WIDGET (storage_set_view)); if (folder_property_items_data != NULL) remove_property_items (storage_set_view, folder_property_items_data); @@ -1094,6 +1076,7 @@ impl_tree_drag_data_get (ETree *etree, & priv->drag_corba_data, &ev); +#if 0 if (ev._major != CORBA_NO_EXCEPTION) gtk_selection_data_set (selection_data, selection_data->target, 8, "", -1); else @@ -1102,6 +1085,7 @@ impl_tree_drag_data_get (ETree *etree, priv->drag_corba_data->format, priv->drag_corba_data->bytes._buffer, priv->drag_corba_data->bytes._length); +#endif g_free (target_type); @@ -1811,60 +1795,58 @@ class_init (EStorageSetViewClass *klass) signals[FOLDER_SELECTED] = gtk_signal_new ("folder_selected", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_selected), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[FOLDER_OPENED] = gtk_signal_new ("folder_opened", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_opened), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[DND_ACTION] = gtk_signal_new ("dnd_action", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, dnd_action), - marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING, + e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER, GTK_TYPE_NONE, 4, - GTK_TYPE_GDK_DRAG_CONTEXT, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_STRING); + GTK_TYPE_POINTER, + GTK_TYPE_POINTER, + GTK_TYPE_POINTER, + GTK_TYPE_POINTER); signals[FOLDER_CONTEXT_MENU_POPPING_UP] = gtk_signal_new ("folder_context_menu_popping_up", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[FOLDER_CONTEXT_MENU_POPPED_DOWN] = gtk_signal_new ("folder_context_menu_popped_down", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down), - gtk_marshal_NONE__NONE, + e_shell_marshal_NONE__NONE, GTK_TYPE_NONE, 0); signals[CHECKBOXES_CHANGED] = gtk_signal_new ("checkboxes_changed", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetViewClass, checkboxes_changed), - gtk_marshal_NONE__NONE, + e_shell_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - checks [0] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm); checks [1] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm); checks [2] = gdk_pixbuf_new_from_xpm_data (check_missing_xpm); @@ -2109,7 +2091,8 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view, priv->ui_component = bonobo_ui_component_new_default (); bonobo_ui_component_set_container (priv->ui_component, - bonobo_object_corba_objref (BONOBO_OBJECT (ui_container))); + bonobo_object_corba_objref (BONOBO_OBJECT (ui_container)), + NULL); } priv->etree_model = e_tree_memory_callbacks_new (etree_icon_at, diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c index a7043df577..9d3b804b77 100644 --- a/shell/e-storage-set.c +++ b/shell/e-storage-set.c @@ -28,6 +28,7 @@ #include "e-storage-set-view.h" #include "e-shell-constants.h" +#include "e-shell-marshal.h" #include <glib.h> #include <gtk/gtkobject.h> @@ -372,62 +373,60 @@ class_init (EStorageSetClass *klass) signals[NEW_STORAGE] = gtk_signal_new ("new_storage", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, new_storage), - gtk_marshal_NONE__POINTER, + e_shell_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); signals[REMOVED_STORAGE] = gtk_signal_new ("removed_storage", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, removed_storage), - gtk_marshal_NONE__POINTER, + e_shell_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); signals[NEW_FOLDER] = gtk_signal_new ("new_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, new_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[UPDATED_FOLDER] = gtk_signal_new ("updated_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, updated_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[REMOVED_FOLDER] = gtk_signal_new ("removed_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, removed_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[MOVED_FOLDER] = gtk_signal_new ("moved_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, moved_folder), - gtk_marshal_NONE__POINTER_POINTER, + e_shell_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_STRING, GTK_TYPE_STRING); signals[CLOSE_FOLDER] = gtk_signal_new ("close_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageSetClass, close_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void diff --git a/shell/e-storage.c b/shell/e-storage.c index dcaeb5cf18..f1cdb26036 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -32,20 +32,22 @@ #include "e-folder-tree.h" #include "e-shell-constants.h" +#include "e-shell-marshal.h" #include <gtk/gtkobject.h> #include <gtk/gtksignal.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> +#include <string.h> + #define PARENT_TYPE GTK_TYPE_OBJECT static GtkObjectClass *parent_class = NULL; #define ES_CLASS(obj) \ - E_STORAGE_CLASS (GTK_OBJECT (obj)->klass) + E_STORAGE_CLASS (GTK_OBJECT_GET_CLASS (obj)) struct _EStoragePrivate { /* The set of folders we have in this storage. */ @@ -284,37 +286,35 @@ class_init (EStorageClass *class) signals[NEW_FOLDER] = gtk_signal_new ("new_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageClass, new_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[UPDATED_FOLDER] = gtk_signal_new ("updated_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageClass, updated_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[REMOVED_FOLDER] = gtk_signal_new ("removed_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageClass, removed_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); signals[CLOSE_FOLDER] = gtk_signal_new ("close_folder", GTK_RUN_FIRST, - object_class->type, + GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EStorageClass, close_folder), - gtk_marshal_NONE__STRING, + e_shell_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -710,8 +710,9 @@ e_storage_new_folder (EStorage *storage, } g_free (parent_path); - gtk_signal_connect_while_alive (GTK_OBJECT (e_folder), "changed", folder_changed_cb, - storage, GTK_OBJECT (storage)); + gtk_signal_connect_while_alive (GTK_OBJECT (e_folder), "changed", + GTK_SIGNAL_FUNC (folder_changed_cb), storage, + GTK_OBJECT (storage)); gtk_signal_emit (GTK_OBJECT (storage), signals[NEW_FOLDER], path); diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c index f1d8ed435e..2cb08d6c96 100644 --- a/shell/e-task-widget.c +++ b/shell/e-task-widget.c @@ -32,7 +32,6 @@ #include <gtk/gtkpixmap.h> #include <gtk/gtktooltips.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <gal/util/e-util.h> diff --git a/shell/evolution-storage-set-view.c b/shell/evolution-storage-set-view.c index 26e4bf53a9..551664ff3d 100644 --- a/shell/evolution-storage-set-view.c +++ b/shell/evolution-storage-set-view.c @@ -29,6 +29,10 @@ #include <gal/util/e-util.h> +#include <gtk/gtksignal.h> + +#include <string.h> + #define PARENT_TYPE bonobo_object_get_type () static BonoboObjectClass *parent_class = NULL; @@ -178,30 +182,6 @@ remove_listener (EvolutionStorageSetView *storage_set_view, /* CORBA interface implementation. */ -static POA_GNOME_Evolution_StorageSetView__vepv StorageSetView_vepv; - -static POA_GNOME_Evolution_StorageSetView * -create_servant (void) -{ - POA_GNOME_Evolution_StorageSetView *servant; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - servant = (POA_GNOME_Evolution_StorageSetView *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &StorageSetView_vepv; - - POA_GNOME_Evolution_StorageSetView__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - servant = NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - static void impl_StorageSetView_add_listener (PortableServer_Servant servant, const GNOME_Evolution_StorageSetViewListener listener, @@ -415,18 +395,15 @@ impl_destroy (GtkObject *object) static void -corba_class_init (void) +class_init (EvolutionStorageSetViewClass *klass) { - POA_GNOME_Evolution_StorageSetView__vepv *vepv; POA_GNOME_Evolution_StorageSetView__epv *epv; - PortableServer_ServantBase__epv *base_epv; + GtkObjectClass *object_class; - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; + object_class = GTK_OBJECT_CLASS (klass); + object_class->destroy = impl_destroy; - epv = g_new0 (POA_GNOME_Evolution_StorageSetView__epv, 1); + epv = & (klass->epv); epv->addListener = impl_StorageSetView_add_listener; epv->removeListener = impl_StorageSetView_remove_listener; epv->_set_showFolders = impl_StorageSetView__set_showFolders; @@ -436,23 +413,7 @@ corba_class_init (void) epv->_set_checkedFolders = impl_StorageSetView__set_checkedFolders; epv->_get_checkedFolders = impl_StorageSetView__get_checkedFolders; - vepv = &StorageSetView_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->GNOME_Evolution_StorageSetView_epv = epv; -} - -static void -class_init (EvolutionStorageSetViewClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = impl_destroy; - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - corba_class_init (); + parent_class = gtk_type_class (PARENT_TYPE); } static void @@ -470,21 +431,15 @@ init (EvolutionStorageSetView *storage_set_view) void evolution_storage_set_view_construct (EvolutionStorageSetView *storage_set_view, - GNOME_Evolution_StorageSetView corba_object, EStorageSetView *storage_set_view_widget) { EvolutionStorageSetViewPrivate *priv; - g_return_if_fail (storage_set_view != NULL); g_return_if_fail (EVOLUTION_IS_STORAGE_SET_VIEW (storage_set_view)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - g_return_if_fail (storage_set_view_widget != NULL); g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view_widget)); priv = storage_set_view->priv; - bonobo_object_construct (BONOBO_OBJECT (storage_set_view), corba_object); - g_assert (priv->storage_set_view_widget == NULL); priv->storage_set_view_widget = GTK_WIDGET (storage_set_view_widget); @@ -497,25 +452,20 @@ evolution_storage_set_view_construct (EvolutionStorageSetView *storage_set_view, EvolutionStorageSetView * evolution_storage_set_view_new (EStorageSetView *storage_set_view_widget) { - POA_GNOME_Evolution_StorageSetView *servant; - GNOME_Evolution_StorageSetView corba_object; EvolutionStorageSetView *new; g_return_val_if_fail (storage_set_view_widget != NULL, NULL); g_return_val_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view_widget), NULL); - servant = create_servant (); - if (servant == NULL) - return NULL; - new = gtk_type_new (evolution_storage_set_view_get_type ()); - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - - evolution_storage_set_view_construct (new, corba_object, storage_set_view_widget); + evolution_storage_set_view_construct (new, storage_set_view_widget); return new; } -E_MAKE_TYPE (evolution_storage_set_view, "EvolutionStorageSetView", EvolutionStorageSetView, class_init, init, PARENT_TYPE) +E_MAKE_X_TYPE (evolution_storage_set_view, "EvolutionStorageSetView", EvolutionStorageSetView, + class_init, init, PARENT_TYPE, + POA_GNOME_Evolution_StorageSetView__init, + GTK_STRUCT_OFFSET (EvolutionStorageSetViewClass, epv)) diff --git a/shell/evolution-storage-set-view.h b/shell/evolution-storage-set-view.h index edbaad77ff..4e5a3b1ed3 100644 --- a/shell/evolution-storage-set-view.h +++ b/shell/evolution-storage-set-view.h @@ -23,7 +23,7 @@ #ifndef _EVOLUTION_STORAGE_SET_VIEW_H_ #define _EVOLUTION_STORAGE_SET_VIEW_H_ -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> #include "e-storage-set-view.h" @@ -46,19 +46,20 @@ typedef struct _EvolutionStorageSetViewPrivate EvolutionStorageSetViewPrivate; typedef struct _EvolutionStorageSetViewClass EvolutionStorageSetViewClass; struct _EvolutionStorageSetView { - BonoboObject parent; + BonoboXObject parent; EvolutionStorageSetViewPrivate *priv; }; struct _EvolutionStorageSetViewClass { - BonoboObjectClass parent_class; + BonoboXObjectClass parent_class; + + POA_GNOME_Evolution_StorageSetView__epv epv; }; GtkType evolution_storage_set_view_get_type (void); void evolution_storage_set_view_construct (EvolutionStorageSetView *storage_set_view, - GNOME_Evolution_StorageSetView corba_object, EStorageSetView *storage_set_view_widget); EvolutionStorageSetView *evolution_storage_set_view_new (EStorageSetView *storage_set_view_widget); diff --git a/shell/main.c b/shell/main.c index f4e5ea39e8..2108f183fd 100644 --- a/shell/main.c +++ b/shell/main.c @@ -35,17 +35,18 @@ #include <gdk/gdkx.h> #include <X11/Xlib.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> -#include <libgnomeui/gnome-init.h> -#include <libgnomeui/gnome-stock.h> +#include <libgnomeui/gnome-ui-init.h> #include <libgnomeui/gnome-window-icon.h> + #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-moniker-util.h> #include <bonobo/bonobo-exception.h> + +#include <bonobo-activation/bonobo-activation.h> + #include <glade/glade.h> -#include <liboaf/liboaf.h> #ifdef GTKHTML_HAVE_GCONF #include <gconf/gconf.h> @@ -54,6 +55,9 @@ #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-cursors.h> +#include <string.h> +#include <unistd.h> + #include "e-util/e-gtk-utils.h" #include "e-icon-factory.h" @@ -140,7 +144,7 @@ no_views_left_cb (EShell *shell, gpointer data) GtkWidget *quit_box; quit_box = quit_box_new (); - gtk_signal_connect (GTK_OBJECT (quit_box), "destroy", quit_box_destroyed_callback, &quit_box); + gtk_signal_connect (GTK_OBJECT (quit_box), "destroy", GTK_SIGNAL_FUNC (quit_box_destroyed_callback), &quit_box); /* FIXME: This is wrong. We should exit only when the shell is destroyed. But refcounting is broken at present, so this is a @@ -194,14 +198,16 @@ warning_dialog_clicked_callback (GnomeDialog *dialog, void *data) { GtkCheckButton *dont_bother_me_again_checkbox; - Bonobo_ConfigDatabase config_db; + EConfigListener *config_listener; dont_bother_me_again_checkbox = GTK_CHECK_BUTTON (data); - config_db = e_shell_get_config_db (shell); - bonobo_config_set_boolean (config_db, "/Shell/skip_warning_dialog_1_1", - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dont_bother_me_again_checkbox)), - NULL); + config_listener = e_config_listener_new (); + + e_config_listener_set_boolean (config_listener, "/Shell/skip_warning_dialog_1_1", + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dont_bother_me_again_checkbox))); + + g_object_unref (config_listener); gtk_widget_destroy (GTK_WIDGET (dialog)); } @@ -213,10 +219,10 @@ show_development_warning (GtkWindow *parent) GtkWidget *warning_dialog; GtkWidget *dont_bother_me_again_checkbox; GtkWidget *alignment; - Bonobo_ConfigDatabase config_db; + EConfigListener *config_listener; - config_db = e_shell_get_config_db (shell); - if (bonobo_config_get_boolean_with_default (config_db, "/Shell/skip_warning_dialog_1_1", FALSE, NULL)) + config_listener = e_shell_get_config_listener (shell); + if (e_config_listener_get_boolean_with_default (config_listener, "/Shell/skip_warning_dialog_1_1", FALSE, NULL)) return; warning_dialog = gnome_dialog_new ("Ximian Evolution " VERSION, GNOME_STOCK_BUTTON_OK, NULL); @@ -295,33 +301,21 @@ new_view_created_callback (EShell *shell, GTK_SIGNAL_FUNC (new_view_created_callback), data); - gtk_signal_connect (GTK_OBJECT (view), "map", view_map_callback, NULL); + gtk_signal_connect (GTK_OBJECT (view), "map", GTK_SIGNAL_FUNC (view_map_callback), NULL); } static void upgrade_from_1_0_if_needed (void) { - Bonobo_ConfigDatabase config_db; - CORBA_Environment ev; + EConfigListener *config_listener; int result; - CORBA_exception_init (&ev); - - config_db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); - if (BONOBO_EX (&ev) || config_db == CORBA_OBJECT_NIL) { - g_print ("(Cannot access Bonobo/ConfigDatabase, not upgrading configuration.)\n"); - if (BONOBO_EX (&ev)) - g_print ("\t%s\n", BONOBO_EX_ID (&ev)); - CORBA_exception_free (&ev); - return; - } - - CORBA_exception_free (&ev); + config_listener = e_config_listener_new (); if (! force_upgrade - && bonobo_config_get_boolean_with_default (config_db, "/Shell/upgrade_from_1_0_to_1_2_performed", - FALSE, NULL)) + && e_config_listener_get_boolean_with_default (config_listener, "/Shell/upgrade_from_1_0_to_1_2_performed", + FALSE, NULL)) return; g_print ("\nOlder configuration files detected, upgrading...\n"); @@ -333,9 +327,9 @@ upgrade_from_1_0_if_needed (void) else g_print ("\n*** Error upgrading configuration files -- status %d\n", result); - bonobo_config_set_boolean (config_db, "/Shell/upgrade_from_1_0_to_1_2_performed", TRUE, NULL); + e_config_listener_set_boolean (config_listener, "/Shell/upgrade_from_1_0_to_1_2_performed", TRUE); - bonobo_object_release_unref (config_db, NULL); + g_object_unref (config_listener); } @@ -388,7 +382,7 @@ idle_cb (void *data) break; case E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER: - corba_shell = oaf_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev); + corba_shell = bonobo_activation_activate_from_id (E_SHELL_OAFIID, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION || corba_shell == CORBA_OBJECT_NIL) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Cannot access the Ximian Evolution shell.")); @@ -451,7 +445,8 @@ idle_cb (void *data) if (ev._major == CORBA_NO_EXCEPTION) displayed_any = TRUE; else { - g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); + g_warning ("CORBA exception %s when requesting URI -- %s", + BONOBO_EX_REPOID (&ev), uri); CORBA_exception_free (&ev); } } @@ -464,7 +459,7 @@ idle_cb (void *data) uri = E_SHELL_VIEW_DEFAULT_URI; GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev); if (ev._major != CORBA_NO_EXCEPTION) - g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); + g_warning ("CORBA exception %s when requesting URI -- %s", BONOBO_EX_REPOID (&ev), uri); } CORBA_Object_release (corba_shell, &ev); @@ -491,7 +486,6 @@ main (int argc, char **argv) N_("Send the debugging output of all components to a file."), NULL }, { "force-upgrade", '\0', POPT_ARG_NONE, &force_upgrade, 0, N_("Force upgrading of configuration files from Evolution 1.0.x"), NULL }, - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } }; @@ -499,13 +493,14 @@ main (int argc, char **argv) const char **args; poptContext popt_context; - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - /* Make ElectricFence work. */ free (malloc (10)); - gnome_init_with_popt_table ("Evolution", VERSION " [" SUB_VERSION "]", argc, argv, options, 0, &popt_context); + gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + GNOME_PARAM_POPT_TABLE, options, + GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"), + NULL); if (start_online && start_offline) { fprintf (stderr, _("%s: --online and --offline cannot be used together.\n Use %s --help for more information.\n"), @@ -525,24 +520,12 @@ main (int argc, char **argv) g_warning ("Could not set up debugging output file."); } - oaf_init (argc, argv); - -#ifdef GTKHTML_HAVE_GCONF - gconf_init (argc, argv, NULL); -#endif - glade_gnome_init (); e_cursors_init (); e_icon_factory_init (); gnome_window_icon_set_default_from_file (EVOLUTION_IMAGES "/evolution-inbox.png"); - if (! bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot initialize the Bonobo component system.")); - exit (1); - } - /* FIXME */ evolution_directory = g_concat_dir_and_file (g_get_home_dir (), "evolution"); |