From 4139f5b3ccabe156364d1999b793804094ac707d Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 9 Jul 2002 19:49:15 +0000 Subject: If the custom_icon_name is not NULL, return the pixbuf for it. * e-shortcuts-view-model.c (get_icon_for_item): If the custom_icon_name is not NULL, return the pixbuf for it. * e-storage-set-view.c: #include "e-icon-factory.h". * e-shortcuts-view.c (impl_shortcut_dropped): Pass the custom_icon_name. (get_shortcut_info): New arg @custom_icon_name_return. (rename_shortcut_cb): Pass the custom_icon_name here. * e-shell-view-menu.c (new_shortcut_dialog_folder_selected_cb): Pass the custom_icon_name for the folder's shortcut. * e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar): Pass the custom_icon_name for the folder's shortcut. * e-corba-shortcuts.c (impl_add): Use the customIconName member in struct ::Shortcuts::Shortcut. (shorcut_list_to_corba): Set the customIconName member on the returned shortcuts. (impl_get): Likewise. * Evolution-Shortcuts.idl: New member customIconName in struct Shortcut. * e-shortcuts.c (shortcut_item_new): New arg @custom_icon_name; initialize the member in EShortcutItem from it. (shortcut_item_update): New arg @custom_icon_name; set the custom_icon_name from it. Also remove some braindeadness from this code. (update_shortcut_and_emit_signal): New arg @custom_icon_name. (load_shortcuts): Load the custom icon name from the XML [eg. ]. (save_shortcuts): Save the custom icon name in the XML. (e_shortcuts_add_shortcut): New arg @custom_icon_name. (update_shortcuts_by_path): Pass the custom_icon_name to update_shortcut_and_emit_signal(). (e_shortcuts_update_shortcut): New arg @custom_icon_name; pass it to update_shortcut_and_emit_signal(). (e_shortcuts_add_default_group): Pass "inbox" as the custom_icon_name for the inbox shortcut, and NULL for the other shortcuts. * e-shortcuts.h: New member custom_icon_name in EShortcutItem. svn path=/trunk/; revision=17394 --- shell/e-shortcuts.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'shell/e-shortcuts.h') diff --git a/shell/e-shortcuts.h b/shell/e-shortcuts.h index a50e726a4a..065d23f9b2 100644 --- a/shell/e-shortcuts.h +++ b/shell/e-shortcuts.h @@ -55,6 +55,10 @@ struct _EShortcutItem { folder, this is NULL. */ char *type; + /* Custom icon for the shortcut. If this is NULL, then the shortcut + should just use the icon for the type. */ + char *custom_icon_name; + /* Number of unread items in the folder. Zero if not a folder. */ int unread_count; }; @@ -123,14 +127,16 @@ void e_shortcuts_add_shortcut (EShortcuts *shortcuts, const char *uri, const char *name, int unread_count, - const char *type); + const char *type, + const char *custom_icon_name); void e_shortcuts_update_shortcut (EShortcuts *shortcuts, int group_num, int num, const char *uri, const char *name, int unread_count, - const char *type); + const char *type, + const char *custom_icon_name); void e_shortcuts_remove_group (EShortcuts *shortcuts, int group_num); -- cgit v1.2.3