diff --git a/src/AutoComp.py b/src/AutoComp.py index 3bec3e66f..09202cd76 100644 --- a/src/AutoComp.py +++ b/src/AutoComp.py @@ -100,8 +100,7 @@ class AutoCompBase: this form of a select_region() call works in a signal handler and the other form doesn't is a mystery. """ - #entry.select_region(0, 0) - pass + entry.select_region(0, 0) def timer_callback(self,entry): """ diff --git a/src/EditPerson.py b/src/EditPerson.py index e83f68338..588fcaa51 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -137,7 +137,6 @@ class EditPerson: "on_ldsendow_src_clicked" : self.on_ldsendow_source_clicked, "on_ldsseal_src_clicked" : self.on_ldsseal_source_clicked, "on_name_source_clicked" : self.on_primary_name_source_clicked, - "on_photolist_button_press_event" : self.gallery.on_button_press_event, "on_photolist_select_icon" : self.gallery.on_photo_select_icon, "on_update_address_clicked" : self.on_update_addr_clicked, "on_update_attr_clicked" : self.on_update_attr_clicked, diff --git a/src/FamilyView.py b/src/FamilyView.py index c5f4aabea..aaf981def 100644 --- a/src/FamilyView.py +++ b/src/FamilyView.py @@ -40,6 +40,7 @@ import GrampsCfg from RelLib import Person import AddSpouse +import SelectChild import DisplayTrace import Marriage import ChooseParents @@ -88,6 +89,7 @@ class FamilyView: self.top.get_widget('del_spparents').connect('clicked',self.del_sp_parents) self.top.get_widget('fam_back').connect('clicked',self.child_back) self.top.get_widget('del_child_btn').connect('clicked',self.remove_child_clicked) + self.top.get_widget('add_child_btn').connect('clicked',self.add_child_clicked) column = gtk.TreeViewColumn('',gtk.CellRendererText(),text=0) self.spouse_list.append_column(column) @@ -154,6 +156,16 @@ class FamilyView: except: DisplayTrace.DisplayTrace() + def add_child_clicked(self,obj): + if not self.person: + return + try: + SelectChild.SelectChild(self.parent.db, self.family, + self.person, + self.load_family) + except: + DisplayTrace.DisplayTrace() + def remove_child_clicked(self,obj): if not self.family or not self.person: return diff --git a/src/ImageSelect.py b/src/ImageSelect.py index 83712f343..236fa62cd 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -25,6 +25,7 @@ #------------------------------------------------------------------------- import os import string +import urlparse #------------------------------------------------------------------------- # @@ -226,6 +227,47 @@ class Gallery(ImageSelect): self.x = 0 self.y = 0 + def item_event(self, widget, event=None): + + photo = widget.get_data('obj') + if event.type == gtk.gdk.BUTTON_PRESS: + if event.button == 1: + # Remember starting position. + self.remember_x = event.x + self.remember_y = event.y + return gtk.TRUE + + elif event.button == 3: + self.show_popup(photo) + return gtk.TRUE + + elif event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: + #Change the item's color. + print photo,self.path,self + LocalMediaProperties(photo,self.path,self) + return gtk.TRUE + + elif event.type == gtk.gdk.MOTION_NOTIFY: + if event.state & gtk.gdk.BUTTON1_MASK: + # Get the new position and move by the difference + new_x = event.x + new_y = event.y + + self.remember_x = new_x + self.remember_y = new_y + + return gtk.TRUE + + elif event.type == gtk.gdk.ENTER_NOTIFY: + # Make the outline wide. + return gtk.TRUE + + elif event.type == gtk.gdk.LEAVE_NOTIFY: + # Make the outline thin. + return gtk.TRUE + + return gtk.FALSE + def savephoto(self, photo): """Save the photo in the dataobj object. (Required function)""" self.db.addObject(photo) @@ -247,6 +289,8 @@ class Gallery(ImageSelect): y = image.get_height() grp = self.root.add(gnome.canvas.CanvasGroup,x=self.cx,y=self.cy) + grp.connect('event',self.item_event) + grp.set_data('obj',photo) xloc = (_IMAGEX-x)/2 yloc = (_IMAGEX-y)/2 @@ -284,10 +328,13 @@ class Gallery(ImageSelect): self.cx = 10 self.cy = 10 + (self.x,self.y) = self.iconlist.get_size() + + self.max = (self.x)/(_IMAGEX+10) + for photo in self.dataobj.getPhotoList(): self.add_thumbnail(photo) - (self.x,self.y) = self.iconlist.get_size() if self.cy > self.y: self.iconlist.set_scroll_region(0,0,self.x,self.cy) else: @@ -297,10 +344,16 @@ class Gallery(ImageSelect): """User clicked on a photo. Remember which one.""" self.selectedIcon = iconNumber + def get_index(self,obj,x,y): + x_offset = x/(_IMAGEX+10) + y_offset = y/(_IMAGEY+10) + index = (y_offset*self.max)+x_offset + return min(index,len(self.dataobj.getPhotoList())) + def on_photolist_drag_data_received(self,w, context, x, y, data, info, time): - import urlparse + print "receive",w if data and data.format == 8: - icon_index = w.get_icon_at(x,y) + icon_index = self.get_index(w,x,y) d = string.strip(string.replace(data.data,'\0',' ')) protocol,site,file, j,k,l = urlparse.urlparse(d) if protocol == "file": @@ -348,7 +401,7 @@ class Gallery(ImageSelect): photo.setPath(name) except: photo.setPath(tfile) - w.drag_finish(context, 1, 0, time) + # w.drag_finish(context, 1, 0, time) return self.add_thumbnail(oref) self.parent.lists_changed = 1 @@ -357,14 +410,15 @@ class Gallery(ImageSelect): GlobalMediaProperties(self.db,photo,None) else: if self.db.getObjectMap().has_key(data.data): + icon_index = self.get_index(w,x,y) index = 0 for p in self.dataobj.getPhotoList(): if data.data == p.getReference().getId(): if index == icon_index or icon_index == -1: - w.drag_finish(context, 0, 0, time) + # w.drag_finish(context, 0, 0, time) return else: - w.drag_finish(context, 1, 0, time) + # w.drag_finish(context, 1, 0, time) nl = self.dataobj.getPhotoList() item = nl[index] if icon_index == 0: @@ -387,11 +441,13 @@ class Gallery(ImageSelect): if GrampsCfg.globalprop: LocalMediaProperties(oref,self.path,self) Utils.modified() - w.drag_finish(context, 1, 0, time) + #w.drag_finish(context, 1, 0, time) else: - w.drag_finish(context, 0, 0, time) + pass + #w.drag_finish(context, 0, 0, time) def on_photolist_drag_data_get(self,w, context, selection_data, info, time): + print "drag data get",w if info == 1: return if self.selectedIcon != -1: @@ -420,38 +476,34 @@ class Gallery(ImageSelect): self.selectedIcon = 0 self.icon_list.select_icon(0) - def on_button_press_event(self, obj, event): + def show_popup(self, photo): """Look for right-clicks on a picture and create a popup menu of the available actions.""" - icon = self.selectedIcon - if icon == -1: - return - - if event.button == 3: - photo = self.dataobj.getPhotoList()[icon] - menu = gtk.Menu() - item = gtk.TearoffMenuItem() - item.show() - menu.append(item) - mtype = object.getMimeType() - progname = grampslib.default_application_name(mtype) - - Utils.add_menuitem(menu,_("Open in %s") % progname, - None,self.popup_view_photo) - object = photo.getReference() - if mtype[0:5] == "image": - Utils.add_menuitem(menu,_("Edit with the GIMP"), - None,self.popup_edit_photo) - Utils.add_menuitem(menu,_("Edit Object Properties"),None, - self.popup_change_description) - if object.getLocal() == 0: - Utils.add_menuitem(menu,_("Convert to local copy"),None, - self.popup_convert_to_private) - menu.popup(None,None,None,0,0) + + menu = gtk.Menu() + item = gtk.TearoffMenuItem() + item.show() + menu.append(item) + object = photo.getReference() + mtype = object.getMimeType() + progname = grampslib.default_application_name(mtype) + + Utils.add_menuitem(menu,_("Open in %s") % progname, + photo,self.popup_view_photo) + if mtype[0:5] == "image": + Utils.add_menuitem(menu,_("Edit with the GIMP"), + photo,self.popup_edit_photo) + Utils.add_menuitem(menu,_("Edit Object Properties"),photo, + self.popup_change_description) + if object.getLocal() == 0: + Utils.add_menuitem(menu,_("Convert to local copy"),photo, + self.popup_convert_to_private) + menu.popup(None,None,None,0,0) + def popup_view_photo(self, obj): """Open this picture in a picture viewer""" - photo = self.dataobj.getPhotoList()[self.selectedIcon] + photo = obj.get_data('o') Utils.view_photo(photo.getReference()) def popup_edit_photo(self, obj): @@ -501,18 +553,19 @@ class LocalMediaProperties: self.attr_value = self.change_dialog.get_widget("attr_value") self.attr_details = self.change_dialog.get_widget("attr_details") - self.attr_list = self.change_dialog.get_widget("attr_list") self.attr_model = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING) - Utils.build_columns(self.attr_list, [(_('Attribute'),150,-1), (_('Value'),100,-1)]) + Utils.build_columns(self.attr_list, [(_('Attribute'),150,-1), + (_('Value'),100,-1)]) self.attr_list.set_model(self.attr_model) self.attr_list.get_selection().connect('changed',self.on_attr_list_select_row) descr_window.set_text(self.object.getDescription()) mtype = self.object.getMimeType() - self.pix = gtk.gdk.pixbuf_new_from_file(path) - pixmap.set_from_pixbuf(self.pix) + if os.path.isfile(path): + self.pix = gtk.gdk.pixbuf_new_from_file(path) + pixmap.set_from_pixbuf(self.pix) self.change_dialog.get_widget("private").set_active(photo.getPrivacy()) self.change_dialog.get_widget("gid").set_text(self.object.getId()) diff --git a/src/ListModel.py b/src/ListModel.py index b0879d7e0..a606b4332 100644 --- a/src/ListModel.py +++ b/src/ListModel.py @@ -58,9 +58,21 @@ class ListModel: renderer = gtk.CellRendererText() column = gtk.TreeViewColumn(name[0],renderer,text=cnum) column.set_min_width(name[1]) + if name[2]: + column.set_sort_column_id(name[2]) + if name[0] == '': + column.set_clickable(gtk.TRUE) + column.set_visible(gtk.FALSE) + else: + column.set_resizable(gtk.TRUE) cnum = cnum + 1 tree.append_column(column) + if cnum == 1: + column.clicked() + def clear(self): + self.model.clear() + def add(self,data): iter = self.model.append() col = 0 diff --git a/src/NoteEdit.py b/src/NoteEdit.py index b77537e89..ed380352e 100644 --- a/src/NoteEdit.py +++ b/src/NoteEdit.py @@ -32,8 +32,7 @@ import gnome.ui # #------------------------------------------------------------------------- import Utils -from intl import gettext -_ = gettext +from intl import gettext as _ #------------------------------------------------------------------------- # @@ -62,7 +61,7 @@ class NoteEditor: self.entry = gtk.TextView() self.entry.set_editable(gtk.TRUE) self.entry.show() - + scroll = gtk.ScrolledWindow() scroll.add(self.entry) scroll.set_policy (gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) diff --git a/src/SelectChild.py b/src/SelectChild.py index bf9229635..a32108f18 100644 --- a/src/SelectChild.py +++ b/src/SelectChild.py @@ -23,8 +23,14 @@ # internationalization # #------------------------------------------------------------------------- -from intl import gettext -_ = gettext +from intl import gettext as _ + +#------------------------------------------------------------------------- +# +# standard python modules +# +#------------------------------------------------------------------------- +import string #------------------------------------------------------------------------- # @@ -44,8 +50,8 @@ import const import sort import Utils import GrampsCfg -import string import AutoComp +import ListModel #------------------------------------------------------------------------- # @@ -64,13 +70,13 @@ class SelectChild: self.xml.signal_autoconnect({ "on_save_child_clicked" : self.on_save_child_clicked, "on_show_toggled" : self.on_show_toggled, + "on_add_person_clicked" : self.on_add_person_clicked, "destroy_passed_object" : Utils.destroy_passed_object }) self.select_child_list = {} self.top = self.xml.get_widget("selectChild") - self.add_child = self.xml.get_widget("addChild") -# self.add_child.set_column_visibility(1,GrampsCfg.id_visible) + self.add_child = self.xml.get_widget("childlist") if (self.family): father = self.family.getFather() @@ -99,14 +105,17 @@ class SelectChild: self.mrel = self.xml.get_widget("mrel") self.frel = self.xml.get_widget("frel") self.mrel.set_text(_("Birth")) + self.frel.set_text(_("Birth")) - + + self.refmodel = ListModel.ListModel(self.add_child,[(_('Name'),150,3),(_('ID'),50,1), + (_('Birth Date'),100,4), + ('',0,0),('',0,0)]) self.redraw_child_list(2) self.top.show() def redraw_child_list(self,filter): - self.add_child.freeze() - self.add_child.clear() + self.refmodel.clear() index = 0 bday = self.person.getBirth().getDateObj() @@ -160,39 +169,40 @@ class SelectChild: person_list.append(person) - person_list.sort(sort.by_last_name) for person in person_list: - self.add_child.append([Utils.phonebook_name(person), - Utils.birthday(person), - person.getId()]) - self.add_child.set_row_data(index,person) - index = index + 1 - self.add_child.thaw() + dinfo = self.db.getPersonDisplay(id) + rdata = [dinfo[0],dinfo[1],dinfo[3],dinfo[5],dinfo[6]] + self.refmodel.add(rdata) def on_save_child_clicked(self,obj): - for row in self.add_child.selection: - select_child = self.add_child.get_row_data(row) - if self.family == None: - self.family = self.db.newFamily() - self.person.addFamily(self.family) - if self.person.getGender() == Person.male: - self.family.setFather(self.person) - else: - self.family.setMother(self.person) + store,iter = self.refmodel.selection.get_selected() - self.family.addChild(select_child) - - mrel = const.childRelations[self.mrel.get_text()] - mother = self.family.getMother() - if mother and mother.getGender() != Person.female: - if mrel == "Birth": - mrel = "Unknown" + if not iter: + return + + id = self.refmodel.model.get_value(iter,1) + select_child = self.db.getPerson(id) + if self.family == None: + self.family = self.db.newFamily() + self.person.addFamily(self.family) + if self.person.getGender() == Person.male: + self.family.setFather(self.person) + else: + self.family.setMother(self.person) - frel = const.childRelations[self.frel.get_text()] - father = self.family.getFather() - if father and father.getGender() != Person.male: - if frel == "Birth": - frel = "Unknown" + self.family.addChild(select_child) + + mrel = const.childRelations[self.mrel.get_text()] + mother = self.family.getMother() + if mother and mother.getGender() != Person.female: + if mrel == "Birth": + mrel = "Unknown" + + frel = const.childRelations[self.frel.get_text()] + father = self.family.getFather() + if father and father.getGender() != Person.male: + if frel == "Birth": + frel = "Unknown" # if mrel == "Birth" and frel == "Birth": # family = select_child.getMainFamily() @@ -201,9 +211,9 @@ class SelectChild: # # select_child.setMainFamily(self.family) # else: - select_child.addAltFamily(self.family,mrel,frel) + select_child.addAltFamily(self.family,mrel,frel) - Utils.modified() + Utils.modified() Utils.destroy_passed_object(obj) self.redraw(self.family) @@ -211,185 +221,18 @@ class SelectChild: def on_show_toggled(self,obj): self.redraw_child_list(obj.get_active()) -class NewChild: - - def __init__(self,db,family,person,update,update_disp,autoname=3): - self.db = db - self.person = person - self.family = family - self.update = update - self.edit_update = update_disp + def on_add_person_clicked(self,obj): + """Called with the Add button is pressed. Calls the QuickAdd + class to create a new person.""" - self.xml = gtk.glade.XML(const.gladeFile,"addChild") - self.xml.signal_autoconnect({ - "on_addchild_ok_clicked" : self.on_addchild_ok_clicked, - "on_edit_new_child" : self.on_edit_new_child, - "on_male_toggled" : self.on_male_toggled, - "on_female_toggled" : self.on_female_toggled, - "on_gender_toggled" : self.on_gender_toggled, - "destroy_passed_object" : Utils.destroy_passed_object - }) + import QuickAdd + QuickAdd.QuickAdd(self.db,"male",self.add_new_parent) - if autoname == 0: - self.update_surname = self.north_american - elif autoname == 2: - self.update_surname = self.latin_american - elif autoname == 3: - self.update_surname = self.icelandic - else: - self.update_surname = self.no_name - - self.mrel = self.xml.get_widget("mrel") - self.frel = self.xml.get_widget("frel") - self.top = self.xml.get_widget("addChild") - self.surname = self.xml.get_widget("surname") - self.given = self.xml.get_widget("childGiven") - if GrampsCfg.autocomp: - self.comp = AutoComp.AutoEntry(self.surname,self.db.getSurnames()) - - self.surname.set_text(self.update_surname(2)) - - if self.family: - father = self.family.getFather() - mother = self.family.getMother() - - if father != None: - fname = father.getPrimaryName().getName() - label = _("Relationship to %s") % fname - self.xml.get_widget("flabel").set_text(label) - - if mother != None: - mname = mother.getPrimaryName().getName() - label = _("Relationship to %s") % mname - self.xml.get_widget("mlabel").set_text(label) - else: - fname = self.person.getPrimaryName().getName() - label = _("Relationship to %s") % fname - - if self.person.getGender() == Person.male: - self.xml.get_widget("flabel").set_text(label) - self.xml.get_widget("mcombo").set_sensitive(0) - else: - self.xml.get_widget("mlabel").set_text(label) - self.xml.get_widget("fcombo").set_sensitive(0) - - self.mrel.set_text(_("Birth")) - self.frel.set_text(_("Birth")) - - # Typing CR selects OK button - self.top.editable_enters(self.given) - self.top.editable_enters(self.surname) - self.top.editable_enters(self.mrel) - self.top.editable_enters(self.frel) - self.top.show() - - def on_male_toggled(self,obj): - if obj.get_active(): - txt = self.surname.get_text() - if txt == "" or txt == self.update_surname(1): - self.surname.set_text(self.update_surname(0)) - - def on_female_toggled(self,obj): - if obj.get_active(): - txt = self.surname.get_text() - if txt == "" or txt == self.update_surname(0): - self.surname.set_text(self.update_surname(1)) - - def on_gender_toggled(self,obj): - pass - - def combo_insert_text(self,combo,new_text,new_text_len,i_dont_care): - Utils.combo_insert_text(combo,new_text,new_text_len,i_dont_care) - - def north_american(self,val): - if self.person.getGender() == Person.male: - return self.person.getPrimaryName().getSurname() - elif self.family: - f = self.family.getFather() - if f: - return f.getPrimaryName().getSurname() - return "" - - def no_name(self,val): - return "" - - def latin_american(self,val): - if self.family: - father = self.family.getFather() - mother = self.family.getMother() - if not father or not mother: - return "" - fsn = father.getPrimaryName().getSurname() - msn = mother.getPrimaryName().getSurname() - if not father or not mother: - return "" - return "%s %s" % (string.split(fsn)[0],string.split(msn)[0]) - else: - return "" - - def icelandic(self,val): - fname = "" - if self.person.getGender() == Person.male: - fname = self.person.getPrimaryName().getFirstName() - elif self.family: - f = self.family.getFather() - if f: - fname = f.getPrimaryName().getFirstName() - if fname: - fname = string.split(fname)[0] - if val == 0: - return "%ssson" % fname - elif val == 1: - return "%sdóttir" % fname - else: - return "" - - def on_addchild_ok_clicked(self,obj): - - surname = self.surname.get_text() - given = self.given.get_text() - - person = Person() - self.db.addPerson(person) - - name = Name() - name.setSurname(surname) - name.setFirstName(given) - person.setPrimaryName(name) - - if self.xml.get_widget("childMale").get_active(): - person.setGender(Person.male) - elif self.xml.get_widget("childFemale").get_active(): - person.setGender(Person.female) - else: - person.setGender(Person.unknown) - - if not self.family: - self.family = self.db.newFamily() - if self.person.getGender() == Person.male: - self.family.setFather(self.person) - else: - self.family.setMother(self.person) - self.person.addFamily(self.family) - - mrel = const.childRelations[self.mrel.get_text()] - frel = const.childRelations[self.frel.get_text()] - - person.addAltFamily(self.family,mrel,frel) - - self.family.addChild(person) - - # must do an apply filter here to make sure the main window gets updated - - self.update(self.family,person,[]) - Utils.modified() - Utils.destroy_passed_object(obj) - self.new_child = person - - def on_edit_new_child(self,obj): - import EditPerson - - self.on_addchild_ok_clicked(obj) - EditPerson.EditPerson(self.new_child,self.db,self.edit_update) - + def add_new_parent(self,person): + """Adds a new person to either the father list or the mother list, + depending on the gender of the person.""" + id = person.getId() + dinfo = self.db.getPersonDisplay(id) + rdata = [dinfo[0],dinfo[1],dinfo[3],dinfo[5],dinfo[6]] + self.refmodel.add(rdata) diff --git a/src/Utils.py b/src/Utils.py index 4b18e4fa4..09ebecb77 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -264,24 +264,13 @@ def add_menuitem(menu,msg,obj,func): #------------------------------------------------------------------------- def view_photo(photo): type = photo.getMimeType() - prog = grampslib.gnome_vfs_mime_get_value(type,'view') - open = grampslib.gnome_vfs_mime_get_value(type,'open') - edit = grampslib.gnome_vfs_mime_get_value(type,'edit') - if prog == "" and open == "" and edit == "": - #GnomeWarningDialog("Sorry, I cannot find a viewer for %s type" % type) - return + prog = grampslib.default_application_command(type) - if not prog and not open : - prog = edit - else: - prog = open + if not prog: + return - args = [] - for val in prog: - if val == "%f": - args.append(photo.getPath()) - else: - args.append(val) + args = string.split(prog) + args.append(photo.getPath()) if os.fork() == 0: os.execvp(args[0],args) diff --git a/src/gramps.glade b/src/gramps.glade index f88676186..e15ee8fa7 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -2856,8 +2856,8 @@ True True True - Add new person - True + gtk-add + True GTK_RELIEF_NORMAL @@ -3849,6 +3849,8 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True + 450 + 400 True False True @@ -3932,7 +3934,7 @@ 10 - True + False True @@ -3941,17 +3943,17 @@ True True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC GTK_SHADOW_NONE GTK_CORNER_TOP_LEFT - + True True True - False + True False True @@ -3963,6 +3965,31 @@ True + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 0 + + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + + + + + + 0 + False + False + + 0 @@ -4051,7 +4078,6 @@ True * False - @@ -4258,7 +4284,6 @@ True * False - @@ -4414,7 +4439,7 @@ 0 - True + False True @@ -5082,739 +5107,6 @@ - - True - Add New Child - GRAMPS - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - Creates the new child and adds him or her as a child of the family - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - 0 - - - - - - - True - Adds the new person as a child of the family and displays the standard person dialog to allow for more data to be entered - True - True - Add Data - True - GTK_RELIEF_NORMAL - 0 - - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - 0 - - - - - - 0 - True - True - GTK_PACK_END - - - - - - True - False - 0 - - - - True - <b>Add New Child</b> - False - True - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 5 - False - False - - - - - - True - - - 10 - False - True - - - - - - True - 5 - 2 - False - 0 - 0 - - - - True - Relationship to Father - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 5 - 5 - - - 0 - 1 - 3 - 4 - 5 - 5 - - - - - - - True - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - 5 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - 5 - fill - - - - - - - True - True - False - True - True - False - - - - True - True - False - True - 0 - - True - * - False - - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - Birth - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Adopted - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Stepchild - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - None - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Unknown - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - - 1 - 2 - 4 - 5 - 5 - 5 - fill - - - - - - - True - True - False - True - True - False - - - - True - True - False - True - 0 - - True - * - False - - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - Birth - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Adopted - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Stepchild - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - None - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - Unknown - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - - 1 - 2 - 3 - 4 - 5 - 5 - fill - - - - - - - True - True - 0 - - - - True - True - male - True - GTK_RELIEF_NORMAL - False - False - True - - - - 0 - False - True - - - - - - True - True - female - True - GTK_RELIEF_NORMAL - True - False - True - childMale - - - - 0 - False - True - - - - - - True - True - unknown - True - GTK_RELIEF_NORMAL - True - False - True - childMale - - - - 0 - False - False - - - - - 1 - 2 - 2 - 3 - 5 - fill - - - - - - - True - Given Name - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 5 - 5 - - - 0 - 1 - 0 - 1 - 5 - 5 - - - - - - - True - Surname - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 5 - 5 - - - 0 - 1 - 1 - 2 - 5 - 5 - - - - - - - True - Gender - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 5 - 5 - - - 0 - 1 - 2 - 3 - 5 - 5 - - - - - - - True - Relationship to Mother - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 5 - 5 - - - 0 - 1 - 4 - 5 - 5 - 5 - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True Add Person - GRAMPS diff --git a/src/gramps_main.py b/src/gramps_main.py index 30b420163..110c02442 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -259,8 +259,6 @@ class Gramps: "on_spouse_list_changed" : self.spouse_list_changed, "on_about_activate" : self.on_about_activate, "on_add_bookmark_activate" : self.on_add_bookmark_activate, - "on_add_child_clicked" : self.on_add_child_clicked, - "on_add_new_child_clicked" : self.on_add_new_child_clicked, "on_add_place_clicked" : self.place_view.on_add_place_clicked, "on_add_source_clicked" : self.source_view.on_add_clicked, "on_addperson_clicked" : self.load_new_person, @@ -561,28 +559,6 @@ class Gramps: def add_new_cancel(self,obj): Utils.destroy_passed_object(self.addornew) - def on_add_child_clicked(self,obj): - """Select an existing child to add to the active family""" - import SelectChild - if self.active_person: - SelectChild.SelectChild(self.db,self.active_family, - self.active_person, - self.family_view.load_family) - - def on_add_new_child_clicked(self,obj): - """Create a new child to add to the existing family""" - import SelectChild - if self.active_person: - try: - SelectChild.NewChild(self.db,self.active_family, - self.active_person, - self.update_after_newchild, - self.update_after_edit, - GrampsCfg.lastnamegen) - except: - DisplayTrace.DisplayTrace() - - def on_new_clicked(self,obj): """Prompt for permission to close the current database""" diff --git a/src/plugins.glade b/src/plugins.glade index 63882945d..864243583 100644 --- a/src/plugins.glade +++ b/src/plugins.glade @@ -9,6 +9,8 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False + 475 + 350 True False True @@ -87,6 +89,7 @@ + 175 True True True