Display place information
svn: r340
This commit is contained in:
parent
70c3963427
commit
74e8c00de8
@ -510,6 +510,11 @@
|
|||||||
<class>GtkButton</class>
|
<class>GtkButton</class>
|
||||||
<child_name>Toolbar:button</child_name>
|
<child_name>Toolbar:button</child_name>
|
||||||
<name>button111</name>
|
<name>button111</name>
|
||||||
|
<signal>
|
||||||
|
<name>clicked</name>
|
||||||
|
<handler>on_places_activate</handler>
|
||||||
|
<last_modification_time>Fri, 17 Aug 2001 22:56:32 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<label>Places</label>
|
<label>Places</label>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
@ -2833,16 +2838,16 @@
|
|||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<signal>
|
<signal>
|
||||||
<name>select_row</name>
|
<name>select_row</name>
|
||||||
<handler>on_source_list_select_row</handler>
|
<handler>on_place_list_select_row</handler>
|
||||||
<last_modification_time>Tue, 29 May 2001 21:23:02 GMT</last_modification_time>
|
<last_modification_time>Fri, 17 Aug 2001 23:00:12 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<signal>
|
<signal>
|
||||||
<name>button_press_event</name>
|
<name>button_press_event</name>
|
||||||
<handler>on_source_list_button_press_event</handler>
|
<handler>on_place_list_button_press_event</handler>
|
||||||
<last_modification_time>Thu, 31 May 2001 17:22:45 GMT</last_modification_time>
|
<last_modification_time>Fri, 17 Aug 2001 23:00:19 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<columns>2</columns>
|
<columns>6</columns>
|
||||||
<column_widths>427,80</column_widths>
|
<column_widths>236,47,102,88,77,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>
|
||||||
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
||||||
@ -2863,7 +2868,59 @@
|
|||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<child_name>CList:title</child_name>
|
<child_name>CList:title</child_name>
|
||||||
<name>label233</name>
|
<name>label233a</name>
|
||||||
|
<label>ID</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>CList:title</child_name>
|
||||||
|
<name>label233b</name>
|
||||||
|
<label>City</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>CList:title</child_name>
|
||||||
|
<name>label233c</name>
|
||||||
|
<label>County</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>CList:title</child_name>
|
||||||
|
<name>label233d</name>
|
||||||
|
<label>State</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<child_name>CList:title</child_name>
|
||||||
|
<name>label233e</name>
|
||||||
<label>Country</label>
|
<label>Country</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
|
@ -101,6 +101,7 @@ statusbar = None
|
|||||||
gtop = None
|
gtop = None
|
||||||
person_list = None
|
person_list = None
|
||||||
source_list = None
|
source_list = None
|
||||||
|
place_list = None
|
||||||
database = None
|
database = None
|
||||||
family_window = None
|
family_window = None
|
||||||
queryTop = None
|
queryTop = None
|
||||||
@ -805,8 +806,10 @@ def update_display(changed):
|
|||||||
load_family()
|
load_family()
|
||||||
elif page == 3:
|
elif page == 3:
|
||||||
load_sources()
|
load_sources()
|
||||||
else:
|
elif page == 4:
|
||||||
load_tree()
|
load_tree()
|
||||||
|
else:
|
||||||
|
load_places()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1697,6 +1700,10 @@ def on_sources_activate(obj):
|
|||||||
notebk = gtop.get_widget(NOTEBOOK)
|
notebk = gtop.get_widget(NOTEBOOK)
|
||||||
notebk.set_page(3)
|
notebk.set_page(3)
|
||||||
|
|
||||||
|
def on_places_activate(obj):
|
||||||
|
notebk = gtop.get_widget(NOTEBOOK)
|
||||||
|
notebk.set_page(4)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Load the appropriate page after a notebook switch
|
# Load the appropriate page after a notebook switch
|
||||||
@ -1713,6 +1720,45 @@ def on_notebook1_switch_page(obj,junk,page):
|
|||||||
load_tree()
|
load_tree()
|
||||||
elif page == 3:
|
elif page == 3:
|
||||||
load_sources()
|
load_sources()
|
||||||
|
elif page == 4:
|
||||||
|
load_places()
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def load_places():
|
||||||
|
place_list.freeze()
|
||||||
|
place_list.clear()
|
||||||
|
|
||||||
|
color_clist = ListColors.ColorList(place_list,1)
|
||||||
|
|
||||||
|
current_row = place_list.get_data("i")
|
||||||
|
if current_row == None:
|
||||||
|
current_row = -1
|
||||||
|
|
||||||
|
index = 0
|
||||||
|
for src in database.getPlaceMap().values():
|
||||||
|
title = src.get_title()
|
||||||
|
id = src.getId()
|
||||||
|
mloc = src.get_main_location()
|
||||||
|
city = mloc.get_city()
|
||||||
|
county = mloc.get_county()
|
||||||
|
state = mloc.get_state()
|
||||||
|
country = mloc.get_country()
|
||||||
|
place_list.append([title,id,city,county,state,country])
|
||||||
|
place_list.set_row_data(index,src)
|
||||||
|
index = index + 1
|
||||||
|
|
||||||
|
if index > 0:
|
||||||
|
if current_row == -1:
|
||||||
|
current_row = 0
|
||||||
|
place_list.select_row(current_row,0)
|
||||||
|
place_list.moveto(current_row)
|
||||||
|
|
||||||
|
place_list.set_data("i",current_row)
|
||||||
|
place_list.thaw()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -2632,7 +2678,7 @@ def menu_tools(obj,task):
|
|||||||
def main(arg):
|
def main(arg):
|
||||||
global database, gtop
|
global database, gtop
|
||||||
global statusbar
|
global statusbar
|
||||||
global person_list, source_list, pv
|
global person_list, source_list, place_list,pv
|
||||||
global topWindow
|
global topWindow
|
||||||
|
|
||||||
import ReadXML
|
import ReadXML
|
||||||
@ -2658,6 +2704,7 @@ def main(arg):
|
|||||||
topWindow = gtop.get_widget("gramps")
|
topWindow = gtop.get_widget("gramps")
|
||||||
person_list = gtop.get_widget("person_list")
|
person_list = gtop.get_widget("person_list")
|
||||||
source_list = gtop.get_widget("source_list")
|
source_list = gtop.get_widget("source_list")
|
||||||
|
place_list = gtop.get_widget("place_list")
|
||||||
filter_list = gtop.get_widget("filter_list")
|
filter_list = gtop.get_widget("filter_list")
|
||||||
|
|
||||||
person_list.set_column_visibility(5,0)
|
person_list.set_column_visibility(5,0)
|
||||||
@ -2692,6 +2739,7 @@ def main(arg):
|
|||||||
"on_person_list1_activate": on_person_list1_activate,
|
"on_person_list1_activate": on_person_list1_activate,
|
||||||
"on_family1_activate" : on_family1_activate,
|
"on_family1_activate" : on_family1_activate,
|
||||||
"on_sources_activate" : on_sources_activate,
|
"on_sources_activate" : on_sources_activate,
|
||||||
|
"on_places_activate" : on_places_activate,
|
||||||
"on_pedegree1_activate" : on_pedegree1_activate,
|
"on_pedegree1_activate" : on_pedegree1_activate,
|
||||||
"on_notebook1_switch_page": on_notebook1_switch_page,
|
"on_notebook1_switch_page": on_notebook1_switch_page,
|
||||||
"on_ok_button1_clicked": on_ok_button1_clicked,
|
"on_ok_button1_clicked": on_ok_button1_clicked,
|
||||||
|
Loading…
Reference in New Issue
Block a user