diff --git a/src/gui/grampsbar.py b/src/gui/grampsbar.py index 069eeb4ba..574a4e4df 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, Gtk.Label(label=msg)) + page_num = self.append_page(gramplet, Gtk.Label(label='')) return page_num def __create_tab_label(self, gramplet): @@ -444,7 +444,12 @@ class GrampsBar(Gtk.Notebook): rd_menu.show() menu.append(rd_menu) - menu.popup(None, None, None, None, 1, event.time) + menu.show_all() + #GTK3 does not show the popup, workaround: pass position function + menu.popup(None, None, + lambda menu, data: (event.get_root_coords()[0], + event.get_root_coords()[1], True), + None, event.button, event.time) return True return False diff --git a/src/gui/listmodel.py b/src/gui/listmodel.py index 09b0ed6ab..c9c63aa78 100644 --- a/src/gui/listmodel.py +++ b/src/gui/listmodel.py @@ -29,6 +29,7 @@ Provide the basic functionality for a list view # GTK # #------------------------------------------------------------------------- +from gi.repository import Gdk from gi.repository import Gtk from gi.repository import Pango from gen.const import THUMBSCALE @@ -429,6 +430,7 @@ class ListModel(object): """ Add the data to the model at the end of the model """ + info = info or '' self.count += 1 need_to_set = True # Create the node: diff --git a/src/gui/widgets/photo.py b/src/gui/widgets/photo.py index 31c70fb4d..f8de54e8e 100644 --- a/src/gui/widgets/photo.py +++ b/src/gui/widgets/photo.py @@ -24,6 +24,7 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- +from gi.repository import GObject from gi.repository import Gtk #------------------------------------------------------------------------- diff --git a/src/plugins/gramplet/gallery.py b/src/plugins/gramplet/gallery.py index 0f0587b09..0b0213873 100644 --- a/src/plugins/gramplet/gallery.py +++ b/src/plugins/gramplet/gallery.py @@ -65,7 +65,7 @@ class Gallery(Gramplet): photo = Photo(self.uistate.screen_height() < 1000) photo.set_image(full_path, mime_type, media_ref.get_rectangle()) self.image_list.append(photo) - self.top.pack_start(photo, expand=False, fill=False) + self.top.pack_start(photo, False, False, 0) self.top.show_all() count += 1 self.set_has_data(count > 0)