Commit a8cb20a8 authored by Andy Hertzfeld's avatar Andy Hertzfeld

fixed problem where sounds with special characters in their filename


        fixed problem where sounds with special characters in their filename
	wouldn't preview properly; also, replace the computer link icon with
	a more generic, vector-based one and upgraded the open folder to
	one with gradients
parent 9b12eaef
2000-06-01 Andy Hertzfeld <andy@eazel.com>
* src/file-manager/fm-icon-view.c: (play_file):
fixed bug where sounds that had spaces or other special characters
in their name wouldn't preview properly; fixed by calling
gnome_vfs_unescape_string on the uri.
* icons/Makefile.am:
* icons/computer.svg:
added a more generic, vector-based computer icon
* data/top/Computer.link:
switched the computer link to use the vector icon
* icons/eazel/i-directory-accept.svg:
changed the open folder icon to use a nicer one with gradients
2000-06-01 Darin Adler <darin@eazel.com>
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
......
<?xml version="1.0"?>
<NAUTILUS_OBJECT CUSTOM_ICON="computer.png" LINK="hardware:overview"/>
<NAUTILUS_OBJECT CUSTOM_ICON="computer.svg" LINK="hardware:overview"/>
......@@ -10,6 +10,7 @@ icon_DATA =\
backgrounds.png \
colors.png \
computer.png \
computer.svg \
eazel-logo.gif \
emblem-certified.gif \
emblem-changed.gif \
......
<svg width="182" height="164">
<!-- AgenericPC.eps converted by ill2svg.pl -->
<defs>
<linearGradient id="Rainbow__1"
x1="129.587" y1="54.849" x2="20.599" y2="54.849"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__2"
x1="47.911" y1="76.79" x2="-6.643" y2="31.013"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__3"
x1="195.563" y1="99.745" x2="119.732" y2="36.115"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__4"
x1="95.746" y1="159.514" x2="88.121" y2="116.267"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__5"
x1="98.093" y1="140.878" x2="98.093" y2="163.703"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__6"
x1="38.647" y1="145.507" x2="17.747" y2="145.507"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__7"
x1="98.272" y1="108.062" x2="48.222" y2="108.062"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__8"
x1="90.643" y1="141.895" x2="47.988" y2="91.06"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Rainbow__9"
x1="123.347" y1="66.724" x2="135.722" y2="66.724"
>
<stop offset="0%" style="stop-color:#d1d1ba"/>
<stop offset="100%" style="stop-color:#ffffff"/>
</linearGradient>
<linearGradient id="Red_Yellow__1"
x1="114.805" y1="81.4" x2="37.691" y2="16.693"
>
<stop offset="2%" style="stop-color:#e5f2f9"/>
<stop offset="99%" style="stop-color:#006b8e"/>
</linearGradient>
</defs>
<g> <!-- Layer: Layer 1 -->
<g style="fill: #000000">
<path d="M23.823 1.502C28.06 0.089 122.118 1.502 124.823 1.502C127.023 1.502 126.823 16.502 126.823 16.502C126.823 16.502 180.957 16.268 181.323 17.002C182.374 19.104 181.931 112.872 181.149 115.219C180.782 116.319 141.182 118.519 138.982 118.519C136.782 118.519 121.159 102.345 120.073 102.752C118.073 103.502 98.787 105.707 96.823 105.502C102.098 106.051 116.829 114.325 112.823 121.002C112.783 121.07 138.836 120.006 140.323 120.502C143.99 121.724 162.49 137.335 164.323 141.002C165.057 142.469 164.057 150.902 163.323 152.002C161.677 154.472 40.039 167.911 34.323 163.502C27.907 158.552 19.557 144.335 18.823 142.502C18.09 140.668 19.457 129.502 19.823 129.502C20.19 129.502 33.857 127.368 35.323 127.002C36.79 126.635 26.69 124.835 26.323 117.502C25.957 110.168 31.573 108.502 35.823 107.002C38.01 106.23 28.722 107.683 25.073 106.252C12.323 101.252 1.19 91.469 0.823 90.002C-0.374 85.211 0.088 23.738 1.823 22.002C2.557 21.268 14.457 19.469 14.823 18.002C15.039 17.138 15.323 6.502 15.323 6.502C15.323 6.502 22.723 1.868 23.823 1.502z"/>
<!-- 0 -26540.763 0 0 108.7166 26833.3368 381.9315 Bc -->
<!-- -108.9881 0 0 108.7166 292.5738 381.9315 Bm -->
<!-- -26540.763 0 0 108.7166 183.5857 381.9315 Bc -->
</g>
<g style="fill: url(#Rainbow__1)">
<path d="M25.865 102.019C25.048 101.952 25.865 7.785 26.231 5.952C26.231 5.952 69.323 3.752 122.665 5.952C123.824 5.999 125.239 96.906 124.132 97.252C106.532 102.752 46.031 103.669 25.865 102.019z"/>
<!-- 0 -20331.3051 17060.1715 69.0049 82.2359 20572.1407 -16692.4676 Bc -->
<!-- -74.8004 62.7656 69.0049 82.2359 240.8355 367.7039 Bm -->
<!-- -20331.3051 17060.1715 69.0049 82.2359 166.0352 430.4695 Bc -->
</g>
<g style="fill: url(#Red_Yellow__1)">
<path d="M40.542 20.88C39.054 22.615 39.429 84.325 41.62 83.405C40.924 85.073 110.516 82.685 111.298 80.752C115.004 81.189 113.855 19.623 112.408 20.162C113.855 18.127 39.054 19.623 40.542 20.88z"/>
<!-- 0 -20331.3066 17060.1727 54.5199 64.9736 20514.5303 -16679.9297 Bc -->
<!-- -54.5538 45.7765 54.5199 64.9736 183.2237 380.243 Bm -->
<!-- -20331.3066 17060.1727 54.5199 64.9736 128.6699 426.0195 Bc -->
</g>
<g style="fill: url(#Rainbow__2)">
<path d="M22.573 6.752C22.573 6.752 22.149 98.75 22.323 100.252C22.586 102.518 3.823 90.252 5.077 88.952C4.159 89.904 4.748 26.115 5.323 25.252C6.323 23.752 14.499 22.077 16.323 21.752C18.365 21.388 17.361 21.852 17.361 17.727C17.361 13.677 18.073 9.252 18.073 9.252L22.573 6.752z"/>
<!-- 0 -20331.3101 17060.1701 66.8944 79.7209 20656.7841 -16709.3193 Bc -->
<!-- -75.8309 63.6303 66.8944 79.7209 325.474 350.8508 Bm -->
<!-- -20331.3101 17060.1701 66.8944 79.7209 249.6431 414.4811 Bc -->
</g>
<g style="fill: url(#Rainbow__3)">
<path d="M138.432 20.802C138.432 22.635 138.167 113.01 138.823 113.502C141.023 115.152 175.857 112.235 177.323 111.502C178.79 110.768 177.323 21.502 177.323 21.502L138.432 20.802z"/>
<!-- 0 -4608.6814 26137.6228 137.8692 24.3096 4799.1411 -25819.1611 Bc -->
<!-- -7.6254 43.2467 137.8692 24.3096 190.4597 318.4616 Bm -->
<!-- -4608.6814 26137.6228 137.8692 24.3096 182.8342 361.7083 Bc -->
</g>
<g style="fill: url(#Rainbow__4)">
<path d="M26.823 133.002C26.457 140.519 38.323 151.502 38.323 151.502C39.573 153.002 156.123 142.702 158.323 140.502C159.473 139.352 146.892 126.743 141.915 124.752C140.082 124.019 94.065 124.752 73.898 126.219C53.732 127.686 26.93 130.804 26.823 133.002z"/>
<!-- 0 0 -26540.761 -134.5272 0 329.0934 26889.896 Bc -->
<!-- 0 -22.825 -134.5272 0 329.0934 349.135 Bm -->
<!-- 0 -26540.761 -134.5272 0 329.0934 326.3101 Bc -->
</g>
<g style="fill: url(#Rainbow__5)">
<path d="M36.865 154.819C36.9 155.137 35.966 159.939 37.048 160.136C45.115 161.603 153.971 151.045 160.249 148.952C161.349 148.586 161.694 143.343 160.249 144.186C158.049 145.469 107.173 150.144 100.848 150.969C94.524 151.794 36.956 155.642 36.865 154.819z"/>
</g>
<g style="fill: #ffffff">
<path d="M52.998 128.602"/>
<!-- 0 -26540.7533 0 0 34.8792 26742.3872 325.6477 Bc -->
<!-- -20.9 0 0 34.8792 201.6338 325.6477 Bm -->
<!-- -26540.7533 0 0 34.8792 180.7339 325.6477 Bc -->
</g>
<g style="fill: url(#Rainbow__6)">
<path d="M23.206 133.873C22.106 136.073 22.853 139.239 22.565 140.336C21.648 143.819 33.015 158.852 35.948 159.952C35.948 159.952 36.132 154.497 36.315 154.636C33.473 152.482 25.315 141.986 23.848 136.623"/>
<!-- 0 -26540.7615 0 0 14.7583 26802.0202 374.1396 Bc -->
<!-- -50.0499 0 0 14.7583 261.2588 374.1396 Bm -->
<!-- -26540.7615 0 0 14.7583 211.2088 374.1396 Bc -->
</g>
<g style="fill: url(#Rainbow__7)">
<path d="M53.498 106.419C55.715 108.636 65.048 111.461 72.748 111.185C80.448 110.911 90.532 108.985 92.732 105.502C92.536 105.812 85.765 106.052 78.065 106.602C73.37 106.938 61.29 106.785 59.365 106.785C57.44 106.785 53.498 106.419 53.498 106.419z"/>
<!-- 0 -17060.1686 20331.3099 53.1575 44.6049 17287.3378 -20005.3952 Bc -->
<!-- -42.6559 50.8348 53.1575 44.6049 227.1692 325.9147 Bm -->
<!-- -17060.1686 20331.3099 53.1575 44.6049 184.5132 376.7496 Bc -->
</g>
<g style="fill: url(#Rainbow__8)">
<path d="M47.323 106.502C44.088 106.882 35.913 110.01 33.931 111.552C30.618 114.129 30.448 117.052 33.198 119.802C35.948 122.552 42.273 125.852 44.473 126.127C46.673 126.402 71.973 122.552 80.498 122.552C89.023 122.552 105.198 121.002 106.573 121.002C107.948 121.002 110.802 118.55 106.323 114.502C101.557 110.193 96.448 107.752 95.073 107.752C94.34 107.752 91.698 112.285 82.073 113.752C76.037 114.672 73.973 115.418 66.823 114.502C61.307 113.795 57.032 112.877 51.073 108.752"/>
<!-- 0 26540.7672 0 0 -101.1985 -26254.4335 474.0886 Bc -->
<!-- 12.375 0 0 -101.1985 286.3337 474.0886 Bm -->
<!-- 26540.7672 0 0 -101.1985 298.7087 474.0886 Bc -->
</g>
<g style="fill: url(#Rainbow__9)">
<path d="M126.515 20.802C126.515 22.921 127.982 95.419 126.974 98.902C126.668 99.959 124.774 100.277 123.949 100.552C123.124 100.827 133.448 109.96 134.823 111.335C136.198 112.71 134.215 21.985 134.49 20.335C134.494 20.311 130.365 20.985 127.799 20.802"/>
</g>
</g>
</svg>
<svg width="70" height="42">
<!-- Open folder 1.eps converted by ill2svg.pl -->
<g style="fill: #000000">
<path d="M9.54 41.4L60.9 41.4C60.9 41.4 69.156 12.216 69.348 11.544C69.54 10.872 69.924 9.816 68.916 9.048C68.366 8.628 66.852 8.568 65.316 8.664C63.78 8.76 52.26 8.664 52.26 8.664C52.26 8.664 52.452 6.552 51.684 5.88C50.916 5.208 50.244 4.728 46.884 4.824C43.524 4.92 22.884 4.824 22.884 4.824C22.884 4.824 22.404 5.4 21.54 4.056C20.676 2.712 19.908 0.792 18.948 0.696C17.988 0.6 6.468 0.696 6.468 0.696C6.468 0.696 5.06 0.696 4.772 2.04C4.484 3.384 4.459 4.253 4.164 4.632C3.716 5.208 3.14 4.984 2.468 5.08C1.796 5.176 0.196 4.92 0.132 6.552C0.076 7.994 2.148 14.616 2.244 15.288C2.34 15.96 9.54 41.4 9.54 41.4z"/>
</g>
<g style="fill: #ffffc0; stroke:#000000; stroke-width:0.6">
<path d="M10.5 40.056L17.86 13.88C17.86 13.88 18.228 12.504 19.588 12.6C20.61 12.672 37.38 12.664 37.892 12.664C38.404 12.664 38.9 12.081 40.068 10.936C41.652 9.384 42.308 9.848 43.396 9.784C44.355 9.728 67.012 9.848 67.012 9.848C67.012 9.848 68.292 10.104 68.036 11.064C67.78 12.024 59.716 40.184 59.716 40.184L10.5 40.056z"/>
</g>
<g style="fill: #ffc040; stroke:#000000; stroke-width:0.6">
<path d="M9.732 37.08C9.732 37.08 16.26 13.656 16.452 13.272C16.644 12.888 17.268 11.352 18.468 11.256C19.138 11.202 37.476 11.256 37.476 11.256C37.476 11.256 37.956 11.544 39.3 10.008C40.644 8.472 40.932 8.472 45.348 8.472C49.764 8.472 51.012 8.568 51.012 8.568C51.012 8.568 51.108 7.608 50.82 7.032C50.532 6.456 50.244 6.072 48.228 6.072C46.212 6.072 23.076 6.072 22.5 6.072C21.924 6.072 20.868 6.264 20.1 4.92C19.332 3.576 19.236 1.944 17.412 1.944C15.588 1.944 6.756 1.944 6.756 1.944C6.756 1.944 6.116 1.976 5.924 2.552C5.732 3.128 5.732 4.728 5.156 5.4C4.58 6.072 4.563 5.978 3.62 6.072C2.66 6.168 1.476 6.04 1.476 7.224C1.476 8.664 9.732 37.08 9.732 37.08z"/>
<defs>
<linearGradient id="Red_Yellow_copy__1"
x1="47.335" y1="45.742" x2="32.272" y2="6.498"
>
<stop offset="6%" style="stop-color:#f2cc0c"/>
<stop offset="83%" style="stop-color:#fff2ea"/>
</linearGradient>
<linearGradient id="Red_Yellow_copy__2"
x1="32.045" y1="25.082" x2="15.103" y2="-4.263"
>
<stop offset="6%" style="stop-color:#f2cc0c"/>
<stop offset="83%" style="stop-color:#fff2ea"/>
</linearGradient>
</defs>
<g> <!-- Layer: Layer 1 -->
<g style="fill: #000000">
<path d="M9.54 41.4L60.9 41.4C60.9 41.4 69.156 12.216 69.348 11.544C69.54 10.872 69.924 9.816 68.916 9.048C68.366 8.628 66.852 8.568 65.316 8.664C63.78 8.76 52.26 8.664 52.26 8.664C52.26 8.664 52.452 6.552 51.684 5.88C50.916 5.208 50.244 4.728 46.884 4.824C43.524 4.92 22.884 4.824 22.884 4.824C22.884 4.824 22.404 5.4 21.54 4.056C20.676 2.712 19.908 0.792 18.948 0.696C17.988 0.6 6.468 0.696 6.468 0.696C6.468 0.696 5.06 0.696 4.772 2.04C4.484 3.384 4.459 4.253 4.164 4.632C3.716 5.208 3.14 4.984 2.468 5.08C1.796 5.176 0.196 4.92 0.132 6.552C0.076 7.994 2.148 14.616 2.244 15.288C2.34 15.96 9.54 41.4 9.54 41.4z"/>
<!-- 0 -1660.0518 4325.0081 61.8255 23.7303 1894.5632 -3953.2794 Bc -->
<!-- -11.5986 30.2183 61.8255 23.7303 234.5114 371.7286 Bm -->
<!-- -1660.0518 4325.0081 61.8255 23.7303 222.9128 401.947 Bc -->
</g>
<g style="fill: url(#Red_Yellow_copy__1); stroke: #000000; stroke-width: 0.6; stroke-miterlimit: 4">
<path d="M10.5 40.056L17.86 13.88C17.86 13.88 18.228 12.504 19.588 12.6C20.61 12.672 37.38 12.664 37.892 12.664C38.404 12.664 38.9 12.081 40.068 10.936C41.652 9.384 42.308 9.848 43.396 9.784C44.355 9.728 67.012 9.848 67.012 9.848C67.012 9.848 68.292 10.104 68.036 11.064C67.78 12.024 59.716 40.184 59.716 40.184L10.5 40.056"/>
<!-- 2 -2316.3048 4012.0694 45.1913 26.0905 2543.7461 -3621.4498 Bc -->
<!-- -13.0458 22.5966 45.1913 26.0905 227.4413 390.6196 Bm -->
<!-- -2316.3048 4012.0694 45.1913 26.0905 214.3955 413.2162 Bc -->
</g>
<g style="fill: url(#Red_Yellow_copy__2); stroke: #000000; stroke-width: 0.6; stroke-miterlimit: 4">
<path d="M9.732 37.08C9.732 37.08 16.26 13.656 16.452 13.272C16.644 12.888 17.268 11.352 18.468 11.256C19.138 11.202 37.476 11.256 37.476 11.256C37.476 11.256 37.956 11.544 39.3 10.008C40.644 8.472 40.932 8.472 45.348 8.472C49.764 8.472 51.012 8.568 51.012 8.568C51.012 8.568 51.108 7.608 50.82 7.032C50.532 6.456 50.244 6.072 48.228 6.072C46.212 6.072 23.076 6.072 22.5 6.072C21.924 6.072 20.868 6.264 20.1 4.92C19.332 3.576 19.236 1.944 17.412 1.944C15.588 1.944 6.756 1.944 6.756 1.944C6.756 1.944 6.116 1.976 5.924 2.552C5.732 3.128 5.732 4.728 5.156 5.4C4.58 6.072 4.563 5.978 3.62 6.072C2.66 6.168 1.476 6.04 1.476 7.224C1.476 8.664 9.732 37.08 9.732 37.08"/>
</g>
</g>
</svg>
......@@ -44,6 +44,7 @@
#include <gtk/gtkwindow.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-xfer.h>
#include <libgnomevfs/gnome-vfs-async-ops.h>
#include <libnautilus/nautilus-bonobo-ui.h>
......@@ -1106,9 +1107,15 @@ icon_container_activate_callback (NautilusIconContainer *container,
static gint play_file(NautilusFile *file)
{
char *file_uri, *mime_type;
char *file_uri, *file_path, *mime_type;
file_uri = nautilus_file_get_uri(file);
gnome_vfs_unescape_string(file_uri);
if (nautilus_str_has_prefix(file_uri, "file://"))
file_path = file_uri + 7;
else
file_path = file_uri;
mime_type = nautilus_file_get_mime_type(file);
mp3_pid = fork ();
......@@ -1116,10 +1123,9 @@ static gint play_file(NautilusFile *file)
/* set the group (session) id to this process for future killing */
setsid();
if (!nautilus_strcmp(mime_type, "audio/x-mp3"))
execlp ("mpg123", "mpg123", "-q", file_uri + 7, NULL);
execlp ("mpg123", "mpg123", "-q", file_path, NULL);
else
execlp ("play", "play", file_uri + 7, NULL);
execlp ("play", "play", file_path, NULL);
_exit (0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment