[nautilus/wip/apoos-maximus/gsoc2020] properties-window : stop setting "inconsistent_string" data



commit 8ad4e8767df5c54edef11c12f01bd96bc1745fa7
Author: Apoorv Sachan <apoorv 99 sachan gmail com>
Date:   Sat Jul 11 00:49:35 2020 +0530

    properties-window : stop setting "inconsistent_string" data

 src/nautilus-properties-window.c | 47 ++++------------------------------------
 1 file changed, 4 insertions(+), 43 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 68d5d5631..518c80f5a 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -1332,6 +1332,9 @@ file_list_all_directories (GList *file_list)
     return TRUE;
 }
 
+#define INCONSISTENT_STATE_STRING \
+    "\xE2\x80\x92"
+
 static void
 value_field_update_internal (GtkLabel *label,
                              GList    *file_list)
@@ -1344,7 +1347,7 @@ value_field_update_internal (GtkLabel *label,
     g_assert (GTK_IS_LABEL (label));
 
     attribute_name = g_object_get_data (G_OBJECT (label), "file_attribute");
-    inconsistent_string = g_object_get_data (G_OBJECT (label), "inconsistent_string");
+    inconsistent_string = INCONSISTENT_STATE_STRING;
     attribute_value = file_list_get_string_attribute (file_list,
                                                       attribute_name,
                                                       inconsistent_string);
@@ -2248,9 +2251,6 @@ schedule_directory_contents_update (NautilusPropertiesWindow *window)
     }
 }
 
-#define INCONSISTENT_STATE_STRING \
-    "\xE2\x80\x92"
-
 static void
 setup_contents_field (NautilusPropertiesWindow *window,
                       GtkGrid                  *grid)
@@ -2781,9 +2781,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->type_value_label), "file_attribute",
                                 g_strdup ("detailed_type"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->type_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->type_value_label), "show_original", GINT_TO_POINTER (FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2797,9 +2794,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->link_target_value_label), "file_attribute",
                                 g_strdup ("link_target"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->link_target_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->link_target_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2822,9 +2816,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->size_value_label), "file_attribute",
                                 g_strdup ("size_detail"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->size_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->size_value_label), "show_original", GINT_TO_POINTER (FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2839,9 +2830,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->parent_folder_value_label), "file_attribute",
                                 g_strdup ("where"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->parent_folder_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->parent_folder_value_label), "show_original", GINT_TO_POINTER 
(location_show_original (window)));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2855,9 +2843,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->original_folder_value_label), "file_attribute",
                                 g_strdup ("trash_orig_path"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->original_folder_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->original_folder_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2871,9 +2856,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->volume_value_label), "file_attribute",
                                 g_strdup ("volume"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->volume_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->volume_value_label), "show_original", GINT_TO_POINTER (FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2887,9 +2869,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->trashed_on_value_label), "file_attribute",
                                 g_strdup ("trashed_on_full"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->trashed_on_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->trashed_on_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2910,9 +2889,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->accessed_value_label), "file_attribute",
                                 g_strdup ("date_accessed_full"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->accessed_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->accessed_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2927,9 +2903,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->modified_value_label), "file_attribute",
                                 g_strdup ("date_modified_full"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->modified_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->modified_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -2947,9 +2920,6 @@ create_basic_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->free_space_value_label), "file_attribute",
                                 g_strdup ("free_space"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->free_space_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->free_space_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -3920,9 +3890,6 @@ create_simple_permissions (NautilusPropertiesWindow *window,
         g_object_set_data_full (G_OBJECT (owner_value_label), "file_attribute",
                                 g_strdup ("owner"), g_free);
 
-        g_object_set_data_full (G_OBJECT (owner_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (owner_value_label), "show_original", GINT_TO_POINTER (FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -3973,9 +3940,6 @@ create_simple_permissions (NautilusPropertiesWindow *window,
         g_object_set_data_full (G_OBJECT (group_value_label), "file_attribute",
                                 g_strdup ("group"), g_free);
 
-        g_object_set_data_full (G_OBJECT (group_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (group_value_label), "show_original", GINT_TO_POINTER (FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,
@@ -4349,9 +4313,6 @@ create_permissions_page (NautilusPropertiesWindow *window)
         g_object_set_data_full (G_OBJECT (window->security_context_value_label), "file_attribute",
                                 g_strdup ("selinux_context"), g_free);
 
-        g_object_set_data_full (G_OBJECT (window->security_context_value_label), "inconsistent_string",
-                                g_strdup (INCONSISTENT_STATE_STRING), g_free);
-
         g_object_set_data (G_OBJECT (window->security_context_value_label), "show_original", GINT_TO_POINTER 
(FALSE));
 
         window->value_fields = g_list_prepend (window->value_fields,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]