{
path = g_strdup(cmd_path);
}
- else if (options->startup_path_enable && options->startup_path && isdir(options->startup_path))
+ else if (options->startup.restore_path && options->startup.path && isdir(options->startup.path))
{
- path = g_strdup(options->startup_path);
+ path = g_strdup(options->startup.path);
}
else
{
options->slideshow.random = FALSE;
options->slideshow.repeat = FALSE;
- options->startup_path_enable = FALSE;
- options->startup_path = NULL;
+ options->startup.restore_path = FALSE;
+ options->startup.path = NULL;
options->thumbnails.cache_into_dirs = FALSE;
options->thumbnails.enable_caching = TRUE;
gint show_copy_path;
/* various */
- gint startup_path_enable;
- gchar *startup_path;
gint enable_metadata_dirs;
gint tree_descend_subdirs;
gint save_metadata_in_image_file;
+ struct {
+ gboolean restore_path;
+ gchar *path;
+ } startup;
+
/* file ops */
struct {
gint enable_in_place_rename;
}
layout_edit_update_all();
- g_free(options->startup_path);
- options->startup_path = NULL;
+ g_free(options->startup.path);
+ options->startup.path = NULL;
buf = gtk_entry_get_text(GTK_ENTRY(startup_path_entry));
- if (buf && strlen(buf) > 0) options->startup_path = remove_trailing_slash(buf);
+ if (buf && strlen(buf) > 0) options->startup.path = remove_trailing_slash(buf);
g_free(options->file_ops.safe_delete_path);
options->file_ops.safe_delete_path = NULL;
if (options->file_sort.case_sensitive != c_options->file_sort.case_sensitive) refresh = TRUE;
if (options->file_filter.disable != c_options->file_filter.disable) refresh = TRUE;
- options->startup_path_enable = c_options->startup_path_enable;
+ options->startup.restore_path = c_options->startup.restore_path;
options->file_ops.confirm_delete = c_options->file_ops.confirm_delete;
options->file_ops.enable_delete_key = c_options->file_ops.enable_delete_key;
options->file_ops.safe_delete_enable = c_options->file_ops.safe_delete_enable;
group = pref_group_new(vbox, FALSE, _("Startup"), GTK_ORIENTATION_VERTICAL);
button = pref_checkbox_new_int(group, _("Change to folder:"),
- options->startup_path_enable, &c_options->startup_path_enable);
+ options->startup.restore_path, &c_options->startup.restore_path);
hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
pref_checkbox_link_sensitivity(button, hbox);
- tabcomp = tab_completion_new(&startup_path_entry, options->startup_path, NULL, NULL);
+ tabcomp = tab_completion_new(&startup_path_entry, options->startup.path, NULL, NULL);
tab_completion_add_select_button(startup_path_entry, NULL, TRUE);
gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0);
gtk_widget_show(tabcomp);
WRITE_BOOL(update_on_time_change);
WRITE_SEPARATOR();
- WRITE_BOOL(startup_path_enable);
- WRITE_CHAR(startup_path);
-
WRITE_BOOL(progressive_key_scrolling);
WRITE_BOOL(enable_metadata_dirs);
WRITE_BOOL(save_metadata_in_image_file);
WRITE_BOOL(place_dialogs_under_mouse);
+ WRITE_SUBTITLE("Startup Options");
+
+ WRITE_BOOL(startup.restore_path);
+ WRITE_CHAR(startup.path);
+
+
WRITE_SUBTITLE("File operations Options");
WRITE_BOOL(file_ops.enable_in_place_rename);
READ_BOOL(lazy_image_sync);
READ_BOOL(update_on_time_change);
- READ_BOOL(startup_path_enable);
- READ_CHAR(startup_path);
-
READ_INT(duplicates_similarity_threshold);
READ_BOOL(progressive_key_scrolling);
READ_INT(dnd_icon_size);
READ_BOOL(place_dialogs_under_mouse);
+ /* startup options */
+
+ COMPAT_READ_BOOL(startup_path_enable, startup.restore_path); /* 2008/05/11 */
+ READ_BOOL(startup.restore_path);
+ COMPAT_READ_CHAR(startup_path, startup.path); /* 2008/05/11 */
+ READ_CHAR(startup.path);
+
/* layout options */
READ_INT(layout.style);