[gnome-disk-utility] Also show an emblem for paths of a multipathed disks



commit de295890be774e1744b22637d3d23f03fcc38457
Author: David Zeuthen <davidz redhat com>
Date:   Wed Jan 27 16:51:26 2010 -0500

    Also show an emblem for paths of a multipathed disks
    
    This makes it easier to get an overview
    
     http://people.freedesktop.org/~david/gdu-sas-multipath-emblems.png

 data/icons/16x16/Makefile.am                    |    1 +
 data/icons/16x16/gdu-emblem-mp-component.png    |  Bin 0 -> 618 bytes
 data/icons/22x22/Makefile.am                    |    1 +
 data/icons/22x22/gdu-emblem-mp-component.png    |  Bin 0 -> 757 bytes
 data/icons/48x48/Makefile.am                    |    1 +
 data/icons/48x48/gdu-emblem-mp-component.png    |  Bin 0 -> 1569 bytes
 data/icons/scalable/Makefile.am                 |    1 +
 data/icons/scalable/gdu-emblem-mp-component.svg |  141 +++++++++++++++++++++++
 src/gdu/gdu-drive.c                             |   16 +++-
 9 files changed, 160 insertions(+), 1 deletions(-)
---
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index d39405a..844fa79 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -24,6 +24,7 @@ icon_DATA =				\
 	nautilus-gdu.png		\
 	gdu-hba.png			\
 	gdu-emblem-mp.png		\
+	gdu-emblem-mp-component.png	\
 	gdu-emblem-lvm-vg.png		\
 	gdu-emblem-lvm-lv.png		\
 	gdu-emblem-raid-linear.png	\
diff --git a/data/icons/16x16/gdu-emblem-mp-component.png b/data/icons/16x16/gdu-emblem-mp-component.png
new file mode 100644
index 0000000..29da297
Binary files /dev/null and b/data/icons/16x16/gdu-emblem-mp-component.png differ
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
index 31dd0bb..25edd50 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -24,6 +24,7 @@ icon_DATA =				\
 	nautilus-gdu.png		\
 	gdu-hba.png			\
 	gdu-emblem-mp.png		\
+	gdu-emblem-mp-component.png	\
 	gdu-emblem-lvm-vg.png		\
 	gdu-emblem-lvm-lv.png		\
 	gdu-emblem-raid-linear.png	\
diff --git a/data/icons/22x22/gdu-emblem-mp-component.png b/data/icons/22x22/gdu-emblem-mp-component.png
new file mode 100644
index 0000000..68aec1d
Binary files /dev/null and b/data/icons/22x22/gdu-emblem-mp-component.png differ
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
index 15310b2..95277b2 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -24,6 +24,7 @@ icon_DATA = 				\
 	nautilus-gdu.png		\
 	gdu-hba.png			\
 	gdu-emblem-mp.png		\
+	gdu-emblem-mp-component.png	\
 	gdu-emblem-lvm-vg.png		\
 	gdu-emblem-lvm-lv.png		\
 	gdu-emblem-raid-linear.png	\
diff --git a/data/icons/48x48/gdu-emblem-mp-component.png b/data/icons/48x48/gdu-emblem-mp-component.png
new file mode 100644
index 0000000..f44b293
Binary files /dev/null and b/data/icons/48x48/gdu-emblem-mp-component.png differ
diff --git a/data/icons/scalable/Makefile.am b/data/icons/scalable/Makefile.am
index eba7638..02161bf 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -24,6 +24,7 @@ icon_DATA =				\
 	nautilus-gdu.svg		\
 	gdu-hba.svg			\
 	gdu-emblem-mp.svg		\
+	gdu-emblem-mp-component.svg	\
 	gdu-emblem-lvm-vg.svg		\
 	gdu-emblem-lvm-lv.svg		\
 	gdu-emblem-raid-linear.svg	\
diff --git a/data/icons/scalable/gdu-emblem-mp-component.svg b/data/icons/scalable/gdu-emblem-mp-component.svg
new file mode 100644
index 0000000..f16bd1a
--- /dev/null
+++ b/data/icons/scalable/gdu-emblem-mp-component.svg
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="256"
+   height="256"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="gdu-emblem-mp-component.svg"
+   inkscape:export-filename="/home/davidz/Desktop/disk-emblems/gdu-emblem-mp.png"
+   inkscape:export-xdpi="17.24"
+   inkscape:export-ydpi="17.24">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective3615"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3643"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3697"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3697-2"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3753"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3781"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="168.56851"
+     inkscape:cy="93.194121"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1024"
+     inkscape:window-height="716"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-16.181963,112.24405)">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1;fill:#555753;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3847"
+       sodipodi:cx="126.26907"
+       sodipodi:cy="126.70048"
+       sodipodi:rx="125.25892"
+       sodipodi:ry="125.25892"
+       d="m 251.52799,126.70048 c 0,69.17859 -56.08033,125.25892 -125.25892,125.25892 -69.178587,0 -125.2589153,-56.08033 -125.2589153,-125.25892 0,-69.178593 56.0803283,-125.2589212 125.2589153,-125.2589212 69.17859,0 125.25892,56.0803282 125.25892,125.2589212 z"
+       transform="translate(18.202268,-110.22374)" />
+    <text
+       xml:space="preserve"
+       style="font-size:144px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="83.842659"
+       y="83.263916"
+       id="text3849"
+       transform="translate(16.181963,-112.24405)"><tspan
+         sodipodi:role="line"
+         id="tspan3851"
+         x="83.842659"
+         y="83.263916" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="42.44593"
+       y="67.994522"
+       id="text3853"><tspan
+         sodipodi:role="line"
+         id="tspan3855"
+         x="42.44593"
+         y="67.994522"
+         style="font-size:144px;fill:#ffffff;fill-opacity:1">MP</tspan></text>
+  </g>
+</svg>
diff --git a/src/gdu/gdu-drive.c b/src/gdu/gdu-drive.c
index 74d9363..a841a6c 100644
--- a/src/gdu/gdu-drive.c
+++ b/src/gdu/gdu-drive.c
@@ -984,7 +984,7 @@ gdu_drive_get_icon (GduPresentable *presentable)
                         name = "drive-harddisk";
         }
 
-        /* Attach a MP emblem if it's a multipathed device */
+        /* Attach a MP emblem if it's a multipathed device or a path for a multipathed device */
         icon = g_themed_icon_new_with_default_fallbacks (name);
         if (gdu_device_is_linux_dmmp (drive->priv->device)) {
                 GEmblem *emblem;
@@ -1000,6 +1000,20 @@ gdu_drive_get_icon (GduPresentable *presentable)
 
                 g_object_unref (padlock);
                 g_object_unref (emblem);
+        } else if (gdu_device_is_linux_dmmp_component (drive->priv->device)) {
+                GEmblem *emblem;
+                GIcon *padlock;
+                GIcon *emblemed_icon;
+
+                padlock = g_themed_icon_new ("gdu-emblem-mp-component");
+                emblem = g_emblem_new_with_origin (padlock, G_EMBLEM_ORIGIN_DEVICE);
+
+                emblemed_icon = g_emblemed_icon_new (icon, emblem);
+                g_object_unref (icon);
+                icon = emblemed_icon;
+
+                g_object_unref (padlock);
+                g_object_unref (emblem);
         }
 
         return icon;



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