From 6feb0b5e5c5f9b9eac7e8dc99a3f3b4f780ee0d4 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 7 Aug 2001 21:13:52 +0000 Subject: [Updated the shortcuts view implementation to set the icons on a per-shortcut basis (instead of a per-URL basis) according to the changes in the EShortcutBar API.] * e-shortcuts-view-model.c (load_group_into_model): Get the icon from the folder type registry. (shortcuts_new_shortcut_cb): Likewise. (shortcuts_update_shortcut_cb): Likewise. * e-shortcuts-view.c (icon_callback): Removed. (e_shortcuts_view_construct): Don't set the icon callback anymore. svn path=/trunk/; revision=11741 --- shell/e-shortcuts-view.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'shell/e-shortcuts-view.c') diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index 2d9956ebce..53a83ff243 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -86,42 +86,6 @@ get_storage_set_path_from_uri (const char *uri) return colon + 1; } -/* Icon callback for the shortcut bar. */ -static GdkPixbuf * -icon_callback (EShortcutBar *shortcut_bar, - const char *uri, - gpointer data) -{ - EFolderTypeRegistry *folder_type_registry; - EShortcuts *shortcuts; - EStorageSet *storage_set; - EFolder *folder; - GdkPixbuf *pixbuf; - const char *type; - - shortcuts = E_SHORTCUTS (data); - - storage_set = e_shortcuts_get_storage_set (shortcuts); - folder_type_registry = e_storage_set_get_folder_type_registry (storage_set); - folder = e_storage_set_get_folder (storage_set, - get_storage_set_path_from_uri (uri)); - - if (folder == NULL) - return NULL; - - type = e_folder_get_type_string (folder); - if (type == NULL) - return NULL; - - /* FIXME mini icons? */ - pixbuf = e_folder_type_registry_get_icon_for_type (folder_type_registry, type, FALSE); - - if (pixbuf != NULL) - gdk_pixbuf_ref (pixbuf); - - return pixbuf; -} - static void show_new_group_dialog (EShortcutsView *view) @@ -671,9 +635,6 @@ e_shortcuts_view_construct (EShortcutsView *shortcuts_view, priv->shortcuts = shortcuts; gtk_object_ref (GTK_OBJECT (priv->shortcuts)); - e_shortcut_bar_set_icon_callback (E_SHORTCUT_BAR (shortcuts_view), icon_callback, - shortcuts); - e_shortcut_bar_set_model (E_SHORTCUT_BAR (shortcuts_view), E_SHORTCUT_MODEL (e_shortcuts_view_model_new (shortcuts))); } -- cgit