* e-shell-view.c (storage_set_removed_folder_callback): Explicitly
deactivate the control frame, and display the default URI before
destroying the dead one.
* e-shell.c (e_shell_component_maybe_crashed): If the URI is of a
folder that doesn't exist anymore, don't assume that the
corresponding component has crashed. Also, try pinging the
component first; if the component responds, don't pop up the
dialog.
svn path=/trunk/; revision=13960
* e-shell-view-menu.c (command_open_folder_in_new_window): No need
to gtk_widget_show() the view anymore.
* e-shell-view.c (activate_shortcut_cb): No need to
gtk_widget_show() the view anymore.
* e-shell.c (impl_Shell_createNewView): Don't explicitly show the
new view.
(e_shell_create_view): gtk_widget_show() the new view and flush
the GTK+ event loop before sending the ::interactive notification.
(create_view): New helper function.
(e_shell_create_view): Use it.
(e_shell_create_view_from_settings): New.
(e_shell_restore_from_settings): Use
`e_shell_create_view_from_settings()'.
svn path=/trunk/; revision=13918
* e-shell.c: New member `is_interactive' in `EShellPrivate'.
(init): Init to %FALSE.
(set_interactive): New.
(e_shell_create_view): Make interactive.
(view_destroy_cb): If no views are left, make non-interactive.
* evolution-shell-component.c (class_init): Set up the
"interactive" signal.
(impl_interactive): New implementation for the ::interactive
method.
(class_init): Install.
* evolution-shell-component.h: New signal `interactive'.
* Evolution-ShellComponent.idl: New method ::interactive.
svn path=/trunk/; revision=13890
* e-shell-view-menu.c (command_open_folder_in_new_window): Pass
the parent @shell_view as the @template_view arg to
`e_shell_create_view()'
* e-shell-view.c (activate_shortcut_cb): Pass the _view as the
@template_view arg to `e_shell_create_view()'.
* e-shell-folder-commands.c
(e_shell_command_open_folder_in_other_window): Pass the parent
@shell_view as the @template_view arg to `e_shell_create_view()'.
* e-shell.c (e_shell_create_view): New arg @template_view.
(impl_Shell_createNewView): Pass %NULL as @template_view when
calling it.
(e_shell_restore_from_settings): Likewise.
svn path=/trunk/; revision=13618
* main.c (no_views_left_cb): Invoke `e_shell_disconnect_db()'
before unreffing the shell.
* e-shell.c (e_shell_disconnect_db): New.
(destroy): Call it instead of unreffing the db manually here.
svn path=/trunk/; revision=13616
* e-shell.c (impl_Shell_handleURI): Handle the return value from
`evolution_shell_component_client_handle_external_uri()' as an
EvolutionShellComponentClientResult instead of treating it as a
boolean. This prevents the incorrect NotFound exceptions we were
getting for `mailto:' invocations.
svn path=/trunk/; revision=13460
* e-shell.c (set_owner_on_components): If setting the owner fails,
print the a warning message out. Then restart the component.
* e-component-registry.c (component_free): Return a boolean value.
%FALSE if ::unsetOwner raises an exception.
(register_type): New arg @override_duplicate, to avoid complaining
if a component gets re-registered.
(register_component): Likewise.
(e_component_registry_restart_component): New.
* e-uri-schema-registry.c
(e_uri_schema_registry_set_handler_for_schema): Changed return
type to `void'. Just remove the old handler and set up the new
one.
* evolution-shell-component-client.c (corba_exception_to_result):
Translate ::OldOwnerHasDied into
EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED.
* evolution-shell-component.h: New enum value
`EVOLUTION_SHELL_COMPONENT_OLDOWNERHASDIED'.
* evolution-shell-component.c (impl_setOwner): If the old owner is
not alive anymore [use CORBA_Object_non_existent() to figure this
out], emit OWNER_UNSET and raise `OldOwnerHasDied'.
(evolution_shell_component_result_to_string): New.
* Evolution-ShellComponent.idl: New exception `OldOwnerHasDied'.
(ShellComponent::setOwner): Can raise it.
* e-folder-type-registry.c
(e_folder_type_register_type_registered): New.
(e_folder_type_register_unregister_type): New.
svn path=/trunk/; revision=13446
* e-shell.c (impl_Shell_getLocalStorage): Only raise NotReady if
the local storage pointer is actually NULL. This way it is
possible for the components to access the local storage during
initialization even if the shell is not quite finished
initializing yet.
svn path=/trunk/; revision=12914
the ::Shell interface to happen before the shell is actually fully
initialized. This is a lame hack and not a nice, complete
solution for the problem, but it should do for now.]
* e-shell.c: New member `is_initialized' in `EShellPrivate'.
(init): Initialize to %FALSE.
(e_shell_construct): Set `is_initialized' to %TRUE after the
initialization sequence is finished.
(raise_exception_if_not_ready): New utility function to raise the
notReady exception if the shell is not ready.
(impl_Shell__get_displayName): Call it.
(impl_Shell_getComponentByType): Likewise.
(impl_Shell_createNewView): Likewise.
(impl_Shell_handleURI): Likewise.
(impl_Shell_selectUserFolder): Likewise.
(impl_Shell_getLocalStorage): Likewise.
(impl_Shell_createStorageSetView): Likewise.
(impl_Shell_setLineStatus): Likewise.
(e_shell_construct): Print out the repo_id of the exception from
`bonobo_get_object()' if it fails. Also, register on OAF just
before displaying the splash.
* Evolution-Shell.idl: New exception `NotReady'. All the CORBA
methods on ::Shell can now raise this exception.
svn path=/trunk/; revision=12826
* e-shell.c (impl_Shell_createNewView): gtk_widget_show() the new
view returned by `e_shell_create_view()'.
(e_shell_restore_from_settings): Same here, after loading the
settings.
* e-shell-view.c (activate_shortcut_cb): gtk_widget_show() the new
view returned by `e_shell_create_view()'.
* e-shell-view-menu.c (command_open_folder_in_new_window):
gtk_widget_show() the view returned by `e_shell_create_view()'.
* e-shell-folder-commands.c
(e_shell_command_open_folder_in_other_window): gtk_widget_show()
the view returned by `e_shell_create_view()'.
* e-shell.c (e_shell_create_view): Don't show the view
automatically anymore.
* e-shell-view.c (e_shell_view_save_settings): Save the width and
height of the window.
(e_shell_view_load_settings): Restore the width and the height and
gtk_window_set_default_size() based on them.
svn path=/trunk/; revision=12816
* e-shell-view.c (pop_up_folder_bar): Disable DnD on the
EStorageSetView to avoid strange behaviors.
(reparent_storage_set_view_box_and_destroy_popup): Re-enable DnD
here.
(popdown_transient_folder_bar): And here as well.
* evolution-storage-set-view-factory.c
(evolution_storage_set_view_factory_new_view): Disable DnD on the
EStorageSetView.
* e-shell-folder-selection-dialog.c
(e_shell_folder_selection_dialog_construct): Disable DnD on the
EStorageSetView.
* e-shell-folder-creation-dialog.c (add_storage_set_view): Disable
DnD on the EStorageSetView.
* e-storage-set-view.c: New member `allow_dnd' in
`EStorageSetViewPrivate'.
(init): Init to `allow_dnd' %TRUE.
(tree_start_drag): If `allow_dnd' is false, don't start the drag
and return %FALSE.
(tree_drag_motion): If `allow_dnd' is false, return %FALSE.
(e_storage_set_view_get_allow_dnd): New.
(e_storage_set_view_set_allow_dnd): New.
svn path=/trunk/; revision=12810
2001-08-15 Jason Leach <jleach@ximian.com>
* Evolution-Shell.idl: Add a new IDL function,
Evolution::Shell::setLineStatus (in boolean). Bug #3030.
* e-shell.c (impl_Shell_setLineStatus): Implementation of the
above.
* evolution-shell-client.c
(evolution_shell_client_set_line_status): A wrapper function for
the above, this is what a component can call to set the shell
on/offline.
svn path=/trunk/; revision=12057
* e-shell-view.c (e_shell_view_construct): Add the menu items
using the EShellUserCreatableItemsHandler.
* e-shell-user-creatable-items-handler.c: New.
* e-shell-user-creatable-items-handler.h: New.
* e-shell.c: New member `user_creatable_items_handler' in
`EShellPrivate'.
(init): Initialize to NULL.
(destroy): Unref.
(e_shell_construct): Create here.
(e_shell_get_user_creatable_items_handler): New accessor.
(setup_components): Add the registered components to the
user_creatable_items_handler.
* evolution-test-component.c (factory_fn): Add a couple sample
user-creatable items.
(user_create_new_item_callback): New callback for the
"user_create_new_item" signal on the EvolutionShellComponent.
(factory_fn): Connect.
* e-shell.c (e_shell_get_component_registry): New.
* evolution-shell-component.c: New enum value
`USER_CREATE_NEW_ITEM'. New member `user_create_item_types' in
`_EvolutionShellComponentPrivate'.
(init): Init to NULL.
(impl_destroy): Free it.
(user_creatable_item_type_free): New helper function.
(user_creatable_item_type_new): New helper function.
(impl_userCreateNewItem): New, implementation for
::userCreateNewItem.
(class_init): Install the "user_create_new_item" signal and the
userCreateNewItem impl.
(impl__get_external_uri_schemas): Renamed from
`impl_ShellComponent__get_external_uri_schemas'.
(impl___get_supported_types): Renamed from
`impl_ShellComponent__get_supported_types'.
(impl__get_user_creatable_item_types): New, implementation for the
`user_creatable_item_types' attribute.
(class_init): Install it.
(evolution_shell_component_add_user_creatable_item): New.
* evolution-shell-component.h: Added signal
`user_create_new_item'.
* Evolution-ShellComponent.idl: Added typedefs
`UserCreatableItemType', `UserCreatableItemTypeList'. New
attribute `user_creatable_item_types'.
(userCreateNewItem): New.
svn path=/trunk/; revision=11849
* e-shell.c (e_shell_construct): Call
`gtk_widget_hide_on_delete()' on the splash.
* e-splash.c (e_splash_add_icon): Don't check for destruction
here.
(e_splash_set_icon_highlight): Not even here.
(button_press_event): Use a GTK+ cast.
svn path=/trunk/; revision=11743
* e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct):
Add some padding to the label so that the title doesn't move
around when you switch between pop-up and non-pop-up folder bar.
Also, change all the GtkLabels to be GtkClippedLabels instead.
(e_shell_folder_title_bar_set_title): Updated to use
EClippedLabels instead of GtkLabels.
(e_shell_folder_title_bar_set_folder_bar_label): Likewise.
* e-shell.c (impl_Shell__get_displayName): New, implementation for
the `displayName' attribute.
* Evolution-Shell.idl: Added readonly attribute `displayName' to
get the canonicalized X11 display name for the shell.
* e-shell.c (e_shell_construct): Ooops. Return
`E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER' if the OAF registration
fails, not `E_SHELL_CONSTRUCT_RESULT_GENERICERROR'.
* e-shortcuts-view.c (rename_group_cb): Get the toplevel from the
shortcuts view, not the widget.
(rename_shortcut_cb): Likewise.
(show_new_group_dialog): Changed to use `e_request_string()'.
* evolution-test-component.c: Add the %FALSE value for the
`user_creatable' field in the `folder_types' entry.
* evolution-shell-client.c: New member `shortcuts_interface' in
`EvolutionShellClientPrivate'.
(destroy): Unref it if not CORBA_OBJECT_NIL.
(init): Init to CORBA_OBJECT_NIL.
(query_shell_interface): New helper function to query an interface
on the shell and spit out warnings if it fails.
(evolution_shell_client_construct): Use it to query the ::Activity
interface. Also query the ::Shortcuts interface and set the
`shortcuts_interface' member to point to it.
* e-shell.c: New member `corba_shortcuts' in `EShellPrivate'.
(init): Init to NULL.
(setup_shortcuts_interface): Helper function to add the
::Shortcuts CORBA interface to the shell.
(e_shell_construct): Call it.
* e-corba-shortcuts.c, e-corba-shortcuts.h: New objects
implementing the `Evolution::Shortcuts' CORBA interface.
* Evolution-Shortcuts.idl: New interface for accessing the
shortcuts in the shell.
* e-shell.c (e_shell_get_config_db): Moved down.
svn path=/trunk/; revision=11689
2001-08-03 Jason Leach <jleach@ximian.com>
[Removing Evolution::LocalStorage interface, abstracting the
unread counts from a folder's name, also abstract unread counts
from a shortcut's name. Fixes#4489 and #5497]
* e-shortcuts.c (shortcut_item_new): Take an unread_count argument
now.
(shortcut_item_update): Ditto.
* e-shortcuts-view-model.c (get_name_with_unread): Get a string
containing a shortcut name and it's unread, because these are
abstracted now.
(load_group_into_model): Use the above function to make shortcuts
that have unread counts.
* e-storage-set-view.c (update_folder_with_unread_hash): Keep a
hash of folder names with unread counts, because the folder name
and it's unread count are to be separated, only the ETree is
supposed to present it as one string.
* e-shell-view.c: Renamed EShellView::view_title_bar to
folder_title_bar, to closer match the
* e-shell-view-menu.c (new_shortcut_dialog_folder_selected_cb):
Make a shortcut with the unread count.
* e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar):
Make a shortcut with the unread count.
* e-local-storage.c: Updated for API changes.
* e-folder.c (e_folder_get_unread_count): New function, does what
it says.
(e_folder_set_unread_count): Ditto.
* e-corba-storage.c (impl_StorageListener_new_folder): Renamed to
match the IDL function name.
(impl_StorageListener_update_folder): Ditto.
(impl_StorageListener_removed_folder): Ditto.
* Evolution-Storage.idl (struct Folder): Replace the boolean
highlighted with a long unread_count.
(updateFolder): Brought in from the now dead
Evolution::LocalStorage.
* Evolution-Shell.idl (getLocalStorage): Return a Storage instead
of a LocalStorage.
* Evolution-LocalStorage.idl: Removed, no longer needed, only used
function, updateFolder, has been moved into Evolution::Storage
interface.
* evolution-local-storage.[ch]: Ditto.
* evolution-storage.c (impl_Storage_updateFolder): Implementation
of the updateFolder taken from ::LocalStorage.
(class_init): New "update_folder" signal, taken from
evolution-local-storage.c too.
(evolution_storage_update_folder): Take an @unread_count int
instead of a @highlighted boolean.
(evolution_storage_new_folder): Same for here.
(evolution_storage_update_folder_by_uri): And here.
* evolution-storage-listener.h: "update_folder" signal no longer
sends a @highlighted boolean.
2001-08-03 Jason Leach <jleach@ximian.com>
* e-shell-view-menu.c (update_offline_menu_item): Use Jakub's new
"Work Online" icon and fix a typo.
svn path=/trunk/; revision=11633
* e-shell.c (setup_local_storage): Add an E_STORAGE() cast to
prevent a warning.
* main.c (idle_cb): Only try to activate from the shell ID if the
result is `E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER'; if there is a
different error, spit out a dialog box with a description of it
and exit instead.
* e-shell.c (e_shell_construct): Return an `EShellConstructResult'
describing what kind of result we had. Show the splash after the
DB has been reached, not before.
(e_shell_construct_result_to_string): New function to get a
descriptive string out of an `EShellConstructResult'.
(e_shell_new): New arg @construct_result_return to return a
description of the result of the operation.
* e-shell.h: New enum `EShellConstructResult'.
* e-shell.c (impl_Shell_createNewView): Raise `InternalError'
instead of crashing if the shell_view returns a CORBA_OBJECT_NIL.
* Evolution-Shell.idl: New exception `InternalError'.
`createNewView' and `handleURI' can raise it.
svn path=/trunk/; revision=11611
* e-shell.c (e_shell_construct): Make sure the pointer to the db
object is CORBA_OBJECT_NIL if `bonobo_get_object()' raises an
exception.
svn path=/trunk/; revision=11606
* e-shell.c (e_shell_construct): Spit out a warning if we cannot
resolve "Bonobo/ConfigDatabase" on "wombat:". Also, register on
OAF only after we are sure we are not going to return FALSE.
svn path=/trunk/; revision=11603
2001-07-20 Jason Leach <jleach@ximian.com>
[Fix a crash if you start evolution with a bad URI.]
* e-shell.c (e_shell_create_view): If we can't display the URI,
display the default uri. This is because it's necessary for
e_shell_view_display_uri() to run all the way through so corba
interfaces get setup.
* e-shell-view.c (e_shell_view_display_uri): If we fail to create
a new view for a URI (happens if you pass in an invalid URI), be
sure to return FALSE.
svn path=/trunk/; revision=11290
* e-shell.c (init): Initialize priv->db and priv->iid so that
destroy() won't crash if e_shell_construct bails out before
setting them. Reduces bug #4173 to #4169.
svn path=/trunk/; revision=11044
file by itself when the file is not present or corrupted. Fixes
#3668, failure to handle malformed shortcuts.xml file.]
* e-shell.c (e_shell_construct): If the `e_shortcuts_new()'
returns an object with no shortcuts in it, fill it in with
`e_shortcuts_add_default_group()'.
* e-shortcuts.c: New member `num_groups' in EShortcutsPrivate.
(init): Init to zero.
(e_shortcuts_add_group): Increment.
(e_shortcuts_remove_group): Decrement.
(e_shortcuts_get_num_groups): New.
(e_shortcuts_add_default_group): New function to set up the
default shortcuts.
(e_shortcuts_new): Return an empty EShortcuts object if loading
the file files, instead of returning NULL.
svn path=/trunk/; revision=10744
thus getting the shell refcounting in better shape. The quit sequence
is still not quite right, but we are getting there.
Also fixed a nasty bug in destroying the EStorageSet due to a very old
commit by the Meekster.
svn path=/trunk/; revision=10470