Skip to content

Commit 191aa39

Browse files
committed
libcaja-private: remove redundant prefs application to hash table
These preferences are all applied elsewhere and all work without this. Removing it stops the g_hash_table_foreach warnings with GTK 3.23.0
1 parent 78d9182 commit 191aa39

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

‎libcaja-private/caja-directory.c‎

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,6 @@ invalidate_one_count (gpointer key, gpointer value, gpointer user_data)
226226
caja_directory_invalidate_count_and_mime_list (directory);
227227
}
228228

229-
static void
230-
filtering_changed_callback (gpointer callback_data)
231-
{
232-
g_assert (callback_data == NULL);
233-
234-
/* Preference about which items to show has changed, so we
235-
* can't trust any of our precomputed directory counts.
236-
*/
237-
g_hash_table_foreach (directories, invalidate_one_count, NULL);
238-
}
239-
240229
void
241230
emit_change_signals_for_all_files (CajaDirectory *directory)
242231
{
@@ -302,40 +291,7 @@ async_state_changed_one (gpointer key, gpointer value, gpointer user_data)
302291
emit_change_signals_for_all_files (directory);
303292
}
304293

305-
static void
306-
async_data_preference_changed_callback (gpointer callback_data)
307-
{
308-
g_assert (callback_data == NULL);
309-
310-
/* Preference involving fetched async data has changed, so
311-
* we have to kick off refetching all async data, and tell
312-
* each file that it (might have) changed.
313-
*/
314-
g_hash_table_foreach (directories, async_state_changed_one, NULL);
315-
}
316294

317-
static void
318-
add_preferences_callbacks (void)
319-
{
320-
caja_global_preferences_init ();
321-
322-
g_signal_connect_swapped (caja_preferences,
323-
"changed::" CAJA_PREFERENCES_SHOW_HIDDEN_FILES,
324-
G_CALLBACK(filtering_changed_callback),
325-
NULL);
326-
g_signal_connect_swapped (caja_preferences,
327-
"changed::" CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
328-
G_CALLBACK (async_data_preference_changed_callback),
329-
NULL);
330-
g_signal_connect_swapped (caja_preferences,
331-
"changed::" CAJA_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS,
332-
G_CALLBACK (async_data_preference_changed_callback),
333-
NULL);
334-
g_signal_connect_swapped (caja_preferences,
335-
"changed::" CAJA_PREFERENCES_DATE_FORMAT,
336-
G_CALLBACK(async_data_preference_changed_callback),
337-
NULL);
338-
}
339295

340296
/**
341297
* caja_directory_get_by_uri:
@@ -354,7 +310,6 @@ caja_directory_get_internal (GFile *location, gboolean create)
354310
/* Create the hash table first time through. */
355311
if (directories == NULL) {
356312
directories = g_hash_table_new (g_file_hash, (GCompareFunc) g_file_equal);
357-
add_preferences_callbacks ();
358313
}
359314

360315
/* If the object is already in the hash table, look it up. */
@@ -1055,7 +1010,6 @@ caja_directory_notify_files_changed (GList *files)
10551010
file);
10561011
}
10571012
}
1058-
10591013
/* Now send out the changed signals. */
10601014
g_hash_table_foreach (changed_lists, call_files_changed_unref_free_list, NULL);
10611015
g_hash_table_destroy (changed_lists);
@@ -1102,7 +1056,6 @@ caja_directory_notify_files_removed (GList *files)
11021056
}
11031057
caja_file_unref (file);
11041058
}
1105-
11061059
/* Now send out the changed signals. */
11071060
g_hash_table_foreach (changed_lists, call_files_changed_unref_free_list, NULL);
11081061
g_hash_table_destroy (changed_lists);

0 commit comments

Comments
 (0)