commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 09/18: grc-refactor: move Messages to core


From: git
Subject: [Commit-gnuradio] [gnuradio] 09/18: grc-refactor: move Messages to core
Date: Sun, 24 Apr 2016 19:19:37 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit d905f0d803574acd158183135e113b807bd7c878
Author: Sebastian Koslowski <address@hidden>
Date:   Wed Feb 10 21:52:44 2016 +0100

    grc-refactor: move Messages to core
---
 grc/core/FlowGraph.py           |  4 ++--
 grc/{gui => core}/Messages.py   | 35 +++++++++++++++++------------------
 grc/core/Platform.py            |  5 ++---
 grc/core/generator/Generator.py | 17 +++++++----------
 grc/gui/ActionHandler.py        | 23 ++++++++++-------------
 grc/gui/Dialogs.py              |  6 ++----
 grc/gui/FlowGraph.py            | 13 +++++++------
 grc/gui/MainWindow.py           | 24 +++++++++++-------------
 volk                            |  2 +-
 9 files changed, 59 insertions(+), 70 deletions(-)

diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py
index e7a4b10..86d2bf6 100644
--- a/grc/core/FlowGraph.py
+++ b/grc/core/FlowGraph.py
@@ -22,10 +22,10 @@ from operator import methodcaller
 
 import re
 
-from .utils import odict, expr_utils
+from . import Messages
 from .Constants import FLOW_GRAPH_FILE_FORMAT_VERSION
 from .Element import Element
-from ..gui import Messages
+from .utils import odict, expr_utils
 
 _variable_matcher = re.compile('^(variable\w*)$')
 _parameter_matcher = re.compile('^(parameter)$')
diff --git a/grc/gui/Messages.py b/grc/core/Messages.py
similarity index 79%
rename from grc/gui/Messages.py
rename to grc/core/Messages.py
index 551a8ce..641ff72 100644
--- a/grc/gui/Messages.py
+++ b/grc/core/Messages.py
@@ -1,21 +1,20 @@
-"""
-Copyright 2007 Free Software Foundation, Inc.
-This file is part of GNU Radio
-
-GNU Radio Companion 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 2
-of the License, or (at your option) any later version.
-
-GNU Radio Companion 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 this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-"""
+# Copyright 2007, 2015 Free Software Foundation, Inc.
+# This file is part of GNU Radio
+#
+# GNU Radio Companion 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 2
+# of the License, or (at your option) any later version.
+#
+# GNU Radio Companion 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA
+
 
 import traceback
 import sys
diff --git a/grc/core/Platform.py b/grc/core/Platform.py
index 40e3e9c..2907342 100644
--- a/grc/core/Platform.py
+++ b/grc/core/Platform.py
@@ -21,16 +21,15 @@ import os
 import sys
 from gnuradio import gr
 
-from . import ParseXML
+from . import ParseXML, Messages
 from .Constants import (
     BLOCK_TREE_DTD, FLOW_GRAPH_DTD, DOMAIN_DTD,
     HIER_BLOCKS_LIB_DIR, BLOCK_DTD, DEFAULT_FLOW_GRAPH, BLOCKS_DIRS,
     PREFS_FILE, CORE_TYPES, PREFS_FILE_OLD,
 )
 from .Element import Element
-from .utils import odict, extract_docs
-from ..gui import Messages
 from .generator import Generator
+from .utils import odict, extract_docs
 
 
 class Platform(Element):
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index 5ac8478..e83b74d 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -17,27 +17,24 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-import os
-import sys
+import shlex
 import subprocess
+import sys
 import tempfile
-import shlex
-import codecs
-import re  # for shlex_quote
 from distutils.spawn import find_executable
 
+import codecs
+import os
+import re  # for shlex_quote
 from Cheetah.Template import Template
 
 from .FlowGraphProxy import FlowGraphProxy
-from .. import ParseXML
-from ..utils import expr_utils, odict
+from .. import ParseXML, Messages
 from ..Constants import (
     TOP_BLOCK_FILE_MODE, BLOCK_FLAG_NEED_QT_GUI,
     XTERM_EXECUTABLE, HIER_BLOCK_FILE_MODE, HIER_BLOCKS_LIB_DIR, BLOCK_DTD
 )
-
-from grc.gui import Messages
-
+from ..utils import expr_utils, odict
 
 DATA_DIR = os.path.dirname(__file__)
 FLOW_GRAPH_TEMPLATE = os.path.join(DATA_DIR, 'flow_graph.tmpl')
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 6a93574..ab7839b 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -17,28 +17,25 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
+import os
 import subprocess
 from threading import Thread
 
-import os
-import pygtk
-
-pygtk.require('2.0')
 import gtk
 import gobject
 
-
-from ..core import Constants, ParseXML
-from .. core.Constants import XTERM_EXECUTABLE
-
-from . import Dialogs, Messages, Preferences, Actions
-from .ParserErrorsDialog import ParserErrorsDialog
-from .MainWindow import MainWindow
-from .PropsDialog import PropsDialog
+from . import Dialogs, Preferences, Actions
+from .Constants import DEFAULT_CANVAS_SIZE, IMAGE_FILE_EXTENSION, GR_PREFIX
 from .FileDialogs import (OpenFlowGraphFileDialog, SaveFlowGraphFileDialog,
                           SaveReportsFileDialog, SaveScreenShotDialog,
                           OpenQSSFileDialog)
-from .Constants import DEFAULT_CANVAS_SIZE, IMAGE_FILE_EXTENSION, GR_PREFIX
+from .MainWindow import MainWindow
+from .ParserErrorsDialog import ParserErrorsDialog
+from .PropsDialog import PropsDialog
+
+from ..core import Constants, ParseXML
+from ..core.Constants import XTERM_EXECUTABLE
+from ..core import Messages
 
 gobject.threads_init()
 
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index f294125..7d55e1b 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -17,15 +17,13 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-import pygtk
-pygtk.require('2.0')
 import gtk
 
 import sys
 from distutils.spawn import find_executable
 
-
-from . import Utils, Actions, Constants, Messages
+from . import Utils, Actions, Constants
+from ..core import Messages
 
 
 class SimpleTextDisplay(gtk.TextView):
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 28fc48f..25fb157 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -17,20 +17,21 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-import random
 import functools
+import random
+from distutils.spawn import find_executable
 from itertools import chain, count
 from operator import methodcaller
-from distutils.spawn import find_executable
 
 import gobject
 
-from . import Actions, Colors, Constants, Utils, Messages, Bars, Dialogs
-from . Element import Element
-from . Constants import SCROLL_PROXIMITY_SENSITIVITY, SCROLL_DISTANCE
-from . external_editor import ExternalEditor
+from . import Actions, Colors, Constants, Utils, Bars, Dialogs
+from .Constants import SCROLL_PROXIMITY_SENSITIVITY, SCROLL_DISTANCE
+from .Element import Element
+from .external_editor import ExternalEditor
 
 from ..core.FlowGraph import FlowGraph as _Flowgraph
+from ..core import Messages
 
 
 class FlowGraph(Element, _Flowgraph):
diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py
index a340bcc..18118db 100644
--- a/grc/gui/MainWindow.py
+++ b/grc/gui/MainWindow.py
@@ -17,21 +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
 """
 
-from Constants import \
-    NEW_FLOGRAPH_TITLE, DEFAULT_REPORTS_WINDOW_WIDTH
-import Actions
-import pygtk
-pygtk.require('2.0')
-import gtk
-import Bars
-from BlockTreeWindow import BlockTreeWindow
-from Dialogs import TextDisplay, MessageDialogHelper
-from NotebookPage import NotebookPage
-import Preferences
-import Messages
-import Utils
 import os
 
+import gtk
+
+from . import Bars, Actions, Preferences, Utils
+from .BlockTreeWindow import BlockTreeWindow
+from .Constants import \
+    NEW_FLOGRAPH_TITLE, DEFAULT_REPORTS_WINDOW_WIDTH
+from .Dialogs import TextDisplay, MessageDialogHelper
+from .NotebookPage import NotebookPage
+
+from ..core import Messages
+
 MAIN_WINDOW_TITLE_TMPL = """\
 #if not $saved
 *#slurp
diff --git a/volk b/volk
index 41b4df0..c2c7f82 160000
--- a/volk
+++ b/volk
@@ -1 +1 @@
-Subproject commit 41b4df055b2c8d4f2c23ad2bdc60c0b47b4f0dd8
+Subproject commit c2c7f82aea2ed99df66fad2b91ed29791d7818a5



reply via email to

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