diff --git a/src/gui/editors/edittaglist.py b/src/gui/editors/edittaglist.py index 234bce2db..bd08564bd 100644 --- a/src/gui/editors/edittaglist.py +++ b/src/gui/editors/edittaglist.py @@ -101,7 +101,6 @@ class EditTagList(ManagedWindow): top = Gtk.Dialog(title) top.set_default_size(360, 400) top.set_modal(True) - top.set_has_separator(False) top.vbox.set_spacing(5) columns = [('', -1, 300), diff --git a/src/gui/glade/baseselector.glade b/src/gui/glade/baseselector.glade index 61b9496fa..8cc164add 100644 --- a/src/gui/glade/baseselector.glade +++ b/src/gui/glade/baseselector.glade @@ -8,7 +8,6 @@ 600 450 dialog - False True diff --git a/src/gui/glade/configure.glade b/src/gui/glade/configure.glade index c42fc93b3..543c38842 100644 --- a/src/gui/glade/configure.glade +++ b/src/gui/glade/configure.glade @@ -7,7 +7,6 @@ True 400 dialog - False True diff --git a/src/gui/glade/dbman.glade b/src/gui/glade/dbman.glade index 7bc4aaa37..7569ae17f 100644 --- a/src/gui/glade/dbman.glade +++ b/src/gui/glade/dbman.glade @@ -9,7 +9,6 @@ 710 300 dialog - False True @@ -295,7 +294,6 @@ center-on-parent 450 dialog - False True diff --git a/src/gui/glade/editattribute.glade b/src/gui/glade/editattribute.glade index 5863f2971..0b4c31270 100644 --- a/src/gui/glade/editattribute.glade +++ b/src/gui/glade/editattribute.glade @@ -97,12 +97,18 @@ - + True The name of an attribute you want to use. For example: Height (for a person), Weather on this Day (for an event), ... Use this to store snippets of information you collect and want to correctly link to sources. Attributes can be used for people, families, events and media. Note: several predefined attributes refer to values present in the GEDCOM standard. + True + + + False + + 1 diff --git a/src/gui/glade/editchildref.glade b/src/gui/glade/editchildref.glade index eb5b12292..36d9c1101 100644 --- a/src/gui/glade/editchildref.glade +++ b/src/gui/glade/editchildref.glade @@ -37,8 +37,14 @@ - + True + True + + + False + + 1 diff --git a/src/gui/glade/editdate.glade b/src/gui/glade/editdate.glade index 55d03735a..3f83591e9 100644 --- a/src/gui/glade/editdate.glade +++ b/src/gui/glade/editdate.glade @@ -159,7 +159,7 @@ - + True quality_model @@ -198,7 +198,7 @@ - + True type_model @@ -301,7 +301,7 @@ - + True month_model1 @@ -420,7 +420,7 @@ - + True month_model2 diff --git a/src/gui/glade/editeventref.glade b/src/gui/glade/editeventref.glade index 1ce685d24..4f84783ea 100644 --- a/src/gui/glade/editeventref.glade +++ b/src/gui/glade/editeventref.glade @@ -86,8 +86,14 @@ - + True + True + + + False + + 1 @@ -343,8 +349,14 @@ - + True + True + + + False + + 1 diff --git a/src/gui/glade/editfamily.glade b/src/gui/glade/editfamily.glade index 2f1d28841..fffef8f00 100644 --- a/src/gui/glade/editfamily.glade +++ b/src/gui/glade/editfamily.glade @@ -630,9 +630,15 @@ - + True The relationship type, eg 'Married' or 'Unmarried'. Use Events for more details. + True + + + False + + 3 diff --git a/src/gui/glade/editname.glade b/src/gui/glade/editname.glade index 9fd030f36..ccffc1970 100644 --- a/src/gui/glade/editname.glade +++ b/src/gui/glade/editname.glade @@ -36,9 +36,15 @@ - + True An identification of what type of Name this is, eg. Birth Name, Married Name. + True + + + False + + False diff --git a/src/gui/glade/editnote.glade b/src/gui/glade/editnote.glade index 2827538aa..a4ce4ad3a 100644 --- a/src/gui/glade/editnote.glade +++ b/src/gui/glade/editnote.glade @@ -76,9 +76,15 @@ - + True A type to classify the note. + True + + + False + + 3 diff --git a/src/gui/glade/editreporef.glade b/src/gui/glade/editreporef.glade index 449ecf9bc..96be6792d 100644 --- a/src/gui/glade/editreporef.glade +++ b/src/gui/glade/editreporef.glade @@ -73,9 +73,15 @@ - + True On what type of media this source is available in the repository. + True + + + False + + 1 @@ -321,9 +327,15 @@ - + True Type of repository, eg., 'Library', 'Album', ... + True + + + False + + 1 diff --git a/src/gui/glade/editrepository.glade b/src/gui/glade/editrepository.glade index 3cb4a3b11..2a6ae0682 100644 --- a/src/gui/glade/editrepository.glade +++ b/src/gui/glade/editrepository.glade @@ -68,9 +68,15 @@ True 12 - + True Type of repository, eg., 'Library', 'Album', ... + True + + + False + + False diff --git a/src/gui/glade/editurl.glade b/src/gui/glade/editurl.glade index 810aea5e5..312c354e2 100644 --- a/src/gui/glade/editurl.glade +++ b/src/gui/glade/editurl.glade @@ -97,9 +97,15 @@ - + True Type of internet address, eg. E-mail, Web Page, ... + True + + + False + + 1 diff --git a/src/gui/glade/mergecitation.glade b/src/gui/glade/mergecitation.glade index c9985bc2b..644dc3b67 100644 --- a/src/gui/glade/mergecitation.glade +++ b/src/gui/glade/mergecitation.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergeevent.glade b/src/gui/glade/mergeevent.glade index cfc372175..677cecb36 100644 --- a/src/gui/glade/mergeevent.glade +++ b/src/gui/glade/mergeevent.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergefamily.glade b/src/gui/glade/mergefamily.glade index d52fa1172..4b1e0433e 100644 --- a/src/gui/glade/mergefamily.glade +++ b/src/gui/glade/mergefamily.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergemedia.glade b/src/gui/glade/mergemedia.glade index eb4390307..b4ec3115a 100644 --- a/src/gui/glade/mergemedia.glade +++ b/src/gui/glade/mergemedia.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergenote.glade b/src/gui/glade/mergenote.glade index fbe30e4a9..834f4a2e8 100644 --- a/src/gui/glade/mergenote.glade +++ b/src/gui/glade/mergenote.glade @@ -6,7 +6,6 @@ True 600 dialog - False True diff --git a/src/gui/glade/mergeperson.glade b/src/gui/glade/mergeperson.glade index 94e4607ea..815e58421 100644 --- a/src/gui/glade/mergeperson.glade +++ b/src/gui/glade/mergeperson.glade @@ -6,7 +6,6 @@ True 700 dialog - False True diff --git a/src/gui/glade/mergeplace.glade b/src/gui/glade/mergeplace.glade index f61a8161f..0e203ed1d 100644 --- a/src/gui/glade/mergeplace.glade +++ b/src/gui/glade/mergeplace.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergerepository.glade b/src/gui/glade/mergerepository.glade index ee91144ec..cb08acae4 100644 --- a/src/gui/glade/mergerepository.glade +++ b/src/gui/glade/mergerepository.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/mergesource.glade b/src/gui/glade/mergesource.glade index 3d093756d..09c446d78 100644 --- a/src/gui/glade/mergesource.glade +++ b/src/gui/glade/mergesource.glade @@ -6,7 +6,6 @@ True 500 dialog - False True diff --git a/src/gui/glade/updateaddons.glade b/src/gui/glade/updateaddons.glade index 4ca3744eb..b3c7fc3f3 100644 --- a/src/gui/glade/updateaddons.glade +++ b/src/gui/glade/updateaddons.glade @@ -10,7 +10,6 @@ 500 True normal - False True diff --git a/src/gui/plug/_windows.py b/src/gui/plug/_windows.py index 10da67eb6..f55c8d7b2 100644 --- a/src/gui/plug/_windows.py +++ b/src/gui/plug/_windows.py @@ -716,7 +716,6 @@ class ToolManagedWindowBase(ManagedWindow): window = Gtk.Dialog('Tool') self.set_window(window, None, self.get_title()) - #self.window.set_has_separator(False) #self.window.connect('response', self.close) self.cancel = self.window.add_button(Gtk.STOCK_CLOSE, diff --git a/src/gui/plug/report/_reportdialog.py b/src/gui/plug/report/_reportdialog.py index 1da046d31..bbb8f622b 100644 --- a/src/gui/plug/report/_reportdialog.py +++ b/src/gui/plug/report/_reportdialog.py @@ -154,7 +154,6 @@ class ReportDialog(ManagedWindow): window = Gtk.Dialog('Gramps') self.set_window(window, None, self.get_title()) - self.window.set_has_separator(False) self.window.set_modal(True) self.help = self.window.add_button(Gtk.STOCK_HELP, Gtk.ResponseType.HELP) diff --git a/src/gui/utils.py b/src/gui/utils.py index ae9bcdc72..7a03732e8 100644 --- a/src/gui/utils.py +++ b/src/gui/utils.py @@ -86,8 +86,6 @@ class CLIDialog: """ def connect(self, signal, callback): pass - def set_has_separator(self, flag): - pass def set_title(self, title): pass def set_border_width(self, width): @@ -150,7 +148,6 @@ class ProgressMeter(object): self.__dialog.connect('delete_event', self.__cancel_callback) else: self.__dialog.connect('delete_event', self.__warn) - self.__dialog.set_has_separator(False) self.__dialog.set_title(title) self.__dialog.set_border_width(12) self.__dialog.vbox.set_spacing(10) diff --git a/src/gui/views/bookmarks.py b/src/gui/views/bookmarks.py index d735cda4d..d3e830948 100644 --- a/src/gui/views/bookmarks.py +++ b/src/gui/views/bookmarks.py @@ -201,7 +201,6 @@ class Bookmarks : self.top.set_default_size(400, 350) self.top.set_modal(True) self.top.set_transient_for(self.uistate.window) - self.top.set_has_separator(False) self.top.vbox.set_spacing(5) label = Gtk.Label(label='%s' % _("Organize Bookmarks")) diff --git a/src/gui/views/tags.py b/src/gui/views/tags.py index 4338c824b..1c7d6edbc 100644 --- a/src/gui/views/tags.py +++ b/src/gui/views/tags.py @@ -373,7 +373,6 @@ class OrganizeTagsDialog(object): top.set_default_size(400, 350) top.set_modal(True) top.set_transient_for(self.parent_window) - top.set_has_separator(False) top.vbox.set_spacing(5) label = Gtk.Label(label='%s' % _("Organize Tags")) @@ -583,7 +582,6 @@ class EditTag(object): top.set_default_size(300, 100) top.set_modal(True) top.set_transient_for(self.parent_window) - top.set_has_separator(False) top.vbox.set_spacing(5) hbox = Gtk.HBox() diff --git a/src/gui/widgets/progressdialog.py b/src/gui/widgets/progressdialog.py index 26c369ad8..733640287 100644 --- a/src/gui/widgets/progressdialog.py +++ b/src/gui/widgets/progressdialog.py @@ -484,7 +484,6 @@ class GtkProgressDialog(Gtk.Dialog): """ GObject.GObject.__init__(self, *window_params) self.connect('delete_event', self._warn) - self.set_has_separator(False) self.set_title(title) #self.set_resize_mode(Gtk.RESIZE_IMMEDIATE) #self.show() diff --git a/src/gui/widgets/undoableentry.py b/src/gui/widgets/undoableentry.py index be695d467..12956d090 100644 --- a/src/gui/widgets/undoableentry.py +++ b/src/gui/widgets/undoableentry.py @@ -40,6 +40,7 @@ _LOG = logging.getLogger(".widgets.undoableentry") # #------------------------------------------------------------------------- from gi.repository import GObject +from gi.repository import Gdk from gi.repository import Gtk #------------------------------------------------------------------------- diff --git a/src/gui/widgets/validatedmaskedentry.py b/src/gui/widgets/validatedmaskedentry.py index 9069df87a..a3563f123 100644 --- a/src/gui/widgets/validatedmaskedentry.py +++ b/src/gui/widgets/validatedmaskedentry.py @@ -41,6 +41,7 @@ _LOG = logging.getLogger(".widgets.validatedmaskedentry") from gi.repository import GObject from gi.repository import Gdk from gi.repository import Gtk +from gi.repository import GdkPixbuf from gi.repository import Pango #------------------------------------------------------------------------- @@ -232,7 +233,7 @@ class Tooltip(Gtk.Window): # from gtktooltips.c:gtk_tooltips_paint_window def _on__draw_event(self, window, cairo_context): w, h = window.size_request() - window.style.paint_flat_box(window.window, + window.get_style().paint_flat_box(window.window, Gtk.StateType.NORMAL, Gtk.ShadowType.OUT, None, window, "tooltip", 0, 0, w, h) @@ -411,25 +412,54 @@ class IconEntry(object): entry.realize() # Hack: Save a reference to the text area, now when its created - self._text_area = entry.window.get_children()[0] + self._text_area = entry.get_root_window().get_children()[0] self._text_area_pos = self._text_area.get_position() # PyGTK should allow default values for most of the values here. - win = Gdk.Window(entry.window, - self._pixw, self._pixh, - Gdk.WINDOW_CHILD, - (Gdk.EventMask.ENTER_NOTIFY_MASK | - Gdk.EventMask.LEAVE_NOTIFY_MASK), - Gdk.INPUT_OUTPUT, - 'icon window', - 0, 0, - entry.get_visual(), - entry.get_colormap(), - Gdk.Cursor.new(entry.get_display(), Gdk.CursorType.LEFT_PTR), - '', '', True) + attr = Gdk.WindowAttr() + attr.width = self._pixw + attr.height = self._pixh + attr.x = 0 + attr.y = 0 + attr.cursor = Gdk.Cursor.new_for_display( + entry.get_display(), Gdk.CursorType.LEFT_PTR) + #attr.wmclass_name='' + #attr.wmclass_class='' + attr.override_redirect=True + attr.event_mask = (Gdk.EventMask.ENTER_NOTIFY_MASK | + Gdk.EventMask.LEAVE_NOTIFY_MASK) + # TODO GTK3 Why can we not set title? + #attr.title = 'icon window' + attr.wclass = Gdk.WindowWindowClass.INPUT_OUTPUT + attr.window_type = Gdk.WindowType.CHILD + attr.visual = entry.get_visual() + attrmask = ( + #Gdk.WindowAttributesType.TITLE | + Gdk.WindowAttributesType.X | + Gdk.WindowAttributesType.Y | + Gdk.WindowAttributesType.CURSOR | + Gdk.WindowAttributesType.VISUAL | + Gdk.WindowAttributesType.NOREDIR + ) + win = Gdk.Window(entry.get_root_window(), + attr, + attrmask) +## Gdk.WindowType.CHILD, +## (Gdk.EventMask.ENTER_NOTIFY_MASK | +## Gdk.EventMask.LEAVE_NOTIFY_MASK), +## Gdk.WindowWindowClass.INPUT_OUTPUT, +## title='icon window', +## x=0, y=0, +## visual=entry.get_visual(), +## #TODO GTK3: is there alternative for: +## #colormap=entry.get_colormap(), +## cursor=Gdk.Cursor.new_for_display( +## entry.get_display(), Gdk.CursorType.LEFT_PTR), +## wmclass_name='', +## wmclass_class='', override_redirect=True) self._icon_win = win win.set_user_data(entry) - win.set_background(entry.style.base[entry.state]) + win.set_background(entry.get_style().base[entry.get_state()]) self._constructed = True def deconstruct(self): @@ -453,7 +483,7 @@ class IconEntry(object): self.draw_pixbuf() def get_background(self): - return self._entry.style.base[Gtk.StateType.NORMAL] + return self._entry.get_style().base[Gtk.StateType.NORMAL] def resize_windows(self): if not self._pixbuf: @@ -462,8 +492,10 @@ class IconEntry(object): icony = iconx = 4 # Make space for the icon, both windows - winw = self._entry.window.get_size()[0] - textw, texth = self._text_area.get_size() + winw = self._entry.get_root_window().get_width() + textw = self._text_area.get_width() + texth = self._text_area.get_height() + #textw, texth = self._text_area.get_size() textw = winw - self._pixw - (iconx + icony) if self._pos == Gtk.PositionType.LEFT: @@ -486,7 +518,7 @@ class IconEntry(object): # If the size of the window is large enough, resize and move it # Otherwise just move it to the right side of the entry - if icon_win.get_size() != (self._pixw, self._pixh): + if (icon_win.get_width(), icon_win.get_height()) != (self._pixw, self._pixh): icon_win.move_resize(iconx, icony, self._pixw, self._pixh) else: icon_win.move(iconx, icony) @@ -501,7 +533,7 @@ class IconEntry(object): return # Draw background first - color = self._entry.style.base_gc[self._entry.state] + color = self._entry.get_style().base_gc[self._entry.get_state()] win.draw_rectangle(color, True, 0, 0, self._pixw, self._pixh) @@ -625,10 +657,10 @@ class MaskedEntry(UndoableEntry): if self.get_realized(): self._icon.resize_windows() - def do_expose_event(self, event): - Gtk.Entry.do_expose_event(self, event) + def do_draw(self, cairo_t): + Gtk.Entry.do_draw(self, cairo_t) - if event.window == self.window: + if Gtk.cairo_should_draw_window(cairo_t, self.get_root_window()): self._icon.draw_pixbuf() def do_realize(self): diff --git a/src/plugins/gramplet/FanChartGramplet.py b/src/plugins/gramplet/FanChartGramplet.py index 54f333f57..fea3acc5d 100644 --- a/src/plugins/gramplet/FanChartGramplet.py +++ b/src/plugins/gramplet/FanChartGramplet.py @@ -160,8 +160,8 @@ class FanChartWidget(Gtk.Widget): self.window = Gdk.Window(self.get_parent_window(), width=self.allocation.width, height=self.allocation.height, - window_type=Gdk.WINDOW_CHILD, - wclass=Gdk.INPUT_OUTPUT, + window_type=Gdk.WindowType.CHILD, + wclass=Gdk.WindowWindowClass.INPUT_OUTPUT, event_mask=self.get_events() | Gdk.EventMask.EXPOSURE_MASK) if not hasattr(self.window, "cairo_create"): self.draw_gc = Gdk.GC(self.window, diff --git a/src/plugins/tool/PatchNames.py b/src/plugins/tool/PatchNames.py index 3f6e7d3ef..99b05f612 100644 --- a/src/plugins/tool/PatchNames.py +++ b/src/plugins/tool/PatchNames.py @@ -116,7 +116,6 @@ class PatchNames(tool.BatchTool, ManagedWindow): Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT, (Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) - winprefix.set_has_separator(False) winprefix.vbox.set_spacing(5) hboxpref = Gtk.HBox() hboxpref.pack_start(Gtk.Label(_('Prefixes to search for:', True, True, 0)), diff --git a/src/plugins/tool/TestcaseGenerator.py b/src/plugins/tool/TestcaseGenerator.py index 70c228423..7dfd840d5 100644 --- a/src/plugins/tool/TestcaseGenerator.py +++ b/src/plugins/tool/TestcaseGenerator.py @@ -167,7 +167,6 @@ class TestcaseGenerator(tool.BatchTool): title = "%s - Gramps" % _("Generate testcases") self.top = Gtk.Dialog(title) self.top.set_default_size(400,150) - self.top.set_has_separator(False) self.top.vbox.set_spacing(5) label = Gtk.Label(label='%s' % _("Generate testcases")) label.set_use_markup(True) diff --git a/src/plugins/view/fanchartview.py b/src/plugins/view/fanchartview.py index b24a33c85..2ebe88cad 100644 --- a/src/plugins/view/fanchartview.py +++ b/src/plugins/view/fanchartview.py @@ -178,8 +178,8 @@ class FanChartWidget(Gtk.Widget): self.window = Gdk.Window(self.get_parent_window(), width=self.allocation.width, height=self.allocation.height, - window_type=Gdk.WINDOW_CHILD, - wclass=Gdk.INPUT_OUTPUT, + window_type=Gdk.WindowType.CHILD, + wclass=Gdk.WindowWindowClass.INPUT_OUTPUT, event_mask=self.get_events() | Gdk.EventMask.EXPOSURE_MASK) if not hasattr(self.window, "cairo_create"): self.draw_gc = Gdk.GC(self.window,