X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=grc%2Fscripts%2Fgrc;h=a4115c39f367d7785d6ecd991d92d74bff0e864a;hb=fefb71787e7e365049743f210b18a6f04f13d47b;hp=93a9a05c0ef24f19b73099156a3753cb754bfcda;hpb=c86f6c23c6883f73d953d64c28ab42cedb77e4d7;p=debian%2Fgnuradio diff --git a/grc/scripts/grc b/grc/scripts/grc index 93a9a05c..a4115c39 100755 --- a/grc/scripts/grc +++ b/grc/scripts/grc @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -Copyright 2008 Free Software Foundation, Inc. +Copyright 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -18,11 +18,23 @@ 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 +import pygtk +pygtk.require('2.0') +import gtk + +try: from gnuradio import gr +except ImportError, e: + d = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_CLOSE, message_format=""" +Cannot import gnuradio. Are your PYTHONPATH and LD_LIBRARY_PATH set correctly?""") + d.set_title(str(e)) + d.run() + exit(-1) + +from gnuradio import gr from optparse import OptionParser if __name__ == "__main__": - usage = 'usage: %%prog [options] [optional_flow_graphs%s]'%FLOW_GRAPH_FILE_EXTENSION + usage = 'usage: %prog [options] [saved flow graphs]' version = """ GNU Radio Companion %s @@ -30,10 +42,13 @@ This program is part of GNU Radio GRC comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it. -"""%VERSION +"""%gr.version() parser = OptionParser(usage=usage, version=version) (options, args) = parser.parse_args() - from gnuradio.grc.platforms.python.Platform import Platform + from gnuradio.grc.python.Platform import Platform from gnuradio.grc.gui.ActionHandler import ActionHandler + #setup icon using icon theme + try: gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc', 256, 0)) + except: pass ActionHandler(args, Platform())