From fbe91910dc66ba5f9d32ba70bfea490cb25d9bdb Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Sat, 7 Jul 2012 22:33:21 +0000 Subject: [PATCH] Editperson opens and editfamily, popup fixes svn: r19960 --- src/gui/clipboard.py | 2 +- src/gui/editors/displaytabs/embeddedlist.py | 8 +- src/gui/editors/displaytabs/eventrefmodel.py | 2 +- src/gui/editors/displaytabs/gallerytab.py | 2 +- .../editors/displaytabs/groupembeddedlist.py | 1 + src/gui/editors/displaytabs/namemodel.py | 2 +- src/gui/editors/displaytabs/surnametab.py | 12 +- src/gui/editors/editfamily.py | 2 +- src/gui/editors/editperson.py | 12 +- src/gui/editors/editprimary.py | 4 +- src/gui/glade/editfamily.glade | 317 ++++++++++-------- src/gui/glade/editperson.glade | 25 +- src/gui/grampsbar.py | 4 +- src/gui/navigator.py | 4 +- src/gui/plug/quick/_quicktable.py | 2 +- src/gui/views/tags.py | 2 +- src/gui/views/treemodels/flatbasemodel.py | 8 +- src/gui/widgets/grampletpane.py | 2 +- src/gui/widgets/monitoredwidgets.py | 2 +- src/gui/widgets/undoableentry.py | 4 +- src/plugins/bookreport.py | 4 +- src/plugins/gramplet/fanchartgramplet.py | 2 +- src/plugins/lib/maps/geography.py | 2 +- src/plugins/tool/ownereditor.py | 2 +- src/plugins/view/fanchartview.py | 2 +- src/plugins/view/geoclose.py | 2 +- src/plugins/view/geoevents.py | 5 +- src/plugins/view/geofamclose.py | 2 +- src/plugins/view/geofamily.py | 5 +- src/plugins/view/geomoves.py | 2 +- src/plugins/view/geoperson.py | 5 +- src/plugins/view/geoplaces.py | 5 +- src/plugins/view/relview.py | 4 +- 33 files changed, 265 insertions(+), 194 deletions(-) diff --git a/src/gui/clipboard.py b/src/gui/clipboard.py index 674c0138b..8326cb777 100644 --- a/src/gui/clipboard.py +++ b/src/gui/clipboard.py @@ -1466,7 +1466,7 @@ class MultiTreeView(Gtk.TreeView): popup.append(menu_item) menu_item.show() # Show the popup menu: - popup.popup(None, None, None, 3, event.time) + popup.popup(None, None, None, None, 3, event.time) return True elif event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1: model, paths = self.get_selection().get_selected_rows() diff --git a/src/gui/editors/displaytabs/embeddedlist.py b/src/gui/editors/displaytabs/embeddedlist.py index 09330d942..1c041a128 100644 --- a/src/gui/editors/displaytabs/embeddedlist.py +++ b/src/gui/editors/displaytabs/embeddedlist.py @@ -152,7 +152,10 @@ class EmbeddedList(ButtonTab): img.set_from_stock(img_stock, Gtk.IconSize.MENU) item.set_image(img) else: - item = Gtk.ImageMenuItem(stock_id=title) + item = Gtk.ImageMenuItem('') + img = Gtk.Image() + img.set_from_stock(title, Gtk.IconSize.MENU) + item.set_image(img) else: item = Gtk.MenuItem(label=title) item.connect('activate', func) @@ -160,7 +163,8 @@ class EmbeddedList(ButtonTab): item.set_sensitive(False) item.show() menu.append(item) - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) + return True def find_index(self, obj): """ diff --git a/src/gui/editors/displaytabs/eventrefmodel.py b/src/gui/editors/displaytabs/eventrefmodel.py index cecdd2087..e86dcb2b5 100644 --- a/src/gui/editors/displaytabs/eventrefmodel.py +++ b/src/gui/editors/displaytabs/eventrefmodel.py @@ -95,7 +95,7 @@ class EventRefModel(Gtk.TreeStore): """ self.start_date = kwargs.get("start_date", None) typeobjs = (x[1] for x in self.COLS) - GObject.GObject.__init__(self, *typeobjs) + Gtk.TreeStore.__init__(self, *typeobjs) self.db = db self.groups = groups for index, group in enumerate(event_list): diff --git a/src/gui/editors/displaytabs/gallerytab.py b/src/gui/editors/displaytabs/gallerytab.py index a53f4e9c1..9cffdb647 100644 --- a/src/gui/editors/displaytabs/gallerytab.py +++ b/src/gui/editors/displaytabs/gallerytab.py @@ -162,7 +162,7 @@ class GalleryTab(ButtonTab, DbGUIElement): item.set_sensitive(False) item.show() menu.append(item) - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) def get_icon_name(self): return 'gramps-media' diff --git a/src/gui/editors/displaytabs/groupembeddedlist.py b/src/gui/editors/displaytabs/groupembeddedlist.py index 8d8099b40..d7a7fc054 100644 --- a/src/gui/editors/displaytabs/groupembeddedlist.py +++ b/src/gui/editors/displaytabs/groupembeddedlist.py @@ -33,6 +33,7 @@ import cPickle as pickle # GTK libraries # #------------------------------------------------------------------------- +from gi.repository import Gdk from gi.repository import Gtk from gi.repository import Pango from gi.repository import GObject diff --git a/src/gui/editors/displaytabs/namemodel.py b/src/gui/editors/displaytabs/namemodel.py index 9ef7ff92d..ffb509ff8 100644 --- a/src/gui/editors/displaytabs/namemodel.py +++ b/src/gui/editors/displaytabs/namemodel.py @@ -87,7 +87,7 @@ class NameModel(Gtk.TreeStore): that might be used. name is the name for the group. """ typeobjs = (x[1] for x in self.COLS) - GObject.GObject.__init__(self, *typeobjs) + Gtk.TreeStore.__init__(self, *typeobjs) self.db = db self.groups = groups for index, group in enumerate(obj_list): diff --git a/src/gui/editors/displaytabs/surnametab.py b/src/gui/editors/displaytabs/surnametab.py index e307ecdc5..c72462e75 100644 --- a/src/gui/editors/displaytabs/surnametab.py +++ b/src/gui/editors/displaytabs/surnametab.py @@ -341,17 +341,17 @@ class SurnameTab(EmbeddedList): """ (model, node) = self.selection.get_selected() if node: - path = int(self.model.get_path(node)[0]) + path = self.model.get_path(node).get_indices()[0] nccol = self.curr_col+1 if nccol < 4: - self.tree.set_cursor_on_cell(path, + self.tree.set_cursor_on_cell(Gtk.TreePath((path,)), focus_column=self.columns[nccol], focus_cell=None, start_editing=True) elif nccol == 4: #go to next line if there is one if path < len(self.obj.get_surname_list()): - newpath = (path+1,) + newpath = Gtk.TreePath((path+1,)) self.selection.select_path(newpath) self.tree.set_cursor_on_cell(newpath, focus_column=self.columns[0], @@ -370,16 +370,16 @@ class SurnameTab(EmbeddedList): """ (model, node) = self.selection.get_selected() if node: - path = int(self.model.get_path(node)[0]) + path = self.model.get_path(node).get_indices()[0] if self.curr_col > 0: - self.tree.set_cursor_on_cell(path, + self.tree.set_cursor_on_cell(Gtk.TreePath((path,)), focus_column=self.columns[self.curr_col-1], focus_cell=None, start_editing=True) elif self.curr_col == 0: #go to prev line if there is one if path > 0: - newpath = (path-1,) + newpath = Gtk.TreePath((path-1,)) self.selection.select_path(newpath) self.tree.set_cursor_on_cell(newpath, focus_column=self.columns[-2], diff --git a/src/gui/editors/editfamily.py b/src/gui/editors/editfamily.py index 52661ad53..4dae9d857 100644 --- a/src/gui/editors/editfamily.py +++ b/src/gui/editors/editfamily.py @@ -676,7 +676,7 @@ class EditFamily(EditPrimary): notebook.show_all() self.hidden = (notebook, self.top.get_object('info')) - self.top.get_object('vbox').pack_start(notebook, True) + self.top.get_object('vbox').pack_start(notebook, True, True, 0) def update_father(self, handle): self.load_parent(handle, self.fname, self.fbirth, self.fbirth_label, diff --git a/src/gui/editors/editperson.py b/src/gui/editors/editperson.py index 7664d48cd..74a2a0f86 100644 --- a/src/gui/editors/editperson.py +++ b/src/gui/editors/editperson.py @@ -216,7 +216,7 @@ class EditPerson(EditPrimary): self.multsurnfr.show_all() self.singlesurn_active = False else: - self.multsurnfr.hide_all() + self.multsurnfr.hide() self.singsurnfr.show_all() self.singlesurn_active = True #if self.pname.get_surname() and not self.pname.get_first_name(): @@ -524,7 +524,7 @@ class EditPerson(EditPrimary): self._setup_notebook_tabs(notebook) notebook.show_all() - self.top.get_object('vbox').pack_start(notebook, True) + self.top.get_object('vbox').pack_start(notebook, True, True, 0) def _changed_name(self, *obj): """ @@ -568,7 +568,7 @@ class EditPerson(EditPrimary): else: self.singlesurn_active = False if self.singlesurn_active: - self.multsurnfr.hide_all() + self.multsurnfr.hide() self.singsurnfr.show_all() else: self.singsurnfr.hide_all() @@ -626,7 +626,7 @@ class EditPerson(EditPrimary): self._popup_view_photo) add_menuitem(menu, _("Edit Object Properties"), photo, self._popup_change_description) - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) def _popup_view_photo(self, obj): """ @@ -891,7 +891,7 @@ class EditPerson(EditPrimary): else: self.singlesurn_active = False if self.singlesurn_active: - self.multsurnfr.hide_all() + self.multsurnfr.hide() self.singsurnfr.show_all() else: @@ -934,7 +934,7 @@ class EditPerson(EditPrimary): self.load_photo(ref, obj) else: self.obj_photo.hide() - self.frame_photo.hide_all() + self.frame_photo.hide() def load_photo(self, ref, obj): """ diff --git a/src/gui/editors/editprimary.py b/src/gui/editors/editprimary.py index 785250426..06df9b3b3 100644 --- a/src/gui/editors/editprimary.py +++ b/src/gui/editors/editprimary.py @@ -277,7 +277,7 @@ class EditPrimary(ManagedWindow, DbGUIElement): self.contexteventbox = eventbox self.contexteventbox.connect('button-press-event', self._contextmenu_button_press) - + def _contextmenu_button_press(self, obj, event) : """ Button press event that is caught when a mousebutton has been @@ -295,7 +295,7 @@ class EditPrimary(ManagedWindow, DbGUIElement): menu = self.popupmanager.get_widget('/Popup') if menu: - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) return True return False diff --git a/src/gui/glade/editfamily.glade b/src/gui/glade/editfamily.glade index 82c4ac952..75889f5b8 100644 --- a/src/gui/glade/editfamily.glade +++ b/src/gui/glade/editfamily.glade @@ -1,28 +1,106 @@ - + - + False dialog - + True + False + vertical + + + True + False + end + + + gtk-cancel + False + True + True + True + True + True + Abandon changes and close window + Abandon changes and close window + False + True + + + False + False + 0 + + + + + gtk-ok + False + True + True + True + True + True + True + Accept changes and close window + Accept changes and close window + False + True + + + False + False + 1 + + + + + gtk-help + False + True + True + True + True + False + True + + + False + False + end + 2 + + + + + False + True + end + 0 + + True + False True + False 6 - 12 + 4 True + False 132 True + False 6 4 2 @@ -31,6 +109,7 @@ True + False 0 Name: @@ -45,6 +124,7 @@ True + False 0 Birth: @@ -59,6 +139,7 @@ True + False 0 Death: @@ -73,9 +154,11 @@ True + False True + False 0 <b>Father</b> True @@ -88,9 +171,11 @@ + False True True True + False none @@ -100,6 +185,7 @@ True + False gtk-index @@ -118,9 +204,11 @@ + False True True True + False none @@ -130,6 +218,7 @@ True + False gtk-add @@ -147,9 +236,11 @@ + False True True True + False none @@ -159,6 +250,7 @@ True + False gtk-remove @@ -176,9 +268,11 @@ + False True True True + False none @@ -189,6 +283,7 @@ True + False gtk-edit @@ -208,11 +303,13 @@ 2 GTK_FILL + GTK_FILL True + False 0 @@ -227,6 +324,7 @@ True + False 0 @@ -241,6 +339,7 @@ True + False 0 end @@ -249,47 +348,24 @@ 2 1 2 - GTK_FILL - - - - - 0 - - - - - True - - - True - - - False - False - 0 - - - - - True - - - end - 1 + False - False - 1 + True + 0 + + + 132 True + False 6 4 2 @@ -298,6 +374,7 @@ True + False 0 Name: @@ -312,6 +389,7 @@ True + False 0 Birth: @@ -326,6 +404,7 @@ True + False 0 Death: @@ -340,6 +419,7 @@ True + False 0 @@ -354,6 +434,7 @@ True + False 0 @@ -368,9 +449,11 @@ True + False True + False 0 <b>Mother</b> True @@ -383,9 +466,11 @@ + False True True True + False none @@ -395,6 +480,7 @@ True + False gtk-index @@ -412,9 +498,11 @@ + False True True True + False none @@ -424,6 +512,7 @@ True + False gtk-add @@ -440,10 +529,44 @@ - + + False True True True + True + Indicates if the record is private + Indicates if the record is private + False + none + + + + True + False + gtk-dialog-authentication + + + Privacy + + + + + + + False + False + end + 3 + + + + + False + True + True + True + False none @@ -453,6 +576,7 @@ True + False gtk-remove @@ -470,9 +594,11 @@ + False True True True + False none @@ -483,6 +609,7 @@ True + False gtk-edit @@ -498,44 +625,17 @@ 5 - - - True - True - True - True - Indicates if the record is private - Indicates if the record is private - none - - - - True - gtk-dialog-authentication - - - Privacy - - - - - - - False - False - end - 3 - - 2 GTK_FILL + GTK_FILL True + False 0 end @@ -544,23 +644,27 @@ 2 1 2 - GTK_FILL + + False + True 2 False + True 0 True + False 6 3 4 @@ -569,6 +673,7 @@ True + False 0 <b>Relationship Information</b> True @@ -582,6 +687,7 @@ True + False 0 _ID: True @@ -614,6 +720,7 @@ True + False 0 _Type: True @@ -632,12 +739,13 @@ True + False The relationship type, eg 'Married' or 'Unmarried'. Use Events for more details. True - True - True + True + True @@ -652,6 +760,7 @@ True + False 0 _Tags: True @@ -668,20 +777,26 @@ True + False True + False + True + True 0 + False True True True Edit the tag list + False @@ -706,11 +821,13 @@ 4 2 3 + False + True 1 @@ -718,73 +835,11 @@ + True + True 1 - - - True - end - - - gtk-cancel - True - True - True - True - True - Abandon changes and close window - Abandon changes and close window - True - - - False - False - 0 - - - - - gtk-ok - True - True - True - True - True - True - Accept changes and close window - Accept changes and close window - True - - - False - False - 1 - - - - - gtk-help - True - True - True - True - True - - - False - False - end - 2 - - - - - False - end - 0 - - diff --git a/src/gui/glade/editperson.glade b/src/gui/glade/editperson.glade index 0e08f77ba..a181c754e 100644 --- a/src/gui/glade/editperson.glade +++ b/src/gui/glade/editperson.glade @@ -11,11 +11,13 @@ True False + True vertical True False + start end @@ -76,7 +78,7 @@ False - True + False end 0 @@ -85,15 +87,18 @@ True False + start True False + start 3 True False + start 8 9 @@ -345,8 +350,8 @@ True - True - True + True + True @@ -377,6 +382,7 @@ 5 6 GTK_FILL + 3 3 @@ -423,7 +429,7 @@ Indicate that the surname consists of different parts. Every surname has its own False - True + False 0 @@ -645,8 +651,8 @@ Indicate that the surname consists of different parts. Every surname has its own True - True - True + True + True @@ -808,15 +814,12 @@ Indicate that the surname consists of different parts. Every surname has its own - True - True + False + False 2 0 - - - diff --git a/src/gui/grampsbar.py b/src/gui/grampsbar.py index dca9eaa3c..069eeb4ba 100644 --- a/src/gui/grampsbar.py +++ b/src/gui/grampsbar.py @@ -319,7 +319,7 @@ class GrampsBar(Gtk.Notebook): height = min(int(self.uistate.screen_height() * 0.20), 400) gramplet.set_size_request(width, height) - page_num = self.append_page(gramplet) + page_num = self.append_page(gramplet, Gtk.Label(label=msg)) return page_num def __create_tab_label(self, gramplet): @@ -444,7 +444,7 @@ class GrampsBar(Gtk.Notebook): rd_menu.show() menu.append(rd_menu) - menu.popup(None, None, None, 1, event.time) + menu.popup(None, None, None, None, 1, event.time) return True return False diff --git a/src/gui/navigator.py b/src/gui/navigator.py index fc7a8a477..52d5b1e26 100644 --- a/src/gui/navigator.py +++ b/src/gui/navigator.py @@ -132,8 +132,8 @@ class Navigator(object): button.grab_focus() button.set_active(True) - self.menu.popup(None, None, cb_menu_position, event.button, - event.time, button) + self.menu.popup(None, None, cb_menu_position, button, event.button, + event.time) def cb_menu_activate(self, menu, index): """ diff --git a/src/gui/plug/quick/_quicktable.py b/src/gui/plug/quick/_quicktable.py index 5958a202c..82fee6331 100644 --- a/src/gui/plug/quick/_quicktable.py +++ b/src/gui/plug/quick/_quicktable.py @@ -150,7 +150,7 @@ class QuickTable(SimpleTable): popup.append(menu_item) menu_item.show() # Show the popup menu: - popup.popup(None, None, func, button_code, event_time) + popup.popup(None, None, func, None, button_code, event_time) return True return False diff --git a/src/gui/views/tags.py b/src/gui/views/tags.py index 0c4c37d6f..32faaa219 100644 --- a/src/gui/views/tags.py +++ b/src/gui/views/tags.py @@ -233,7 +233,7 @@ class Tags(DbGUIElement): """ menu = self.uistate.uimanager.get_widget('/TagPopup') button = self.uistate.uimanager.get_widget('/ToolBar/TagTool/TagButton') - menu.popup(None, None, cb_menu_position, 0, 0, button) + menu.popup(None, None, cb_menu_position, button, 0, 0) def cb_organize_tags(self, action): """ diff --git a/src/gui/views/treemodels/flatbasemodel.py b/src/gui/views/treemodels/flatbasemodel.py index cc626f235..ca59f8e1f 100644 --- a/src/gui/views/treemodels/flatbasemodel.py +++ b/src/gui/views/treemodels/flatbasemodel.py @@ -645,7 +645,7 @@ class FlatBaseModel(GObject.Object, Gtk.TreeModel): insert_path = self.node_map.insert(insert_val) if insert_path is not None: - node = self.do_get_iter(insert_path) + node = self.do_get_iter(insert_path)[1] self.row_inserted(insert_path, node) else: self.node_map.insert(insert_val, allkeyonly=True) @@ -749,7 +749,11 @@ class FlatBaseModel(GObject.Object, Gtk.TreeModel): #print 'do_get_val', iter, iter.user_data, col, handle = iter.user_data if handle != self.prev_handle: - self.prev_data = self.map(str(handle)) + data = self.map(str(handle)) + if data is None: + #object is no longer present + return u'' + self.prev_data = data self.prev_handle = handle val = self.fmap[col](self.prev_data) #print 'val is', val, type(val) diff --git a/src/gui/widgets/grampletpane.py b/src/gui/widgets/grampletpane.py index 55e4e7023..62df72123 100644 --- a/src/gui/widgets/grampletpane.py +++ b/src/gui/widgets/grampletpane.py @@ -1406,7 +1406,7 @@ class GrampletPane(Gtk.ScrolledWindow): rg_menu.set_submenu(qr_menu) menu = uiman.get_widget('/GrampletPopup') if menu: - menu.popup(None, None, None, 1, event.time) + menu.popup(None, None, None, None, 1, event.time) return True return False diff --git a/src/gui/widgets/monitoredwidgets.py b/src/gui/widgets/monitoredwidgets.py index df8626043..8bb477c34 100644 --- a/src/gui/widgets/monitoredwidgets.py +++ b/src/gui/widgets/monitoredwidgets.py @@ -139,7 +139,7 @@ class MonitoredEntry(object): self.obj.connect(signal, callback, *data) def _on_change(self, obj): - self.set_val(unicode(obj.get_text())) + self.set_val(unicode(obj.get_text(), 'utf-8')) if self.changed: self.changed(obj) diff --git a/src/gui/widgets/undoableentry.py b/src/gui/widgets/undoableentry.py index 12956d090..92e8fdd82 100644 --- a/src/gui/widgets/undoableentry.py +++ b/src/gui/widgets/undoableentry.py @@ -56,7 +56,7 @@ class UndoableInsertEntry(object): self.offset = position self.text = str(text) #unicode char can have length > 1 as it points in the buffer - charlength = len(unicode(text)) + charlength = len(unicode(text, 'utf-8')) self.length = charlength if charlength > 1 or self.text in ("\r", "\n", " "): self.mergeable = False @@ -66,7 +66,7 @@ class UndoableInsertEntry(object): class UndoableDeleteEntry(object): """something that has been deleted from our textbuffer""" def __init__(self, editable, start, end): - self.text = str(editable.get_chars(start, end)) + self.text = editable.get_chars(start, end).encode('utf-8') self.start = start self.end = end # need to find out if backspace or delete key has been used diff --git a/src/plugins/bookreport.py b/src/plugins/bookreport.py index 6510b3e4a..761b7f14e 100644 --- a/src/plugins/bookreport.py +++ b/src/plugins/bookreport.py @@ -1014,7 +1014,7 @@ class BookReportSelector(ManagedWindow): item.set_sensitive(sensitivity) item.show() menu.append(item) - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) def build_avail_context_menu(self, event): """Builds the menu with the single Add option.""" @@ -1037,7 +1037,7 @@ class BookReportSelector(ManagedWindow): item.set_sensitive(sensitivity) item.show() menu.append(item) - menu.popup(None, None, None, event.button, event.time) + menu.popup(None, None, None, None, event.button, event.time) def on_book_ok_clicked(self, obj): """ diff --git a/src/plugins/gramplet/fanchartgramplet.py b/src/plugins/gramplet/fanchartgramplet.py index 1cb408297..28ae74197 100644 --- a/src/plugins/gramplet/fanchartgramplet.py +++ b/src/plugins/gramplet/fanchartgramplet.py @@ -903,5 +903,5 @@ class FanChartGramplet(Gramplet): item.set_sensitive(0) item.show() menu.append(item) - menu.popup(None,None,None,event.button,event.time) + menu.popup(None, None, None, None, event.button, event.time) return 1 diff --git a/src/plugins/lib/maps/geography.py b/src/plugins/lib/maps/geography.py index 16d77c78d..b7e97f69f 100644 --- a/src/plugins/lib/maps/geography.py +++ b/src/plugins/lib/maps/geography.py @@ -294,7 +294,7 @@ class GeoGraphyView(OsmGps, NavigationView): changemapitem.show() changemapitem.connect("activate", self.change_map, map) changemap.append(changemapitem) - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/tool/ownereditor.py b/src/plugins/tool/ownereditor.py index a810996f3..9a354f60e 100644 --- a/src/plugins/tool/ownereditor.py +++ b/src/plugins/tool/ownereditor.py @@ -156,7 +156,7 @@ class OwnerEditor(tool.Tool, ManagedWindow): def on_button_press_event(self, obj, event): """Shows popup-menu for db <-> preferences copying""" if gui.utils.is_right_click(event): - self.menu.popup(None,None,None,0,0) + self.menu.popup(None, None, None, None, 0, 0) def build_menu_names(self, obj): return (_('Main window'), _("Edit database owner information")) diff --git a/src/plugins/view/fanchartview.py b/src/plugins/view/fanchartview.py index f501f8609..ba4a7d51b 100644 --- a/src/plugins/view/fanchartview.py +++ b/src/plugins/view/fanchartview.py @@ -975,5 +975,5 @@ class FanChartView(NavigationView): item.set_sensitive(0) item.show() menu.append(item) - menu.popup(None,None,None,event.button,event.time) + menu.popup(None, None, None, None, event.button, event.time) return 1 diff --git a/src/plugins/view/geoclose.py b/src/plugins/view/geoclose.py index 9131ec0dc..755b0d273 100644 --- a/src/plugins/view/geoclose.py +++ b/src/plugins/view/geoclose.py @@ -476,7 +476,7 @@ class GeoClose(GeoGraphyView): event, lat, lon, prevmark) itemoption.append(center) menu.show() - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 0 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geoevents.py b/src/plugins/view/geoevents.py index 39ef22bbc..fb60e105b 100644 --- a/src/plugins/view/geoevents.py +++ b/src/plugins/view/geoevents.py @@ -36,7 +36,8 @@ import sys import urlparse import operator import locale -from Gdk.KEY_import Tab as KEY_TAB +from gi.repository import Gdk +KEY_TAB = Gdk.KEY_Tab import socket from gi.repository import Gtk @@ -351,7 +352,7 @@ class GeoEvents(GeoGraphyView): center.show() center.connect("activate", self.center_here, event, lat, lon, prevmark) itemoption.append(center) - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geofamclose.py b/src/plugins/view/geofamclose.py index d55f1864d..f51b3f620 100644 --- a/src/plugins/view/geofamclose.py +++ b/src/plugins/view/geofamclose.py @@ -665,7 +665,7 @@ class GeoFamClose(GeoGraphyView): event, lat, lon, prevmark) itemoption.append(center) menu.show() - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 0 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geofamily.py b/src/plugins/view/geofamily.py index 5d695d3c9..7fdceb483 100644 --- a/src/plugins/view/geofamily.py +++ b/src/plugins/view/geofamily.py @@ -36,7 +36,8 @@ import sys import urlparse import operator import locale -from Gdk.KEY_import Tab as KEY_TAB +from gi.repository import Gdk +KEY_TAB = Gdk.KEY_Tab import socket from gi.repository import Gtk @@ -444,7 +445,7 @@ class GeoFamily(GeoGraphyView): add_item.show() menu.append(add_item) self.add_event_bubble_message(event, lat, lon, prevmark, add_item) - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geomoves.py b/src/plugins/view/geomoves.py index 51ec4cfc5..a9be7f4a5 100644 --- a/src/plugins/view/geomoves.py +++ b/src/plugins/view/geomoves.py @@ -607,7 +607,7 @@ class GeoMoves(GeoGraphyView): event, lat, lon, prevmark) itemoption.append(center) menu.show() - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geoperson.py b/src/plugins/view/geoperson.py index b620d8483..fa13d9ec4 100644 --- a/src/plugins/view/geoperson.py +++ b/src/plugins/view/geoperson.py @@ -36,7 +36,8 @@ import sys import urlparse import operator import locale -from Gdk.KEY_import Tab as KEY_TAB +from gi.repository import Gdk +KEY_TAB = Gdk.KEY_Tab import socket from gi.repository import Gtk import glib @@ -479,7 +480,7 @@ class GeoPerson(GeoGraphyView): center.connect("activate", self.center_here, event, lat, lon, prevmark) itemoption.append(center) menu.show() - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/geoplaces.py b/src/plugins/view/geoplaces.py index b15bd64ad..62c13070f 100644 --- a/src/plugins/view/geoplaces.py +++ b/src/plugins/view/geoplaces.py @@ -37,7 +37,8 @@ import time import urlparse import operator import locale -from Gdk.KEY_import Tab as KEY_TAB +from gi.repository import Gdk +KEY_TAB = Gdk.KEY_Tab import socket from gi.repository import Gtk @@ -342,7 +343,7 @@ class GeoPlaces(GeoGraphyView): center.show() center.connect("activate", self.center_here, event, lat, lon, prevmark) itemoption.append(center) - menu.popup(None, None, None, 0, event.time) + menu.popup(None, None, None, None, 0, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/view/relview.py b/src/plugins/view/relview.py index ccda1e5a7..2e86c16ee 100644 --- a/src/plugins/view/relview.py +++ b/src/plugins/view/relview.py @@ -1052,7 +1052,7 @@ class RelationshipView(NavigationView): if self.show_details: value = self.info_string(handle) if value: - vbox.pack_start(widgets.MarkupLabel(value, True, True, 0)) + vbox.pack_start(widgets.MarkupLabel(value), True, True, 0) eventbox = Gtk.EventBox() if self.use_shade: @@ -1217,7 +1217,7 @@ class RelationshipView(NavigationView): elif button_activated(event, _RIGHT_BUTTON): myMenu = Gtk.Menu() myMenu.append(self.build_menu_item(handle)) - myMenu.popup(None, None, None, event.button, event.time) + myMenu.popup(None, None, None, None, event.button, event.time) def build_menu_item(self, handle): person = self.dbstate.db.get_person_from_handle(handle)