From: Benny M. <ben...@gm...> - 2009-01-27 14:26:47
|
Due to a bug item some changes are being proposed to the edit person dialog. Much to important to just commit and get reaction afterward, I'd like to know if I should continue the changes I tried locally. See bug item http://www.gramps-project.org/bugs/view.php?id=2642 attached picture new_editperson.png : http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug For those not wanting to open the bug item, my comment was: ----- did some changes too I would suggest for 3.1: 1/edit name dialog button after the 'Preferred Name' Title. 2/combobox selection of suffix/prefix 3/combobox selection of patronymic/title What I still would do: *Update the title of the widget as the name types in changes to the name. *Remember last usage of the combobox selection, so if person used patronymic, next editor opens with patronymic preselected. Question: *Add Lock icon to the preferred name also? This is something that is on the name editor only now? I don't like the design of Jerome for the following reasons: * The screen becomes too wide. It should fit on a screen of 800x600 * Family and given name become too short. Spanish people need long entry fields, you want to see what you type Remarks? ---- The new dialog is some pixels smaller than the current one in English. People agree with this approach? Benny |
From: Peter L. <pet...@te...> - 2009-01-27 15:37:29
|
> Due to a bug item some changes are being proposed to the edit person > dialog. Much to important to just commit and get reaction afterward, I'd > like to know if I should continue the changes I tried locally. > > See bug item http://www.gramps-project.org/bugs/view.php?id=2642 > attached picture new_editperson.png : > http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug > > For those not wanting to open the bug item, my comment was: > ----- > did some changes too I would suggest for 3.1: > > 1/edit name dialog button after the 'Preferred Name' Title. > 2/combobox selection of suffix/prefix > 3/combobox selection of patronymic/title > > What I still would do: > *Update the title of the widget as the name types in changes to the name. > *Remember last usage of the combobox selection, so if person used > patronymic, next editor opens with patronymic preselected. > > Question: > *Add Lock icon to the preferred name also? This is something that is on the > name editor only now? > > I don't like the design of Jerome for the following reasons: > * The screen becomes too wide. It should fit on a screen of 800x600 > * Family and given name become too short. Spanish people need long entry > fields, you want to see what you type > > Remarks? > ---- > > The new dialog is some pixels smaller than the current one in English. > People agree with this approach? > > Benny What happens if there are both a prefix and a suffix? Like Magnus Gabriel de la Gardie d. ä. /Peter |
From: Benny M. <ben...@gm...> - 2009-01-27 17:01:49
|
2009/1/27 Peter Landgren <pet...@te...> > > What happens if there are both a prefix and a suffix? > > Like Magnus Gabriel de la Gardie d. ä. > You can enter both, to enter suffix, you click the combobox to have suffix, and the entry field updates. It is a way to save space only, the alternative is just adding a line under there to show suffix and title as real fields, but I believe those are not that common. The window title shows the full name of the person as per the display settings Benny |
From: Peter L. <pet...@te...> - 2009-01-27 17:37:56
|
> 2009/1/27 Peter Landgren <pet...@te...> > > > What happens if there are both a prefix and a suffix? > > > > Like Magnus Gabriel de la Gardie d. ä. > > You can enter both, to enter suffix, you click the combobox to have suffix, > and the entry field updates. > It is a way to save space only, the alternative is just adding a line under > there to show suffix and title as real fields, but I believe those are not > that common. > The window title shows the full name of the person as per the display > settings OK, So it's the same with Patronymic/Title combo box. I agree, those fields are not that common. I think I have used the Title field most of these. You could even save more space by putting all four fields in a combo box and have a label besides it saying "Extra name fields"? /Peter |
From: Benny M. <ben...@gm...> - 2009-01-27 17:44:58
|
2009/1/27 Peter Landgren <pet...@te...> > > 2009/1/27 Peter Landgren <pet...@te...> > > > > > > > What happens if there are both a prefix and a suffix? > > > > > > > > Like Magnus Gabriel de la Gardie d. ä. > > > > > > You can enter both, to enter suffix, you click the combobox to have > suffix, > > > and the entry field updates. > > > It is a way to save space only, the alternative is just adding a line > under > > > there to show suffix and title as real fields, but I believe those are > not > > > that common. > > > The window title shows the full name of the person as per the display > > > settings > > OK, So it's the same with Patronymic/Title combo box. I agree, those fields > are not that common. I think I have used the Title field most of these. You > could even save more space by putting all four fields in a combo box and > have a label besides it saying "Extra name fields"? > you want common things to be quick. Family name, given and type are needed. One could drop callname, but that is needed a lot in many cultures. I like the fact that it is now placed behind given. I believe many people will need access in one quick edit to: given, family or patronymic, type, call. Suffix in English cultures (III, Junior), Prefix in eg Dutch/French (de, van). Title will be rarest :-) Grouping many would not be good hence. The design does allow to add Matromynic and other cultural variants people might want. It is not a common design though, perhaps not HIG ... Benny |
From: Brian M. <br...@gr...> - 2009-01-28 04:04:57
|
Benny, > Due to a bug item some changes are being proposed to the > edit person dialog. > Much to important to just commit and get reaction > afterward, I'd like to > know if I should continue the changes I tried locally. > > See bug item > http://www.gramps-project.org/bugs/view.php?id=2642 > attached picture new_editperson.png : > http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug Your comments make sense to me. I would like to look at the file attached to the bug, but I get "Access Denied" when I try to access it. ~Brian |
From: Benny M. <ben...@gm...> - 2009-01-28 08:00:45
|
Index: Config/_GrampsConfigKeys.py =================================================================== --- Config/_GrampsConfigKeys.py (revision 11747) +++ Config/_GrampsConfigKeys.py (working copy) @@ -82,6 +82,8 @@ NOTE_WIDTH = ('interface', 'note-width', 1) PERSON_HEIGHT = ('interface', 'person-height', 1) PERSON_WIDTH = ('interface', 'person-width', 1) +PREFIX_SUFFIX = ('interface', 'prefix-suffix', 1) +PATRO_TITLE = ('interface', 'patro-title', 1) EVENT_HEIGHT = ('interface', 'event-height', 1) EVENT_WIDTH = ('interface', 'event-width', 1) EVENT_REF_HEIGHT = ('interface', 'event-ref-height', 1) @@ -211,6 +213,8 @@ NOTE_WIDTH : 700, PERSON_HEIGHT : 550, PERSON_WIDTH : 750, + PREFIX_SUFFIX : 0, + PATRO_TITLE : 0, EVENT_HEIGHT : 450, EVENT_WIDTH : 600, EVENT_REF_HEIGHT : 450, Index: Editors/_EditPerson.py =================================================================== --- Editors/_EditPerson.py (revision 11747) +++ Editors/_EditPerson.py (working copy) @@ -76,10 +76,6 @@ (False, True, False), (False, False, True)) -_use_patronymic = set( - ["ru", "RU", "ru_RU", "koi8r", "ru_koi8r", "russian", "Russian"] - ) - class EditPerson(EditPrimary): """ The EditPerson dialog is derived from the EditPrimary class. @@ -88,7 +84,6 @@ """ - use_patronymic = locale.getlocale(locale.LC_TIME)[0] in _use_patronymic QR_CATEGORY = CATEGORY_QR_PERSON def __init__(self, dbstate, uistate, track, person, callback=None): @@ -114,9 +109,13 @@ def get_menu_title(self): if self.obj.get_handle(): name = name_displayer.display(self.obj) - title = _('Person') + ': %s' % name + title = _('Person: %(name)s') % {'name': name} else: - title = _('New Person') + name = name_displayer.display(self.obj) + if name: + title = _('New Person: %(name)s') % {'name': name} + else: + title = _('New Person') return title def _local_init(self): @@ -255,29 +254,24 @@ self.db.readonly, self.db.get_name_types()) - if self.use_patronymic: - self.prefix = widgets.MonitoredEntry( - self.top.get_widget("prefix"), - self.pname.set_patronymic, - self.pname.get_patronymic, - self.db.readonly) - - prefix_label = self.top.get_widget('prefix_label') - prefix_label.set_text(_('Patronymic:')) - prefix_label.set_use_underline(True) - else: - self.prefix = widgets.MonitoredEntry( - self.top.get_widget("prefix"), - self.pname.set_surname_prefix, - self.pname.get_surname_prefix, - self.db.readonly) + self.prefix_suffix = widgets.MonitoredComboSelectedEntry( + self.top.get_widget("prefixcmb"), + self.top.get_widget("prefixentry"), + [_('Prefix'), _('Suffix')], + [self.pname.set_surname_prefix, self.pname.set_suffix], + [self.pname.get_surname_prefix, self.pname.get_suffix], + default = Config.get(Config.PREFIX_SUFFIX), + read_only = self.db.readonly) + + self.patro_title = widgets.MonitoredComboSelectedEntry( + self.top.get_widget("patrocmb"), + self.top.get_widget("patroentry"), + [_('Patronymic'), _('Title')], + [self.pname.set_patronymic, self.pname.set_title], + [self.pname.get_patronymic, self.pname.get_title], + default = Config.get(Config.PATRO_TITLE), + read_only = self.db.readonly) - self.suffix = widgets.MonitoredEntry( - self.top.get_widget("suffix"), - self.pname.set_suffix, - self.pname.get_suffix, - self.db.readonly) - self.call = widgets.MonitoredEntry( self.top.get_widget("call"), self.pname.set_call_name, @@ -290,12 +284,6 @@ self.pname.get_first_name, self.db.readonly) - self.title = widgets.MonitoredEntry( - self.top.get_widget("title"), - self.pname.set_title, - self.pname.get_title, - self.db.readonly) - self.surname_field = widgets.MonitoredEntry( self.top.get_widget("surname"), self.pname.set_surname, @@ -309,6 +297,15 @@ self.obj.get_gramps_id, self.db.readonly) + #make sure title updates automatically + for obj in [self.top.get_widget("surname"), + self.top.get_widget("given_name"), + self.top.get_widget("patroentry"), + self.top.get_widget("call"), + self.top.get_widget("prefixentry"), + ]: + obj.connect('changed', self._changed_title) + def _create_tabbed_pages(self): """ Create the notebook tabs and insert them into the main window. @@ -376,24 +373,27 @@ notebook.show_all() self.top.get_widget('vbox').pack_start(notebook, True) + def _changed_title(self, obj): + """ + callback to changes typed by user to the person name. + Update the window title + """ + self.update_title(self.get_menu_title()) + def name_callback(self): + """ + Callback if changes happen in the name tab. + The Preferred Name is _NOT_ part of the name tab, but name tab allows + reorder and hence setting of new primary name. + """ self.pname = self.obj.get_primary_name() self.ntype_field.reinit(self.pname.set_type, self.pname.get_type) - if self.use_patronymic: - self.prefix.reinit( - self.pname.set_patronymic, - self.pname.get_patronymic) - else: - self.prefix.reinit( - self.pname.set_surname_prefix, - self.pname.get_surname_prefix) + self.prefix_suffix.reinit( + [self.pname.set_surname_prefix, self.pname.set_suffix], + [self.pname.get_surname_prefix, self.pname.get_suffix]) - self.suffix.reinit( - self.pname.set_suffix, - self.pname.get_suffix) - self.call.reinit( self.pname.set_call_name, self.pname.get_call_name) @@ -402,9 +402,9 @@ self.pname.set_first_name, self.pname.get_first_name) - self.title.reinit( - self.pname.set_title, - self.pname.get_title) + self.patro_title.reinit( + [self.pname.set_patronymic, self.pname.set_title], + [self.pname.get_patronymic, self.pname.get_title]) self.surname_field.reinit( self.pname.set_surname, @@ -740,7 +740,7 @@ This allows us to update the main form in response to any changes. """ - for obj in (self.suffix, self.prefix, self.given, self.title, + for obj in (self.prefix_suffix, self.patro_title, self.given, self.ntype_field, self.surname_field, self.call): obj.update() @@ -855,6 +855,8 @@ (width, height) = self.window.get_size() Config.set(Config.PERSON_WIDTH, width) Config.set(Config.PERSON_HEIGHT, height) + Config.set(Config.PREFIX_SUFFIX, self.prefix_suffix.active_key) + Config.set(Config.PATRO_TITLE, self.patro_title.active_key) Config.sync() Index: widgets/monitoredwidgets.py =================================================================== --- widgets/monitoredwidgets.py (revision 11747) +++ widgets/monitoredwidgets.py (working copy) @@ -22,7 +22,8 @@ __all__ = ["MonitoredCheckbox", "MonitoredEntry", "MonitoredSpinButton", "MonitoredText", "MonitoredType", "MonitoredDataType", - "MonitoredMenu", "MonitoredStrMenu", "MonitoredDate"] + "MonitoredMenu", "MonitoredStrMenu", "MonitoredDate", + "MonitoredComboSelectedEntry"] #------------------------------------------------------------------------- # @@ -31,6 +32,7 @@ #------------------------------------------------------------------------- import logging _LOG = logging.getLogger(".widgets.monitoredwidgets") +import locale #------------------------------------------------------------------------- # @@ -479,3 +481,119 @@ field.set_editable(not readonly) button.set_sensitive(not readonly) +#------------------------------------------------------------------------- +# +# MonitoredComboSelectedEntry class +# +#------------------------------------------------------------------------- +class MonitoredComboSelectedEntry: + """ + A MonitoredEntry driven by a Combobox to select what the entry field + works upon + """ + def __init__(self, objcombo, objentry, textlist, set_val_list, + get_val_list, default=0, read_only=False): + """ + Create a MonitoredComboSelectedEntry + Objcombo and objentry should be the gtk widgets to use + textlist is the values that must be used in the combobox + Every value needs an entry in set/get_val_list with the data retrieval + and storage method of the data entered in the entry box + Read_only should be true if no changes may be done + default is the entry in the combobox that must be preselected + """ + self.objcombo = objcombo + self.objentry = objentry + self.set_val_list = set_val_list + self.get_val_list = get_val_list + + #fill the combobox, set on a specific entry + self.mapping = dict([[i,x] for (i,x) in zip(range(len(textlist)), + textlist)]) + + self.active_key = default + self.active_index = 0 + + self.__fill() + self.objcombo.clear() + self.objcombo.set_model(self.store) + cell = gtk.CellRendererText() + self.objcombo.pack_start(cell, True) + self.objcombo.add_attribute(cell, 'text', 1) + self.objcombo.set_active(self.active_index) + self.objcombo.connect('changed', self.on_combochange) + + #fill the entrybox with required data + self.entry_reinit() + self.objentry.connect('changed', self._on_change_entry) + + #set correct editable + self.enable(not read_only) + + def __fill(self): + """ + Fill combo with data + """ + self.store = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING) + keys = self.mapping.keys() + keys.sort(self.__by_value) + index = 0 + for key in keys: + self.store.append(row=[key, self.mapping[key]]) + if key == self.active_key: + self.active_index = index + index = index + 1 + + def __by_value(self, first, second): + """ + Method for sorting keys based on the values. + """ + fvalue = self.mapping[first] + svalue = self.mapping[second] + return locale.strcoll(fvalue, svalue) + + def on_combochange(self, obj): + """ + callback for change on the combo, change active iter, update + associated entrybox + """ + self.active_key = self.store.get_value(self.objcombo.get_active_iter(), + 0) + self.entry_reinit() + + def reinit(self, set_val_list, get_val_list): + """ + The interface is attached to another object, so the methods need to be + reset. + """ + self.set_val_list = set_val_list + self.get_val_list = get_val_list + self.update() + + def entry_reinit(self): + """ + Make the entry field show the value corresponding to the active key + """ + self.objentry.set_text(self.get_val_list[self.active_key]()) + self.set_val = self.set_val_list[self.active_key] + self.get_val = self.get_val_list[self.active_key] + + def _on_change_entry(self, obj): + """ + Callback when the entry field changes + """ + self.set_val_list[self.active_key](self.get_value_entry()) + + def get_value_entry(self): + return unicode(self.objentry.get_text()) + + def enable(self, value): + self.objentry.set_sensitive(value) + self.objentry.set_editable(value) + + def update(self): + """ + Method called when object changed without interface change + Eg: name editor save brings you back to person editor that must update + """ + self.entry_reinit() Index: glade/edit_person.glade =================================================================== --- glade/edit_person.glade (revision 11747) +++ glade/edit_person.glade (working copy) @@ -160,87 +160,6 @@ </child> <child> - <widget class="GtkLabel" id="prefix_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Prefix:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">prefix</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">5</property> - <property name="right_attach">6</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label47"> - <property name="visible">True</property> - <property name="label" translatable="yes">Tit_le:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">title</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="title"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">A title used to refer to the person, such as "Dr." or "Rev."</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">13</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkLabel" id="label436"> <property name="visible">True</property> <property name="label" translatable="yes">_Gender:</property> @@ -253,7 +172,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">gender</property> + <property name="mnemonic_widget">gender</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -272,6 +191,7 @@ <child> <widget class="GtkEntry" id="surname"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">part of a person's name indicating the family to which the person belongs</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> @@ -291,116 +211,6 @@ </child> <child> - <widget class="GtkLabel" id="label23"> - <property name="visible">True</property> - <property name="label" translatable="yes">S_uffix:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">suffix</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label437"> - <property name="visible">True</property> - <property name="label" translatable="yes">_ID:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">gid</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label269"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Type:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">ntype</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">5</property> - <property name="right_attach">6</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="suffix"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">6</property> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="gid"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -411,7 +221,7 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <property name="width_chars">12</property> + <property name="width_chars">7</property> </widget> <packing> <property name="left_attach">4</property> @@ -423,23 +233,6 @@ </child> <child> - <widget class="GtkComboBoxEntry" id="ntype"> - <property name="visible">True</property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">6</property> - <property name="right_attach">7</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkLabel" id="label439"> <property name="visible">True</property> <property name="label" translatable="yes"><b>General</b></property> @@ -468,34 +261,6 @@ </child> <child> - <widget class="GtkLabel" id="label296"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Preferred name</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">7</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkFrame" id="frame5"> <property name="width_request">124</property> <property name="visible">True</property> @@ -569,7 +334,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">marker</property> + <property name="mnemonic_widget">marker</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -598,7 +363,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">call</property> + <property name="mnemonic_widget">call</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -615,24 +380,63 @@ </child> <child> - <widget class="GtkHBox" id="hbox108"> + <widget class="GtkEntry" id="given_name"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">The person's given name</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <signal name="focus_out_event" handler="on_given_focus_out" last_modification_time="Thu, 30 Sep 2004 16:30:21 GMT"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">5</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="call"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Part of the Given name that is the normally used name. </property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">â</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">6</property> + <property name="right_attach">7</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox109"> + <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">2</property> <child> - <widget class="GtkEntry" id="prefix"> + <widget class="GtkComboBoxEntry" id="marker"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">An optional prefix for the family name that is not used in sorting, such as "de" or "van"</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> + <property name="add_tearoffs">False</property> <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <property name="width_chars">10</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="padding">0</property> @@ -642,6 +446,101 @@ </child> <child> + <widget class="GtkToggleButton" id="private"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Indicates if the record is private</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + + <child> + <widget class="GtkImage" id="image2262"> + <property name="visible">True</property> + <property name="icon_size">4</property> + <property name="icon_name">gramps-unlock</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">4</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">6</property> + <property name="right_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox110"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label296"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Preferred name</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label445"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b> - </b> </property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> <widget class="GtkButton" id="button177"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Edit the preferred name</property> @@ -670,6 +569,52 @@ </child> </widget> <packing> + <property name="left_attach">0</property> + <property name="right_attach">4</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label269"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Type:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">ntype</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="ntype"> + <property name="visible">True</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> <property name="left_attach">6</property> <property name="right_attach">7</property> <property name="top_attach">1</property> @@ -680,11 +625,11 @@ </child> <child> - <widget class="GtkEntry" id="given_name"> + <widget class="GtkEntry" id="prefixentry"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">The person's given name</property> + <property name="tooltip" translatable="yes">Prefix: An optional prefix for the family name that is not used in sorting, such as "de" or "van" +Suffix: An optional suffix to the name, such as "Jr." or "III"</property> <property name="can_focus">True</property> - <property name="has_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> @@ -692,68 +637,165 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <signal name="focus_out_event" handler="on_given_focus_out" last_modification_time="Thu, 30 Sep 2004 16:30:21 GMT"/> + <property name="width_chars">6</property> </widget> <packing> <property name="left_attach">2</property> - <property name="right_attach">5</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="call"> + <widget class="GtkHBox" id="hbox111"> <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkComboBox" id="gender"> + <property name="visible">True</property> + <property name="items" translatable="yes">Female +Male +Unknown</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label437"> + <property name="visible">True</property> + <property name="label" translatable="yes">_ID:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">gid</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">4</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="patroentry"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Patronimic: component of a personal name based on the name of one's father, grandfather, .... +Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property> <property name="can_focus">True</property> <property name="editable">True</property> <property name="visibility">True</property> <property name="max_length">0</property> <property name="text" translatable="yes"></property> <property name="has_frame">True</property> - <property name="invisible_char">â</property> + <property name="invisible_char">*</property> <property name="activates_default">False</property> </widget> <packing> - <property name="left_attach">6</property> - <property name="right_attach">7</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkComboBox" id="gender"> + <widget class="GtkHBox" id="hbox112"> <property name="visible">True</property> - <property name="items" translatable="yes">Female -Male -Unknown</property> - <property name="add_tearoffs">False</property> - <property name="focus_on_click">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkComboBox" id="prefixcmb"> + <property name="visible">True</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label446"> + <property name="visible">True</property> + <property name="label" translatable="yes"> :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">prefixentry</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkHBox" id="hbox109"> + <widget class="GtkHBox" id="hbox113"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">2</property> + <property name="spacing">0</property> <child> - <widget class="GtkComboBoxEntry" id="marker"> + <widget class="GtkComboBox" id="patrocmb"> <property name="visible">True</property> + <property name="items" translatable="yes"></property> <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> <property name="focus_on_click">True</property> </widget> <packing> @@ -764,39 +806,36 @@ </child> <child> - <widget class="GtkToggleButton" id="private"> + <widget class="GtkLabel" id="label447"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Indicates if the record is private</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - - <child> - <widget class="GtkImage" id="image2262"> - <property name="visible">True</property> - <property name="icon_size">4</property> - <property name="icon_name">gramps-unlock</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> + <property name="label" translatable="yes"> :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">patroentry</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="padding">4</property> + <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> </widget> <packing> - <property name="left_attach">6</property> - <property name="right_attach">7</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">fill</property> <property name="y_options">fill</property> </packing> Index: ManagedWindow.py =================================================================== --- ManagedWindow.py (revision 11747) +++ ManagedWindow.py (working copy) @@ -379,6 +379,8 @@ """ self.isWindow = isWindow + self.msg = msg + self.titlelabel = title if self.isWindow : set_titles(self, title, text, msg) else : @@ -386,6 +388,12 @@ #closing the gtk.Window must also close ManagedWindow self.window = window self.window.connect('delete-event', self.close) + + def update_title(self, text): + if self.isWindow: + set_titles(self, self.titlelabel, text, self.msg) + else: + set_titles(self.window, self.titlelabel, text, self.msg) def build_menu_names(self, obj): return ('Undefined Menu','Undefined Submenu') |
From: Brian M. <br...@gr...> - 2009-01-28 12:37:44
|
> > Benny, > > > > > Due to a bug item some changes are being proposed > to the > > > edit person dialog. > > > Much to important to just commit and get reaction > > > afterward, I'd like to > > > know if I should continue the changes I tried > locally. > > > > > > See bug item > > > > http://www.gramps-project.org/bugs/view.php?id=2642 > > > attached picture new_editperson.png : > > > > > > http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug > > > > Your comments make sense to me. I would like to look > at the file attached > > to the bug, but I get "Access Denied" when I > try to access it. > > > Let me attach it here then. > Works fine to download for me. Sorry. I can download the patch just fine. It's the image that wasn't working for me. ~Brian |
From: Raphael A. <rap...@gm...> - 2009-01-28 12:43:30
|
same here. cannot open or download the specific image you linked to. On Wed, Jan 28, 2009 at 1:37 PM, Brian Matherly <br...@gr...> wrote: >> > Benny, >> > >> >> >> Let me attach it here then. >> Works fine to download for me. > > Sorry. I can download the patch just fine. It's the image that wasn't working for me. > > ~Brian > |
From: Benny M. <ben...@gm...> - 2009-01-28 13:19:06
|
Nick, any ideas why? Brian, 'Wasn't' , you mean it is ok now? I see the image just fine. I did upload it, then delete it then upload a new version. There is first an image of Jerome, then mine. Perhaps a reload is needed.... Benny 2009/1/28 Brian Matherly <br...@gr...> > > > Benny, > > > > > > > Due to a bug item some changes are being proposed > > to the > > > > edit person dialog. > > > > Much to important to just commit and get reaction > > > > afterward, I'd like to > > > > know if I should continue the changes I tried > > locally. > > > > > > > > See bug item > > > > > > http://www.gramps-project.org/bugs/view.php?id=2642 > > > > attached picture new_editperson.png : > > > > > > > > > > http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug > > > > > > Your comments make sense to me. I would like to look > > at the file attached > > > to the bug, but I get "Access Denied" when I > > try to access it. > > > > > > Let me attach it here then. > > Works fine to download for me. > > Sorry. I can download the patch just fine. It's the image that wasn't > working for me. > > ~Brian > |
From: Brian M. <br...@gr...> - 2009-01-28 14:28:43
|
I can see it now. Looks good. ~Brian --- On Wed, 1/28/09, Benny Malengier <ben...@gm...> wrote: > From: Benny Malengier <ben...@gm...> > Subject: Re: [Gramps-devel] changes to edit person dialog for 3.1 ? > To: br...@gr..., "Nick Wallingford" <ni...@be...> > Cc: "Gramps developers" <gra...@li...> > Date: Wednesday, January 28, 2009, 7:18 AM > Nick, any ideas why? > Brian, 'Wasn't' , you mean it is ok now? > I see the image just fine. I did upload it, then delete it > then upload a new > version. > There is first an image of Jerome, then mine. Perhaps a > reload is needed.... > > Benny > > 2009/1/28 Brian Matherly <br...@gr...> > > > > > Benny, > > > > > > > > > Due to a bug item some changes are > being proposed > > > to the > > > > > edit person dialog. > > > > > Much to important to just commit and > get reaction > > > > > afterward, I'd like to > > > > > know if I should continue the changes I > tried > > > locally. > > > > > > > > > > See bug item > > > > > > > > > http://www.gramps-project.org/bugs/view.php?id=2642 > > > > > attached picture new_editperson.png : > > > > > > > > > > > > > > > http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug > > > > > > > > Your comments make sense to me. I would like > to look > > > at the file attached > > > > to the bug, but I get "Access > Denied" when I > > > try to access it. > > > > > > > > > Let me attach it here then. > > > Works fine to download for me. > > > > Sorry. I can download the patch just fine. It's > the image that wasn't > > working for me. > > > > ~Brian > > |
From: Benny M. <ben...@gm...> - 2009-01-28 13:26:42
|
I would suggest I commit this this evening, we can always change the interface and add two fields somehow before release if not ok. My changes reduce the editor with some pixes, but the default is still larger than 600 wide with no possibility to reduce. It would be nice to do further changes to reduce the size of this dialog. Benny 2009/1/28 Benny Malengier <ben...@gm...> > Nick, any ideas why? > Brian, 'Wasn't' , you mean it is ok now? > I see the image just fine. I did upload it, then delete it then upload a > new version. > There is first an image of Jerome, then mine. Perhaps a reload is > needed.... > > Benny > > 2009/1/28 Brian Matherly <br...@gr...> > >> > > Benny, >> >> > > >> > > > Due to a bug item some changes are being proposed >> > to the >> > > > edit person dialog. >> > > > Much to important to just commit and get reaction >> > > > afterward, I'd like to >> > > > know if I should continue the changes I tried >> > locally. >> > > > >> > > > See bug item >> > > > >> > http://www.gramps-project.org/bugs/view.php?id=2642 >> > > > attached picture new_editperson.png : >> > > > >> > > >> > >> http://www.gramps-project.org/bugs/file_download.php?file_id=1359&type=bug >> > > >> > > Your comments make sense to me. I would like to look >> > at the file attached >> > > to the bug, but I get "Access Denied" when I >> > try to access it. >> > >> > >> > Let me attach it here then. >> > Works fine to download for me. >> >> Sorry. I can download the patch just fine. It's the image that wasn't >> working for me. >> >> ~Brian >> > > |
From: Stéphane C. <ste...@gm...> - 2009-01-28 17:08:51
|
On Wed, Jan 28, 2009 at 05:26, Benny Malengier <ben...@gm...> wrote: > My changes reduce the editor with some pixes, but the default is still > larger than 600 wide with no possibility to reduce. > > It would be nice to do further changes to reduce the size of this dialog. Maybe have an "advanced" button? Or a "grow" arrow? So the firstname/lastname type fields are always there on a dialog window much smaller than 600 pixels wide. Stéphane |