commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9668 - in gnuradio/trunk: config grc grc/data/platfor


From: jblum
Subject: [Commit-gnuradio] r9668 - in gnuradio/trunk: config grc grc/data/platforms/base grc/data/platforms/python grc/freedesktop grc/scripts grc/src/gui grc/src/platforms/base grc/src/platforms/gui grc/src/platforms/python
Date: Sat, 27 Sep 2008 21:35:22 -0600 (MDT)

Author: jblum
Date: 2008-09-27 21:35:21 -0600 (Sat, 27 Sep 2008)
New Revision: 9668

Added:
   gnuradio/trunk/grc/freedesktop/
   gnuradio/trunk/grc/freedesktop/Makefile.am
   gnuradio/trunk/grc/freedesktop/gnuradio-grc.desktop
   gnuradio/trunk/grc/freedesktop/gnuradio-grc.xml
   gnuradio/trunk/grc/freedesktop/gnuradio-usrp_diagnostics.desktop
   gnuradio/trunk/grc/freedesktop/grc-icon-256.png
   gnuradio/trunk/grc/freedesktop/grc-icon-256.svg
   gnuradio/trunk/grc/freedesktop/grc-icon-32.png
   gnuradio/trunk/grc/freedesktop/grc-icon-48.png
Removed:
   gnuradio/trunk/grc/data/platforms/base/grc-icon-256.png
   gnuradio/trunk/grc/data/platforms/base/grc-icon-256.svg
   gnuradio/trunk/grc/data/platforms/base/grc-icon-32.png
Modified:
   gnuradio/trunk/config/grc_grc.m4
   gnuradio/trunk/grc/Makefile.am
   gnuradio/trunk/grc/data/platforms/base/Makefile.am
   gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl
   gnuradio/trunk/grc/scripts/grc
   gnuradio/trunk/grc/src/gui/ActionHandler.py
   gnuradio/trunk/grc/src/gui/Constants.py
   gnuradio/trunk/grc/src/gui/FileDialogs.py
   gnuradio/trunk/grc/src/gui/MainWindow.py
   gnuradio/trunk/grc/src/gui/Preferences.py
   gnuradio/trunk/grc/src/platforms/base/Constants.py.in
   gnuradio/trunk/grc/src/platforms/base/Platform.py
   gnuradio/trunk/grc/src/platforms/gui/Param.py
   gnuradio/trunk/grc/src/platforms/python/Platform.py
Log:
freedesktop

Modified: gnuradio/trunk/config/grc_grc.m4
===================================================================
--- gnuradio/trunk/config/grc_grc.m4    2008-09-27 20:19:25 UTC (rev 9667)
+++ gnuradio/trunk/config/grc_grc.m4    2008-09-28 03:35:21 UTC (rev 9668)
@@ -76,6 +76,7 @@
         grc/data/platforms/python/Makefile \
         grc/data/platforms/python/blocks/Makefile \
         grc/scripts/Makefile \
+        grc/freedesktop/Makefile \
     ])
 
     GRC_BUILD_CONDITIONAL(grc)

Modified: gnuradio/trunk/grc/Makefile.am
===================================================================
--- gnuradio/trunk/grc/Makefile.am      2008-09-27 20:19:25 UTC (rev 9667)
+++ gnuradio/trunk/grc/Makefile.am      2008-09-28 03:35:21 UTC (rev 9668)
@@ -24,5 +24,6 @@
 SUBDIRS = \
        data \
        examples \
+       freedesktop \
        scripts \
        src

Modified: gnuradio/trunk/grc/data/platforms/base/Makefile.am
===================================================================
--- gnuradio/trunk/grc/data/platforms/base/Makefile.am  2008-09-27 20:19:25 UTC 
(rev 9667)
+++ gnuradio/trunk/grc/data/platforms/base/Makefile.am  2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -25,7 +25,4 @@
 
 dist_ourdata_DATA = \
        block_tree.dtd \
-       flow_graph.dtd \
-       grc-icon-256.png \
-       grc-icon-256.svg \
-       grc-icon-32.png
+       flow_graph.dtd

Deleted: gnuradio/trunk/grc/data/platforms/base/grc-icon-256.png

Deleted: gnuradio/trunk/grc/data/platforms/base/grc-icon-256.svg

Deleted: gnuradio/trunk/grc/data/platforms/base/grc-icon-32.png

Modified: gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl    2008-09-27 
20:19:25 UTC (rev 9667)
+++ gnuradio/trunk/grc/data/platforms/python/flow_graph.tmpl    2008-09-28 
03:35:21 UTC (rev 9668)
@@ -41,15 +41,18 @@
 #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):


Property changes on: gnuradio/trunk/grc/freedesktop
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in


Added: gnuradio/trunk/grc/freedesktop/Makefile.am
===================================================================
--- gnuradio/trunk/grc/freedesktop/Makefile.am                          (rev 0)
+++ gnuradio/trunk/grc/freedesktop/Makefile.am  2008-09-28 03:35:21 UTC (rev 
9668)
@@ -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

Added: gnuradio/trunk/grc/freedesktop/gnuradio-grc.desktop
===================================================================
--- gnuradio/trunk/grc/freedesktop/gnuradio-grc.desktop                         
(rev 0)
+++ gnuradio/trunk/grc/freedesktop/gnuradio-grc.desktop 2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -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

Added: gnuradio/trunk/grc/freedesktop/gnuradio-grc.xml
===================================================================
--- gnuradio/trunk/grc/freedesktop/gnuradio-grc.xml                             
(rev 0)
+++ gnuradio/trunk/grc/freedesktop/gnuradio-grc.xml     2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -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>

Added: gnuradio/trunk/grc/freedesktop/gnuradio-usrp_diagnostics.desktop
===================================================================
--- gnuradio/trunk/grc/freedesktop/gnuradio-usrp_diagnostics.desktop            
                (rev 0)
+++ gnuradio/trunk/grc/freedesktop/gnuradio-usrp_diagnostics.desktop    
2008-09-28 03:35:21 UTC (rev 9668)
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=USRP Diagnostics
+Exec=usrp_diagnostics
+Categories=Development;
+Icon=gnuradio-grc

Copied: gnuradio/trunk/grc/freedesktop/grc-icon-256.png (from rev 9664, 
gnuradio/trunk/grc/data/platforms/base/grc-icon-256.png)
===================================================================
(Binary files differ)

Copied: gnuradio/trunk/grc/freedesktop/grc-icon-256.svg (from rev 9664, 
gnuradio/trunk/grc/data/platforms/base/grc-icon-256.svg)
===================================================================
--- gnuradio/trunk/grc/freedesktop/grc-icon-256.svg                             
(rev 0)
+++ gnuradio/trunk/grc/freedesktop/grc-icon-256.svg     2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -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;address@hidden&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>

Copied: gnuradio/trunk/grc/freedesktop/grc-icon-32.png (from rev 9664, 
gnuradio/trunk/grc/data/platforms/base/grc-icon-32.png)
===================================================================
(Binary files differ)

Added: gnuradio/trunk/grc/freedesktop/grc-icon-48.png
===================================================================
(Binary files differ)


Property changes on: gnuradio/trunk/grc/freedesktop/grc-icon-48.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: gnuradio/trunk/grc/scripts/grc
===================================================================
--- gnuradio/trunk/grc/scripts/grc      2008-09-27 20:19:25 UTC (rev 9667)
+++ gnuradio/trunk/grc/scripts/grc      2008-09-28 03:35:21 UTC (rev 9668)
@@ -18,7 +18,8 @@
 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__":

Modified: gnuradio/trunk/grc/src/gui/ActionHandler.py
===================================================================
--- gnuradio/trunk/grc/src/gui/ActionHandler.py 2008-09-27 20:19:25 UTC (rev 
9667)
+++ gnuradio/trunk/grc/src/gui/ActionHandler.py 2008-09-28 03:35:21 UTC (rev 
9668)
@@ -18,9 +18,8 @@
 """
 
 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 @@
                """
                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)

Modified: gnuradio/trunk/grc/src/gui/Constants.py
===================================================================
--- gnuradio/trunk/grc/src/gui/Constants.py     2008-09-27 20:19:25 UTC (rev 
9667)
+++ gnuradio/trunk/grc/src/gui/Constants.py     2008-09-28 03:35:21 UTC (rev 
9668)
@@ -17,10 +17,19 @@
 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'
 

Modified: gnuradio/trunk/grc/src/gui/FileDialogs.py
===================================================================
--- gnuradio/trunk/grc/src/gui/FileDialogs.py   2008-09-27 20:19:25 UTC (rev 
9667)
+++ gnuradio/trunk/grc/src/gui/FileDialogs.py   2008-09-28 03:35:21 UTC (rev 
9668)
@@ -21,10 +21,9 @@
 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'

Modified: gnuradio/trunk/grc/src/gui/MainWindow.py
===================================================================
--- gnuradio/trunk/grc/src/gui/MainWindow.py    2008-09-27 20:19:25 UTC (rev 
9667)
+++ gnuradio/trunk/grc/src/gui/MainWindow.py    2008-09-28 03:35:21 UTC (rev 
9668)
@@ -19,8 +19,8 @@
 
 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')

Modified: gnuradio/trunk/grc/src/gui/Preferences.py
===================================================================
--- gnuradio/trunk/grc/src/gui/Preferences.py   2008-09-27 20:19:25 UTC (rev 
9667)
+++ gnuradio/trunk/grc/src/gui/Preferences.py   2008-09-28 03:35:21 UTC (rev 
9668)
@@ -17,7 +17,7 @@
 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 @@
                #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)

Modified: gnuradio/trunk/grc/src/platforms/base/Constants.py.in
===================================================================
--- gnuradio/trunk/grc/src/platforms/base/Constants.py.in       2008-09-27 
20:19:25 UTC (rev 9667)
+++ gnuradio/trunk/grc/src/platforms/base/Constants.py.in       2008-09-28 
03:35:21 UTC (rev 9668)
@@ -19,29 +19,11 @@
 
 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')

Modified: gnuradio/trunk/grc/src/platforms/base/Platform.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/base/Platform.py   2008-09-27 20:19:25 UTC 
(rev 9667)
+++ gnuradio/trunk/grc/src/platforms/base/Platform.py   2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -26,7 +26,7 @@
 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 @@
                                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'])

Modified: gnuradio/trunk/grc/src/platforms/gui/Param.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/gui/Param.py       2008-09-27 20:19:25 UTC 
(rev 9667)
+++ gnuradio/trunk/grc/src/platforms/gui/Param.py       2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -25,6 +25,7 @@
 import pango
 import gobject
 from Constants import PARAM_LABEL_FONT, PARAM_FONT
+from ... gui.Constants import DEFAULT_FILE_PATH
 from os import path
 
 
######################################################################################################

Modified: gnuradio/trunk/grc/src/platforms/python/Platform.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/python/Platform.py 2008-09-27 20:19:25 UTC 
(rev 9667)
+++ gnuradio/trunk/grc/src/platforms/python/Platform.py 2008-09-28 03:35:21 UTC 
(rev 9668)
@@ -18,7 +18,6 @@
 """
 
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]