aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-user-creatable-items-handler.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed from GNOME_Evolution_Shell.oaf.in.Ettore Perazzoli2002-11-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * GNOME_Evolution_Shell.server.in: Renamed from GNOME_Evolution_Shell.oaf.in. * Makefile.am: Port from OAF to bonobo-activation. (INCLUDES): Define SYSCONFDIR, DATADIR, LIBDIR. * main.c (main): Use gnome_program_init(). * e-corba-storage-registry.c (e_corba_storage_registry_new): g_object_new(), not gtk_type_new(). (impl_finalize): New, ported over from destroy. (destroy): Removed. (class_init): Install finalize handler, not destroy handler, since we are not a GtkObject anymore. * e-corba-storage.c (e_corba_storage_new): g_object_new(), not gtk_type_new(). * e-shell.c (class_init): Override finalize, not destroy. (impl_finalize): Finalize implementation, basically the old destroy renamed. (e_shell_new): g_object_new(), not gtk_type_new(). (class_init): Use e_shell_marshal_NONE__INT for line_status_changed instead of using an ENUM. (e_shell_construct): Use g_signal_connect_object() instead of gtk_signal_connect_while_alive(). * e-setup.c (e_setup): Do not unref local_folder if NULL. * e-folder.c (init): Make not floating. (e_folder_construct): No need to make it floating here anymore. * e-shell.c (impl_Shell_selectUserFolder): For now don't set dialog parent from xid. * main.c (no_views_left_cb): Add missing GTK_SIGNAL_FUNC() cast. (new_view_created_callback): Likewise. (warning_dialog_clicked_callback): Update to use the EConfigListener from the shell instead of bonobo-conf. (show_development_warning): Likewise. (upgrade_from_1_0_if_needed): BONOBO_EX_ID -> BONOBO_EX_REPOID. (idle_cb): Use bonobo-activation and BONOBO_EX_REPOID(). (main): Cleaned up the various things that are unneeded in GNOME 2. (upgrade_from_1_0_if_needed): Use EConfigListener. * evolution-storage-set-view.h, evolution-storage-set-view.c: BonoboXObjectified. * e-storage.c (class_init): GLIB2-ified and made to use e-shell-marshal.h. (ES_CLASS): Use GTK_OBJECT_GET_CLASS(). (e_storage_new_folder): Added missing GTK_SIGNAL_FUNC() prototype. * e-storage-set.c (class_init): GLIB2-ified and made to use e-shell-marshal.h. * e-storage-set-view.c (popup_folder_menu): For now, do not add the pop-up since we lack bonobo_ui_container_get_win() and I am not sure how to work around it. (popup_folder_menu): Pass self as the for_widget arg to gnome_popup_menu_do_popup_modal(). (class_init): GLIB2-ified, and got to use e-shell-marshal.h. (marshal_NONE__GDKDRAGCONTEXT_STRING_STRING_STRING): Removed. (impl_tree_drag_data_get): Don't set the selection for now -- we have to fix the CORBA target stuff to match GTK 2. (e_storage_set_view_construct): Pass NULL as the opt_ev arg to bonobo_ui_component_set_container(). * e-splash.c: #include <libgnomecanvas/gnome-canvas-pixbuf.h> instead of <gdk-pixbuf/gnome-canvas-pixbuf.h>. (e_splash_new): Pass NULL as the error arg to gdk_pixbuf_new_from_file(). * e-shortcuts.c (class_init): GLIB2-ified. Also use the e-shell-marshal marshallers. (e_shortcuts_new_view): Add missing GTK_SIGNAL_FUNC() cast. * e-shortcuts-view.c: Use GTK_STOCK_* stuff instead of GNOME_STOCK_* stuff. (pop_up_right_click_menu_for_group): Pass self as the for_widget arg to gnome_popup_menu_do_popup_modal(). (pop_up_right_click_menu_for_shortcut): Likewise. (class_init): GLIB2-ified. * e-shell.c: Do not #include <gal/util/e-unicode-i18n.h> or #include <libgnome/gnome-defs.h>. (set_interactive): Use BONOBO_EX_REPOID(). (setup_local_storage): Use _() not U_(). (destroy): Use gtk_widget_destroy() instead of gtk_object_destroy() on priv->settings_dialog. (class_init): GLIB2-ized. (init): Initialize config_listener member. (get_icon_path_for_component_info): Port to bonobo-activation from OAF. (setup_components): Likewise. (destroy): Likewise. (e_shell_construct): Use e_setup_check_config(), not e_setup_check_db (). Use the e_config_listener instead of bonobo-conf. (save_settings_for_views): Likewise. (save_misc_settings): Likewise. (e_shell_restore_from_settings): Likewise. (parse_default_uri): Likewise. (e_shell_component_maybe_crashed): Pass NULL for opt_ev arg to bonobo_unkown_ping() (e_shell_component_maybe_crashed): Use bonobo_engine_deregister_dead_components() instead of bonobo_window_deregister_component_by_ref() which is no more. (e_shell_send_receive): BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). (e_shell_get_config_listener): Return the config_listener. * e-shell-view.c (find_inbox_in_storage): Use _() instead of U_(). (load_images): Pass NULL as the error arg to gdk_pixbuf_new_from_file(). (load_images): Likewise. (find_inbox_in_storage): Work around the lack of g_utf8_strcasecmp() in glib-2.0. (class_init): GLIB2-ified. Also, use the marshallers in e-shell-marshal.h. (pop_up_folder_bar): Use gtk_window_move()/gtk_widget_show() instead gtk_widget_popup(). (unmerge_on_error): Work around the death of bonobo_ui_component_get_win() and bonobo_window_deregister_component_by_ref(). (e_shell_view_construct): Pass NULL as the uic arg to bonobo_window_construct(). Add missing GTK_SIGNAL_FUNC() cast. Match the new BonoboWindow behavior wrt the UIContainer and the new opt_ev args. (display_uri): Use bonobo_ui_engine_freeze() and bonobo_ui_engine_thaw() since bonobo_window_freeze() and bonobo_window_thaw() got axed [sigh]. (e_shell_view_save_settings): Use EConfigListener. (e_shell_view_load_settings): Likewise. (get_view_for_uri): Use bonobo_widget_new_control_from_objref() instead of e_bonobo_widget_new_control_from_objref(). * e-shell-view-menu.c (command_help_faq): Pass NULL for the error arg to gnome_url_show(). (command_about_box): Use GtkDialog instead of a GtkWindow of a type GTK_WINDOW_DIALOG [which does not exist anymore]. (command_xml_dump): Removed. (menu_do_misc): Do not add the corresponding verb. * e-shell-user-creatable-items-handler.c (execute_verb): Use BONOBO_EX_REPOID(). * e-shell-startup-wizard.c: Remove id member from SWData. Replace member db with config_listener. (e_shell_startup_wizard_create): Initialize config_listener. (make_mail_dialog_pages): Do not set the listener id here. (druid_event_notify_cb): Pass FALSE as the help_sensitive arg to gnome_druid_set_buttons_sensitive(). (e_shell_startup_wizard_create): Likewise. (make_mail_dialog_pages): Use bonobo-activation instead of OAF. (get_intelligent_importers): Likewise. (prepare_importer_page): Likewise. (start_importers): Do nothing here for now. (finish_func): Constify local variable displayname. (finish_func): Updated to use the config_listener instead of the bono-conf db. (prepare_importer_page): Do not actually run the importer yet. (e_shell_startup_wizard_create): Pass NULL as the domain arg to glade_xml_new(). Use the config_listener. * e-shell-shared-folder-picker-dialog.c (user_clicked): BONOBO_EX_REPOID() instead of BONOBO_EX_ID(). (setup_name_selector): Likewise. (setup_name_selector): Use bonobo-activation. (show_dialog): Pass NULL as the domain arg to glade_xml_new(). (setup_name_selector): Add a missing GTK_SIGNAL_FUNC() cast. * e-shell-settings-dialog.c: #include <bonobo-activation/bonobo-activation.h>. Use Bonobo_ActivationProperty instead of OAF_Property. (set_dialog_size): Use gtk_style_get_font() to get the font from the widget->style. (load_pages): Converted to use bonobo-activation instead of OAF. Pass NULL as the error arg to gdk_pixbuf_new_from_file(). * e-shell-offline-sync.c (sync_folder): BONOBO_EX_REPOID(), not BONOBO_EX_ID(). (e_shell_offline_sync_all_folders): For now, avoid doing anything [see changes to e-shell-config-offline.c below]. (setup_progress_listener): #if 0 for now. (setup_dialog): Likewise. (sync_folder): Likewise. (cleanup): Likewise. (progress_listener_servant_free): Likewise. (progress_listener_servant_new): Likewise. (impl_SyncFolderProgressListener_updateProgress): Likewise. (impl_SyncFolderProgressListener_reportSuccess): Likewise. (impl_SyncFolderProgressListener_reportFailure): Likewise. (progress_dialog_close_callback): Likewise. (progress_dialog_clicked_callback): Likewise. * e-shell-offline-handler.c (prepare_for_offline): Use BONOBO_EX_REPOID(). (pop_up_confirmation_dialog): Pass NULL as the domain arg to glade_xml_new(). (class_init): GLIB2-ified. * Makefile.am: Do not compile e-shell-importer.c, e-shell-importer.h for now. * e-shell-folder-title-bar.c (get_max_clipped_label_width): Use gtk_style_get_font() to retrieve the font. (class_init): GLIB2-ified. (e_shell_folder_title_bar_construct): Get {x,y}thickness from widget->style, not from widget->style->klass. * e-shell-folder-selection-dialog.c: #include <string.h>, <gtk/gtklabel.h> and <gtk/gtksignal.h>. (class_init): GLIB2-ified. * e-shell-folder-creation-dialog.c: No <libgnome/gnome-defs.h>, add some GTK includes. (e_shell_show_folder_creation_dialog): Pass NULL as the domain arg to glade_xml_new(). Added missing GTK_SIGNAL_FUNC() cast. * e-shell-folder-commands.c: Do not #include <libgnomeui/gnome-stock.h> and #include <bonobo-conf/Bonobo_Config.h>. * e-shell-config-default-folders.c: Replace member db in EvolutionDefaultFolderConfig with config_listener. (e_shell_config_default_folders_create_widget): Init here. (config_control_destroy_cb): Unref here. (config_control_apply_cb): Use EConfigListener instead of BonoboConf. (setup_folder_selector): Likewise. (e_shell_config_default_folders_create_widget): Pass NULL as the domain arg to glade_xml_new(). * e-shell-config-offline.c (config_control_apply_callback): For now, do not change the configuration. [Needs to be ported to EConfigListener or something, but we were storing a sequence using typecodes here and there is no trivial way to do that right now.] (init_storage_set_view_status_from_config): Likewise, do not retrieve the configuration here. svn path=/trunk/; revision=18510
* (ensure_menu_items):Ettore Perazzoli2002-08-011-110/+80
| | | | | | | | | | | Don't sort the menu_items here. (create_menu_xml): Instead, sort here, and only sort the non-default section of the menu. (get_default_action_for_view): Just get the first item that is default; since we don't sort anymore, this works. (find_menu_item_for_verb): Removed since it is not used anymore. svn path=/trunk/; revision=17659
* Pass "contacts" as the @folder_type toEttore Perazzoli2002-08-011-43/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gui/component/addressbook-component.c (add_creatable_item): Pass "contacts" as the @folder_type to evolution_shell_component_add_user_creatable_item(). * gui/component-factory.c (add_creatable_item): New arg @folder_type, pass it to evolution_shell_component_add_user_creatable_item(). (create_object): Set the right folder types for the various user-creatable items. * component-factory.c (create_component): Pass "mail" as @folder_type to evolution_shell_component_add_user_creatable_item(). * evolution-test-component.c (register_component): Pass NULL for @folder_type to evolution_shell_component_add_user_creatable_item(). * e-shell-user-creatable-items-handler.c: New member folder_type in struct MenuItem. (ensure_menu_items): Initialize ->folder_type. (item_is_default): New helper function. (create_menu_xml): New arg @folder_type. Put the items on the top using item_is_default(). (shell_view_view_changed_callback): Pass the folder type to create_menu_xml(). * evolution-shell-component.c: New member folder_type in UserCreatableItemType. (user_creatable_item_type_new): New arg @folder_type. (user_creatable_item_type_free): Free ->folder_type. (evolution_shell_component_add_user_creatable_item): New arg @folder_type. (impl__get_userCreatableItemTypes): Set ->folderType in the returned CORBA structs. * Evolution-ShellComponent.idl: New member folderType in struct UserCreatableItemType. * e-shell-user-creatable-items-handler.c: New member component_id in struct MenuItem. Removed member menu_xml from EShellUserCreatableItemsHandlerPrivate. (init): No need to initialize menu_xml here anymore. (impl_destroy): ...And no need to free here, either. (setup_menu_xml): New, derived from ensure_menu_xml(). This orders the menu so that the items for the current component go at the top. (create_menu_xml): Removed. (e_shell_user_creatable_items_handler_attach_menus): Set up properly for the current component ID, using setup_menu_xml(). svn path=/trunk/; revision=17658
* (ensure_menu_xml): Put inEttore Perazzoli2002-07-271-2/+2
| | | | | | the ComponentItems placeholder, instead of NewItems. svn path=/trunk/; revision=17615
* New arg @tooltip; pass it toEttore Perazzoli2002-07-021-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gui/component/addressbook-component.c (add_creatable_item): New arg @tooltip; pass it to evolution_shell_component_add_user_creatable_item() [which now has a @tooltip arg]. * gui/component-factory.c (add_creatable_item): New arg @tooltip. Pass it to evolution_shell_component_add_user_creatable_item(), which now has a @tooltip arg. (create_object): Added tooltips. * component-factory.c (create_component): Pass a tooltip to evolution_shell_component_add_user_creatable_item. * e-shell-user-creatable-items-handler.c: New member tooltip in struct MenuItem. (ensure_menu_items): Initialize the tooltip member. (shell_view_view_changed_callback): Set the tooltip for the "New" button. (ensure_menu_xml): Set up the tooltip here as well. * evolution-shell-component.c: Add tooltip member to struct UserCreatableItemType. (user_creatable_item_type_new): New arg @tooltip. (evolution_shell_component_add_user_creatable_item): New arg @tooltip. (impl__get_userCreatableItemTypes): Put the tooltip in the struct as well. * e-shell-user-creatable-items-handler.c (setup_toolbar_button): Create a GtkTooltips object and attach it to the combo_button using gtk_object_set_data(). (shell_view_view_changed_callback): Set up a tooltip for the button, according to the default. * Evolution-ShellComponent.idl: Add a tooltip member to struct UserCreatableItemType. svn path=/trunk/; revision=17343
* New member default_menu_item in EShellUserCreatableItemsHandlerPrivate.Ettore Perazzoli2002-05-231-5/+37
| | | | | | | | | | * 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. svn path=/trunk/; revision=16976
* Fix up GList/GSList confusion.Dan Winship2002-03-071-0/+3
| | | | | | | | | | | | * 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. svn path=/trunk/; revision=15954
* Return NULL if there is no component ID for the current view.Ettore Perazzoli2002-02-221-0/+2
| | | | | | | | * e-shell-user-creatable-items-handler.c (get_default_action_for_view): Return NULL if there is no component ID for the current view. svn path=/trunk/; revision=15792
* Set the icons for all the "New..." menu items from the specified one inEttore Perazzoli2002-02-221-11/+10
| | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=15786
* [Implement an Outlook-style "New" dropdown button. It is basicallyEttore Perazzoli2002-01-241-82/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix the license text to make sense.Ettore Perazzoli2001-10-271-1/+0
| | | | svn path=/trunk/; revision=14192
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-271-2/+2
| | | | | | explicitly. svn path=/trunk/; revision=14186
* Studlycapsize all the IDs that are not. Likewise. Updated accordingly.Ettore Perazzoli2001-08-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Evolution-ShellComponent.idl: Studlycapsize all the IDs that are not. * Evolution-common.idl: Likewise. * evolution-activity-client.c: Updated accordingly. * evolution-shell-component.c: Likewise. * evolution-storage.c: Likewise. * e-activity-handler.c: Likewise. * e-component-registry.c: Likewise. * e-corba-storage.c: Likewise. * e-shell-user-creatable-items-handlers.c: Likewise. * e-local-storage.c (remove_folder): Remove unused variable. * e-shell-view.c (update_for_current_uri): Assign zero to `unread_count', not NULL. * e-shell-importer.c (import_druid_finish): Remove unused variable. * e-shell-user-creatable-items-handler.c: #include "e-corba-utils.h". * e-shell-startup-wizard.c: #include "e-shell-startup-wizard.h". * e-shell-startup-wizard.h: #include <glib.h> * e-summary-weather.c (weather_make_html): Make local variable `icon_name' const. Remove unused variable `uri'. * e-summary.h: Reformatted in GTK+ style. (e_summary_remove_online_connection): Added prototype. * e-summary-preferences.c (fill_mail_shown_clist): Constify local variable `name'. * e-summary-mail.c: #include "e-util/e-path.h". Updated to match the new studlyCapsification in shell/Evolution*.idl. * mail-local.c: Match the studlyCapsification of shell/Evolution*.idl. * mail-config-druid.h: Change type of `event_source' from `Bonobo_EventSource *' to `Bonobo_EventSource'. * mail-accounts.c (mail_delete): Remove unused local variable `label'. * folder-info.c (do_get_info): `#if 0' unused variables. * gui/component/addressbook-component.c: Get rid of a warning by initializing the closing NULL element in folder_types correctly. * gui/component/select-names/e-select-names.c: Updated to match the studlyCapsification of attributes in shell/Evolution*.idl. svn path=/trunk/; revision=12495
* [Fix #7775, crash trying to do New Task]Ettore Perazzoli2001-08-231-2/+2
| | | | | | | | * e-shell-user-creatable-items-handler.c (verb_fn): Make sure we don't pass NULL strings to `GNOME_Evolution_ShellComponent_userCreateNewItem()'. svn path=/trunk/; revision=12388
* Only free the `type_list' if not NULL. (setup_menu_xml): Deal with theEttore Perazzoli2001-08-101-16/+26
| | | | | | | | | | | * e-shell-user-creatable-items-handler.c (component_free): Only free the `type_list' if not NULL. (setup_menu_xml): Deal with the case of `type_list' being NULL gracefully. (verb_fn): Same here. (add_verbs_to_ui_component): Likewise. svn path=/trunk/; revision=11873
* Updated to display the parent folder's URI and its type as well.Ettore Perazzoli2001-08-101-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add the menu items using the EShellUserCreatableItemsHandler.Ettore Perazzoli2001-08-101-0/+432
* 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