From 9315c698860414810306fa59f44531e17a9ae795 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Thu, 5 Dec 2013 17:07:16 +0200 Subject: [PATCH] 7086: "Remove selected items?" inconsistent YES/NO --- gramps/gui/views/listview.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 494e3c568..eacd2edbe 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -39,7 +39,7 @@ else: import time import logging -_LOG = logging.getLogger('.gui.listview') +LOG = logging.getLogger('.gui.listview') #---------------------------------------------------------------- # @@ -289,7 +289,7 @@ class ListView(NavigationView): if fg_color: renderer.set_property('foreground', fg_color) else: - _LOG.debug('Bad color set: ' + str(fg_color)) + LOG.debug('Bad color set: ' + str(fg_color)) def set_active(self): NavigationView.set_active(self) @@ -336,9 +336,9 @@ class ListView(NavigationView): self.uistate.show_filter_results(self.dbstate, self.model.displayed(), self.model.total()) - _LOG.debug(self.__class__.__name__ + ' build_tree ' + + LOG.debug(self.__class__.__name__ + ' build_tree ' + str(time.clock() - cput0) + ' sec') - _LOG.debug('parts ' + str(cput1-cput0) + ' , ' + LOG.debug('parts ' + str(cput1-cput0) + ' , ' + str(cput2-cput1) + ' , ' + str(cput3-cput2) + ' , ' + str(cput4-cput3) + ' , ' @@ -530,12 +530,12 @@ class ListView(NavigationView): prompt = True if len(self.selected_handles()) > 1: q = QuestionDialog2( - _("Remove selected items?"), + _("Confirm every deletion?"), _("More than one item has been selected for deletion. " "Ask before deleting each one?"), - _("Yes"), - _("No")) - prompt = q.run() + _("No"), + _("Yes")) + prompt = not q.run() if not prompt: self.uistate.set_busy_cursor(True) @@ -650,7 +650,7 @@ class ListView(NavigationView): self.uistate.set_busy_cursor(False) - _LOG.debug(' ' + self.__class__.__name__ + ' column_clicked ' + + LOG.debug(' ' + self.__class__.__name__ + ' column_clicked ' + str(time.clock() - cput) + ' sec') def __display_column_sort(self): @@ -724,7 +724,7 @@ class ListView(NavigationView): (not self.dirty and not self._dirty_on_change_inactive): cput = time.clock() list(map(self.model.add_row_by_handle, handle_list)) - _LOG.debug(' ' + self.__class__.__name__ + ' row_add ' + + LOG.debug(' ' + self.__class__.__name__ + ' row_add ' + str(time.clock() - cput) + ' sec') if self.active: self.uistate.show_filter_results(self.dbstate, @@ -745,7 +745,7 @@ class ListView(NavigationView): #store selected handles self._sel_handles_before_update = self.selected_handles() list(map(self.model.update_row_by_handle, handle_list)) - _LOG.debug(' ' + self.__class__.__name__ + ' row_update ' + + LOG.debug(' ' + self.__class__.__name__ + ' row_update ' + str(time.clock() - cput) + ' sec') # Ensure row is still selected after a change of postion in tree. if self._sel_handles_before_update: @@ -764,7 +764,7 @@ class ListView(NavigationView): (not self.dirty and not self._dirty_on_change_inactive): cput = time.clock() list(map(self.model.delete_row_by_handle, handle_list)) - _LOG.debug(' ' + self.__class__.__name__ + ' row_delete ' + + LOG.debug(' ' + self.__class__.__name__ + ' row_delete ' + str(time.clock() - cput) + ' sec') if self.active: self.uistate.show_filter_results(self.dbstate,