diff options
author | Pablo Barciela <[email protected]> | 2019-05-02 01:09:20 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-06 13:53:37 +0200 |
commit | a110c542bd7a16625f03c97e2fefa3be8da50c85 (patch) | |
tree | 7af078f9084b33eb0d5df7f3657a1f8049ff6b83 /libcaja-private/caja-customization-data.c | |
parent | 476f56a25be636970b336d525a7766b6d1eb3fff (diff) | |
download | caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.bz2 caja-a110c542bd7a16625f03c97e2fefa3be8da50c85.tar.xz |
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-customization-data.c')
-rw-r--r-- | libcaja-private/caja-customization-data.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libcaja-private/caja-customization-data.c b/libcaja-private/caja-customization-data.c index de516d5a..ebd0b029 100644 --- a/libcaja-private/caja-customization-data.c +++ b/libcaja-private/caja-customization-data.c @@ -124,8 +124,7 @@ caja_customization_data_new (const char *customization_name, int maximum_icon_width) { CajaCustomizationData *data; - char *public_directory_path, *private_directory_path; - char *temp_str; + char *private_directory_path; gboolean public_result, private_result; data = g_new0 (CajaCustomizationData, 1); @@ -134,6 +133,8 @@ caja_customization_data_new (const char *customization_name, if (show_public_customizations) { + char *public_directory_path; + public_directory_path = get_global_customization_path (customization_name); public_result = read_all_children (public_directory_path, @@ -171,6 +172,8 @@ caja_customization_data_new (const char *customization_name, /* load the frame if necessary */ if (strcmp (customization_name, "patterns") == 0) { + char *temp_str; + temp_str = caja_pixmap_file ("chit_frame.png"); if (temp_str != NULL) { @@ -425,7 +428,7 @@ caja_customization_make_pattern_chit (GdkPixbuf *pattern_tile, GdkPixbuf *frame, static char* format_name_for_display (CajaCustomizationData *data, const char* name) { - char *formatted_str, *mapped_name; + char *formatted_str; if (!g_strcmp0(name, RESET_IMAGE_NAME)) { @@ -437,6 +440,8 @@ format_name_for_display (CajaCustomizationData *data, const char* name) formatted_str = eel_filename_strip_extension (name); if (data->name_map_hash != NULL) { + char *mapped_name; + mapped_name = g_hash_table_lookup (data->name_map_hash, formatted_str); if (mapped_name) { @@ -455,7 +460,6 @@ static void load_name_map_hash_table (CajaCustomizationData *data) { char *xml_path; - char *filename, *display_name; xmlDocPtr browser_data; xmlNodePtr category_node, current_node; @@ -479,6 +483,8 @@ load_name_map_hash_table (CajaCustomizationData *data) /* loop through the entries, adding a mapping to the hash table */ while (current_node != NULL) { + char *filename, *display_name; + display_name = eel_xml_get_property_translated (current_node, "display_name"); filename = xmlGetProp (current_node, "filename"); if (display_name && filename) |