diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-14 09:32:19 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-14 09:32:19 +0800 |
commit | 7198aa064a8fc90389087c6704149e19bee51a43 (patch) | |
tree | 585f055ab291bf5e21626ceb32ed740a44e65d0b /shell/e-shortcuts.c | |
parent | 8dea04ca5e0bef9db235e7f2e44a23b61be24e0f (diff) | |
download | gsoc2013-evolution-7198aa064a8fc90389087c6704149e19bee51a43.tar.gz gsoc2013-evolution-7198aa064a8fc90389087c6704149e19bee51a43.tar.zst gsoc2013-evolution-7198aa064a8fc90389087c6704149e19bee51a43.zip |
Initial implementation of the tree view for the folders.
svn path=/trunk/; revision=3020
Diffstat (limited to 'shell/e-shortcuts.c')
-rw-r--r-- | shell/e-shortcuts.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index da8326f9a6..dcc9383638 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -311,8 +311,6 @@ icon_callback (EShortcutBar *shortcut_bar, EFolder *folder; GdkPixbuf *pixbuf; const char *type; - const char *icon_name; - char *icon_path; shortcuts = E_SHORTCUTS (data); @@ -329,26 +327,9 @@ icon_callback (EShortcutBar *shortcut_bar, if (type == NULL) return NULL; - icon_name = e_folder_type_repository_get_icon_for_type (folder_type_repository, type); - if (icon_name == NULL) - return NULL; - - if (g_path_is_absolute (icon_name)) - icon_path = g_strdup (icon_name); - else { - icon_path = gnome_pixmap_file (icon_name); - if (icon_path == NULL) - icon_path = g_concat_dir_and_file (EVOLUTION_IMAGES, icon_name); - } - - if (icon_path == NULL) - return NULL; - - /* FIXME this sucks sucks sucks sucks. We need some caching. Probably - it's better if EFolderTypeRepository returns a GdkPixbuf directly. */ - pixbuf = gdk_pixbuf_new_from_file (icon_path); - - g_free (icon_path); + pixbuf = e_folder_type_repository_get_icon_for_type (folder_type_repository, type); + if (pixbuf != NULL) + gdk_pixbuf_ref (pixbuf); return pixbuf; } |