create and add an icon to the trashcan

This commit is contained in:
Jonathan Blandford 2000-07-03 18:25:45 +00:00
parent 3ef74fbe2b
commit 451c2af563
4 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2000-07-03 Jonathan Blandford <jrb@redhat.com>
* gdesktop-init.c (gdesktop_links_init): set the initial icon of
the trashcan, and make the trashcan.
2000-06-20 Jacob Berkman <jacob@helixcode.com>
* gtkdtree.c (gtk_dtree_construct):

View File

@ -139,13 +139,23 @@ desktop_init_at (const char *dir)
void
gdesktop_links_init (void)
{
char *home_link_name;
char *link_name;
char *icon;
char *dir;
/* Create the link to the user's home directory so that he will have an icon */
home_link_name = g_concat_dir_and_file (desktop_directory, _("Home directory"));
mc_symlink (gnome_user_home_dir, home_link_name);
g_free (home_link_name);
link_name = g_concat_dir_and_file (desktop_directory, _("Home directory"));
mc_symlink (gnome_user_home_dir, link_name);
g_free (link_name);
/* Create the link to the user's trash directory */
link_name = g_concat_dir_and_file (desktop_directory, "Trash");
icon = gnome_pixmap_file ("mc/gnome-trashcan.png");
mc_mkdir (link_name, S_IRUSR | S_IWUSR | S_IXUSR );
if (icon)
gnome_metadata_set (link_name, "icon-filename", strlen (icon) + 1, icon);
g_free (icon);
g_free (link_name);
/* Create custom links */

View File

@ -64,6 +64,7 @@ ALLICONS = \
gnome-objectfile.png \
gnome-textfile.png \
gnome-tex.png \
gnome-trashcan.png \
gnome-text-x-authors.png \
gnome-text-x-copying.png \
gnome-text-x-credits.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB