@@ -176,9 +176,6 @@ static GHashTable *waiting_directories;
176176static GHashTable * async_jobs ;
177177#endif
178178
179- /* Hide kde trashcan directory */
180- static char * kde_trash_dir_name = NULL ;
181-
182179/* Forward declarations for functions that need them. */
183180static void deep_count_load (DeepCountState * state ,
184181 GFile * location );
@@ -202,13 +199,6 @@ static void move_file_to_extension_queue (NemoDirectory
202199static void nemo_directory_invalidate_file_attributes (NemoDirectory * directory ,
203200 NemoFileAttributes file_attributes );
204201
205- void
206- nemo_set_kde_trash_name (const char * trash_dir )
207- {
208- g_free (kde_trash_dir_name );
209- kde_trash_dir_name = g_strdup (trash_dir );
210- }
211-
212202/* Some helpers for case-insensitive strings.
213203 * Move to nemo-glib-extensions?
214204 */
@@ -846,10 +836,7 @@ should_skip_file (NemoDirectory *directory, GFileInfo *info)
846836
847837 if (!show_hidden_files &&
848838 (g_file_info_get_is_hidden (info ) ||
849- g_file_info_get_is_backup (info ) ||
850- (directory != NULL && directory -> details -> hidden_file_hash != NULL &&
851- g_hash_table_lookup (directory -> details -> hidden_file_hash ,
852- g_file_info_get_name (info )) != NULL ))) {
839+ g_file_info_get_is_backup (info ))) {
853840 return TRUE;
854841 }
855842
@@ -1092,10 +1079,6 @@ file_list_cancel (NemoDirectory *directory)
10921079 g_list_free_full (directory -> details -> pending_file_info , g_object_unref );
10931080 directory -> details -> pending_file_info = NULL ;
10941081 }
1095-
1096- if (directory -> details -> hidden_file_hash ) {
1097- g_hash_table_remove_all (directory -> details -> hidden_file_hash );
1098- }
10991082}
11001083
11011084static void
@@ -1966,78 +1949,6 @@ mark_all_files_unconfirmed (NemoDirectory *directory)
19661949 }
19671950}
19681951
1969- static void
1970- read_dot_hidden_file (NemoDirectory * directory )
1971- {
1972- gsize file_size ;
1973- char * file_contents ;
1974- GFile * child ;
1975- GFileInfo * info ;
1976- GFileType type ;
1977- guint i ;
1978-
1979-
1980- /* FIXME: We only support .hidden on file: uri's for the moment.
1981- * Need to figure out if we should do this async or sync to extend
1982- * it to all types of uris.
1983- */
1984- if (directory -> details -> location == NULL ||
1985- !g_file_is_native (directory -> details -> location )) {
1986- return ;
1987- }
1988-
1989- child = g_file_get_child (directory -> details -> location , ".hidden" );
1990-
1991- type = G_FILE_TYPE_UNKNOWN ;
1992-
1993- info = g_file_query_info (child , G_FILE_ATTRIBUTE_STANDARD_TYPE , 0 , NULL , NULL );
1994- if (info != NULL ) {
1995- type = g_file_info_get_file_type (info );
1996- g_object_unref (info );
1997- }
1998-
1999- if (type != G_FILE_TYPE_REGULAR ) {
2000- g_object_unref (child );
2001- return ;
2002- }
2003-
2004- if (!g_file_load_contents (child , NULL , & file_contents , & file_size , NULL , NULL )) {
2005- g_object_unref (child );
2006- return ;
2007- }
2008-
2009- g_object_unref (child );
2010-
2011- if (directory -> details -> hidden_file_hash == NULL ) {
2012- directory -> details -> hidden_file_hash =
2013- g_hash_table_new_full (g_str_hash , g_str_equal , g_free , NULL );
2014- }
2015-
2016- /* Now parse the data */
2017- i = 0 ;
2018- while (i < file_size ) {
2019- guint start ;
2020-
2021- start = i ;
2022- while (i < file_size && file_contents [i ] != '\n' ) {
2023- i ++ ;
2024- }
2025-
2026- if (i > start ) {
2027- char * hidden_filename ;
2028-
2029- hidden_filename = g_strndup (file_contents + start , i - start );
2030- g_hash_table_insert (directory -> details -> hidden_file_hash ,
2031- hidden_filename , hidden_filename );
2032- }
2033-
2034- i ++ ;
2035-
2036- }
2037-
2038- g_free (file_contents );
2039- }
2040-
20411952static void
20421953directory_load_state_free (DirectoryLoadState * state )
20431954{
@@ -2183,23 +2094,6 @@ start_monitoring_file_list (NemoDirectory *directory)
21832094 state -> load_directory_file =
21842095 nemo_directory_get_corresponding_file (directory );
21852096 state -> load_directory_file -> details -> loading_directory = TRUE;
2186-
2187- read_dot_hidden_file (directory );
2188-
2189- /* Hack to work around kde trash dir */
2190- if (kde_trash_dir_name != NULL && nemo_directory_is_desktop_directory (directory )) {
2191- char * fn ;
2192-
2193- if (directory -> details -> hidden_file_hash == NULL ) {
2194- directory -> details -> hidden_file_hash =
2195- g_hash_table_new_full (g_str_hash , g_str_equal , g_free , NULL );
2196- }
2197-
2198- fn = g_strdup (kde_trash_dir_name );
2199- g_hash_table_insert (directory -> details -> hidden_file_hash ,
2200- fn , fn );
2201- }
2202-
22032097
22042098#ifdef DEBUG_LOAD_DIRECTORY
22052099 g_message ("load_directory called to monitor file list of %p" , directory -> details -> location );
0 commit comments