summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <david@fubar.dk>2004-09-24 22:27:20 +0000
committerDavid Zeuthen <david@fubar.dk>2004-09-24 22:27:20 +0000
commit09136b7035d9deb64d9b7509e834a2482bd0abf5 (patch)
treeb7a80ebf1e26618ecae0dabd0f842da7f3ec4238
parent2526eea0b6d84cfea373ef67ec4353b8352901f3 (diff)
Added fr to ALL_LINGUAS
Added french translations from Jérôme Lodewyck <lodewyck@clipper.ens.fr> Add prototypes for new functions hal_drive_(requires_eject|get_dedication_icon_(drive|volume)). Remove printf debug statement. (hal_drive_get_dedicated_icon_drive): New function (hal_drive_get_dedicated_icon_volume): New function (hal_drive_from_udi): Read storage.icon.* and storage.requires_eject (hal_drive_requires_eject): New function Add and set boolean property storage.requires_eject; right now we only add it for optical drives. Interestingly enough, my iPod Mini requires to be ejected as well (see RH bug #132195 for some discussion). Add docs for storage.requires_eject, storage.icon.drive and storage.icon.volume
-rw-r--r--ChangeLog26
-rw-r--r--configure.in2
-rw-r--r--doc/spec/hal-spec.html91
-rw-r--r--doc/spec/hal-spec.xml.in37
-rw-r--r--hald/linux/block_class_device.c13
-rw-r--r--libhal-storage/libhal-storage.c28
-rw-r--r--libhal-storage/libhal-storage.h5
-rw-r--r--po/ChangeLog5
-rw-r--r--po/fr.po138
9 files changed, 319 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 49867b04..aeb35f74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2004-09-25 David Zeuthen <david@fubar.dk>
+
+ * configure.in: Added fr to ALL_LINGUAS
+
+ * po/fr.op: Added french translations from Jérôme Lodewyck
+ <lodewyck@clipper.ens.fr>
+
+ * libhal-storage/libhal-storage.h: Add prototypes for new functions
+ hal_drive_(requires_eject|get_dedication_icon_(drive|volume)).
+
+ * libhal-storage/libhal-storage.c (hal_storage_policy_lookup_icon):
+ Remove printf debug statement.
+ (hal_drive_get_dedicated_icon_drive): New function
+ (hal_drive_get_dedicated_icon_volume): New function
+ (hal_drive_from_udi): Read storage.icon.* and storage.requires_eject
+ (hal_drive_requires_eject): New function
+
+ * hald/linux/block_class_device.c (block_class_pre_process): Add
+ and set boolean property storage.requires_eject; right now we
+ only add it for optical drives. Interestingly enough, my iPod Mini
+ requires to be ejected as well (see RH bug #132195 for some
+ discussion).
+
+ * doc/spec/hal-spec.xml.in: Add docs for storage.requires_eject,
+ storage.icon.drive and storage.icon.volume
+
2004-09-24 David Zeuthen <david@fubar.dk>
* libhal-storage/libhal-storage.c :
diff --git a/configure.in b/configure.in
index 9842b80c..dd92e64c 100644
--- a/configure.in
+++ b/configure.in
@@ -372,7 +372,7 @@ else
fi
-ALL_LINGUAS="da"
+ALL_LINGUAS="da fr"
AC_SUBST(ALL_LINGUAS)
GETTEXT_PACKAGE=AC_PACKAGE_NAME
diff --git a/doc/spec/hal-spec.html b/doc/spec/hal-spec.html
index 2bd2f185..a336d08d 100644
--- a/doc/spec/hal-spec.html
+++ b/doc/spec/hal-spec.html
@@ -400,21 +400,21 @@ HREF="#dbus-api"
><DL
><DT
><A
-HREF="#AEN1852"
+HREF="#AEN1872"
>Interface org.freedesktop.Hal.Manager</A
></DT
><DD
><DL
><DT
><A
-HREF="#AEN1863"
+HREF="#AEN1883"
>Example</A
></DT
></DL
></DD
><DT
><A
-HREF="#AEN1871"
+HREF="#AEN1891"
>Interface org.freedesktop.Hal.Device</A
></DT
></DL
@@ -4371,6 +4371,19 @@ CLASS="literal"
><TD
><TT
CLASS="literal"
+>storage.requires_eject</TT
+> (bool)</TD
+><TD
+>&nbsp;</TD
+><TD
+>Yes</TD
+><TD
+>The eject ioctl is required to properly eject the media</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
>storage.hotpluggable</TT
> (bool)</TD
><TD
@@ -4527,6 +4540,52 @@ CLASS="literal"
><TD
>The revision of the firmware of the drive</TD
></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>storage.icon.drive</TT
+> (string)</TD
+><TD
+>&nbsp;</TD
+><TD
+>No</TD
+><TD
+>&#13; Name of icon to use for displaying the drive. The name
+ must comply with freedesktop.org icon-theme specification
+ and must not be an absolute path.
+
+ This property exists such that e.g. OEM's can install
+ icons in <TT
+CLASS="literal"
+>/usr/share/icons/hicolor</TT
+>
+ a device information file matching their device.
+ </TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>storage.icon.volume</TT
+> (string)</TD
+><TD
+>&nbsp;</TD
+><TD
+>No</TD
+><TD
+>&#13; Name of icon to use for displaying volumes from the drive.
+ The name must comply with freedesktop.org icon-theme
+ specification and must not be an absolute path.
+
+ This property exists such that e.g. OEM's can install
+ icons in <TT
+CLASS="literal"
+>/usr/share/icons/hicolor</TT
+>
+ a device information file matching their device.
+ </TD
+></TR
></TBODY
></TABLE
><P
@@ -4568,7 +4627,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1399"
+NAME="AEN1419"
></A
><TABLE
BORDER="1"
@@ -4767,7 +4826,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1479"
+NAME="AEN1499"
></A
><TABLE
BORDER="1"
@@ -4921,7 +4980,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1537"
+NAME="AEN1557"
></A
><TABLE
BORDER="1"
@@ -5052,7 +5111,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1579"
+NAME="AEN1599"
></A
><TABLE
BORDER="1"
@@ -5125,7 +5184,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1601"
+NAME="AEN1621"
></A
><TABLE
BORDER="1"
@@ -5192,7 +5251,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1621"
+NAME="AEN1641"
></A
><TABLE
BORDER="1"
@@ -5257,7 +5316,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1641"
+NAME="AEN1661"
></A
><TABLE
BORDER="1"
@@ -5384,7 +5443,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1685"
+NAME="AEN1705"
></A
><TABLE
BORDER="1"
@@ -5531,7 +5590,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1733"
+NAME="AEN1753"
></A
><TABLE
BORDER="1"
@@ -5885,7 +5944,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1810"
+NAME="AEN1830"
></A
><TABLE
BORDER="1"
@@ -6045,7 +6104,7 @@ CLASS="sect1"
><HR><H2
CLASS="sect1"
><A
-NAME="AEN1852"
+NAME="AEN1872"
>Interface org.freedesktop.Hal.Manager</A
></H2
><P
@@ -6161,7 +6220,7 @@ CLASS="sect2"
><HR><H3
CLASS="sect2"
><A
-NAME="AEN1863"
+NAME="AEN1883"
>Example</A
></H3
><P
@@ -6279,7 +6338,7 @@ CLASS="sect1"
><HR><H2
CLASS="sect1"
><A
-NAME="AEN1871"
+NAME="AEN1891"
>Interface org.freedesktop.Hal.Device</A
></H2
><P
diff --git a/doc/spec/hal-spec.xml.in b/doc/spec/hal-spec.xml.in
index cee970f5..303e60bb 100644
--- a/doc/spec/hal-spec.xml.in
+++ b/doc/spec/hal-spec.xml.in
@@ -2148,6 +2148,12 @@
<entry>Media can be removed from the storage device</entry>
</row>
<row>
+ <entry><literal>storage.requires_eject</literal> (bool)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>The eject ioctl is required to properly eject the media</entry>
+ </row>
+ <row>
<entry><literal>storage.hotpluggable</literal> (bool)</entry>
<entry></entry>
<entry>Yes</entry>
@@ -2230,6 +2236,37 @@
<entry>The revision of the firmware of the drive</entry>
</row>
+ <row>
+ <entry><literal>storage.icon.drive</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ Name of icon to use for displaying the drive. The name
+ must comply with freedesktop.org icon-theme specification
+ and must not be an absolute path.
+
+ This property exists such that e.g. OEM's can install
+ icons in <literal>/usr/share/icons/hicolor</literal>
+ a device information file matching their device.
+ </entry>
+ </row>
+
+ <row>
+ <entry><literal>storage.icon.volume</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ Name of icon to use for displaying volumes from the drive.
+ The name must comply with freedesktop.org icon-theme
+ specification and must not be an absolute path.
+
+ This property exists such that e.g. OEM's can install
+ icons in <literal>/usr/share/icons/hicolor</literal>
+ a device information file matching their device.
+ </entry>
+ </row>
+
+
</tbody>
</tgroup>
</informaltable>
diff --git a/hald/linux/block_class_device.c b/hald/linux/block_class_device.c
index 94911270..3c1446ea 100644
--- a/hald/linux/block_class_device.c
+++ b/hald/linux/block_class_device.c
@@ -1112,6 +1112,7 @@ block_class_pre_process (ClassDeviceHandler *self,
const char *device_file;
dbus_bool_t has_removable_media = FALSE;
dbus_bool_t is_hotpluggable = FALSE;
+ dbus_bool_t requires_eject = FALSE;
char attr_path[SYSFS_PATH_MAX];
struct sysfs_attribute *attr;
@@ -1588,26 +1589,24 @@ block_class_pre_process (ClassDeviceHandler *self,
hal_device_property_set_bool (stordev, "storage.removable", has_removable_media);
if (hal_device_has_property (stordev, "storage.drive_type") &&
- strcmp (hal_device_property_get_string (stordev, "storage.drive_type"),
- "cdrom") == 0) {
+ strcmp (hal_device_property_get_string (stordev, "storage.drive_type"), "cdrom") == 0) {
cdrom_get_properties (stordev, device_file);
hal_device_add_capability (stordev, "storage.cdrom");
hal_device_property_set_bool (stordev, "storage.no_partitions_hint", TRUE);
+ requires_eject = TRUE;
}
if (hal_device_has_property (stordev, "storage.drive_type") &&
- strcmp (hal_device_property_get_string (stordev, "storage.drive_type"),
- "floppy") == 0) {
+ strcmp (hal_device_property_get_string (stordev, "storage.drive_type"), "floppy") == 0) {
hal_device_property_set_bool (stordev, "storage.no_partitions_hint", TRUE);
}
hal_device_property_set_string (stordev, "info.category", "storage");
hal_device_add_capability (stordev, "storage");
- hal_device_property_set_bool (stordev, "storage.hotpluggable",
- is_hotpluggable);
-
+ hal_device_property_set_bool (stordev, "storage.hotpluggable", is_hotpluggable);
+ hal_device_property_set_bool (stordev, "storage.requires_eject", requires_eject);
hal_device_property_set_bool (stordev, "block.no_partitions",
hal_device_property_get_bool (
stordev, "storage.no_partitions_hint"));
diff --git a/libhal-storage/libhal-storage.c b/libhal-storage/libhal-storage.c
index a82ff2f1..17d561dd 100644
--- a/libhal-storage/libhal-storage.c
+++ b/libhal-storage/libhal-storage.c
@@ -146,8 +146,6 @@ hal_storage_policy_lookup_icon (HalStoragePolicy *policy, HalStoragePolicyIcon i
IconMappingEntry *i;
const char *path;
- printf ("looking up 0x%08x\n", icon);
-
path = NULL;
for (i = policy->icon_mappings; i != NULL; i = i->next) {
if (i->icon == icon) {
@@ -633,6 +631,7 @@ struct HalDrive_s {
char *model; /* may be "", is never NULL */
dbus_bool_t is_hotpluggable;
dbus_bool_t is_removable;
+ dbus_bool_t requires_eject;
HalDriveType type;
char *type_textual;
@@ -640,6 +639,9 @@ struct HalDrive_s {
char *physical_device; /* UDI of physical device, e.g. the
* IDE, USB, IEEE1394 device */
+ char *dedicated_icon_drive;
+ char *dedicated_icon_volume;
+
char *serial;
char *firmware_version;
HalDriveCdromCaps cdrom_caps;
@@ -677,6 +679,18 @@ struct HalVolume_s {
unsigned int num_blocks;
};
+const char *
+hal_drive_get_dedicated_icon_drive (HalDrive *drive)
+{
+ return drive->dedicated_icon_drive;
+}
+
+const char *
+hal_drive_get_dedicated_icon_volume (HalDrive *drive)
+{
+ return drive->dedicated_icon_volume;
+}
+
/** Free all resources used by a HalDrive object.
*
* @param drive Object to free
@@ -782,8 +796,12 @@ hal_drive_from_udi (LibHalContext *hal_ctx, const char *udi)
HAL_PROP_EXTRACT_STRING ("storage.model", drive->model);
HAL_PROP_EXTRACT_STRING ("storage.drive_type", drive->type_textual);
+ HAL_PROP_EXTRACT_STRING ("storage.icon.drive", drive->dedicated_icon_drive);
+ HAL_PROP_EXTRACT_STRING ("storage.icon.volume", drive->dedicated_icon_volume);
+
HAL_PROP_EXTRACT_BOOL ("storage.hotpluggable", drive->is_hotpluggable);
HAL_PROP_EXTRACT_BOOL ("storage.removable", drive->is_removable);
+ HAL_PROP_EXTRACT_BOOL ("storage.requires_eject", drive->requires_eject);
HAL_PROP_EXTRACT_STRING ("storage.physical_device", drive->physical_device);
HAL_PROP_EXTRACT_STRING ("storage.firmware_version", drive->firmware_version);
@@ -876,6 +894,12 @@ const char *hal_drive_get_physical_device_udi (HalDrive *drive)
return drive->physical_device;
}
+dbus_bool_t
+hal_drive_requires_eject (HalDrive *drive)
+{
+ return drive->requires_eject;
+}
+
/** Given a UDI for a HAL device of capability 'volume', this
* function retrieves all the relevant properties into convenient
* in-process data structures.
diff --git a/libhal-storage/libhal-storage.h b/libhal-storage/libhal-storage.h
index 20f3ed23..c581b9f2 100644
--- a/libhal-storage/libhal-storage.h
+++ b/libhal-storage/libhal-storage.h
@@ -171,6 +171,7 @@ void hal_drive_free (HalDrive *drive);
dbus_bool_t hal_drive_is_hotpluggable (HalDrive *drive);
dbus_bool_t hal_drive_uses_removable_media (HalDrive *drive);
+dbus_bool_t hal_drive_requires_eject (HalDrive *drive);
HalDriveType hal_drive_get_type (HalDrive *drive);
HalDriveBus hal_drive_get_bus (HalDrive *drive);
HalDriveCdromCaps hal_drive_get_cdrom_caps (HalDrive *drive);
@@ -185,11 +186,15 @@ const char *hal_drive_get_model (HalDrive *drive);
const char *hal_drive_get_vendor (HalDrive *drive);
const char *hal_drive_get_physical_device_udi (HalDrive *drive);
+const char *hal_drive_get_dedicated_icon_drive (HalDrive *drive);
+const char *hal_drive_get_dedicated_icon_volume (HalDrive *drive);
+
char *hal_drive_policy_compute_display_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy);
char *hal_drive_policy_compute_icon_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy);
char **hal_drive_find_all_volumes (LibHalContext *hal_ctx, HalDrive *drive, int *num_volumes);
+
typedef enum {
HAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM,
HAL_VOLUME_USAGE_PARTITION_TABLE,
diff --git a/po/ChangeLog b/po/ChangeLog
index 23b99117..c64cfa5e 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-25 David Zeuthen <david@fubar.dk>
+
+ * fr.po: Added French Translations from Jérôme Lodewyck
+ <lodewyck@clipper.ens.fr>
+
2004-09-23 David Zeuthen <david@fubar.dk>
* da.po: Added Danish Translations
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 00000000..6d25d388
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,138 @@
+# translation of essai.po to Français
+# French translation of hal
+# Copyright (C) 2004
+# This file is distributed under the same license as the hal package.
+# Jérôme Lodewyck <lodewyck@clipper.ens.fr>, 2004.
+# Jérôme Lodewyck <jerome.lodewyck@normalesup.org>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: essai\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-22 23:26+0200\n"
+"PO-Revision-Date: 2004-09-24 20:55+0200\n"
+"Last-Translator: Jérôme Lodewyck <jerome.lodewyck@normalesup.org>\n"
+"Language-Team: Français <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.3.1\n"
+
+#: libhal-storage/libhal-storage.c:241
+#, c-format
+msgid "External %s%s Drive"
+msgstr "Lecteur %s%s externe"
+
+#: libhal-storage/libhal-storage.c:244
+#, c-format
+msgid "%s%s Drive"
+msgstr "Lecteur %s%s"
+
+#: libhal-storage/libhal-storage.c:253
+msgid "External Floppy Drive"
+msgstr "Lecteur de disquettes externe"
+
+#: libhal-storage/libhal-storage.c:255
+msgid "Floppy Drive"
+msgstr "Lecteur de disquettes"
+
+#: libhal-storage/libhal-storage.c:262
+#, c-format
+msgid "%s External Hard Drive"
+msgstr "Disque sur externe %s"
+
+#: libhal-storage/libhal-storage.c:265
+#, c-format
+msgid "%s Hard Drive"
+msgstr "Disque dur %s"
+
+#: libhal-storage/libhal-storage.c:270
+msgid "External Hard Drive"
+msgstr "Disque dur externe"
+
+#: libhal-storage/libhal-storage.c:272
+msgid "Hard Drive"
+msgstr "Disque dur"
+
+#: libhal-storage/libhal-storage.c:281
+msgid "Drive"
+msgstr "Lecteur"
+
+#: libhal-storage/libhal-storage.c:330
+msgid "CD-ROM Disc"
+msgstr "CD-ROM"
+
+#: libhal-storage/libhal-storage.c:335
+msgid "Blank CD-R Disc"
+msgstr "CD-R vierge"
+
+#: libhal-storage/libhal-storage.c:337
+msgid "CD-R Disc"
+msgstr "CD-R"
+
+#: libhal-storage/libhal-storage.c:342
+msgid "Blank CD-RW Disc"
+msgstr "CD-RW vierge"
+
+#: libhal-storage/libhal-storage.c:344
+msgid "CD-RW Disc"
+msgstr "CD-RW"
+
+#: libhal-storage/libhal-storage.c:348
+msgid "DVD-ROM Disc"
+msgstr "DVD-ROM"
+
+#: libhal-storage/libhal-storage.c:353
+msgid "Blank DVD-RAM Disc"
+msgstr "DVD-RAM vierge"
+
+#: libhal-storage/libhal-storage.c:355
+msgid "DVD-RAM Disc"
+msgstr "DVD-RAM"
+
+#: libhal-storage/libhal-storage.c:360
+msgid "Blank DVD-R Disc"
+msgstr "DVD-R vierge"
+
+#: libhal-storage/libhal-storage.c:362
+msgid "DVD-R Disc"
+msgstr "DVD-R"
+
+#: libhal-storage/libhal-storage.c:367
+msgid "Blank DVD-RW Disc"
+msgstr "DVD-RW vierge"
+
+#: libhal-storage/libhal-storage.c:369
+msgid "DVD-RW Disc"
+msgstr "DVD-RW"
+
+#: libhal-storage/libhal-storage.c:375
+msgid "Blank DVD+R Disc"
+msgstr "DVD+R vierge"
+
+#: libhal-storage/libhal-storage.c:377
+msgid "DVD+R Disc"
+msgstr "DVD+R"
+
+#: libhal-storage/libhal-storage.c:382
+msgid "Blank DVD+RW Disc"
+msgstr "DVD+RW vierge"
+
+#: libhal-storage/libhal-storage.c:384
+msgid "DVD+RW Disc"
+msgstr "DVD+RW"
+
+#: libhal-storage/libhal-storage.c:391
+msgid "Audio Disc"
+msgstr "CD audio"
+
+#: libhal-storage/libhal-storage.c:399
+#, c-format
+msgid "%s Removable Media"
+msgstr "Péripéhrique amovible %s"
+
+#: libhal-storage/libhal-storage.c:402
+#, c-format
+msgid "%s Media"
+msgstr "Péripéhrique %s"
+