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
=== modified file 'diamond/bin/diamond'
--- diamond/bin/diamond 2011-07-04 13:15:21 +0000
+++ diamond/bin/diamond 2011-07-05 13:56:23 +0000
@@ -45,6 +45,7 @@
45 "Options:\n" + \45 "Options:\n" + \
46 "\n" + \46 "\n" + \
47 "-h Display this message\n" + \47 "-h Display this message\n" + \
48 "-f Forks at startup\n" + \
48 "-s [SCHEMAFILE] Use the supplied schema file *\n" + \49 "-s [SCHEMAFILE] Use the supplied schema file *\n" + \
49 "-t [TRONFILE] Use the supplied schematron file for extended validation\n" + \50 "-t [TRONFILE] Use the supplied schematron file for extended validation\n" + \
50 "-v Verbosity switch - if supplied Diamond prints additional\n" + \51 "-v Verbosity switch - if supplied Diamond prints additional\n" + \
@@ -57,21 +58,8 @@
5758
58def main():59def main():
5960
60 # Detach from controlling terminal61 try:
61 try:62 opts, args = getopt.getopt(sys.argv[1:], "hvfs:t:")
62 pid = os.fork()
63 if pid == 0:
64 os.setsid()
65 pid = os.fork()
66 if pid != 0:
67 os._exit(0)
68 else:
69 os._exit(0)
70 except:
71 pass
72
73 try:
74 opts, args = getopt.getopt(sys.argv[1:], "hvs:t:")
75 except:63 except:
76 Help()64 Help()
77 sys.exit(1)65 sys.exit(1)
@@ -85,6 +73,19 @@
85 if ("-h", "") in opts:73 if ("-h", "") in opts:
86 Help()74 Help()
87 return75 return
76 if ("-f", "") in opts:
77 # Detach from controlling terminal
78 try:
79 pid = os.fork()
80 if pid == 0:
81 os.setsid()
82 pid = os.fork()
83 if pid != 0:
84 os._exit(0)
85 else:
86 os._exit(0)
87 except:
88 pass
8889
89 import diamond.config as config90 import diamond.config as config
90 import diamond.dialogs as dialogs91 import diamond.dialogs as dialogs
9192
=== modified file 'diamond/diamond/config.py'
--- diamond/diamond/config.py 2010-11-11 14:15:01 +0000
+++ diamond/diamond/config.py 2011-07-05 13:56:23 +0000
@@ -34,7 +34,7 @@
34for dir in dirs:34for dir in dirs:
35 try:35 try:
36 for file in os.listdir(dir):36 for file in os.listdir(dir):
37 if file[-1] == "~": 37 if file[-1] == "~" or file[0] == ".": #skip files like .nfs0000
38 continue # bloody emacs38 continue # bloody emacs
39 # Skip item gracefully here if there's a problem.39 # Skip item gracefully here if there's a problem.
40 # This is useful if the schemata files are in a subversion40 # This is useful if the schemata files are in a subversion
4141
=== modified file 'diamond/diamond/interface.py'
--- diamond/diamond/interface.py 2011-07-04 14:49:07 +0000
+++ diamond/diamond/interface.py 2011-07-05 13:56:23 +0000
@@ -1965,6 +1965,8 @@
19651965
1966 self.update_node_comment()1966 self.update_node_comment()
19671967
1968 self.gui.get_widget("optionsFrame").queue_resize()
1969
1968 return1970 return
19691971
1970 def node_desc_mouse_over(self, widget, event):1972 def node_desc_mouse_over(self, widget, event):
@@ -2047,17 +2049,16 @@
2047 Update the RHS attributes widget.2049 Update the RHS attributes widget.
2048 """2050 """
20492051
2050 iter = self.node_attrs.get_model().get_iter_first()2052 self.node_attrs.get_model().clear()
2051 while iter is not None:
2052 next_iter = self.node_attrs.get_model().iter_next(iter)
2053 self.node_attrs.get_model().remove(iter)
2054 iter = next_iter
20552053
2056 if self.selected_node is None:2054 if self.selected_node is None:
2057 self.node_attrs.get_column(2).set_property("visible", False)2055 self.node_attrs.get_column(2).set_property("visible", False)
2058 self.node_attrs.get_column(0).queue_resize()2056 self.node_attrs.get_column(0).queue_resize()
2059 self.node_attrs.get_column(1).queue_resize()2057 self.node_attrs.get_column(1).queue_resize()
2058 elif len(self.selected_node.attrs.keys()) == 0:
2059 self.gui.get_widget("attributeFrame").set_property("visible", False)
2060 else:2060 else:
2061 self.gui.get_widget("attributeFrame").set_property("visible", True)
2061 for key in self.selected_node.attrs.keys():2062 for key in self.selected_node.attrs.keys():
2062 iter = self.node_attrs.get_model().append()2063 iter = self.node_attrs.get_model().append()
2063 self.node_attrs.get_model().set_value(iter, 0, key)2064 self.node_attrs.get_model().set_value(iter, 0, key)
@@ -2605,9 +2606,6 @@
2605 else:2606 else:
2606 store_success = self.node_data_entry_store()2607 store_success = self.node_data_entry_store()
26072608
2608 if store_success:
2609 self.node_data_revert()
2610
2611 if self.scherror.errlist_is_open():2609 if self.scherror.errlist_is_open():
2612 if self.scherror.errlist_type == 0:2610 if self.scherror.errlist_type == 0:
2613 self.scherror.on_validate_schematron()2611 self.scherror.on_validate_schematron()
26142612
=== modified file 'diamond/gui/gui.glade'
--- diamond/gui/gui.glade 2009-06-09 10:29:16 +0000
+++ diamond/gui/gui.glade 2011-07-05 13:56:23 +0000
@@ -298,7 +298,6 @@
298 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>298 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
299 <child>299 <child>
300 <widget class="GtkTextView" id="nodeDescription">300 <widget class="GtkTextView" id="nodeDescription">
301 <property name="height_request">50</property>
302 <property name="visible">True</property>301 <property name="visible">True</property>
303 <property name="can_focus">True</property>302 <property name="can_focus">True</property>
304 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>303 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -322,7 +321,7 @@
322 </child>321 </child>
323 </widget>322 </widget>
324 <packing>323 <packing>
325 <property name="resize">False</property>324 <property name="resize">True</property>
326 <property name="shrink">False</property>325 <property name="shrink">False</property>
327 </packing>326 </packing>
328 </child>327 </child>
@@ -350,7 +349,6 @@
350 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>349 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
351 <child>350 <child>
352 <widget class="GtkTreeView" id="nodeAttributes">351 <widget class="GtkTreeView" id="nodeAttributes">
353 <property name="height_request">50</property>
354 <property name="visible">True</property>352 <property name="visible">True</property>
355 <property name="can_focus">True</property>353 <property name="can_focus">True</property>
356 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>354 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -371,7 +369,10 @@
371 </child>369 </child>
372 </widget>370 </widget>
373 <packing>371 <packing>
372 <property name="expand">False</property>
373 <property name="fill">False</property>
374 <property name="padding">2</property>374 <property name="padding">2</property>
375 <property name="position">0</property>
375 </packing>376 </packing>
376 </child>377 </child>
377 <child>378 <child>
@@ -394,6 +395,7 @@
394 </widget>395 </widget>
395 <packing>396 <packing>
396 <property name="expand">False</property>397 <property name="expand">False</property>
398 <property name="fill">False</property>
397 <property name="padding">2</property>399 <property name="padding">2</property>
398 <property name="position">1</property>400 <property name="position">1</property>
399 </packing>401 </packing>
@@ -452,7 +454,6 @@
452 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>454 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
453 <child>455 <child>
454 <widget class="GtkTextView" id="nodeComment">456 <widget class="GtkTextView" id="nodeComment">
455 <property name="height_request">100</property>
456 <property name="visible">True</property>457 <property name="visible">True</property>
457 <property name="can_focus">True</property>458 <property name="can_focus">True</property>
458 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>459 <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