Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
family and genus 'in use' queries take far too long to be useful at all.
Browse files Browse the repository at this point in the history
I have simplified them so that they are resolved within one table.
made the numbers bold (so you notice better the change of colour when hovering over them).
followed the hint by Tom: 'in use', instead of the passive verb form 'used'.
  • Loading branch information
mfrasca committed Dec 31, 2015
1 parent 37553c5 commit 27ef234
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bauble/plugins/plants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,17 @@ def __init__(self):
utils.make_label_clickable(
self.widgets.splash_nfamuse,
lambda *a: bauble.gui.send_command(
'family where genera.species.accessions.plants.quantity>0'))
'family where genera.species.id != 0'))

utils.make_label_clickable(
self.widgets.splash_ngenuse,
lambda *a: bauble.gui.send_command(
'genus where species.accessions.plants.quantity>0'))
'genus where not species = Empty'))

utils.make_label_clickable(
self.widgets.splash_nspcuse,
lambda *a: bauble.gui.send_command(
'species where accessions.plants.quantity>0'))
'species where not accessions = Empty'))

utils.make_label_clickable(
self.widgets.splash_nspctot,
Expand Down
38 changes: 37 additions & 1 deletion bauble/plugins/plants/infoboxes.glade
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
<object class="GtkLabel" id="splash_use_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;used&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;in use&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>
Expand Down Expand Up @@ -947,6 +947,9 @@
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -968,6 +971,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -987,6 +993,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1006,6 +1015,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1025,6 +1037,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1044,6 +1059,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1063,6 +1081,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1082,6 +1103,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1101,6 +1125,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1120,6 +1147,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1140,6 +1170,9 @@
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand All @@ -1159,6 +1192,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">-</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
Expand Down

0 comments on commit 27ef234

Please sign in to comment.