* src/edit_person.glade: Add notes format radiobuttons.
* src/EditPerson.py: Support format for the person's notes. * src/RelLib.py: More support for the notes' format. svn: r2496
This commit is contained in:
parent
03864283a6
commit
4c42ecc199
@ -1,3 +1,8 @@
|
||||
2003-12-10 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/edit_person.glade: Add notes format radiobuttons.
|
||||
* src/EditPerson.py: Support format for the person's notes.
|
||||
* src/RelLib.py: More support for the notes' format.
|
||||
|
||||
2003-12-10 Tim Waugh <twaugh@redhat.com>
|
||||
* doc/omf.make: Fixed DESTDIR support.
|
||||
|
||||
|
@ -119,6 +119,8 @@ class EditPerson:
|
||||
self.addr_edit_btn = self.top.get_widget('addr_edit_btn')
|
||||
|
||||
self.notes_field = self.get_widget("personNotes")
|
||||
self.flowed = self.get_widget("flowed")
|
||||
self.preform = self.get_widget("preform")
|
||||
self.event_name_field = self.get_widget("eventName")
|
||||
self.event_place_field = self.get_widget("eventPlace")
|
||||
self.event_cause_field = self.get_widget("eventCause")
|
||||
@ -298,8 +300,12 @@ class EditPerson:
|
||||
|
||||
# set notes data
|
||||
self.notes_buffer = self.notes_field.get_buffer()
|
||||
self.notes_buffer.set_text(person.getNote())
|
||||
if person.getNote():
|
||||
self.notes_buffer.set_text(person.getNote())
|
||||
if person.getNoteObj().getFormat() == 1:
|
||||
self.preform.set_active(1)
|
||||
else:
|
||||
self.flowed.set_active(1)
|
||||
Utils.bold_label(self.notes_label)
|
||||
|
||||
self.event_list.drag_dest_set(gtk.DEST_DEFAULT_ALL,pycode_tgts,ACTION_COPY)
|
||||
@ -1016,6 +1022,8 @@ class EditPerson:
|
||||
unknown = self.is_unknown.get_active()
|
||||
text = self.notes_buffer.get_text(self.notes_buffer.get_start_iter(),
|
||||
self.notes_buffer.get_end_iter(),gtk.FALSE)
|
||||
flowed = self.flowed.get_active()
|
||||
preform = self.preform.get_active()
|
||||
idval = self.gid.get_text()
|
||||
|
||||
changed = 0
|
||||
@ -1076,6 +1084,10 @@ class EditPerson:
|
||||
changed = 1
|
||||
if text != self.person.getNote() or self.lists_changed:
|
||||
changed = 1
|
||||
if flowed and self.person.getNoteFormat() != 0:
|
||||
changed = 1
|
||||
elif preform and self.person.getNoteFormat() != 1 :
|
||||
changed = 1
|
||||
|
||||
if self.lds_not_loaded == 0:
|
||||
if not self.lds_baptism.are_equal(self.person.getLdsBaptism()):
|
||||
@ -1496,6 +1508,13 @@ class EditPerson:
|
||||
self.person.setNote(text)
|
||||
Utils.modified()
|
||||
|
||||
flowed = self.flowed.get_active()
|
||||
preform = self.preform.get_active()
|
||||
if flowed and self.person.getNoteFormat() != 0:
|
||||
self.person.setNoteFormat(0)
|
||||
elif preform and self.person.getNoteFormat() != 1 :
|
||||
self.person.setNoteFormat(1)
|
||||
|
||||
if self.complete.get_active() != self.person.getComplete():
|
||||
self.person.setComplete(self.complete.get_active())
|
||||
Utils.modified()
|
||||
|
@ -108,6 +108,18 @@ class SourceNote:
|
||||
else:
|
||||
return self.note.get()
|
||||
|
||||
def setNoteFormat(self,val):
|
||||
"""Set the note's format to the given value"""
|
||||
if self.note:
|
||||
self.note.setFormat(val)
|
||||
|
||||
def getNoteFormat(self):
|
||||
"""Return the current note's format"""
|
||||
if self.note == None:
|
||||
return 0
|
||||
else:
|
||||
return self.note.getFormat()
|
||||
|
||||
def setNoteObj(self,obj):
|
||||
"""Change the note object instance to obj"""
|
||||
self.note = obj
|
||||
@ -681,6 +693,18 @@ class ObjectRef:
|
||||
else:
|
||||
return self.note.get()
|
||||
|
||||
def setNoteFormat(self,val):
|
||||
"""Set the note's format to the given value"""
|
||||
if self.note:
|
||||
self.note.setFormat(val)
|
||||
|
||||
def getNoteFormat(self):
|
||||
"""Return the current note's format"""
|
||||
if self.note == None:
|
||||
return 0
|
||||
else:
|
||||
return self.note.getFormat()
|
||||
|
||||
def setNoteObj(self,obj):
|
||||
"""Change the note object instance to obj"""
|
||||
self.note = obj
|
||||
@ -1912,6 +1936,14 @@ class Source:
|
||||
"""returns the text of the note attached to the Source"""
|
||||
return self.note.get()
|
||||
|
||||
def setNoteFormat(self,val):
|
||||
"""Set the note's format to the given value"""
|
||||
self.note.setFormat(val)
|
||||
|
||||
def getNoteFormat(self):
|
||||
"""Return the current note's format"""
|
||||
return self.note.getFormat()
|
||||
|
||||
def setNoteObj(self,obj):
|
||||
"""sets the Note instance attached to the Source"""
|
||||
self.note = obj
|
||||
|
@ -3502,31 +3502,129 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow5">
|
||||
<property name="border_width">6</property>
|
||||
<widget class="GtkVBox" id="vbox42">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTextView" id="personNotes">
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow5">
|
||||
<property name="border_width">6</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Enter miscellaneous relevant data and documentation</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
||||
<property name="cursor_visible">True</property>
|
||||
<property name="pixels_above_lines">12</property>
|
||||
<property name="pixels_below_lines">12</property>
|
||||
<property name="pixels_inside_wrap">12</property>
|
||||
<property name="left_margin">12</property>
|
||||
<property name="right_margin">12</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTextView" id="personNotes">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Enter miscellaneous relevant data and documentation</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
||||
<property name="cursor_visible">True</property>
|
||||
<property name="pixels_above_lines">12</property>
|
||||
<property name="pixels_below_lines">12</property>
|
||||
<property name="pixels_inside_wrap">12</property>
|
||||
<property name="left_margin">12</property>
|
||||
<property name="right_margin">12</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table30">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">1</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">24</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="flowed">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Flo_wed</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">True</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="preform">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Preformatted</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">flowed</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label349">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>_Format:</b></property>
|
||||
<property name="use_underline">True</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="mnemonic_widget">flowed</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
|
Loading…
Reference in New Issue
Block a user