[gnome-disk-utility/udisks2-port] Show compatible media for a drive, if known
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Show compatible media for a drive, if known
- Date: Mon, 14 Mar 2011 21:25:18 +0000 (UTC)
commit 5529ddf36ade26b4d9f38c62afa8eee3375edf32
Author: David Zeuthen <davidz redhat com>
Date: Mon Mar 14 17:25:13 2011 -0400
Show compatible media for a drive, if known
Signed-off-by: David Zeuthen <davidz redhat com>
data/ui/palimpsest.ui | 87 +++++++++++++++++++++++++++++++-------------
src/palimpsest/gduwindow.c | 12 ++++++
2 files changed, 74 insertions(+), 25 deletions(-)
---
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index 0c56f2f..1a1d5fe 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -375,7 +375,7 @@
<object class="GtkTable" id="devtab-table">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">14</property>
+ <property name="n_rows">15</property>
<property name="n_columns">2</property>
<property name="column_spacing">10</property>
<child>
@@ -423,8 +423,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -447,8 +447,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -687,8 +687,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -705,8 +705,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -723,8 +723,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -742,8 +742,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -761,8 +761,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -780,8 +780,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">12</property>
- <property name="bottom_attach">13</property>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -799,8 +799,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -818,8 +818,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -837,8 +837,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -855,8 +855,8 @@
</attributes>
</object>
<packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">4</property>
@@ -868,6 +868,43 @@
<child>
<placeholder/>
</child>
+ <child>
+ <object class="GtkLabel" id="devtab-compat-media-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Compatible Media</property>
+ <attributes>
+ <attribute name="foreground" value="#555555555555"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ <property name="y_padding">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="devtab-compat-media-value-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="selectable">True</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ <property name="y_padding">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 8a590b8..08ab27f 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -865,6 +865,8 @@ update_devtab_for_lun (GduWindow *window,
GString *str;
const gchar *lun_vendor;
const gchar *lun_model;
+ const gchar* const *lun_media_compat;
+ gchar *media_compat_for_display;
//g_debug ("In update_devtab_for_lun() - selected=%s",
// object_proxy != NULL ? g_dbus_object_proxy_get_object_path (object_proxy) : "<nothing>");
@@ -875,6 +877,8 @@ update_devtab_for_lun (GduWindow *window,
lun_vendor = udisks_lun_get_vendor (lun);
lun_model = udisks_lun_get_model (lun);
+ lun_media_compat = udisks_lun_get_media_compatibility (lun);
+ media_compat_for_display = udisks_util_get_media_compat_for_display (lun_media_compat);
str = g_string_new (NULL);
for (l = block_devices; l != NULL; l = l->next)
@@ -923,6 +927,14 @@ update_devtab_for_lun (GduWindow *window,
gtk_switch_set_active (GTK_SWITCH (window->write_cache_switch), TRUE);
gtk_widget_show (gdu_window_get_widget (window, "devtab-write-cache-label"));
gtk_widget_show_all (gdu_window_get_widget (window, "devtab-write-cache-hbox"));
+
+ if (media_compat_for_display != NULL)
+ set_markup (window,
+ "devtab-compat-media-label",
+ "devtab-compat-media-value-label",
+ media_compat_for_display, SET_MARKUP_FLAGS_NONE);
+
+ g_free (media_compat_for_display);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]