Modified the code to do lazy import. release-1.1.0

Sat, 23 Feb 2013 15:32:54 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 23 Feb 2013 15:32:54 +0100
changeset 33
a8706d6bd932
parent 32
c08e1fec23a9
child 34
cec89eb19c5c

Modified the code to do lazy import.

ChangeLog file | annotate | diff | comparison | revisions
PluginTimeTracker.e4p file | annotate | diff | comparison | revisions
PluginTimeTracker.py file | annotate | diff | comparison | revisions
PluginTimeTracker.zip file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.PluginTimeTracker.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.ConfigurationPage.TimeTrackerPage.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTracker.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerEntryDialog.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.ConfigurationPage.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/index-Plugin_Time_Tracker.html file | annotate | diff | comparison | revisions
TimeTracker/Documentation/source/index.html file | annotate | diff | comparison | revisions
TimeTracker/TimeTracker.py file | annotate | diff | comparison | revisions
TimeTracker/TimeTrackerWidget.py file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sun Feb 03 17:03:00 2013 +0100
+++ b/ChangeLog	Sat Feb 23 15:32:54 2013 +0100
@@ -1,5 +1,9 @@
 ChangeLog
 ---------
+Version 1.1.0:
+- bug fixes
+- modified code to do lazy import
+
 Version 1.0.0
 - first stable release
 
--- a/PluginTimeTracker.e4p	Sun Feb 03 17:03:00 2013 +0100
+++ b/PluginTimeTracker.e4p	Sat Feb 23 15:32:54 2013 +0100
@@ -7,7 +7,7 @@
   <ProgLanguage mixed="0">Python3</ProgLanguage>
   <ProjectType>E4Plugin</ProjectType>
   <Description>Plugin implementing a simple time tracker to keep track of the time used for a project. The time can be subdivided into tasks.</Description>
-  <Version>0.2.0</Version>
+  <Version>1.1.0</Version>
   <Author>Detlev Offenbach</Author>
   <Email>detlev@die-offenbachs.de</Email>
   <TranslationPattern>TimeTracker/i18n/timetracker_%language%.ts</TranslationPattern>
--- a/PluginTimeTracker.py	Sun Feb 03 17:03:00 2013 +0100
+++ b/PluginTimeTracker.py	Sat Feb 23 15:32:54 2013 +0100
@@ -22,7 +22,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "1.0.0"
+version = "1.1.0"
 className = "TimeTrackerPlugin"
 packageName = "TimeTracker"
 shortDescription = "Time Tracker to keep track of the project time."
Binary file PluginTimeTracker.zip has changed
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.PluginTimeTracker.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.PluginTimeTracker.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.PluginTimeTracker</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.ConfigurationPage.TimeTrackerPage.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.ConfigurationPage.TimeTrackerPage.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.ConfigurationPage.TimeTrackerPage</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.TimeTrackEntry</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTracker.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTracker.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.TimeTracker</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerEntryDialog.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerEntryDialog.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.TimeTrackerEntryDialog</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.ConfigurationPage.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.ConfigurationPage.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker.ConfigurationPage</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.TimeTracker.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker.TimeTracker</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/index-Plugin_Time_Tracker.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Plugin_Time_Tracker</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/Documentation/source/index.html	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/Documentation/source/index.html	Sat Feb 23 15:32:54 2013 +0100
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
-'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<!DOCTYPE html>
 <html><head>
 <title>Table of contents</title>
+<meta charset="UTF-8">
 <style>
 body {
     background: #EDECE6;
--- a/TimeTracker/TimeTracker.py	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/TimeTracker.py	Sat Feb 23 15:32:54 2013 +0100
@@ -16,9 +16,6 @@
 from E5Gui import E5MessageBox
 from E5Gui.E5Action import E5Action
 
-from .TimeTrackEntry import TimeTrackEntry
-from .TimeTrackerWidget import TimeTrackerWidget
-
 import UI.PixmapCache
 
 
@@ -60,6 +57,8 @@
         """
         Public method to activate the time tracker.
         """
+        from .TimeTrackerWidget import TimeTrackerWidget
+        
         self.__widget = TimeTrackerWidget(self)
         self.__ui.addSideWidget(self.__ui.BottomSide, self.__widget,
             UI.PixmapCache.getIcon(os.path.join("TimeTracker", "icons", "clock.png")),
@@ -138,6 +137,8 @@
                         self.__trackerFilePath, str(err)))
                 return
             
+            from .TimeTrackEntry import TimeTrackEntry
+            
             invalidCount = 0
             for line in data.splitlines():
                 entry = TimeTrackEntry(self.__plugin)
@@ -198,6 +199,8 @@
                     fname, str(err)))
             return
         
+        from .TimeTrackEntry import TimeTrackEntry
+        
         invalidCount = 0
         duplicateCount = 0
         entries = []
@@ -277,6 +280,8 @@
         else:
             nextID = 0
         
+        from .TimeTrackEntry import TimeTrackEntry
+        
         entry = TimeTrackEntry(self.__plugin)
         entry.setID(nextID)
         entry.setStartDateTime(startDateTime)
@@ -330,6 +335,8 @@
         """
         Public method to start a new tracker entry.
         """
+        from .TimeTrackEntry import TimeTrackEntry
+        
         self.__currentEntry = TimeTrackEntry(self.__plugin)
         self.__currentEntry.start()
         self.__widget.setCurrentEntry(self.__currentEntry)
--- a/TimeTracker/TimeTrackerWidget.py	Sun Feb 03 17:03:00 2013 +0100
+++ b/TimeTracker/TimeTrackerWidget.py	Sat Feb 23 15:32:54 2013 +0100
@@ -16,8 +16,6 @@
 
 from .Ui_TimeTrackerWidget import Ui_TimeTrackerWidget
 
-from .TimeTrackerEntryDialog import TimeTrackerEntryDialog
-
 import Preferences
 import Utilities
 
@@ -137,6 +135,8 @@
         """
         Private slot to manually add an entry.
         """
+        from .TimeTrackerEntryDialog import TimeTrackerEntryDialog
+        
         tasks = []
         for index in range(self.taskCombo.count()):
             tasks.append(self.taskCombo.itemText(index))
@@ -157,6 +157,8 @@
             # the current entry is edited via the elements of this widget
             entry = self.__tracker.getEntry(eid)
             if entry is not None:
+                from .TimeTrackerEntryDialog import TimeTrackerEntryDialog
+                
                 tasks = []
                 for index in range(self.taskCombo.count()):
                     tasks.append(self.taskCombo.itemText(index))

eric ide

mercurial