HTML default directory added

svn: r214
This commit is contained in:
Don Allingham 2001-07-01 21:31:52 +00:00
parent 8d344f7dc0
commit 2347ec8e6f
2 changed files with 112 additions and 29 deletions

View File

@ -68,7 +68,7 @@ _date_format_list = [
_("DD-MM-YYYY"), _("DD-MM-YYYY"),
_("MM.DD.YYYY"), _("MM.DD.YYYY"),
_("DD.MM.YYYY"), _("DD.MM.YYYY"),
_("DD. Month Year)" _("DD. Month Year")
] ]
_date_entry_list = [ _date_entry_list = [
@ -100,6 +100,7 @@ status_bar = 0
paper_preference = None paper_preference = None
output_preference = None output_preference = None
report_dir = "./" report_dir = "./"
web_dir = "./"
db_dir = "./" db_dir = "./"
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -153,6 +154,7 @@ def loadConfig(call):
global paper_preference global paper_preference
global output_preference global output_preference
global report_dir global report_dir
global web_dir
global db_dir global db_dir
global status_bar global status_bar
@ -173,12 +175,18 @@ def loadConfig(call):
_name_format = gnome.config.get_int("/gramps/config/nameFormat") _name_format = gnome.config.get_int("/gramps/config/nameFormat")
report_dir = gnome.config.get_string("/gramps/config/ReportDirectory") report_dir = gnome.config.get_string("/gramps/config/ReportDirectory")
web_dir = gnome.config.get_string("/gramps/config/WebsiteDirectory")
db_dir = gnome.config.get_string("/gramps/config/DbDirectory") db_dir = gnome.config.get_string("/gramps/config/DbDirectory")
if report_dir == None: if report_dir == None:
report_dir = "./" report_dir = "./"
else: else:
report_dir = os.path.normpath(report_dir) + os.sep report_dir = os.path.normpath(report_dir) + os.sep
if web_dir == None:
web_dir = "./"
else:
web_dir = os.path.normpath(web_dir) + os.sep
if db_dir == None: if db_dir == None:
db_dir = "./" db_dir = "./"
@ -318,6 +326,7 @@ def on_propertybox_apply(obj,page):
global output_preference global output_preference
global show_detail global show_detail
global report_dir global report_dir
global web_dir
global db_dir global db_dir
if page != -1: if page != -1:
@ -346,7 +355,11 @@ def on_propertybox_apply(obj,page):
repdir_temp = prefsTop.get_widget("repdir").get_full_path(1) repdir_temp = prefsTop.get_widget("repdir").get_full_path(1)
if os.path.isdir(repdir_temp): if os.path.isdir(repdir_temp):
report_dir = os.path.normpath(repdir_temp) + os.sep report_dir = os.path.normpath(repdir_temp) + os.sep
webdir_temp = prefsTop.get_widget("htmldir").get_full_path(1)
if os.path.isdir(webdir_temp):
web_dir = os.path.normpath(webdir_temp) + os.sep
paper_preference = paper_obj.get_data("d") paper_preference = paper_obj.get_data("d")
output_preference = output_obj.get_data("d") output_preference = output_obj.get_data("d")
@ -360,6 +373,7 @@ def on_propertybox_apply(obj,page):
gnome.config.set_bool("/gramps/config/autoLoad",autoload) gnome.config.set_bool("/gramps/config/autoLoad",autoload)
gnome.config.set_bool("/gramps/config/DisplayAltNames",hide_altnames) gnome.config.set_bool("/gramps/config/DisplayAltNames",hide_altnames)
gnome.config.set_string("/gramps/config/ReportDirectory",report_dir) gnome.config.set_string("/gramps/config/ReportDirectory",report_dir)
gnome.config.set_string("/gramps/config/WebsiteDirectory",web_dir)
gnome.config.set_string("/gramps/config/DbDirectory",db_dir) gnome.config.set_string("/gramps/config/DbDirectory",db_dir)
# search for the active date format selection # search for the active date format selection
@ -603,6 +617,7 @@ def display_preferences_box():
prefsTop.get_widget("dbdir").gtk_entry().set_text(db_dir) prefsTop.get_widget("dbdir").gtk_entry().set_text(db_dir)
prefsTop.get_widget("repdir").gtk_entry().set_text(report_dir) prefsTop.get_widget("repdir").gtk_entry().set_text(report_dir)
prefsTop.get_widget("htmldir").gtk_entry().set_text(web_dir)
pbox.set_modified(0) pbox.set_modified(0)
pbox.show() pbox.show()

View File

@ -1468,38 +1468,12 @@ AbiWord
<widget> <widget>
<class>GtkTable</class> <class>GtkTable</class>
<name>table26</name> <name>table26</name>
<rows>2</rows> <rows>3</rows>
<columns>2</columns> <columns>2</columns>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<row_spacing>0</row_spacing> <row_spacing>0</row_spacing>
<column_spacing>0</column_spacing> <column_spacing>0</column_spacing>
<widget>
<class>GtkLabel</class>
<name>label206</name>
<label>Default report directory</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget> <widget>
<class>GnomeFileEntry</class> <class>GnomeFileEntry</class>
<name>dbdir</name> <name>dbdir</name>
@ -1609,6 +1583,100 @@ AbiWord
<yfill>False</yfill> <yfill>False</yfill>
</child> </child>
</widget> </widget>
<widget>
<class>GtkLabel</class>
<name>label206</name>
<label>Default report directory</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>5</xpad>
<ypad>5</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label208</name>
<label>Default Web Site directory</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>5</xpad>
<ypad>5</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GnomeFileEntry</class>
<name>htmldir</name>
<history_id>repdir</history_id>
<max_saved>10</max_saved>
<title>Gramps - Select default report directory</title>
<directory>True</directory>
<modal>False</modal>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>5</xpad>
<ypad>5</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GnomeEntry:entry</child_name>
<name>entry2</name>
<tooltip>The default directory for the output of the Web Site report generators</tooltip>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_object_toggled</handler>
<object>propertybox</object>
<last_modification_time>Thu, 28 Jun 2001 13:49:30 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget> </widget>
<widget> <widget>