diff --git a/gramps/src/Config.py b/gramps/src/Config.py index f26723749..2592699be 100644 --- a/gramps/src/Config.py +++ b/gramps/src/Config.py @@ -97,6 +97,8 @@ attr_name = "" status_bar = 0 paper_preference = None output_preference = None +report_dir = "." +db_dir = "." #------------------------------------------------------------------------- # @@ -148,6 +150,8 @@ def loadConfig(call): global _callback global paper_preference global output_preference + global report_dir + global db_dir global status_bar _callback = call @@ -166,6 +170,14 @@ def loadConfig(call): output_preference = gnome.config.get_string("/gramps/config/outputPreference") _name_format = gnome.config.get_int("/gramps/config/nameFormat") + report_dir = gnome.config.get_string("/gramps/config/ReportDirectory") + db_dir = gnome.config.get_string("/gramps/config/DbDirectory") + + if report_dir == None: + report_dir = "." + if db_dir == None: + db_dir = "." + name = gnome.config.get_string("/gramps/researcher/name") addr = gnome.config.get_string("/gramps/researcher/addr") city = gnome.config.get_string("/gramps/researcher/city") @@ -298,6 +310,8 @@ def on_propertybox_apply(obj,page): global paper_preference global output_preference global show_detail + global report_dir + global db_dir if page != -1: return @@ -317,7 +331,15 @@ def on_propertybox_apply(obj,page): status_bar = 1 else: status_bar = 2 - + + dbdir_temp = prefsTop.get_widget("dbdir").get_full_path(1) + if os.path.isdir(dbdir_temp): + dbdir = dbdir_temp + + repdir_temp = prefsTop.get_widget("repdir").get_full_path(1) + if os.path.isdir(repdir_temp): + repdir = repdir_temp + paper_preference = paper_obj.get_data("d") output_preference = output_obj.get_data("d") @@ -330,6 +352,8 @@ def on_propertybox_apply(obj,page): gnome.config.set_string("/gramps/config/outputPreference",output_preference) gnome.config.set_bool("/gramps/config/autoLoad",autoload) gnome.config.set_bool("/gramps/config/DisplayAltNames",hide_altnames) + gnome.config.set_string("/gramps/config/ReportDirectory",repdir) + gnome.config.set_string("/gramps/config/DbDirectory",dbdir) # search for the active date format selection @@ -569,6 +593,9 @@ def display_preferences_box(): prefsTop.get_widget(ODDBGCOLOR).set_sensitive(ListColors.get_enable()) prefsTop.get_widget(EVENBGCOLOR).set_sensitive(ListColors.get_enable()) prefsTop.get_widget(EVENFGCOLOR).set_sensitive(ListColors.get_enable()) + + prefsTop.get_widget("dbdir").gtk_entry().set_text(db_dir) + prefsTop.get_widget("repdir").gtk_entry().set_text(report_dir) pbox.set_modified(0) pbox.show() diff --git a/gramps/src/config.glade b/gramps/src/config.glade index a779bc268..0be09ff26 100644 --- a/gramps/src/config.glade +++ b/gramps/src/config.glade @@ -212,7 +212,7 @@ GtkTable table23 - 3 + 2 2 False 0 @@ -282,8 +282,8 @@ 2 0 1 - 0 - 0 + 5 + 5 True False False @@ -305,8 +305,8 @@ 2 1 2 - 0 - 0 + 5 + 5 True False False @@ -333,7 +333,7 @@ GtkTable table24 - 2 + 1 2 False 0 @@ -377,8 +377,8 @@ 2 0 1 - 0 - 0 + 5 + 5 True False False @@ -1343,7 +1343,7 @@ GtkTable table25 - 3 + 2 2 False 0 @@ -1464,6 +1464,165 @@ AbiWord 0 0 + + + GtkTable + table26 + 2 + 2 + False + 0 + 0 + + + GtkLabel + label206 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + 1 + 1 + 2 + 0 + 0 + False + False + False + False + True + False + + + + + GnomeFileEntry + dbdir + dbdir + 10 + Gramps - Select default database directory + True + False + + 1 + 2 + 0 + 1 + 5 + 5 + True + False + False + False + True + False + + + + GtkEntry + GnomeEntry:entry + combo-entry1 + The default directory for storing databases + True + + changed + on_object_toggled + propertybox + Thu, 28 Jun 2001 13:50:08 GMT + + True + True + 0 + + + + + + GnomeFileEntry + repdir + repdir + 10 + Gramps - Select default report directory + True + False + + 1 + 2 + 1 + 2 + 5 + 5 + True + False + False + False + True + False + + + + GtkEntry + GnomeEntry:entry + entry1 + The default directory for the output of many report generators + True + + changed + on_object_toggled + propertybox + Thu, 28 Jun 2001 13:49:30 GMT + + True + True + 0 + + + + + + GtkLabel + label205 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + 1 + 0 + 1 + 5 + 5 + False + False + False + False + True + False + + + + + + GtkLabel + Notebook:tab + label207 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 +