diff options
author | nobody <nobody@localhost> | 2002-06-04 08:04:04 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2002-06-04 08:04:04 +0800 |
commit | 7760ee15585aca92e42e860d9967ac4d70021c5a (patch) | |
tree | de637e066d27368c7895eb176998ffe0218d787d /shell | |
parent | b0d3a768d1197ef3fdd2f5884d981a23c367d594 (diff) | |
download | gsoc2013-evolution-EVOLUTION_1_0_6.tar.gz gsoc2013-evolution-EVOLUTION_1_0_6.tar.zst gsoc2013-evolution-EVOLUTION_1_0_6.zip |
This commit was manufactured by cvs2svn to create tagEVOLUTION_1_0_6
'EVOLUTION_1_0_6'.
svn path=/tags/EVOLUTION_1_0_6/; revision=17093
Diffstat (limited to 'shell')
-rw-r--r-- | shell/.cvsignore | 5 | ||||
-rw-r--r-- | shell/ChangeLog | 1558 | ||||
-rw-r--r-- | shell/Makefile.am | 129 | ||||
-rw-r--r-- | shell/e-setup.c | 43 | ||||
-rw-r--r-- | shell/e-shell-about-box.c | 7 | ||||
-rw-r--r-- | shell/e-shell-folder-commands.c | 62 | ||||
-rw-r--r-- | shell/e-shell-folder-creation-dialog.c | 15 | ||||
-rw-r--r-- | shell/e-shell-folder-selection-dialog.c | 36 | ||||
-rw-r--r-- | shell/e-shell-importer.c | 4 | ||||
-rw-r--r-- | shell/e-shell-startup-wizard.c | 14 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 116 | ||||
-rw-r--r-- | shell/e-shell-view.c | 360 | ||||
-rw-r--r-- | shell/e-shell.c | 475 | ||||
-rw-r--r-- | shell/e-splash.c | 1 | ||||
-rw-r--r-- | shell/evolution-nognome.in | 9 | ||||
-rw-r--r-- | shell/evolution-storage.c | 323 | ||||
-rw-r--r-- | shell/main.c | 180 |
17 files changed, 449 insertions, 2888 deletions
diff --git a/shell/.cvsignore b/shell/.cvsignore index 24af0d6ce2..b47eaace43 100644 --- a/shell/.cvsignore +++ b/shell/.cvsignore @@ -2,10 +2,6 @@ .deps .libs .pure -Evolution-Addressbook-SelectNames-common.c -Evolution-Addressbook-SelectNames-skels.c -Evolution-Addressbook-SelectNames-stubs.c -Evolution-Addressbook-SelectNames.h Evolution-common.c Evolution-skels.c Evolution-stubs.c @@ -15,6 +11,7 @@ ID Makefile Makefile.in evolution +evolution-nognome evolution-test-component evolution.pure libeshell.la diff --git a/shell/ChangeLog b/shell/ChangeLog index 91fc7c6e8c..de28c9348d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,1313 +1,33 @@ -2002-05-31 Ettore Perazzoli <ettore@ximian.com> +2002-06-03 Ettore Perazzoli <ettore@ximian.com> - * evolution-storage-set-view.c - (impl_StorageSetView__get_checkedFolders): Set release for the - CORBA path sequence to TRUE. - - * evolution-shell-component.c - (fill_corba_sequence_from_null_terminated_string_array): Set - release for the CORBA sequence to TRUE so it gets freed properly. - (impl__get_externalUriSchemas): Likewise for the returned - uri_chema_list. - - * e-shell-offline-handler.c (duplicate_connection_list): Set - release for the connection sequence to TRUE. - - * e-shell-config-offline.c (config_control_apply_callback): Set - release for the path sequence to TRUE. - - * e-corba-storage-registry.c - (impl_StorageRegistry_getStorageList): Set release for the storage - sequence to TRUE. - - * evolution-storage.c (impl_Storage__get_folderList): Set release - for the folder sequence to TRUE. - -2002-05-30 Ettore Perazzoli <ettore@ximian.com> - - [This fixes #25361.] - - * e-folder-list.c (e_folder_list_construct): Use - bonobo_object_ref() instead of bonobo_object_client_ref() as the - former only refs the CORBA object [Sigh]. - - * e-shell-config-autocompletion.c - (e_shell_config_autocompletion_create_widget): Don't unref the - shell_client here, as we need it. :-) - -2002-05-30 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view-menu.c (command_about_box): Connect - about_box_event_callback() to the "key_press_event" signal as - well. This way the about box is closed when you press a key too. - [#25349] - -2002-05-28 Chris Toshok <toshok@ximian.com> - - * e-folder-list.c (e_folder_list_set_items): skip folders that - aren't valid uri's. - (e_folder_list_get_items): didn't update this to track the change - in model columns. bad toshok. - -2002-05-24 Chris Toshok <toshok@ximian.com> - - [ fixes 90% of #25047 ] - * e-folder-list.c (get_folder_for_uri): shamelessly lifted from - evolution-folder-selector-button.c. - (create_display_string): modeled again after - evolution-folder-selector-button.c, so we can give a little more - context (and make the table look like the folder selector - buttons.) - (SPEC): add a pixbuf column, also remove the sorting behavior. - (columns): add a pixbuf column and another string column (for the - display string). - (add_clicked): create the display string and get the proper - pixbuf, and insert both. - (edit_clicked): removed. - (update_buttons): remove edit button handling from here. - (e_folder_list_init): remove the hooking up of button-edit's - "clicked" signal. - (e_folder_list_construct): get a reference to the storage registry - so we can look up folders. - (e_folder_list_set_items): analogous change to add_clicked - get - the display string and pixbuf and insert them. - - * glade/e-folder-list.glade: remove the edit button. - - * glade/e-shell-config-default-folders.glade: remove the - frame/vbox, since we embed it in a notebook and the tab has the - title already. - - * e-shell-config.c (config_control_factory_cb): the only config - control we deal with here now is the folder settings control. - - * e-shell-config-default-folders.c - (e_shell_config_default_folders_create_widget): rename - e_shell_config_default_folders_create_control to this, return the - widget, and take the config control to use as an arg. - - * e-shell-config-offline.c (e_shell_config_offline_create_widget): - make an analogous change here as with - default_folders_create_widget. - - * e-shell-config-default-folders.h - (e_shell_config_default_folders_create_widget): track change to - prototype. - - * e-shell-config-offline.h (e_shell_config_offline_create_widget): same. - - * GNOME_Evolution_Shell.oaf.in: remove the DefaultFolders and - OfflineFolders controls and add a FolderSettings_Control. - - * Makefile.am (evolution_SOURCES): add - e-shell-config-folder-settings.[ch] and - e-shell-config-autocompletion.[ch]. - - * e-shell-config-folder-settings.[ch]: new files, embed (after a - fashion) the default folder, offline, and autocompletion UI's in a - notebook. - - * e-shell-config-autocompletion.[ch]: Basically copy over and - shell-ize the addressbook autocompletion config control so it can - be embedded more easily with the other folder settings. - -2002-05-23 Ettore Perazzoli <ettore@ximian.com> - - * main.c (quit_box_new): Set @allow_shrink and @allow_grow to - FALSE for the window. Fixes #17534. - -2002-05-23 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-folder-selection-dialog.c - (e_shell_folder_selection_dialog_construct): Pass FALSE for - @allow_shrink. Fixes #15688. - -2002-05-23 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-folder-commands.c (delete_dialog): Make a little bit - prettier. Default to "Delete", not "Cancel". - -2002-05-23 Ettore Perazzoli <ettore@ximian.com> - - * e-shortcuts-view.c (rename_group_cb): Set the view type from the - original group, thus preserving the small-icon/large-icon state. - Fixes #6732. - -2002-05-23 Ettore Perazzoli <ettore@ximian.com> - - * main.c (show_development_warning): Add a toggle to avoid - displaying the dialog again. Don't display the dialog at all if - the /Shell/skip_warning_dialog_1_1 bonobo-conf key is set to - FALSE. - (warning_dialog_clicked_callback): Set - /Shell/skip_warning_dialog_1_1 according to the state of the check - button. - -2002-05-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell.c (impl_Shell_selectUserFolder): No more @default_type - arg to e_shell_folder_selection_dialog_new(). - - * e-shell-view-menu.c (command_goto_folder): No more @default_type - arg to e_shell_folder_selection_dialog_new(). - (command_new_shortcut): Likewise. - - * e-shell-importer.c (import_druid_finish): No more @default_type - arg to e_shell_folder_selection_dialog_new(). - - * e-shell-folder-commands.c (e_shell_command_move_folder): No more - @default_type arg to e_shell_folder_selection_dialog_new(). - (e_shell_command_copy_folder): Likewise. - - * e-shell-folder-selection-dialog.c: Removed default_type member - in EShellFolderSelectionDialogPrivate. - (e_shell_folder_selection_dialog_new): Removed @default_type arg. - (e_shell_folder_selection_dialog_construct): Likewise. - (impl_clicked): Just pass the first of the allowed types to - e_shell_show_folder_creation_dialog() for the default type. - - * evolution-shell-client.c (user_select_folder): No more - @default_type arg to the ::userSelectFolder CORBA method. - - * Evolution-Shell.idl (selectUserFolder): Remove arg - @default_type. - -2002-05-22 Ettore Perazzoli <ettore@ximian.com> - - * main.c (view_map_callback): New callback for when the first - created view in the shell gets mapped. - (new_view_created_callback): New callback for when the first view - of the shell gets created. - (show_development_warning): New function to display a warning - about the fact that Evolution is unstable. - (idle_cb): Call show_development_warning() here unless the - EVOLVE_ME_HARDER environment variable is set. - - * e-shell.c (class_init): Add the "new_view_created" signal here. - (create_view): Emit the signal here. - - * e-shell.h: New signal "new_view_created". - -2002-05-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-user-creatable-items-handler.c: New member - default_menu_item in EShellUserCreatableItemsHandlerPrivate. - (ensure_menu_items): Set ->default_menu_item. - (get_default_action_for_view): When no default item is specified, - just return ->default_menu_item. - -2002-05-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell.c (e_shell_prepare_for_quit): Only refuse quitting if - the result is CANCEL. This way we allow quitting if one of the - components has crashed or something else otherwise goes wrong. - Fixes #25093. - - * evolution-shell-component-client.c - (result_from_async_corba_result): Handle - GNOME_Evolution_ShellComponentListener_CANCEL. - -2002-05-21 Christopher James Lahey <clahey@ximian.com> - - * e-corba-storage.c (async_open_folder_idle): Do async_open_folder - in an idle callback. - - * e-shell-shared-folder-picker-dialog.c (user_clicked), - glade/e-shell-shared-folder-picker-dialog.glade: Added a select - names button here. - -2002-05-20 Chris Toshok <toshok@ximian.com> - - * evolution-folder-selector-button.c (clicked): set the parent - window insensitive before popping up the dialog and sensitive - after it's popped down, to give us semi-modal behavior. Also, - emit a "popped_up" signal when popping up the dialog, and emit - "canceled" when the return folder is NULL (when the user canceled - the dialog). - (class_init): fix typo (?) - parent type isn't - bonobo_object_get_type(), it's PARENT_TYPE. Also, initialize the - POPPED_UP and CANCELED signals. - - * evolution-folder-selector-button.h (struct - _EvolutionFolderSelectorButtonClass): add popped_up and canceled - signals. - -2002-05-20 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-offline-sync.c (sync_folder): Skip the folder if it - doesn't have the can_sync_offline property set. - -2002-05-20 Ettore Perazzoli <ettore@ximian.com> - - * e-corba-storage.c (impl_StorageListener_notifyFolderCreated): - Set the can_sync_offline property on the EFolder based on the - canSyncOffline value on the CORBA folder. - - * evolution-test-component.c (setup_custom_storage): Pass FALSE - for @sync_offline to evolution_storage_new_folder(). - - * e-local-storage.c (new_folder): Pass FALSE for @sync_offline to - evolution_storage_new_folder(). - - * evolution-storage.h (evolution_storage_new_folder): New arg - @can_sync_offline. - -2002-05-20 Ettore Perazzoli <ettore@ximian.com> - - * Evolution-Offline.idl (syncFolder): Remove exception. - (cancelSyncFolder): Remove exception. - - * e-shell-config-offline.c (storage_set_view_has_checkbox_func): - New. - (e_shell_config_offline_create_control): Pass it as the - @has_checkbox_func. - - * e-folder.c: New member can_sync_offline in EFolderPrivate. - (init): Init to FALSE. - (e_folder_get_can_sync_offline): New. - (e_folder_to_corba): Set canSyncOffline in the returned CORBA - folder. - (e_folder_set_physical_uri): Protect from when @physical_uri and - ->physical_uri are the same thing. - (e_folder_set_description): Same here with description. - (e_folder_set_type_string): And type. - - * Evolution-common.idl: New member canSyncOffline in struct - Folder. - -2002-05-20 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-config-offline.c - (e_shell_config_offline_create_control): Pass NULL for - @has_checkbox_func and @has_checkbox_func_data. - - * evolution-storage-set-view.c - (impl_StorageSetView__set_showCheckboxes): Pass NULL for - @has_checkbox_func and @has_checkbox_func_data. - - * e-storage-set-view.c: New member has_checkbox_func and - has_checkbox_func_data in EStorageSetViewPrivate. - (init): Init to NULL. - (e_storage_set_view_set_show_checkboxes): New args - @has_checkbox_func and @func_data. - (has_checkbox): Always return FALSE for the toplevels. For the - other ones return TRUE unless ->has_checkbox_func is not-NULL; in - which case, we use that function to determine whether the folder - is actually checkable. - - * Evolution-ShellComponent.idl (requestQuit): Remove exception. - -2002-05-16 Ettore Perazzoli <ettore@ximian.com> - - * e-shell.c (view_delete_event_cb): Ask e_shell_prepare_for_quit() - before destroying the view if it's the last one. - - * e-shell-view-menu.c (command_close): Synthesize a delete_event - on the view instead of directly destroying it. - -2002-05-15 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view-menu.c (command_quit): Check with - e_shell_prepare_for_quit() before quitting. - - * e-shell.c (e_shell_prepare_for_quit): New. - - * evolution-test-component.c (request_quit_fn): New function - asking for confirmation to quit. - - * evolution-shell-component.c (evolution_shell_component_new): New - arg @request_quit_fn. - (impl_requestQuit): New, implementation for - EvolutionShellComponent::requestQuit. - (evolution_shell_component_result_to_string): Handle - EVOLUTION_SHELL_COMPONENT_CANCEL. - (evolution_shell_component_client_request_quit): New. - - * Evolution-ShellComponent.idl (requestQuit): New. - -2002-05-15 Iain <iain@ximian.com> - - * e-corba-storage-registry.c (impl_StorageRegistry_addStorage): Remove - debuggin spew - -2002-05-15 Iain <iain@ximian.com> - - * e-corba-storage-registry.c (impl_StorageRegistry_addStorage): Apply - patch from Peter Williams to notify listeners when a new storage is - created. - -2002-05-14 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-offline-handler.c - (e_shell_offline_handler_put_components_offline): Call - e_shell_offline_sync_all_folders() if no connection is reported - here. - (dialog_handle_ok): Sync all the folders here through - e_shell_offline_sync_all_folders(). - - * e-shell-offline-sync.c: New. - * e-shell-offline-sync.h: New. - - * Evolution-Offline.idl (syncFolder): Make oneway. - (cancelSyncFolder): Likewise. - (SyncFolderProgressListener::reportSuccess): New method. - -2002-05-14 Christopher James Lahey <clahey@ximian.com> - - * Makefile.am: Added check-empty.xpm, check-filled.xpm, and - check-missing.xpm. - - * check-empty.xpm, check-filled.xpm, check-missing.xpm: New xpms. - Copied from gal. check-missing.xpm is simply a transparent xpm of - the correct size. - - * e-storage-set-view.c (etree_value_at): When getting, check if - the path doesn't have a check box and return 2 in that case. - (etree_set_value_at): Check if the path doesn't have a check box - and don't change it in that case. Also, just invert the value - here instead of paying attention to the set value passed in. - (class_init): Initialize the checks GdkPixbufs. - (e_storage_set_view_construct): Create the "optional_checkbox" - cell. - - * e-storage-set-view.etspec: Changed the cell for the checkbox - column to "optional_checkbox". - -2002-05-14 Christopher James Lahey <clahey@ximian.com> - - * evolution-storage.c (evolution_storage_new_folder): Compute the - evolutionUri here and pass it in. - -2002-05-14 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-config-offline.c - (init_storage_set_view_status_from_config): Add a missing - CORBA_free in the case in which the typecode of the - /OfflineFolders/Paths key in the ConfigDatabase doesn't match the - expected type. - -2002-05-14 Ettore Perazzoli <ettore@ximian.com> - - * e-shell.c (e_shell_go_offline): Pass self to - e_shell_offline_handler_new() instead of the component registry. - - * e-shell-offline-handler.c: Replace member `component_registry' - in EShellOfflineHandlerPrivate with a `shell' member. Updated all - the code to retrieve the component registry from the shell instead - of directly. - (e_shell_offline_handler_construct): Get a @shell instead of a - @component_registry. - -2002-05-13 Christopher James Lahey <clahey@ximian.com> - - * e-storage-set-view.c (e_storage_set_view_get_checkboxes_list): - Changed this to just walk the hash table to get the list of - checked checkboxes instead of walking the tree. (Makes it so that - checked paths will remain checked, even if they're not shown in - the tree when the list is gotten.) - -2002-05-13 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-config.c: Handle the e-shell-config-offline and - e-shell-config-default-folders pages. - - * e-shell-config-offline.h: New. - * e-shell-config-offline.c: New. - - * e-shell-config-default-folders.h: New. - * e-shell-config-default-folders.c: New. Moved default folder - page configuration in from e-shell-config.c. - - * GNOME_Evolution_Shell.oaf.in: Add - GNOME_Evolution_Shell_Config_OfflineFolders_Control. - -2002-05-13 Christopher James Lahey <clahey@ximian.com> - - * e-storage-set-view.c (etree_set_value_at): Added a signal when - the value of the checkboxes changes. - -2002-05-10 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-shared-folder-picker-dialog.c: Add members `parent' and - `shell' in DiscoveryData. - (shell_view_destroy_callback): Callback for destruction of - ->parent; set ->parent to NULL. - (shell_destroy_callback): Callback for the desctruction of the - shell; clean up everything. - (discover_folder): Initialize ->parent and shell, and add the - corresponding destruction handlers. - (shared_folder_discovery_listener_callback): Open the discovered - folder. - (setup_progress_dialog): Renamed from `show_progress_dialog'. Set - up a timeout for displaying the dialog instead of displaying it - right away. - (progress_dialog_show_timeout_callback): Callback for showing the - dialog after the callback. - -2002-05-10 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-shared-folder-picker-dialog.c - (shared_folder_discovery_listener_callback): Updated for - FolderResult instead of DiscoverSharedFolderResult. - - * Evolution-Storage.idl: Remove struct DiscoverSharedFolderResult; - we want to just use FolderResult for asyncDiscoverSharedFolder. - -2002-05-10 Ettore Perazzoli <ettore@ximian.com> - - * evolution-test-component.c: Added some tests for the custom - storage. - - * evolution-storage.c: New signal DISCOVER_SHARED_FOLDER. - (impl_Storage_asyncXferFolder): Renamed from - impl_Storage_async_xfer_folder. - (impl_Storage_asyncRemoveFolder): Renamed from - impl_Storage_async_remove_folder. - (impl_Storage_asyncCreateFolder): Renamed from - impl_Storage_async_create_folder. - (impl_Storage_asyncOpenFolder): Renamed from - impl_storage_async_open_folder. - (impl_Storage_addListener): Renamed from - impl_Storage_add_listener. - (impl_Storage_removeListener): Renamed from - impl_Storage_remove_listener. - (impl_Storage_asyncDiscoverSharedFolder): New, implementation for - ::asyncDiscoverSharedFolder. - (evolution_storage_get_epv): Install the CORBA method here. - (class_init): Set up the "discover_shared_folder" signal here. - (e_marshal_NONE__POINTER_POINTER): Yet Another Marshaller. Die - die die. - - * Evolution-Storage.idl (Storage::asyncDiscoverSharedFolder): New - method. - (StorageListener::notifySharedFolderDiscovered): New method. - - * e-shell-shared-folder-picker-dialog.c: New. - * e-shell-shared-folder-picker-dialog.h: New. - - * e-shell-view-menu.c (command_open_other_users_folder): New, - implementation for the FileOpenOtherUsersFolder verb. - - * Makefile.am: Generate stubs and skels for - Evolution::Addressbook::SelectNames as well. - - * glade/e-shell-shared-folder-picker-dialog.glade: New. - -2002-05-09 Ettore Perazzoli <ettore@ximian.com> - - * e-local-storage.c (construct): Pass %FALSE as - @has_shared_folders to evolution_storage_new(). - - * evolution-storage.c: New member has_shared_folders in - EvolutionStoragePrivate. - (init): Initialize to FALSE. - (evolution_storage_new): New arg @has_shared_folders. - (evolution_storage_construct): Likewise. - (impl_Storage__get_folderList): Renamed from - impl_Storage__get_folder_list. - (impl_Storage__get_hasSharedFolders): New, implementation for - ::hasSharedFolders. - (evolution_storage_get_epv): Install the CORBA method - implementation. - - * Evolution-Storage.idl: Make Storage::name a readonly attribute. New attribute Storage:: - -2002-05-09 Ettore Perazzoli <ettore@ximian.com> - - * Evolution-Offline.idl: Rename NotPrepared to notPrepared and - NotSyncing to notSyncing. - - * evolution-storage.c (impl_Storage__get_folder_list): Renamed - from impl_Storage_get_folder_list(). - - * Evolution-Storage.idl: Don't typedef FolderList here. Replace - `getFolderList' method with a readonly attribute. - -2002-05-07 Ettore Perazzoli <ettore@ximian.com> - - * Evolution-Offline.idl: New interface SyncFolderProgressListener. - (Offline::cancelSyncFolder): New. - (Offline::syncFolder): New. - -2002-05-07 JP Rosevear <jpr@ximian.com> - - * evolution-storage.c (get_folder_list_foreach): add every folder - to the sequence except the root folder - (impl_Storage_get_folder_list): implement corba method - (evolution_storage_get_epv): set new method implementation - - * evolution-folder-selector-button.h: fix signal prototype - - * e-folder-tree.h: new proto - - * e-folder-tree.c (e_folder_tree_get_count): count nodes - (count_nodes): bump count foreach path - - * e-corba-storage-registry.c - (impl_StorageRegistry_getStorageList): implement idl method - (corba_class_init): set epv method - - * Evolution-Storage.idl: add getStorageList and getFolderList - methods - -2002-05-07 Ettore Perazzoli <ettore@ximian.com> - - * evolution-test-component.c (create_new_folder_selector): Use the - new evolution_shell_client_create_storage_set_view() call. - - * evolution-shell-client.c - (evolution_shell_client_create_storage_set_view): New. - -2002-05-07 Ettore Perazzoli <ettore@ximian.com> - - * evolution-storage-set-view-factory.c - (evolution_storage_set_view_factory_new_view): Put the - EStorageSetView in an EScrollFrame. - - * e-shell.c (impl_Shell_createStorageSetView): - CORBA_Object_duplicate the object before returning. - - * evolution-test-component.c - (create_new_folder_selector): New function to create a simple test - environment for the new checkbox-enabled StorageSetView. - (register_component): Add user-creatable type FolderSelector. - (user_create_new_item_callback): Handle FolderSelector. - (dialog_clicked_callback): Print out the checked items in the - folder selector. - (main): Print out a message before going into bonobo_main(). - - * evolution-storage-set-view.c - (impl_StorageSetView__get_showFolders): Renamed from - impl_StorageSetView__get_show_folders. - (impl_StorageSetView__set_showFolders): Renamed from - impl_StorageSetView__set_show_folders. - (impl_StorageSetView__set_showCheckboxes): New, write the - showCheckboxes CORBA attribute. - (impl_StorageSetView__get_showCheckboxes): New, read the - showCheckboxes CORBA attribute. - (impl_StorageSetView__get_checkedFolders): New, read the - checkedFolders CORBA attribute. - (corba_class_init): Install the new CORBA methods methods. - - * e-storage-set-view.c (essv_add_to_list): strdup() the path. - (e_storage_set_view_get_storage_set): New. - - * e-folder.c (e_folder_to_corba): New. - - * Evolution-StorageSetView.idl: Add showCheckboxes and - checkedFolders attributes. - - * Evolution-common.idl: Add typedef for FolderList. - -2002-05-03 Christopher James Lahey <clahey@ximian.com> - - * e-folder-list.c: Use bonobo_object_client_(un)?ref instead of - gtk_object_(un)?ref. - (add_clicked): Don't pass NULL to - evolution_shell_client_user_select_folder. - - * glade/Makefile.am: Added e-folder-list.glade - - * glade/e-folder-list.glade: The glade file for e-folder-list. - -2002-05-03 Christopher James Lahey <clahey@ximian.com> - - * Makefile.am (eshellinclude_HEADERS): Added e-folder-list.h. - (libeshell_la_SOURCES): Added e-folder-list.c. - - * e-folder-list.c, e-folder-list.h: New widget for editing a list - of folder uris. - -2002-04-29 Christopher James Lahey <clahey@ximian.com> - - * e-storage-set-view.c (e_storage_set_view_set_checkboxes_list, - e_storage_set_view_get_checkboxes_list): Added these functions. - Implemented checkboxes in the ETreeModel here. - -2002-04-19 Anna Marie Dirks <anna@ximian.com> - - * glade/e-shell-config-default-folders.glade: Minor label tweaks; - changed "Default folders" to "Default Folders", and added - accelerators. - -2002-04-18 JP Rosevear <jpr@ximian.com> - - * evolution-shell-view.c (impl_ShellView_show_settings): emit - show_settings signal - (corba_class_init): assign epv method - (class_init): add signal - - * evolution-shell-view.h: new signal - - * e-shell.c (init): init settings_dialog private member - (settings_dialog_destroy_cb): reset dialog pointer - (e_shell_show_settings): show the settings dialog, bring it to the - front if one already exists for this shell - - * e-shell.h: new proto - - * e-shell-view.c (corba_interface_show_settings): implement - showSettings method - (setup_corba_interface): listen for show_settings signal - (e_shell_view_show_settings): show the settings dialog - - * e-shell-view.h: new proto - - * e-shell-view-menu.c (command_settings): call - e_shell_view_show_settings instead - - * Evolution-ShellView.idl: add showSettings method - -2002-04-17 Ettore Perazzoli <ettore@ximian.com> - - * e-shortcuts-view.c (impl_shortcut_drag_motion): New, override - for EShortcutBar::shortcut_drag_motion. - (impl_shortcut_drag_data_received): New, override for - EShortcutBar::shortcut_drag_data_received. - (class_init): Install the method overrides. - -2002-04-17 Christopher James Lahey <clahey@ximian.com> - - * e-activity-handler.c: Updated this to match the new EPopupMenu. - -2002-04-17 Ettore Perazzoli <ettore@ximian.com> - - * e-storage-set-view.c (handle_evolution_path_drag_motion): - Removed. - (impl_tree_drag_motion): Rewritten to use - `e_folder_dnd_bridge_motion()'. - (impl_tree_drag_data_received): Rewritten to use - `e_folder_dnd_bridge_data_received()'. - (convert_gdk_drag_action_to_corba): Removed. - (convert_corba_drag_action_to_gdk): Removed. - (find_matching_target_for_drag_context): Removed. - - * e-folder-dnd-bridge.c: New. - * e-folder-dnd-bridge.h: New. - -2002-04-10 Dan Winship <danw@ximian.com> - - * e-shell-config.c: Shell config page routines. Right now - handles the default folders page. - - * glade/e-shell-config-default-folders.glade: New. - - * GNOME_Evolution_Shell.oaf.in: Add info for the default folders - config page. - - * main.c (idle_cb): If we successfully registered the shell, - register the config factory. - - * evolution-shell-client.c (evolution_shell_client_new): Note the - fact that it frees the corba_shell when it is destroyed. - - * evolution-folder-selector-button.c - (evolution_folder_selector_button_construct, destroy): Use - bonobo_object_ref/unref on the shell client, not gtk. - - * e-shell.c (e_shell_construct): Pass local_directory to - e_setup_check_db. - (handle_default_uri): Fix the config db paths here to match the - other routines. - - * e-setup.c (e_setup_check_db): Make this take the evolution - directory path as well so we can properly set up file: URIs for - the default folders. - -2002-04-09 Ettore Perazzoli <ettore@ximian.com> - - * main.c (idle_cb): Change the logic for displaying a default - window, so we don't end up with two windows all the time. - -2002-04-09 Ettore Perazzoli <ettore@ximian.com> - - [Patch from Max Horn <max@quendi.de>.] - - * e-local-storage.c: Move <dirent.h> down the #include list so it - compiles on Darwin. - -2002-04-09 Dan Winship <danw@ximian.com> - - * e-setup.c (e_setup_check_db): New. Check that things that need - to be in the config db are. Right now it sets up the default - folders. - - * e-shell.c (e_shell_construct): Call e_setup_check_db after - getting the config db. - (impl_Shell_handleURI): Handle "default:" URIs by looking up the - default folders in the config db. - - * main.c (idle_cb): Check for "default:" URIs and treat them the - same way as "evolution:" URIs. If the shell fails to display all - of the requested URIs, fall back to the default URI (Summary). + * e-shell-about-box.c: Fix the copyright text. [Fixes #24284, + thanks to Ian Peters <itp@ximian.com>.] - * e-shell-constants.h: Add E_SUMMARY_URI, E_LOCAL_INBOX_URI, etc. +2002-05-06 Ettore Perazzoli <ettore@ximian.com> - * e-shortcuts.c (e_shortcuts_add_default_group): Use - E_LOCAL_INBOX_URI, etc. + * evolution-nognome.in: No bin part in GNOME_PATH. - * e-shell-view.c: #define FALLBACK_URI to E_SUMMARY_URI +2002-04-24 Ettore Perazzoli <ettore@ximian.com> -2002-04-09 Dan Winship <danw@ximian.com> + * evolution-nognome.in: New script to run Evolution under a + non-GNOME session when using a non-default GNOME prefix and a + non-default Evolution prefix. - * Evolution-ShellComponent.idl (createView): Add a "view_info" - argument. +2002-04-22 Not Zed <NotZed@Ximian.com> - * e-shell-view.c (get_view_for_uri): if the URI contains a '#', - split it into a URI and a "view_info" at that point. (Otherwise, - pass "" for the view_info to ShellComponent_createView.) This can - be used for things like specifying day/month/week view to the - calendar. - - * e-shell.c (create_view): Ignore e_shell_view_display_uri's - return code: it's possible/likely that the requested URL is remote - and hasn't been filled in yet. - (impl_Shell_handleURI): Don't use Shell_createNewView directly, - call e_shell_create_view_from_uri_and_settings. (For the above fix - and some others.) - - * evolution-shell-component.c (impl_createView): Add view_info. - - * evolution-shell-component-client.c - (evolution_shell_component_client_create_view): Add view_info. - - * evolution-test-component.c (create_view_fn): add view_data. - - * e-corba-storage-registry.c - (impl_StorageRegistry_getFolderByUri): kill a warning - -2002-04-08 Dan Winship <danw@ximian.com> - - Fix "evolution evolution:/path/to/folder" to use default view - prefs. - - * e-shell.c (impl_Shell_createNewView): Use - e_shell_create_view_from_uri_and_settings to create the new view - based on saved view 0 instead of always using the initial - evolution defaults. - (e_shell_create_view_from_uri_and_settings): Renamed and - simplified; the template_view argument was useless and - settings_found would always be set to TRUE in the context it was - being used it. - (e_shell_restore_from_settings): Simplify for - e_shell_create_view_from_uri_and_settings changes. - - * e-shell-view.c (e_shell_view_load_settings): Only load the - DisplayedURI if the view isn't already displaying a URI. Also, - pass an &ev to the first bonobo_config_get_long so we can tell if - it failed and bail out. - - * e-shell-view.h: Remove a prototype for a non-existent function - (e_shell_view_remove_control_for_uri). - - * main.c (idle_cb): Add some comments here and remove some dead - code. - -2002-04-06 JP Rosevear <jpr@ximian.com> - - * e-shell-settings-dialog.c (page_new): set type - (load_pages): get the oaf property for type and track the page - number of the highest priority for each type - (destroy_type_entry): destroy hash func - (impl_destroy): destroy the hash table - (init): create private struct and hash table - (e_shell_settings_dialog_show_type): show the page of the given - type - - * e-shell-view-menu.c (command_settings): show the page for the - current folder type by default - - * e-shell-settings-dialog.h: new proto - -2002-04-06 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c (init): Set the title of the dialog. - -2002-04-04 Dan Winship <danw@ximian.com> - - * evolution-shell-client.c - (evolution_shell_client_get_pixbuf_for_type): Fix a memory mixup. - -2002-04-04 Dan Winship <danw@ximian.com> - - * evolution-folder-selector-button.c: New widget for a button that - displays a folder selection in a standard form, and when clicked - lets the user select a new folder. - - * Evolution-Shell.idl (FolderSelectionListener:notifySelected): - Make this take an Evolution:Folder instead of a pair of uris. - (Shell:getIconByType): New method to get the icon for a type from - the folder type registry. - - * Evolution-common.idl (Folder): add "evolutionUri" to the folder - structure. - - * Evolution-Storage.idl (StorageRegistry:getFolderByUri): get an - Evolution:Folder for a given uri. - - * evolution-shell-client.c - (evolution_shell_client_user_select_folder): Update this to - reflect the IDL change: return a GNOME_Evolution_Folder instead of - a pair of URIs. Make sure it always sets *@folder_return to %NULL - if it fails (even if it's a g_return_if_fail). - (evolution_shell_client_get_storage_registry_interface): New. - (evolution_shell_client_get_pixbuf_for_type): New. Uses - Shell_getIconByType, but caches results. - - * e-shell.c (folder_selection_dialog_folder_selected_cb): Update - for API change. (Return a GNOME_Evolution_Folder.) - (impl_Shell_getIconByType): Implement. - - * e-corba-storage-registry.c - (impl_StorageRegistry_getFolderByUri): Implement. - - * evolution-storage.c (evolution_storage_new_folder): Add a - (dummy) evolutionUri to the folder. - - * Makefile.am (libeshell_la_SOURCES): add - evolution-folder-selector-button.c - (eshellinclude_HEADERS): and .h + * evolution-storage.c (evolution_storage_update_folder, + evolution_storage_removed_folder): We are successful when ev.major + == CORBA_NO_EXCEPTION, not the other way around. For 'the shell + code is solid' #23538. 2002-04-04 Ettore Perazzoli <ettore@ximian.com> - * evolution-shell-component.c: Change type of parent_class to - BonoboXObjectClass. - - * e-shell.c (pop_up_activation_error_dialog): New helper function - to pop up a dialog if one of the components couldn't be activated, - getting the description for the error from - e_get_activation_failure_msg(). - (setup_components): Use this function in case of activation error. - (set_owner_on_components): Likewise, when the component gets - restarted. Also get a @splash arg so we can set the parent for - this dialog correctly. - - * e-component-registry.c (register_component): New arg @ev. - (e_component_registry_register_component): Likewise. - (e_component_registry_restart_component): Likewise. Also, remove - some bogus code that was #if'ed out. - - * evolution-shell-component-client.c - (evolution_shell_component_client_new): New arg @ev. - - * evolution-shell-component-utils.c - (e_get_activation_failure_msg): New. - -2002-04-03 Dan Winship <danw@ximian.com> - - * e-storage.c (get_path_for_physical_uri_foreach): Deal with - folders with no physical_uri. - -2002-04-02 Christopher James Lahey <clahey@ximian.com> - - * e-storage-set-view.c (e_storage_set_view_set_show_checkboxes): - Set the show_checkboxes field here instead of the show_folders - field. - -2002-04-02 Christopher James Lahey <clahey@ximian.com> - - * e-storage-set-view.c (etree_value_at): If folder is NULL, return - the correct type of data. - -2002-04-02 Christopher James Lahey <clahey@ximian.com> - - * Makefile.am (etspec_DATA): Added - e-storage-set-view-checkboxes.etstate and - e-storage-set-view-no-checkboxes.etstate here. - - * e-storage-set-view-checkboxes.etstate, - e-storage-set-view-no-checkboxes.etstate: The two possible states - of the EStorageSetView. - - * e-storage-set-view.c, e-storage-set-view.h - (e_storage_set_view_set_show_checkboxes, - e_storage_set_view_get_show_checkboxes): Added this functionality. - Added a model column to the underlying table for the checkbox - data. - - * e-storage-set-view.etspec: Added a view column for the - checkboxes. - -2002-03-29 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c: Add type "Page". - (page_new): New helper function. - (page_free): New helper function. - (compare_page_func): Callback for sorting a GList of pages. - (sort_page_list): New helper function. - (load_pages): Create the pages, sort them, add them sorted. Now - we have a priority field that overrides alphabetical sorting. - -2002-03-26 Ettore Perazzoli <ettore@ximian.com> - - * e-component-info.c: New. - * e-component-info.h: New. - -2002-03-26 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c (load_pages): g_warning if the control - cannot be activated. - -2002-03-25 Dan Winship <danw@ximian.com> - - * e-shell.c (e_shell_construct): Register a "working" folder type - with the hourglass icon. (Would eventually like an animated gif, - when ETable supports that.) - - * e-storage.c (e_storage_has_subfolders): Use "working" rather - than "noselect" as the folder type. - - * e-shell-view.c (get_view_for_uri): Simplify a bit. - -2002-03-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c (get_language_list): Removed. - (load_pages): Use e_get_language_list() here instead. Also, free - using e_free_language_list(). - -2002-03-22 Dan Winship <danw@ximian.com> - - * evolution-storage.c (evolution_storage_update_folder): Fix a - "how can this ever have worked" bug to make unread message counts - start working again. (#22293 etc) - (evolution_storage_removed_folder): Oops. Fix here too. - (evolution_storage_has_subfolders): And here. When cut and paste - goes bad... - - * e-shell-folder-commands.c (e_shell_command_rename_folder): Use - e_folder_get_name. Don't assume it's the same as the last path - element. - -2002-03-21 Dan Winship <danw@ximian.com> - - * e-splash.c (e_splash_construct): Set the wmclass to - "evolution-splash" so sawfish knows it's not the same kind of - window as the main window. - -2002-03-20 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view-menu.c: Make all the verb/menu arrays appropriately - static. - -2002-03-20 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view-menu.c (command_send_receive): New, implementation - for the "SendReceive" verb. - - * e-shell.c (e_shell_send_receive): New. - - * evolution-shell-component.c (impl_sendReceive): Implementation - of ShellComponent::sendReceive. - (class_init): Add the "send_receive" signal. - - * evolution-shell-component.h: Added `send_receive' signal. - - * Evolution-ShellComponent.idl: Added ShellComponent::sendReceive. - -2002-03-18 Ettore Perazzoli <ettore@ximian.com> - - * e-storage-set-view.etspec: Add `search="string"' for the - keyboard navigability search thingy. - -2002-03-15 Jeffrey Stedfast <fejj@ximian.com> - - * e-activity-handler.c (show_cancellation_popup): Updated to use - new EPopupMenu API. - -2002-03-14 Dan Winship <danw@ximian.com> - - Support for delayed filling-in of storages/folders. - - * Evolution-Storage.idl (StorageListener): add - notifyHasSubfolders, to announce that a folder has currently- - unknown subfolders. - (Storage): add asyncOpenFolder, to request that previously- - announced subfolders be filled in. - - * evolution-storage.c (impl_Storage_async_open_folder): emit - OPEN_FOLDER. - (evolution_storage_has_subfolders): Implement by calling - notifyHasSubfolders on all of its listeners. - - * evolution-storage-listener.c - (impl_GNOME_Evolution_StorageListener_notifyHasSubfolders): emit - HAS_SUBFOLDERS. - - * e-corba-storage.c (impl_StorageListener_notifyHasSubfolders): - Implement by calling e_storage_has_subfolders. - (async_open_folder): Implement by calling asyncOpenFolder on the - CORBA storage. - - * e-storage.c (EStoragePrivate, init, destroy): Keep a list of - pseudofolders representing un-filled-in subtrees. - (impl_async_open_folder): No-op default implementation - (e_storage_async_open_folder): New function to request that - un-filled-in subtrees be filled in. - (e_storage_new_folder): If the new folder's parent has an - "un-filled-in children" pseudofolder, remove it. - (e_storage_has_subfolders): New function to note that a folder has - unknown children. If the folder previously was marked as having - real children, remove them, and emit CLOSE_FOLDER to reset it back - to an a "unknown subfolders" state. - - * e-storage-set.c (make_full_path): Make this deal with path being - "/", since that case gets used from storage_close_folder_cb - sometimes. - (storage_close_folder_cb): Proxy EStorage's CLOSE_FOLDER signal. - (storage_set_view_folder_opened): Handle EStorageSetView's - FOLDER_OPENED signal by calling e_storage_async_open_folder. - - * e-storage-set-view.c (etree_fill_in_children): If the given node - is its parent's first child, emit FOLDER_OPENED for the parent. - (close_folder_cb): Handler for EStorageSet's CLOSE_FOLDER signal. - Ask the model to close that node. - (e_storage_set_view_construct): Set the default expanded state for - the tree to FALSE rather than TRUE, to prevent unwanted expansion - of delayed nodes. (This only affects the very first time the tree - is displayed anyway: after that its state is loaded off disk.) - - * e-shell.c (e_shell_construct): Register the "noselect" type with - the folder type registry, so icon lookups on placeholder folders - will work. - -2002-03-13 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c (load_pages): Use - `evolution:config_item:icon_name' instead of - `evolution:config_item:icon_path'. If it's not an absolute path, - load from the IMAGESDIR. Also, no need to specify the language - list for this one, as the icon name shouldn't be translated. - -2002-03-12 Ettore Perazzoli <ettore@ximian.com> - - * evolution-test-component.c (create_configuration_page): Update - to create an EvolutionConfigControl instead of just a - BonoboControl. - - * e-corba-config-page.c (e_corba_config_page_construct): Get a - GNOME_Evolution_ConfigControl instead of a CORBA_Object. Retrieve - the control from it using ::_get_control instead of just assuming - it's a control. Also return a boolen indicating success or - failure. - (e_corba_config_page_new): Likewise, get a - GNOME_Evolution_ConfigControl. - (setup_listener): Renamed from `setup_config_control_interface'. - Get a ::ConfigControl instead of a CORBA::Object. Thus, no need - to queryInterface here anymore. - - * evolution-config-control.c, evolution-config-control.h: New, - implementation for the Evolution::ConfigControl interface. - - * Evolution-ConfigControl.idl: New attribute `control'. - -2002-03-09 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-folder-commands.c (e_shell_command_rename_folder): Make - old_name_locale non-const to placate a compiler warning. - (get_corba_null_value): Likewise. - - * e-activity-handler.c (report_task_event): `#if 0' out. - -2002-03-09 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-settings-dialog.c (load_pages): Use ECorbaConfigPages. - - * e-corba-config-page.c: New. - * e-corba-config-page.h: New. - - * Evolution.idl: #include <Evolution-ConfigControl.idl>. - - * Evolution-ConfigControl.idl: New IDL for configuration Controls - that will be displayed in the global config dialog. - -2002-03-08 Dan Winship <danw@ximian.com> - - * e-storage-set-view.[ch]: Note that e_storage_set_view_new - shouldn't be used directly. - - * e-shell-view.c (setup_storage_set_subwindow): Use - e_storage_set_new_view instead of e_storage_set_view_new. - - * evolution-storage-set-view-factory.c - (evolution_storage_set_view_factory_new_view): Likewise. - -2002-03-07 Ettore Perazzoli <ettore@ximian.com> + [Fix #22047, Crash after running the start-up wizard.] - * evolution-test-component.c (create_configuration_page): New - function to create a test configuration page for the test - component. - (configuration_control_factory_fn): Factory function for the - configuration controls. - (register_configuration_control_factory): New function to register - the factory. - (main): Call it. - - * e-shell-view-menu.c: Add verb "Settings". - (command_settings): Implementation for the "Settings" verb. - - * GNOME_Evolution_TestComponent.oaf: Add a configuration control. - - * e-shell-settings-dialog.c: New. - * e-shell-settings-dialog.h: New. - -2002-03-07 Dan Winship <danw@ximian.com> - - Addendum to previous commit: Remove "storage_selected" vs - "folder_selected" distinction. - - * evolution-storage-set-view.c - (storage_set_view_widget_storage_selected_cb): Removed. - - * evolution-storage-set-view-listener.c - (impl_GNOME_Evolution_StorageSetViewListener_notifyStorageSelected): - Removed. - (class_init): Remove STORAGE_SELECTED signal. - - * e-storage-set-view.c (impl_cursor_activated): Always emit - FOLDER_SELECTED, never STORAGE_SELECTED. - (class_init): Remove STORAGE_SELECTED signal. - - * e-shell-view.c (storage_selected_cb): Removed. - - * e-shell-folder-creation-dialog.c - (storage_set_view_storage_selected_cb): Removed. - - * Evolution-StorageSetView.idl (StorageSetViewListener): Remove - notifyStorageSelected. - -2002-03-07 Dan Winship <danw@ximian.com> - - Make storages-with-toplevel-views less of a hack. - - * e-folder-tree.c (e_folder_tree_add): Allow the caller to "add" a - root folder, if the existing root folder has no children. - (e_folder_tree_new): Use e_folder_tree_add to create the root - folder, since it can do that now. - - * e-storage.c: (e_storage_construct): Replace toplevel_node_uri - and toplevel_node_type args with root_folder. - (e_storage_new): Likewise. - (*): Remove toplevel uri/type stuff everywhere. Also remove - display_name since now we will use the name of the root folder for - that. - - * evolution-storage.c: Remove toplevel uri/type stuff everywhere. - - * e-local-storage.c (construct): Pass root_folder to - e_storage_construct instead of toplevel uri/type. - Also, evolution_storage_new no longer takes toplevel uri/type. - - * e-corba-storage.c (e_corba_storage_construct): Out with toplevel - uri/type, in with root_folder. - (e_corba_storage_new): Remove toplevel uri/type. - - * e-shell.c (setup_local_storage): Create a top-level folder of - type "summary" for the Summary storage. - - * e-storage-set-view.c (set_e_shortcut_selection): Remove - special-case for storages. - (etree_icon_at): Remove special case for figuring out storage - icons (but leave the code for storages without icons). - (etree_value_at): Remove special case for storage names. (But - still make storages always bold.) Remove unused special-case code - for Summary. - - * e-shortcuts.c (load_shortcuts): Remove special case for - storages, reorganize a bit. - - * e-shortcuts-view.c (get_shortcut_info): Remove special case for - storages. - - * e-shell-view.c (update_for_current_uri): Remove special case for - storages. - (socket_destroy_cb): Likewise. - (get_type_for_storage): No longer needed. - (get_view_for_uri): No longer needs to special-case storages (but - add a special case for folders of type "noselect", to make them - unselectable like storages-without-toplevel-views used to be). - - * e-storage-set.c (get_storage_for_path): If passed "/foo", return - "/" as subpath_return so e_storage_set_get_folder will DTRT in the - NWO. - - * Evolution-Storage.idl (addStorage): Remove the toplevel_node_uri - and toplevel_node_type arguments. - - * e-corba-storage-registry.c (impl_StorageRegistry_addStorage): - Likewise. - -2002-03-06 Dan Winship <danw@ximian.com> - - * e-storage.c: Keep the storage name and display_name in - EStoragePriv. - (impl_get_name, impl_get_display_name): Return them. - (e_storage_construct): Set them here. - (e_storage_new): And here. - - * e-local-storage.c: (impl_get_name, impl_get_display_name): - Removed. - (construct): Pass E_LOCAL_STORAGE_NAME and U_("Local Folders") to - e_storage_construct. - - * e-corba-storage.c: Remove priv->name. - (get_name, get_display_name): Removed. - (e_corba_storage_construct): Pass name to e_storage_construct(). - - * e-summary-storage.[ch]: Gone. This didn't override anything in - EStorage but get_name/get_display_name, and the defaults for those - DTRT now. - - * e-shell-constants.h: Move E_SUMMARY_STORAGE_NAME here from - e-summary-storage.h, and move E_LOCAL_STORAGE_NAME too for - consistency. - - * e-storage-set-view.c: Fix up #includes. - - * e-shell-importer.c: Likewise - - * e-shell.c: Likewise. Create summary_storage as a plain EStorage - since ESummaryStorage is gone now. - - * Makefile.am (evolution_SOURCES): Remove e-summary-storage.[ch] - -2002-03-06 Dan Winship <danw@ximian.com> - - * e-corba-storage-registry.c - (impl_StorageRegistry_removeListener): Fix up GList/GSList - confusion. - - * e-shell-user-creatable-items-handler.c - (get_default_action_for_view): Don't look into the types list if - it's empty. - -2002-03-06 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-about-box.c: Reduce width of the copyright message so it - looks prettier with the new Rupert artwork. - -2002-03-04 Iain Holmes <iain@ximian.com> + * e-shell-startup-wizard.c (startup_wizard_cancel): Unref the + ETimezoneDialog. + (finish_func): Likewise. - * Evolution-Storage.idl: Add some methods to the StorageRegistry - interface to get a storage, and add or remove listeners. Also add a - new exception and some structs and enums for messages. - - * e-corba_storage-registry.c: Add a GSList to the private stuct for - recording the listeners. - (listener_notify): Send a message to the listeners. - (impl_StorageRegistry_getStorageByName): Implementation of the - getStorageByName method. Returns the associated storage interface - (storage_set_foreach): Loop through all the storages in the storageset - and notify the listeners about them. - (find_listener): Find a listener in the list of them. - (impl_StorageRegistry_addListener): Add a new listener to the - registry. - (impl_StorageRegistry_removeListener): Remove a listener. - (corba_class_init): Add the new methods to the EPV. - (init): NULL the listeners list. - - * e-corba-storage.[ch] (e_corba_storage_get_corba_objref): Get the CORBA - interface from the GtkObject. - 2002-03-04 Ettore Perazzoli <ettore@ximian.com> [Fix #20234, Deleting Folder gratuitiously causes /local to open.] @@ -1331,7 +51,7 @@ * e-shell-folder-commands.c (xfer_result_callback): Display an error message if the operation failed. -2002-02-26 Ettore Perazzoli <ettore@ximian.com> +2002-03-04 Ettore Perazzoli <ettore@ximian.com> [This gets rid of some spurious "could not find handler" messages on exit. What happened is that the signal would be disconnected @@ -1342,138 +62,6 @@ (e_shell_view_display_uri): Use gtk_signal_connect_full(), not e_gtk_signal_connect_full_while_alive(). -2002-02-23 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-about-box.c: Add year 2002 to the copyright. - -2002-02-23 Ettore Perazzoli <ettore@ximian.com> - - * e-storage-set-view.c (impl_destroy): Renamed from `destroy'. - (impl_right_click): Renamed from `right_click'. - (impl_cursor_activated): Renamed from `cursor_activated'. - (impl_tree_start_drag): Renamed from `tree_start_drag'. - (impl_tree_drag_begin): Renamed from `tree_drag_begin'. - (impl_tree_drag_end): Renamed from `tree_drag_end'. - (impl_tree_drag_data_get): Renamed from `tree_drag_data_get'. - (impl_tree_drag_data_delete): Renamed from - `tree_drag_data_delete'. - (impl_tree_drag_motion): Renamed from `tree_drag_motion'. - (impl_tree_drag_leave): Renamed from `tree_drag_leave'. - (impl_tree_drag_drop): Renamed from `tree_drag_drop'. - (impl_tree_drag_data_received): Renamed from - `tree_drag_data_received'. - -2002-02-22 Ettore Perazzoli <ettore@ximian.com> - - [Fix #3029, Offline mode should be preserved across sessions.] - - * main.c (idle_cb): Use the e_shell_new() API below so that we use - the saved offline settings at the next start-up if neither - --offline nor --online has been specified. - - * e-shell.c (save_misc_settings): New function. For now, just - save `/Shell/StartOffline' indicating whether the shell should - start in offline mode or not. - (e_shell_construct): Replace @start_online with - @startup_line_mode. - (e_shell_new): Likewise. - - * e-shell.h: New enum EShellStartupLineMode. - -2002-02-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view.c (remove_uri_from_history): New helper function to - remove all the matching URIs from the history. - (history_uri_matching_func): Compare function for using - e_history_remove_matching. - (storage_set_removed_folder_callback): Call - `remove_uri_from_history()'. - - * e-history.c (e_history_remove_matching): New. - -2002-02-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view.c (update_navigation_buttons): New. - (display_uri): Call it before returning so the navigation buttons - always have the right sensitivity. - - * e-shell-folder-title-bar.c - (e_shell_folder_title_bar_update_navigation_buttons): New. - (add_navigation_buttons): Remove the "Back" label. - -2002-02-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view.c: New member `history' in `EShellViewPrivate'. - (init): Initialize. - (destroy): Unref. - (e_shell_view_display_uri): Make it a no-op if the URI is the same - as the current one. Also, moved code into `display_uri' and use - it. - (back_clicked_callback): New, callback for the back button on the - folder title bar. - (forward_clicked_callback): Likewise for the forward button. - - * e-history.c: New. - * e-history.h: New. - -2002-02-22 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-view.c (e_shell_view_show_folder_bar): - `e_shell_folder_title_bar_set_title_clickable()', not - `e_shell_folder_title_bar_set_clickable()'. - - * e-shell-folder-title-bar.c: Rename `button', `button_label' and - `button_arrow' to `title_button', `title_button_label' and - `title_button_arrow'. Renamed `label' to `title_label'. Renamed - `arrow_xpm' to `down_arrow_xpm'. Added `left_arrow.xpm' and - `right_arrow.xpm'. - (class_init): Add the "back_clicked" and "forward_clicked" - signals. - (add_navigation_buttons): New function to add the navigation - buttons to the title bar. - (back_button_clicked_callback): Callback for the back button, - emits "back_clicked". - (forward_button_clicked_callback): Callback for the forward - button, emits "forward_clicked". - (e_shell_folder_title_bar_construct): Call - `add_navigation_buttons()'. - (forward_button_clicked_callback): - (create_arrow_pixmap): Removed. - (create_pixmap_widget_from_xpm): New. - (title_button_box_realize_cb): Removed. - (e_shell_folder_title_bar_construct): Don't connect. Just add the - icon normally using the new `create_pixmap_widget_from_xpm()'. - (e_shell_folder_title_bar_set_title_clickable): Renamed from - `e_shell_folder_title_bar_set_clickable'. - (size_allocate_navigation_buttons): New. - (size_allocate_title_button): Get an @offset. - (size_allocate_label): Get an @offset. - (size_allocate): Allocate the navigation buttons and offset - everything else accordingly. - - * e-shell-folder-title-bar.h: New signals "back_clicked", - "forward_clicked". - -2002-02-21 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-user-creatable-items-handler.c - (get_default_action_for_view): Return NULL if there is no - component ID for the current view. - -2002-02-21 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-user-creatable-items-handler.c (ensure_menu_items): Set - the icons for all the "New..." menu items from the specified one - in the type definitions. - - * e-activity-handler.c (create_gdk_pixbuf_from_corba_icon): - Removed. - (impl_operationStarted): Just use - `e_new_gdk_pixbuf_from_corba_icon()'. - - * e-shell-corba-icon-utils.c (e_new_gdk_pixbuf_from_corba_icon): - New. - 2002-02-20 Ettore Perazzoli <ettore@ximian.com> [Fix #20311, new window from Shortcuts should not show the folder @@ -1486,106 +74,12 @@ * e-shell-view.c (activate_shortcut_cb): Don't show the folder bar and the shortcut bar in the new window. - * e-shell-view.c (e_shell_create_view): Don't flush the GTK events + * e-shell.c (e_shell_create_view): Don't flush the GTK events here. 2002-02-20 Ettore Perazzoli <ettore@ximian.com> - * e-shell.c (e_shell_construct): New arg @start_online. If true, - invoke `e_shell_go_online()' before returning. - (e_shell_new): New arg @start_online. Pass it to - e_shell_construct(). - (init): Default ->line_status to E_SHELL_LINE_STATUS_OFFLINE. - - * main.c (main): Add "--offline" and "--online" options. - -2002-01-30 Not Zed <NotZed@Ximian.com> - - * e-storage-set-view.c (popup_folder_menu): Use - right_click_row_path rather than selected_row_path, so clients get - the uri that was actually clicked on. - -2002-01-27 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Use SHELL_CFLAGS and SHELL_LIBS. - * importer/Makefile.am: Likewise. - -2002-01-24 Ettore Perazzoli <ettore@ximian.com> - - * Makefile.am: Just use BONOBO_HTML_GNOME_CFLAGS and - BONOBO_HTML_GNOME_LIBS for compiling/linking; we don't need the - other ones. - -2002-01-23 Ettore Perazzoli <ettore@ximian.com> - - * e-shell-user-creatable-items-handler.c: New member `id' in - struct `Component'. New member `icon' in struct `MenuItem'. - (component_free): Free ->id. - (component_new): Renamed from `component_new_from_client'. Get an - @id arg and set ->id accordingly. - (e_shell_user_creatable_items_handler_add_component): New arg @id. - Pass it to `component_new'. - (e_shell_user_creatable_items_handler_setup_menus): New arg - @current_component_id. - (e_shell_user_creatable_items_handler_update_menus): New. - (set_current_component): New helper function. - (get_component_by_id): New helper function. - (add_verbs): Renamed from `add_verbs_to_ui_component()'. Get a - @shell_view instead of a @ui_component. Set the SHELL_VIEW_KEY on - the ui_component of the shell_view to point to the shell_view - itself. - (ensure_menu_items): Set item->icon to NULL. - (free_menu_items): Unref item->icon. - (ensure_menu_xml): Set the icon as well. - (get_default_action_for_view): New helper function. - (find_menu_item_for_verb): New helper function. - (shell_view_view_changed_callback): New callback, set up the label - on the "New" button depending on the current component. - (e_shell_user_creatable_items_handler_attach_menus): New. For - now, do not display the toolbar button yet. - (execute_verb): New helper function, splitting out code from - `verb_fn'. - (verb_fn): Use `execute_verb'. - (combo_button_activate_default_callback): Callback for the - "activate_default" signal on the EComboButton. - (setup_toolbar_button): Connect. - - * evolution-shell-component.c: New member `icon' in - `UserCreatableItemType'. - (impl__get_userCreatableItemTypes): Put the ->icon in the - corba_type as well. - (user_creatable_item_type_new): Get a new @icon argument. - (evolution_shell_component_add_user_creatable_item): New arg - @icon. - - * Evolution-ShellComponent.idl: New member `icon' in struct - `UserCreatableItemType'. - - * evolution-test-component.c (register_component): Pass a NULL - @icon to `evolution_shell_component_add_user_creatable_item()'. - - * e-shell-view.c (class_init): Add the signal to the class. - (e_shell_view_display_uri): Emit "view_changed". - (e_shell_view_get_current_component_id): New. - - * evolution-shell-component-client.c: New member `id' in - EvolutionShellComponentClientPrivate. - (init): Init to NULL. - (impl_destroy): Free. - (evolution_shell_component_client_new_for_objref): Removed. - (evolution_shell_component_client_construct): New arg @id. - Initialize ->id from it. - (evolution_shell_component_client_get_id): New. - - * e-shell-view.h: New signal "view_changed". - - * evolution-activity-client.c (create_icon_from_pixbuf): Removed. - (create_corba_animated_icon_from_pixbuf_array): Removed. - (evolution_activity_client_construct): Use - `e_new_corba_animated_icon_from_pixbuf_array()' instead. - - * e-shell-icon-utils.h: New. - * e-shell-icon-utils.c: New. + * e-shell-about-box.c: Add Hans Petter. 2002-01-23 Ettore Perazzoli <ettore@ximian.com> @@ -1596,8 +90,8 @@ 2002-01-15 Iain Holmes <iain@ximian.com> - * e-shell-importer.c (show_import_wizard): Set the importer druid - as a transient window of the parent shell. + * e-shell-importer.c (show_import_wizard): Set the druid as transient + for the main shell. 2002-01-15 Ettore Perazzoli <ettore@ximian.com> @@ -1626,7 +120,7 @@ 2001-12-17 Ettore Perazzoli <ettore@ximian.com> - [Fix #17377, Evolution doesn't work on multi-depth displays.] + [Fixes #17377, Evolution doesn't work on multi-depth displays.] * main.c (main): Push GdkRGB visual and colormap. @@ -1707,6 +201,10 @@ of the tree. (impl_destroy): Call save_expanded_state(). +2001-11-15 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-about-box.c: Add missing comma. + 2001-11-14 Ettore Perazzoli <ettore@ximian.com> * e-shell-about-box.c: Add more contributors to the box. diff --git a/shell/Makefile.am b/shell/Makefile.am index 95854f4f5a..32b778ae6d 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,23 +1,25 @@ SUBDIRS = glade importer -INCLUDES = -O \ - -I$(top_srcdir)/widgets \ - -I$(top_srcdir)/widgets/misc \ - -I$(top_srcdir)/libical/src/libical \ - -I$(top_srcdir) \ - -DEVOLUTION_IMAGES=\""$(datadir)/images/evolution"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DEVOLUTION_GLADEDIR=\"$(datadir)/evolution/glade\" \ - -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ - -DG_LOG_DOMAIN=\"evolution-shell\" \ - $(SHELL_CFLAGS) - -# Shell CORBA stuff +INCLUDES = -O \ + -I$(top_srcdir)/widgets \ + -I$(top_srcdir)/widgets/misc \ + -I$(top_srcdir)/libical/src/libical \ + -I$(top_srcdir) \ + $(BONOBO_GNOME_CFLAGS) \ + $(BONOBO_CONF_CFLAGS) \ + $(EXTRA_GNOME_CFLAGS) \ + $(GTKHTML_CFLAGS) \ + -DEVOLUTION_IMAGES=\""$(datadir)/images/evolution"\" \ + -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ + -DEVOLUTION_DATADIR=\""$(datadir)"\" \ + -DEVOLUTION_GLADEDIR=\"$(datadir)/evolution/glade\" \ + -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ + -DG_LOG_DOMAIN=\"evolution-shell\" + +# CORBA stuff IDLS = \ Evolution-Activity.idl \ - Evolution-ConfigControl.idl \ Evolution-Offline.idl \ Evolution-Session.idl \ Evolution-Shell.idl \ @@ -43,21 +45,6 @@ $(IDL_GENERATED): $(IDLS) $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ $(srcdir)/Evolution.idl -# SelectNames CORBA stuff - -SELECT_NAMES_IDL = \ - $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl - -SELECT_NAMES_IDL_GENERATED = \ - Evolution-Addressbook-SelectNames.h \ - Evolution-Addressbook-SelectNames-common.c \ - Evolution-Addressbook-SelectNames-skels.c \ - Evolution-Addressbook-SelectNames-stubs.c - -$(SELECT_NAMES_IDL_GENERATED): $(SELECT_NAMES_IDL) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ - $(SELECT_NAMES_IDL) - # IDL install idldir = $(datadir)/idl @@ -73,10 +60,8 @@ eshellincludedir = $(includedir)/evolution/shell eshellinclude_HEADERS = \ Evolution.h \ - e-folder-list.h \ e-folder-tree.h \ evolution-activity-client.h \ - evolution-folder-selector-button.h \ evolution-session.h \ evolution-shell-client.h \ evolution-shell-component-client.h \ @@ -91,14 +76,8 @@ eshellinclude_HEADERS = \ libeshell_la_SOURCES = \ $(IDL_GENERATED) \ - e-folder-list.c \ e-folder-tree.c \ - e-shell-corba-icon-utils.c \ - e-shell-corba-icon-utils.h \ evolution-activity-client.c \ - evolution-config-control.c \ - evolution-config-control.h \ - evolution-folder-selector-button.c \ evolution-session.c \ evolution-shell-client.c \ evolution-shell-component-client.c \ @@ -117,49 +96,30 @@ libeshell_la_SOURCES = \ bin_PROGRAMS = evolution evolution_SOURCES = \ - $(SELECT_NAMES_IDL_GENERATED) \ e-activity-handler.c \ e-activity-handler.h \ - e-component-info.c \ - e-component-info.h \ e-component-registry.c \ e-component-registry.h \ - e-corba-config-page.c \ - e-corba-config-page.h \ e-corba-shortcuts.c \ e-corba-shortcuts.h \ e-corba-storage-registry.c \ e-corba-storage-registry.h \ e-corba-storage.c \ e-corba-storage.h \ - e-folder-dnd-bridge.c \ - e-folder-dnd-bridge.h \ e-folder-type-registry.c \ e-folder-type-registry.h \ e-folder.c \ e-folder.h \ e-gray-bar.c \ e-gray-bar.h \ - e-history.c \ - e-history.h \ e-local-folder.c \ e-local-folder.h \ e-local-storage.c \ e-local-storage.h \ e-setup.c \ e-setup.h \ - e-shell-about-box.c \ e-shell-about-box.h \ - e-shell-config.c \ - e-shell-config.h \ - e-shell-config-autocompletion.c \ - e-shell-config-autocompletion.h \ - e-shell-config-offline.c \ - e-shell-config-offline.h \ - e-shell-config-default-folders.c \ - e-shell-config-default-folders.h \ - e-shell-config-folder-settings.c \ - e-shell-config-folder-settings.h \ + e-shell-about-box.c \ e-shell-constants.h \ e-shell-folder-commands.c \ e-shell-folder-commands.h \ @@ -173,12 +133,6 @@ evolution_SOURCES = \ e-shell-importer.h \ e-shell-offline-handler.c \ e-shell-offline-handler.h \ - e-shell-offline-sync.c \ - e-shell-offline-sync.h \ - e-shell-settings-dialog.c \ - e-shell-settings-dialog.h \ - e-shell-shared-folder-picker-dialog.c \ - e-shell-shared-folder-picker-dialog.h \ e-shell-startup-wizard.c \ e-shell-startup-wizard.h \ e-shell-user-creatable-items-handler.c \ @@ -205,6 +159,8 @@ evolution_SOURCES = \ e-storage-set.h \ e-storage.c \ e-storage.h \ + e-summary-storage.c \ + e-summary-storage.h \ e-task-bar.c \ e-task-bar.h \ e-task-widget.c \ @@ -217,14 +173,18 @@ evolution_SOURCES = \ evolution-storage-set-view-factory.h \ main.c -evolution_LDADD = \ - libeshell.la \ - importer/libevolution-importer.la \ +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)/widgets/misc/libemiscwidgets.a \ + $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/libical/src/libical/libical-evolution.la \ - $(SHELL_LIBS) + $(EXTRA_GNOME_LIBS) \ + $(GNOME_PRINT_LIBS) \ + $(GTKHTML_LIBS) \ + $(BONOBO_CONF_LIBS) \ + $(BONOBO_GNOME_LIBS) # Test component @@ -236,7 +196,10 @@ evolution_test_component_SOURCES = \ evolution_test_component_LDADD = \ libeshell.la \ - $(SHELL_LIBS) + $(EXTRA_GNOME_LIBS) \ + $(GNOME_PRINT_LIBS) \ + $(GTKHTML_LIBS) \ + $(BONOBO_GNOME_LIBS) install-test-component: evolution-test-component $(mkinstalldirs) $(DESTDIR)$(bindir) @@ -251,25 +214,17 @@ oaf_in_files = GNOME_Evolution_Shell.oaf.in oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) etspecdir = $(datadir)/evolution/etspec/ -etspec_DATA = \ - e-storage-set-view.etspec \ - e-storage-set-view-checkboxes.etstate \ - e-storage-set-view-no-checkboxes.etstate +etspec_DATA = e-storage-set-view.etspec @XML_I18N_MERGE_OAF_RULE@ -icons = \ - check-empty.xpm \ - check-filled.xpm \ - check-missing.xpm - EXTRA_DIST = \ $(IDLS) \ $(oaf_in_files) \ $(oaf_DATA) \ $(etspec_DATA) \ - $(icons) \ - GNOME_Evolution_TestComponent.oaf + GNOME_Evolution_TestComponent.oaf \ + evolution-nognome.in # Purify support @@ -285,9 +240,15 @@ evolution.pure: evolution endif -CLEANFILES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) -BUILT_SOURCES = $(IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED) +CLEANFILES = $(IDL_GENERATED) +BUILT_SOURCES = $(IDL_GENERATED) dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +if HAVE_DTAPPINTEGRATE + +bin_SCRIPTS = evolution-nognome + +endif
\ No newline at end of file diff --git a/shell/e-setup.c b/shell/e-setup.c index b3d41509c4..31c16eca2b 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -41,8 +41,6 @@ #include <gal/widgets/e-gui-utils.h> #include "e-local-folder.h" -#include "e-shell-config.h" -#include "e-shell-constants.h" #include "e-setup.h" @@ -415,44 +413,3 @@ e_setup (const char *evolution_directory) Check if it is up to date. */ return check_evolution_directory (evolution_directory); } - - -void -e_setup_check_db (Bonobo_ConfigDatabase db, const char *evolution_directory) -{ - char *uri; - - if (bonobo_config_get_string_with_default (db, "/DefaultFolders/mail_path", NULL, NULL) == NULL) { - bonobo_config_set_string (db, "/DefaultFolders/mail_path", - E_LOCAL_INBOX_URI, NULL); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_INBOX_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/mail_uri", - uri, NULL); - g_free (uri); - - bonobo_config_set_string (db, "/DefaultFolders/contacts_path", - E_LOCAL_CONTACTS_URI, NULL); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/contacts_uri", - uri, NULL); - g_free (uri); - - bonobo_config_set_string (db, "/DefaultFolders/calendar_path", - E_LOCAL_CALENDAR_URI, NULL); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/calendar_uri", - uri, NULL); - g_free (uri); - - bonobo_config_set_string (db, "/DefaultFolders/tasks_path", - E_LOCAL_TASKS_URI, NULL); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_TASKS_URI, '/'), NULL); - bonobo_config_set_string (db, "/DefaultFolders/tasks_uri", - uri, NULL); - g_free (uri); - } -} diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index 461cda2d08..e56987655d 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -1,7 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* e-shell-about-box.c * - * Copyright (C) 2001, 2002 Ximian, Inc. + * Copyright (C) 2001 Ximian, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -37,8 +37,8 @@ static GtkEventBoxClass *parent_class = NULL; static const char *text[] = { "", - "Evolution " VERSION, - "Copyright 1999 - 2002 Ximian, Inc.", + N_("Evolution " VERSION), + N_("Copyright 1999-2002 Ximian, Inc."), "", N_("Brought to you by"), "", @@ -74,6 +74,7 @@ static const char *text[] = { "Gediminas Paulauskas", "Jesse Pavel", "Ettore Perazzoli", + "Hans Petter", "JP Rosevear", "Jeffrey Stedfast", "Jakub Steiner", diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index a9a8c9bc51..4a2bbe7e4f 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -322,8 +322,11 @@ e_shell_command_copy_folder (EShell *shell, get_folder_name (shell, folder_path)); uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL); - folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, _("Copy folder"), - caption, uri, NULL); + folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, + _("Copy folder"), + caption, + uri, + NULL, NULL); g_free (caption); g_free (uri); @@ -366,8 +369,11 @@ e_shell_command_move_folder (EShell *shell, get_folder_name (shell, folder_path)); uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL); - folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, _("Move folder"), - caption, uri, NULL); + folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, + _("Move folder"), + caption, + uri, + NULL, NULL); g_free (caption); g_free (uri); @@ -396,30 +402,38 @@ delete_cb (EStorageSet *storage_set, static int delete_dialog (EShellView *shell_view, const char *utf8_folder) { - GtkWidget *dialog; + GnomeDialog *dialog; char *title; + GtkWidget *question_label; char *question; char *folder_name; - folder_name = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), (char *) utf8_folder); - + /* Popup a dialog asking if they are sure they want to delete + the folder */ + folder_name = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), + (char *)utf8_folder); title = g_strdup_printf (_("Delete \"%s\""), folder_name); - question = g_strdup_printf (_("Really delete folder \"%s\"?"), folder_name); - - dialog = gnome_message_box_new (question, - GNOME_MESSAGE_BOX_QUESTION, - _("Delete"), - GNOME_STOCK_BUTTON_CANCEL, - NULL); - gtk_window_set_title (GTK_WINDOW (dialog), title); - gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (shell_view)); - gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); + dialog = GNOME_DIALOG (gnome_dialog_new (title, + GNOME_STOCK_BUTTON_YES, + GNOME_STOCK_BUTTON_NO, + NULL)); g_free (title); + gnome_dialog_set_parent (dialog, GTK_WINDOW (shell_view)); + + /* "Are you sure..." label */ + question = g_strdup_printf (_("Are you sure you want to remove the \"%s\" folder?"), + folder_name); + question_label = gtk_label_new (question); + gtk_widget_show (question_label); + + gtk_box_pack_start (GTK_BOX (dialog->vbox), question_label, FALSE, TRUE, 2); g_free (folder_name); g_free (question); - return gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + gnome_dialog_set_default (dialog, 1); + + return gnome_dialog_run_and_close (dialog); } void @@ -510,8 +524,7 @@ e_shell_command_rename_folder (EShell *shell, EStorageSet *storage_set; EFolder *folder; RenameCallbackData *callback_data; - const char *old_name; - char *old_name_locale; + const char *old_name, *old_name_locale; char *prompt; char *new_name; char *old_base_path; @@ -530,7 +543,10 @@ e_shell_command_rename_folder (EShell *shell, folder = e_storage_set_get_folder (storage_set, folder_path); g_return_if_fail (folder != NULL); - old_name = e_folder_get_name (folder); + /* Note that we don't need to get the display name here, as the stock + folders cannot be renamed anyway. */ + old_name = g_basename (folder_path); + old_name_locale = e_utf8_to_locale_string (old_name); prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name_locale); g_free (old_name_locale); @@ -559,8 +575,8 @@ e_shell_command_rename_folder (EShell *shell, return; } - old_base_path = g_dirname (folder_path); - new_path = g_concat_dir_and_file (old_base_path, new_name); + old_base_path = g_strndup (folder_path, old_name - folder_path); + new_path = g_strconcat (old_base_path, new_name, NULL); callback_data = rename_callback_data_new (shell_view, new_path); e_storage_set_async_xfer_folder (storage_set, folder_path, new_path, TRUE, rename_cb, callback_data); diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index 7b9b5ab4de..dbbdcdfd74 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -262,6 +262,19 @@ storage_set_view_folder_selected_cb (EStorageSetView *storage_set_view, gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE); } +static void +storage_set_view_storage_selected_cb (EStorageSetView *storage_set_view, + const char *name, + void *data) +{ + DialogData *dialog_data; + + dialog_data = (DialogData *) data; + + if (GTK_ENTRY (dialog_data->folder_name_entry)->text_length > 0) + gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE); +} + /* Shell signal callbacks. */ @@ -536,6 +549,8 @@ e_shell_show_folder_creation_dialog (EShell *shell, gtk_signal_connect (GTK_OBJECT (dialog_data->storage_set_view), "folder_selected", storage_set_view_folder_selected_cb, dialog_data); + gtk_signal_connect (GTK_OBJECT (dialog_data->storage_set_view), "storage_selected", + storage_set_view_storage_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 e3e5d6e3d0..5419da4431 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -49,6 +49,7 @@ struct _EShellFolderSelectionDialogPrivate { GList *allowed_types; EStorageSet *storage_set; GtkWidget *storage_set_view; + char *default_type; gboolean allow_creation; }; @@ -159,6 +160,7 @@ impl_destroy (GtkObject *object) e_free_string_list (priv->allowed_types); + g_free (priv->default_type); g_free (priv); (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); @@ -199,7 +201,6 @@ impl_clicked (GnomeDialog *dialog, EShellFolderSelectionDialogPrivate *priv; EStorageSetView *storage_set_view; const char *default_parent_folder; - const char *default_type; folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog); priv = folder_selection_dialog->priv; @@ -220,17 +221,9 @@ impl_clicked (GnomeDialog *dialog, storage_set_view = E_STORAGE_SET_VIEW (priv->storage_set_view); default_parent_folder = e_storage_set_view_get_current_folder (storage_set_view); - /* The default type in the folder creation dialog will be the - first of the allowed types. If all types are allowed, - hardcode to "mail". */ - if (priv->allowed_types == NULL) - default_type = "mail"; - else - default_type = (const char *) priv->allowed_types->data; - e_shell_show_folder_creation_dialog (priv->shell, GTK_WINDOW (dialog), default_parent_folder, - (const char *) priv->allowed_types->data, + priv->default_type, folder_creation_dialog_result_cb, dialog); @@ -286,6 +279,7 @@ init (EShellFolderSelectionDialog *shell_folder_selection_dialog) priv->storage_set_view = NULL; priv->allowed_types = NULL; priv->allow_creation = TRUE; + priv->default_type = NULL; shell_folder_selection_dialog->priv = priv; } @@ -337,6 +331,8 @@ folder_selected_cb (EStorageSetView *storage_set_view, * @caption: A brief text to be put on top of the storage view * @default_uri: The URI of the folder to be selected by default * @allowed_types: List of the names of the allowed types + * @default_type: The default type of folder that will be created if the + * New folder button is pressed. * * Construct @folder_selection_dialog. **/ @@ -346,7 +342,8 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s const char *title, const char *caption, const char *default_uri, - const char *allowed_types[]) + const char *allowed_types[], + const char *default_type) { EShellFolderSelectionDialogPrivate *priv; GtkWidget *scroll_frame; @@ -361,9 +358,14 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s priv = folder_selection_dialog->priv; + if (default_type != NULL && *default_type != 0) { + priv->default_type = g_strdup (default_type); + } else { + priv->default_type = NULL; + } /* Basic dialog setup. */ - gtk_window_set_policy (GTK_WINDOW (folder_selection_dialog), FALSE, TRUE, FALSE); + gtk_window_set_policy (GTK_WINDOW (folder_selection_dialog), TRUE, TRUE, FALSE); gtk_window_set_default_size (GTK_WINDOW (folder_selection_dialog), 350, 300); gtk_window_set_modal (GTK_WINDOW (folder_selection_dialog), TRUE); gtk_window_set_title (GTK_WINDOW (folder_selection_dialog), title); @@ -422,11 +424,6 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s for (i = 0; allowed_types[i] != NULL; i++) priv->allowed_types = g_list_prepend (priv->allowed_types, g_strdup (allowed_types[i])); - - /* Preserve the order so we can use the first type listed as - the default for the folder creation dialog invoked by the - "New..." button. */ - priv->allowed_types = g_list_reverse (priv->allowed_types); } if (default_uri != NULL) @@ -468,7 +465,8 @@ e_shell_folder_selection_dialog_new (EShell *shell, const char *title, const char *caption, const char *default_uri, - const char *allowed_types[]) + const char *allowed_types[], + const char *default_type) { EShellFolderSelectionDialog *folder_selection_dialog; @@ -477,7 +475,7 @@ e_shell_folder_selection_dialog_new (EShell *shell, folder_selection_dialog = gtk_type_new (e_shell_folder_selection_dialog_get_type ()); e_shell_folder_selection_dialog_construct (folder_selection_dialog, shell, - title, caption, default_uri, allowed_types); + title, caption, default_uri, allowed_types, default_type); return GTK_WIDGET (folder_selection_dialog); } diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index ca53f77abc..c6e2bac359 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -46,7 +46,7 @@ #include "e-shell.h" #include "e-shell-view.h" -#include "e-shell-constants.h" +#include "e-local-storage.h" /* for E_LOCAL_STORAGE_NAME */ #include "e-shell-folder-selection-dialog.h" #include "importer/evolution-importer-client.h" @@ -1027,7 +1027,7 @@ import_druid_finish (GnomeDruidPage *page, _("Select folder"), _("Select a destination folder for importing this data"), e_shell_view_get_current_uri (data->view), - NULL); + NULL, NULL); gtk_signal_connect (GTK_OBJECT (folder), "folder_selected", GTK_SIGNAL_FUNC (folder_selected), data); diff --git a/shell/e-shell-startup-wizard.c b/shell/e-shell-startup-wizard.c index 33e3297bd6..3de62204dc 100644 --- a/shell/e-shell-startup-wizard.c +++ b/shell/e-shell-startup-wizard.c @@ -363,6 +363,12 @@ finish_func (GnomeDruidPage *page, /* Free data */ data->cancel = FALSE; + + /* Need to do this otherwise the timezone widget gets destroyed but the + timezone object isn't, and we can get a crash like #22047. */ + gtk_object_unref (GTK_OBJECT (data->timezone_page->etd)); + data->timezone_page->etd = NULL; + gtk_widget_destroy (data->dialog); gtk_main_quit (); @@ -816,6 +822,14 @@ startup_wizard_cancel (GnomeDruid *druid, { /* Free data */ data->cancel = TRUE; + + if (data->timezone_page->etd != NULL) { + /* Need to do this otherwise the timezone widget gets destroyed but the + timezone object isn't, and we can get a crash like #22047. */ + gtk_object_unref (GTK_OBJECT (data->timezone_page->etd)); + data->timezone_page->etd = NULL; + } + gtk_widget_destroy (data->dialog); gtk_main_quit (); } diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 5c0a463041..649e37b016 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -24,24 +24,7 @@ /* FIXME: This file is a bit of a mess. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif - -#include "e-shell-view-menu.h" - -#include "e-shell-shared-folder-picker-dialog.h" -#include "e-shell-folder-creation-dialog.h" -#include "e-shell-folder-selection-dialog.h" - -#include "e-shell-constants.h" - -#include "e-shell-importer.h" -#include "e-shell-about-box.h" - -#include "e-shell-folder-commands.h" - -#include "evolution-shell-component-utils.h" #include <glib.h> @@ -63,6 +46,19 @@ #include <gal/widgets/e-gui-utils.h> +#include "e-shell-folder-creation-dialog.h" +#include "e-shell-folder-selection-dialog.h" + +#include "e-shell-constants.h" + +#include "e-shell-view-menu.h" +#include "e-shell-importer.h" +#include "e-shell-about-box.h" + +#include "e-shell-folder-commands.h" + +#include "evolution-shell-component-utils.h" + /* Utility functions. */ @@ -130,17 +126,10 @@ command_close (BonoboUIComponent *uih, const char *path) { EShellView *shell_view; - GdkEvent delete_event; shell_view = E_SHELL_VIEW (data); - /* Send a delete_event to the window. This way we make sure that the - behaviors for delete_event and the menu item are the same. */ - - delete_event.any.type = GDK_DELETE; - delete_event.any.window = GTK_WIDGET (shell_view)->window; - delete_event.any.send_event = 0; - gtk_widget_event (GTK_WIDGET (shell_view), &delete_event); + gtk_object_destroy (GTK_OBJECT (shell_view)); } static void @@ -154,9 +143,7 @@ command_quit (BonoboUIComponent *uih, shell_view = E_SHELL_VIEW (data); shell = e_shell_view_get_shell (shell_view); - - if (e_shell_prepare_for_quit (shell)) - e_shell_destroy_all_views (shell); + e_shell_destroy_all_views (shell); } static void @@ -219,8 +206,6 @@ command_about_box (BonoboUIComponent *uih, about_box_window = gtk_window_new (GTK_WINDOW_DIALOG); 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); gtk_signal_connect (GTK_OBJECT (about_box_window), "button_press_event", GTK_SIGNAL_FUNC (about_box_event_callback), &about_box_window); gtk_signal_connect (GTK_OBJECT (about_box_window), "delete_event", @@ -281,20 +266,6 @@ command_toggle_shortcut_bar (BonoboUIComponent *component, static void -command_send_receive (BonoboUIComponent *ui_component, - void *data, - const char *path) -{ - EShellView *shell_view; - EShell *shell; - - shell_view = E_SHELL_VIEW (data); - shell = e_shell_view_get_shell (shell_view); - - e_shell_send_receive (shell); -} - -static void command_new_folder (BonoboUIComponent *uih, void *data, const char *path) @@ -411,23 +382,6 @@ command_add_folder_to_shortcut_bar (BonoboUIComponent *uih, } -/* Opening other users' folders. */ - -static void -command_open_other_users_folder (BonoboUIComponent *uih, - void *data, - const char *path) -{ - EShellView *shell_view; - EShell *shell; - - shell_view = E_SHELL_VIEW (data); - shell = e_shell_view_get_shell (shell_view); - - e_shell_show_shared_folder_picker_dialog (shell, shell_view); -} - - /* Going to a folder. */ static void @@ -473,7 +427,7 @@ command_goto_folder (BonoboUIComponent *uih, _("Go to folder..."), _("Select the folder that you want to open"), current_uri, - NULL); + NULL, NULL); gtk_window_set_transient_for (GTK_WINDOW (folder_selection_dialog), GTK_WINDOW (shell_view)); @@ -594,7 +548,7 @@ command_new_shortcut (BonoboUIComponent *uih, _("Create a new shortcut"), _("Select the folder you want the shortcut to point to:"), e_shell_view_get_current_uri (shell_view), - NULL); + NULL, NULL); e_shell_folder_selection_dialog_set_allow_creation (E_SHELL_FOLDER_SELECTION_DIALOG (folder_selection_dialog), FALSE); @@ -610,18 +564,6 @@ command_new_shortcut (BonoboUIComponent *uih, /* Tools menu. */ static void -command_settings (BonoboUIComponent *uih, - void *data, - const char *path) -{ - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (data); - - e_shell_view_show_settings (shell_view); -} - -static void command_pilot_settings (BonoboUIComponent *uih, void *data, const char *path) @@ -647,16 +589,15 @@ command_pilot_settings (BonoboUIComponent *uih, } -static BonoboUIVerb new_verbs [] = { +BonoboUIVerb new_verbs [] = { BONOBO_UI_VERB ("NewFolder", command_new_folder), BONOBO_UI_VERB ("NewShortcut", command_new_shortcut), BONOBO_UI_VERB_END }; -static BonoboUIVerb file_verbs [] = { +BonoboUIVerb file_verbs [] = { BONOBO_UI_VERB ("FileImporter", (BonoboUIVerbFn) show_import_wizard), - BONOBO_UI_VERB ("FileOpenOtherUsersFolder", command_open_other_users_folder), BONOBO_UI_VERB ("FileGoToFolder", command_goto_folder), BONOBO_UI_VERB ("FileCreateFolder", command_create_folder), BONOBO_UI_VERB ("FileClose", command_close), @@ -668,7 +609,7 @@ static BonoboUIVerb file_verbs [] = { BONOBO_UI_VERB_END }; -static BonoboUIVerb folder_verbs [] = { +BonoboUIVerb folder_verbs [] = { BONOBO_UI_VERB ("ActivateView", command_activate_view), BONOBO_UI_VERB ("OpenFolderInNewWindow", command_open_folder_in_new_window), BONOBO_UI_VERB ("MoveFolder", command_move_folder), @@ -682,36 +623,24 @@ static BonoboUIVerb folder_verbs [] = { BONOBO_UI_VERB_END }; -static BonoboUIVerb actions_verbs[] = { - BONOBO_UI_VERB ("SendReceive", command_send_receive), - - BONOBO_UI_VERB_END -}; - -static BonoboUIVerb tools_verbs[] = { - BONOBO_UI_VERB ("Settings", command_settings), - +BonoboUIVerb tools_verbs[] = { BONOBO_UI_VERB ("PilotSettings", command_pilot_settings), BONOBO_UI_VERB_END }; -static BonoboUIVerb help_verbs [] = { +BonoboUIVerb help_verbs [] = { BONOBO_UI_VERB_DATA ("HelpFAQ", command_help_faq, NULL), BONOBO_UI_VERB_END }; static EPixmap pixmaps [] = { - E_PIXMAP ("/commands/SendReceive", "send-receive.xpm"), - E_PIXMAP ("/menu/File/New/Folder", "folder.xpm"), E_PIXMAP ("/menu/File/Folder/Folder", "folder.xpm"), E_PIXMAP ("/menu/File/FileImporter", "import.xpm"), E_PIXMAP ("/menu/File/ToggleOffline", "work_offline.xpm"), - E_PIXMAP ("/Toolbar/SendReceive", "buttons/send-24-receive.png"), - E_PIXMAP_END }; @@ -832,7 +761,6 @@ e_shell_view_menu_setup (EShellView *shell_view) bonobo_ui_component_add_verb_list_with_data (uic, folder_verbs, shell_view); bonobo_ui_component_add_verb_list_with_data (uic, new_verbs, shell_view); - bonobo_ui_component_add_verb_list_with_data (uic, actions_verbs, shell_view); bonobo_ui_component_add_verb_list_with_data (uic, tools_verbs, shell_view); bonobo_ui_component_add_verb_list (uic, help_verbs); diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 07ef3d2aa4..f1a03a772b 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -56,7 +56,6 @@ #include "evolution-shell-view.h" #include "e-gray-bar.h" -#include "e-history.h" #include "e-shell-constants.h" #include "e-shell-folder-title-bar.h" #include "e-shell-utils.h" @@ -90,9 +89,6 @@ struct _EShellViewPrivate { BonoboUIComponent *ui_component; BonoboUIContainer *ui_container; - /* History of visited (evolution:) URIs. */ - EHistory *history; - /* Currently displayed URI. */ char *uri; @@ -151,7 +147,6 @@ struct _EShellViewPrivate { enum { SHORTCUT_BAR_VISIBILITY_CHANGED, FOLDER_BAR_VISIBILITY_CHANGED, - VIEW_CHANGED, LAST_SIGNAL }; @@ -169,7 +164,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; /* URI to display when the currently displayed folder is removed from the storage. */ -#define FALLBACK_URI E_SUMMARY_URI +#define FALLBACK_URI "evolution:/local/Inbox" /* The icons for the offline/online status. */ @@ -188,7 +183,6 @@ static const char *get_storage_set_path_from_uri (const char *uri); /* Boo. */ static void new_folder_cb (EStorageSet *storage_set, const char *path, void *data); -static gboolean display_uri (EShellView *shell_view, const char *uri, gboolean add_to_history); /* View handling. */ @@ -320,42 +314,6 @@ setup_verb_sensitivity_for_folder (EShellView *shell_view, bonobo_ui_component_set_prop (ui_component, "/commands/RenameFolder", "sensitive", prop, NULL); } - -static void -update_navigation_buttons (EShellView *shell_view) -{ - EShellViewPrivate *priv; - - priv = shell_view->priv; - - e_shell_folder_title_bar_update_navigation_buttons (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), - e_history_has_prev (priv->history), - e_history_has_next (priv->history)); -} - -static int -history_uri_matching_func (const void *a, - const void *b) -{ - const char *s1, *s2; - - s1 = (const char *) a; - s2 = (const char *) b; - - return strcmp (s1, s2); -} - -static void -remove_uri_from_history (EShellView *shell_view, - const char *uri) -{ - EShellViewPrivate *priv; - - priv = shell_view->priv; - - e_history_remove_matching (priv->history, uri, history_uri_matching_func); -} - /* This implements the behavior for when the folder which is currently displayed gets deleted. */ @@ -496,16 +454,7 @@ storage_set_removed_folder_callback (EStorageSet *storage_set, priv = shell_view->priv; uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL); - - remove_uri_from_history (shell_view, uri); - update_navigation_buttons (shell_view); - - /* (Note that at this point the current URI in the history might have - been changed and not match the current view. But we catch this case - when checking if this was the current view, below.) */ - view = g_hash_table_lookup (priv->uri_to_view, uri); - g_free (uri); if (view == NULL) @@ -873,6 +822,23 @@ folder_selected_cb (EStorageSetView *storage_set_view, switch_on_folder_tree_click (shell_view, path); } +/* Callback called when a storage in the tree view is clicked. */ +static void +storage_selected_cb (EStorageSetView *storage_set_view, + const char *name, + void *data) +{ + EShellView *shell_view; + char *path; + + shell_view = E_SHELL_VIEW (data); + + path = g_strconcat (G_DIR_SEPARATOR_S, name, NULL); + switch_on_folder_tree_click (shell_view, path); + + g_free (path); +} + /* Callbacks for the folder context menu in the folder bar. */ static void @@ -955,47 +921,6 @@ offline_toggle_clicked_cb (GtkButton *button, } -/* Navigation button callbacks. */ - -static void -back_clicked_callback (EShellFolderTitleBar *title_bar, - void *data) -{ - EShellView *shell_view; - EShellViewPrivate *priv; - const char *new_uri; - - shell_view = E_SHELL_VIEW (data); - priv = shell_view->priv; - - if (! e_history_has_prev (priv->history)) - return; - - new_uri = (const char *) e_history_prev (priv->history); - - display_uri (shell_view, new_uri, FALSE); -} - -static void -forward_clicked_callback (EShellFolderTitleBar *title_bar, - void *data) -{ - EShellView *shell_view; - EShellViewPrivate *priv; - const char *new_uri; - - shell_view = E_SHELL_VIEW (data); - priv = shell_view->priv; - - if (! e_history_has_next (priv->history)) - return; - - new_uri = (const char *) e_history_next (priv->history); - - display_uri (shell_view, new_uri, FALSE); -} - - /* Widget setup. */ static void @@ -1008,10 +933,12 @@ setup_storage_set_subwindow (EShellView *shell_view) priv = shell_view->priv; - storage_set_view = e_storage_set_new_view (e_shell_get_storage_set (priv->shell), + storage_set_view = e_storage_set_view_new (e_shell_get_storage_set (priv->shell), priv->ui_container); gtk_signal_connect (GTK_OBJECT (storage_set_view), "folder_selected", GTK_SIGNAL_FUNC (folder_selected_cb), shell_view); + gtk_signal_connect (GTK_OBJECT (storage_set_view), "storage_selected", + GTK_SIGNAL_FUNC (storage_selected_cb), shell_view); gtk_signal_connect (GTK_OBJECT (storage_set_view), "folder_context_menu_popping_up", GTK_SIGNAL_FUNC (folder_context_menu_popping_up_cb), shell_view); gtk_signal_connect (GTK_OBJECT (storage_set_view), "folder_context_menu_popped_down", @@ -1216,10 +1143,6 @@ setup_widgets (EShellView *shell_view) priv->folder_title_bar = e_shell_folder_title_bar_new (); gtk_signal_connect (GTK_OBJECT (priv->folder_title_bar), "title_toggled", GTK_SIGNAL_FUNC (title_bar_toggled_cb), shell_view); - gtk_signal_connect (GTK_OBJECT (priv->folder_title_bar), "back_clicked", - GTK_SIGNAL_FUNC (back_clicked_callback), shell_view); - gtk_signal_connect (GTK_OBJECT (priv->folder_title_bar), "forward_clicked", - GTK_SIGNAL_FUNC (forward_clicked_callback), shell_view); priv->view_hpaned = e_hpaned_new (); e_paned_pack1 (E_PANED (priv->view_hpaned), priv->storage_set_view_box, FALSE, FALSE); @@ -1303,15 +1226,8 @@ destroy (GtkObject *object) storage set used for the delayed selection mechanism. */ cleanup_delayed_selection (shell_view); - /* This is necessary to remove the signal handler for folder_new on the - storage set used for the delayed selection mechanism. */ - cleanup_delayed_selection (shell_view); - gtk_object_unref (GTK_OBJECT (priv->tooltips)); - if (priv->history != NULL) - gtk_object_unref (GTK_OBJECT (priv->history)); - if (priv->shell != NULL) bonobo_object_unref (BONOBO_OBJECT (priv->shell)); @@ -1382,18 +1298,6 @@ class_init (EShellViewClass *klass) GTK_TYPE_NONE, 1, GTK_TYPE_INT); - signals[VIEW_CHANGED] - = gtk_signal_new ("view_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EShellViewClass, view_changed), - e_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 (); @@ -1409,7 +1313,6 @@ init (EShellView *shell_view) priv->shell = NULL; priv->corba_interface = NULL; priv->ui_component = NULL; - priv->history = e_history_new ((EHistoryItemFreeFunc) g_free); priv->uri = NULL; priv->delayed_selection = NULL; @@ -1518,22 +1421,6 @@ corba_interface_set_folder_bar_label (EvolutionShellView *evolution_shell_view, } static void -corba_interface_show_settings (EvolutionShellView *evolution_shell_view, - void *data) -{ - EShellView *shell_view; - EShellViewPrivate *priv; - - g_return_if_fail (data != NULL); - g_return_if_fail (E_IS_SHELL_VIEW (data)); - - shell_view = E_SHELL_VIEW (data); - priv = shell_view->priv; - - e_shell_view_show_settings (shell_view); -} - -static void unmerge_on_error (BonoboObject *object, CORBA_Object cobject, CORBA_Environment *ev) @@ -1651,8 +1538,8 @@ e_shell_view_construct (EShellView *shell_view, GTK_SIGNAL_FUNC (storage_set_removed_folder_callback), shell_view, GTK_OBJECT (shell_view)); - e_shell_user_creatable_items_handler_attach_menus (e_shell_get_user_creatable_items_handler (priv->shell), - shell_view); + e_shell_user_creatable_items_handler_setup_menus (e_shell_get_user_creatable_items_handler (priv->shell), + shell_view); return view; } @@ -1799,19 +1686,30 @@ update_for_current_uri (EShellView *shell_view) path = get_storage_set_path_from_uri (priv->uri); - folder = NULL; folder_name = NULL; type = NULL; unread_count = 0; - if (path != NULL) { + if (path == NULL) { + folder = NULL; + } else { folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); if (folder != NULL) { folder_name = e_folder_get_name (folder); type = e_folder_get_type_string (folder); unread_count = e_folder_get_unread_count (folder); - } + } else if (path != NULL) { + EStorage *storage; + + storage = e_storage_set_get_storage (e_shell_get_storage_set (priv->shell), path + 1); + unread_count = 0; + + if (storage != NULL) { + folder_name = e_storage_get_display_name (storage); + type = e_storage_get_toplevel_node_type (storage); + } + } } if (unread_count > 0) @@ -1912,6 +1810,7 @@ set_current_notebook_page (EShellView *shell_view, if (current_page != -1 && current_page != 0) { current = gtk_notebook_get_nth_page (notebook, current_page); + old_control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current)); bonobo_control_frame_set_autoactivate (old_control_frame, FALSE); } @@ -1961,9 +1860,6 @@ setup_corba_interface (EShellView *shell_view, gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "set_folder_bar_label", GTK_SIGNAL_FUNC (corba_interface_set_folder_bar_label), shell_view, GTK_OBJECT (shell_view)); - gtk_signal_connect_while_alive (GTK_OBJECT (corba_interface), "show_settings", - GTK_SIGNAL_FUNC (corba_interface_show_settings), - shell_view, GTK_OBJECT (shell_view)); bonobo_object_add_interface (BONOBO_OBJECT (control_frame), BONOBO_OBJECT (corba_interface)); @@ -2009,10 +1905,17 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) path = get_storage_set_path_from_uri (uri); folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); - if (folder != NULL) + if (folder != NULL) { folder_type = e_folder_get_type_string (folder); - else - folder_type = NULL; + } else { + EStorage *storage; + + storage = e_storage_set_get_storage (e_shell_get_storage_set (priv->shell), path + 1); + if (storage == NULL) + folder_type = NULL; + else + folder_type = e_storage_get_toplevel_node_type (storage); + } /* See if we were actively viewing the uri for the socket that's being closed */ current_uri = e_shell_view_get_current_uri (shell_view); @@ -2037,6 +1940,27 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) static const char * +get_type_for_storage (EShellView *shell_view, + const char *name, + const char **physical_uri_return) +{ + EShellViewPrivate *priv; + EStorageSet *storage_set; + EStorage *storage; + + priv = shell_view->priv; + + storage_set = e_shell_get_storage_set (priv->shell); + storage = e_storage_set_get_storage (storage_set, name); + if (!storage) + return NULL; + + *physical_uri_return = e_storage_get_toplevel_node_uri (storage); + + return e_storage_get_toplevel_node_type (storage); +} + +static const char * get_type_for_folder (EShellView *shell_view, const char *path, const char **physical_uri_return) @@ -2061,8 +1985,7 @@ get_type_for_folder (EShellView *shell_view, /* Create a new view for @uri with @control. It assumes a view for @uri does not exist yet. */ static View * get_view_for_uri (EShellView *shell_view, - const char *uri, - const char *view_info) + const char *uri) { EShellViewPrivate *priv; CORBA_Environment ev; @@ -2074,6 +1997,7 @@ get_view_for_uri (EShellView *shell_view, GtkWidget *socket; Bonobo_Control corba_control; const char *path; + const char *slash; const char *physical_uri; const char *folder_type; int destroy_connection_id; @@ -2088,8 +2012,13 @@ get_view_for_uri (EShellView *shell_view, if (*path == '\0') return NULL; - folder_type = get_type_for_folder (shell_view, path, &physical_uri); - if (folder_type == NULL || physical_uri == NULL) + /* FIXME: This code needs to be made more robust. */ + slash = strchr (path + 1, G_DIR_SEPARATOR); + if (slash == NULL || slash[1] == '\0') + folder_type = get_type_for_storage (shell_view, path + 1, &physical_uri); + else + folder_type = get_type_for_folder (shell_view, path, &physical_uri); + if (folder_type == NULL) return NULL; folder_type_registry = e_shell_get_folder_type_registry (e_shell_view_get_shell (shell_view)); @@ -2102,7 +2031,7 @@ get_view_for_uri (EShellView *shell_view, CORBA_exception_init (&ev); - corba_control = GNOME_Evolution_ShellComponent_createView (handler, physical_uri, folder_type, view_info, &ev); + corba_control = GNOME_Evolution_ShellComponent_createView (handler, physical_uri, folder_type, &ev); if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); @@ -2156,8 +2085,7 @@ show_existing_view (EShellView *shell_view, static gboolean create_new_view_for_uri (EShellView *shell_view, - const char *uri, - const char *view_info) + const char *uri) { View *view; EShellViewPrivate *priv; @@ -2165,7 +2093,7 @@ create_new_view_for_uri (EShellView *shell_view, priv = shell_view->priv; - view = get_view_for_uri (shell_view, uri, view_info); + view = get_view_for_uri (shell_view, uri); if (view == NULL) return FALSE; @@ -2185,24 +2113,18 @@ create_new_view_for_uri (EShellView *shell_view, return TRUE; } -static gboolean -display_uri (EShellView *shell_view, - const char *uri, - gboolean add_to_history) +gboolean +e_shell_view_display_uri (EShellView *shell_view, + const char *uri) { EShellViewPrivate *priv; View *view; gboolean retval; - const char *view_info; - char *real_uri; - - priv = shell_view->priv; - if (uri == NULL && priv->uri == NULL) - return TRUE; + g_return_val_if_fail (shell_view != NULL, FALSE); + g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE); - if (priv->uri != NULL && uri != NULL && strcmp (priv->uri, uri) == 0) - return TRUE; + priv = shell_view->priv; bonobo_window_freeze (BONOBO_WINDOW (shell_view)); @@ -2213,32 +2135,23 @@ display_uri (EShellView *shell_view, set_current_notebook_page (shell_view, 0); g_free (priv->uri); - priv->uri = real_uri = NULL; + priv->uri = NULL; retval = TRUE; goto end; } - view_info = strchr (uri, '#'); - if (view_info) { - real_uri = g_strndup (uri, view_info - uri); - view_info++; - } else { - view_info = ""; - real_uri = g_strdup (uri); - } - if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) != 0) { retval = FALSE; goto end; } - view = g_hash_table_lookup (priv->uri_to_view, real_uri); + view = g_hash_table_lookup (priv->uri_to_view, uri); if (view != NULL) { - show_existing_view (shell_view, real_uri, view); - } else if (! create_new_view_for_uri (shell_view, real_uri, view_info)) { + show_existing_view (shell_view, uri, view); + } else if (! create_new_view_for_uri (shell_view, uri)) { cleanup_delayed_selection (shell_view); - priv->delayed_selection = g_strdup (real_uri); + priv->delayed_selection = g_strdup (uri); gtk_signal_connect_full (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), "new_folder", GTK_SIGNAL_FUNC (new_folder_cb), NULL, shell_view, NULL, FALSE, TRUE); @@ -2249,13 +2162,6 @@ display_uri (EShellView *shell_view, retval = TRUE; end: - g_free (real_uri); - - if (add_to_history && retval == TRUE && priv->uri != NULL) - e_history_add (priv->history, g_strdup (priv->uri)); - - update_navigation_buttons (shell_view); - g_free (priv->set_folder_uri); priv->set_folder_uri = NULL; @@ -2268,25 +2174,9 @@ display_uri (EShellView *shell_view, bonobo_window_thaw (BONOBO_WINDOW (shell_view)); - gtk_signal_emit (GTK_OBJECT (shell_view), signals[VIEW_CHANGED], - e_shell_view_get_current_path (shell_view), - e_shell_view_get_current_uri (shell_view), - e_shell_view_get_current_folder_type (shell_view), - e_shell_view_get_current_component_id (shell_view)); - return retval; } -gboolean -e_shell_view_display_uri (EShellView *shell_view, - const char *uri) -{ - g_return_val_if_fail (shell_view != NULL, FALSE); - g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE); - - return display_uri (shell_view, uri, TRUE); -} - void e_shell_view_show_shortcut_bar (EShellView *shell_view, @@ -2344,8 +2234,8 @@ e_shell_view_show_folder_bar (EShellView *shell_view, e_title_bar_set_button_mode (E_TITLE_BAR (priv->storage_set_title_bar), E_TITLE_BAR_BUTTON_MODE_CLOSE); - e_shell_folder_title_bar_set_title_clickable (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), - FALSE); + e_shell_folder_title_bar_set_clickable (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), + FALSE); } else { if (GTK_WIDGET_VISIBLE (priv->storage_set_view_box)) { /* FIXME this is a private field! */ @@ -2358,8 +2248,8 @@ e_shell_view_show_folder_bar (EShellView *shell_view, e_title_bar_set_button_mode (E_TITLE_BAR (priv->storage_set_title_bar), E_TITLE_BAR_BUTTON_MODE_PIN); - e_shell_folder_title_bar_set_title_clickable (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), - TRUE); + e_shell_folder_title_bar_set_clickable (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), + TRUE); } priv->folder_bar_shown = !! show; @@ -2368,21 +2258,6 @@ e_shell_view_show_folder_bar (EShellView *shell_view, priv->folder_bar_shown); } -void -e_shell_view_show_settings (EShellView *shell_view) -{ - EShellViewPrivate *priv; - const char *type; - - g_return_if_fail (shell_view != NULL); - g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - - priv = shell_view->priv; - - type = e_shell_view_get_current_folder_type (shell_view); - e_shell_show_settings (priv->shell, type, shell_view); -} - gboolean e_shell_view_shortcut_bar_shown (EShellView *shell_view) { @@ -2524,23 +2399,6 @@ e_shell_view_get_current_folder_type (EShellView *shell_view) return get_type_for_folder (shell_view, current_path, NULL); } -const char * -e_shell_view_get_current_component_id (EShellView *shell_view) -{ - EShellViewPrivate *priv; - EFolderTypeRegistry *type_registry; - EvolutionShellComponentClient *component_client; - const char *current_folder_type; - - priv = shell_view->priv; - - type_registry = e_shell_get_folder_type_registry (priv->shell); - current_folder_type = e_shell_view_get_current_folder_type (shell_view); - component_client = e_folder_type_registry_get_handler_for_type (type_registry, current_folder_type); - - return evolution_shell_component_client_get_id (component_client); -} - /** * e_shell_view_save_settings: @@ -2670,7 +2528,6 @@ e_shell_view_load_settings (EShellView *shell_view, int num_groups, group, val; long width, height; char *stringval, *prefix, *filename, *key; - CORBA_Environment ev; g_return_val_if_fail (shell_view != NULL, FALSE); g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE); @@ -2684,14 +2541,9 @@ e_shell_view_load_settings (EShellView *shell_view, 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 = bonobo_config_get_long (db, key, 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); @@ -2728,18 +2580,16 @@ e_shell_view_load_settings (EShellView *shell_view, priv->view_hpaned_position = val; g_free (key); - if (priv->uri == NULL && priv->delayed_selection == NULL) { - key = g_strconcat (prefix, "DisplayedURI", NULL); - stringval = bonobo_config_get_string (db, key, NULL); - if (stringval) { - if (! e_shell_view_display_uri (shell_view, stringval)) - e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI); - } else + key = g_strconcat (prefix, "DisplayedURI", NULL); + stringval = bonobo_config_get_string (db, key, NULL); + if (stringval) { + if (! e_shell_view_display_uri (shell_view, stringval)) e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI); + } else + e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI); - g_free (stringval); - g_free (key); - } + g_free (stringval); + g_free (key); num_groups = e_shortcut_model_get_num_groups (shortcut_bar->model); diff --git a/shell/e-shell.c b/shell/e-shell.c index de4294bbec..38951a3e7e 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -45,7 +45,6 @@ #include <gal/widgets/e-gui-utils.h> #include <gal/util/e-util.h> -#include <gal/util/e-unicode-i18n.h> #include "Evolution.h" @@ -57,21 +56,17 @@ #include "e-corba-storage-registry.h" #include "e-folder-type-registry.h" #include "e-local-storage.h" -#include "e-setup.h" #include "e-shell-constants.h" -#include "e-shell-corba-icon-utils.h" #include "e-shell-folder-selection-dialog.h" #include "e-shell-offline-handler.h" -#include "e-shell-settings-dialog.h" #include "e-shell-startup-wizard.h" #include "e-shell-view.h" #include "e-shortcuts.h" #include "e-storage-set.h" #include "e-splash.h" +#include "e-summary-storage.h" #include "e-uri-schema-registry.h" -#include "evolution-shell-component-client.h" -#include "evolution-shell-component-utils.h" #include "evolution-storage-set-view-factory.h" #include "e-shell.h" @@ -92,7 +87,7 @@ struct _EShellPrivate { EStorageSet *storage_set; ELocalStorage *local_storage; - EStorage *summary_storage; + ESummaryStorage *summary_storage; EShortcuts *shortcuts; EFolderTypeRegistry *folder_type_registry; @@ -121,9 +116,6 @@ struct _EShellPrivate { /* Line status. */ EShellLineStatus line_status; - /* Settings Dialog */ - GtkWidget *settings_dialog; - /* Configuration Database */ Bonobo_ConfigDatabase db; @@ -150,32 +142,12 @@ struct _EShellPrivate { enum { NO_VIEWS_LEFT, LINE_STATUS_CHANGED, - NEW_VIEW_CREATED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; -/* Utility functions. */ - -static void -pop_up_activation_error_dialog (ESplash *splash, - const char *id, - CORBA_Environment *ev) -{ - char *error_message; - - error_message = e_get_activation_failure_msg (ev); - e_notice (GTK_WINDOW (splash), GNOME_MESSAGE_BOX_ERROR, - _("Cannot activate component %s :\n" - "The error from the activation system is:\n" - "%s"), - id, error_message); - g_free (error_message); -} - - /* Interactivity handling. */ static void @@ -247,7 +219,8 @@ folder_selection_dialog_folder_selected_cb (EShellFolderSelectionDialog *folder_ GNOME_Evolution_FolderSelectionListener listener; EStorageSet *storage_set; EFolder *folder; - GNOME_Evolution_Folder corba_folder; + char *uri; + const char *physical_uri; shell = E_SHELL (data); listener = gtk_object_get_data (GTK_OBJECT (folder_selection_dialog), "corba_listener"); @@ -257,28 +230,15 @@ folder_selection_dialog_folder_selected_cb (EShellFolderSelectionDialog *folder_ storage_set = e_shell_get_storage_set (shell); folder = e_storage_set_get_folder (storage_set, path); - if (folder == NULL) { - corba_folder.type = ""; - corba_folder.description = ""; - corba_folder.displayName = ""; - corba_folder.physicalUri = ""; - corba_folder.evolutionUri = ""; - corba_folder.unreadCount = -1; - } else { - corba_folder.type = (CORBA_char *)e_folder_get_type_string (folder); - corba_folder.description = (CORBA_char *)e_folder_get_description (folder); - if (corba_folder.description == NULL) - corba_folder.description = ""; - corba_folder.displayName = (CORBA_char *)e_folder_get_name (folder); - corba_folder.physicalUri = (CORBA_char *)e_folder_get_physical_uri (folder); - if (corba_folder.physicalUri == NULL) - corba_folder.physicalUri = ""; - corba_folder.evolutionUri = (CORBA_char *)g_strconcat (E_SHELL_URI_PREFIX, path, NULL); - corba_folder.unreadCount = e_folder_get_unread_count (folder); - } + uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL); + + if (folder == NULL) + physical_uri = ""; + else + physical_uri = e_folder_get_physical_uri (folder); - GNOME_Evolution_FolderSelectionListener_notifySelected (listener, &corba_folder, &ev); - g_free (corba_folder.evolutionUri); + GNOME_Evolution_FolderSelectionListener_notifySelected (listener, uri, physical_uri, &ev); + g_free (uri); CORBA_exception_free (&ev); @@ -356,36 +316,6 @@ impl_Shell_getComponentByType (PortableServer_Servant servant, return CORBA_Object_duplicate (corba_component, ev); } -static GNOME_Evolution_Icon * -impl_Shell_getIconByType (PortableServer_Servant servant, - const CORBA_char *type, - const CORBA_boolean mini, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EFolderTypeRegistry *folder_type_registry; - GdkPixbuf *pixbuf; - GNOME_Evolution_Icon *icon; - EShell *shell; - - if (raise_exception_if_not_ready (servant, ev)) - return CORBA_OBJECT_NIL; - - bonobo_object = bonobo_object_from_servant (servant); - shell = E_SHELL (bonobo_object); - folder_type_registry = shell->priv->folder_type_registry; - - pixbuf = e_folder_type_registry_get_icon_for_type (folder_type_registry, type, mini); - - if (pixbuf == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_NotFound, NULL); - return CORBA_OBJECT_NIL; - } - - icon = e_new_corba_icon_from_pixbuf (pixbuf); - return icon; -} - static GNOME_Evolution_ShellView impl_Shell_createNewView (PortableServer_Servant servant, const CORBA_char *uri, @@ -409,7 +339,7 @@ impl_Shell_createNewView (PortableServer_Servant servant, return CORBA_OBJECT_NIL; } - shell_view = e_shell_create_view_from_uri_and_settings (shell, uri, 0); + shell_view = e_shell_create_view (shell, uri, NULL); if (shell_view == NULL) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_NotFound, NULL); @@ -428,43 +358,6 @@ impl_Shell_createNewView (PortableServer_Servant servant, } static void -handle_default_uri (EShell *shell, const char *uri, CORBA_Environment *ev) -{ - char *component, *dbpath, *extra_info, *new_uri; - gboolean def; - - component = g_strdup (uri + E_SHELL_DEFAULTURI_PREFIX_LEN); - extra_info = strchr (component, '#'); - if (extra_info) - *extra_info++ = '\0'; - - dbpath = g_strdup_printf ("/DefaultFolders/%s_path", component); - new_uri = bonobo_config_get_string_with_default (shell->priv->db, - dbpath, NULL, &def); - g_free (dbpath); - - if (new_uri == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_GNOME_Evolution_Shell_NotFound, NULL); - g_free (component); - return; - } - - if (extra_info) { - char *tmp; - - tmp = new_uri; - new_uri = g_strdup_printf ("%s#%s", new_uri, extra_info); - g_free (tmp); - } - - e_shell_create_view_from_uri_and_settings (shell, new_uri, 0); - g_free (new_uri); - g_free (component); - return; -} - -static void impl_Shell_handleURI (PortableServer_Servant servant, const CORBA_char *uri, CORBA_Environment *ev) @@ -482,12 +375,7 @@ impl_Shell_handleURI (PortableServer_Servant servant, priv = shell->priv; if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) { - e_shell_create_view_from_uri_and_settings (shell, uri, 0); - return; - } - - if (strncmp (uri, E_SHELL_DEFAULTURI_PREFIX, E_SHELL_DEFAULTURI_PREFIX_LEN) == 0) { - handle_default_uri (shell, uri, ev); + GNOME_Evolution_Shell_createNewView (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), uri, ev); return; } @@ -567,7 +455,8 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant, title, NULL, default_folder, - allowed_type_names); + allowed_type_names, + default_type); listener_duplicate = CORBA_Object_duplicate (listener, ev); @@ -649,9 +538,8 @@ impl_Shell_createStorageSetView (PortableServer_Servant servant, CORBA_Environment *ev) { BonoboObject *bonobo_object; - BonoboControl *control; - CORBA_Object dup_objref; EShell *shell; + BonoboControl *control; if (raise_exception_if_not_ready (servant, ev)) return CORBA_OBJECT_NIL; @@ -660,9 +548,8 @@ impl_Shell_createStorageSetView (PortableServer_Servant servant, shell = E_SHELL (bonobo_object); control = evolution_storage_set_view_factory_new_view (shell); - dup_objref = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (control)), ev); - return dup_objref; + return bonobo_object_corba_objref (BONOBO_OBJECT (control)); } static void @@ -752,7 +639,6 @@ setup_local_storage (EShell *shell) EStorage *local_storage; EShellPrivate *priv; gchar *local_storage_path; - EFolder *summary_folder; priv = shell->priv; @@ -771,11 +657,8 @@ 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", ""); - e_folder_set_physical_uri (summary_folder, "/"); - priv->summary_storage = e_storage_new (E_SUMMARY_STORAGE_NAME, - summary_folder); - e_storage_set_add_storage (priv->storage_set, priv->summary_storage); + priv->summary_storage = E_SUMMARY_STORAGE (e_summary_storage_new ()); + e_storage_set_add_storage (priv->storage_set, E_STORAGE (priv->summary_storage)); return TRUE; } @@ -851,23 +734,17 @@ setup_components (EShell *shell, for (i = 0; i < info_list->_length; i++) { const OAF_ServerInfo *info; - CORBA_Environment ev; info = info_list->_buffer + i; - CORBA_exception_init (&ev); - - if (! e_component_registry_register_component (priv->component_registry, info->iid, &ev)) { - pop_up_activation_error_dialog (splash, info->iid, &ev); + if (! e_component_registry_register_component (priv->component_registry, info->iid)) { + g_warning ("Cannot activate Evolution component -- %s", info->iid); } else { e_shell_user_creatable_items_handler_add_component (priv->user_creatable_items_handler, - info->iid, e_component_registry_get_component_by_id (priv->component_registry, info->iid)); } - CORBA_exception_free (&ev); - if (splash != NULL) e_splash_set_icon_highlight (splash, i, TRUE); @@ -882,8 +759,7 @@ setup_components (EShell *shell, /* FIXME what if anything fails here? */ static void -set_owner_on_components (EShell *shell, - ESplash *splash) +set_owner_on_components (EShell *shell) { GNOME_Evolution_Shell corba_shell; EShellPrivate *priv; @@ -911,26 +787,14 @@ set_owner_on_components (EShell *shell, id, evolution_shell_component_result_to_string (result)); if (result == EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - component_client = e_component_registry_restart_component (priv->component_registry, - id, &ev); - - if (component_client == NULL) { - pop_up_activation_error_dialog (splash, id, &ev); - } else { - result = evolution_shell_component_client_set_owner (component_client, corba_shell, - local_directory); - if (result != EVOLUTION_SHELL_COMPONENT_OK) { - g_warning ("Error re-setting owner on component %s -- %s", - id, evolution_shell_component_result_to_string (result)); - /* (At this point, we give up.) */ - } + component_client = e_component_registry_restart_component (priv->component_registry, id); + result = evolution_shell_component_client_set_owner (component_client, corba_shell, + local_directory); + if (result != EVOLUTION_SHELL_COMPONENT_OK) { + g_warning ("Error re-setting owner on component %s -- %s", + id, evolution_shell_component_result_to_string (result)); + /* (At this point, we give up.) */ } - - CORBA_exception_free (&ev); } } } @@ -953,17 +817,8 @@ view_delete_event_cb (GtkWidget *widget, shell = E_SHELL (data); e_shell_save_settings (shell); - if (g_list_length (shell->priv->views) != 1) { - /* If it's not the last view, just destroy it. */ - return FALSE; - } - - /* If it's the last view, ask for confirm before actually destroying - this view. */ - if (e_shell_prepare_for_quit (shell)) - return FALSE; - else - return TRUE; + /* Destroy it */ + return FALSE; } static void @@ -1014,8 +869,13 @@ create_view (EShell *shell, gtk_signal_connect (GTK_OBJECT (view), "destroy", GTK_SIGNAL_FUNC (view_destroy_cb), shell); - if (uri != NULL) - e_shell_view_display_uri (E_SHELL_VIEW (view), uri); + if (uri != NULL) { + if (!e_shell_view_display_uri (E_SHELL_VIEW (view), uri)) { + /* FIXME: Consider popping a dialog box up about how the provided URI does not + exist/could not be displayed. */ + e_shell_view_display_uri (E_SHELL_VIEW (view), E_SHELL_VIEW_DEFAULT_URI); + } + } shell->priv->views = g_list_prepend (shell->priv->views, view); @@ -1027,8 +887,6 @@ create_view (EShell *shell, e_shell_view_show_shortcut_bar (view, e_shell_view_shortcut_bar_shown (template_view)); } - gtk_signal_emit (GTK_OBJECT (shell), signals[NEW_VIEW_CREATED], view); - return view; } @@ -1144,21 +1002,11 @@ class_init (EShellClass *klass) GTK_TYPE_NONE, 1, GTK_TYPE_ENUM); - signals[NEW_VIEW_CREATED] = - gtk_signal_new ("new_view_created", - GTK_RUN_LAST, - object_class->type, - 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; - epv->getIconByType = impl_Shell_getIconByType; epv->createNewView = impl_Shell_createNewView; epv->handleURI = impl_Shell_handleURI; epv->selectUserFolder = impl_Shell_selectUserFolder; @@ -1191,8 +1039,7 @@ init (EShell *shell) priv->corba_shortcuts = NULL; priv->offline_handler = NULL; priv->crash_type_names = NULL; - priv->line_status = E_SHELL_LINE_STATUS_OFFLINE; - priv->settings_dialog = NULL; + priv->line_status = E_SHELL_LINE_STATUS_ONLINE; priv->db = CORBA_OBJECT_NIL; priv->is_initialized = FALSE; priv->is_interactive = FALSE; @@ -1207,7 +1054,6 @@ init (EShell *shell) * @iid: OAFIID for registering the shell into the name server * @local_directory: Local directory for storing local information and folders * @show_splash: Whether to display a splash screen. - * @startup_line_mode: How to set up the line mode (online or offline) initally. * * Construct @shell so that it uses the specified @local_directory and * @corba_object. @@ -1218,42 +1064,26 @@ EShellConstructResult e_shell_construct (EShell *shell, const char *iid, const char *local_directory, - gboolean show_splash, - EShellStartupLineMode startup_line_mode) + gboolean show_splash) { GtkWidget *splash; EShellPrivate *priv; CORBA_Object corba_object; CORBA_Environment ev; gchar *shortcut_path; - gboolean start_online; - g_return_val_if_fail (shell != NULL, E_SHELL_CONSTRUCT_RESULT_INVALIDARG); g_return_val_if_fail (E_IS_SHELL (shell), E_SHELL_CONSTRUCT_RESULT_INVALIDARG); g_return_val_if_fail (local_directory != NULL, E_SHELL_CONSTRUCT_RESULT_INVALIDARG); g_return_val_if_fail (g_path_is_absolute (local_directory), E_SHELL_CONSTRUCT_RESULT_INVALIDARG); - g_return_val_if_fail (startup_line_mode == E_SHELL_STARTUP_LINE_MODE_CONFIG - || startup_line_mode == E_SHELL_STARTUP_LINE_MODE_ONLINE - || startup_line_mode == E_SHELL_STARTUP_LINE_MODE_OFFLINE, - E_SHELL_CONSTRUCT_RESULT_INVALIDARG); priv = shell->priv; - + priv->iid = g_strdup (iid); priv->local_directory = g_strdup (local_directory); priv->folder_type_registry = e_folder_type_registry_new (); priv->uri_schema_registry = e_uri_schema_registry_new (); priv->storage_set = e_storage_set_new (priv->folder_type_registry); - e_folder_type_registry_register_type (priv->folder_type_registry, - "noselect", "empty.gif", - "noselect", "", FALSE, - 0, NULL, 0, NULL); - e_folder_type_registry_register_type (priv->folder_type_registry, - "working", "working-16.png", - "working", "", FALSE, - 0, NULL, 0, NULL); - /* CORBA storages must be set up before the components, because otherwise components cannot register their own storages. */ if (! setup_corba_storages (shell)) @@ -1273,7 +1103,6 @@ e_shell_construct (EShell *shell, CORBA_exception_free (&ev); return E_SHELL_CONSTRUCT_RESULT_NOCONFIGDB; } - e_setup_check_db (priv->db, local_directory); CORBA_exception_free (&ev); @@ -1333,7 +1162,7 @@ e_shell_construct (EShell *shell, /* Now that we have a local storage and all the interfaces set up, we can tell the components we are here. */ - set_owner_on_components (shell, E_SPLASH (splash)); + set_owner_on_components (shell); if (show_splash) { gtk_widget_destroy (splash); @@ -1348,24 +1177,6 @@ e_shell_construct (EShell *shell, priv->is_initialized = TRUE; - 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); - break; - case E_SHELL_STARTUP_LINE_MODE_ONLINE: - start_online = TRUE; - break; - case E_SHELL_STARTUP_LINE_MODE_OFFLINE: - start_online = FALSE; - break; - default: - start_online = FALSE; /* Make compiler happy. */ - g_assert_not_reached (); - } - - if (start_online) - e_shell_go_online (shell, NULL); - return E_SHELL_CONSTRUCT_RESULT_OK; } @@ -1373,7 +1184,6 @@ e_shell_construct (EShell *shell, * e_shell_new: * @local_directory: Local directory for storing local information and folders. * @show_splash: Whether to display a splash screen. - * @start_online: Whether to start in on-line mode or not. * @construct_result_return: A pointer to an EShellConstructResult variable into * which the result of the operation will be stored. * @@ -1384,7 +1194,6 @@ e_shell_construct (EShell *shell, EShell * e_shell_new (const char *local_directory, gboolean show_splash, - EShellStartupLineMode startup_line_mode, EShellConstructResult *construct_result_return) { EShell *new; @@ -1396,11 +1205,7 @@ e_shell_new (const char *local_directory, new = gtk_type_new (e_shell_get_type ()); - construct_result = e_shell_construct (new, - E_SHELL_OAFIID, - local_directory, - show_splash, - startup_line_mode); + construct_result = e_shell_construct (new, E_SHELL_OAFIID, local_directory, show_splash); if (construct_result != E_SHELL_CONSTRUCT_RESULT_OK) { *construct_result_return = construct_result; @@ -1455,17 +1260,20 @@ e_shell_create_view (EShell *shell, } EShellView * -e_shell_create_view_from_uri_and_settings (EShell *shell, - const char *uri, - int view_num) +e_shell_create_view_from_settings (EShell *shell, + const char *uri, + EShellView *template_view, + int view_num, + gboolean *settings_found) { EShellView *view; g_return_val_if_fail (shell != NULL, NULL); g_return_val_if_fail (E_IS_SHELL (shell), NULL); - view = create_view (shell, uri, NULL); - e_shell_view_load_settings (view, view_num); + view = create_view (shell, uri, template_view); + + *settings_found = e_shell_view_load_settings (view, view_num); gtk_widget_show (GTK_WIDGET (view)); while (gtk_events_pending ()) @@ -1681,20 +1489,6 @@ save_settings_for_components (EShell *shell) return retval; } -static gboolean -save_misc_settings (EShell *shell) -{ - EShellPrivate *priv; - gboolean is_offline; - - 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); - - return TRUE; -} - /** * e_shell_save_settings: * @shell: @@ -1710,16 +1504,14 @@ e_shell_save_settings (EShell *shell) { gboolean views_saved; gboolean components_saved; - gboolean misc_saved; g_return_val_if_fail (shell != NULL, FALSE); g_return_val_if_fail (E_IS_SHELL (shell), FALSE); views_saved = save_settings_for_views (shell); components_saved = save_settings_for_components (shell); - misc_saved = save_misc_settings (shell); - return views_saved && components_saved && misc_saved; + return views_saved && components_saved; } /** @@ -1736,6 +1528,7 @@ gboolean e_shell_restore_from_settings (EShell *shell) { EShellPrivate *priv; + gboolean retval; int num_views; int i; @@ -1747,10 +1540,21 @@ e_shell_restore_from_settings (EShell *shell) num_views = bonobo_config_get_long_with_default (priv->db, "/Shell/Views/NumberOfViews", 0, NULL); - for (i = 0; i < num_views; i++) - e_shell_create_view_from_uri_and_settings (shell, NULL, i); + if (num_views == 0) + return FALSE; + + retval = TRUE; + + for (i = 0; i < num_views; i++) { + EShellView *view; + gboolean settings_found; + + view = e_shell_create_view_from_settings (shell, NULL, NULL, i, &settings_found); + if (! settings_found) + retval = FALSE; + } - return (num_views > 0); + return retval; } /** @@ -1942,7 +1746,7 @@ e_shell_go_offline (EShell *shell, g_assert (priv->offline_handler == NULL); - priv->offline_handler = e_shell_offline_handler_new (shell); + priv->offline_handler = e_shell_offline_handler_new (priv->component_registry); gtk_signal_connect (GTK_OBJECT (priv->offline_handler), "offline_procedure_started", GTK_SIGNAL_FUNC (offline_procedure_started_cb), shell); @@ -2007,86 +1811,10 @@ e_shell_go_online (EShell *shell, } -void -e_shell_send_receive (EShell *shell) -{ - EShellPrivate *priv; - GList *id_list; - GList *p; - - g_return_if_fail (E_IS_SHELL (shell)); - - priv = shell->priv; - - id_list = e_component_registry_get_id_list (priv->component_registry); - - for (p = id_list; p != NULL; p = p->next) { - EvolutionShellComponentClient *component_client; - CORBA_Environment ev; - const char *id; - - id = (const char *) p->data; - component_client = e_component_registry_get_component_by_id (priv->component_registry, id); - - CORBA_exception_init (&ev); - - GNOME_Evolution_ShellComponent_sendReceive - (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)); - - CORBA_exception_free (&ev); - } - - e_free_string_list (id_list); -} - -static void -settings_dialog_destroy_cb (GtkWidget *widget, void *data) -{ - EShell *shell; - EShellPrivate *priv; - - shell = E_SHELL (data); - priv = shell->priv; - - priv->settings_dialog = NULL; -} - -void -e_shell_show_settings (EShell *shell, const char *type, EShellView *shell_view) -{ - EShellPrivate *priv; - - g_return_if_fail (shell != NULL); - g_return_if_fail (E_IS_SHELL (shell)); - g_return_if_fail (type != NULL); - - priv = shell->priv; - - if (priv->settings_dialog != NULL) { - gdk_window_show (priv->settings_dialog->window); - gtk_widget_grab_focus (priv->settings_dialog); - return; - } - - priv->settings_dialog = e_shell_settings_dialog_new (); - e_shell_settings_dialog_show_type (E_SHELL_SETTINGS_DIALOG (priv->settings_dialog), type); - - gtk_signal_connect (GTK_OBJECT (priv->settings_dialog), "destroy", - GTK_SIGNAL_FUNC (settings_dialog_destroy_cb), shell); - - gtk_window_set_transient_for (GTK_WINDOW (priv->settings_dialog), GTK_WINDOW (shell_view)); - gtk_widget_show (priv->settings_dialog); - -} - - Bonobo_ConfigDatabase e_shell_get_config_db (EShell *shell) { - g_return_val_if_fail (E_IS_SHELL (shell), CORBA_OBJECT_NIL); + g_return_val_if_fail (shell != NULL, CORBA_OBJECT_NIL); return shell->priv->db; } @@ -2166,69 +1894,6 @@ e_shell_construct_result_to_string (EShellConstructResult result) } -static void -prepare_for_quit_callback (EvolutionShellComponentClient *client, - EvolutionShellComponentResult result, - void *data) -{ - GNOME_Evolution_ShellComponentListener_Result *result_return; - - result_return = (GNOME_Evolution_ShellComponentListener_Result *) data; - *result_return = result; -} - -gboolean -e_shell_prepare_for_quit (EShell *shell) -{ - EShellPrivate *priv; - GList *component_ids; - GList *p; - gboolean retval; - - g_return_val_if_fail (E_IS_SHELL (shell), FALSE); - - priv = shell->priv; - - /* Make all the views insensitive so we have some modal-like - behavior. */ - for (p = priv->views; p != NULL; p = p->next) - gtk_widget_set_sensitive (GTK_WIDGET (p->data), FALSE); - - component_ids = e_component_registry_get_id_list (priv->component_registry); - - for (p = component_ids; p != NULL; p = p->next) { - EvolutionShellComponentClient *client; - const char *id; - GNOME_Evolution_ShellComponentListener_Result result; - - id = (const char *) p->data; - client = e_component_registry_get_component_by_id (priv->component_registry, id); - - result = (GNOME_Evolution_ShellComponentListener_Result) -1; - - evolution_shell_component_client_request_quit (client, prepare_for_quit_callback, &result); - - while (result == (GNOME_Evolution_ShellComponentListener_Result) -1) - gtk_main_iteration (); - - if (result == GNOME_Evolution_ShellComponentListener_CANCEL) { - retval = FALSE; - goto end; - } - } - - retval = TRUE; - - end: - /* Restore all the views to be sensitive. */ - for (p = priv->views; p != NULL; p = p->next) - gtk_widget_set_sensitive (GTK_WIDGET (p->data), TRUE); - - e_free_string_list (component_ids); - return retval; -} - - E_MAKE_X_TYPE (e_shell, "EShell", EShell, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_Shell__init, diff --git a/shell/e-splash.c b/shell/e-splash.c index 90682e90af..f72ea77b12 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -332,7 +332,6 @@ e_splash_construct (ESplash *splash, gtk_window_set_position (GTK_WINDOW (splash), GTK_WIN_POS_CENTER); gtk_window_set_policy (GTK_WINDOW (splash), FALSE, FALSE, FALSE); gtk_window_set_default_size (GTK_WINDOW (splash), image_width, image_height); - gtk_window_set_wmclass (GTK_WINDOW (splash), "evolution-splash", "Evolution"); gnome_window_icon_set_from_file (GTK_WINDOW (splash), EVOLUTION_DATADIR "/pixmaps/evolution.png"); gtk_window_set_title (GTK_WINDOW (splash), "Ximian Evolution"); diff --git a/shell/evolution-nognome.in b/shell/evolution-nognome.in new file mode 100644 index 0000000000..039eeb4b8c --- /dev/null +++ b/shell/evolution-nognome.in @@ -0,0 +1,9 @@ +#!/bin/sh + +PATH=@prefix@/bin:@GNOME_PREFIX@/bin:${PATH} +GNOME_PATH=@prefix@:@GNOME_PREFIX@ +LD_LIBRARY_PATH=@prefix@/lib:@GNOME_PREFIX@/lib:${LD_LIBRARY_PATH} + +export LD_LIBRARY_PATH GNOME_PATH PATH + +exec evolution diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index 2548ed2d35..315225242c 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -27,7 +27,6 @@ #include <glib.h> #include <gtk/gtksignal.h> #include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-exception.h> #include <gal/util/e-util.h> @@ -37,8 +36,6 @@ #include "evolution-storage.h" -#include "e-shell-constants.h" - #define PARENT_TYPE BONOBO_OBJECT_TYPE static BonoboObjectClass *parent_class = NULL; @@ -47,12 +44,15 @@ struct _EvolutionStoragePrivate { /* Name of the storage. */ char *name; - /* Whether there are shared folders in this storage. */ - gboolean has_shared_folders; - /* What we will display as the name of the storage. */ char *display_name; + /* URI for the toplevel node of the storage. */ + char *toplevel_node_uri; + + /* Type for the toplevel node of the storage. */ + char *toplevel_node_type; + /* The set of folders we have in this storage. */ EFolderTree *folder_tree; @@ -67,10 +67,8 @@ struct _EvolutionStoragePrivate { enum { CREATE_FOLDER, REMOVE_FOLDER, - XFER_FOLDER, UPDATE_FOLDER, - OPEN_FOLDER, - DISCOVER_SHARED_FOLDER, + XFER_FOLDER, LAST_SIGNAL }; @@ -80,6 +78,15 @@ static guint signals[LAST_SIGNAL] = { 0 }; /* Utility functions. */ +static const CORBA_char * +safe_corba_string (const char *s) +{ + if (s == NULL) + return (CORBA_char *) ""; + + return s; +} + static void list_through_listener_foreach (EFolderTree *tree, const char *path, @@ -256,81 +263,14 @@ impl_Storage__get_name (PortableServer_Servant servant, return CORBA_string_dup (priv->name); } -static CORBA_boolean -impl_Storage__get_hasSharedFolders (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionStorage *storage; - EvolutionStoragePrivate *priv; - - bonobo_object = bonobo_object_from_servant (servant); - storage = EVOLUTION_STORAGE (bonobo_object); - priv = storage->priv; - - return priv->has_shared_folders; -} - static void -get_folder_list_foreach (EFolderTree *tree, - const char *path, - void *data, - void *closure) -{ - const GNOME_Evolution_Folder *corba_folder; - GNOME_Evolution_Folder *new_corba_folder; - GNOME_Evolution_FolderList *folder_list; - - corba_folder = (GNOME_Evolution_Folder *) data; - folder_list = (GNOME_Evolution_FolderList *) closure; - - /* The root folder has no data. */ - if (corba_folder == NULL) - return; - - new_corba_folder = folder_list->_buffer + folder_list->_length; - new_corba_folder->displayName = CORBA_string_dup (corba_folder->displayName); - new_corba_folder->description = CORBA_string_dup (corba_folder->description); - new_corba_folder->type = CORBA_string_dup (corba_folder->type); - new_corba_folder->physicalUri = CORBA_string_dup (corba_folder->physicalUri); - new_corba_folder->evolutionUri = CORBA_string_dup (corba_folder->evolutionUri); - new_corba_folder->unreadCount = corba_folder->unreadCount; - - folder_list->_length++; -} - -static GNOME_Evolution_FolderList * -impl_Storage__get_folderList (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionStorage *storage; - EvolutionStoragePrivate *priv; - GNOME_Evolution_FolderList *folder_list; - - bonobo_object = bonobo_object_from_servant (servant); - storage = EVOLUTION_STORAGE (bonobo_object); - priv = storage->priv; - - folder_list = GNOME_Evolution_FolderList__alloc (); - folder_list->_maximum = e_folder_tree_get_count (priv->folder_tree) - 1; - folder_list->_length = 0; - folder_list->_buffer = CORBA_sequence_GNOME_Evolution_Folder_allocbuf (folder_list->_maximum); - - e_folder_tree_foreach (priv->folder_tree, get_folder_list_foreach, folder_list); - - CORBA_sequence_set_release (folder_list, TRUE); - return folder_list; -} - -static void -impl_Storage_asyncCreateFolder (PortableServer_Servant servant, - const CORBA_char *path, - const CORBA_char *type, - const CORBA_char *description, - const CORBA_char *parent_physical_uri, - const Bonobo_Listener listener, - CORBA_Environment *ev) +impl_Storage_async_create_folder (PortableServer_Servant servant, + const CORBA_char *path, + const CORBA_char *type, + const CORBA_char *description, + const CORBA_char *parent_physical_uri, + const Bonobo_Listener listener, + CORBA_Environment *ev) { BonoboObject *bonobo_object; CORBA_Object obj_dup; @@ -346,11 +286,11 @@ impl_Storage_asyncCreateFolder (PortableServer_Servant servant, static void -impl_Storage_asyncRemoveFolder (PortableServer_Servant servant, - const CORBA_char *path, - const CORBA_char *physical_uri, - const Bonobo_Listener listener, - CORBA_Environment *ev) +impl_Storage_async_remove_folder (PortableServer_Servant servant, + const CORBA_char *path, + const CORBA_char *physical_uri, + const Bonobo_Listener listener, + CORBA_Environment *ev) { BonoboObject *bonobo_object; EvolutionStorage *storage; @@ -365,12 +305,12 @@ impl_Storage_asyncRemoveFolder (PortableServer_Servant servant, } static void -impl_Storage_asyncXferFolder (PortableServer_Servant servant, - const CORBA_char *source_path, - const CORBA_char *destination_path, - const CORBA_boolean remove_source, - const Bonobo_Listener listener, - CORBA_Environment *ev) +impl_Storage_async_xfer_folder (PortableServer_Servant servant, + const CORBA_char *source_path, + const CORBA_char *destination_path, + const CORBA_boolean remove_source, + const Bonobo_Listener listener, + CORBA_Environment *ev) { BonoboObject *bonobo_object; EvolutionStorage *storage; @@ -429,40 +369,9 @@ impl_Storage_updateFolder (PortableServer_Servant servant, } static void -impl_Storage_asyncOpenFolder (PortableServer_Servant servant, - const CORBA_char *path, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionStorage *storage; - - bonobo_object = bonobo_object_from_servant (servant); - storage = EVOLUTION_STORAGE (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (storage), signals[OPEN_FOLDER], path); -} - -static void -impl_Storage_asyncDiscoverSharedFolder (PortableServer_Servant servant, - const CORBA_char *user, - const CORBA_char *folder_name, - Bonobo_Listener listener, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionStorage *storage; - - bonobo_object = bonobo_object_from_servant (servant); - storage = EVOLUTION_STORAGE (bonobo_object); - - gtk_signal_emit (GTK_OBJECT (storage), signals[DISCOVER_SHARED_FOLDER], - user, folder_name, listener); -} - -static void -impl_Storage_addListener (PortableServer_Servant servant, - const GNOME_Evolution_StorageListener listener, - CORBA_Environment *ev) +impl_Storage_add_listener (PortableServer_Servant servant, + const GNOME_Evolution_StorageListener listener, + CORBA_Environment *ev) { BonoboObject *bonobo_object; EvolutionStorage *storage; @@ -475,9 +384,9 @@ impl_Storage_addListener (PortableServer_Servant servant, } static void -impl_Storage_removeListener (PortableServer_Servant servant, - const GNOME_Evolution_StorageListener listener, - CORBA_Environment *ev) +impl_Storage_remove_listener (PortableServer_Servant servant, + const GNOME_Evolution_StorageListener listener, + CORBA_Environment *ev) { BonoboObject *bonobo_object; EvolutionStorage *storage; @@ -511,6 +420,8 @@ destroy (GtkObject *object) priv = storage->priv; g_free (priv->name); + g_free (priv->toplevel_node_uri); + g_free (priv->toplevel_node_type); if (priv->folder_tree != NULL) e_folder_tree_destroy (priv->folder_tree); if (priv->uri_to_path != NULL) { @@ -658,26 +569,6 @@ class_init (EvolutionStorageClass *klass) GTK_TYPE_STRING, GTK_TYPE_INT); - signals[OPEN_FOLDER] = gtk_signal_new ("open_folder", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EvolutionStorageClass, - open_folder), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - signals[DISCOVER_SHARED_FOLDER] = gtk_signal_new ("discover_shared_folder", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EvolutionStorageClass, - discover_shared_folder), - e_marshal_NONE__POINTER_POINTER_POINTER, - GTK_TYPE_NONE, 3, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_POINTER); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); corba_class_init (); @@ -690,7 +581,8 @@ init (EvolutionStorage *storage) priv = g_new (EvolutionStoragePrivate, 1); priv->name = NULL; - priv->has_shared_folders = FALSE; + priv->toplevel_node_uri = NULL; + priv->toplevel_node_type = NULL; priv->folder_tree = e_folder_tree_new (folder_destroy_notify, storage); priv->uri_to_path = g_hash_table_new (g_str_hash, g_str_equal); priv->corba_storage_listeners = NULL; @@ -705,17 +597,13 @@ evolution_storage_get_epv (void) POA_GNOME_Evolution_Storage__epv *epv; epv = g_new0 (POA_GNOME_Evolution_Storage__epv, 1); - epv->_get_name = impl_Storage__get_name; - epv->_get_hasSharedFolders = impl_Storage__get_hasSharedFolders; - epv->_get_folderList = impl_Storage__get_folderList; - epv->asyncCreateFolder = impl_Storage_asyncCreateFolder; - epv->asyncRemoveFolder = impl_Storage_asyncRemoveFolder; - epv->asyncXferFolder = impl_Storage_asyncXferFolder; - epv->asyncOpenFolder = impl_Storage_asyncOpenFolder; - epv->updateFolder = impl_Storage_updateFolder; - epv->asyncDiscoverSharedFolder = impl_Storage_asyncDiscoverSharedFolder; - epv->addListener = impl_Storage_addListener; - epv->removeListener = impl_Storage_removeListener; + epv->_get_name = impl_Storage__get_name; + epv->asyncCreateFolder = impl_Storage_async_create_folder; + epv->asyncRemoveFolder = impl_Storage_async_remove_folder; + epv->asyncXferFolder = impl_Storage_async_xfer_folder; + epv->updateFolder = impl_Storage_updateFolder; + epv->addListener = impl_Storage_add_listener; + epv->removeListener = impl_Storage_remove_listener; return epv; } @@ -724,7 +612,8 @@ void evolution_storage_construct (EvolutionStorage *storage, GNOME_Evolution_Storage corba_object, const char *name, - gboolean has_shared_folders) + const char *toplevel_node_uri, + const char *toplevel_node_type) { EvolutionStoragePrivate *priv; CORBA_Environment ev; @@ -741,14 +630,16 @@ evolution_storage_construct (EvolutionStorage *storage, priv = storage->priv; priv->name = g_strdup (name); - priv->has_shared_folders = !! has_shared_folders; + priv->toplevel_node_uri = g_strdup (toplevel_node_uri); + priv->toplevel_node_type = g_strdup (toplevel_node_type); CORBA_exception_free (&ev); } EvolutionStorage * evolution_storage_new (const char *name, - gboolean has_shared_folders) + const char *toplevel_node_uri, + const char *toplevel_node_type) { EvolutionStorage *new; POA_GNOME_Evolution_Storage *servant; @@ -764,7 +655,7 @@ evolution_storage_new (const char *name, new = gtk_type_new (evolution_storage_get_type ()); corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_storage_construct (new, corba_object, name, has_shared_folders); + evolution_storage_construct (new, corba_object, name, toplevel_node_uri, toplevel_node_type); return new; } @@ -804,6 +695,8 @@ evolution_storage_register (EvolutionStorage *evolution_storage, corba_storage_listener = GNOME_Evolution_StorageRegistry_addStorage (corba_storage_registry, corba_storage, priv->name, + safe_corba_string (priv->toplevel_node_uri), + safe_corba_string (priv->toplevel_node_type), &ev); if (ev._major == CORBA_NO_EXCEPTION) { @@ -912,31 +805,6 @@ evolution_storage_deregister_on_shell (EvolutionStorage *evolution_storage, return result; } -static char * -make_full_uri (EvolutionStorage *storage, - const char *path) -{ - const char *storage_name; - char *full_path; - - storage_name = storage->priv->name; - - if (strcmp (path, G_DIR_SEPARATOR_S) == 0) - full_path = g_strconcat (E_SHELL_URI_PREFIX, - G_DIR_SEPARATOR_S, storage_name, - NULL); - else if (! g_path_is_absolute (path)) - full_path = g_strconcat (E_SHELL_URI_PREFIX, - G_DIR_SEPARATOR_S, storage_name, - G_DIR_SEPARATOR_S, path, NULL); - else - full_path = g_strconcat (E_SHELL_URI_PREFIX, - G_DIR_SEPARATOR_S, storage_name, - path, NULL); - - return full_path; -} - EvolutionStorageResult evolution_storage_new_folder (EvolutionStorage *evolution_storage, const char *path, @@ -944,15 +812,13 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, const char *type, const char *physical_uri, const char *description, - int unread_count, - gboolean can_sync_offline) + int unread_count) { EvolutionStorageResult result; EvolutionStoragePrivate *priv; GNOME_Evolution_Folder *corba_folder; CORBA_Environment ev; GList *p; - char *evolutionUri; g_return_val_if_fail (evolution_storage != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); @@ -972,17 +838,11 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, CORBA_exception_init (&ev); corba_folder = GNOME_Evolution_Folder__alloc (); - corba_folder->displayName = CORBA_string_dup (display_name); - corba_folder->description = CORBA_string_dup (description); - corba_folder->type = CORBA_string_dup (type); - corba_folder->physicalUri = CORBA_string_dup (physical_uri); - corba_folder->canSyncOffline = (CORBA_boolean) can_sync_offline; - - evolutionUri = make_full_uri (evolution_storage, path); - corba_folder->evolutionUri = CORBA_string_dup (evolutionUri); - g_free (evolutionUri); - - corba_folder->unreadCount = unread_count; + corba_folder->displayName = CORBA_string_dup (display_name); + corba_folder->description = CORBA_string_dup (description); + corba_folder->type = CORBA_string_dup (type); + corba_folder->physicalUri = CORBA_string_dup (physical_uri); + corba_folder->unreadCount = unread_count; if (! e_folder_tree_add (priv->folder_tree, path, corba_folder)) { CORBA_free (corba_folder); @@ -1175,56 +1035,5 @@ evolution_storage_folder_exists (EvolutionStorage *evolution_storage, return e_folder_tree_get_folder (priv->folder_tree, path) != NULL; } -EvolutionStorageResult -evolution_storage_has_subfolders (EvolutionStorage *evolution_storage, - const char *path, - const char *message) -{ - EvolutionStorageResult result; - EvolutionStoragePrivate *priv; - CORBA_Environment ev; - GList *p; - - g_return_val_if_fail (evolution_storage != NULL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (path != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (g_path_is_absolute (path), EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (message != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - - priv = evolution_storage->priv; - - if (priv->corba_storage_listeners == NULL) - return EVOLUTION_STORAGE_ERROR_NOTREGISTERED; - - CORBA_exception_init (&ev); - - result = EVOLUTION_STORAGE_OK; - - for (p = priv->corba_storage_listeners; p != NULL; p = p->next) { - GNOME_Evolution_StorageListener listener; - - listener = p->data; - GNOME_Evolution_StorageListener_notifyHasSubfolders (listener, path, message, &ev); - - if (ev._major == CORBA_NO_EXCEPTION) - continue; - if (ev._major != CORBA_USER_EXCEPTION) - result = EVOLUTION_STORAGE_ERROR_CORBA; - else if (strcmp (CORBA_exception_id (&ev), ex_GNOME_Evolution_StorageListener_NotFound) == 0) - result = EVOLUTION_STORAGE_ERROR_NOTFOUND; - else - result = EVOLUTION_STORAGE_ERROR_GENERIC; - - break; - } - - CORBA_exception_free (&ev); - - return result; -} - - E_MAKE_TYPE (evolution_storage, "EvolutionStorage", EvolutionStorage, class_init, init, PARENT_TYPE) diff --git a/shell/main.c b/shell/main.c index 7e824ba990..766d6e6d7d 100644 --- a/shell/main.c +++ b/shell/main.c @@ -23,9 +23,7 @@ #include <config.h> #include <fcntl.h> #include <glib.h> -#include <stdio.h> -#include <gtk/gtkalignment.h> #include <gtk/gtkframe.h> #include <gtk/gtklabel.h> #include <gtk/gtkmain.h> @@ -55,7 +53,6 @@ #include "e-util/e-gtk-utils.h" #include "e-shell-constants.h" -#include "e-shell-config.h" #include "e-setup.h" #include "e-shell.h" @@ -63,11 +60,7 @@ static EShell *shell = NULL; static char *evolution_directory = NULL; - -/* Command-line options. */ static gboolean no_splash = FALSE; -static gboolean start_online = FALSE; -static gboolean start_offline = FALSE; extern char *evolution_debug_log; @@ -79,7 +72,6 @@ quit_box_new (void) GtkWidget *frame; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); /* (Just to prevent smart-ass window managers like Sawfish from setting @@ -181,119 +173,6 @@ destroy_cb (GtkObject *object, gpointer data) } -/* Warning dialog to scare people off a little bit. */ - -static void -warning_dialog_clicked_callback (GnomeDialog *dialog, - int button_number, - void *data) -{ - GtkCheckButton *dont_bother_me_again_checkbox; - Bonobo_ConfigDatabase config_db; - - 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); - - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - -static void -show_development_warning (GtkWindow *parent) -{ - GtkWidget *label; - GtkWidget *warning_dialog; - GtkWidget *dont_bother_me_again_checkbox; - GtkWidget *alignment; - Bonobo_ConfigDatabase config_db; - - 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)) - return; - - warning_dialog = gnome_dialog_new ("Ximian Evolution " VERSION, GNOME_STOCK_BUTTON_OK, NULL); - gtk_window_set_transient_for (GTK_WINDOW (warning_dialog), parent); - - label = gtk_label_new ( - /* xgettext:no-c-format */ - _("Hi. Thanks for taking the time to download this preview release\n" - "of the Ximian Evolution groupware suite.\n" - "\n" - "This version of Ximian Evolution is not yet complete. It's getting close,\n" - "but some features are either unfinished or don't work properly.\n" - "\n" - "If you want a stable version of Evolution, we urge you to uninstall,\n" - "this version, and install a 1.0.x version instead (1.0.5 recommended).\n" - "\n" - "If you find bugs, please report them to us at bugzilla.ximian.com.\n" - "This product comes with no warranty and is not intended for\n" - "individuals prone to violent fits of anger.\n" - "\n" - "We hope that you enjoy the results of our hard work, and we\n" - "eagerly await your contributions!\n" - )); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 4); - - label = gtk_label_new ( - _( - "Thanks\n" - "The Ximian Evolution Team\n" - )); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment(GTK_MISC(label), 1, .5); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - - dont_bother_me_again_checkbox = gtk_check_button_new_with_label (_("Don't tell me again")); - - /* GTK sucks. (Just so you know.) */ - alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.0); - - gtk_container_add (GTK_CONTAINER (alignment), dont_bother_me_again_checkbox); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - alignment, FALSE, FALSE, 0); - - gtk_widget_show_all (warning_dialog); - - gtk_signal_connect (GTK_OBJECT (warning_dialog), "clicked", - GTK_SIGNAL_FUNC (warning_dialog_clicked_callback), - dont_bother_me_again_checkbox); -} - -/* The following signal handlers are used to display the development warning as - soon as the first view is created. */ - -static void -view_map_callback (GtkWidget *widget, - void *data) -{ - gtk_signal_disconnect_by_func (GTK_OBJECT (widget), - GTK_SIGNAL_FUNC (view_map_callback), - data); - - show_development_warning (GTK_WINDOW (widget)); -} - -static void -new_view_created_callback (EShell *shell, - EShellView *view, - void *data) -{ - gtk_signal_disconnect_by_func (GTK_OBJECT (shell), - GTK_SIGNAL_FUNC (new_view_created_callback), - data); - - gtk_signal_connect (GTK_OBJECT (view), "map", view_map_callback, NULL); -} - - /* This is for doing stuff that requires the GTK+ loop to be running already. */ static gint @@ -303,39 +182,23 @@ idle_cb (void *data) GNOME_Evolution_Shell corba_shell; CORBA_Environment ev; EShellConstructResult result; - EShellStartupLineMode startup_line_mode; GSList *p; gboolean have_evolution_uri; gboolean display_default; - gboolean displayed_any; CORBA_exception_init (&ev); uri_list = (GSList *) data; - if (! start_online && ! start_offline) - startup_line_mode = E_SHELL_STARTUP_LINE_MODE_CONFIG; - else if (start_online) - startup_line_mode = E_SHELL_STARTUP_LINE_MODE_ONLINE; - else - startup_line_mode = E_SHELL_STARTUP_LINE_MODE_OFFLINE; - - shell = e_shell_new (evolution_directory, ! no_splash, startup_line_mode, &result); + shell = e_shell_new (evolution_directory, ! no_splash, &result); g_free (evolution_directory); switch (result) { case E_SHELL_CONSTRUCT_RESULT_OK: - e_shell_config_factory_register (shell); - gtk_signal_connect (GTK_OBJECT (shell), "no_views_left", GTK_SIGNAL_FUNC (no_views_left_cb), NULL); gtk_signal_connect (GTK_OBJECT (shell), "destroy", GTK_SIGNAL_FUNC (destroy_cb), NULL); - - if (!getenv ("EVOLVE_ME_HARDER")) - gtk_signal_connect (GTK_OBJECT (shell), "new_view_created", - GTK_SIGNAL_FUNC (new_view_created_callback), NULL); - corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell)); corba_shell = CORBA_Object_duplicate (corba_shell, &ev); break; @@ -366,25 +229,16 @@ idle_cb (void *data) const char *uri; uri = (const char *) p->data; - if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0 || - strncmp (uri, E_SHELL_DEFAULTURI_PREFIX, E_SHELL_DEFAULTURI_PREFIX_LEN) == 0) + if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) have_evolution_uri = TRUE; } if (shell == NULL) { - /* We're talking to a remote shell. If the user didn't - * ask us to open any particular URI, then open another - * view of the default URI - */ if (uri_list == NULL) display_default = TRUE; else display_default = FALSE; } else { - /* We're starting a new shell. If the user didn't specify - * any evolution: URIs to view, AND we can't load the - * user's previous settings, then show the default URI. - */ if (! have_evolution_uri) { if (! e_shell_restore_from_settings (shell)) display_default = TRUE; @@ -395,31 +249,29 @@ idle_cb (void *data) } } - displayed_any = FALSE; - for (p = uri_list; p != NULL; p = p->next) { + if (display_default) { const char *uri; - uri = (const char *) p->data; + uri = E_SHELL_VIEW_DEFAULT_URI; GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev); - if (ev._major == CORBA_NO_EXCEPTION) - displayed_any = TRUE; - else { + if (ev._major != CORBA_NO_EXCEPTION) g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); - CORBA_exception_free (&ev); - } } - g_slist_free (uri_list); - - if (display_default && ! displayed_any) { + for (p = uri_list; p != NULL; p = p->next) { const char *uri; - uri = E_SHELL_VIEW_DEFAULT_URI; + uri = (const char *) p->data; 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); + + if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) + have_evolution_uri = TRUE; } + g_slist_free (uri_list); + CORBA_Object_release (corba_shell, &ev); CORBA_exception_free (&ev); @@ -435,8 +287,6 @@ main (int argc, char **argv) { struct poptOption options[] = { { "no-splash", '\0', POPT_ARG_NONE, &no_splash, 0, N_("Disable splash screen"), NULL }, - { "offline", '\0', POPT_ARG_NONE, &start_offline, 0, N_("Start in offline mode"), NULL }, - { "online", '\0', POPT_ARG_NONE, &start_online, 0, N_("Start in online mode"), NULL }, { "debug", '\0', POPT_ARG_STRING, &evolution_debug_log, 0, N_("Send the debugging output of all components to a file."), NULL }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP @@ -454,12 +304,6 @@ main (int argc, char **argv) gnome_init_with_popt_table ("Evolution", VERSION " [" SUB_VERSION "]", argc, argv, options, 0, &popt_context); - if (start_online && start_offline) { - fprintf (stderr, _("%s: --online and --offline cannot be used together.\n Use %s --help for more information.\n"), - argv[0], argv[0]); - exit (1); - } - if (evolution_debug_log) { int fd; |