Mercurial > geeqie.yaz
changeset 356:673d1eb5af73
Rename show_dot_files to show_hidden_files.
There is no need to expose the underlying method to hide
files.
author | zas_ |
---|---|
date | Sun, 13 Apr 2008 19:21:13 +0000 |
parents | 0b82646e977f |
children | d3e509c0940e |
files | src/filelist.c src/globals.c src/preferences.c src/rcfile.c src/typedefs.h src/view_dir_list.c src/view_dir_tree.c |
diffstat | 7 files changed, 22 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/filelist.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/filelist.c Sun Apr 13 19:21:13 2008 +0000 @@ -423,7 +423,7 @@ { GList *work; - if (!is_dir_list && options->file_filter.disable && options->file_filter.show_dot_files) return list; + if (!is_dir_list && options->file_filter.disable && options->file_filter.show_hidden_files) return list; work = list; while (work) @@ -433,7 +433,7 @@ base = filename_from_path(name); - if ((!options->file_filter.show_dot_files && ishidden(base)) || + if ((!options->file_filter.show_hidden_files && ishidden(base)) || (!is_dir_list && !filter_name_exists(base)) || (is_dir_list && base[0] == '.' && (strcmp(base, GQ_CACHE_LOCAL_THUMB) == 0 || strcmp(base, GQ_CACHE_LOCAL_METADATA) == 0)) ) @@ -1220,7 +1220,7 @@ while ((dir = readdir(dp)) != NULL) { gchar *name = dir->d_name; - if (options->file_filter.show_dot_files || !ishidden(name)) + if (options->file_filter.show_hidden_files || !ishidden(name)) { gchar *filepath = g_strconcat(pathl, "/", name, NULL); if ((follow_symlinks ? @@ -1349,7 +1349,7 @@ { GList *work; - if (!is_dir_list && options->file_filter.disable && options->file_filter.show_dot_files) return list; + if (!is_dir_list && options->file_filter.disable && options->file_filter.show_hidden_files) return list; work = list; while (work) @@ -1357,7 +1357,7 @@ FileData *fd = (FileData *)(work->data); const gchar *name = fd->name; - if ((!options->file_filter.show_dot_files && ishidden(name)) || + if ((!options->file_filter.show_hidden_files && ishidden(name)) || (!is_dir_list && !filter_name_exists(name)) || (is_dir_list && name[0] == '.' && (strcmp(name, GQ_CACHE_LOCAL_THUMB) == 0 || strcmp(name, GQ_CACHE_LOCAL_METADATA) == 0)) )
--- a/src/globals.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/globals.c Sun Apr 13 19:21:13 2008 +0000 @@ -67,7 +67,7 @@ options->thumbnails.fast = TRUE; options->thumbnails.spec_standard = TRUE; options->enable_metadata_dirs = FALSE; - options->file_filter.show_dot_files = FALSE; + options->file_filter.show_hidden_files = FALSE; options->file_filter.disable = FALSE;
--- a/src/preferences.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/preferences.c Sun Apr 13 19:21:13 2008 +0000 @@ -178,7 +178,7 @@ buf = gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)); if (buf && strlen(buf) > 0) options->file_ops.safe_delete_path = remove_trailing_slash(buf); - if (options->file_filter.show_dot_files != c_options->file_filter.show_dot_files) refresh = TRUE; + if (options->file_filter.show_hidden_files != c_options->file_filter.show_hidden_files) refresh = TRUE; 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; @@ -208,7 +208,7 @@ #endif options->thumbnails.spec_standard = c_options->thumbnails.spec_standard; options->enable_metadata_dirs = c_options->enable_metadata_dirs; - options->file_filter.show_dot_files = c_options->file_filter.show_dot_files; + options->file_filter.show_hidden_files = c_options->file_filter.show_hidden_files; options->file_sort.case_sensitive = c_options->file_sort.case_sensitive; options->file_filter.disable = c_options->file_filter.disable; @@ -1029,8 +1029,8 @@ group = pref_box_new(vbox, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP); - pref_checkbox_new_int(group, _("Show entries that begin with a dot"), - options->file_filter.show_dot_files, &c_options->file_filter.show_dot_files); + pref_checkbox_new_int(group, _("Show hidden files or folders"), + options->file_filter.show_hidden_files, &c_options->file_filter.show_hidden_files); pref_checkbox_new_int(group, _("Case sensitive sort"), options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive);
--- a/src/rcfile.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/rcfile.c Sun Apr 13 19:21:13 2008 +0000 @@ -423,7 +423,7 @@ secure_fprintf(ssi, "\n##### Filtering Options #####\n\n"); - write_bool_option(ssi, "file_filter.show_dot_files", options->file_filter.show_dot_files); + write_bool_option(ssi, "file_filter.show_hidden_files", options->file_filter.show_hidden_files); write_bool_option(ssi, "file_filter.disable", options->file_filter.disable); secure_fputc(ssi, '\n'); @@ -690,7 +690,7 @@ /* filtering options */ - READ_BOOL(file_filter.show_dot_files); + READ_BOOL(file_filter.show_hidden_files); READ_BOOL(file_filter.disable); if (strcasecmp(option, "file_filter.ext") == 0)
--- a/src/typedefs.h Sun Apr 13 18:56:24 2008 +0000 +++ b/src/typedefs.h Sun Apr 13 19:21:13 2008 +0000 @@ -801,7 +801,7 @@ /* file filtering */ struct { - gint show_dot_files; + gint show_hidden_files; gint disable; } file_filter;
--- a/src/view_dir_list.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/view_dir_list.c Sun Apr 13 19:21:13 2008 +0000 @@ -371,11 +371,11 @@ if (vdl->layout) layout_refresh(vdl->layout); } -static void vdlist_toggle_show_dot_files_cb(GtkWidget *widget, gpointer data) +static void vdlist_toggle_show_hidden_files_cb(GtkWidget *widget, gpointer data) { ViewDirList *vdl = data; - options->file_filter.show_dot_files = !options->file_filter.show_dot_files; + options->file_filter.show_hidden_files = !options->file_filter.show_hidden_files; if (vdl->layout) layout_refresh(vdl->layout); } @@ -426,8 +426,8 @@ menu_item_add_divider(menu); menu_item_add_check(menu, _("View as _tree"), FALSE, G_CALLBACK(vdlist_pop_menu_tree_cb), vdl); - menu_item_add_check(menu, _("Show _hidden files"), options->file_filter.show_dot_files, - G_CALLBACK(vdlist_toggle_show_dot_files_cb), vdl); + menu_item_add_check(menu, _("Show _hidden files"), options->file_filter.show_hidden_files, + G_CALLBACK(vdlist_toggle_show_hidden_files_cb), vdl); menu_item_add_stock(menu, _("Re_fresh"), GTK_STOCK_REFRESH, G_CALLBACK(vdlist_pop_menu_refresh_cb), vdl);
--- a/src/view_dir_tree.c Sun Apr 13 18:56:24 2008 +0000 +++ b/src/view_dir_tree.c Sun Apr 13 19:21:13 2008 +0000 @@ -462,11 +462,11 @@ if (vdt->layout) layout_refresh(vdt->layout); } -static void vdtree_toggle_show_dot_files_cb(GtkWidget *widget, gpointer data) +static void vdtree_toggle_show_hidden_files_cb(GtkWidget *widget, gpointer data) { ViewDirTree *vdt = data; - options->file_filter.show_dot_files = !options->file_filter.show_dot_files; + options->file_filter.show_hidden_files = !options->file_filter.show_hidden_files; if (vdt->layout) layout_refresh(vdt->layout); } @@ -521,8 +521,8 @@ menu_item_add_divider(menu); menu_item_add_check(menu, _("View as _tree"), TRUE, G_CALLBACK(vdtree_pop_menu_tree_cb), vdt); - menu_item_add_check(menu, _("Show _hidden files"), options->file_filter.show_dot_files, - G_CALLBACK(vdtree_toggle_show_dot_files_cb), vdt); + menu_item_add_check(menu, _("Show _hidden files"), options->file_filter.show_hidden_files, + G_CALLBACK(vdtree_toggle_show_hidden_files_cb), vdt); menu_item_add_stock(menu, _("Re_fresh"), GTK_STOCK_REFRESH, G_CALLBACK(vdtree_pop_menu_refresh_cb), vdt); @@ -1073,7 +1073,7 @@ /* when hidden files are not enabled, and the user enters a hidden path, * allow the tree to display that path by specifically inserting the hidden entries */ - if (!options->file_filter.show_dot_files && + if (!options->file_filter.show_hidden_files && target_path && strncmp(nd->fd->path, target_path, strlen(nd->fd->path)) == 0) {