Gtk3 conversion fixes for editors
svn: r20225
This commit is contained in:
parent
b7ab76bcf6
commit
5c754506e0
@ -150,7 +150,7 @@ class EditAddress(EditSecondary):
|
||||
|
||||
self._setup_notebook_tabs( notebook)
|
||||
notebook.show_all()
|
||||
self.top.get_object('vbox').pack_start(notebook,True)
|
||||
self.top.get_object('vbox').pack_start(notebook, True, True, 0)
|
||||
|
||||
def build_menu_names(self, obj):
|
||||
return (_('Address'),_('Address Editor'))
|
||||
|
@ -123,7 +123,7 @@ class EditAttribute(EditSecondary):
|
||||
|
||||
self._setup_notebook_tabs( notebook)
|
||||
notebook.show_all()
|
||||
self.top.get_object('vbox').pack_start(notebook,True)
|
||||
self.top.get_object('vbox').pack_start(notebook, True, True, 0)
|
||||
|
||||
def build_menu_names(self, attrib):
|
||||
if not attrib:
|
||||
|
@ -254,7 +254,7 @@ class EditLdsOrd(EditSecondary):
|
||||
|
||||
self._setup_notebook_tabs( notebook)
|
||||
notebook.show_all()
|
||||
self.top.get_object('vbox').pack_start(notebook,True)
|
||||
self.top.get_object('vbox').pack_start(notebook, True, True, 0)
|
||||
|
||||
def select_parents_clicked(self, obj):
|
||||
SelectFamily = SelectorFactory('Family')
|
||||
@ -419,7 +419,7 @@ class EditFamilyLdsOrd(EditSecondary):
|
||||
self.track_ref_for_deletion("note_tab")
|
||||
|
||||
notebook.show_all()
|
||||
self.top.get_object('vbox').pack_start(notebook,True)
|
||||
self.top.get_object('vbox').pack_start(notebook, True, True, 0)
|
||||
|
||||
def build_menu_names(self, attrib):
|
||||
label = _("LDS Ordinance")
|
||||
|
@ -36,6 +36,7 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -124,7 +124,8 @@ class EditName(EditSecondary):
|
||||
hbox_surn.set_size_request(-1,
|
||||
int(config.get('interface.surname-box-height')))
|
||||
hbox_surn.pack_start(SurnameTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj, top_label=None))
|
||||
self.obj, top_label=None),
|
||||
True, True, 0)
|
||||
#recreate start page as GrampsTab
|
||||
notebook.remove_page(0)
|
||||
self.gennam = GeneralNameTab(self.dbstate, self.uistate, self.track,
|
||||
|
@ -156,7 +156,7 @@ class EditPersonRef(EditSecondary):
|
||||
|
||||
self._setup_notebook_tabs(notebook)
|
||||
notebook.show_all()
|
||||
self.top.get_object('vbox').pack_start(notebook, True)
|
||||
self.top.get_object('vbox').pack_start(notebook, True, True, 0)
|
||||
|
||||
def build_menu_names(self, obj):
|
||||
return (_('Person Reference'),_('Person Reference Editor'))
|
||||
|
@ -636,22 +636,22 @@ class StyledTextEditor(Gtk.TextView):
|
||||
current_value = self.textbuffer.get_style_at_cursor(style)
|
||||
|
||||
if style == StyledTextTagType.FONTCOLOR:
|
||||
color_selection = Gtk.ColorSelectionDialog(_("Select font color"))
|
||||
color_dialog = Gtk.ColorSelectionDialog(_("Select font color"))
|
||||
elif style == StyledTextTagType.HIGHLIGHT:
|
||||
color_selection = Gtk.ColorSelectionDialog(_("Select "
|
||||
color_dialog = Gtk.ColorSelectionDialog(_("Select "
|
||||
"background color"))
|
||||
else:
|
||||
_LOG.debug("unknown style: '%d'" % style)
|
||||
return
|
||||
|
||||
color_selection = color_dialog.get_color_selection()
|
||||
if current_value:
|
||||
color_selection.colorsel.set_current_color(
|
||||
hex_to_color(current_value))
|
||||
color_selection.set_current_color(hex_to_color(current_value))
|
||||
|
||||
response = color_selection.run()
|
||||
color = color_selection.colorsel.get_current_color()
|
||||
response = color_dialog.run()
|
||||
color = color_selection.get_current_color()
|
||||
value = color_to_hex(color)
|
||||
color_selection.destroy()
|
||||
color_dialog.destroy()
|
||||
|
||||
if response == Gtk.ResponseType.OK:
|
||||
_LOG.debug("applying style '%d' with value '%s'" %
|
||||
|
Loading…
Reference in New Issue
Block a user