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

Commit

Permalink
adding link to stored queries from the initial splash screen.
Browse files Browse the repository at this point in the history
close #36.
  • Loading branch information
mfrasca committed Jan 3, 2016
1 parent 1e7d643 commit d0a6df5
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 13 deletions.
8 changes: 8 additions & 0 deletions bauble/plugins/plants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def __init__(self):
wname = "stqr_%02d_button" % i
widget = getattr(self.widgets, wname)
widget.connect('clicked', partial(self.on_sqb_clicked, i))
wname = "splash_stqr_button"
widget = getattr(self.widgets, wname)
widget.connect('clicked', self.on_splash_stqr_button_clicked)

def update(self):
'''
Expand Down Expand Up @@ -304,6 +307,11 @@ def on_sqb_clicked(self, btn_no, *args):
except:
pass

def on_splash_stqr_button_clicked(self, *args):
print 'on_splash_stqr_button_clicked'
from stored_queries import edit_callback
edit_callback()


class PlantsPlugin(pluginmgr.Plugin):
tools = [TaxonomyCheckTool, StoredQueryEditorTool]
Expand Down
69 changes: 56 additions & 13 deletions bauble/plugins/plants/infoboxes.glade
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
Expand All @@ -201,7 +201,7 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
Expand All @@ -217,14 +217,14 @@
<property name="wrap_mode">word</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
Expand Down Expand Up @@ -275,14 +275,14 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">0</property>
Expand Down Expand Up @@ -439,7 +439,7 @@
<property name="wrap_mode">word</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
Expand Down Expand Up @@ -746,7 +746,7 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
Expand Down Expand Up @@ -1228,14 +1228,17 @@
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="xpad">6</property>
<property name="label" translatable="yes">&lt;b&gt;s t o r e d   q u e r i e s&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="label" translatable="yes">s t o r e d   q u e r i e s</property>
<property name="angle">90</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">7</property>
<property name="bottom_attach">12</property>
<property name="bottom_attach">11</property>
</packing>
</child>
<child>
Expand Down Expand Up @@ -1554,10 +1557,50 @@
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
<object class="GtkButton" id="splash_stqr_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">edit stored queries</property>
<property name="use_action_appearance">False</property>
<property name="focus_on_click">False</property>
<signal name="clicked" handler="on_splash_stqr_button_clicked" swapped="no"/>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">accessories-text-editor</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
Expand Down

0 comments on commit d0a6df5

Please sign in to comment.