Skip to content

Commit

Permalink
renaming corresponding notebooks in different windows to share the sa…
Browse files Browse the repository at this point in the history
…me name.
  • Loading branch information
mfrasca committed Jan 23, 2018
1 parent 3da3f57 commit 6757af1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bauble/plugins/garden/accession.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ def __init__(self, parent=None):
self.widgets.source_sw.set_vadjustment(adjustment)

# set current page so we don't open the last one that was open
self.widgets.acc_notebook.set_current_page(0)
self.widgets.notebook.set_current_page(0)

def get_window(self):
return self.widgets.accession_dialog
Expand Down
6 changes: 3 additions & 3 deletions bauble/plugins/garden/plant.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def acc_cell_data_func(column, renderer, model, treeiter, data=None):
self.init_translatable_combo('plant_acc_type_combo', acc_type_values)
self.init_translatable_combo('reason_combo', change_reasons)
utils.setup_date_button(self, 'plant_date_entry', 'plant_date_button')
self.widgets.plant_notebook.set_current_page(0)
self.widgets.notebook.set_current_page(0)

def get_window(self):
return self.widgets.plant_editor_dialog
Expand Down Expand Up @@ -767,15 +767,15 @@ def on_select(value):
self.view.connect('plant_loc_edit_button', 'clicked',
self.on_loc_button_clicked, 'edit')
if self.model.quantity == 0:
self.view.widgets.plant_notebook.set_sensitive(False)
self.view.widgets.notebook.set_sensitive(False)
msg = _('This plant is marked with quantity zero. \n'
'In practice, it is not any more part of the collection. \n'
'Are you sure you want to edit it anyway?')
box = None
def on_response(button, response):
self.view.remove_box(box)
if response:
self.view.widgets.plant_notebook.set_sensitive(True)
self.view.widgets.notebook.set_sensitive(True)
box = self.view.add_message_box(utils.MESSAGE_BOX_YESNO)
box.message = msg
box.on_response = on_response
Expand Down

0 comments on commit 6757af1

Please sign in to comment.