GTG

Merge lp:~dneelyep/gtg/gtgchanges into lp:~gtg/gtg/old-trunk

Proposed by Daniel Neel
Status: Merged
Merged at revision: 931
Proposed branch: lp:~dneelyep/gtg/gtgchanges
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 255 lines (+27/-33)
9 files modified
GTG/core/datastore.py (+0/-1)
GTG/gtg.py (+9/-9)
GTG/gtk/backends_dialog/parameters_ui/__init__.py (+1/-2)
GTG/gtk/backends_dialog/parameters_ui/checkboxui.py (+0/-1)
GTG/gtk/backends_dialog/parameters_ui/textui.py (+0/-1)
GTG/gtk/crashhandler.py (+15/-16)
GTG/info.py (+1/-1)
GTG/tests/test_backend_tomboy.py (+0/-1)
gtg_new_task (+1/-1)
To merge this branch: bzr merge lp:~dneelyep/gtg/gtgchanges
Reviewer Review Type Date Requested Status
Luca Invernizzi (community) Approve
Review via email: mp+44941@code.launchpad.net

Description of the change

Fixed a few typos and explained the info.py modules' functionality more fully.

Also fixed 37 pylint errors.

To post a comment you must log in.
lp:~dneelyep/gtg/gtgchanges updated
927. By Luca Falavigna

Replace gnome2 url_show() method with gtk's show_uri

928. By Luca Invernizzi

Fixing Bug #604293: Right click on a task doesn't change the selection

929. By Luca Invernizzi

New backends window should have close button not quit

930. By Luca Invernizzi

Fixes 673745: Tomboy referenced before assigment

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Thanks a lot!

review: Approve
lp:~dneelyep/gtg/gtgchanges updated
931. By Luca Invernizzi

Fixed a few typos and explained the info.py modules' functionality more fully.

Also fixed 37 pylint errors.

------------- This line and the following will be ignored --------------

modified:
  AUTHORS
  GTG/core/datastore.py
  GTG/gtg.py
  GTG/gtk/backends_dialog/parameters_ui/__init__.py
  GTG/gtk/backends_dialog/parameters_ui/checkboxui.py
  GTG/gtk/backends_dialog/parameters_ui/textui.py
  GTG/gtk/crashhandler.py
  GTG/info.py
  GTG/tests/test_backend_tomboy.py
  gtg_new_task
pending merges:
  Daniel Neel 2011-01-02 Various pyflakes fixes
    Daniel Neel 2010-12-30 Updated the description of the info.py module.
    Daniel Neel 2010-12-30 Fixed a couple typos in comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GTG/core/datastore.py'
2--- GTG/core/datastore.py 2010-10-05 07:49:00 +0000
3+++ GTG/core/datastore.py 2011-01-03 03:06:45 +0000
4@@ -810,4 +810,3 @@
5 return self.datastore.requester.get_all_tags
6 else:
7 raise AttributeError("No attribute %s" %attr)
8-
9
10=== modified file 'GTG/gtg.py'
11--- GTG/gtg.py 2010-10-05 07:49:00 +0000
12+++ GTG/gtg.py 2011-01-03 03:06:45 +0000
13@@ -37,7 +37,7 @@
14 #
15 # Each id are *strings*
16 # tid are the form "X@Y" where Y is the pid.
17-# For example : 21@2 is the 21th task of the 2nd project
18+# For example : 21@2 is the 21st task of the 2nd project
19 # This way, we are sure that a tid is unique accross multiple projects
20 #
21 #==============================================================================
22@@ -51,7 +51,7 @@
23 import dbus
24
25 #our own imports
26-from GTG.backends import BackendFactory
27+from GTG.backends import BackendFactory
28 from GTG import _
29 from GTG.core import CoreConfig
30 from GTG.core.datastore import DataStore
31@@ -90,7 +90,7 @@
32 if uri.startswith("gtg://"):
33 d.open_task_editor(uri[6:])
34 raise SystemExit
35-
36+
37 #write the pid file
38 with open(pidfile, "w") as f:
39 f.write(`os.getpid()`)
40@@ -113,10 +113,10 @@
41 manager.main(once_thru=options.boot_test, uri_list = args)
42 else:
43 manager.main(once_thru=options.boot_test, uri_list = args)
44- core_main_quit(req,ds)
45+ core_main_quit(req, ds)
46
47 def core_main_init(options = None, args = None):
48- '''
49+ '''
50 Part of the main function prior to the UI initialization.
51 '''
52 # Debugging subsystem initialization
53@@ -131,19 +131,19 @@
54 backends_list = BackendFactory().get_saved_backends_list()
55 # Load data store
56 ds = DataStore(config)
57- # Register backends
58+ # Register backends
59 for backend_dic in backends_list:
60 ds.register_backend(backend_dic)
61 #save the backends directly to be sure projects.xml is written
62 ds.save(quit = False)
63-
64+
65 # Launch task browser
66 req = ds.get_requester()
67 return ds, req
68
69-def core_main_quit(req,ds):
70+def core_main_quit(req, ds):
71 '''
72- Last bits of code executed in GTG, after the UI has been shut off.
73+ Last bits of code executed in GTG, after the UI has been shut off.
74 Currently, it's just saving everything.
75 '''
76 # Ideally we should load window geometry configuration from a config
77
78=== modified file 'GTG/gtk/backends_dialog/parameters_ui/__init__.py'
79--- GTG/gtk/backends_dialog/parameters_ui/__init__.py 2010-09-04 17:52:42 +0000
80+++ GTG/gtk/backends_dialog/parameters_ui/__init__.py 2011-01-03 03:06:45 +0000
81@@ -17,7 +17,7 @@
82 # this program. If not, see <http://www.gnu.org/licenses/>.
83 # -----------------------------------------------------------------------------
84 '''
85-This modules reads a bakcn configuration and generates a series of widgets to
86+This module reads a bakcn configuration and generates a series of widgets to
87 let the user see the configuration and modify it.
88 In this manner, backends do not need to know anything about their UI since it's
89 built for them: it should play along the lines of the separation between GTG
90@@ -146,4 +146,3 @@
91 def _commit_changes(child):
92 child.commit_changes()
93 self.foreach(_commit_changes)
94-
95
96=== modified file 'GTG/gtk/backends_dialog/parameters_ui/checkboxui.py'
97--- GTG/gtk/backends_dialog/parameters_ui/checkboxui.py 2010-08-05 21:33:37 +0000
98+++ GTG/gtk/backends_dialog/parameters_ui/checkboxui.py 2011-01-03 03:06:45 +0000
99@@ -69,4 +69,3 @@
100 '''
101 if self.backend.is_enabled() and not self.backend.is_default():
102 self.req.set_backend_enabled(self.backend.get_id(), False)
103-
104
105=== modified file 'GTG/gtk/backends_dialog/parameters_ui/textui.py'
106--- GTG/gtk/backends_dialog/parameters_ui/textui.py 2010-09-04 17:52:42 +0000
107+++ GTG/gtk/backends_dialog/parameters_ui/textui.py 2011-01-03 03:06:45 +0000
108@@ -75,4 +75,3 @@
109 '''
110 if self.backend.is_enabled() and not self.backend.is_default():
111 self.req.set_backend_enabled(self.backend.get_id(), False)
112-
113
114=== modified file 'GTG/gtk/crashhandler.py'
115--- GTG/gtk/crashhandler.py 2010-06-22 19:55:15 +0000
116+++ GTG/gtk/crashhandler.py 2011-01-03 03:06:45 +0000
117@@ -55,11 +55,11 @@
118
119 APP_NAME = None
120 MESSAGE = _("We're terribly sorry. Could you help us fix the problem by " \
121- "reporting the crash?")
122+ "reporting the crash?")
123 USE_APPORT = False
124
125 _old_sys_excepthook = None # None means that initialize() has not been called
126- # yet.
127+ # yet.
128
129 dialog = None
130
131@@ -81,11 +81,11 @@
132 """
133 global APP_NAME, MESSAGE, USE_APPORT, _gtk_initialized, _old_sys_excepthook
134 if app_name:
135- APP_NAME = _(app_name)
136+ APP_NAME = _(app_name)
137 if not message is None:
138- MESSAGE = _(message)
139+ MESSAGE = _(message)
140 if use_apport:
141- USE_APPORT = use_apport
142+ USE_APPORT = use_apport
143 if _gtk_initialized == True and _old_sys_excepthook is None:
144 # save sys.excepthook first, as it may not be sys.__excepthook__
145 # (for example, it might be Apport's python hook)
146@@ -107,12 +107,12 @@
147 add_apport_button = False
148 global USE_APPORT
149 if USE_APPORT:
150- # see if this file is from a properly installed distribution package
151+ # see if this file is from a properly installed distribution package
152 try:
153 from apport.fileutils import likely_packaged
154 try:
155 filename = os.path.realpath(os.path.join(os.getcwdu(),
156- sys.argv[0]))
157+ sys.argv[0]))
158 except:
159 filename = os.path.realpath("/proc/%i/exe" % os.getpid())
160 if not os.path.isfile(filename) or not os.access(filename, os.X_OK):
161@@ -130,7 +130,7 @@
162 import re
163 from apport.packaging_impl import impl as apport_packaging
164 newconfiguration = "# temporary apport configuration file " \
165- "by gtkcrashhandler.py\n\n"
166+ "by gtkcrashhandler.py\n\n"
167 try:
168 for line in open(apport_packaging.configuration):
169 if re.search('^\s*enabled\s*=\s*0\s*$', line) is None:
170@@ -186,7 +186,6 @@
171 text_label = gtk.Label()
172 text_label.set_markup(MESSAGE)
173 text_label.set_alignment(0, 0.5)
174-
175 text_label.set_line_wrap(True)
176 def text_label_size_allocate(widget, rect):
177 """Lets label resize correctly while wrapping text."""
178@@ -242,11 +241,11 @@
179
180 def on_expanded(widget):
181 global dialog
182- dialog.set_size_request(600,600)
183+ dialog.set_size_request(600, 600)
184
185
186 def gtkcrashhandler_thread(run):
187- """gtkcrashhandler_thread is a decorator for the run() method of
188+ """gtkcrashhandler_thread is a decorator for the run() method of
189 threading.Thread.
190
191 If you forget to use this decorator, exceptions in threads will be
192@@ -273,7 +272,7 @@
193 if gtk.main_level() > 0:
194 gobject.idle_add(
195 lambda ee=ee, tb=tb, thread=threading.currentThread():
196- _replacement_excepthook(ee.__class__,ee,tb,thread=thread))
197+ _replacement_excepthook(ee.__class__, ee, tb, thread=thread))
198 else:
199 time.sleep(0.1) # ugly hack, seems like threads that are
200 # started before running gtk.main() cause
201@@ -295,9 +294,9 @@
202 if __name__ == "__main__":
203 # throw test exception
204 initialize(app_name="gtkcrashhandler", message="Don't worry, though. This "
205- "is just a test. To use the code properly, call "
206- "gtkcrashhandler.initialize() in your PyGTK app to automatically catch "
207- " any Python exceptions like this.")
208+ "is just a test. To use the code properly, call "
209+ "gtkcrashhandler.initialize() in your PyGTK app to automatically catch "
210+ " any Python exceptions like this.")
211 class DoNotRunException(Exception):
212 def __str__(self):
213 return "gtkcrashhandler.py should imported, not run"
214@@ -312,7 +311,7 @@
215 def signal_catcher(callback):
216 #if TERM or ABORT are caught, we execute the callback function
217 for s in [signal.SIGABRT, signal.SIGTERM]:
218- signal.signal(s, lambda a,b: callback())
219+ signal.signal(s, lambda a, b: callback())
220 yield
221
222 initialize(app_name = "Getting Things GNOME!",
223
224=== modified file 'GTG/info.py'
225--- GTG/info.py 2010-08-21 03:41:50 +0000
226+++ GTG/info.py 2011-01-03 03:06:45 +0000
227@@ -1,5 +1,5 @@
228 # -*- coding: utf-8 -*-
229-"""Various information about GTG. Should be updated for every release."""
230+"""Various information about GTG. Should be updated for every release. Contains the information displayed in GTG's Credits."""
231
232 NAME = "Getting Things GNOME!"
233 URL = "http://gtg.fritalk.com"
234
235=== modified file 'GTG/tests/test_backend_tomboy.py'
236--- GTG/tests/test_backend_tomboy.py 2010-09-08 14:06:32 +0000
237+++ GTG/tests/test_backend_tomboy.py 2011-01-03 03:06:45 +0000
238@@ -393,4 +393,3 @@
239 def _fake_quit(self):
240 self.main_loop.quit()
241 sys.exit(0)
242-
243
244=== modified file 'gtg_new_task'
245--- gtg_new_task 2010-08-04 00:43:25 +0000
246+++ gtg_new_task 2011-01-03 03:06:45 +0000
247@@ -20,7 +20,7 @@
248 # -----------------------------------------------------------------------------
249
250 """
251-This script create a new task and launch the editor to display it. GTG should be running
252+This script creates a new task and launches the editor to display it. GTG should be running
253 """
254
255 import re

Subscribers

People subscribed via source and target branches

to status/vote changes: