From 89806cd6d580f5ed92613bb411f60845674b80f1 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 3 Sep 2001 03:18:54 +0000 Subject: [PATCH] Fixed data value in photo popup menu svn: r380 --- gramps/src/gramps_main.py | 4 ---- gramps/src/utils.py | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index f7bf8370b..f87e538fb 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -2442,7 +2442,6 @@ def box_event(obj,event): load_person(obj.get_data('p')) return 1 elif event.type == GDK.ENTER_NOTIFY: - canvas = gtop.get_widget("canvas1") obj.raise_to_top() box = obj.children()[1] x,y,w,h = box.get_bounds() @@ -2466,7 +2465,6 @@ def box_event(obj,event): x=PAD, y=2*h+(h/2)) elif event.type == GDK.LEAVE_NOTIFY: - canvas = gtop.get_widget("canvas1") ch = obj.children() length = len(ch) if length <= 3: @@ -2494,14 +2492,12 @@ def line_event(obj,event): change_active_person(obj.get_data("p")) load_canvas() elif event.type == GDK.ENTER_NOTIFY: - canvas = gtop.get_widget("canvas1") obj.set(fill_color_gdk=canvas['style'].bg[STATE_SELECTED], width_pixels=4) name = Config.nameof(obj.get_data("p")) msg = _("Double clicking will make %s the active person") % name statusbar.set_status(msg) elif event.type == GDK.LEAVE_NOTIFY: - canvas = gtop.get_widget("canvas1") obj.set(fill_color_gdk=canvas['style'].black, width_pixels=2) modify_statusbar() diff --git a/gramps/src/utils.py b/gramps/src/utils.py index 2c630a646..e93114e10 100644 --- a/gramps/src/utils.py +++ b/gramps/src/utils.py @@ -31,6 +31,7 @@ _modifiedFlag = 0 LISTOBJ = "s" INDEX = "i" +OBJECT = "o" #------------------------------------------------------------------------- # @@ -241,7 +242,7 @@ def delete_selected(obj,list): #------------------------------------------------------------------------- def add_menuitem(menu,msg,obj,func): item = gtk.GtkMenuItem(msg) - item.set_data("m",obj) + item.set_data(OBJECT,obj) item.connect("activate",func) item.show() menu.append(item)