Display place information
svn: r340
This commit is contained in:
parent
18af725d93
commit
1f2d3dee8a
@ -510,6 +510,11 @@
|
||||
<class>GtkButton</class>
|
||||
<child_name>Toolbar:button</child_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>
|
||||
</widget>
|
||||
|
||||
@ -2833,16 +2838,16 @@
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>select_row</name>
|
||||
<handler>on_source_list_select_row</handler>
|
||||
<last_modification_time>Tue, 29 May 2001 21:23:02 GMT</last_modification_time>
|
||||
<handler>on_place_list_select_row</handler>
|
||||
<last_modification_time>Fri, 17 Aug 2001 23:00:12 GMT</last_modification_time>
|
||||
</signal>
|
||||
<signal>
|
||||
<name>button_press_event</name>
|
||||
<handler>on_source_list_button_press_event</handler>
|
||||
<last_modification_time>Thu, 31 May 2001 17:22:45 GMT</last_modification_time>
|
||||
<handler>on_place_list_button_press_event</handler>
|
||||
<last_modification_time>Fri, 17 Aug 2001 23:00:19 GMT</last_modification_time>
|
||||
</signal>
|
||||
<columns>2</columns>
|
||||
<column_widths>427,80</column_widths>
|
||||
<columns>6</columns>
|
||||
<column_widths>236,47,102,88,77,80</column_widths>
|
||||
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
|
||||
<show_titles>True</show_titles>
|
||||
<shadow_type>GTK_SHADOW_IN</shadow_type>
|
||||
@ -2863,7 +2868,59 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<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>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
|
@ -101,6 +101,7 @@ statusbar = None
|
||||
gtop = None
|
||||
person_list = None
|
||||
source_list = None
|
||||
place_list = None
|
||||
database = None
|
||||
family_window = None
|
||||
queryTop = None
|
||||
@ -805,8 +806,10 @@ def update_display(changed):
|
||||
load_family()
|
||||
elif page == 3:
|
||||
load_sources()
|
||||
else:
|
||||
elif page == 4:
|
||||
load_tree()
|
||||
else:
|
||||
load_places()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -1697,6 +1700,10 @@ def on_sources_activate(obj):
|
||||
notebk = gtop.get_widget(NOTEBOOK)
|
||||
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
|
||||
@ -1713,7 +1720,46 @@ def on_notebook1_switch_page(obj,junk,page):
|
||||
load_tree()
|
||||
elif page == 3:
|
||||
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):
|
||||
global database, gtop
|
||||
global statusbar
|
||||
global person_list, source_list, pv
|
||||
global person_list, source_list, place_list,pv
|
||||
global topWindow
|
||||
|
||||
import ReadXML
|
||||
@ -2658,6 +2704,7 @@ def main(arg):
|
||||
topWindow = gtop.get_widget("gramps")
|
||||
person_list = gtop.get_widget("person_list")
|
||||
source_list = gtop.get_widget("source_list")
|
||||
place_list = gtop.get_widget("place_list")
|
||||
filter_list = gtop.get_widget("filter_list")
|
||||
|
||||
person_list.set_column_visibility(5,0)
|
||||
@ -2692,6 +2739,7 @@ def main(arg):
|
||||
"on_person_list1_activate": on_person_list1_activate,
|
||||
"on_family1_activate" : on_family1_activate,
|
||||
"on_sources_activate" : on_sources_activate,
|
||||
"on_places_activate" : on_places_activate,
|
||||
"on_pedegree1_activate" : on_pedegree1_activate,
|
||||
"on_notebook1_switch_page": on_notebook1_switch_page,
|
||||
"on_ok_button1_clicked": on_ok_button1_clicked,
|
||||
|
Loading…
Reference in New Issue
Block a user