freedesktop
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 28 Sep 2008 03:35:21 +0000 (03:35 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 28 Sep 2008 03:35:21 +0000 (03:35 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9668 221aa14e-8319-0410-a670-987f0aec2ac5

25 files changed:
config/grc_grc.m4
grc/Makefile.am
grc/data/platforms/base/Makefile.am
grc/data/platforms/base/grc-icon-256.png [deleted file]
grc/data/platforms/base/grc-icon-256.svg [deleted file]
grc/data/platforms/base/grc-icon-32.png [deleted file]
grc/data/platforms/python/flow_graph.tmpl
grc/freedesktop/Makefile.am [new file with mode: 0644]
grc/freedesktop/gnuradio-grc.desktop [new file with mode: 0644]
grc/freedesktop/gnuradio-grc.xml [new file with mode: 0644]
grc/freedesktop/gnuradio-usrp_diagnostics.desktop [new file with mode: 0644]
grc/freedesktop/grc-icon-256.png [new file with mode: 0644]
grc/freedesktop/grc-icon-256.svg [new file with mode: 0644]
grc/freedesktop/grc-icon-32.png [new file with mode: 0644]
grc/freedesktop/grc-icon-48.png [new file with mode: 0644]
grc/scripts/grc
grc/src/gui/ActionHandler.py
grc/src/gui/Constants.py
grc/src/gui/FileDialogs.py
grc/src/gui/MainWindow.py
grc/src/gui/Preferences.py
grc/src/platforms/base/Constants.py.in
grc/src/platforms/base/Platform.py
grc/src/platforms/gui/Param.py
grc/src/platforms/python/Platform.py

index c8ea1099d3fd4525ad6c9b235b5ac045f93d5181..f82c555851cb55d67f6e9e0f4ee173a9022bc73a 100644 (file)
@@ -76,6 +76,7 @@ AC_DEFUN([GRC_GRC],[
         grc/data/platforms/python/Makefile \
         grc/data/platforms/python/blocks/Makefile \
         grc/scripts/Makefile \
+        grc/freedesktop/Makefile \
     ])
 
     GRC_BUILD_CONDITIONAL(grc)
index 5e03d627689e53ca65337725548563976489ebd9..104ff186b10d52fc7d6d424762a68b01176b92f0 100644 (file)
@@ -24,5 +24,6 @@ include $(top_srcdir)/grc/Makefile.inc
 SUBDIRS = \
        data \
        examples \
+       freedesktop \
        scripts \
        src
index 56ff5939c893835fc735262f9419bcceb3bb7c7e..aaf53b4fc13760c9fb2f2d63f88552535f51247b 100644 (file)
@@ -25,7 +25,4 @@ ourdatadir = $(grc_base_data_dir)
 
 dist_ourdata_DATA = \
        block_tree.dtd \
-       flow_graph.dtd \
-       grc-icon-256.png \
-       grc-icon-256.svg \
-       grc-icon-32.png
+       flow_graph.dtd
diff --git a/grc/data/platforms/base/grc-icon-256.png b/grc/data/platforms/base/grc-icon-256.png
deleted file mode 100644 (file)
index e4e8e54..0000000
Binary files a/grc/data/platforms/base/grc-icon-256.png and /dev/null differ
diff --git a/grc/data/platforms/base/grc-icon-256.svg b/grc/data/platforms/base/grc-icon-256.svg
deleted file mode 100644 (file)
index 87526d4..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-<?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://web.resource.org/cc/"
-   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:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="256"
-   height="256"
-   id="svg2"
-   sodipodi:version="0.32"
-   inkscape:version="0.44.1"
-   version="1.0"
-   sodipodi:docbase="/home/past/src"
-   sodipodi:docname="grc-icon-v3.svg"
-   inkscape:export-filename="/home/past/src/grc-icon-v3.png"
-   inkscape:export-xdpi="90"
-   inkscape:export-ydpi="90">
-  <defs
-     id="defs4">
-    <linearGradient
-       id="linearGradient3661">
-      <stop
-         style="stop-color:#0012dc;stop-opacity:1;"
-         offset="0"
-         id="stop3663" />
-      <stop
-         style="stop-color:#8b92ff;stop-opacity:0.55371898;"
-         offset="1"
-         id="stop3665" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3661"
-       id="linearGradient2801"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="translate(-162.6648,798.0997)"
-       x1="17.664845"
-       y1="132.0565"
-       x2="157.82524"
-       y2="132.0565" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="2.7382812"
-     inkscape:cx="126.48791"
-     inkscape:cy="128.00013"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     gridoriginx="1px"
-     gridoriginy="1px"
-     gridspacingx="2px"
-     gridspacingy="2px"
-     guidecolor="#00ff0a"
-     guideopacity="0.49803922"
-     inkscape:grid-points="true"
-     inkscape:window-width="1098"
-     inkscape:window-height="904"
-     inkscape:window-x="149"
-     inkscape:window-y="42"
-     showguides="true"
-     inkscape:guide-bbox="true"
-     inkscape:object-points="true"
-     inkscape:object-nodes="true"
-     inkscape:object-bbox="true">
-    <sodipodi:guide
-       orientation="vertical"
-       position="224"
-       id="guide10639" />
-    <sodipodi:guide
-       orientation="vertical"
-       position="227.64729"
-       id="guide10641" />
-    <sodipodi:guide
-       orientation="vertical"
-       position="220"
-       id="guide10643" />
-    <sodipodi:guide
-       orientation="horizontal"
-       position="268.4015"
-       id="guide10645" />
-  </sodipodi:namedview>
-  <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" />
-        <cc:license
-           rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
-        <dc:creator>
-          <cc:Agent>
-            <dc:title>Patrick Strasser &lt;patrick.strasser@tugraz.at&gt;</dc:title>
-          </cc:Agent>
-        </dc:creator>
-        <dc:description>Icon/Symbol for the GNURadio Companion</dc:description>
-        <dc:title>grc-icon.svg</dc:title>
-        <dc:date>2007-02-23</dc:date>
-      </cc:Work>
-      <cc:License
-         rdf:about="http://creativecommons.org/licenses/by-sa/2.5/">
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/Reproduction" />
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/Distribution" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/Notice" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/Attribution" />
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/ShareAlike" />
-      </cc:License>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Ebene 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-796.3622)">
-    <g
-       id="g7451"
-       transform="matrix(1.025628,0,0,1.030546,-0.101723,-32.00742)">
-      <path
-         id="rect2760"
-         d="M 4.1981031,916.37787 L 160.00074,916.37787 L 160.00074,1048.3467 L 4.1981031,1048.3467 L 4.1981031,916.37787 z "
-         style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.78145933;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-      <g
-         transform="matrix(0.995753,0,0,1.003897,164.8198,-8.972397)"
-         id="g2789"
-         style="stroke-width:8;stroke-miterlimit:4;stroke-dasharray:none">
-        <rect
-           style="fill:url(#linearGradient2801);fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.78288651;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-           id="rect9020"
-           width="140.1604"
-           height="16.796082"
-           x="-145"
-           y="921.75818" />
-        <path
-           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.78288651;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-           d="M -161.50649,938.55428 L -4.8395996,938.55428"
-           id="path9005" />
-      </g>
-    </g>
-    <g
-       id="g5503"
-       transform="matrix(1.028571,0,0,1.172413,-5.14284,-137.9928)">
-      <rect
-         y="800.36212"
-         x="40"
-         height="116.00005"
-         width="140"
-         id="rect4562"
-         style="fill:#f3c690;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.28504848;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
-      <g
-         transform="matrix(0.921053,0,0,1,26.93956,1.859948)"
-         id="g3694">
-        <path
-           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.59084845;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-           d="M 44,820.3622 L 136.35974,820.3622"
-           id="path4564" />
-        <path
-           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.59084749;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-           d="M 80,811.74976 L 80,828.3622"
-           id="path5451" />
-      </g>
-      <g
-         id="g5499">
-        <rect
-           style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.28504944;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-           id="rect7223"
-           width="140"
-           height="68.000015"
-           x="40"
-           y="848.36218" />
-        <path
-           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.28505039;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-           d="M 57.001362,905.90132 C 88.923615,905.8552 86.182775,867.89142 95.399136,867.52563 C 104.60967,867.16008 113.73233,867.60291 124.38688,868.00066 C 137.23411,868.48027 130.39915,906.48027 162.99863,906.48027"
-           id="path7225"
-           sodipodi:nodetypes="czss" />
-      </g>
-    </g>
-    <rect
-       style="fill:#b890f3;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999952;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-       id="rect14319"
-       width="79.999992"
-       height="64.000023"
-       x="27.999992"
-       y="960.36249" />
-    <rect
-       style="fill:#f3c690;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999905;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
-       id="rect15206"
-       width="24.000004"
-       height="24.000004"
-       x="108"
-       y="980.36218" />
-    <path
-       id="path13320"
-       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999666;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
-       d="M 220.97574,800.36203 L 220.97574,865.80513 C 236.42474,865.93437 248.49884,861.19996 248.96304,854.45866 C 249.42721,847.71737 237.26568,843.20829 221.81667,846.27676 C 206.36767,849.34522 193.45938,858.02071 192.98843,867.61976 C 192.53101,876.94268 204.68583,884.63729 220.13479,885.43882 C 235.58379,885.69443 248.49884,880.72833 248.96304,873.98703 C 249.42721,867.24575 237.26567,862.73666 221.81666,865.80513 C 206.36766,868.8736 193.45939,877.54909 192.98843,887.14813 C 192.53101,896.47106 204.68582,904.16566 220.13479,904.86701 C 235.5838,905.02246 248.49885,900.05636 248.96305,893.31506 C 249.42722,886.57378 237.26568,882.06469 221.81667,885.13316 C 206.36767,888.20162 193.45939,896.87711 192.98844,906.47616 C 192.53102,915.79909 204.68583,923.49369 220.13479,923.98015 C 235.58379,923.92069 248.49884,918.95459 248.96304,912.21329 C 249.42721,905.47201 237.26567,900.96293 221.81666,904.0314 C 206.36766,907.09986 193.45939,915.77535 192.98843,925.37439 C 192.53101,934.69732 207.20989,943.06708 221.81667,943.00644 L 221.81667,967.97713 C 221.63716,982.45754 209.62079,992.36197 195.88792,992.36199 L 132.42659,992.36199"
-       sodipodi:nodetypes="cccssscssscssscssccc" />
-  </g>
-</svg>
diff --git a/grc/data/platforms/base/grc-icon-32.png b/grc/data/platforms/base/grc-icon-32.png
deleted file mode 100644 (file)
index 1e4f4f6..0000000
Binary files a/grc/data/platforms/base/grc-icon-32.png and /dev/null differ
index 0d02d258e63117a9a440c763abdb49bb0d815cf0..6bf79fc8b34e20b7d0662df861682bc705119c94 100644 (file)
@@ -41,15 +41,18 @@ $imp
 #set $class_name = $flow_graph.get_option('id')
 #set $param_str = ', '.join(['self'] + ['%s=%s'%(param.get_id(), param.get_make()) for param in $parameters])
 #if $generate_options == 'wx_gui'
-       #from gnuradio.grc.platforms.base.Constants import DATA_DIR
        #from gnuradio.grc.gui import Preferences
+       #import gtk
+       #set $icon = gtk.IconTheme().lookup_icon('gnuradio-grc', 32, 0)
 class $(class_name)(grc_wxgui.top_block_gui):
 
        def __init__($param_str):
                grc_wxgui.top_block_gui.__init__(
                        self,
                        title="$Preferences.window_prefix() - Executing: $flow_graph.get_option('title')",
-                       icon="$(os.path.join($DATA_DIR, 'grc-icon-32.png'))",
+       #if $icon
+                       icon="$icon.get_filename()",
+       #end if
                )
 #elif $generate_options == 'no_gui'
 class $(class_name)(gr.top_block):
diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am
new file mode 100644 (file)
index 0000000..196d3a7
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/grc/Makefile.inc
+
+install-data-local:
+       xdg-icon-resource install --context mimetypes --mode system --size 48 $(srcdir)/grc-icon-48.png application-gnuradio-grc
+       xdg-icon-resource install --context apps --mode system --size 256 $(srcdir)/grc-icon-256.png gnuradio-grc
+       xdg-icon-resource install --context apps --mode system --size 32 $(srcdir)/grc-icon-32.png gnuradio-grc
+       xdg-mime install --mode system $(srcdir)/gnuradio-grc.xml
+       xdg-desktop-menu install --mode system $(srcdir)/gnuradio-grc.desktop
+       xdg-desktop-menu install --mode system $(srcdir)/gnuradio-usrp_diagnostics.desktop
+
+uninstall-local:
+       xdg-icon-resource uninstall --context mimetypes --mode system --size 48 application-gnuradio-grc
+       xdg-icon-resource uninstall --context apps --mode system --size 256 gnuradio-grc
+       xdg-icon-resource uninstall --context apps --mode system --size 32 gnuradio-grc
+       xdg-mime uninstall --mode system $(srcdir)/gnuradio-grc.xml
+       xdg-desktop-menu uninstall --mode system $(srcdir)/gnuradio-grc.desktop
+       xdg-desktop-menu uninstall --mode system $(srcdir)/gnuradio-usrp_diagnostics.desktop
+
+EXTRA_DIST = \
+       $(srcdir)/grc-icon-256.png \
+       $(srcdir)/grc-icon-48.png \
+       $(srcdir)/grc-icon-32.png \
+       $(srcdir)/gnuradio-grc.xml \
+       $(srcdir)/gnuradio-grc.desktop \
+       $(srcdir)/gnuradio-usrp_diagnostics.desktop
diff --git a/grc/freedesktop/gnuradio-grc.desktop b/grc/freedesktop/gnuradio-grc.desktop
new file mode 100644 (file)
index 0000000..d9c70ca
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=GRC
+Exec=grc %F
+Categories=Development;
+MimeType=application/gnuradio-grc;
+Icon=gnuradio-grc
diff --git a/grc/freedesktop/gnuradio-grc.xml b/grc/freedesktop/gnuradio-grc.xml
new file mode 100644 (file)
index 0000000..a5cb95d
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+       <mime-type type="application/gnuradio-grc">
+               <sub-class-of type="application/xml"/>
+               <glob pattern="*.grc"/>
+               <glob pattern="*.grc.xml"/>
+       </mime-type>
+</mime-info>
diff --git a/grc/freedesktop/gnuradio-usrp_diagnostics.desktop b/grc/freedesktop/gnuradio-usrp_diagnostics.desktop
new file mode 100644 (file)
index 0000000..9a5000b
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=USRP Diagnostics
+Exec=usrp_diagnostics
+Categories=Development;
+Icon=gnuradio-grc
diff --git a/grc/freedesktop/grc-icon-256.png b/grc/freedesktop/grc-icon-256.png
new file mode 100644 (file)
index 0000000..e4e8e54
Binary files /dev/null and b/grc/freedesktop/grc-icon-256.png differ
diff --git a/grc/freedesktop/grc-icon-256.svg b/grc/freedesktop/grc-icon-256.svg
new file mode 100644 (file)
index 0000000..87526d4
--- /dev/null
@@ -0,0 +1,216 @@
+<?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://web.resource.org/cc/"
+   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:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="256"
+   height="256"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44.1"
+   version="1.0"
+   sodipodi:docbase="/home/past/src"
+   sodipodi:docname="grc-icon-v3.svg"
+   inkscape:export-filename="/home/past/src/grc-icon-v3.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3661">
+      <stop
+         style="stop-color:#0012dc;stop-opacity:1;"
+         offset="0"
+         id="stop3663" />
+      <stop
+         style="stop-color:#8b92ff;stop-opacity:0.55371898;"
+         offset="1"
+         id="stop3665" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3661"
+       id="linearGradient2801"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-162.6648,798.0997)"
+       x1="17.664845"
+       y1="132.0565"
+       x2="157.82524"
+       y2="132.0565" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.7382812"
+     inkscape:cx="126.48791"
+     inkscape:cy="128.00013"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     gridoriginx="1px"
+     gridoriginy="1px"
+     gridspacingx="2px"
+     gridspacingy="2px"
+     guidecolor="#00ff0a"
+     guideopacity="0.49803922"
+     inkscape:grid-points="true"
+     inkscape:window-width="1098"
+     inkscape:window-height="904"
+     inkscape:window-x="149"
+     inkscape:window-y="42"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:object-points="true"
+     inkscape:object-nodes="true"
+     inkscape:object-bbox="true">
+    <sodipodi:guide
+       orientation="vertical"
+       position="224"
+       id="guide10639" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="227.64729"
+       id="guide10641" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="220"
+       id="guide10643" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="268.4015"
+       id="guide10645" />
+  </sodipodi:namedview>
+  <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" />
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Patrick Strasser &lt;patrick.strasser@tugraz.at&gt;</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:description>Icon/Symbol for the GNURadio Companion</dc:description>
+        <dc:title>grc-icon.svg</dc:title>
+        <dc:date>2007-02-23</dc:date>
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/by-sa/2.5/">
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/Distribution" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Notice" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/Attribution" />
+        <cc:permits
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+        <cc:requires
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-796.3622)">
+    <g
+       id="g7451"
+       transform="matrix(1.025628,0,0,1.030546,-0.101723,-32.00742)">
+      <path
+         id="rect2760"
+         d="M 4.1981031,916.37787 L 160.00074,916.37787 L 160.00074,1048.3467 L 4.1981031,1048.3467 L 4.1981031,916.37787 z "
+         style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.78145933;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <g
+         transform="matrix(0.995753,0,0,1.003897,164.8198,-8.972397)"
+         id="g2789"
+         style="stroke-width:8;stroke-miterlimit:4;stroke-dasharray:none">
+        <rect
+           style="fill:url(#linearGradient2801);fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.78288651;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+           id="rect9020"
+           width="140.1604"
+           height="16.796082"
+           x="-145"
+           y="921.75818" />
+        <path
+           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.78288651;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="M -161.50649,938.55428 L -4.8395996,938.55428"
+           id="path9005" />
+      </g>
+    </g>
+    <g
+       id="g5503"
+       transform="matrix(1.028571,0,0,1.172413,-5.14284,-137.9928)">
+      <rect
+         y="800.36212"
+         x="40"
+         height="116.00005"
+         width="140"
+         id="rect4562"
+         style="fill:#f3c690;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.28504848;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <g
+         transform="matrix(0.921053,0,0,1,26.93956,1.859948)"
+         id="g3694">
+        <path
+           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.59084845;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="M 44,820.3622 L 136.35974,820.3622"
+           id="path4564" />
+        <path
+           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.59084749;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="M 80,811.74976 L 80,828.3622"
+           id="path5451" />
+      </g>
+      <g
+         id="g5499">
+        <rect
+           style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.28504944;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+           id="rect7223"
+           width="140"
+           height="68.000015"
+           x="40"
+           y="848.36218" />
+        <path
+           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:7.28505039;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="M 57.001362,905.90132 C 88.923615,905.8552 86.182775,867.89142 95.399136,867.52563 C 104.60967,867.16008 113.73233,867.60291 124.38688,868.00066 C 137.23411,868.48027 130.39915,906.48027 162.99863,906.48027"
+           id="path7225"
+           sodipodi:nodetypes="czss" />
+      </g>
+    </g>
+    <rect
+       style="fill:#b890f3;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999952;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect14319"
+       width="79.999992"
+       height="64.000023"
+       x="27.999992"
+       y="960.36249" />
+    <rect
+       style="fill:#f3c690;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999905;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect15206"
+       width="24.000004"
+       height="24.000004"
+       x="108"
+       y="980.36218" />
+    <path
+       id="path13320"
+       style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:7.99999666;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 220.97574,800.36203 L 220.97574,865.80513 C 236.42474,865.93437 248.49884,861.19996 248.96304,854.45866 C 249.42721,847.71737 237.26568,843.20829 221.81667,846.27676 C 206.36767,849.34522 193.45938,858.02071 192.98843,867.61976 C 192.53101,876.94268 204.68583,884.63729 220.13479,885.43882 C 235.58379,885.69443 248.49884,880.72833 248.96304,873.98703 C 249.42721,867.24575 237.26567,862.73666 221.81666,865.80513 C 206.36766,868.8736 193.45939,877.54909 192.98843,887.14813 C 192.53101,896.47106 204.68582,904.16566 220.13479,904.86701 C 235.5838,905.02246 248.49885,900.05636 248.96305,893.31506 C 249.42722,886.57378 237.26568,882.06469 221.81667,885.13316 C 206.36767,888.20162 193.45939,896.87711 192.98844,906.47616 C 192.53102,915.79909 204.68583,923.49369 220.13479,923.98015 C 235.58379,923.92069 248.49884,918.95459 248.96304,912.21329 C 249.42721,905.47201 237.26567,900.96293 221.81666,904.0314 C 206.36766,907.09986 193.45939,915.77535 192.98843,925.37439 C 192.53101,934.69732 207.20989,943.06708 221.81667,943.00644 L 221.81667,967.97713 C 221.63716,982.45754 209.62079,992.36197 195.88792,992.36199 L 132.42659,992.36199"
+       sodipodi:nodetypes="cccssscssscssscssccc" />
+  </g>
+</svg>
diff --git a/grc/freedesktop/grc-icon-32.png b/grc/freedesktop/grc-icon-32.png
new file mode 100644 (file)
index 0000000..1e4f4f6
Binary files /dev/null and b/grc/freedesktop/grc-icon-32.png differ
diff --git a/grc/freedesktop/grc-icon-48.png b/grc/freedesktop/grc-icon-48.png
new file mode 100644 (file)
index 0000000..caddc92
Binary files /dev/null and b/grc/freedesktop/grc-icon-48.png differ
index 93a9a05c0ef24f19b73099156a3753cb754bfcda..4073c92f88a9afb8a40494d94a6a7e61d00c36f5 100755 (executable)
@@ -18,7 +18,8 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from gnuradio.grc.platforms.base.Constants import VERSION, FLOW_GRAPH_FILE_EXTENSION
+from gnuradio.grc.gui.Constants import FLOW_GRAPH_FILE_EXTENSION
+from gnuradio.grc.platforms.base.Constants import VERSION
 from optparse import OptionParser
 
 if __name__ == "__main__":
index 95825bd0acbaaeca4b76a3ec0b321574c15e1a41..7558d16aec311d95dd6a3609f4683248ef847ebf 100644 (file)
@@ -18,9 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
 import os
-import signal
-from .. platforms.base.Constants import PY_GTK_ICON, IMAGE_FILE_EXTENSION
-from Constants import DIR_LEFT, DIR_RIGHT
+import signal 
+from Constants import DIR_LEFT, DIR_RIGHT, IMAGE_FILE_EXTENSION
 import Actions
 import pygtk
 pygtk.require('2.0')
@@ -54,7 +53,9 @@ class ActionHandler:
                """
                self.clipboard = None
                platform = Platform(platform)
-               if PY_GTK_ICON: gtk.window_set_default_icon_from_file(PY_GTK_ICON)
+               #setup icon using icon theme
+               try: gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc', 256, 0))
+               except: pass
                for action in Actions.ACTIONS_LIST: action.connect('activate', self._handle_actions)
                #setup the main window
                self.main_window = MainWindow(self.handle_states, platform)
index 804fff4c9a45a303d74dd4c81ae08f7d8cb49366..f5803cc17923292102016a7f62026c2e55515e0f 100644 (file)
@@ -17,10 +17,19 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-##The name for new/unsaved flow graphs
+import os
+
+##default path for the open/save dialogs
+DEFAULT_FILE_PATH = os.getcwd()
+
+##file extensions
+FLOW_GRAPH_FILE_EXTENSION = '.grc'
+IMAGE_FILE_EXTENSION = '.png'
+
+##name for new/unsaved flow graphs
 NEW_FLOGRAPH_TITLE = 'untitled'
 
-##Rotation constants
+##rotation constants
 DIR_LEFT = 'left'
 DIR_RIGHT = 'right'
 
index 320c1161cdc64b5057936289e30cfdbf373b7cf8..2758e909b2d35b43894ba17356dff1f8ed21d4f4 100644 (file)
@@ -21,10 +21,9 @@ import pygtk
 pygtk.require('2.0')
 import gtk
 from Dialogs import MessageDialogHelper
-from Constants import NEW_FLOGRAPH_TITLE
-from .. platforms.base.Constants import \
+from Constants import \
        DEFAULT_FILE_PATH, FLOW_GRAPH_FILE_EXTENSION, \
-       IMAGE_FILE_EXTENSION
+       IMAGE_FILE_EXTENSION, NEW_FLOGRAPH_TITLE
 from os import path
 
 OPEN_FLOW_GRAPH = 'open flow graph'
index 16bbd8dba9f50795bcab91d5c92820da1d33c6c8..647c4db1e759a1d4967025613bd3bac58c377c69 100644 (file)
@@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
 from Constants import \
        MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT, \
-       NEW_FLOGRAPH_TITLE, REPORTS_WINDOW_HEIGHT
-from .. platforms.base.Constants import FLOW_GRAPH_FILE_EXTENSION
+       NEW_FLOGRAPH_TITLE, REPORTS_WINDOW_HEIGHT, \
+       FLOW_GRAPH_FILE_EXTENSION
 from Actions import APPLICATION_QUIT, FLOW_GRAPH_KILL
 import pygtk
 pygtk.require('2.0')
index 08b3da5cc68d948fa3f673866d537e46f96b494e..80c4232b819e3ac09f18e7bc92725c9abd49b071 100644 (file)
@@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from .. platforms.base.Constants import HOME_DIR, FLOW_GRAPH_DTD
+from .. platforms.base.Constants import FLOW_GRAPH_DTD
 from .. utils import ParseXML
 import Messages
 import os
@@ -38,7 +38,7 @@ class _Preferences(object):
                #get prefs block
                self._prefs_block = platform.get_prefs_block()
                #prefs file path
-               self._prefs_file_path = os.path.join(HOME_DIR, self._prefs_block.get_param('prefs_file').get_value())
+               self._prefs_file_path = os.path.join(os.path.expanduser('~'), self._prefs_block.get_param('prefs_file').get_value())
                #load
                try:
                        ParseXML.validate_dtd(self._prefs_file_path, FLOW_GRAPH_DTD)
index 4ee4278f1c94cdc5d4dbf5859f7512ae734332ea..6d60f24930bcfea1ff51ea118c8b4722c1eac4d8 100644 (file)
@@ -19,29 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
 import os
 
-##The package name.
+#package and version constants
 PACKAGE = '@PACKAGE@'
-
-##The current version.
 VERSION = '@VERSION@'
 
-##Location of external data files.
+#setup paths
 DATA_DIR = '@datadir@'
-
-##DTD validator for saved flow graphs.
 FLOW_GRAPH_DTD = os.path.join(DATA_DIR, 'flow_graph.dtd')
-
-##The default file extension for flow graphs.
-FLOW_GRAPH_FILE_EXTENSION = '.grc'
-
-##The default file extension for saving flow graph snap shots.
-IMAGE_FILE_EXTENSION = '.png'
-
-##The default path for the open/save dialogs.
-DEFAULT_FILE_PATH = os.getcwd()
-
-##The default icon for the gtk windows.
-PY_GTK_ICON = os.path.join(DATA_DIR, 'grc-icon-256.png')
-
-##The users home directory.
-HOME_DIR = os.path.expanduser('~')
+BLOCK_TREE_DTD = os.path.join(DATA_DIR, 'block_tree.dtd')
index 2904208ccf1502104a82ca14965efdd5a15df856..ee6cd3ba31ee04ec86fb76d5fb823891dec125a2 100644 (file)
@@ -26,7 +26,7 @@ from Connection import Connection as _Connection
 from Block import Block as _Block
 from Port import Port as _Port
 from Param import Param as _Param
-from Constants import DATA_DIR
+from Constants import BLOCK_TREE_DTD
 
 class Platform(_Element):
 
@@ -102,7 +102,7 @@ class Platform(_Element):
                                block_tree.add_block(parent, self.get_block(block_key))
                #load the block tree
                f = self._block_tree
-               try: ParseXML.validate_dtd(f, os.path.join(DATA_DIR, 'block_tree.dtd'))
+               try: ParseXML.validate_dtd(f, BLOCK_TREE_DTD)
                except ParseXML.XMLSyntaxError, e: self._exit_with_error('Block tree "%s" failed: \n\t%s'%(f, e))
                #add all blocks in the tree
                load_category(ParseXML.from_file(f)['cat'])
index a2e09172c25b544a416f34383de9e8f2cd465426..013a8f84f9b0d3726307ba7675522767a052534f 100644 (file)
@@ -25,6 +25,7 @@ import gtk
 import pango
 import gobject
 from Constants import PARAM_LABEL_FONT, PARAM_FONT
+from ... gui.Constants import DEFAULT_FILE_PATH
 from os import path
 
 ######################################################################################################
index c31701e0e0a333efcf07c31e7d125917d12f2d34..d1c8a36a8027e2fd9a18f0398878c2a7238d34e8 100644 (file)
@@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
 import os
-from .. base.Constants import FLOW_GRAPH_FILE_EXTENSION
 from .. base.Platform import Platform as _Platform
 from FlowGraph import FlowGraph as _FlowGraph
 from Connection import Connection as _Connection