diff --git a/src/Config.py b/src/Config.py index 69f9f9261..f22ae90b0 100644 --- a/src/Config.py +++ b/src/Config.py @@ -68,7 +68,7 @@ _date_format_list = [ _("DD-MM-YYYY"), _("MM.DD.YYYY"), _("DD.MM.YYYY"), - _("DD. Month Year)" + _("DD. Month Year") ] _date_entry_list = [ @@ -100,6 +100,7 @@ status_bar = 0 paper_preference = None output_preference = None report_dir = "./" +web_dir = "./" db_dir = "./" #------------------------------------------------------------------------- @@ -153,6 +154,7 @@ def loadConfig(call): global paper_preference global output_preference global report_dir + global web_dir global db_dir global status_bar @@ -173,12 +175,18 @@ def loadConfig(call): _name_format = gnome.config.get_int("/gramps/config/nameFormat") 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") if report_dir == None: report_dir = "./" else: 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: db_dir = "./" @@ -318,6 +326,7 @@ def on_propertybox_apply(obj,page): global output_preference global show_detail global report_dir + global web_dir global db_dir if page != -1: @@ -346,7 +355,11 @@ def on_propertybox_apply(obj,page): repdir_temp = prefsTop.get_widget("repdir").get_full_path(1) if os.path.isdir(repdir_temp): 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") 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/DisplayAltNames",hide_altnames) 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) # 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("repdir").gtk_entry().set_text(report_dir) + prefsTop.get_widget("htmldir").gtk_entry().set_text(web_dir) pbox.set_modified(0) pbox.show() diff --git a/src/config.glade b/src/config.glade index 0be09ff26..eb7fa53cc 100644 --- a/src/config.glade +++ b/src/config.glade @@ -1468,38 +1468,12 @@ AbiWord <widget> <class>GtkTable</class> <name>table26</name> - <rows>2</rows> + <rows>3</rows> <columns>2</columns> <homogeneous>False</homogeneous> <row_spacing>0</row_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> <class>GnomeFileEntry</class> <name>dbdir</name> @@ -1609,6 +1583,100 @@ AbiWord <yfill>False</yfill> </child> </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>