* src/gramps_main.py (back_pressed, fwd_pressed): Pass event to the
build_menu functions; (build_backhistmenu, build_fwdhistmenu): Use event for popping the menu. * NEWS, TODO: catch up with the current CVS state. * src/Utils.py (history_broken, clearHistory_broken, wasHistory_broken): Add functions. * src/plugins/ReorderIds.py(__init__): Call Utils.history_broken upon reordering. * src/gramps_main.py (clear_history): Add function; (redraw_histmenu, fwd_clicked, back_clicked): Clear history if catching an exception (should be actually handled by reorder plugin, leaving here svn: r2320
This commit is contained in:
14
src/Utils.py
14
src/Utils.py
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard python modules
|
||||
@ -56,6 +58,7 @@ from gettext import gettext as _
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
_modifiedFlag = 0
|
||||
_history_brokenFlag = 0
|
||||
_autotime_val = 1
|
||||
_autosave_fun = None
|
||||
_autosave_tim = None
|
||||
@ -94,6 +97,10 @@ def clear_timer():
|
||||
gtk.timeout_remove(_autosave_tim)
|
||||
_autosave_tim = None
|
||||
|
||||
def history_broken():
|
||||
global _history_brokenFlag
|
||||
_history_brokenFlag = 1
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# force_unicode
|
||||
@ -116,6 +123,10 @@ def clearModified():
|
||||
global _modifiedFlag
|
||||
_modifiedFlag = 0
|
||||
|
||||
def clearHistory_broken():
|
||||
global _history_brokenFlag
|
||||
_history_brokenFlag = 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Returns the modified flag
|
||||
@ -124,6 +135,9 @@ def clearModified():
|
||||
def wasModified():
|
||||
return _modifiedFlag
|
||||
|
||||
def wasHistory_broken():
|
||||
return _history_brokenFlag
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Short hand function to return either the person's name, or an empty
|
||||
|
Reference in New Issue
Block a user