Merge lp:~fraser-waters08/spud/diamond-improvements into lp:spud

Proposed by Fraser Waters
Status: Merged
Merged at revision: 404
Proposed branch: lp:~fraser-waters08/spud/diamond-improvements
Merge into: lp:spud
Diff against target: 169 lines (+28/-28)
4 files modified
diamond/bin/diamond (+16/-15)
diamond/diamond/config.py (+1/-1)
diamond/diamond/interface.py (+6/-8)
diamond/gui/gui.glade (+5/-4)
To merge this branch: bzr merge lp:~fraser-waters08/spud/diamond-improvements
Reviewer Review Type Date Requested Status
Patrick Farrell Pending
Review via email: mp+66894@code.launchpad.net

Description of the change

Fixes for bugs
#784587: Diamond: default sizing of right-hand side pane is quite annoying
#784589: Diamond: storing data when editing python code moves the widget up to the top of the code
#784592: Diamond: font sizing is fixed
#785090: Diamond forks on launch
#804334: Picks up pesky NFS dot files from the schemata folder

Each fix is in it's own revision.

To post a comment you must log in.
407. By Fraser Waters

Fix up accidental revert.

Revision history for this message
Patrick Farrell (pefarrell) wrote :

Hi Fraser,

I really like how the attribute window disappears when there are no attributes. But is it possible to change the packing of the data entry widget so that it expands to fill the available space? At the minute, it leaves lots of grey space between the widgets, which looks a little ugly.

Aside from that it all looks great!

Patrick

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'diamond/bin/diamond'
2--- diamond/bin/diamond 2011-07-04 13:15:21 +0000
3+++ diamond/bin/diamond 2011-07-05 13:56:23 +0000
4@@ -45,6 +45,7 @@
5 "Options:\n" + \
6 "\n" + \
7 "-h Display this message\n" + \
8+ "-f Forks at startup\n" + \
9 "-s [SCHEMAFILE] Use the supplied schema file *\n" + \
10 "-t [TRONFILE] Use the supplied schematron file for extended validation\n" + \
11 "-v Verbosity switch - if supplied Diamond prints additional\n" + \
12@@ -57,21 +58,8 @@
13
14 def main():
15
16- # Detach from controlling terminal
17- try:
18- pid = os.fork()
19- if pid == 0:
20- os.setsid()
21- pid = os.fork()
22- if pid != 0:
23- os._exit(0)
24- else:
25- os._exit(0)
26- except:
27- pass
28-
29- try:
30- opts, args = getopt.getopt(sys.argv[1:], "hvs:t:")
31+ try:
32+ opts, args = getopt.getopt(sys.argv[1:], "hvfs:t:")
33 except:
34 Help()
35 sys.exit(1)
36@@ -85,6 +73,19 @@
37 if ("-h", "") in opts:
38 Help()
39 return
40+ if ("-f", "") in opts:
41+ # Detach from controlling terminal
42+ try:
43+ pid = os.fork()
44+ if pid == 0:
45+ os.setsid()
46+ pid = os.fork()
47+ if pid != 0:
48+ os._exit(0)
49+ else:
50+ os._exit(0)
51+ except:
52+ pass
53
54 import diamond.config as config
55 import diamond.dialogs as dialogs
56
57=== modified file 'diamond/diamond/config.py'
58--- diamond/diamond/config.py 2010-11-11 14:15:01 +0000
59+++ diamond/diamond/config.py 2011-07-05 13:56:23 +0000
60@@ -34,7 +34,7 @@
61 for dir in dirs:
62 try:
63 for file in os.listdir(dir):
64- if file[-1] == "~":
65+ if file[-1] == "~" or file[0] == ".": #skip files like .nfs0000
66 continue # bloody emacs
67 # Skip item gracefully here if there's a problem.
68 # This is useful if the schemata files are in a subversion
69
70=== modified file 'diamond/diamond/interface.py'
71--- diamond/diamond/interface.py 2011-07-04 14:49:07 +0000
72+++ diamond/diamond/interface.py 2011-07-05 13:56:23 +0000
73@@ -1965,6 +1965,8 @@
74
75 self.update_node_comment()
76
77+ self.gui.get_widget("optionsFrame").queue_resize()
78+
79 return
80
81 def node_desc_mouse_over(self, widget, event):
82@@ -2047,17 +2049,16 @@
83 Update the RHS attributes widget.
84 """
85
86- iter = self.node_attrs.get_model().get_iter_first()
87- while iter is not None:
88- next_iter = self.node_attrs.get_model().iter_next(iter)
89- self.node_attrs.get_model().remove(iter)
90- iter = next_iter
91+ self.node_attrs.get_model().clear()
92
93 if self.selected_node is None:
94 self.node_attrs.get_column(2).set_property("visible", False)
95 self.node_attrs.get_column(0).queue_resize()
96 self.node_attrs.get_column(1).queue_resize()
97+ elif len(self.selected_node.attrs.keys()) == 0:
98+ self.gui.get_widget("attributeFrame").set_property("visible", False)
99 else:
100+ self.gui.get_widget("attributeFrame").set_property("visible", True)
101 for key in self.selected_node.attrs.keys():
102 iter = self.node_attrs.get_model().append()
103 self.node_attrs.get_model().set_value(iter, 0, key)
104@@ -2605,9 +2606,6 @@
105 else:
106 store_success = self.node_data_entry_store()
107
108- if store_success:
109- self.node_data_revert()
110-
111 if self.scherror.errlist_is_open():
112 if self.scherror.errlist_type == 0:
113 self.scherror.on_validate_schematron()
114
115=== modified file 'diamond/gui/gui.glade'
116--- diamond/gui/gui.glade 2009-06-09 10:29:16 +0000
117+++ diamond/gui/gui.glade 2011-07-05 13:56:23 +0000
118@@ -298,7 +298,6 @@
119 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
120 <child>
121 <widget class="GtkTextView" id="nodeDescription">
122- <property name="height_request">50</property>
123 <property name="visible">True</property>
124 <property name="can_focus">True</property>
125 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
126@@ -322,7 +321,7 @@
127 </child>
128 </widget>
129 <packing>
130- <property name="resize">False</property>
131+ <property name="resize">True</property>
132 <property name="shrink">False</property>
133 </packing>
134 </child>
135@@ -350,7 +349,6 @@
136 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
137 <child>
138 <widget class="GtkTreeView" id="nodeAttributes">
139- <property name="height_request">50</property>
140 <property name="visible">True</property>
141 <property name="can_focus">True</property>
142 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
143@@ -371,7 +369,10 @@
144 </child>
145 </widget>
146 <packing>
147+ <property name="expand">False</property>
148+ <property name="fill">False</property>
149 <property name="padding">2</property>
150+ <property name="position">0</property>
151 </packing>
152 </child>
153 <child>
154@@ -394,6 +395,7 @@
155 </widget>
156 <packing>
157 <property name="expand">False</property>
158+ <property name="fill">False</property>
159 <property name="padding">2</property>
160 <property name="position">1</property>
161 </packing>
162@@ -452,7 +454,6 @@
163 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
164 <child>
165 <widget class="GtkTextView" id="nodeComment">
166- <property name="height_request">100</property>
167 <property name="visible">True</property>
168 <property name="can_focus">True</property>
169 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>

Subscribers

People subscribed via source and target branches