[gnome-disk-utility/udisks2-port] Drop unnessary use of colors in labels
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Drop unnessary use of colors in labels
- Date: Thu, 12 Jan 2012 17:34:12 +0000 (UTC)
commit da0d6ac33bd3671b602352733dc55e92c11b73e9
Author: David Zeuthen <davidz redhat com>
Date: Thu Jan 12 12:33:59 2012 -0500
Drop unnessary use of colors in labels
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduatasmartdialog.c | 10 +++---
src/palimpsest/gducreatefilesystemwidget.c | 10 +++---
src/palimpsest/gducreatepartitiondialog.c | 2 +-
src/palimpsest/gduformatdiskdialog.c | 6 ++--
src/palimpsest/gdupartitiondialog.c | 2 +-
src/palimpsest/gduwindow.c | 38 ++++++++++++++-------------
6 files changed, 35 insertions(+), 33 deletions(-)
---
diff --git a/src/palimpsest/gduatasmartdialog.c b/src/palimpsest/gduatasmartdialog.c
index c36d5fc..915b697 100644
--- a/src/palimpsest/gduatasmartdialog.c
+++ b/src/palimpsest/gduatasmartdialog.c
@@ -891,7 +891,7 @@ update_attr (DialogData *data)
-1);
value_str = g_strdup (pretty);
- normalized_str = g_strdup_printf (_("%d <span foreground=\"#555555\" size=\"small\">(Worst:%d, Threshold: %d)</span>"),
+ normalized_str = g_strdup_printf (_("%d <span size=\"small\">(Worst:%d, Threshold: %d)</span>"),
normalized, worst, threshold);
prefail = (flags & 0x0001);
@@ -901,26 +901,26 @@ update_attr (DialogData *data)
{
/* Translators: Please keep "(Pre-Fail)" in English
*/
- type_str = _("Failure is a sign the disk will fail within 24 hours <span foreground=\"#555555\" size=\"small\">(Pre-Fail)</span>");
+ type_str = _("Failure is a sign the disk will fail within 24 hours <span size=\"small\">(Pre-Fail)</span>");
}
else
{
/* Translators: Please keep "(Old-Age)" in English
*/
- type_str = _("Failure is a sign the disk exceeded its intended design life period <span foreground=\"#555555\" size=\"small\">(Old-Age)</span>");
+ type_str = _("Failure is a sign the disk exceeded its intended design life period <span size=\"small\">(Old-Age)</span>");
}
if (online)
{
/* Translators: Please keep "(Online)" in English
*/
- updates_str = _("Every time data is collected <span foreground=\"#555555\" size=\"small\">(Online)</span>");
+ updates_str = _("Every time data is collected <span size=\"small\">(Online)</span>");
}
else
{
/* Translators: Please keep "(Not Online)" in English
*/
- updates_str = _("Only during off-line activities <span foreground=\"#555555\" size=\"small\">(Not Online)</span>");
+ updates_str = _("Only during off-line activities <span size=\"small\">(Not Online)</span>");
}
out:
diff --git a/src/palimpsest/gducreatefilesystemwidget.c b/src/palimpsest/gducreatefilesystemwidget.c
index 8ba59a8..d49ddd2 100644
--- a/src/palimpsest/gducreatefilesystemwidget.c
+++ b/src/palimpsest/gducreatefilesystemwidget.c
@@ -384,31 +384,31 @@ populate (GduCreateFilesystemWidget *widget)
widget,
NULL); /* GDestroyNotify */
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Compatible with all systems and devices"),
_("FAT"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
MODEL_COLUMN_ID, "vfat", MODEL_COLUMN_MARKUP, s, -1);
g_free (s);
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Compatible with most systems"),
_("NTFS"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
MODEL_COLUMN_ID, "ntfs", MODEL_COLUMN_MARKUP, s, -1);
g_free (s);
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Compatible with Linux systems"),
_("Ext4"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
MODEL_COLUMN_ID, "ext4", MODEL_COLUMN_MARKUP, s, -1);
g_free (s);
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Encrypted, compatible with Linux systems"),
_("LUKS + Ext4"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
MODEL_COLUMN_ID, "luks+ext4", MODEL_COLUMN_MARKUP, s, -1);
g_free (s);
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Custom"),
_("Enter filesystem type"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
diff --git a/src/palimpsest/gducreatepartitiondialog.c b/src/palimpsest/gducreatepartitiondialog.c
index 2e63ef5..e9fbd8b 100644
--- a/src/palimpsest/gducreatepartitiondialog.c
+++ b/src/palimpsest/gducreatepartitiondialog.c
@@ -322,7 +322,7 @@ gdu_create_partition_dialog_show (GduWindow *window,
if (!have_dos_extended (data))
{
snprintf (dos_extended_partition_name, sizeof dos_extended_partition_name,
- "%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ "%s <span size=\"small\">(%s)</span>",
_("Extended partition"),
_("For logical partitions"));
additional_fstypes[0] = "dos_extended";
diff --git a/src/palimpsest/gduformatdiskdialog.c b/src/palimpsest/gduformatdiskdialog.c
index 59ef9a7..4985118 100644
--- a/src/palimpsest/gduformatdiskdialog.c
+++ b/src/palimpsest/gduformatdiskdialog.c
@@ -126,7 +126,7 @@ format_disk_populate (FormatDiskData *data)
NULL); /* GDestroyNotify */
/* MBR */
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Compatible with all systems and devices"),
_("MBR / DOS"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
@@ -134,7 +134,7 @@ format_disk_populate (FormatDiskData *data)
g_free (s);
/* GPT */
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("Compatible with modern systems and hard disks > 2TB"),
_("GPT"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
@@ -147,7 +147,7 @@ format_disk_populate (FormatDiskData *data)
/* Empty */
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
_("No partitioning"),
_("Empty"));
gtk_list_store_insert_with_values (model, NULL /* out_iter */, G_MAXINT, /* position */
diff --git a/src/palimpsest/gdupartitiondialog.c b/src/palimpsest/gdupartitiondialog.c
index c81e288..1937076 100644
--- a/src/palimpsest/gdupartitiondialog.c
+++ b/src/palimpsest/gdupartitiondialog.c
@@ -220,7 +220,7 @@ edit_partition_populate (EditPartitionData *data)
data->partition_table_type,
info->type);
escaped_type_for_display = g_markup_escape_text (type_for_display, -1);
- s = g_strdup_printf ("%s <span foreground=\"#555555\" size=\"small\">(%s)</span>",
+ s = g_strdup_printf ("%s <span size=\"small\">(%s)</span>",
escaped_type_for_display,
info->type);
g_free (escaped_type_for_display);
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 63f7121..a2ce6e0 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1474,6 +1474,23 @@ setup_device_page (GduWindow *window,
}
}
+static gchar *
+get_device_file_for_display (UDisksBlock *block)
+{
+ gchar *ret;
+ if (udisks_block_get_read_only (block))
+ {
+ /* Translators: Shown for a read-only device. The %s is the device file, e.g. /dev/sdb1 */
+ ret = g_strdup_printf (_("%s <span size=\"smaller\">(Read-Only)</span>"),
+ udisks_block_get_preferred_device (block));
+ }
+ else
+ {
+ ret = g_strdup (udisks_block_get_preferred_device (block));
+ }
+ return ret;
+}
+
static void
update_device_page_for_drive (GduWindow *window,
UDisksObject *object,
@@ -1522,7 +1539,9 @@ update_device_page_for_drive (GduWindow *window,
UDisksObject *block_object = UDISKS_OBJECT (l->data);
if (str->len > 0)
g_string_append_c (str, ' ');
- g_string_append (str, udisks_block_get_preferred_device (udisks_object_peek_block (block_object)));
+ s = get_device_file_for_display (udisks_object_peek_block (block_object));
+ g_string_append (str, s);
+ g_free (s);
}
s = g_strdup_printf ("<big><b>%s</b></big>",
description);
@@ -1664,23 +1683,6 @@ lookup_cleartext_device_for_crypto_device (UDisksClient *client,
return ret;
}
-static gchar *
-get_device_file_for_display (UDisksBlock *block)
-{
- gchar *ret;
- if (udisks_block_get_read_only (block))
- {
- /* Translators: Shown for a read-only device. The %s is the device file, e.g. /dev/sdb1 */
- ret = g_strdup_printf (_("%s <span foreground=\"#555555\" size=\"small\">(Read-Only)</span>"),
- udisks_block_get_preferred_device (block));
- }
- else
- {
- ret = g_strdup (udisks_block_get_preferred_device (block));
- }
- return ret;
-}
-
static void
update_device_page_for_block (GduWindow *window,
UDisksObject *object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]