Fixed data value in photo popup menu

svn: r380
This commit is contained in:
Don Allingham 2001-09-03 03:18:54 +00:00
parent 399a50601e
commit 89806cd6d5
2 changed files with 2 additions and 5 deletions

View File

@ -2442,7 +2442,6 @@ def box_event(obj,event):
load_person(obj.get_data('p')) load_person(obj.get_data('p'))
return 1 return 1
elif event.type == GDK.ENTER_NOTIFY: elif event.type == GDK.ENTER_NOTIFY:
canvas = gtop.get_widget("canvas1")
obj.raise_to_top() obj.raise_to_top()
box = obj.children()[1] box = obj.children()[1]
x,y,w,h = box.get_bounds() x,y,w,h = box.get_bounds()
@ -2466,7 +2465,6 @@ def box_event(obj,event):
x=PAD, x=PAD,
y=2*h+(h/2)) y=2*h+(h/2))
elif event.type == GDK.LEAVE_NOTIFY: elif event.type == GDK.LEAVE_NOTIFY:
canvas = gtop.get_widget("canvas1")
ch = obj.children() ch = obj.children()
length = len(ch) length = len(ch)
if length <= 3: if length <= 3:
@ -2494,14 +2492,12 @@ def line_event(obj,event):
change_active_person(obj.get_data("p")) change_active_person(obj.get_data("p"))
load_canvas() load_canvas()
elif event.type == GDK.ENTER_NOTIFY: elif event.type == GDK.ENTER_NOTIFY:
canvas = gtop.get_widget("canvas1")
obj.set(fill_color_gdk=canvas['style'].bg[STATE_SELECTED], obj.set(fill_color_gdk=canvas['style'].bg[STATE_SELECTED],
width_pixels=4) width_pixels=4)
name = Config.nameof(obj.get_data("p")) name = Config.nameof(obj.get_data("p"))
msg = _("Double clicking will make %s the active person") % name msg = _("Double clicking will make %s the active person") % name
statusbar.set_status(msg) statusbar.set_status(msg)
elif event.type == GDK.LEAVE_NOTIFY: elif event.type == GDK.LEAVE_NOTIFY:
canvas = gtop.get_widget("canvas1")
obj.set(fill_color_gdk=canvas['style'].black, width_pixels=2) obj.set(fill_color_gdk=canvas['style'].black, width_pixels=2)
modify_statusbar() modify_statusbar()

View File

@ -31,6 +31,7 @@ _modifiedFlag = 0
LISTOBJ = "s" LISTOBJ = "s"
INDEX = "i" INDEX = "i"
OBJECT = "o"
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -241,7 +242,7 @@ def delete_selected(obj,list):
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
def add_menuitem(menu,msg,obj,func): def add_menuitem(menu,msg,obj,func):
item = gtk.GtkMenuItem(msg) item = gtk.GtkMenuItem(msg)
item.set_data("m",obj) item.set_data(OBJECT,obj)
item.connect("activate",func) item.connect("activate",func)
item.show() item.show()
menu.append(item) menu.append(item)