Merge pull request #903 from prculley:deprecations
This commit is contained in:
commit
7100c51a31
@ -161,12 +161,12 @@ def image_size(source):
|
|||||||
:returns: a tuple consisting of the width and height
|
:returns: a tuple consisting of the width and height
|
||||||
"""
|
"""
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import GObject
|
from gi.repository import GLib
|
||||||
try:
|
try:
|
||||||
img = GdkPixbuf.Pixbuf.new_from_file(source)
|
img = GdkPixbuf.Pixbuf.new_from_file(source)
|
||||||
width = img.get_width()
|
width = img.get_width()
|
||||||
height = img.get_height()
|
height = img.get_height()
|
||||||
except GObject.GError:
|
except GLib.GError:
|
||||||
width = 0
|
width = 0
|
||||||
height = 0
|
height = 0
|
||||||
return (width, height)
|
return (width, height)
|
||||||
|
@ -36,7 +36,7 @@ from hashlib import md5
|
|||||||
# GTK/Gnome modules
|
# GTK/Gnome modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import GObject
|
from gi.repository import GLib
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -98,7 +98,7 @@ def __get_gconf_string(key):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
val = CLIENT.get_string(key)
|
val = CLIENT.get_string(key)
|
||||||
except GObject.GError:
|
except GLib.GError:
|
||||||
val = None
|
val = None
|
||||||
return str(val)
|
return str(val)
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ def __get_gconf_bool(key):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
val = CLIENT.get_bool(key)
|
val = CLIENT.get_bool(key)
|
||||||
except GObject.GError:
|
except GLib.GError:
|
||||||
val = None
|
val = None
|
||||||
return val
|
return val
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ def get_thumbnail_image(src_file, mtype=None, rectangle=None, size=SIZE_NORMAL):
|
|||||||
try:
|
try:
|
||||||
filename = get_thumbnail_path(src_file, mtype, rectangle, size)
|
filename = get_thumbnail_path(src_file, mtype, rectangle, size)
|
||||||
return GdkPixbuf.Pixbuf.new_from_file(filename)
|
return GdkPixbuf.Pixbuf.new_from_file(filename)
|
||||||
except (GObject.GError, OSError):
|
except (GLib.GError, OSError):
|
||||||
if mtype:
|
if mtype:
|
||||||
return find_mime_type_pixbuf(mtype)
|
return find_mime_type_pixbuf(mtype)
|
||||||
else:
|
else:
|
||||||
|
@ -690,7 +690,7 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
hbox.pack_start(lwidget, False, False, 0)
|
hbox.pack_start(lwidget, False, False, 0)
|
||||||
hbox.pack_start(self.color_scheme_box, False, False, 0)
|
hbox.pack_start(self.color_scheme_box, False, False, 0)
|
||||||
|
|
||||||
restore_btn = Gtk.Button(_('Restore to defaults'))
|
restore_btn = Gtk.Button(label=_('Restore to defaults'))
|
||||||
restore_btn.set_tooltip_text(
|
restore_btn.set_tooltip_text(
|
||||||
_('Restore colors for current theme to default.'))
|
_('Restore colors for current theme to default.'))
|
||||||
restore_btn.connect('clicked', self.restore_colors)
|
restore_btn.connect('clicked', self.restore_colors)
|
||||||
@ -1827,12 +1827,10 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
Show dialog to choose media directory.
|
Show dialog to choose media directory.
|
||||||
"""
|
"""
|
||||||
f = Gtk.FileChooserDialog(title=_("Select media directory"),
|
f = Gtk.FileChooserDialog(title=_("Select media directory"),
|
||||||
parent=self.window,
|
transient_for=self.window,
|
||||||
action=Gtk.FileChooserAction.SELECT_FOLDER,
|
action=Gtk.FileChooserAction.SELECT_FOLDER)
|
||||||
buttons=(_('_Cancel'),
|
f.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Apply'), Gtk.ResponseType.OK)
|
||||||
_('_Apply'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
mpath = media_path(self.dbstate.db)
|
mpath = media_path(self.dbstate.db)
|
||||||
f.set_current_folder(os.path.dirname(mpath))
|
f.set_current_folder(os.path.dirname(mpath))
|
||||||
|
|
||||||
@ -1877,12 +1875,10 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
Show dialog to choose backup directory.
|
Show dialog to choose backup directory.
|
||||||
"""
|
"""
|
||||||
f = Gtk.FileChooserDialog(title=_("Select backup directory"),
|
f = Gtk.FileChooserDialog(title=_("Select backup directory"),
|
||||||
parent=self.window,
|
transient_for=self.window,
|
||||||
action=Gtk.FileChooserAction.SELECT_FOLDER,
|
action=Gtk.FileChooserAction.SELECT_FOLDER)
|
||||||
buttons=(_('_Cancel'),
|
f.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Apply'), Gtk.ResponseType.OK)
|
||||||
_('_Apply'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
backup_path = config.get('database.backup-path')
|
backup_path = config.get('database.backup-path')
|
||||||
if not backup_path:
|
if not backup_path:
|
||||||
backup_path = config.get('database.path')
|
backup_path = config.get('database.path')
|
||||||
@ -2162,11 +2158,9 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
scrollw.set_size_request(600, 100)
|
scrollw.set_size_request(600, 100)
|
||||||
text = Gtk.Label()
|
text = Gtk.Label()
|
||||||
text.set_line_wrap(True)
|
text.set_line_wrap(True)
|
||||||
font_description = Pango.font_description_from_string(font)
|
|
||||||
text.modify_font(font_description)
|
|
||||||
self.activate_change_font()
|
self.activate_change_font()
|
||||||
text.set_halign(Gtk.Align.START)
|
text.set_halign(Gtk.Align.START)
|
||||||
text.set_text(my_characters)
|
text.set_markup("<span font='%s'>%s</span>" % (font, my_characters))
|
||||||
scrollw.add(text)
|
scrollw.add(text)
|
||||||
scrollw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
|
scrollw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
|
||||||
self.grid.attach(scrollw, 1, 7, 8, 1)
|
self.grid.attach(scrollw, 1, 7, 8, 1)
|
||||||
@ -2179,12 +2173,9 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
my_characters += symbols.get_death_symbol_for_char(death_symbl)
|
my_characters += symbols.get_death_symbol_for_char(death_symbl)
|
||||||
text = Gtk.Label()
|
text = Gtk.Label()
|
||||||
text.set_line_wrap(True)
|
text.set_line_wrap(True)
|
||||||
font_description = Pango.font_description_from_string(font)
|
|
||||||
text.modify_font(font_description)
|
|
||||||
text.set_halign(Gtk.Align.START)
|
text.set_halign(Gtk.Align.START)
|
||||||
text.set_markup("<big><big><big><big>" +
|
text.set_markup("<big><big><big><big><span font='%s'>%s</span>"
|
||||||
my_characters +
|
"</big></big></big></big>" % (font, my_characters))
|
||||||
"</big></big></big></big>")
|
|
||||||
self.grid.attach(text, 1, 8, 8, 1)
|
self.grid.attach(text, 1, 8, 8, 1)
|
||||||
scrollw.show_all()
|
scrollw.show_all()
|
||||||
text.show_all()
|
text.show_all()
|
||||||
|
@ -380,7 +380,7 @@ class GrampsLoginDialog(ManagedWindow):
|
|||||||
self.title = _("Login")
|
self.title = _("Login")
|
||||||
ManagedWindow.__init__(self, uistate, [], self.__class__, modal=True)
|
ManagedWindow.__init__(self, uistate, [], self.__class__, modal=True)
|
||||||
|
|
||||||
dialog = Gtk.Dialog(parent=uistate.window)
|
dialog = Gtk.Dialog(transient_for=uistate.window)
|
||||||
grid = Gtk.Grid()
|
grid = Gtk.Grid()
|
||||||
grid.set_border_width(6)
|
grid.set_border_width(6)
|
||||||
grid.set_row_spacing(6)
|
grid.set_row_spacing(6)
|
||||||
|
@ -42,6 +42,7 @@ import pickle
|
|||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
|
from gi.repository.GLib import markup_escape_text
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -435,7 +436,6 @@ class EditPerson(EditPrimary):
|
|||||||
obj.connect('changed', self._changed_name)
|
obj.connect('changed', self._changed_name)
|
||||||
|
|
||||||
self.preview_name = self.top.get_object("full_name")
|
self.preview_name = self.top.get_object("full_name")
|
||||||
self.preview_name.override_font(Pango.FontDescription('sans bold 12'))
|
|
||||||
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
||||||
self.obj.get_primary_name(),
|
self.obj.get_primary_name(),
|
||||||
on_change=self._changed_name)
|
on_change=self._changed_name)
|
||||||
@ -550,7 +550,9 @@ class EditPerson(EditPrimary):
|
|||||||
Update the window title, and default name in name tab
|
Update the window title, and default name in name tab
|
||||||
"""
|
"""
|
||||||
self.update_title(self.get_menu_title())
|
self.update_title(self.get_menu_title())
|
||||||
self.preview_name.set_text(self.get_preview_name())
|
self.preview_name.set_markup(
|
||||||
|
"<span size='x-large' weight='bold'>%s</span>" %
|
||||||
|
markup_escape_text(self.get_preview_name(), -1))
|
||||||
self.name_list.update_defname()
|
self.name_list.update_defname()
|
||||||
|
|
||||||
def name_callback(self):
|
def name_callback(self):
|
||||||
@ -638,7 +640,6 @@ class EditPerson(EditPrimary):
|
|||||||
"""
|
"""
|
||||||
self.imgmenu = Gtk.Menu()
|
self.imgmenu = Gtk.Menu()
|
||||||
menu = self.imgmenu
|
menu = self.imgmenu
|
||||||
menu.set_title(_("Media Object"))
|
|
||||||
obj = self.db.get_media_from_handle(photo.get_reference_handle())
|
obj = self.db.get_media_from_handle(photo.get_reference_handle())
|
||||||
if obj:
|
if obj:
|
||||||
add_menuitem(menu, _("View"), photo,
|
add_menuitem(menu, _("View"), photo,
|
||||||
@ -1086,9 +1087,9 @@ class EditPerson(EditPrimary):
|
|||||||
class GenderDialog(Gtk.MessageDialog):
|
class GenderDialog(Gtk.MessageDialog):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
Gtk.MessageDialog.__init__(self,
|
Gtk.MessageDialog.__init__(self,
|
||||||
parent,
|
transient_for=parent,
|
||||||
flags=Gtk.DialogFlags.MODAL,
|
modal=True,
|
||||||
type=Gtk.MessageType.QUESTION,
|
message_type=Gtk.MessageType.QUESTION,
|
||||||
)
|
)
|
||||||
self.set_icon(ICON)
|
self.set_icon(ICON)
|
||||||
self.set_title('')
|
self.set_title('')
|
||||||
|
@ -101,7 +101,7 @@ class EditTagList(ManagedWindow):
|
|||||||
Create a dialog box to select tags.
|
Create a dialog box to select tags.
|
||||||
"""
|
"""
|
||||||
# pylint: disable-msg=E1101
|
# pylint: disable-msg=E1101
|
||||||
top = Gtk.Dialog(parent=self.uistate.window)
|
top = Gtk.Dialog(transient_for=self.uistate.window)
|
||||||
top.vbox.set_spacing(5)
|
top.vbox.set_spacing(5)
|
||||||
|
|
||||||
columns = [('', -1, 300),
|
columns = [('', -1, 300),
|
||||||
|
@ -284,7 +284,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"information included in the error please remove "
|
"information included in the error please remove "
|
||||||
"it."))
|
"it."))
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_padding(0, 4)
|
label.set_margin_top(4)
|
||||||
|
label.set_margin_bottom(4)
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
|
|
||||||
swin = Gtk.ScrolledWindow()
|
swin = Gtk.ScrolledWindow()
|
||||||
@ -300,9 +301,9 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
sw_frame = Gtk.Frame()
|
sw_frame = Gtk.Frame()
|
||||||
sw_frame.add(swin)
|
sw_frame.add(swin)
|
||||||
|
|
||||||
reset = Gtk.Button("Reset")
|
reset = Gtk.Button(label="Reset")
|
||||||
reset.connect('clicked', self._reset_error_details)
|
reset.connect('clicked', self._reset_error_details)
|
||||||
clear = Gtk.Button("Clear")
|
clear = Gtk.Button(label="Clear")
|
||||||
clear.connect('clicked', self._clear_error_details)
|
clear.connect('clicked', self._clear_error_details)
|
||||||
|
|
||||||
button_box = Gtk.ButtonBox()
|
button_box = Gtk.ButtonBox()
|
||||||
@ -364,7 +365,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"remove anything that you would rather not have "
|
"remove anything that you would rather not have "
|
||||||
"included in the bug report."))
|
"included in the bug report."))
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_padding(0, 4)
|
label.set_margin_top(4)
|
||||||
|
label.set_margin_bottom(4)
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
|
|
||||||
swin = Gtk.ScrolledWindow()
|
swin = Gtk.ScrolledWindow()
|
||||||
@ -380,9 +382,9 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
sw_frame = Gtk.Frame()
|
sw_frame = Gtk.Frame()
|
||||||
sw_frame.add(swin)
|
sw_frame.add(swin)
|
||||||
|
|
||||||
reset = Gtk.Button("Reset")
|
reset = Gtk.Button(label="Reset")
|
||||||
reset.connect('clicked', self._reset_sys_information)
|
reset.connect('clicked', self._reset_sys_information)
|
||||||
clear = Gtk.Button("Clear")
|
clear = Gtk.Button(label="Clear")
|
||||||
clear.connect('clicked', self._clear_sys_information)
|
clear.connect('clicked', self._clear_sys_information)
|
||||||
|
|
||||||
|
|
||||||
@ -441,7 +443,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"can about what you were doing when the error "
|
"can about what you were doing when the error "
|
||||||
"occurred."))
|
"occurred."))
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_padding(0, 4)
|
label.set_margin_top(4)
|
||||||
|
label.set_margin_bottom(4)
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
|
|
||||||
swin = Gtk.ScrolledWindow()
|
swin = Gtk.ScrolledWindow()
|
||||||
@ -456,7 +459,7 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
sw_frame = Gtk.Frame()
|
sw_frame = Gtk.Frame()
|
||||||
sw_frame.add(swin)
|
sw_frame.add(swin)
|
||||||
|
|
||||||
clear = Gtk.Button("Clear")
|
clear = Gtk.Button(label="Clear")
|
||||||
clear.connect('clicked', self._clear_user_information)
|
clear.connect('clicked', self._clear_user_information)
|
||||||
|
|
||||||
button_box = Gtk.ButtonBox()
|
button_box = Gtk.ButtonBox()
|
||||||
@ -514,7 +517,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"that it does not contain anything that you do not "
|
"that it does not contain anything that you do not "
|
||||||
"want to be sent to the developers."))
|
"want to be sent to the developers."))
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_padding(0, 4)
|
label.set_margin_top(4)
|
||||||
|
label.set_margin_bottom(4)
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
|
|
||||||
swin = Gtk.ScrolledWindow()
|
swin = Gtk.ScrolledWindow()
|
||||||
@ -580,7 +584,8 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"clipboard and then open a webbrowser to file a bug report at "),
|
"clipboard and then open a webbrowser to file a bug report at "),
|
||||||
URL_BUGTRACKER))
|
URL_BUGTRACKER))
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_padding(0, 4)
|
label.set_margin_top(4)
|
||||||
|
label.set_margin_bottom(4)
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
label.set_use_markup(True)
|
label.set_use_markup(True)
|
||||||
|
|
||||||
@ -589,11 +594,12 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"and file a bug report on the Gramps bug "
|
"and file a bug report on the Gramps bug "
|
||||||
"tracking system."))
|
"tracking system."))
|
||||||
url_label.set_halign(Gtk.Align.START)
|
url_label.set_halign(Gtk.Align.START)
|
||||||
url_label.set_padding(0, 4)
|
url_label.set_margin_top(4)
|
||||||
|
url_label.set_margin_bottom(4)
|
||||||
url_label.set_line_wrap(True)
|
url_label.set_line_wrap(True)
|
||||||
url_label.set_size_request(200, -1)
|
url_label.set_size_request(200, -1)
|
||||||
|
|
||||||
url_button = Gtk.Button("File bug report")
|
url_button = Gtk.Button(label="File bug report")
|
||||||
url_button.connect('clicked', self._start_gramps_bts_in_browser)
|
url_button.connect('clicked', self._start_gramps_bts_in_browser)
|
||||||
url_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
url_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
url_button_vbox.pack_start(url_button, True, False, 0)
|
url_button_vbox.pack_start(url_button, True, False, 0)
|
||||||
@ -613,11 +619,12 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
"the button below, paste the report and click "
|
"the button below, paste the report and click "
|
||||||
"submit report"))
|
"submit report"))
|
||||||
clip_label.set_halign(Gtk.Align.START)
|
clip_label.set_halign(Gtk.Align.START)
|
||||||
clip_label.set_padding(0, 4)
|
clip_label.set_margin_top(4)
|
||||||
|
clip_label.set_margin_bottom(4)
|
||||||
clip_label.set_line_wrap(True)
|
clip_label.set_line_wrap(True)
|
||||||
clip_label.set_size_request(200, -1)
|
clip_label.set_size_request(200, -1)
|
||||||
|
|
||||||
clip_button = Gtk.Button("Copy to clipboard")
|
clip_button = Gtk.Button(label="Copy to clipboard")
|
||||||
clip_button.connect('clicked', self._copy_to_clipboard)
|
clip_button.connect('clicked', self._copy_to_clipboard)
|
||||||
clip_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
clip_button_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
clip_button_vbox.pack_start(clip_button, True, False, 0)
|
clip_button_vbox.pack_start(clip_button, True, False, 0)
|
||||||
|
@ -105,7 +105,7 @@ class ErrorView(ManagedWindow):
|
|||||||
|
|
||||||
def draw_window(self):
|
def draw_window(self):
|
||||||
title = "%s - Gramps" % _("Error Report")
|
title = "%s - Gramps" % _("Error Report")
|
||||||
self.top = Gtk.Dialog(title)
|
self.top = Gtk.Dialog(title=title)
|
||||||
# look over the top level windows, it seems the oldest come first, so
|
# look over the top level windows, it seems the oldest come first, so
|
||||||
# the most recent still visible window appears to be a good choice for
|
# the most recent still visible window appears to be a good choice for
|
||||||
# a transient parent
|
# a transient parent
|
||||||
|
@ -75,16 +75,17 @@ class LastNameDialog(ManagedWindow):
|
|||||||
def __init__(self, database, uistate, track, surnames, skip_list=set()):
|
def __init__(self, database, uistate, track, surnames, skip_list=set()):
|
||||||
|
|
||||||
ManagedWindow.__init__(self, uistate, track, self, modal=True)
|
ManagedWindow.__init__(self, uistate, track, self, modal=True)
|
||||||
flags = Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT
|
self.__dlg = Gtk.Dialog(
|
||||||
buttons = (_('_Cancel'), Gtk.ResponseType.REJECT,
|
transient_for=uistate.window, destroy_with_parent=True,
|
||||||
_('_OK'), Gtk.ResponseType.ACCEPT)
|
modal=True)
|
||||||
self.__dlg = Gtk.Dialog(None, uistate.window, flags, buttons)
|
self.__dlg.add_buttons(_('_Cancel'), Gtk.ResponseType.REJECT,
|
||||||
|
_('_OK'), Gtk.ResponseType.ACCEPT)
|
||||||
self.set_window(self.__dlg, None, _('Select surname'))
|
self.set_window(self.__dlg, None, _('Select surname'))
|
||||||
self.setup_configs('interface.lastnamedialog', 400, 400)
|
self.setup_configs('interface.lastnamedialog', 400, 400)
|
||||||
|
|
||||||
# build up a container to display all of the people of interest
|
# build up a container to display all of the people of interest
|
||||||
self.__model = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_INT)
|
self.__model = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_INT)
|
||||||
self.__tree_view = Gtk.TreeView(self.__model)
|
self.__tree_view = Gtk.TreeView(model=self.__model)
|
||||||
col1 = Gtk.TreeViewColumn(_('Surname'), Gtk.CellRendererText(), text=0)
|
col1 = Gtk.TreeViewColumn(_('Surname'), Gtk.CellRendererText(), text=0)
|
||||||
col2 = Gtk.TreeViewColumn(_('Count'), Gtk.CellRendererText(), text=1)
|
col2 = Gtk.TreeViewColumn(_('Count'), Gtk.CellRendererText(), text=1)
|
||||||
col1.set_resizable(True)
|
col1.set_resizable(True)
|
||||||
@ -1739,12 +1740,10 @@ class GuiDestinationOption(Gtk.Box):
|
|||||||
else:
|
else:
|
||||||
my_action = Gtk.FileChooserAction.SAVE
|
my_action = Gtk.FileChooserAction.SAVE
|
||||||
|
|
||||||
fcd = Gtk.FileChooserDialog(_("Save As"), action=my_action,
|
fcd = Gtk.FileChooserDialog(title=_("Save As"), action=my_action,
|
||||||
parent=self.__uistate.window,
|
transient_for=self.__uistate.window)
|
||||||
buttons=(_('_Cancel'),
|
fcd.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Open'), Gtk.ResponseType.OK)
|
||||||
_('_Open'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
|
|
||||||
name = os.path.abspath(self.__option.get_value())
|
name = os.path.abspath(self.__option.get_value())
|
||||||
if self.__option.get_directory_entry():
|
if self.__option.get_directory_entry():
|
||||||
|
@ -435,12 +435,10 @@ class PluginStatus(ManagedWindow):
|
|||||||
"""
|
"""
|
||||||
Select a file from the file system.
|
Select a file from the file system.
|
||||||
"""
|
"""
|
||||||
fcd = Gtk.FileChooserDialog(_("Load Addon"),
|
fcd = Gtk.FileChooserDialog(title=_("Load Addon"),
|
||||||
parent=self.__uistate.window,
|
transient_for=self.__uistate.window)
|
||||||
buttons=(_('_Cancel'),
|
fcd.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Open'), Gtk.ResponseType.OK)
|
||||||
_('_Open'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
name = self.install_addon_path.get_text()
|
name = self.install_addon_path.get_text()
|
||||||
dir = os.path.dirname(name)
|
dir = os.path.dirname(name)
|
||||||
if not os.path.isdir(dir):
|
if not os.path.isdir(dir):
|
||||||
@ -688,10 +686,10 @@ class PluginTrace(ManagedWindow):
|
|||||||
) % {'str1': _("Plugin Error"), 'str2': name}
|
) % {'str1': _("Plugin Error"), 'str2': name}
|
||||||
ManagedWindow.__init__(self, uistate, track, self)
|
ManagedWindow.__init__(self, uistate, track, self)
|
||||||
|
|
||||||
self.set_window(Gtk.Dialog("", uistate.window,
|
dlg = Gtk.Dialog(title="", transient_for=uistate.window,
|
||||||
Gtk.DialogFlags.DESTROY_WITH_PARENT,
|
destroy_with_parent=True)
|
||||||
(_('_Close'), Gtk.ResponseType.CLOSE)),
|
dlg.add_button(_('_Close'), Gtk.ResponseType.CLOSE),
|
||||||
None, title)
|
self.set_window(dlg, None, title)
|
||||||
self.setup_configs('interface.plugintrace', 600, 400)
|
self.setup_configs('interface.plugintrace', 600, 400)
|
||||||
self.window.connect('response', self.close)
|
self.window.connect('response', self.close)
|
||||||
|
|
||||||
@ -742,7 +740,7 @@ class ToolManagedWindowBase(ManagedWindow):
|
|||||||
self.format_menu = None
|
self.format_menu = None
|
||||||
self.style_button = None
|
self.style_button = None
|
||||||
|
|
||||||
window = Gtk.Dialog('Tool')
|
window = Gtk.Dialog(title='Tool')
|
||||||
self.set_window(window, None, self.get_title())
|
self.set_window(window, None, self.get_title())
|
||||||
|
|
||||||
#self.window.connect('response', self.close)
|
#self.window.connect('response', self.close)
|
||||||
|
@ -286,7 +286,7 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
self.set_page_complete(vbox, True)
|
self.set_page_complete(vbox, True)
|
||||||
|
|
||||||
def create_page_fileselect(self):
|
def create_page_fileselect(self):
|
||||||
self.chooser = Gtk.FileChooserWidget(Gtk.FileChooserAction.SAVE)
|
self.chooser = Gtk.FileChooserWidget(action=Gtk.FileChooserAction.SAVE)
|
||||||
self.chooser.set_homogeneous(False) # Fix for bug #8350.
|
self.chooser.set_homogeneous(False) # Fix for bug #8350.
|
||||||
#add border
|
#add border
|
||||||
self.chooser.set_border_width(12)
|
self.chooser.set_border_width(12)
|
||||||
|
@ -164,9 +164,9 @@ class WriterOptionBox:
|
|||||||
full_database_row.pack_start(label, True, True, 0)
|
full_database_row.pack_start(label, True, True, 0)
|
||||||
people_count = len(self.dbstate.db.get_person_handles())
|
people_count = len(self.dbstate.db.get_person_handles())
|
||||||
# translators: leave all/any {...} untranslated
|
# translators: leave all/any {...} untranslated
|
||||||
button = Gtk.Button(ngettext("{number_of} Person",
|
button = Gtk.Button(label=ngettext("{number_of} Person",
|
||||||
"{number_of} People", people_count
|
"{number_of} People", people_count
|
||||||
).format(number_of=people_count) )
|
).format(number_of=people_count))
|
||||||
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
|
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
|
||||||
button.set_size_request(107, -1)
|
button.set_size_request(107, -1)
|
||||||
button.connect("clicked", self.show_preview_data)
|
button.connect("clicked", self.show_preview_data)
|
||||||
@ -271,9 +271,9 @@ class WriterOptionBox:
|
|||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from ...widgets import SimpleButton
|
from ...widgets import SimpleButton
|
||||||
# translators: leave all/any {...} untranslated
|
# translators: leave all/any {...} untranslated
|
||||||
button = Gtk.Button(ngettext("{number_of} Person",
|
button = Gtk.Button(label=ngettext("{number_of} Person",
|
||||||
"{number_of} People", 0
|
"{number_of} People", 0
|
||||||
).format(number_of=0) )
|
).format(number_of=0))
|
||||||
button.set_size_request(107, -1)
|
button.set_size_request(107, -1)
|
||||||
button.connect("clicked", self.show_preview_data)
|
button.connect("clicked", self.show_preview_data)
|
||||||
button.proxy_name = proxy_name
|
button.proxy_name = proxy_name
|
||||||
@ -283,7 +283,8 @@ class WriterOptionBox:
|
|||||||
label = Gtk.Label(label=_('_Person Filter') + COLON)
|
label = Gtk.Label(label=_('_Person Filter') + COLON)
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_size_request(120, -1)
|
label.set_size_request(120, -1)
|
||||||
label.set_padding(5, 0)
|
label.set_margin_start(5)
|
||||||
|
label.set_margin_end(5)
|
||||||
label.set_use_underline(True)
|
label.set_use_underline(True)
|
||||||
label.set_mnemonic_widget(self.filter_obj)
|
label.set_mnemonic_widget(self.filter_obj)
|
||||||
box = Gtk.Box()
|
box = Gtk.Box()
|
||||||
@ -301,7 +302,8 @@ class WriterOptionBox:
|
|||||||
label_note = Gtk.Label(label=_('_Note Filter') + COLON)
|
label_note = Gtk.Label(label=_('_Note Filter') + COLON)
|
||||||
label_note.set_halign(Gtk.Align.START)
|
label_note.set_halign(Gtk.Align.START)
|
||||||
label_note.set_size_request(120, -1)
|
label_note.set_size_request(120, -1)
|
||||||
label_note.set_padding(5, 0)
|
label_note.set_margin_start(5)
|
||||||
|
label_note.set_margin_end(5)
|
||||||
label_note.set_use_underline(True)
|
label_note.set_use_underline(True)
|
||||||
label_note.set_mnemonic_widget(self.filter_note)
|
label_note.set_mnemonic_widget(self.filter_note)
|
||||||
box = Gtk.Box()
|
box = Gtk.Box()
|
||||||
@ -317,7 +319,8 @@ class WriterOptionBox:
|
|||||||
label = Gtk.Label(label=_("Privacy Filter") + COLON)
|
label = Gtk.Label(label=_("Privacy Filter") + COLON)
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_size_request(120, -1)
|
label.set_size_request(120, -1)
|
||||||
label.set_padding(5, 0)
|
label.set_margin_start(5)
|
||||||
|
label.set_margin_end(5)
|
||||||
box = Gtk.Box()
|
box = Gtk.Box()
|
||||||
box.pack_start(label, False, True, 0)
|
box.pack_start(label, False, True, 0)
|
||||||
box.add(self.private_check)
|
box.add(self.private_check)
|
||||||
@ -327,7 +330,8 @@ class WriterOptionBox:
|
|||||||
label = Gtk.Label(label=_("Living Filter") + COLON)
|
label = Gtk.Label(label=_("Living Filter") + COLON)
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_size_request(120, -1)
|
label.set_size_request(120, -1)
|
||||||
label.set_padding(5, 0)
|
label.set_margin_start(5)
|
||||||
|
label.set_margin_end(5)
|
||||||
box = Gtk.Box()
|
box = Gtk.Box()
|
||||||
box.pack_start(label, False, True, 0)
|
box.pack_start(label, False, True, 0)
|
||||||
self.restrict_option = Gtk.ComboBox()
|
self.restrict_option = Gtk.ComboBox()
|
||||||
@ -339,7 +343,8 @@ class WriterOptionBox:
|
|||||||
label = Gtk.Label(label=_('Reference Filter') + COLON)
|
label = Gtk.Label(label=_('Reference Filter') + COLON)
|
||||||
label.set_halign(Gtk.Align.START)
|
label.set_halign(Gtk.Align.START)
|
||||||
label.set_size_request(120, -1)
|
label.set_size_request(120, -1)
|
||||||
label.set_padding(5, 0)
|
label.set_margin_start(5)
|
||||||
|
label.set_margin_end(5)
|
||||||
box = Gtk.Box()
|
box = Gtk.Box()
|
||||||
box.pack_start(label, False, True, 0)
|
box.pack_start(label, False, True, 0)
|
||||||
box.pack_start(self.reference_filter, True, True, 0)
|
box.pack_start(self.reference_filter, True, True, 0)
|
||||||
|
@ -58,13 +58,11 @@ class FileEntry(Gtk.Box):
|
|||||||
else:
|
else:
|
||||||
my_action = Gtk.FileChooserAction.SAVE
|
my_action = Gtk.FileChooserAction.SAVE
|
||||||
|
|
||||||
dialog = Gtk.FileChooserDialog(self.title,
|
dialog = Gtk.FileChooserDialog(title=self.title,
|
||||||
self.parent,
|
transient_for=self.parent,
|
||||||
action=my_action,
|
action=my_action)
|
||||||
buttons=(_('_Cancel'),
|
dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Open'), Gtk.ResponseType.OK)
|
||||||
_('_Open'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
|
|
||||||
name = os.path.basename(self.entry.get_text())
|
name = os.path.basename(self.entry.get_text())
|
||||||
if self.dir:
|
if self.dir:
|
||||||
|
@ -175,7 +175,8 @@ class PaperFrame(Gtk.Box):
|
|||||||
|
|
||||||
self.paper_grid.show_all()
|
self.paper_grid.show_all()
|
||||||
# Shift the grid from glade toplevel window to this box
|
# Shift the grid from glade toplevel window to this box
|
||||||
self.paper_grid.reparent(self)
|
self.paper_grid.get_parent().remove(self.paper_grid)
|
||||||
|
self.add(self.paper_grid)
|
||||||
# need to get rid of glade toplevel now that we are done with it.
|
# need to get rid of glade toplevel now that we are done with it.
|
||||||
self.top.destroy()
|
self.top.destroy()
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ class StyleEditor(ManagedWindow):
|
|||||||
spin.set_value(t.get_column_width(i))
|
spin.set_value(t.get_column_width(i))
|
||||||
self.column.append(spin)
|
self.column.append(spin)
|
||||||
hbox.pack_start(spin, False, False, 6)
|
hbox.pack_start(spin, False, False, 6)
|
||||||
hbox.pack_start(Gtk.Label('%'), False, False, 6)
|
hbox.pack_start(Gtk.Label(label='%'), False, False, 6)
|
||||||
hbox.show_all()
|
hbox.show_all()
|
||||||
self.vbox.pack_start(hbox, False, False, 3)
|
self.vbox.pack_start(hbox, False, False, 3)
|
||||||
|
|
||||||
|
@ -1649,9 +1649,9 @@ class QuickBackup(ManagedWindow): # TODO move this class into its own module
|
|||||||
self.user = user
|
self.user = user
|
||||||
|
|
||||||
ManagedWindow.__init__(self, uistate, [], self.__class__)
|
ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||||
window = Gtk.Dialog('',
|
window = Gtk.Dialog(title='',
|
||||||
self.uistate.window,
|
transient_for=self.uistate.window,
|
||||||
Gtk.DialogFlags.DESTROY_WITH_PARENT, None)
|
destroy_with_parent=True)
|
||||||
self.set_window(window, None, _("Gramps XML Backup"))
|
self.set_window(window, None, _("Gramps XML Backup"))
|
||||||
self.setup_configs('interface.quick-backup', 500, 150)
|
self.setup_configs('interface.quick-backup', 500, 150)
|
||||||
close_button = window.add_button(_('_Close'),
|
close_button = window.add_button(_('_Close'),
|
||||||
@ -1787,12 +1787,10 @@ class QuickBackup(ManagedWindow): # TODO move this class into its own module
|
|||||||
"""
|
"""
|
||||||
fdialog = Gtk.FileChooserDialog(
|
fdialog = Gtk.FileChooserDialog(
|
||||||
title=_("Select backup directory"),
|
title=_("Select backup directory"),
|
||||||
parent=self.window,
|
transient_for=self.window,
|
||||||
action=Gtk.FileChooserAction.SELECT_FOLDER,
|
action=Gtk.FileChooserAction.SELECT_FOLDER)
|
||||||
buttons=(_('_Cancel'),
|
fdialog.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Apply'), Gtk.ResponseType.OK)
|
||||||
_('_Apply'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
mpath = path_entry.get_text()
|
mpath = path_entry.get_text()
|
||||||
if not mpath:
|
if not mpath:
|
||||||
mpath = HOME_DIR
|
mpath = HOME_DIR
|
||||||
|
@ -269,7 +269,7 @@ class BookmarksDialog(ManagedWindow):
|
|||||||
|
|
||||||
def draw_window(self):
|
def draw_window(self):
|
||||||
"""Draw the bookmark dialog box."""
|
"""Draw the bookmark dialog box."""
|
||||||
self.top = Gtk.Dialog(parent=self.parent_window)
|
self.top = Gtk.Dialog(transient_for=self.parent_window)
|
||||||
self.top.vbox.set_spacing(5)
|
self.top.vbox.set_spacing(5)
|
||||||
label = Gtk.Label(label='<span size="larger" weight="bold">%s</span>'
|
label = Gtk.Label(label='<span size="larger" weight="bold">%s</span>'
|
||||||
% _("Organize Bookmarks"))
|
% _("Organize Bookmarks"))
|
||||||
|
@ -1059,11 +1059,11 @@ class ListView(NavigationView):
|
|||||||
####################################################################
|
####################################################################
|
||||||
def export(self, *obj):
|
def export(self, *obj):
|
||||||
chooser = Gtk.FileChooserDialog(
|
chooser = Gtk.FileChooserDialog(
|
||||||
_("Export View as Spreadsheet"),
|
title=_("Export View as Spreadsheet"),
|
||||||
self.uistate.window,
|
transient_for=self.uistate.window,
|
||||||
Gtk.FileChooserAction.SAVE,
|
action=Gtk.FileChooserAction.SAVE)
|
||||||
(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
chooser.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
_('_Save'), Gtk.ResponseType.OK))
|
_('_Save'), Gtk.ResponseType.OK)
|
||||||
chooser.set_do_overwrite_confirmation(True)
|
chooser.set_do_overwrite_confirmation(True)
|
||||||
|
|
||||||
combobox = Gtk.ComboBoxText()
|
combobox = Gtk.ComboBoxText()
|
||||||
|
@ -331,7 +331,8 @@ class NavigationView(PageView):
|
|||||||
"""
|
"""
|
||||||
A dialog to move to a Gramps ID entered by the user.
|
A dialog to move to a Gramps ID entered by the user.
|
||||||
"""
|
"""
|
||||||
dialog = Gtk.Dialog(_('Jump to by Gramps ID'), self.uistate.window)
|
dialog = Gtk.Dialog(title=_('Jump to by Gramps ID'),
|
||||||
|
transient_for=self.uistate.window)
|
||||||
dialog.set_border_width(12)
|
dialog.set_border_width(12)
|
||||||
label = Gtk.Label(label='<span weight="bold" size="larger">%s</span>' %
|
label = Gtk.Label(label='<span weight="bold" size="larger">%s</span>' %
|
||||||
_('Jump to by Gramps ID'))
|
_('Jump to by Gramps ID'))
|
||||||
|
@ -459,7 +459,7 @@ class OrganizeTagsDialog(ManagedWindow):
|
|||||||
Create a dialog box to organize tags.
|
Create a dialog box to organize tags.
|
||||||
"""
|
"""
|
||||||
# pylint: disable-msg=E1101
|
# pylint: disable-msg=E1101
|
||||||
top = Gtk.Dialog(parent=self.parent_window)
|
top = Gtk.Dialog(transient_for=self.parent_window)
|
||||||
top.vbox.set_spacing(5)
|
top.vbox.set_spacing(5)
|
||||||
label = Gtk.Label(label='<span size="larger" weight="bold">%s</span>'
|
label = Gtk.Label(label='<span size="larger" weight="bold">%s</span>'
|
||||||
% _("Organize Tags"))
|
% _("Organize Tags"))
|
||||||
@ -688,7 +688,7 @@ class EditTag(ManagedWindow):
|
|||||||
Create a dialog box to enter a new tag.
|
Create a dialog box to enter a new tag.
|
||||||
"""
|
"""
|
||||||
# pylint: disable-msg=E1101
|
# pylint: disable-msg=E1101
|
||||||
top = Gtk.Dialog(parent=self.parent_window)
|
top = Gtk.Dialog(transient_for=self.parent_window)
|
||||||
top.vbox.set_spacing(5)
|
top.vbox.set_spacing(5)
|
||||||
|
|
||||||
hbox = Gtk.Box()
|
hbox = Gtk.Box()
|
||||||
|
@ -630,13 +630,11 @@ class DetachedWindow(ManagedWindow):
|
|||||||
self.grampletbar = grampletbar
|
self.grampletbar = grampletbar
|
||||||
self.gramplet = gramplet
|
self.gramplet = gramplet
|
||||||
|
|
||||||
ManagedWindow.__init__(self, gramplet.uistate, [],
|
ManagedWindow.__init__(self, gramplet.uistate, [], self.title)
|
||||||
self.title)
|
dlg = Gtk.Dialog(transient_for=gramplet.uistate.window,
|
||||||
self.set_window(Gtk.Dialog("", gramplet.uistate.window,
|
destroy_with_parent = True)
|
||||||
Gtk.DialogFlags.DESTROY_WITH_PARENT,
|
dlg.add_button(_('_Close'), Gtk.ResponseType.CLOSE)
|
||||||
(_('_Close'), Gtk.ResponseType.CLOSE)),
|
self.set_window(dlg, None, self.title)
|
||||||
None,
|
|
||||||
self.title)
|
|
||||||
self.window.move(x_pos, y_pos)
|
self.window.move(x_pos, y_pos)
|
||||||
self.window.set_default_size(gramplet.detached_width,
|
self.window.set_default_size(gramplet.detached_width,
|
||||||
gramplet.detached_height)
|
gramplet.detached_height)
|
||||||
@ -701,7 +699,8 @@ class DetachedWindow(ManagedWindow):
|
|||||||
self.gramplet.detached_width = size[0]
|
self.gramplet.detached_width = size[0]
|
||||||
self.gramplet.detached_height = size[1]
|
self.gramplet.detached_height = size[1]
|
||||||
self.gramplet.detached_window = None
|
self.gramplet.detached_window = None
|
||||||
self.gramplet.reparent(self.grampletbar)
|
self.notebook.remove(self.gramplet)
|
||||||
|
self.grampletbar.add(self.gramplet)
|
||||||
ManagedWindow.close(self, *args)
|
ManagedWindow.close(self, *args)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -233,12 +233,11 @@ class GrampletWindow(ManagedWindow):
|
|||||||
self.docked_state = gramplet.gstate
|
self.docked_state = gramplet.gstate
|
||||||
# Now detach it
|
# Now detach it
|
||||||
self.gramplet.set_state("detached")
|
self.gramplet.set_state("detached")
|
||||||
ManagedWindow.__init__(self, gramplet.uistate, [],
|
ManagedWindow.__init__(self, gramplet.uistate, [], self.title)
|
||||||
self.title)
|
dlg = Gtk.Dialog(transient_for=gramplet.uistate.window,
|
||||||
self.set_window(Gtk.Dialog("", gramplet.uistate.window,
|
destroy_with_parent=True)
|
||||||
Gtk.DialogFlags.DESTROY_WITH_PARENT,
|
dlg.add_button(_('_Close'), Gtk.ResponseType.CLOSE)
|
||||||
(_('_Close'), Gtk.ResponseType.CLOSE)),
|
self.set_window(dlg, None, self.title)
|
||||||
None, self.title)
|
|
||||||
cfg_name = gramplet.gname.replace(' ', '').lower() + '-gramplet'
|
cfg_name = gramplet.gname.replace(' ', '').lower() + '-gramplet'
|
||||||
self.setup_configs('interface.' + cfg_name,
|
self.setup_configs('interface.' + cfg_name,
|
||||||
gramplet.detached_width, gramplet.detached_height)
|
gramplet.detached_width, gramplet.detached_height)
|
||||||
@ -246,7 +245,8 @@ class GrampletWindow(ManagedWindow):
|
|||||||
# add gramplet:
|
# add gramplet:
|
||||||
if self.gramplet.pui:
|
if self.gramplet.pui:
|
||||||
self.gramplet.pui.active = True
|
self.gramplet.pui.active = True
|
||||||
self.gramplet.mainframe.reparent(self.window.vbox)
|
self.gramplet.mainframe.get_parent().remove(self.gramplet.mainframe)
|
||||||
|
self.window.vbox.add(self.gramplet.mainframe)
|
||||||
self.window.connect('response', self.handle_response)
|
self.window.connect('response', self.handle_response)
|
||||||
self.show()
|
self.show()
|
||||||
# After we show, then we hide:
|
# After we show, then we hide:
|
||||||
@ -310,7 +310,8 @@ class GrampletWindow(ManagedWindow):
|
|||||||
expand = self.gramplet.gstate == "maximized" and self.gramplet.expand
|
expand = self.gramplet.gstate == "maximized" and self.gramplet.expand
|
||||||
column = pane.columns[col]
|
column = pane.columns[col]
|
||||||
parent = self.gramplet.pane.get_column_frame(self.gramplet.column)
|
parent = self.gramplet.pane.get_column_frame(self.gramplet.column)
|
||||||
self.gramplet.mainframe.reparent(parent)
|
self.gramplet.mainframe.get_parent().remove(self.gramplet.mainframe)
|
||||||
|
parent.add(self.gramplet.mainframe)
|
||||||
if self.gramplet.pui:
|
if self.gramplet.pui:
|
||||||
self.gramplet.pui.active = self.gramplet.pane.pageview.active
|
self.gramplet.pui.active = self.gramplet.pane.pageview.active
|
||||||
for gframe in stack:
|
for gframe in stack:
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
__all__ = ["LinkLabel", "EditLabel", "BasicLabel", "GenderLabel",
|
__all__ = ["LinkLabel", "EditLabel", "BasicLabel",
|
||||||
"MarkupLabel", "DualMarkupLabel"]
|
"MarkupLabel", "DualMarkupLabel"]
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -127,7 +127,7 @@ class LinkLabel(Gtk.EventBox):
|
|||||||
hbox = Gtk.Box()
|
hbox = Gtk.Box()
|
||||||
hbox.pack_start(self.label, False, False, 0)
|
hbox.pack_start(self.label, False, False, 0)
|
||||||
if label[1]:
|
if label[1]:
|
||||||
hbox.pack_start(GenderLabel(label[1]), False, False, 0)
|
hbox.pack_start(Gtk.Label(label=label[1]), False, False, 0)
|
||||||
hbox.set_spacing(4)
|
hbox.set_spacing(4)
|
||||||
self.add(hbox)
|
self.add(hbox)
|
||||||
|
|
||||||
@ -138,7 +138,10 @@ class LinkLabel(Gtk.EventBox):
|
|||||||
self.connect('realize', realize_cb)
|
self.connect('realize', realize_cb)
|
||||||
|
|
||||||
def set_padding(self, x, y):
|
def set_padding(self, x, y):
|
||||||
self.label.set_padding(x, y)
|
self.label.set_margin_start(x)
|
||||||
|
self.label.set_margin_end(x)
|
||||||
|
self.label.set_margin_top(x)
|
||||||
|
self.label.set_margin_bottom(x)
|
||||||
|
|
||||||
def enter_text(self, obj, event, handle):
|
def enter_text(self, obj, event, handle):
|
||||||
if self.emph:
|
if self.emph:
|
||||||
@ -205,20 +208,6 @@ class BasicLabel(Gtk.Label):
|
|||||||
self.set_ellipsize(ellipsize)
|
self.set_ellipsize(ellipsize)
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# GenderLabel class
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
class GenderLabel(Gtk.Label):
|
|
||||||
|
|
||||||
def __init__(self, text):
|
|
||||||
Gtk.Label.__init__(self, label=text)
|
|
||||||
self.set_halign(Gtk.Align.START)
|
|
||||||
if win():
|
|
||||||
pangoFont = Pango.FontDescription('Arial')
|
|
||||||
self.override_font(pangoFont)
|
|
||||||
self.show()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -247,7 +236,6 @@ class DualMarkupLabel(Gtk.Box):
|
|||||||
label.set_use_markup(True)
|
label.set_use_markup(True)
|
||||||
|
|
||||||
self.pack_start(label, False, False, 0)
|
self.pack_start(label, False, False, 0)
|
||||||
b = GenderLabel(alt)
|
b = Gtk.Label(label=alt)
|
||||||
b.set_use_markup(True)
|
|
||||||
self.pack_start(b, False, False, 4)
|
self.pack_start(b, False, False, 4)
|
||||||
self.show()
|
self.show()
|
||||||
|
@ -183,36 +183,8 @@ class MonitoredEntryIndicator(MonitoredEntry):
|
|||||||
autolist=None, changed=None):
|
autolist=None, changed=None):
|
||||||
MonitoredEntry.__init__(self, obj, set_val, get_val, read_only,
|
MonitoredEntry.__init__(self, obj, set_val, get_val, read_only,
|
||||||
autolist, changed)
|
autolist, changed)
|
||||||
self.origcolor = obj.get_style_context().get_color(Gtk.StateType.NORMAL)
|
self.obj.set_placeholder_text(indicator)
|
||||||
if get_val():
|
|
||||||
self.indicatorshown = False
|
|
||||||
else:
|
|
||||||
self.indicatorshown = True
|
|
||||||
self.indicator = indicator
|
|
||||||
self.obj.set_text(indicator)
|
|
||||||
rgba = Gdk.RGBA()
|
|
||||||
Gdk.RGBA.parse(rgba, 'grey')
|
|
||||||
self.obj.override_color(Gtk.StateType.NORMAL, rgba)
|
|
||||||
self.obj.override_font(Pango.FontDescription('sans italic'))
|
|
||||||
self.fockey = self.obj.connect('focus-in-event',
|
|
||||||
self._obj_focus)
|
|
||||||
|
|
||||||
def _on_change(self, obj):
|
|
||||||
if not self.indicatorshown:
|
|
||||||
self.set_val(str(obj.get_text()))
|
|
||||||
if self.changed:
|
|
||||||
self.changed(obj)
|
|
||||||
|
|
||||||
def _obj_focus(self, widg, eve):
|
|
||||||
"""
|
|
||||||
callback for when prefix obtains focus
|
|
||||||
"""
|
|
||||||
self.set_text('')
|
|
||||||
self.obj.override_color(Gtk.StateType.NORMAL, self.origcolor)
|
|
||||||
self.obj.override_font(Pango.FontDescription('normal'))
|
|
||||||
self.obj.disconnect(self.fockey)
|
|
||||||
self.indicatorshown = False
|
|
||||||
return False
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -84,7 +84,6 @@ class Photo(Gtk.EventBox):
|
|||||||
elif is_right_click(event):
|
elif is_right_click(event):
|
||||||
if self.handle and self.uistate:
|
if self.handle and self.uistate:
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
self.menu.set_title(_("Media Object"))
|
|
||||||
add_menuitem(self.menu, _("Make Active Media"), widget,
|
add_menuitem(self.menu, _("Make Active Media"), widget,
|
||||||
lambda obj: self.uistate.set_active(self.handle, "Media"))
|
lambda obj: self.uistate.set_active(self.handle, "Media"))
|
||||||
self.menu.popup(None, None, None, None, event.button, event.time)
|
self.menu.popup(None, None, None, None, event.button, event.time)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import GObject
|
from gi.repository import GLib, GObject
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -305,7 +305,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
|
|||||||
viewport_size.height)
|
viewport_size.height)
|
||||||
self._rescale()
|
self._rescale()
|
||||||
self.loaded = True
|
self.loaded = True
|
||||||
except (GObject.GError, OSError):
|
except (GLib.GError, OSError):
|
||||||
self.show_missing()
|
self.show_missing()
|
||||||
|
|
||||||
def show_missing(self):
|
def show_missing(self):
|
||||||
|
@ -191,7 +191,7 @@ class MaskedEntry(UndoableEntry):
|
|||||||
:param mask: the mask to set
|
:param mask: the mask to set
|
||||||
"""
|
"""
|
||||||
if not mask:
|
if not mask:
|
||||||
self.override_font(Pango.FontDescription("sans"))
|
# self.override_font(Pango.FontDescription("sans"))
|
||||||
self._mask = mask
|
self._mask = mask
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -221,7 +221,9 @@ class MaskedEntry(UndoableEntry):
|
|||||||
pos += 1
|
pos += 1
|
||||||
|
|
||||||
self._mask_fields.append((field_begin, field_end))
|
self._mask_fields.append((field_begin, field_end))
|
||||||
self.override_font(Pango.FontDescription("monospace"))
|
# The set_mask function doesn't seem to be used, except for the test
|
||||||
|
# so removing the monospace doesn't change visible functionality
|
||||||
|
# self.override_font(Pango.FontDescription("monospace"))
|
||||||
|
|
||||||
self._really_delete_text(0, -1)
|
self._really_delete_text(0, -1)
|
||||||
self._insert_mask(0, input_length)
|
self._insert_mask(0, input_length)
|
||||||
@ -940,6 +942,8 @@ VALIDATION_ICON_WIDTH = 16
|
|||||||
MANDATORY_ICON = 'dialog-information'
|
MANDATORY_ICON = 'dialog-information'
|
||||||
ERROR_ICON = 'process-stop'
|
ERROR_ICON = 'process-stop'
|
||||||
DELAY_TIME = 2500
|
DELAY_TIME = 2500
|
||||||
|
READWRITE = (GObject.PARAM_READWRITE if GLib.check_version(2, 42, 0) else
|
||||||
|
GObject.ParamFlags.READWRITE)
|
||||||
|
|
||||||
class ValidatableMaskedEntry(MaskedEntry):
|
class ValidatableMaskedEntry(MaskedEntry):
|
||||||
"""
|
"""
|
||||||
@ -969,12 +973,12 @@ class ValidatableMaskedEntry(MaskedEntry):
|
|||||||
'data-type': (GObject.TYPE_PYOBJECT,
|
'data-type': (GObject.TYPE_PYOBJECT,
|
||||||
'Data Type of the widget',
|
'Data Type of the widget',
|
||||||
'Type object',
|
'Type object',
|
||||||
GObject.PARAM_READWRITE),
|
READWRITE),
|
||||||
'mandatory': (GObject.TYPE_BOOLEAN,
|
'mandatory': (GObject.TYPE_BOOLEAN,
|
||||||
'Mandatory',
|
'Mandatory',
|
||||||
'Mandatory',
|
'Mandatory',
|
||||||
False,
|
False,
|
||||||
GObject.PARAM_READWRITE),
|
READWRITE),
|
||||||
}
|
}
|
||||||
|
|
||||||
# FIXME put the data type support back
|
# FIXME put the data type support back
|
||||||
|
@ -139,7 +139,6 @@ class GeoEvents(Gramplet, DbGUIElement):
|
|||||||
"""
|
"""
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title(_('Edit'))
|
|
||||||
title = _('Edit the event')
|
title = _('Edit the event')
|
||||||
add_item = Gtk.MenuItem(label=title)
|
add_item = Gtk.MenuItem(label=title)
|
||||||
add_item.connect("activate", self.edit_event, treeview)
|
add_item.connect("activate", self.edit_event, treeview)
|
||||||
|
@ -70,7 +70,7 @@ class FanChart2WayGramplet(FanChart2WayGrampsGUI, Gramplet):
|
|||||||
self.on_popup))
|
self.on_popup))
|
||||||
# Replace the standard textview with the fan chart widget:
|
# Replace the standard textview with the fan chart widget:
|
||||||
self.gui.get_container_widget().remove(self.gui.textview)
|
self.gui.get_container_widget().remove(self.gui.textview)
|
||||||
self.gui.get_container_widget().add_with_viewport(self.fan)
|
self.gui.get_container_widget().add(self.fan)
|
||||||
# Make sure it is visible:
|
# Make sure it is visible:
|
||||||
self.fan.show()
|
self.fan.show()
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Pango
|
from gi.repository.GLib import markup_escape_text
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -61,7 +61,6 @@ class PersonDetails(Gramplet):
|
|||||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||||
self.photo.show()
|
self.photo.show()
|
||||||
self.name = Gtk.Label(halign=Gtk.Align.START)
|
self.name = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
|
||||||
self.name.set_selectable(True)
|
self.name.set_selectable(True)
|
||||||
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
@ -150,7 +149,9 @@ class PersonDetails(Gramplet):
|
|||||||
Display details of the active person.
|
Display details of the active person.
|
||||||
"""
|
"""
|
||||||
self.load_person_image(active_person)
|
self.load_person_image(active_person)
|
||||||
self.name.set_text(name_displayer.display(active_person))
|
self.name.set_markup(
|
||||||
|
"<span size='large' weight='bold'>%s</span>" %
|
||||||
|
markup_escape_text(name_displayer.display(active_person), -1))
|
||||||
self.clear_grid()
|
self.clear_grid()
|
||||||
self.display_alternate_names(active_person)
|
self.display_alternate_names(active_person)
|
||||||
self.display_parents(active_person)
|
self.display_parents(active_person)
|
||||||
@ -177,8 +178,8 @@ class PersonDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Display an empty row to separate groupd of entries.
|
Display an empty row to separate groupd of entries.
|
||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label()
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.set_markup("<span font='sans 4'> </span>")
|
||||||
label.set_selectable(True)
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Pango
|
from gi.repository.GLib import markup_escape_text
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -55,7 +55,6 @@ class PlaceDetails(Gramplet):
|
|||||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||||
self.title = Gtk.Label(halign=Gtk.Align.START)
|
self.title = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.title.override_font(Pango.FontDescription('sans bold 12'))
|
|
||||||
self.title.set_selectable(True)
|
self.title.set_selectable(True)
|
||||||
vbox.pack_start(self.title, False, True, 7)
|
vbox.pack_start(self.title, False, True, 7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
@ -119,7 +118,8 @@ class PlaceDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
self.load_place_image(place)
|
self.load_place_image(place)
|
||||||
title = place_displayer.display(self.dbstate.db, place)
|
title = place_displayer.display(self.dbstate.db, place)
|
||||||
self.title.set_text(title)
|
self.title.set_markup("<span size='large' weight='bold'>%s</span>" %
|
||||||
|
markup_escape_text(title))
|
||||||
|
|
||||||
self.clear_grid()
|
self.clear_grid()
|
||||||
self.add_row(_('Name'), place.get_name().get_value())
|
self.add_row(_('Name'), place.get_name().get_value())
|
||||||
@ -158,8 +158,8 @@ class PlaceDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Display an empty row to separate groupd of entries.
|
Display an empty row to separate groupd of entries.
|
||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label()
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.set_markup("<span font='sans 4'> </span>")
|
||||||
label.set_selectable(True)
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
|
from gi.repository.GLib import markup_escape_text
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -51,7 +52,6 @@ class RepositoryDetails(Gramplet):
|
|||||||
self.top = Gtk.Box()
|
self.top = Gtk.Box()
|
||||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.name = Gtk.Label(halign=Gtk.Align.START)
|
self.name = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
|
||||||
self.name.set_selectable(True)
|
self.name.set_selectable(True)
|
||||||
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
@ -112,7 +112,9 @@ class RepositoryDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Display details of the active repository.
|
Display details of the active repository.
|
||||||
"""
|
"""
|
||||||
self.name.set_text(repo.get_name())
|
self.name.set_markup(
|
||||||
|
"<span size='large' weight='bold'>%s</span>" %
|
||||||
|
markup_escape_text(repo.get_name(), -1))
|
||||||
|
|
||||||
self.clear_grid()
|
self.clear_grid()
|
||||||
address_list = repo.get_address_list()
|
address_list = repo.get_address_list()
|
||||||
@ -154,8 +156,8 @@ class RepositoryDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Display an empty row to separate groupd of entries.
|
Display an empty row to separate groupd of entries.
|
||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label()
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.set_markup("<span font='sans 4'> </span>")
|
||||||
label.set_selectable(True)
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
@ -405,7 +405,6 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
|
|
||||||
self.changemap = Gtk.Menu()
|
self.changemap = Gtk.Menu()
|
||||||
changemap = self.changemap
|
changemap = self.changemap
|
||||||
changemap.set_title(title)
|
|
||||||
changemap.show()
|
changemap.show()
|
||||||
add_item.set_submenu(changemap)
|
add_item.set_submenu(changemap)
|
||||||
# show in the map menu all available providers
|
# show in the map menu all available providers
|
||||||
@ -885,7 +884,6 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||||
@ -990,11 +988,11 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
filtering = Gtk.FileFilter()
|
filtering = Gtk.FileFilter()
|
||||||
filtering.add_pattern("*.kml")
|
filtering.add_pattern("*.kml")
|
||||||
kml = Gtk.FileChooserDialog(
|
kml = Gtk.FileChooserDialog(
|
||||||
_("Select a kml file used to add places"),
|
title=_("Select a kml file used to add places"),
|
||||||
action=Gtk.FileChooserAction.OPEN,
|
action=Gtk.FileChooserAction.OPEN,
|
||||||
parent=self.uistate.window,
|
transient_for=self.uistate.window)
|
||||||
buttons=(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
kml.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
_('_Apply'), Gtk.ResponseType.OK))
|
_('_Apply'), Gtk.ResponseType.OK)
|
||||||
mpath = HOME_DIR
|
mpath = HOME_DIR
|
||||||
kml.set_current_folder(os.path.dirname(mpath))
|
kml.set_current_folder(os.path.dirname(mpath))
|
||||||
kml.set_filter(filtering)
|
kml.set_filter(filtering)
|
||||||
@ -1286,13 +1284,11 @@ class GeoGraphyView(OsmGps, NavigationView):
|
|||||||
"""
|
"""
|
||||||
dummy_obj = obj
|
dummy_obj = obj
|
||||||
selected_dir = Gtk.FileChooserDialog(
|
selected_dir = Gtk.FileChooserDialog(
|
||||||
_("Select tile cache directory for offline mode"),
|
title=_("Select tile cache directory for offline mode"),
|
||||||
action=Gtk.FileChooserAction.SELECT_FOLDER,
|
action=Gtk.FileChooserAction.SELECT_FOLDER,
|
||||||
parent=self.uistate.window,
|
transient_for=self.uistate.window)
|
||||||
buttons=(_('_Cancel'),
|
selected_dir.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Apply'), Gtk.ResponseType.OK)
|
||||||
_('_Apply'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
mpath = config.get('geography.path')
|
mpath = config.get('geography.path')
|
||||||
if not mpath:
|
if not mpath:
|
||||||
mpath = HOME_DIR
|
mpath = HOME_DIR
|
||||||
|
@ -115,10 +115,10 @@ class PlaceSelection(ManagedWindow, OsmGps):
|
|||||||
self.selection_layer = layer
|
self.selection_layer = layer
|
||||||
self.layer = layer
|
self.layer = layer
|
||||||
self.warning = False
|
self.warning = False
|
||||||
self.set_window(
|
dlg = Gtk.Dialog(title=_('Place Selection in a region'),
|
||||||
Gtk.Dialog(_('Place Selection in a region'), uistate.window,
|
transient_for=uistate.window)
|
||||||
buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
|
dlg.add_button(_('_Close'), Gtk.ResponseType.CLOSE)
|
||||||
None, _('Place Selection in a region'), None)
|
self.set_window(dlg, None, _('Place Selection in a region'), None)
|
||||||
mylabel = _('Choose the radius of the selection.\n'
|
mylabel = _('Choose the radius of the selection.\n'
|
||||||
'On the map you should see a circle or an'
|
'On the map you should see a circle or an'
|
||||||
' oval depending on the latitude.')
|
' oval depending on the latitude.')
|
||||||
@ -139,11 +139,11 @@ class PlaceSelection(ManagedWindow, OsmGps):
|
|||||||
slider.connect('value-changed', self.slider_change, self.lat, self.lon)
|
slider.connect('value-changed', self.slider_change, self.lat, self.lon)
|
||||||
self.window.vbox.pack_start(slider, False, True, 0)
|
self.window.vbox.pack_start(slider, False, True, 0)
|
||||||
self.vadjust = Gtk.Adjustment(page_size=15)
|
self.vadjust = Gtk.Adjustment(page_size=15)
|
||||||
self.scroll = Gtk.ScrolledWindow(self.vadjust)
|
self.scroll = Gtk.ScrolledWindow(vadjustment=self.vadjust)
|
||||||
self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
self.scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||||
self.scroll.set_shadow_type(Gtk.ShadowType.IN)
|
self.scroll.set_shadow_type(Gtk.ShadowType.IN)
|
||||||
self.plist = Gtk.ListStore(str, str, str, str, str)
|
self.plist = Gtk.ListStore(str, str, str, str, str)
|
||||||
self.choices = Gtk.TreeView(self.plist)
|
self.choices = Gtk.TreeView(model=self.plist)
|
||||||
self.scroll.add(self.choices)
|
self.scroll.add(self.choices)
|
||||||
self.renderer = Gtk.CellRendererText()
|
self.renderer = Gtk.CellRendererText()
|
||||||
self.tvcol1 = Gtk.TreeViewColumn(_('Country'), self.renderer, markup=0)
|
self.tvcol1 = Gtk.TreeViewColumn(_('Country'), self.renderer, markup=0)
|
||||||
|
@ -775,10 +775,10 @@ class CheckIntegrity:
|
|||||||
'kept')
|
'kept')
|
||||||
|
|
||||||
fs_top = Gtk.FileChooserDialog(
|
fs_top = Gtk.FileChooserDialog(
|
||||||
"%s - Gramps" % _("Select file"),
|
title="%s - Gramps" % _("Select file"),
|
||||||
parent=self.parent_window,
|
transient_for=self.parent_window)
|
||||||
buttons=(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
fs_top.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
_('_OK'), Gtk.ResponseType.OK))
|
_('_OK'), Gtk.ResponseType.OK)
|
||||||
fs_top.set_current_folder(self.last_img_dir)
|
fs_top.set_current_folder(self.last_img_dir)
|
||||||
response = fs_top.run()
|
response = fs_top.run()
|
||||||
if response == Gtk.ResponseType.OK:
|
if response == Gtk.ResponseType.OK:
|
||||||
|
@ -393,12 +393,10 @@ class EventComparisonResults(ManagedWindow):
|
|||||||
|
|
||||||
def on_write_table(self, obj):
|
def on_write_table(self, obj):
|
||||||
f = Gtk.FileChooserDialog(_("Select filename"),
|
f = Gtk.FileChooserDialog(_("Select filename"),
|
||||||
parent=self.window,
|
transient_for=self.window,
|
||||||
action=Gtk.FileChooserAction.SAVE,
|
action=Gtk.FileChooserAction.SAVE)
|
||||||
buttons=(_('_Cancel'),
|
f.add_buttons(_('_Cancel'), Gtk.ResponseType.CANCEL,
|
||||||
Gtk.ResponseType.CANCEL,
|
_('_Save'), Gtk.ResponseType.OK)
|
||||||
_('_Save'),
|
|
||||||
Gtk.ResponseType.OK))
|
|
||||||
|
|
||||||
f.set_current_folder(get_curr_dir())
|
f.set_current_folder(get_curr_dir())
|
||||||
status = f.run()
|
status = f.run()
|
||||||
|
@ -84,15 +84,16 @@ class PopulateSources(tool.Tool, ManagedWindow):
|
|||||||
num_citations = self.options.handler.options_dict['citations']
|
num_citations = self.options.handler.options_dict['citations']
|
||||||
|
|
||||||
# GUI setup:
|
# GUI setup:
|
||||||
dialog = Gtk.Dialog("Populate sources and citations tool",
|
dialog = Gtk.Dialog(title="Populate sources and citations tool",
|
||||||
self.uistate.window,
|
transient_for=self.uistate.window,
|
||||||
Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
|
modal=True, destroy_with_parent=True)
|
||||||
(_('_Cancel'), Gtk.ResponseType.REJECT,
|
dialog.add_buttons(_('_Cancel'), Gtk.ResponseType.REJECT,
|
||||||
_('_OK'), Gtk.ResponseType.ACCEPT))
|
_('_OK'), Gtk.ResponseType.ACCEPT)
|
||||||
label = Gtk.Label("Enter a valid number of sources and citations."
|
label = Gtk.Label(
|
||||||
" This will create the requested number of sources,"
|
label="Enter a valid number of sources and citations."
|
||||||
" and for each source, will create the requested"
|
" This will create the requested number of sources,"
|
||||||
" number of citations.")
|
" and for each source, will create the requested"
|
||||||
|
" number of citations.")
|
||||||
label.set_line_wrap(True)
|
label.set_line_wrap(True)
|
||||||
|
|
||||||
hbox1 = Gtk.Box()
|
hbox1 = Gtk.Box()
|
||||||
|
@ -272,7 +272,7 @@ class TestcaseGenerator(tool.BatchTool):
|
|||||||
|
|
||||||
def init_gui(self, uistate):
|
def init_gui(self, uistate):
|
||||||
title = "%s - Gramps" % _("Generate testcases")
|
title = "%s - Gramps" % _("Generate testcases")
|
||||||
self.top = Gtk.Dialog(title, parent=uistate.window)
|
self.top = Gtk.Dialog(title=title, transient_for=uistate.window)
|
||||||
self.window = uistate.window
|
self.window = uistate.window
|
||||||
self.top.set_default_size(400, 150)
|
self.top.set_default_size(400, 150)
|
||||||
self.top.vbox.set_spacing(5)
|
self.top.vbox.set_spacing(5)
|
||||||
|
@ -135,7 +135,7 @@ class FanChart2WayView(fanchart2way.FanChart2WayGrampsGUI, NavigationView):
|
|||||||
self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC,
|
self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC,
|
||||||
Gtk.PolicyType.AUTOMATIC)
|
Gtk.PolicyType.AUTOMATIC)
|
||||||
self.fan.show_all()
|
self.fan.show_all()
|
||||||
self.scrolledwindow.add_with_viewport(self.fan)
|
self.scrolledwindow.add(self.fan)
|
||||||
|
|
||||||
return self.scrolledwindow
|
return self.scrolledwindow
|
||||||
|
|
||||||
@ -573,9 +573,9 @@ class CairoPrintSave():
|
|||||||
(typically evince not installed)!
|
(typically evince not installed)!
|
||||||
"""
|
"""
|
||||||
dummy_preview = preview
|
dummy_preview = preview
|
||||||
dlg = Gtk.MessageDialog(parent,
|
dlg = Gtk.MessageDialog(transient_for=parent,
|
||||||
flags=Gtk.DialogFlags.MODAL,
|
modal=True,
|
||||||
type=Gtk.MessageType.WARNING,
|
message_type=Gtk.MessageType.WARNING,
|
||||||
buttons=Gtk.ButtonsType.CLOSE,
|
buttons=Gtk.ButtonsType.CLOSE,
|
||||||
message_format=_('No preview available'))
|
message_format=_('No preview available'))
|
||||||
self.preview = dlg
|
self.preview = dlg
|
||||||
|
@ -561,9 +561,9 @@ class CairoPrintSave:
|
|||||||
(typically evince not installed)!
|
(typically evince not installed)!
|
||||||
"""
|
"""
|
||||||
dummy_preview = preview
|
dummy_preview = preview
|
||||||
dlg = Gtk.MessageDialog(parent,
|
dlg = Gtk.MessageDialog(transient_for=parent,
|
||||||
flags=Gtk.DialogFlags.MODAL,
|
modal=True,
|
||||||
type=Gtk.MessageType.WARNING,
|
message_type=Gtk.MessageType.WARNING,
|
||||||
buttons=Gtk.ButtonsType.CLOSE,
|
buttons=Gtk.ButtonsType.CLOSE,
|
||||||
message_format=_('No preview available'))
|
message_format=_('No preview available'))
|
||||||
self.preview = dlg
|
self.preview = dlg
|
||||||
|
@ -659,9 +659,9 @@ class CairoPrintSave:
|
|||||||
(typically evince not installed)!
|
(typically evince not installed)!
|
||||||
"""
|
"""
|
||||||
dummy_preview = preview
|
dummy_preview = preview
|
||||||
dlg = Gtk.MessageDialog(parent,
|
dlg = Gtk.MessageDialog(transient_for=parent,
|
||||||
flags=Gtk.DialogFlags.MODAL,
|
modal=True,
|
||||||
type=Gtk.MessageType.WARNING,
|
message_type=Gtk.MessageType.WARNING,
|
||||||
buttons=Gtk.ButtonsType.CLOSE,
|
buttons=Gtk.ButtonsType.CLOSE,
|
||||||
message_format=_('No preview available'))
|
message_format=_('No preview available'))
|
||||||
self.preview = dlg
|
self.preview = dlg
|
||||||
|
@ -568,7 +568,6 @@ class GeoClose(GeoGraphyView):
|
|||||||
"""
|
"""
|
||||||
self.newmenu = Gtk.Menu()
|
self.newmenu = Gtk.Menu()
|
||||||
menu = self.newmenu
|
menu = self.newmenu
|
||||||
menu.set_title("person")
|
|
||||||
events = []
|
events = []
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
@ -613,7 +612,6 @@ class GeoClose(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
|
@ -379,7 +379,6 @@ class GeoEvents(GeoGraphyView):
|
|||||||
def bubble_message(self, event, lat, lon, marks):
|
def bubble_message(self, event, lat, lon, marks):
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("events")
|
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
prevmark = None
|
prevmark = None
|
||||||
@ -390,7 +389,6 @@ class GeoEvents(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
@ -424,7 +422,6 @@ class GeoEvents(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
@ -461,7 +458,6 @@ class GeoEvents(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(_("Centering on Place"))
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
|
@ -758,7 +758,6 @@ class GeoFamClose(GeoGraphyView):
|
|||||||
"""
|
"""
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("family")
|
|
||||||
events = []
|
events = []
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
@ -802,7 +801,6 @@ class GeoFamClose(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
|
@ -494,7 +494,6 @@ class GeoFamily(GeoGraphyView):
|
|||||||
"""
|
"""
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("family")
|
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
prevmark = None
|
prevmark = None
|
||||||
|
@ -637,7 +637,6 @@ class GeoMoves(GeoGraphyView):
|
|||||||
"""
|
"""
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("descendance")
|
|
||||||
events = []
|
events = []
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
@ -680,7 +679,6 @@ class GeoMoves(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
|
@ -485,7 +485,6 @@ class GeoPerson(GeoGraphyView):
|
|||||||
def bubble_message(self, event, lat, lon, marks):
|
def bubble_message(self, event, lat, lon, marks):
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("person")
|
|
||||||
message = ""
|
message = ""
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
prevmark = None
|
prevmark = None
|
||||||
@ -496,7 +495,6 @@ class GeoPerson(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
message = ""
|
message = ""
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
@ -517,7 +515,6 @@ class GeoPerson(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
message = ""
|
message = ""
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
@ -559,7 +556,6 @@ class GeoPerson(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||||
|
@ -480,7 +480,6 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
def bubble_message(self, event, lat, lon, marks):
|
def bubble_message(self, event, lat, lon, marks):
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
menu = self.menu
|
menu = self.menu
|
||||||
menu.set_title("places")
|
|
||||||
message = ""
|
message = ""
|
||||||
prevmark = None
|
prevmark = None
|
||||||
for mark in marks:
|
for mark in marks:
|
||||||
@ -490,7 +489,6 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||||
@ -516,7 +514,6 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(message)
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||||
@ -553,7 +550,6 @@ class GeoPlaces(GeoGraphyView):
|
|||||||
menu.append(add_item)
|
menu.append(add_item)
|
||||||
self.itemoption = Gtk.Menu()
|
self.itemoption = Gtk.Menu()
|
||||||
itemoption = self.itemoption
|
itemoption = self.itemoption
|
||||||
itemoption.set_title(_("Centering on Place"))
|
|
||||||
itemoption.show()
|
itemoption.show()
|
||||||
add_item.set_submenu(itemoption)
|
add_item.set_submenu(itemoption)
|
||||||
oldplace = ""
|
oldplace = ""
|
||||||
|
@ -1196,7 +1196,7 @@ class RelationshipView(NavigationView):
|
|||||||
label = widgets.MarkupLabel(format % escape(title),
|
label = widgets.MarkupLabel(format % escape(title),
|
||||||
halign=Gtk.Align.END)
|
halign=Gtk.Align.END)
|
||||||
if self._config.get('preferences.releditbtn'):
|
if self._config.get('preferences.releditbtn'):
|
||||||
label.set_padding(0, 5)
|
label.set_margin_end(5)
|
||||||
|
|
||||||
eventbox = Gtk.EventBox()
|
eventbox = Gtk.EventBox()
|
||||||
if handle is not None:
|
if handle is not None:
|
||||||
@ -1286,7 +1286,7 @@ class RelationshipView(NavigationView):
|
|||||||
lbl = widgets.MarkupLabel(format % escape(title),
|
lbl = widgets.MarkupLabel(format % escape(title),
|
||||||
halign=Gtk.Align.END)
|
halign=Gtk.Align.END)
|
||||||
if self._config.get('preferences.releditbtn'):
|
if self._config.get('preferences.releditbtn'):
|
||||||
lbl.set_padding(0, 5)
|
lbl.set_margin_end(5)
|
||||||
return lbl
|
return lbl
|
||||||
|
|
||||||
def write_child(self, vbox, handle, index, child_should_be_linked):
|
def write_child(self, vbox, handle, index, child_should_be_linked):
|
||||||
@ -1333,6 +1333,7 @@ class RelationshipView(NavigationView):
|
|||||||
link_label = widgets.LinkLabel(name, link_func, handle, emph,
|
link_label = widgets.LinkLabel(name, link_func, handle, emph,
|
||||||
theme=self.theme)
|
theme=self.theme)
|
||||||
link_label.set_padding(3, 0)
|
link_label.set_padding(3, 0)
|
||||||
|
|
||||||
if child_should_be_linked and self._config.get(
|
if child_should_be_linked and self._config.get(
|
||||||
'preferences.releditbtn'):
|
'preferences.releditbtn'):
|
||||||
button = widgets.IconButton(self.edit_button_press, handle)
|
button = widgets.IconButton(self.edit_button_press, handle)
|
||||||
@ -1354,7 +1355,7 @@ class RelationshipView(NavigationView):
|
|||||||
value = self.info_string(handle)
|
value = self.info_string(handle)
|
||||||
if value:
|
if value:
|
||||||
l = widgets.MarkupLabel(value)
|
l = widgets.MarkupLabel(value)
|
||||||
l.set_padding(48, 0)
|
l.set_margin_start(48)
|
||||||
vbox.add(l)
|
vbox.add(l)
|
||||||
|
|
||||||
def write_data(self, box, title, start_col=_SDATA_START,
|
def write_data(self, box, title, start_col=_SDATA_START,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user