Mult surname interface changes:
* buttons on line of label * configurable height surname table svn: r16435
This commit is contained in:
parent
ef9254e0f9
commit
a877138bcb
@ -250,6 +250,7 @@ register('interface.url-height', 150)
|
|||||||
register('interface.url-width', 600)
|
register('interface.url-width', 600)
|
||||||
register('interface.view', True)
|
register('interface.view', True)
|
||||||
register('interface.width', 775)
|
register('interface.width', 775)
|
||||||
|
register('interface.surname-box-height', 150)
|
||||||
|
|
||||||
register('paths.recent-export-dir', '')
|
register('paths.recent-export-dir', '')
|
||||||
register('paths.recent-file', '')
|
register('paths.recent-file', '')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 2.12 -->
|
<!-- interface-requires gtk+ 2.12 -->
|
||||||
<!-- interface-requires grampswidgets 0.0 -->
|
<!-- interface-requires grampswidgets 0.0 -->
|
||||||
@ -30,6 +30,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
<property name="padding">8</property>
|
<property name="padding">8</property>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
@ -40,6 +41,7 @@
|
|||||||
<property name="tooltip_text" translatable="yes">An identification of what type of Name this is, eg. Birth Name, Married Name.</property>
|
<property name="tooltip_text" translatable="yes">An identification of what type of Name this is, eg. Birth Name, Married Name.</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -70,6 +72,8 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
<property name="pack_type">end</property>
|
<property name="pack_type">end</property>
|
||||||
<property name="position">6</property>
|
<property name="position">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
@ -164,7 +168,7 @@
|
|||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="has_default">True</property>
|
<property name="has_default">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">The person's given names</property>
|
<property name="tooltip_text" translatable="yes">The person's given names</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
@ -194,7 +198,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name.</property>
|
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">5</property>
|
<property name="left_attach">5</property>
|
||||||
@ -206,7 +210,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
<property name="tooltip_text" translatable="yes">A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
@ -220,7 +224,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property>
|
<property name="tooltip_text" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="left_attach">3</property>
|
||||||
@ -234,7 +238,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A descriptive name given in place of or in addition to the official given name.</property>
|
<property name="tooltip_text" translatable="yes">A descriptive name given in place of or in addition to the official given name.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">5</property>
|
<property name="left_attach">5</property>
|
||||||
@ -311,7 +315,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A non official name given to a family to distinguish them of people with the same family name. Often referred to as eg. Farm name.</property>
|
<property name="tooltip_text" translatable="yes">A non official name given to a family to distinguish them of people with the same family name. Often referred to as eg. Farm name.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
<property name="width_chars">25</property>
|
<property name="width_chars">25</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@ -509,7 +513,7 @@ Here you can make sure this person is sorted according to a custom name format (
|
|||||||
<property name="tooltip_text" translatable="yes">The Person Tree view groups people under the primary surname. You can override this by setting here a group value.
|
<property name="tooltip_text" translatable="yes">The Person Tree view groups people under the primary surname. You can override this by setting here a group value.
|
||||||
You will be asked if you want to group this person only, or all people with this specific primary surname.</property>
|
You will be asked if you want to group this person only, or all people with this specific primary surname.</property>
|
||||||
<property name="editable">False</property>
|
<property name="editable">False</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
@ -543,7 +547,7 @@ You will be asked if you want to group this person only, or all people with this
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A Date associated with this name. Eg. for a Married Name, date the name is first used or marriage date.</property>
|
<property name="tooltip_text" translatable="yes">A Date associated with this name. Eg. for a Married Name, date the name is first used or marriage date.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 2.12 -->
|
<!-- interface-requires gtk+ 2.12 -->
|
||||||
<!-- interface-requires grampswidgets 0.0 -->
|
<!-- interface-requires grampswidgets 0.0 -->
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkTable" id="table3">
|
<object class="GtkTable" id="table3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">9</property>
|
<property name="n_rows">8</property>
|
||||||
<property name="n_columns">9</property>
|
<property name="n_columns">9</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label21">
|
<object class="GtkLabel" id="label21">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="has_default">True</property>
|
<property name="has_default">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">The person's given names</property>
|
<property name="tooltip_text" translatable="yes">The person's given names</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
<signal name="focus_out_event" handler="on_given_focus_out"/>
|
<signal name="focus_out_event" handler="on_given_focus_out"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name.</property>
|
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">7</property>
|
<property name="left_attach">7</property>
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
<property name="tooltip_text" translatable="yes">A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property>
|
<property name="tooltip_text" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">7</property>
|
<property name="left_attach">7</property>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A descriptive name given in place of or in addition to the official given name.</property>
|
<property name="tooltip_text" translatable="yes">A descriptive name given in place of or in addition to the official given name.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">4</property>
|
<property name="left_attach">4</property>
|
||||||
@ -262,7 +262,6 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkHBox" id="hboxmultsurnames">
|
<object class="GtkHBox" id="hboxmultsurnames">
|
||||||
<property name="height_request">150</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Click on a table cell to edit.</property>
|
<property name="tooltip_text" translatable="yes">Click on a table cell to edit.</property>
|
||||||
<child>
|
<child>
|
||||||
@ -274,10 +273,10 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="right_attach">9</property>
|
<property name="right_attach">9</property>
|
||||||
<property name="top_attach">6</property>
|
<property name="top_attach">5</property>
|
||||||
<property name="bottom_attach">7</property>
|
<property name="bottom_attach">6</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="x_padding">6</property>
|
<property name="x_padding">3</property>
|
||||||
<property name="y_padding">3</property>
|
<property name="y_padding">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -287,7 +286,7 @@
|
|||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Use Multiple Surnames
|
<property name="tooltip_text" translatable="yes">Use Multiple Surnames
|
||||||
Indicate that the surname consists of different parts. Every surname has its own prefix and a possible connector to the next surname. Eg., the surname Ramón y Cajal can be stored as Ramón, which is inherited from the father, the connector y, and Cajal, which is inherited from the mother.</property>
|
Indicate that the surname consists of different parts. Every surname has its own prefix and a possible connector to the next surname. Eg., the surname Ramón y Cajal can be stored as Ramón, which is inherited from the father, the connector y, and Cajal, which is inherited from the mother.</property>
|
||||||
<property name="image">image2</property>
|
<property name="image">image2</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
</object>
|
</object>
|
||||||
@ -300,23 +299,6 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="surnlabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="ypad">3</property>
|
|
||||||
<property name="label" translatable="yes"><b>Multiple Surnames</b></property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="right_attach">3</property>
|
|
||||||
<property name="top_attach">5</property>
|
|
||||||
<property name="bottom_attach">6</property>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
<property name="y_options">GTK_SHRINK</property>
|
|
||||||
<property name="y_padding">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkHBox" id="hbox1">
|
<object class="GtkHBox" id="hbox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -352,8 +334,8 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="right_attach">9</property>
|
<property name="right_attach">9</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">6</property>
|
||||||
<property name="bottom_attach">8</property>
|
<property name="bottom_attach">7</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
<property name="y_padding">3</property>
|
<property name="y_padding">3</property>
|
||||||
@ -408,7 +390,7 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">An optional prefix for the family that is not used in sorting, such as "de" or "van".</property>
|
<property name="tooltip_text" translatable="yes">An optional prefix for the family that is not used in sorting, such as "de" or "van".</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -421,7 +403,7 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Part of a person's name indicating the family to which the person belongs</property>
|
<property name="tooltip_text" translatable="yes">Part of a person's name indicating the family to which the person belongs</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
@ -562,7 +544,7 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">A unique ID for the person.</property>
|
<property name="tooltip_text" translatable="yes">A unique ID for the person.</property>
|
||||||
<property name="invisible_char">●</property>
|
<property name="invisible_char">●</property>
|
||||||
<property name="width_chars">6</property>
|
<property name="width_chars">6</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@ -607,8 +589,8 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="right_attach">9</property>
|
<property name="right_attach">9</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="top_attach">7</property>
|
||||||
<property name="bottom_attach">9</property>
|
<property name="bottom_attach">8</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -624,24 +606,6 @@ Indicate that the surname consists of different parts. Every surname has its own
|
|||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">2</property>
|
<property name="padding">2</property>
|
||||||
|
@ -317,7 +317,7 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
|
|||||||
table.attach(entry, 1, 2, index, index+1, yoptions=0)
|
table.attach(entry, 1, 2, index, index+1, yoptions=0)
|
||||||
|
|
||||||
def add_pos_int_entry(self, table, label, index, constant, callback=None,
|
def add_pos_int_entry(self, table, label, index, constant, callback=None,
|
||||||
config=None):
|
config=None, col_attach=1):
|
||||||
""" entry field for positive integers
|
""" entry field for positive integers
|
||||||
"""
|
"""
|
||||||
if not config:
|
if not config:
|
||||||
@ -327,9 +327,10 @@ class ConfigureDialog(ManagedWindow.ManagedWindow):
|
|||||||
entry.set_text(str(config.get(constant)))
|
entry.set_text(str(config.get(constant)))
|
||||||
if callback:
|
if callback:
|
||||||
entry.connect('changed', callback, constant)
|
entry.connect('changed', callback, constant)
|
||||||
table.attach(lwidget, 1, 2, index, index+1, yoptions=0,
|
table.attach(lwidget, col_attach, col_attach+1, index, index+1,
|
||||||
xoptions=gtk.FILL)
|
yoptions=0, xoptions=gtk.FILL)
|
||||||
table.attach(entry, 2, 3, index, index+1, yoptions=0)
|
table.attach(entry, col_attach+1, col_attach+2, index, index+1,
|
||||||
|
yoptions=0)
|
||||||
|
|
||||||
def add_color(self, table, label, index, constant, config=None):
|
def add_color(self, table, label, index, constant, config=None):
|
||||||
if not config:
|
if not config:
|
||||||
@ -404,7 +405,7 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
def __init__(self, uistate, dbstate):
|
def __init__(self, uistate, dbstate):
|
||||||
page_funcs = (
|
page_funcs = (
|
||||||
self.add_behavior_panel,
|
self.add_behavior_panel,
|
||||||
self.add_database_panel,
|
self.add_famtree_panel,
|
||||||
self.add_formats_panel,
|
self.add_formats_panel,
|
||||||
self.add_text_panel,
|
self.add_text_panel,
|
||||||
self.add_prefix_panel,
|
self.add_prefix_panel,
|
||||||
@ -604,7 +605,7 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
def __change_name(self, text, path, new_text):
|
def __change_name(self, text, path, new_text):
|
||||||
"""
|
"""
|
||||||
If the new string is empty, do nothing. Otherwise, renaming the
|
If the new string is empty, do nothing. Otherwise, renaming the
|
||||||
database is simply changing the contents of the name file.
|
family tree is simply changing the contents of the name file.
|
||||||
"""
|
"""
|
||||||
if len(new_text) > 0 and text != new_text:
|
if len(new_text) > 0 and text != new_text:
|
||||||
# build a pattern from translated pattern:
|
# build a pattern from translated pattern:
|
||||||
@ -865,6 +866,13 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
table.attach(lwidget, 0, 1, row, row+1, yoptions=0)
|
table.attach(lwidget, 0, 1, row, row+1, yoptions=0)
|
||||||
table.attach(obox, 1, 3, row, row+1, yoptions=0)
|
table.attach(obox, 1, 3, row, row+1, yoptions=0)
|
||||||
row += 1
|
row += 1
|
||||||
|
|
||||||
|
#height multiple surname table
|
||||||
|
self.add_pos_int_entry(table,
|
||||||
|
_('Height multiple surname box (pixels)'),
|
||||||
|
row, 'interface.surname-box-height', self.update_surn_height,
|
||||||
|
col_attach=0)
|
||||||
|
row += 1
|
||||||
|
|
||||||
# Status bar:
|
# Status bar:
|
||||||
obox = gtk.combo_box_new_text()
|
obox = gtk.combo_box_new_text()
|
||||||
@ -1054,20 +1062,20 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
|
|
||||||
return _('General'), table
|
return _('General'), table
|
||||||
|
|
||||||
def add_database_panel(self, configdialog):
|
def add_famtree_panel(self, configdialog):
|
||||||
table = gtk.Table(2, 2)
|
table = gtk.Table(2, 2)
|
||||||
table.set_border_width(12)
|
table.set_border_width(12)
|
||||||
table.set_col_spacings(6)
|
table.set_col_spacings(6)
|
||||||
table.set_row_spacings(6)
|
table.set_row_spacings(6)
|
||||||
|
|
||||||
self.add_entry(table,
|
self.add_entry(table,
|
||||||
_('Database path'),
|
_('Family Tree Database path'),
|
||||||
0, 'behavior.database-path')
|
0, 'behavior.database-path')
|
||||||
self.add_checkbox(table,
|
self.add_checkbox(table,
|
||||||
_('Automatically load last database'),
|
_('Automatically load last family tree'),
|
||||||
1, 'behavior.autoload')
|
1, 'behavior.autoload')
|
||||||
|
|
||||||
return _('Database'), table
|
return _('Family Tree'), table
|
||||||
|
|
||||||
def set_mediapath(self, *obj):
|
def set_mediapath(self, *obj):
|
||||||
if self.path_entry.get_text().strip():
|
if self.path_entry.get_text().strip():
|
||||||
@ -1126,6 +1134,23 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
else:
|
else:
|
||||||
obj.set_text(str(intval))
|
obj.set_text(str(intval))
|
||||||
|
|
||||||
|
def update_surn_height(self, obj, constant):
|
||||||
|
ok = True
|
||||||
|
if not obj.get_text():
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
intval = int(obj.get_text())
|
||||||
|
except:
|
||||||
|
intval = config.get(constant)
|
||||||
|
ok = False
|
||||||
|
if intval < 0 :
|
||||||
|
intval = config.get(constant)
|
||||||
|
ok = False
|
||||||
|
if ok:
|
||||||
|
config.set(constant, intval)
|
||||||
|
else:
|
||||||
|
obj.set_text(str(intval))
|
||||||
|
|
||||||
def build_menu_names(self, obj):
|
def build_menu_names(self, obj):
|
||||||
return (_('Preferences'), None)
|
return (_('Preferences'), None)
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class ButtonTab(GrampsTab):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, track, name, share_button=False,
|
def __init__(self, dbstate, uistate, track, name, share_button=False,
|
||||||
move_buttons=False, jump_button=False):
|
move_buttons=False, jump_button=False, top_label=None):
|
||||||
"""
|
"""
|
||||||
Similar to the base class, except after Build.
|
Similar to the base class, except after Build.
|
||||||
|
|
||||||
@ -96,19 +96,30 @@ class ButtonTab(GrampsTab):
|
|||||||
@type name: bool
|
@type name: bool
|
||||||
@param move_buttons: Add up and down button to the Notebook tab or not
|
@param move_buttons: Add up and down button to the Notebook tab or not
|
||||||
@type name: bool
|
@type name: bool
|
||||||
|
@param jump_button: Add a goto button
|
||||||
|
@type name: bool
|
||||||
|
@param top_label: Add a label in front of the buttons if given
|
||||||
|
@type top_label: string or None for no label
|
||||||
"""
|
"""
|
||||||
self.dirty_selection = False
|
self.dirty_selection = False
|
||||||
GrampsTab.__init__(self,dbstate, uistate, track, name)
|
GrampsTab.__init__(self,dbstate, uistate, track, name)
|
||||||
self.create_buttons(share_button, move_buttons, jump_button)
|
self.__create_buttons(share_button, move_buttons, jump_button, top_label)
|
||||||
|
|
||||||
def create_buttons(self, share_button, move_buttons, jump_button):
|
def __create_buttons(self, share_button, move_buttons, jump_button,
|
||||||
|
top_label):
|
||||||
"""
|
"""
|
||||||
Create a button box consisting of three buttons, one for Add,
|
Create a button box consisting of three buttons, one for Add,
|
||||||
one for Edit, and one for Delete.
|
one for Edit, and one for Delete.
|
||||||
|
|
||||||
Add buttons for Share, Move and Jump depending on parameters. This
|
Add buttons for Share, Move and Jump depending on parameters. This
|
||||||
button box is then appended hbox (self).
|
button box is then appended hbox (self).
|
||||||
|
Prepend a label if top_label given
|
||||||
"""
|
"""
|
||||||
|
if top_label:
|
||||||
|
self.top_label = gtk.Label(top_label)
|
||||||
|
self.top_label.set_use_markup(True)
|
||||||
|
self.track_ref_for_deletion("top_label")
|
||||||
|
|
||||||
self.add_btn = SimpleButton(gtk.STOCK_ADD, self.add_button_clicked)
|
self.add_btn = SimpleButton(gtk.STOCK_ADD, self.add_button_clicked)
|
||||||
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
|
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
|
||||||
self.del_btn = SimpleButton(gtk.STOCK_REMOVE, self.del_button_clicked)
|
self.del_btn = SimpleButton(gtk.STOCK_REMOVE, self.del_button_clicked)
|
||||||
@ -148,6 +159,8 @@ class ButtonTab(GrampsTab):
|
|||||||
|
|
||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
hbox.set_spacing(6)
|
hbox.set_spacing(6)
|
||||||
|
if top_label:
|
||||||
|
hbox.pack_start(self.top_label, False)
|
||||||
hbox.pack_start(self.add_btn, False)
|
hbox.pack_start(self.add_btn, False)
|
||||||
if share_button:
|
if share_button:
|
||||||
hbox.pack_start(self.share_btn, False)
|
hbox.pack_start(self.share_btn, False)
|
||||||
|
@ -61,12 +61,13 @@ class EmbeddedList(ButtonTab):
|
|||||||
_DND_EXTRA = None
|
_DND_EXTRA = None
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, track, name, build_model,
|
def __init__(self, dbstate, uistate, track, name, build_model,
|
||||||
share_button=False, move_buttons=False, jump_button=False):
|
share_button=False, move_buttons=False, jump_button=False,
|
||||||
|
top_label=None):
|
||||||
"""
|
"""
|
||||||
Create a new list, using the passed build_model to populate the list.
|
Create a new list, using the passed build_model to populate the list.
|
||||||
"""
|
"""
|
||||||
ButtonTab.__init__(self, dbstate, uistate, track, name, share_button,
|
ButtonTab.__init__(self, dbstate, uistate, track, name, share_button,
|
||||||
move_buttons, jump_button)
|
move_buttons, jump_button, top_label)
|
||||||
|
|
||||||
self.changed = False
|
self.changed = False
|
||||||
self.model = None
|
self.model = None
|
||||||
|
@ -79,7 +79,8 @@ class SurnameTab(EmbeddedList):
|
|||||||
_column_combo = (_('Origin'), -1, 150, 3) # name, sort, width, modelcol
|
_column_combo = (_('Origin'), -1, 150, 3) # name, sort, width, modelcol
|
||||||
_column_toggle = (_('Primary'), -1, 80, 4)
|
_column_toggle = (_('Primary'), -1, 80, 4)
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, track, name, on_change=None):
|
def __init__(self, dbstate, uistate, track, name, on_change=None,
|
||||||
|
top_label=_('<b>Multiple Surnames</b>')):
|
||||||
self.obj = name
|
self.obj = name
|
||||||
self.on_change = on_change
|
self.on_change = on_change
|
||||||
self.curr_col = -1
|
self.curr_col = -1
|
||||||
@ -87,7 +88,8 @@ class SurnameTab(EmbeddedList):
|
|||||||
self.curr_celle = None
|
self.curr_celle = None
|
||||||
|
|
||||||
EmbeddedList.__init__(self, dbstate, uistate, track, _('Family Surnames'),
|
EmbeddedList.__init__(self, dbstate, uistate, track, _('Family Surnames'),
|
||||||
SurnameModel, move_buttons=True)
|
SurnameModel, move_buttons=True,
|
||||||
|
top_label=top_label)
|
||||||
|
|
||||||
def build_columns(self):
|
def build_columns(self):
|
||||||
#first the standard text columns with normal method
|
#first the standard text columns with normal method
|
||||||
|
@ -44,6 +44,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import config
|
||||||
from gen.display.name import displayer as name_displayer
|
from gen.display.name import displayer as name_displayer
|
||||||
from editsecondary import EditSecondary
|
from editsecondary import EditSecondary
|
||||||
from gen.lib import NoteType
|
from gen.lib import NoteType
|
||||||
@ -119,8 +120,10 @@ class EditName(EditSecondary):
|
|||||||
tblgnam = self.top.get_object('table23')
|
tblgnam = self.top.get_object('table23')
|
||||||
notebook = self.top.get_object('notebook')
|
notebook = self.top.get_object('notebook')
|
||||||
hbox_surn = self.top.get_object('hboxmultsurnames')
|
hbox_surn = self.top.get_object('hboxmultsurnames')
|
||||||
|
hbox_surn.set_size_request(-1,
|
||||||
|
int(config.get('interface.surname-box-height')))
|
||||||
hbox_surn.pack_start(SurnameTab(self.dbstate, self.uistate, self.track,
|
hbox_surn.pack_start(SurnameTab(self.dbstate, self.uistate, self.track,
|
||||||
self.obj))
|
self.obj, top_label=None))
|
||||||
#recreate start page as GrampsTab
|
#recreate start page as GrampsTab
|
||||||
notebook.remove_page(0)
|
notebook.remove_page(0)
|
||||||
self.gennam = GeneralNameTab(self.dbstate, self.uistate, self.track,
|
self.gennam = GeneralNameTab(self.dbstate, self.uistate, self.track,
|
||||||
|
@ -95,7 +95,6 @@ class SingSurn(object):
|
|||||||
self.top.get_object('originlabel').hide()
|
self.top.get_object('originlabel').hide()
|
||||||
self.top.get_object('cmborigin').hide()
|
self.top.get_object('cmborigin').hide()
|
||||||
self.top.get_object('multsurnamebtn').hide()
|
self.top.get_object('multsurnamebtn').hide()
|
||||||
self.top.get_object('surnlabel').show()
|
|
||||||
|
|
||||||
def show_all(self):
|
def show_all(self):
|
||||||
#self.top.get_object('prefixlabel').show()
|
#self.top.get_object('prefixlabel').show()
|
||||||
@ -106,7 +105,6 @@ class SingSurn(object):
|
|||||||
self.top.get_object('originlabel').show()
|
self.top.get_object('originlabel').show()
|
||||||
self.top.get_object('cmborigin').show()
|
self.top.get_object('cmborigin').show()
|
||||||
self.top.get_object('multsurnamebtn').show()
|
self.top.get_object('multsurnamebtn').show()
|
||||||
self.top.get_object('surnlabel').hide()
|
|
||||||
|
|
||||||
class EditPerson(EditPrimary):
|
class EditPerson(EditPrimary):
|
||||||
"""
|
"""
|
||||||
@ -190,6 +188,8 @@ class EditPerson(EditPrimary):
|
|||||||
self.eventbox = self.top.get_object("eventbox1")
|
self.eventbox = self.top.get_object("eventbox1")
|
||||||
self.singsurnfr = SingSurn(self.top)
|
self.singsurnfr = SingSurn(self.top)
|
||||||
self.multsurnfr = self.top.get_object("hboxmultsurnames")
|
self.multsurnfr = self.top.get_object("hboxmultsurnames")
|
||||||
|
self.multsurnfr.set_size_request(-1,
|
||||||
|
int(config.get('interface.surname-box-height')))
|
||||||
self.singlesurn_active = True
|
self.singlesurn_active = True
|
||||||
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(),
|
||||||
|
Loading…
Reference in New Issue
Block a user