Commit Graph

13 Commits

Author SHA1 Message Date
899db1fe37 Removed globals activity_client', progress'. (timeout_callback_3): Get
* evolution-test-component.c: Removed globals `activity_client',
`progress'.
(timeout_callback_3): Get the activity client from @data.
(timeout_callback_2): Likewise here.  Pass the activity client as
the user data pointer for `gtk_timeout_add()'.  Put the progress
count in a "my_progress" GtkObject data key.
(timeout_callback_1): Pass the newly created EActivityClient as
the user data pointer for `gtk_timeout_add()'.  Also, dispatch
itself again with a random timeout delay, for a maximum of
NUM_ACTIVITES times.  Initialize the "my_progress" GtkObject data
to be -1.

* e-activity-handler.c: New member `component_id' in
`ActivityInfo'.
(activity_info_new): New arg @component_id.  Init the
`component_id' member accordingly.
(activity_info_free): Free the `component_id' member.
(impl_operationStarted): Pass the component_id to
`activity_info_new()'.
(task_widget_new_from_activity_info): Pass the component_id to the
activity_info.

* e-task-widget.c: New member `component_id' in
`ETaskWidgetPrivate'.
(impl_destroy): Free it.
(init): Init to NULL.  Also init all the other members to NULL as
well.
(e_task_widget_construct): New arg @component_id.  Assign
->component_id to match it.
(e_task_widget_new): New arg @component_id here as well.  Pass it
over to `e_task_widget_construct()'.
(e_task_widget_get_component_id): New.

svn path=/trunk/; revision=12988
2001-09-19 21:13:08 +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
56ed3ed3b9 [Fix #958, ShellComponents should not be created by factories, for
the test component.]

* GNOME_Evolution_TestComponent.oaf: Remove the factory.

* evolution-test-component.c (COMPONENT_FACTORY_ID): Removed.
(component_factory_init): Removed.
(register_component): Rename from `component_fn'.  No args, no
return value.  Register the thing on OAF by yourself instead of
using a factory.

svn path=/trunk/; revision=12639
2001-09-05 22:58:45 +00:00
d9ed7a6a63 Added display_name and description to the type.
* evolution-test-component.c: Added display_name and description
to the type.

* evolution-shell-component.c (impl__get_supported_types): Pass
`display_name' and `description' here.
(evolution_shell_component_construct): Likewise.

* evolution-shell-component.h: New members `display_name',
`description' in `EvolutionShellComponentFolderType'.

* e-component-registry.c (register_type): New args @description
and @display_name.  Pass to
`e_folder_type_registry_register_type()'.
(register_component): Pass the values returned in the sequence
from __get_supported_types.

* e-folder-type-registry.c: New members `display_name' and
`description' in `struct _FolderType'.
(folder_type_new): New args @description and @display_name.
Initialize the respective fields in the `FolderType' accordingly.
(folder_type_free): Free `display_name' and `description'.
(register_folder_type): New args @display_name, @description.
(e_folder_type_registry_register_type): New args @display_name,
@description.
(e_folder_type_registry_get_description_for_type): New.
(e_folder_type_registry_get_display_name_for_type): New.

* Evolution-ShellComponent.idl: Added `display_name' and
`description' fields to the `FolderType' struct.

svn path=/trunk/; revision=12245
2001-08-20 04:42:04 +00:00
d471640fe8 Updated to display the parent folder's URI and its type as well.
* evolution-test-component.c (user_create_new_item_callback):
Updated to display the parent folder's URI and its type as well.

* evolution-shell-component.c (impl_userCreateNewItem): Updated to
get the @parent_folder_physical_uri and the @parent_folder_type.
(class_init): Update the "user_create_new_item" signal to have
@parent_folder_physical_uri and @parent_folder_type args.

* e-shell-view.c (get_type_for_folder): Don't bork on a NULL
@physical_uri_return.
(e_shell_view_get_current_physical_uri): New.
(e_shell_view_get_current_folder_type): New.

* e-shell-user-creatable-items-handler.c
(e_shell_user_creatable_items_handler_setup_menus): Replace
@ui_component arg with a @shell_view arg.  Set it on the
UIComponent using gtk_object_set_data().
(verb_fn): Pass the type and physical URI of the current folder;
retrieve that from the shell_view got with gtk_object_get_data().

* Evolution-ShellComponent.idl
(userCreateNewItem): New args @parent_folder_uri,
@parent_folder_type.

svn path=/trunk/; revision=11863
2001-08-10 01:07:46 +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
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
7657ec4a52 Don't assert that there is a handler, so we don't crash if user clicks on
* e-storage-set-view.c (popup_folder_menu): Don't assert that
there is a handler, so we don't crash if user clicks on a folder
whose type we cannot handle for some reason [such as an
uninstalled component].

* evolution-test-component.c (activity_client_cancel_callback):
New callback for the "cancel" signal on the
EvolutionActivityClient object.
(activity_client_show_details_callback): New callback for the
"show_details" signal.
(timeout_callback_1): Connect these two signal handlers.

* e-activity-handler.c (task_widget_button_press_event_callback):
Ahem, right-click is button 3, not button 2.
(show_cancellation_popup): Actually pop up the menu.
(get_corba_null_value): New helper function to create a CORBA_any
null value.
(report_task_event): New helper function to report events to the
listener.
(task_widget_cancel_callback): Use it.  Report "Cancel" instead of
"Cancelled".
(task_widget_show_details_callback): New, callback for the "Show
Details" right-click menu item.

* evolution-activity-client.c: Updated to dispatch the "Cancel"
and "ShowDetails" events as "cancel" and "show_details" signals.
(class_init): Install the signals.
(listener_callback): Updated to update the signals corresponding
to the "ShowDetails" and "Cancel" events.

* Evolution-Activity.idl: Changed the docs about the events sent
to the Bonobo::Listener.  We now only have "ShowDetails" and
"Cancelled".

* evolution-test-component.c (timeout_callback_1): Make the
activity cancellable so we can test the right-click cancel menu
too.

* main.c (idle_cb): Actually exit if we cannot reach to the shell.

svn path=/trunk/; revision=10684
2001-07-02 17:06:08 +00:00
d82d5a7997 Add method `ShellComponent::handleExternalURI' and an
`external_uri_schemas' attribute.  Update the EvolutionShellComponent
GTK+ wrapper accordingly.  Update all the components to pass a NULL
`external_uri_schemas' list when initializing themselves as
EvolutionShellComponents.

svn path=/trunk/; revision=10548
2001-06-27 23:17:41 +00:00
2f67aaaf88 Actually implement the "clicked" signal for the EActivityHandler, and
add some small testing code for it in the test component.

svn path=/trunk/; revision=10464
2001-06-25 02:54:12 +00:00
ea40bb0823 Added an EvolutionActivityClient object to libeshell, to handle
updating of progress information from the component's side.  This
object allows to automatically set a lower limit to the delay between
CORBA calls towards the shell, so that the component isn't slowed down
too much by doing too frequent updates.

Also changed the test component to use this instead of doing CORBA
calls directly.

svn path=/trunk/; revision=10449
2001-06-24 13:13:50 +00:00
5b52672a15 Add code to query the ::Activity interface in the
EvolutionShellComponent class and get the test component to use it.

svn path=/trunk/; revision=10448
2001-06-24 10:39:51 +00:00
b106b13525 Implemented an Evolution::Activity interface for keeping track of
background tasks.  The Activity interface is added to the shell, and
the status of the various tasks is now displayed in a task bar widget
at the bottom of the EShellView.

I also implemented a simple test component to test all this stuff.

svn path=/trunk/; revision=10434
2001-06-23 06:46:13 +00:00