Double click merges
svn: r1236
This commit is contained in:
parent
a916d24916
commit
4966e07594
@ -311,7 +311,7 @@ class Date:
|
|||||||
|
|
||||||
def isEmpty(self):
|
def isEmpty(self):
|
||||||
s = self.start
|
s = self.start
|
||||||
return s.year==UNDEF and s.month==UNDEF and s.day==UNDEF
|
return s.year==UNDEF and s.month==UNDEF and s.day==UNDEF and not self.text
|
||||||
|
|
||||||
def isValid(self):
|
def isValid(self):
|
||||||
return self.range != -1
|
return self.range != -1
|
||||||
|
@ -138,6 +138,8 @@ class EditPlace:
|
|||||||
"on_web_list_select_row" : self.on_web_list_select_row,
|
"on_web_list_select_row" : self.on_web_list_select_row,
|
||||||
"on_web_go_clicked" : self.on_web_go_clicked,
|
"on_web_go_clicked" : self.on_web_go_clicked,
|
||||||
"on_loc_list_select_row" : self.on_loc_list_select_row,
|
"on_loc_list_select_row" : self.on_loc_list_select_row,
|
||||||
|
"on_web_list_button_press" : self.web_list_double_click,
|
||||||
|
"on_loc_list_button_press" : self.loc_list_double_click,
|
||||||
"on_apply_clicked" : self.on_place_apply_clicked
|
"on_apply_clicked" : self.on_place_apply_clicked
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -299,6 +301,14 @@ class EditPlace:
|
|||||||
import LocEdit
|
import LocEdit
|
||||||
LocEdit.LocationEditor(self,None)
|
LocEdit.LocationEditor(self,None)
|
||||||
|
|
||||||
|
def web_list_double_click(self,obj,event):
|
||||||
|
if event.button == 1 and event.type == _2BUTTON_PRESS:
|
||||||
|
self.on_update_url_clicked(obj)
|
||||||
|
|
||||||
|
def loc_list_double_click(self,obj,event):
|
||||||
|
if event.button == 1 and event.type == _2BUTTON_PRESS:
|
||||||
|
self.on_update_loc_clicked(obj)
|
||||||
|
|
||||||
def on_web_list_select_row(self,obj,row,b,c):
|
def on_web_list_select_row(self,obj,row,b,c):
|
||||||
url = obj.get_row_data(row)
|
url = obj.get_row_data(row)
|
||||||
if url == None:
|
if url == None:
|
||||||
|
@ -585,6 +585,7 @@ class GlobalMediaProperties:
|
|||||||
"on_apply_clicked" : self.on_apply_clicked,
|
"on_apply_clicked" : self.on_apply_clicked,
|
||||||
"on_attr_list_select_row": self.on_attr_list_select_row,
|
"on_attr_list_select_row": self.on_attr_list_select_row,
|
||||||
"on_add_attr_clicked" : self.on_add_attr_clicked,
|
"on_add_attr_clicked" : self.on_add_attr_clicked,
|
||||||
|
"on_attr_button_press" : self.attr_double_click,
|
||||||
"on_notebook_switch_page": self.on_notebook_switch_page,
|
"on_notebook_switch_page": self.on_notebook_switch_page,
|
||||||
"on_make_local_clicked" : self.on_make_local_clicked,
|
"on_make_local_clicked" : self.on_make_local_clicked,
|
||||||
"on_delete_attr_clicked" : self.on_delete_attr_clicked,
|
"on_delete_attr_clicked" : self.on_delete_attr_clicked,
|
||||||
@ -592,6 +593,10 @@ class GlobalMediaProperties:
|
|||||||
})
|
})
|
||||||
self.redraw_attr_list()
|
self.redraw_attr_list()
|
||||||
|
|
||||||
|
def attr_double_click(self,obj,event):
|
||||||
|
if event.button == 1 and event.type == GDK._2BUTTON_PRESS:
|
||||||
|
self.on_update_attr_clicked(obj)
|
||||||
|
|
||||||
def on_up_clicked(self,obj):
|
def on_up_clicked(self,obj):
|
||||||
if len(obj.selection) == 0:
|
if len(obj.selection) == 0:
|
||||||
return
|
return
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
# GTK/Gnome modules
|
# GTK/Gnome modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import GDK
|
||||||
import gtk
|
import gtk
|
||||||
import libglade
|
import libglade
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ class SourceSelector:
|
|||||||
self.top.signal_autoconnect({
|
self.top.signal_autoconnect({
|
||||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||||
"on_add_src_clicked" : self.on_add_src_clicked,
|
"on_add_src_clicked" : self.on_add_src_clicked,
|
||||||
|
"on_src_button_press" : self.src_double_click,
|
||||||
"on_del_src_clicked" : self.on_del_src_clicked,
|
"on_del_src_clicked" : self.on_del_src_clicked,
|
||||||
"on_edit_src_clicked" : self.on_edit_src_clicked,
|
"on_edit_src_clicked" : self.on_edit_src_clicked,
|
||||||
"on_src_ok_clicked" : self.on_src_ok_clicked,
|
"on_src_ok_clicked" : self.on_src_ok_clicked,
|
||||||
@ -67,6 +69,10 @@ class SourceSelector:
|
|||||||
self.srcsort = Sorter.Sorter(self.slist, slist_map, 'source')
|
self.srcsort = Sorter.Sorter(self.slist, slist_map, 'source')
|
||||||
self.redraw()
|
self.redraw()
|
||||||
self.sourcesel.show()
|
self.sourcesel.show()
|
||||||
|
|
||||||
|
def src_double_click(self,obj,event):
|
||||||
|
if event.button == 1 and event.type == GDK._2BUTTON_PRESS:
|
||||||
|
self.on_edit_src_clicked(obj)
|
||||||
|
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
index = 0
|
index = 0
|
||||||
@ -128,6 +134,7 @@ class SourceTab:
|
|||||||
self.top.signal_autoconnect({
|
self.top.signal_autoconnect({
|
||||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||||
"on_add_src_clicked" : self.on_add_src_clicked,
|
"on_add_src_clicked" : self.on_add_src_clicked,
|
||||||
|
"on_src_button_press" : self.src_double_click,
|
||||||
"on_del_src_clicked" : self.on_del_src_clicked,
|
"on_del_src_clicked" : self.on_del_src_clicked,
|
||||||
"on_edit_src_clicked" : self.on_edit_src_clicked,
|
"on_edit_src_clicked" : self.on_edit_src_clicked,
|
||||||
})
|
})
|
||||||
@ -137,6 +144,10 @@ class SourceTab:
|
|||||||
self.srcsort = Sorter.Sorter(self.slist, slist_map, 'source')
|
self.srcsort = Sorter.Sorter(self.slist, slist_map, 'source')
|
||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
|
def src_double_click(self,obj,event):
|
||||||
|
if event.button == 1 and event.type == GDK._2BUTTON_PRESS:
|
||||||
|
self.on_edit_src_clicked(obj)
|
||||||
|
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
index = 0
|
index = 0
|
||||||
self.slist.freeze()
|
self.slist.freeze()
|
||||||
@ -298,7 +309,7 @@ class SourceEditor:
|
|||||||
id = obj.list.get_selection()[0].get_data("s")
|
id = obj.list.get_selection()[0].get_data("s")
|
||||||
self.active_source = self.db.getSource(id)
|
self.active_source = self.db.getSource(id)
|
||||||
|
|
||||||
if self.active_source == None:
|
if self.active_source != None:
|
||||||
self.author_field.set_text(self.active_source.getAuthor())
|
self.author_field.set_text(self.active_source.getAuthor())
|
||||||
self.pub_field.set_text(self.active_source.getPubInfo())
|
self.pub_field.set_text(self.active_source.getPubInfo())
|
||||||
|
|
||||||
|
@ -451,6 +451,7 @@ class XmlWriter:
|
|||||||
|
|
||||||
def write_date(self,date,indent=1):
|
def write_date(self,date,indent=1):
|
||||||
sp = ' '*indent
|
sp = ' '*indent
|
||||||
|
|
||||||
if date.isEmpty():
|
if date.isEmpty():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ startup = 1
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
progName = "GRAMPS"
|
progName = "GRAMPS"
|
||||||
version = "0.8.0-pl4"
|
version = "0.8.1-1"
|
||||||
copyright = "© 2001-2002 Donald N. Allingham"
|
copyright = "© 2001-2002 Donald N. Allingham"
|
||||||
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
||||||
comments = _("GRAMPS (Genealogical Research and Analysis "
|
comments = _("GRAMPS (Genealogical Research and Analysis "
|
||||||
|
@ -548,7 +548,7 @@ class HtmlDoc(TextDoc):
|
|||||||
self.f.write('<br>\n')
|
self.f.write('<br>\n')
|
||||||
|
|
||||||
def show_link(self, text, href):
|
def show_link(self, text, href):
|
||||||
self.write_text(' <a href="%s">%s</a> ' % (href, text))
|
self.f.write(' <a href="%s">%s</a> ' % (href, text))
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -2177,6 +2177,11 @@
|
|||||||
<handler>on_attr_list_select_row</handler>
|
<handler>on_attr_list_select_row</handler>
|
||||||
<last_modification_time>Tue, 01 May 2001 17:24:40 GMT</last_modification_time>
|
<last_modification_time>Tue, 01 May 2001 17:24:40 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
|
<signal>
|
||||||
|
<name>button_press_event</name>
|
||||||
|
<handler>on_attr_button_press</handler>
|
||||||
|
<last_modification_time>Thu, 14 Nov 2002 20:51:00 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<columns>3</columns>
|
<columns>3</columns>
|
||||||
<column_widths>200,250,50</column_widths>
|
<column_widths>200,250,50</column_widths>
|
||||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||||
|
@ -1019,6 +1019,11 @@
|
|||||||
<handler>on_loc_list_select_row</handler>
|
<handler>on_loc_list_select_row</handler>
|
||||||
<last_modification_time>Tue, 24 Apr 2001 14:12:50 GMT</last_modification_time>
|
<last_modification_time>Tue, 24 Apr 2001 14:12:50 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
|
<signal>
|
||||||
|
<name>button_press_event</name>
|
||||||
|
<handler>on_loc_list_button_press</handler>
|
||||||
|
<last_modification_time>Thu, 14 Nov 2002 20:51:00 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<columns>4</columns>
|
<columns>4</columns>
|
||||||
<column_widths>137,80,80,80</column_widths>
|
<column_widths>137,80,80,80</column_widths>
|
||||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||||
@ -1213,6 +1218,11 @@
|
|||||||
<column_widths>80,80</column_widths>
|
<column_widths>80,80</column_widths>
|
||||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||||
<show_titles>True</show_titles>
|
<show_titles>True</show_titles>
|
||||||
|
<signal>
|
||||||
|
<name>button_press_event</name>
|
||||||
|
<handler>on_src_button_press</handler>
|
||||||
|
<last_modification_time>Thu, 14 Nov 2002 20:51:00 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
@ -1798,6 +1808,11 @@
|
|||||||
<handler>on_web_list_select_row</handler>
|
<handler>on_web_list_select_row</handler>
|
||||||
<last_modification_time>Tue, 24 Apr 2001 14:12:50 GMT</last_modification_time>
|
<last_modification_time>Tue, 24 Apr 2001 14:12:50 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
|
<signal>
|
||||||
|
<name>button_press_event</name>
|
||||||
|
<handler>on_web_list_button_press</handler>
|
||||||
|
<last_modification_time>Thu, 14 Nov 2002 20:51:00 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<columns>2</columns>
|
<columns>2</columns>
|
||||||
<column_widths>273,80</column_widths>
|
<column_widths>273,80</column_widths>
|
||||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||||
|
@ -70,6 +70,9 @@ class HtmlLinkDoc(HtmlDoc):
|
|||||||
def newline(self):
|
def newline(self):
|
||||||
self.f.write('<BR>\n')
|
self.f.write('<BR>\n')
|
||||||
|
|
||||||
|
def write_raw(self,text):
|
||||||
|
self.f.write(text)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -116,7 +119,9 @@ class IndividualPage:
|
|||||||
if sreflist:
|
if sreflist:
|
||||||
for sref in sreflist:
|
for sref in sreflist:
|
||||||
self.doc.start_link("#s%d" % self.scnt)
|
self.doc.start_link("#s%d" % self.scnt)
|
||||||
self.doc.write_text("<SUP>%d</SUP>" % self.scnt)
|
self.doc.write_raw("<SUP>")
|
||||||
|
self.doc.write_text("%d" % self.scnt)
|
||||||
|
self.doc.write_raw("</SUP>")
|
||||||
self.doc.end_link()
|
self.doc.end_link()
|
||||||
self.scnt = self.scnt + 1
|
self.scnt = self.scnt + 1
|
||||||
self.slist.append(sref)
|
self.slist.append(sref)
|
||||||
@ -182,7 +187,9 @@ class IndividualPage:
|
|||||||
index = 1
|
index = 1
|
||||||
for sref in self.slist:
|
for sref in self.slist:
|
||||||
self.doc.start_paragraph("SourceParagraph")
|
self.doc.start_paragraph("SourceParagraph")
|
||||||
self.doc.write_text('<A NAME="s%d">%d. ' % (index,index))
|
self.doc.start_link("s%d" % index)
|
||||||
|
self.doc.write_text('%d. ' % index)
|
||||||
|
self.doc.end_link()
|
||||||
index = index + 1
|
index = index + 1
|
||||||
self.write_info(sref.getBase().getTitle())
|
self.write_info(sref.getBase().getTitle())
|
||||||
self.write_info(sref.getBase().getAuthor())
|
self.write_info(sref.getBase().getAuthor())
|
||||||
@ -700,8 +707,8 @@ class WebReport(Report):
|
|||||||
col_len = len(person_list) + len(a.keys())
|
col_len = len(person_list) + len(a.keys())
|
||||||
col_len = col_len/2
|
col_len = col_len/2
|
||||||
|
|
||||||
doc.write_text('<table width="100%" border="0">')
|
doc.write_raw('<table width="100%" border="0">')
|
||||||
doc.write_text('<tr><td width="50%" valign="top">')
|
doc.write_raw('<tr><td width="50%" valign="top">')
|
||||||
last = ''
|
last = ''
|
||||||
end_col = 0
|
end_col = 0
|
||||||
for person in person_list:
|
for person in person_list:
|
||||||
@ -716,7 +723,7 @@ class WebReport(Report):
|
|||||||
doc.write_text(name)
|
doc.write_text(name)
|
||||||
doc.end_link()
|
doc.end_link()
|
||||||
if col_len <= 0 and end_col == 0:
|
if col_len <= 0 and end_col == 0:
|
||||||
doc.write_text('</td><td valign="top">')
|
doc.write_raw('</td><td valign="top">')
|
||||||
doc.start_paragraph('IndexLabel')
|
doc.start_paragraph('IndexLabel')
|
||||||
doc.write_text(_("%s (continued)") % name[0])
|
doc.write_text(_("%s (continued)") % name[0])
|
||||||
doc.end_paragraph()
|
doc.end_paragraph()
|
||||||
@ -724,7 +731,7 @@ class WebReport(Report):
|
|||||||
else:
|
else:
|
||||||
doc.newline()
|
doc.newline()
|
||||||
col_len = col_len - 1
|
col_len = col_len - 1
|
||||||
doc.write_text('</td></tr></table>')
|
doc.write_raw('</td></tr></table>')
|
||||||
doc.close()
|
doc.close()
|
||||||
doc.write_support_files()
|
doc.write_support_files()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user