From 7189f01908c33ad05a462c40c5979b289c3f94ec Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 2 Jul 2002 15:04:14 +0000 Subject: New arg @tooltip; pass it to * 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 --- shell/evolution-shell-component.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shell/evolution-shell-component.c') diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index d03d3ae185..cee0ee7f60 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -49,6 +49,7 @@ struct _UserCreatableItemType { char *id; char *description; char *menu_description; + char *tooltip; char menu_shortcut; GdkPixbuf *icon; }; @@ -96,6 +97,7 @@ static UserCreatableItemType * user_creatable_item_type_new (const char *id, const char *description, const char *menu_description, + const char *tooltip, char menu_shortcut, GdkPixbuf *icon) { @@ -105,6 +107,7 @@ user_creatable_item_type_new (const char *id, type->id = g_strdup (id); type->description = g_strdup (description); type->menu_description = g_strdup (menu_description); + type->tooltip = g_strdup (tooltip); type->menu_shortcut = menu_shortcut; if (icon == NULL) @@ -365,6 +368,7 @@ impl__get_userCreatableItemTypes (PortableServer_Servant servant, corba_type->id = CORBA_string_dup (type->id); corba_type->description = CORBA_string_dup (type->description); corba_type->menuDescription = CORBA_string_dup (type->menu_description); + corba_type->tooltip = CORBA_string_dup (type->tooltip != NULL ? type->tooltip : ""); corba_type->menuShortcut = type->menu_shortcut; e_store_corba_icon_from_pixbuf (type->icon, & corba_type->icon); @@ -1049,6 +1053,7 @@ evolution_shell_component_add_user_creatable_item (EvolutionShellComponent *she const char *id, const char *description, const char *menu_description, + const char *tooltip, char menu_shortcut, GdkPixbuf *icon) { @@ -1063,7 +1068,7 @@ evolution_shell_component_add_user_creatable_item (EvolutionShellComponent *she priv = shell_component->priv; - type = user_creatable_item_type_new (id, description, menu_description, menu_shortcut, icon); + type = user_creatable_item_type_new (id, description, menu_description, tooltip, menu_shortcut, icon); priv->user_creatable_item_types = g_slist_prepend (priv->user_creatable_item_types, type); } -- cgit