Use better icons for home and desktop.
2004-03-08 Anders Carlsson <andersca@gnome.org> * gtk/gtkfilesystemunix.c: (get_icon_for_directory), (gtk_file_system_unix_render_icon): Use better icons for home and desktop.
This commit is contained in:

committed by
Anders Carlsson

parent
11075641e7
commit
683eff48dc
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
|
||||||
|
(gtk_file_system_unix_render_icon):
|
||||||
|
Use better icons for home and desktop.
|
||||||
|
|
||||||
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* gtk/gtkfilechooserentry.c:
|
* gtk/gtkfilechooserentry.c:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
|
||||||
|
(gtk_file_system_unix_render_icon):
|
||||||
|
Use better icons for home and desktop.
|
||||||
|
|
||||||
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* gtk/gtkfilechooserentry.c:
|
* gtk/gtkfilechooserentry.c:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
|
||||||
|
(gtk_file_system_unix_render_icon):
|
||||||
|
Use better icons for home and desktop.
|
||||||
|
|
||||||
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* gtk/gtkfilechooserentry.c:
|
* gtk/gtkfilechooserentry.c:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
|
||||||
|
(gtk_file_system_unix_render_icon):
|
||||||
|
Use better icons for home and desktop.
|
||||||
|
|
||||||
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* gtk/gtkfilechooserentry.c:
|
* gtk/gtkfilechooserentry.c:
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: (get_icon_for_directory),
|
||||||
|
(gtk_file_system_unix_render_icon):
|
||||||
|
Use better icons for home and desktop.
|
||||||
|
|
||||||
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
2004-03-08 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
* gtk/gtkfilechooserentry.c:
|
* gtk/gtkfilechooserentry.c:
|
||||||
|
@ -824,6 +824,25 @@ gtk_file_system_unix_filename_to_path (GtkFileSystem *file_system,
|
|||||||
return gtk_file_path_new_dup (filename);
|
return gtk_file_path_new_dup (filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
get_icon_for_directory (const char *path)
|
||||||
|
{
|
||||||
|
static char *desktop_path = NULL;
|
||||||
|
|
||||||
|
if (!g_get_home_dir ())
|
||||||
|
return "gnome-fs-directory";
|
||||||
|
|
||||||
|
if (!desktop_path)
|
||||||
|
desktop_path = g_build_filename (g_get_home_dir (), "Desktop", NULL);
|
||||||
|
|
||||||
|
if (strcmp (g_get_home_dir (), path) == 0)
|
||||||
|
return "gnome-fs-home";
|
||||||
|
else if (strcmp (desktop_path, path) == 0)
|
||||||
|
return "gnome-fs-desktop";
|
||||||
|
else
|
||||||
|
return "gnome-fs-directory";
|
||||||
|
}
|
||||||
|
|
||||||
static GdkPixbuf *
|
static GdkPixbuf *
|
||||||
gtk_file_system_unix_render_icon (GtkFileSystem *file_system,
|
gtk_file_system_unix_render_icon (GtkFileSystem *file_system,
|
||||||
const GtkFilePath *path,
|
const GtkFilePath *path,
|
||||||
@ -862,7 +881,7 @@ gtk_file_system_unix_render_icon (GtkFileSystem *file_system,
|
|||||||
name = "gnome-fs-chardev";
|
name = "gnome-fs-chardev";
|
||||||
break;
|
break;
|
||||||
case ICON_DIRECTORY:
|
case ICON_DIRECTORY:
|
||||||
name = "gnome-fs-directory";
|
name = get_icon_for_directory (filename);
|
||||||
break;
|
break;
|
||||||
case ICON_EXECUTABLE:
|
case ICON_EXECUTABLE:
|
||||||
name ="gnome-fs-executable";
|
name ="gnome-fs-executable";
|
||||||
|
Reference in New Issue
Block a user