Merge lp:~openerp-dev/openobject-client/trunk-compatible_with_py2.6-rga into lp:openobject-client

Proposed by Ravi Gadhia (OpenERP)
Status: Merged
Merged at revision: 2005
Proposed branch: lp:~openerp-dev/openobject-client/trunk-compatible_with_py2.6-rga
Merge into: lp:openobject-client
Diff against target: 224 lines (+51/-34)
6 files modified
bin/SpiffGtkWidgets/Calendar/Calendar.py (+1/-1)
bin/SpiffGtkWidgets/Calendar/CanvasDay.py (+3/-1)
bin/SpiffGtkWidgets/Calendar/CanvasRectangle.py (+12/-11)
bin/widget/view/calendar_gtk/parser.py (+0/-2)
bin/widget/view/diagram_gtk/xdot.py (+8/-2)
setup.py (+27/-17)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/trunk-compatible_with_py2.6-rga
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Approve
Review via email: mp+80790@code.launchpad.net
To post a comment you must log in.
1989. By rga <rga@rga-desktop>

[IMP] Diagram view: hide console windows on load

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/SpiffGtkWidgets/Calendar/Calendar.py'
2--- bin/SpiffGtkWidgets/Calendar/Calendar.py 2010-12-13 09:52:05 +0000
3+++ bin/SpiffGtkWidgets/Calendar/Calendar.py 2011-11-01 09:13:25 +0000
4@@ -124,7 +124,7 @@
5 self.colors = dict(bg = c2i(style.bg[gtk.STATE_PRELIGHT]),
6 text = c2i(style.fg[gtk.STATE_NORMAL]),
7 text_inactive = c2i(style.fg[gtk.STATE_INSENSITIVE]),
8- body = c2i(style.light[gtk.STATE_ACTIVE]),
9+ body = c2i('white'),
10 body_today = c2i('peach puff'),
11 border = c2i(style.mid[gtk.STATE_NORMAL]),
12 selected = c2i(style.mid[gtk.STATE_SELECTED]),
13
14=== modified file 'bin/SpiffGtkWidgets/Calendar/CanvasDay.py'
15--- bin/SpiffGtkWidgets/Calendar/CanvasDay.py 2010-12-13 09:52:05 +0000
16+++ bin/SpiffGtkWidgets/Calendar/CanvasDay.py 2011-11-01 09:13:25 +0000
17@@ -119,7 +119,9 @@
18 if not self.show_rulers:
19 return
20 ctx.set_source_rgba(*color.to_rgba(self.cal.colors['inactive']))
21- ctx.rectangle(rect.x, rect.y, rect.width, rect.height)
22+ (width, height) = self.get_allocation()
23+ x,y,width,height = self.align(width, height)
24+ ctx.rectangle(x, y, width, height)
25 ctx.set_line_width(1)
26 ctx.set_dash((1, 1))
27 ctx.clip()
28
29=== modified file 'bin/SpiffGtkWidgets/Calendar/CanvasRectangle.py'
30--- bin/SpiffGtkWidgets/Calendar/CanvasRectangle.py 2010-12-13 09:52:05 +0000
31+++ bin/SpiffGtkWidgets/Calendar/CanvasRectangle.py 2011-11-01 09:13:25 +0000
32@@ -86,21 +86,21 @@
33
34
35 def do_paint_below_children(self, ctx, rect):
36+ (width, height) = self.get_allocation()
37+
38 ctx.set_source_rgba(*color.to_rgba(self.props.color))
39- ctx.rectangle(rect.x, rect.y, rect.width, rect.height)
40+ x,y,w,h = self.align(width, height)
41+ ctx.rectangle(x,y,w,h)
42 ctx.clip()
43 rtl = self.props.radius_top_left
44 rtr = self.props.radius_top_right
45 rbl = self.props.radius_bottom_left
46 rbr = self.props.radius_bottom_right
47- x, y = 0, 0
48- w, h = self.get_allocation()
49-
50- # A****BQ
51- # H C
52- # * *
53- # G D
54- # F****E
55+# # A****BQ
56+# # H C
57+# # * *
58+# # G D
59+# # F****E
60 ctx.move_to(x+rtl,y) # A
61 ctx.line_to(x+w-rtr,y) # B
62 ctx.curve_to(x+w,y,x+w,y,x+w,y+rtr) # C, both control points at Q
63@@ -109,7 +109,8 @@
64 ctx.line_to(x+rbl,y+h) # F
65 ctx.curve_to(x,y+h,x,y+h,x,y+h-rbl) # G
66 ctx.line_to(x,y+rtl) # H
67- ctx.curve_to(x,y,x,y,x+rtl,y) # A
68- ctx.fill()
69+ ctx.curve_to(x,y,x,y,x+rtl,y)
70+ ctx.close_path()
71+ ctx.fill_preserve()
72
73 gobject.type_register(CanvasRectangle)
74
75=== modified file 'bin/widget/view/calendar_gtk/parser.py'
76--- bin/widget/view/calendar_gtk/parser.py 2011-10-11 06:15:57 +0000
77+++ bin/widget/view/calendar_gtk/parser.py 2011-11-01 09:13:25 +0000
78@@ -26,7 +26,6 @@
79 import common
80 from common import openerp_gtk_builder, gtk_signal_decorator
81 import gobject
82-from mx import DateTime
83 from datetime import datetime, date
84
85 from SpiffGtkWidgets import Calendar
86@@ -252,7 +251,6 @@
87 self.display(None)
88
89 def _back_forward(self, widget, type, *args, **argv):
90- relatime = DateTime.RelativeDateTime
91 if self.mode == 'day':
92 self.date = self.date + relativedelta(days=type)
93 if self.mode == 'week':
94
95=== modified file 'bin/widget/view/diagram_gtk/xdot.py'
96--- bin/widget/view/diagram_gtk/xdot.py 2010-12-13 15:45:20 +0000
97+++ bin/widget/view/diagram_gtk/xdot.py 2011-11-01 09:13:25 +0000
98@@ -29,8 +29,8 @@
99
100 import os
101 import sys
102+import math
103 import subprocess
104-import math
105 import colorsys
106 import time
107 import re
108@@ -42,6 +42,11 @@
109 import cairo
110 import pango
111 import pangocairo
112+try:
113+ import win32process
114+ create_flag = win32process.CREATE_NO_WINDOW
115+except:
116+ create_flag = 0
117 from widget.view.form_gtk.many2one import dialog
118 import printer
119 from tools import node_attributes
120@@ -1402,7 +1407,8 @@
121 stdout=subprocess.PIPE,
122 stderr=subprocess.PIPE,
123 shell=False,
124- universal_newlines=True
125+ universal_newlines=True,
126+ creationflags = create_flag
127 )
128 xdotcode, error = p.communicate(dotcode)
129 if p.returncode != 0:
130
131=== modified file 'setup.py'
132--- setup.py 2011-10-11 06:15:57 +0000
133+++ setup.py 2011-11-01 09:13:25 +0000
134@@ -28,6 +28,7 @@
135 import sys
136 import os
137 import glob
138+import shutil
139
140 from setuptools import setup
141 from setuptools.command.install import install as suc_install
142@@ -39,12 +40,12 @@
143 import py2exe
144 has_py2exe = True
145
146- origIsSystemDLL = py2exe.build_exe.isSystemDLL
147- def isSystemDLL(pathname):
148- if os.path.basename(pathname).lower() in ("msvcp71.dll", "mfc71.dll"):
149- return 0
150- return origIsSystemDLL(pathname)
151- py2exe.build_exe.isSystemDLL = isSystemDLL
152+# origIsSystemDLL = py2exe.build_exe.isSystemDLL
153+# def isSystemDLL(pathname):
154+# if os.path.basename(pathname).lower() in ("msvcp71.dll", "mfc71.dll"):
155+# return 0
156+# return origIsSystemDLL(pathname)
157+# py2exe.build_exe.isSystemDLL = isSystemDLL
158
159 sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "bin"))
160
161@@ -77,6 +78,7 @@
162 files.append(("po", glob.glob("bin\\po\\*.*")))
163 files.append(("icons", glob.glob("bin\\icons\\*.png")))
164 files.append(("share\\locale", glob.glob("bin\\share\\locale\\*.*")))
165+
166 else:
167 files.append((opj('share','man','man1',''),['man/openerp-client.1']))
168 files.append((opj('share','doc', 'openerp-client-%s' % version), [f for
169@@ -120,22 +122,15 @@
170 "compressed": 1,
171 "optimize": 1,
172 "dist_dir": 'dist',
173+ "bundle_files": 3,
174 "packages": [
175- "encodings","gtk", "matplotlib", "pytz", "OpenSSL",
176+ "encodings","gtk","gtk.glade","gio", "glib", "matplotlib", "pytz", "OpenSSL",
177 "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
178 "lxml.objectify", "decimal"
179 ],
180- "includes": "pango,atk,gobject,cairo,atk,pangocairo,matplotlib._path",
181 "excludes": ["Tkinter", "tcl", "TKconstants"],
182- "dll_excludes": [
183- "iconv.dll","intl.dll","libatk-1.0-0.dll",
184- "libgdk_pixbuf-2.0-0.dll","libgdk-win32-2.0-0.dll",
185- "libglib-2.0-0.dll","libgmodule-2.0-0.dll",
186- "libgobject-2.0-0.dll","libgthread-2.0-0.dll",
187- "libgtk-win32-2.0-0.dll","libpango-1.0-0.dll",
188- "libpangowin32-1.0-0.dll",
189- "wxmsw26uh_vc.dll",
190- ],
191+ "dll_excludes": ["MSVCP90.dll","tcl85.dll","tk85.dll"],
192+
193 }
194 }
195
196@@ -204,6 +199,20 @@
197 )
198
199 if has_py2exe:
200+ if os.getenv('gtk_runtime'):
201+ def copy_dir(src,dst):
202+ if not os.path.isdir(dst):
203+ shutil.copytree(src, dst)
204+
205+ gtk_runtime=os.getenv('gtk_runtime')
206+ # To enable gtk theme we need to add below dir of gtkruntime to dist dir
207+ add_dir = ["share\\themes", "lib\\gtk-2.0", "etc"]
208+ dist = opj(os.getcwd() , options['py2exe']['dist_dir'])
209+ for dir in add_dir:
210+ copy_dir(opj(gtk_runtime, dir), opj(dist, dir))
211+ else:
212+ print >> sys.stderr, 'Error: Environment variable GTK_RUNTIME is not set'
213+#
214 # Sometime between pytz-2008a and pytz-2008i common_timezones started to
215 # include only names of zones with a corresponding data file in zoneinfo.
216 # pytz installs the zoneinfo directory tree in the same directory
217@@ -213,6 +222,7 @@
218 # read in the py2exe executable.
219 # This manually copies zoneinfo into the zip. See also
220 # http://code.google.com/p/googletransitdatafeed/issues/detail?id=121
221+
222 import pytz
223 import zipfile
224 # Make sure the layout of pytz hasn't changed