Permalink
Browse files

Merge branch 'hotfix/v1.0.6' into develop

  • Loading branch information...
2 parents 67181e9 + 8bd710c commit b7ae92fa7303d5dd544a22d4073c42a8128f313b @KelSolaar committed Dec 2, 2012
View
17 CHANGES.rst
@@ -1,11 +1,20 @@
-**Umbra** - 1.0.5 - Stable
+**Umbra** - 1.0.6 - Stable
==========================
.. .changes
Changes
=======
+1.0.6 - Stable
+--------------
+
+| **Umbra** 1.0.6 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=7&state=closed
+| **Foundations** 2.0.6 - Stable - Milestone: https://github.com/KelSolaar/Foundations/issues?milestone=4&page=1&state=closed
+
+- Ensured **Reporter** is not initialising the "Crittercism" Client API 2 times.
+- Fixed **Search And Replace** dialog patterns related exception.
+
1.0.5 - Stable
--------------
@@ -21,7 +30,7 @@ Changes
| **Manager** 2.0.3 - Stable - https://github.com/KelSolaar/Manager/issues?milestone=2&state=closed
| **Foundations** 2.0.4 - Stable - Milestone: https://github.com/KelSolaar/Foundations/issues?milestone=2&state=closed
-- Implemented an unhandled exceptions reporter connected to https://www.crittercism.com/
+- Implemented an unhandled exceptions **Reporter** connected to https://www.crittercism.com/
- Implemented **Trace Ui** Component.
- Reloading a Component will reload its dependencies in **Components Manager Ui** Component.
- Implemented command line support for modules execution tracing through **-t, --traceModules** parameter.
@@ -43,7 +52,7 @@ Changes
1.0.2 - Stable
--------------
-| **Umbra** 1.0.2 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=2&state=closed
+**Umbra** 1.0.2 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=2&state=closed
- Updated package directory structure to be compliant with **Python Package Index**.
- Added documentation / Api files.
@@ -62,7 +71,7 @@ Changes
1.0.1 - Beta
------------
-| **Umbra** 1.0.1 - Beta - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=1&state=closed
+**Umbra** 1.0.1 - Beta - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=1&state=closed
- Implemented notifications manager code.
- Implemented **Search In Files** in **Script Editor** Component.
View
5 docs/help/Umbra_Manual.html
@@ -177,7 +177,10 @@
<div class="section" id="id6">
<h1>
<span class="target" id="changes">Changes</span>
- </h1><br />
+ </h1>
+ <p>
+ <strong>Umbra</strong> Changes file is available here: <a class="reference external" href="http://thomasmansencal.com/Sharing/Umbra/Changes/Changes.html">Umbra - Changes</a>
+ </p><br />
<!-- .about -->
</div>
<div class="section" id="id7">
View
2 docs/help/Umbra_Manual.rst
@@ -97,6 +97,8 @@ _`Api`
_`Changes`
==========
+**Umbra** Changes file is available here: `Umbra - Changes <http://thomasmansencal.com/Sharing/Umbra/Changes/Changes.html>`_
+
.. raw:: html
<br/>
View
15 docs/sphinx/source/resources/pages/changes.rst
@@ -1,6 +1,15 @@
Changes
=======
+1.0.6 - Stable
+--------------
+
+| **Umbra** 1.0.6 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=7&state=closed
+| **Foundations** 2.0.6 - Stable - Milestone: https://github.com/KelSolaar/Foundations/issues?milestone=4&page=1&state=closed
+
+- Ensured **Reporter** is not initialising the "Crittercism" Client API 2 times.
+- Fixed **Search And Replace** dialog patterns related exception.
+
1.0.5 - Stable
--------------
@@ -16,7 +25,7 @@ Changes
| **Manager** 2.0.3 - Stable - https://github.com/KelSolaar/Manager/issues?milestone=2&state=closed
| **Foundations** 2.0.4 - Stable - Milestone: https://github.com/KelSolaar/Foundations/issues?milestone=2&state=closed
-- Implemented an unhandled exceptions reporter connected to https://www.crittercism.com/
+- Implemented an unhandled exceptions **Reporter** connected to https://www.crittercism.com/
- Implemented **TraceUi** Component.
- Reloading a Component will reload its dependencies in **componentsManagerUi** Component.
- Implemented command line support for modules execution tracing through **-t, --traceModules** parameter.
@@ -38,7 +47,7 @@ Changes
1.0.2 - Stable
--------------
-| **Umbra** 1.0.2 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=2&state=closed
+**Umbra** 1.0.2 - Stable - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=2&state=closed
- Updated package directory structure to be compliant with **Python Package Index**.
- Added documentation / Api files.
@@ -57,7 +66,7 @@ Changes
1.0.1 - Beta
------------
-| **Umbra** 1.0.1 - Beta - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=1&state=closed
+**Umbra** 1.0.1 - Beta - Milestone: https://github.com/KelSolaar/Umbra/issues?milestone=1&state=closed
- Implemented notifications manager code.
- Implemented **Search In Files** in **Script Editor** Component.
View
2 umbra/components/addons/traceUi/models.py
@@ -52,7 +52,7 @@ def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalH
:param rootNode: Root node. ( AbstractCompositeNode )
:param horizontalHeaders: Headers. ( OrderedDict )
:param verticalHeaders: Headers. ( OrderedDict )
- :param defaultNode: Default node. ( AbstractCompositeNode )
+ :param defaultNode: Default node. ( GraphModelNode )
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
View
2 umbra/components/factory/componentsManagerUi/componentsManagerUi.py
@@ -767,7 +767,7 @@ def __view_selectionModel__selectionChanged(self, selectedItems, deselectedItems
else:
content.append(self.__componentsInformationsDefaultText)
- separator = len(content) == 1 and "" or "<p><center>* * *<center/></p>"
+ separator = str() if len(content) == 1 else "<p><center>* * *<center/></p>"
self.Components_Informations_textBrowser.setText(separator.join(content))
def __storeDeactivatedComponents(self):
View
5 umbra/components/factory/componentsManagerUi/models.py
@@ -46,20 +46,19 @@ class ComponentsModel(umbra.ui.models.GraphModel):
Component Interface class.
"""
- def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalHeaders=None, defaultNode=None):
+ def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalHeaders=None):
"""
This method initializes the class.
:param parent: Object parent. ( QObject )
:param rootNode: Root node. ( AbstractCompositeNode )
:param horizontalHeaders: Headers. ( OrderedDict )
:param verticalHeaders: Headers. ( OrderedDict )
- :param defaultNode: Default node. ( AbstractCompositeNode )
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
- umbra.ui.models.GraphModel.__init__(self, parent, rootNode, horizontalHeaders, verticalHeaders, defaultNode)
+ umbra.ui.models.GraphModel.__init__(self, parent, rootNode, horizontalHeaders, verticalHeaders)
#******************************************************************************************************************
#*** Class methods.
View
9 umbra/components/factory/scriptEditor/models.py
@@ -138,7 +138,7 @@ def __init__(self,
:param rootNode: Root node. ( AbstractCompositeNode )
:param horizontalHeaders: Headers. ( OrderedDict )
:param verticalHeaders: Headers. ( OrderedDict )
- :param defaultNode: Default node. ( AbstractCompositeNode )
+ :param defaultNode: Default node. ( GraphModelNode )
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
@@ -954,20 +954,19 @@ class PatternsModel(umbra.ui.models.GraphModel):
:return: Removed pattern node. ( PatternNode )
"""
- def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalHeaders=None, defaultNode=None):
+ def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalHeaders=None):
"""
This method initializes the class.
:param parent: Object parent. ( QObject )
:param rootNode: Root node. ( AbstractCompositeNode )
:param horizontalHeaders: Headers. ( OrderedDict )
:param verticalHeaders: Headers. ( OrderedDict )
- :param defaultNode: Default node. ( AbstractCompositeNode )
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
- umbra.ui.models.GraphModel.__init__(self, parent, rootNode, horizontalHeaders, verticalHeaders, defaultNode)
+ umbra.ui.models.GraphModel.__init__(self, parent, rootNode, horizontalHeaders, verticalHeaders, PatternNode)
#******************************************************************************************************************
#*** Class methods.
@@ -1043,7 +1042,7 @@ def __init__(self, parent=None, rootNode=None, horizontalHeaders=None, verticalH
:param rootNode: Root node. ( AbstractCompositeNode )
:param horizontalHeaders: Headers. ( OrderedDict )
:param verticalHeaders: Headers. ( OrderedDict )
- :param defaultNode: Default node. ( AbstractCompositeNode )
+ :param defaultNode: Default node. ( GraphModelNode )
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
View
2 umbra/components/factory/scriptEditor/searchAndReplace.py
@@ -266,7 +266,7 @@ def __initializeUi(self):
for model, settingsKey, comboBox in \
(("_SearchAndReplace__searchPatternsModel", "recentSearchPatterns", self.Search_comboBox),
("_SearchAndReplace__replaceWithPatternsModel", "recentReplaceWithPatterns", self.Replace_With_comboBox)):
- self.__dict__[model] = PatternsModel(defaultNode=PatternNode)
+ self.__dict__[model] = PatternsModel()
patterns = foundations.common.orderedUniqify([foundations.strings.encode(pattern) for pattern in \
self.__container.settings.getKey(self.__container.settingsSection,
settingsKey).toStringList()])
View
6 umbra/globals/constants.py
@@ -46,10 +46,10 @@ class Constants():
"""Package major version: '**4**' ( String )"""
minorVersion = "0"
"""Package minor version: '**0**' ( String )"""
- changeVersion = "5"
- """Package change version: '**5**' ( String )"""
+ changeVersion = "6"
+ """Package change version: '**6**' ( String )"""
releaseVersion = ".".join((majorVersion, minorVersion, changeVersion))
- """Package release version: '**1.0.5**' ( String )"""
+ """Package release version: '**1.0.6**' ( String )"""
logger = "Umbra_Logger"
"""Package logger name: '**Umbra_Logger**' ( String )"""
View
3 umbra/globals/uiConstants.py
@@ -124,5 +124,8 @@ class UiConstants():
textGrammarFile = "grammars/Text/Text.grc"
"""Text language grammar file: '**grammars/Text/Text.grc**' ( String )"""
+ invalidLinkHtmlFile = "htmls/Invalid_Link.html"
+ """Invalid link html file: '**htmls/Invalid_Link.html**' ( String )"""
+
crittercismId = "50aa8aa263d952524b000005"
"""Crittercism Id: '**50aa8aa263d952524b000005**' ( String )"""
View
21 umbra/reporter.py
@@ -462,6 +462,16 @@ def __setHtml(self, body=None):
self.__html = self.__getHtml(body)
self.__view.setHtml(self.__html)
+ def __appendHtml(self, body):
+ """
+ This method apeend the given body content html in the View.
+
+ :param body: Body tag content. ( String )
+ """
+
+ body = foundations.strings.replace(body, OrderedDict([('"', '\\"'), ("\n", str())]))
+ self.__evaluateJavascript("$(\"body\").append(\"{0}\");".format(body))
+
def __evaluateJavascript(self, javascript):
"""
This method evaluates given javascript content in the View.
@@ -487,7 +497,7 @@ def handleException(self, *args):
self.__initializeContextUi()
- self.__setHtml(self.formatHtmlException(cls, instance, trcback))
+ self.__appendHtml(self.formatHtmlException(cls, instance, trcback))
self.show()
self.__report and self.reportExceptionToCrittercism(cls, instance, trcback)
@@ -506,7 +516,7 @@ def formatHtmlException(*args):
escape = lambda x: foundations.strings.replace(x,
OrderedDict([("&", "&amp;"), ("<", "&lt;"), (">", "&gt;")]))
format = lambda x: foundations.strings.replace(x.expandtabs(8),
- OrderedDict([("\n\n", "\n \n"), ("\n\n", "\n \n"), (" ", "&nbsp;"), ("\n", "<br>\n")]))
+ OrderedDict([("\n\n", "\n \n"), ("\n\n", "\n \n"), (" ", "&nbsp;"), ("\n", "<br/>\n")]))
verbose = 10
cls, instance, trcback = args
@@ -522,7 +532,7 @@ def formatHtmlException(*args):
html.append("<div class=\"traceback\">")
for line in foundations.exceptions.formatException(cls, instance, trcback):
- html.append("{0}<br/>".format(format(line)))
+ html.append("{0}<br/>".format(format(escape(line))))
html.append("</div>")
html.append("<div class=\"content\">")
@@ -580,7 +590,7 @@ def formatHtmlException(*args):
html.append("<br/>")
html.append("</div>")
- return "<body>{0}</body>".format(str().join(html))
+ return str().join(html)
@staticmethod
def formatTextException(*args):
@@ -769,6 +779,9 @@ def disableExceptionReporter():
return True
if __name__ == "__main__":
+ foundations.verbose.getLoggingConsoleHandler()
+ foundations.verbose.setVerbosityLevel(3)
+
application = umbra.ui.common.getApplicationInstance()
installExceptionReporter()
View
97 umbra/resources/htmls/Invalid_Link.html
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="generator" content="Docutils 0.9.1: http://docutils.sourceforge.net/" />
+ <title></title>
+ <style type="text/css">
+/*<![CDATA[*/
+
+ body {
+ background-color: rgb(32, 32, 32);
+ color: rgb(192, 192, 192);
+ text-align: justify;
+ font-size: 10pt;
+ margin: 10px 10px 10px 10px;
+ }
+
+ A:link {
+ color: rgb(160, 96, 64);
+ text-decoration: none;
+ }
+
+ A:visited {
+ text-decoration: none;
+ color: rgb(160, 96, 64);
+ }
+
+ A:active {
+ text-decoration: none;
+ color: rgb(160, 96, 64);
+ }
+
+ A:hover {
+ text-decoration: underline;
+ color: rgb(160, 96, 64);
+ }
+
+ table {
+ border-color: rgb(96, 96, 96);
+ border-collapse: collapse;
+ border-style: solid;
+ border-width: 2px;
+ }
+
+ pre {
+ background-color: rgb(64, 64, 64);
+ border: 2px solid rgb(160, 96, 64);
+ border-left: none;
+ border-right: none;
+ color: rgb(224, 224, 224);
+ font-size: 12pt;
+ padding: 5px;
+ white-space: pre-wrap;
+ }
+
+ tt {
+ background-color: rgb(64, 64, 64);
+ color: rgb(224, 224, 224);
+ padding: 5px;
+ white-space: pre-wrap;
+ white-space: -moz-pre-wrap !important;
+ }
+ /*]]>*/
+ </style>
+ </head>
+ <body>
+ <div class="document">
+ <div class="section" id="id1">
+ <h1>
+ <span class="target" id="invalid-link">Invalid Link</span>
+ </h1>
+ <p>
+ The link you followed is invalid: The target file doesn't exists or the link was blank.
+ </p>
+ </div>
+ <div class="section" id="about">
+ <h1>
+ About
+ </h1>
+ <div class="line-block">
+ <div class="line">
+ <strong>sIBL_GUI</strong> by Thomas Mansencal - 2008 - 2012
+ </div>
+ <div class="line">
+ Copyright© 2008 - 2012 - Thomas Mansencal - <a class="reference external" href="mailto:thomas.mansencal&#64;gmail.com">thomas.mansencal&#64;gmail.com</a>
+ </div>
+ <div class="line">
+ This software is released under terms of GNU GPL V3 license: <a class="reference external" href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>
+ </div>
+ <div class="line">
+ <a class="reference external" href="http://www.thomasmansencal.com/">http://www.thomasmansencal.com/</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
13 umbra/resources/htmls/Invalid_Link.rst
@@ -0,0 +1,13 @@
+_`Invalid Link`
+===============
+
+The link you followed is invalid: The target file doesn't exists or the link was blank.
+
+
+About
+=====
+
+| **sIBL_GUI** by Thomas Mansencal - 2008 - 2012
+| Copyright© 2008 - 2012 - Thomas Mansencal - `thomas.mansencal@gmail.com <mailto:thomas.mansencal@gmail.com>`_
+| This software is released under terms of GNU GPL V3 license: http://www.gnu.org/licenses/
+| http://www.thomasmansencal.com/
View
9 umbra/tests/testsUmbra/testsGlobals/testsUiConstants.py
@@ -90,6 +90,7 @@ def testRequiredAttributes(self):
"pythonGrammarFile",
"loggingGrammarFile",
"textGrammarFile",
+ "invalidLinkHtmlFile",
"crittercismId")
for attribute in requiredAttributes:
@@ -361,12 +362,20 @@ def testTextGrammarFileFileAttribute(self):
self.assertRegexpMatches(UiConstants.textGrammarFile, "\w+")
+ def testInvalidLinkHtmlFileAttribute(self):
+ """
+ This method tests :attr:`umbra.globals.uiConstants.UiConstants.invalidLinkHtmlFile` attribute.
+ """
+
+ self.assertRegexpMatches(UiConstants.invalidLinkHtmlFile, "\w+")
+
def testCrittercismIdAttribute(self):
"""
This method tests :attr:`umbra.globals.uiConstants.UiConstants.crittercismId` attribute.
"""
self.assertRegexpMatches(UiConstants.crittercismId, "\w+")
+ self.assertEqual(UiConstants.crittercismId, "50aa8aa263d952524b000005")
if __name__ == "__main__":
unittest.main()
View
2 umbra/ui/models.py
@@ -453,7 +453,7 @@ def insertRows(self, row, count, parent=QModelIndex()):
self.beginInsertRows(parent, row, row + count - 1)
success = True
for i in range(count):
- childNode = umbra.ui.nodes.GraphModelNode()
+ childNode = self.__defaultNode()
success *= True if parentNode.insertChild(childNode, row) else False
self.endInsertRows()
return success

0 comments on commit b7ae92f

Please sign in to comment.