Custom names for volumes



Hi; I try to be quick. I'm using Nautilus 2.2.4 in Gentoo, and I'm very
happy with it. However, there is something I would love to do.

In the desktop, if you want to mount a volume, you right-click on the
desktop and select the desired volume in the sub-menu "Disks". If you
can mount the CD or the floppy, the labels "CD-ROM" and "Floppy"
appears. However, if you can mount any other thing (like "/mnt/usb" for
my USB key drive, or "/mnt/burner" for my CD-RW), then the label is the
name of the directory (without full path) that appears in /etc/fstab.

By means of a quick grep in the Nautilus source code, I found this:

static GHashTable *
create_readable_mount_point_name_table (void)
{
        GHashTable *table;
         
        table = g_hash_table_new (g_str_hash, g_str_equal);
         
        /* Populate table with items we know localized names for. */
        g_hash_table_insert (table, "floppy", _("Floppy"));
        g_hash_table_insert (table, "cdrom", _("CD-ROM"));
        g_hash_table_insert (table, "zip", _("Zip Drive"));
         
        return table;
}

(libnautilus-private/nautilus-volume-monitor.c, lines 795-808)

I want to set up custom names for these volumes, like "USB Key Drive"
and "CD-RW" or "CD Burner". Right now I just recompile Nautilus with my
custom names; but I'm wondering if there is another way of doing it,
like a configuration file or a gconf key that I can modify.

I know it's silly, but it would be cool ;)

Canek





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]