[nautilus] file: make nautilus_file_get_keywords() private
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file: make nautilus_file_get_keywords() private
- Date: Tue, 8 May 2012 16:06:02 +0000 (UTC)
commit 244b0c289628f997910e1cf787247250c1614427
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon May 7 18:32:09 2012 -0400
file: make nautilus_file_get_keywords() private
No need to export this, since the only caller is inside nautilus-file.c
libnautilus-private/nautilus-file.c | 101 +++++++++++++++++------------------
libnautilus-private/nautilus-file.h | 1 -
2 files changed, 50 insertions(+), 52 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 6e406c5..7f7931a 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -6401,6 +6401,56 @@ nautilus_file_is_launchable (NautilusFile *file)
!nautilus_file_is_directory (file);
}
+static GList *
+sort_keyword_list_and_remove_duplicates (GList *keywords)
+{
+ GList *p;
+ GList *duplicate_link;
+
+ if (keywords != NULL) {
+ keywords = g_list_sort (keywords, (GCompareFunc) g_utf8_collate);
+
+ p = keywords;
+ while (p->next != NULL) {
+ if (strcmp ((const char *) p->data, (const char *) p->next->data) == 0) {
+ duplicate_link = p->next;
+ keywords = g_list_remove_link (keywords, duplicate_link);
+ g_list_free_full (duplicate_link, g_free);
+ } else {
+ p = p->next;
+ }
+ }
+ }
+
+ return keywords;
+}
+
+/**
+ * nautilus_file_get_keywords
+ *
+ * Return this file's keywords.
+ * @file: NautilusFile representing the file in question.
+ *
+ * Returns: A list of keywords.
+ *
+ **/
+static GList *
+nautilus_file_get_keywords (NautilusFile *file)
+{
+ GList *keywords;
+
+ if (file == NULL) {
+ return NULL;
+ }
+
+ g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
+
+ keywords = eel_g_str_list_copy (file->details->extension_emblems);
+ keywords = g_list_concat (keywords, eel_g_str_list_copy (file->details->pending_extension_emblems));
+ keywords = g_list_concat (keywords, nautilus_file_get_metadata_list (file, NAUTILUS_METADATA_KEY_EMBLEMS));
+
+ return sort_keyword_list_and_remove_duplicates (keywords);
+}
/**
* nautilus_file_get_emblem_icons
@@ -6466,57 +6516,6 @@ nautilus_file_get_emblem_icons (NautilusFile *file)
return icons;
}
-static GList *
-sort_keyword_list_and_remove_duplicates (GList *keywords)
-{
- GList *p;
- GList *duplicate_link;
-
- if (keywords != NULL) {
- keywords = g_list_sort (keywords, (GCompareFunc) g_utf8_collate);
-
- p = keywords;
- while (p->next != NULL) {
- if (strcmp ((const char *) p->data, (const char *) p->next->data) == 0) {
- duplicate_link = p->next;
- keywords = g_list_remove_link (keywords, duplicate_link);
- g_list_free_full (duplicate_link, g_free);
- } else {
- p = p->next;
- }
- }
- }
-
- return keywords;
-}
-
-/**
- * nautilus_file_get_keywords
- *
- * Return this file's keywords.
- * @file: NautilusFile representing the file in question.
- *
- * Returns: A list of keywords.
- *
- **/
-GList *
-nautilus_file_get_keywords (NautilusFile *file)
-{
- GList *keywords;
-
- if (file == NULL) {
- return NULL;
- }
-
- g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
-
- keywords = eel_g_str_list_copy (file->details->extension_emblems);
- keywords = g_list_concat (keywords, eel_g_str_list_copy (file->details->pending_extension_emblems));
- keywords = g_list_concat (keywords, nautilus_file_get_metadata_list (file, NAUTILUS_METADATA_KEY_EMBLEMS));
-
- return sort_keyword_list_and_remove_duplicates (keywords);
-}
-
/**
* nautilus_file_is_symbolic_link
*
diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h
index 93b6358..1da0036 100644
--- a/libnautilus-private/nautilus-file.h
+++ b/libnautilus-private/nautilus-file.h
@@ -205,7 +205,6 @@ NautilusRequestStatus nautilus_file_get_deep_counts (Nautilu
gboolean nautilus_file_should_show_thumbnail (NautilusFile *file);
gboolean nautilus_file_should_show_directory_item_count (NautilusFile *file);
gboolean nautilus_file_should_show_type (NautilusFile *file);
-GList * nautilus_file_get_keywords (NautilusFile *file);
GList * nautilus_file_get_emblem_icons (NautilusFile *file);
char * nautilus_file_get_top_left_text (NautilusFile *file);
char * nautilus_file_peek_top_left_text (NautilusFile *file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]