Commit Graph

148 Commits

Author SHA1 Message Date
7065f6dba3 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 that makes the icon disappear once the
	storage is opened).
	(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.

svn path=/trunk/; revision=15965
2002-03-07 18:26:57 +00:00
3bc843ceb5 Keep the storage name and display_name in EStoragePriv. (impl_get_name,
* 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]

svn path=/trunk/; revision=15955
2002-03-06 23:36:27 +00:00
54c650eaea [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.

svn path=/trunk/; revision=15804
2002-02-22 22:11:47 +00:00
feb63a0bdc Don't show the folder bar and the shortcut bar in the new window.
* e-shell-view-menu.c (command_open_folder_in_new_window): Don't
show the folder bar and the shortcut bar in the new window.

* 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
here.

* 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.

svn path=/trunk/; revision=15776
2002-02-20 20:50:10 +00:00
4eb4ae3be8 [Implement an Outlook-style "New" dropdown button. It is basically
done but it needs pretty icons so I am leaving it disabled for now.]

* e-combo-button.c: Remove member `separator' from
`EComboButtonPrivate'.  New members `icon', `label'.
(init): There shall be no separator no more.  Init `icon' and
`label' to %NULL.
(e_combo_button_construct): Set no relief.
(e_combo_button_new): Don't get a @menu arg anymore.
(e_combo_button_construct): Likewise.
(e_combo_button_set_icon): New.
(e_combo_button_set_label): New.
(e_combo_button_set_menu): New.
(impl_clicked): New, overriding the "clicked" method for
GtkButton.
(class_init): Install.
(impl_button_release_event): Removed.
(class_init): No need to override ::release_event with this
anymore.
(impl_released): New, override for the GtkButton::released method.
(class_init): Install.

* 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.

svn path=/trunk/; revision=15438
2002-01-23 22:21:24 +00:00
5b050b30a9 [Fix #17258, shell displays splash even if Evolution is already
running.]

* e-shell.c (e_shell_construct): Display the splash screen only if
the registration succeeds.

svn path=/trunk/; revision=15078
2001-12-14 18:51:06 +00:00
17c21c849e Remove debugging message.
* e-shell.c (set_interactive): Remove debugging message.

svn path=/trunk/; revision=14403
2001-10-30 02:36:53 +00:00
5054beec45 Ref the shell. (destroy): Unref the shell. (destroy): Free the
* e-shell-view.c (e_shell_view_construct): Ref the shell.
(destroy): Unref the shell.
(destroy): Free the delayed_selection.  No need to call
`cleanup_delayed_selection()' as the signal handler will have
already be disconnected at this point [as we are using
connect_while_alive()'].

svn path=/trunk/; revision=14325
2001-10-29 08:07:23 +00:00
a40ab7c842 Fix the license text to make sense.
svn path=/trunk/; revision=14192
2001-10-27 01:09:28 +00:00
067aaf149e Update the licensing information to require version 2 of the GPL
explicitly.

svn path=/trunk/; revision=14186
2001-10-26 23:53:35 +00:00
82a4a84c7a Set ->is_initialized to %FALSE. (e_shell_unregister_all): Same here.
* e-shell.c (destroy): Set ->is_initialized to %FALSE.
(e_shell_unregister_all): Same here.

svn path=/trunk/; revision=14170
2001-10-26 21:00:36 +00:00
fb5bec84e9 Handle failure from XGetClassHint properly. Also, free res_name and
* e-shell.c (impl_Shell_selectUserFolder): Handle failure from
XGetClassHint properly.  Also, free res_name and res_class in case
of success.  Fixes #13554.

svn path=/trunk/; revision=14104
2001-10-25 22:28:13 +00:00
856e3689fb Explicitly deactivate the control frame, and display the default URI
* 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
2001-10-23 22:00:39 +00:00
5125a8f870 No need to gtk_widget_show() the view anymore.
* 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
2001-10-22 23:59:54 +00:00
2808a2dce4 Don't die if the parent window has no WMHints.
* e-shell.c (impl_Shell_selectUserFolder): Don't die if the parent
window has no WMHints.

svn path=/trunk/; revision=13905
2001-10-22 22:50:37 +00:00
367221fa5e New member is_interactive' in EShellPrivate'. (init): Init to %FALSE.
* 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
2001-10-22 19:09:24 +00:00
cb0ed21028 Fix the WM problems related to the folder selection dialog being
out-of-proc.  Now it can be set to be a transient window correctly,
and fakes its WindowGroup hint appropriately.

svn path=/trunk/; revision=13765
2001-10-18 19:58:22 +00:00
77886091c3 Re-set the owner on the component that raised OldOwnerHasDied.
* e-shell.c (set_owner_on_components): Re-set the owner on the
component that raised OldOwnerHasDied.

svn path=/trunk/; revision=13730
2001-10-17 20:26:32 +00:00
9b86a51681 [Fix #7643, Starting new view doesn't honor "view" settings.]
* 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
2001-10-12 06:29:09 +00:00
ac07e6a338 [Hopefully really, finally fix #8615 and friends.]
* 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
2001-10-12 05:23:47 +00:00
b36809d0b8 Handle the return value from
* 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
2001-10-05 19:49:21 +00:00
fc1e5673bb If setting the owner fails, print the a warning message out. Then restart
* 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
2001-10-05 17:49:35 +00:00
811d0de363 Make the crash message less dorky. [#10264]
* e-shell.c (e_shell_component_maybe_crashed): Make the crash
message less dorky.  [#10264]

svn path=/trunk/; revision=13309
2001-10-02 19:05:39 +00:00
e77919dfff [Fix #8053, `GNOME_Evolution_Shortcuts' doesn't seem to work.]
* e-shell.c (e_shell_construct): Don't create the EShortcuts
object a second time.

svn path=/trunk/; revision=13236
2001-09-28 21:53:33 +00:00
e6ab5554d4 Allow callers to set the default type of folder to be created.
svn path=/trunk/; revision=13220
2001-09-28 18:58:17 +00:00
c8c0ecf1a7 Only raise NotReady if the local storage pointer is actually NULL. This
* 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
2001-09-17 22:02:40 +00:00
8e88e78fbb Return a proper value. (impl_Shell_createStorageSetView): Likewise.
* e-shell.c (impl_Shell_getLocalStorage): Return a proper value.
(impl_Shell_createStorageSetView): Likewise.
(impl_Shell_setLineStatus): Likewise.
(impl_Shell__get_displayName): Likewise.
(impl_Shell_getComponentByType): Likewise.
(impl_Shell_createNewView): Likewise.
(impl_Shell_handleURI): Likewise.

svn path=/trunk/; revision=12834
2001-09-14 22:38:08 +00:00
1b26832f14 [Fix #8204 and the other bugs caused by allowing invocations on
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
2001-09-14 19:27:41 +00:00
638ad0ba0b [Fix #5990, Remembering Evolution window geometry.]
* 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
2001-09-13 23:46:03 +00:00
81b29a04e5 [Remove a bunch of debugging messages, as per #7741.]
* evolution-wizard.c (impl_GNOME_Evolution_Wizard_notifyAction):
Removed debugging messages.

* e-storage-set.c (storage_removed_folder_cb): Removed debugging
message.

* e-storage-set-view.c (tree_drag_begin): Removed debugging
message.
(tree_drag_data_received): Removed debugging messages.

* e-shortcuts.c (idle_cb): Removed debugging message.

* e-shortcuts-view-model.c (get_icon_for_item): Removed debugging
message.

* e-shell.c (setup_components): Removed debugging message.

* e-shell-startup-wizard.c (druid_event_notify_cb): Removed
debugging message.
(e_shell_startup_wizard_create): Removed debugging message.

* e-shell-offline-handler.c (finalize_offline_hash_foreach):
Removed debugging message.

* e-shell-importer.c (start_import): Removed debugging message.
(item_selected): Same here.

* e-local-storage.c (async_xfer_folder_step): Removed debugging
message.

* e-corba-storage.c (impl_StorageListener_notifyFolderCreated):
Changed the error from a g_print() into a g_warning().  Removed
debugging message.

* e-corba-storage-registry.c (impl_StorageRegistry_addStorage):
Removed debugging message.
(impl_StorageRegistry_removeStorageByName): Likewise.

* e-component-registry.c (component_free): Removed debugging
message.
(register_component): Don't printf() about the registered folder
type.
(register_component): Don't printf() about the registered schema
type.

svn path=/trunk/; revision=12811
2001-09-13 21:26:42 +00:00
c788ba0faf Disable DnD on the EStorageSetView to avoid strange behaviors.
* 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-09-13 21:11:22 +00:00
bc21d949ca [Fix #6971, Default folder should be the Summary.]
* main.c (idle_cb): s/DEFAULT_URI/E_SHELL_VIEW_DEFAULT_URI/.

* e-shell.c (e_shell_create_view):
s/DEFAULT_URI/E_SHELL_VIEW_DEFAULT_URI/.

* e-shell-view.c (socket_destroy_cb):
s/DEFAULT_URI/E_SHELL_VIEW_DEFAULT_URI/.
(e_shell_view_save_settings): Likewise.

* e-shell-folder-commands.c (e_shell_command_delete_folder):
s/DEFAULT_URI/E_SHELL_VIEW_DEFAULT_URI/.

* e-shell-view.h (DEFAULT_URI): Rename to
`E_SHELL_VIEW_DEFAULT_URI'.  Change from "evolution:/local/Inbox"
to be "evolution:/summary".

svn path=/trunk/; revision=12618
2001-09-05 00:10:03 +00:00
012f7f454a Shut down other components correctly when cancelling the first time startup dialog
svn path=/trunk/; revision=12600
2001-09-04 21:20:57 +00:00
bd6877fa15 #include "e-shell-startup-wizard.h".
* e-shell.c: #include "e-shell-startup-wizard.h".

* e-shell-startup-wizard.h: New.

svn path=/trunk/; revision=12359
2001-08-21 20:35:13 +00:00
4d477c4497 Put the bonobo_object_release_unref() for the db at the top in an attempt
* e-shell.c (destroy): Put the bonobo_object_release_unref() for
the db at the top in an attempt to fix #7542.

svn path=/trunk/; revision=12238
2001-08-20 02:58:17 +00:00
d5ea07e5be Compile fixes
svn path=/trunk/; revision=12172
2001-08-17 19:44:17 +00:00
66659c3812 Don't destroy the splash twice.
2001-08-17  Jeffrey Stedfast  <fejj@ximian.com>

	* e-shell.c (e_shell_construct): Don't destroy the splash twice.

svn path=/trunk/; revision=12160
2001-08-17 17:44:00 +00:00
4e60b7d947 Startup assistant stuff
svn path=/trunk/; revision=12145
2001-08-17 04:29:11 +00:00
c140e7f06e s/the view for %s' have/the views for %s' have/.
* e-shell.c (e_shell_component_maybe_crashed): s/the view for `%s'
have/the views for `%s' have/.

svn path=/trunk/; revision=12107
2001-08-16 17:59:53 +00:00
ea623b5543 Add a new IDL function, Evolution::Shell::setLineStatus (in boolean). Bug
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
2001-08-15 17:03:00 +00:00
febc97f6f5 [Fix #7109, Evolution crashes when the splash screen dialog is
killed by clicking the "X" button.]

* e-shell.c (e_shell_construct): Connect
`gtk_widget_hide_on_delete()' correctly.

svn path=/trunk/; revision=11962
2001-08-13 21:33:09 +00:00
6933a8dc80 Restore the shell reffing/unreffing here.
* e-shell.c (view_destroy_cb): Restore the shell reffing/unreffing
here.

svn path=/trunk/; revision=11954
2001-08-13 20:16:32 +00:00
20801a94aa Add the menu items using the EShellUserCreatableItemsHandler.
* 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
2001-08-09 23:37:56 +00:00
3bc73b6a38 [This should fix #5407, application crash on re-opening.]
* 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
2001-08-07 21:47:25 +00:00
bd2f1603e5 Add some padding to the label so that the title doesn't move around when
* 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-05 04:33:57 +00:00
385ba85d42 [Removing Evolution::LocalStorage interface, abstracting the unread counts
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
2001-08-03 23:08:38 +00:00
0039ef5422 [Fix #6232, the thirty-four-splash-screens-at-startup bug.]
* 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
2001-08-03 14:27:44 +00:00
b5c3ca3079 Make "My Evolution" a normal storage instead of being the toplevel
node that contains everything else.

svn path=/trunk/; revision=11610
2001-08-03 13:18:08 +00:00
bb98a04df3 [Fixes #4663, startup crash.]
* 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
2001-08-03 07:16:08 +00:00
b6b0c36a3b Spit out a warning if we cannot resolve "Bonobo/ConfigDatabase" on
* 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-08-03 03:17:14 +00:00