Commit 27b039b3 authored by Carlos Soriano Sánchez's avatar Carlos Soriano Sánchez

general: Rename from 'favorite' to 'starred'

It was a mix of both terms, given that tracker uses 'favorite' but we
use 'starred' in the UI. Since the part that interact with tracker is
minimal, is better to be consistent with the UI.

This renames 'favorite' to 'starred' except the tracker queries.
parent 275512d5
......@@ -244,11 +244,11 @@
<summary>Default list view zoom level</summary>
</key>
<key type="as" name="default-visible-columns">
<default>[ 'name', 'size', 'date_modified', 'favorite' ]</default>
<default>[ 'name', 'size', 'date_modified', 'starred' ]</default>
<summary>Columns visible in list view</summary>
</key>
<key type="as" name="default-column-order">
<default>[ 'name', 'size', 'type', 'owner', 'group', 'permissions', 'mime_type', 'where', 'date_modified', 'date_modified_with_time', 'date_accessed', 'recency', 'favorite' ]</default>
<default>[ 'name', 'size', 'type', 'owner', 'group', 'permissions', 'mime_type', 'where', 'date_modified', 'date_modified_with_time', 'date_accessed', 'recency', 'starred' ]</default>
<summary>Column order in list view</summary>
</key>
<key type="b" name="use-tree-view">
......
......@@ -38,9 +38,9 @@
#include <stdlib.h>
gboolean
eel_uri_is_favorites (const gchar *uri)
eel_uri_is_starred (const gchar *uri)
{
return g_str_has_prefix (uri, "favorites:");
return g_str_has_prefix (uri, "starred:");
}
gboolean
......
......@@ -34,7 +34,7 @@ G_BEGIN_DECLS
#define EEL_TRASH_URI "trash:"
#define EEL_SEARCH_URI "x-nautilus-search:"
gboolean eel_uri_is_favorites (const char *uri);
gboolean eel_uri_is_starred (const char *uri);
gboolean eel_uri_is_trash (const char *uri);
gboolean eel_uri_is_search (const char *uri);
gboolean eel_uri_is_other_locations (const char *uri);
......
......@@ -261,8 +261,8 @@ libnautilus_sources = [
'nautilus-search-engine-tracker.h',
'nautilus-tag-manager.c',
'nautilus-tag-manager.h',
'nautilus-favorite-directory.c',
'nautilus-favorite-directory.h'
'nautilus-starred-directory.c',
'nautilus-starred-directory.h'
]
nautilus_deps = [
......
......@@ -635,7 +635,7 @@ nautilus_bookmark_list_can_bookmark_location (NautilusBookmarkList *list,
}
if (nautilus_is_recent_directory (location) ||
nautilus_is_favorite_directory (location) ||
nautilus_is_starred_directory (location) ||
nautilus_is_home_directory (location) ||
nautilus_is_trash_directory (location) ||
nautilus_is_other_locations_directory (location))
......
......@@ -42,7 +42,7 @@ static const char *default_column_order[] =
"date_modified",
"date_accessed",
"recency",
"favorite",
"starred",
NULL
};
......@@ -152,10 +152,10 @@ get_builtin_columns (void)
columns = g_list_append (columns,
g_object_new (NAUTILUS_TYPE_COLUMN,
"name", "favorite",
"attribute", "favorite",
"name", "starred",
"attribute", "starred",
"label", _("Star"),
"description", _("Shows if file is favorite."),
"description", _("Shows if file is starred."),
"default-sort-order", GTK_SORT_DESCENDING,
"xalign", 0.5,
NULL));
......
......@@ -27,7 +27,7 @@
#include "nautilus-file-private.h"
#include "nautilus-file-utilities.h"
#include "nautilus-search-directory.h"
#include "nautilus-favorite-directory.h"
#include "nautilus-starred-directory.h"
#include "nautilus-search-directory-file.h"
#include "nautilus-vfs-file.h"
#include "nautilus-global-preferences.h"
......@@ -817,7 +817,7 @@ nautilus_directory_is_in_starred (NautilusDirectory *directory)
return FALSE;
}
return g_file_has_uri_scheme (directory->details->location, "favorites");
return g_file_has_uri_scheme (directory->details->location, "starred");
}
gboolean
......
......@@ -1300,8 +1300,8 @@ nautilus_file_undo_info_batch_rename_set_data_post (NautilusFileUndoInfoBatchRen
self->priv->new_display_names = g_list_reverse (self->priv->new_display_names);
}
/* favorite files */
G_DEFINE_TYPE (NautilusFileUndoInfoFavorites, nautilus_file_undo_info_favorites, NAUTILUS_TYPE_FILE_UNDO_INFO);
/* starred files */
G_DEFINE_TYPE (NautilusFileUndoInfoFavorites, nautilus_file_undo_info_starred, NAUTILUS_TYPE_FILE_UNDO_INFO);
struct _NautilusFileUndoInfoFavoritesDetails
{
......@@ -1318,13 +1318,13 @@ enum
};
static void
favorites_strings_func (NautilusFileUndoInfo *info,
starred_strings_func (NautilusFileUndoInfo *info,
gchar **undo_label,
gchar **undo_description,
gchar **redo_label,
gchar **redo_description)
{
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_FAVORITES (info);
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_STARRED (info);
if (self->priv->starred)
{
......@@ -1355,7 +1355,7 @@ favorites_strings_func (NautilusFileUndoInfo *info,
}
static void
on_undo_favorite_tags_updated (GObject *object,
on_undo_starred_tags_updated (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
......@@ -1371,10 +1371,10 @@ on_undo_favorite_tags_updated (GObject *object,
}
static void
favorites_redo_func (NautilusFileUndoInfo *info,
starred_redo_func (NautilusFileUndoInfo *info,
GtkWindow *parent_window)
{
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_FAVORITES (info);
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_STARRED (info);
NautilusTagManager *tag_manager;
tag_manager = nautilus_tag_manager_get ();
......@@ -1384,7 +1384,7 @@ favorites_redo_func (NautilusFileUndoInfo *info,
nautilus_tag_manager_star_files (tag_manager,
G_OBJECT (info),
self->priv->files,
on_undo_favorite_tags_updated,
on_undo_starred_tags_updated,
NULL);
}
else
......@@ -1393,16 +1393,16 @@ favorites_redo_func (NautilusFileUndoInfo *info,
nautilus_tag_manager_unstar_files (tag_manager,
G_OBJECT (info),
self->priv->files,
on_undo_favorite_tags_updated,
on_undo_starred_tags_updated,
NULL);
}
}
static void
favorites_undo_func (NautilusFileUndoInfo *info,
starred_undo_func (NautilusFileUndoInfo *info,
GtkWindow *parent_window)
{
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_FAVORITES (info);
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_STARRED (info);
NautilusTagManager *tag_manager;
tag_manager = nautilus_tag_manager_get ();
......@@ -1412,7 +1412,7 @@ favorites_undo_func (NautilusFileUndoInfo *info,
nautilus_tag_manager_unstar_files (tag_manager,
G_OBJECT (info),
self->priv->files,
on_undo_favorite_tags_updated,
on_undo_starred_tags_updated,
NULL);
}
else
......@@ -1420,18 +1420,18 @@ favorites_undo_func (NautilusFileUndoInfo *info,
nautilus_tag_manager_star_files (tag_manager,
G_OBJECT (info),
self->priv->files,
on_undo_favorite_tags_updated,
on_undo_starred_tags_updated,
NULL);
}
}
static void
nautilus_file_undo_info_favorites_set_property (GObject *object,
nautilus_file_undo_info_starred_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_FAVORITES (object);
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_STARRED (object);
switch (prop_id)
{
......@@ -1455,34 +1455,34 @@ nautilus_file_undo_info_favorites_set_property (GObject *object,
}
static void
nautilus_file_undo_info_favorites_init (NautilusFileUndoInfoFavorites *self)
nautilus_file_undo_info_starred_init (NautilusFileUndoInfoFavorites *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, nautilus_file_undo_info_favorites_get_type (),
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, nautilus_file_undo_info_starred_get_type (),
NautilusFileUndoInfoFavoritesDetails);
}
static void
nautilus_file_undo_info_favorites_finalize (GObject *obj)
nautilus_file_undo_info_starred_finalize (GObject *obj)
{
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_FAVORITES (obj);
NautilusFileUndoInfoFavorites *self = NAUTILUS_FILE_UNDO_INFO_STARRED (obj);
nautilus_file_list_free (self->priv->files);
G_OBJECT_CLASS (nautilus_file_undo_info_favorites_parent_class)->finalize (obj);
G_OBJECT_CLASS (nautilus_file_undo_info_starred_parent_class)->finalize (obj);
}
static void
nautilus_file_undo_info_favorites_class_init (NautilusFileUndoInfoFavoritesClass *klass)
nautilus_file_undo_info_starred_class_init (NautilusFileUndoInfoFavoritesClass *klass)
{
GObjectClass *oclass = G_OBJECT_CLASS (klass);
NautilusFileUndoInfoClass *iclass = NAUTILUS_FILE_UNDO_INFO_CLASS (klass);
oclass->finalize = nautilus_file_undo_info_favorites_finalize;
oclass->set_property = nautilus_file_undo_info_favorites_set_property;
oclass->finalize = nautilus_file_undo_info_starred_finalize;
oclass->set_property = nautilus_file_undo_info_starred_set_property;
iclass->undo_func = favorites_undo_func;
iclass->redo_func = favorites_redo_func;
iclass->strings_func = favorites_strings_func;
iclass->undo_func = starred_undo_func;
iclass->redo_func = starred_redo_func;
iclass->strings_func = starred_strings_func;
g_type_class_add_private (klass, sizeof (NautilusFileUndoInfoFavoritesDetails));
......@@ -1505,25 +1505,25 @@ nautilus_file_undo_info_favorites_class_init (NautilusFileUndoInfoFavoritesClass
}
GList *
nautilus_file_undo_info_favorites_get_files (NautilusFileUndoInfoFavorites *self)
nautilus_file_undo_info_starred_get_files (NautilusFileUndoInfoFavorites *self)
{
return self->priv->files;
}
gboolean
nautilus_file_undo_info_favorites_is_favorited (NautilusFileUndoInfoFavorites *self)
nautilus_file_undo_info_starred_is_starred (NautilusFileUndoInfoFavorites *self)
{
return self->priv->starred;
}
NautilusFileUndoInfo *
nautilus_file_undo_info_favorites_new (GList *files,
nautilus_file_undo_info_starred_new (GList *files,
gboolean starred)
{
NautilusFileUndoInfoFavorites *self;
self = g_object_new (NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES,
"op-type", NAUTILUS_FILE_UNDO_OP_FAVORITES,
self = g_object_new (NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED,
"op-type", NAUTILUS_FILE_UNDO_OP_STARRED,
"item-count", g_list_length (files),
"files", files,
"starred", starred,
......
......@@ -35,7 +35,7 @@ typedef enum {
NAUTILUS_FILE_UNDO_OP_MOVE,
NAUTILUS_FILE_UNDO_OP_RENAME,
NAUTILUS_FILE_UNDO_OP_BATCH_RENAME,
NAUTILUS_FILE_UNDO_OP_FAVORITES,
NAUTILUS_FILE_UNDO_OP_STARRED,
NAUTILUS_FILE_UNDO_OP_CREATE_EMPTY_FILE,
NAUTILUS_FILE_UNDO_OP_CREATE_FILE_FROM_TEMPLATE,
NAUTILUS_FILE_UNDO_OP_CREATE_FOLDER,
......@@ -218,13 +218,13 @@ void nautilus_file_undo_info_batch_rename_set_data_pre (NautilusFileUndoInfoBatc
void nautilus_file_undo_info_batch_rename_set_data_post (NautilusFileUndoInfoBatchRename *self,
GList *new_files);
/* favorite files */
#define NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES (nautilus_file_undo_info_favorites_get_type ())
#define NAUTILUS_FILE_UNDO_INFO_FAVORITES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES, NautilusFileUndoInfoFavorites))
#define NAUTILUS_FILE_UNDO_INFO_FAVORITES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES, NautilusFileUndoInfoFavoritesClass))
#define NAUTILUS_IS_FILE_UNDO_INFO_FAVORITES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES))
#define NAUTILUS_IS_FILE_UNDO_INFO_FAVORITES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES))
#define NAUTILUS_FILE_UNDO_INFO_FAVORITES_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_FAVORITES, NautilusFileUndoInfoFavoritesClass))
/* starred files */
#define NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED (nautilus_file_undo_info_starred_get_type ())
#define NAUTILUS_FILE_UNDO_INFO_STARRED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED, NautilusFileUndoInfoFavorites))
#define NAUTILUS_FILE_UNDO_INFO_STARRED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED, NautilusFileUndoInfoFavoritesClass))
#define NAUTILUS_IS_FILE_UNDO_INFO_STARRED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED))
#define NAUTILUS_IS_FILE_UNDO_INFO_STARRED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED))
#define NAUTILUS_FILE_UNDO_INFO_STARRED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_FILE_UNDO_INFO_STARRED, NautilusFileUndoInfoFavoritesClass))
typedef struct _NautilusFileUndoInfoFavorites NautilusFileUndoInfoFavorites;
typedef struct _NautilusFileUndoInfoFavoritesClass NautilusFileUndoInfoFavoritesClass;
......@@ -239,11 +239,11 @@ struct _NautilusFileUndoInfoFavoritesClass {
NautilusFileUndoInfoClass parent_class;
};
GType nautilus_file_undo_info_favorites_get_type (void) G_GNUC_CONST;
NautilusFileUndoInfo *nautilus_file_undo_info_favorites_new (GList *files,
GType nautilus_file_undo_info_starred_get_type (void) G_GNUC_CONST;
NautilusFileUndoInfo *nautilus_file_undo_info_starred_new (GList *files,
gboolean starred);
GList *nautilus_file_undo_info_favorites_get_files (NautilusFileUndoInfoFavorites *self);
gboolean nautilus_file_undo_info_favorites_is_favorited (NautilusFileUndoInfoFavorites *self);
GList *nautilus_file_undo_info_starred_get_files (NautilusFileUndoInfoFavorites *self);
gboolean nautilus_file_undo_info_starred_is_starred (NautilusFileUndoInfoFavorites *self);
/* trash */
#define NAUTILUS_TYPE_FILE_UNDO_INFO_TRASH (nautilus_file_undo_info_trash_get_type ())
......
......@@ -322,7 +322,7 @@ nautilus_compute_title_for_location (GFile *location)
{
title = g_strdup (_("Other Locations"));
}
else if (nautilus_file_is_favorite_location (file))
else if (nautilus_file_is_starred_location (file))
{
title = g_strdup (_("Starred"));
}
......@@ -550,13 +550,13 @@ nautilus_is_recent_directory (GFile *dir)
}
gboolean
nautilus_is_favorite_directory (GFile *dir)
nautilus_is_starred_directory (GFile *dir)
{
g_autofree gchar *uri = NULL;
uri = g_file_get_uri (dir);
if (eel_uri_is_favorites (uri))
if (eel_uri_is_starred (uri))
return TRUE;
return FALSE;
......
......@@ -44,7 +44,7 @@ gboolean nautilus_is_home_directory_file (GFile *dir,
gboolean nautilus_is_in_system_dir (GFile *location);
gboolean nautilus_is_search_directory (GFile *dir);
gboolean nautilus_is_recent_directory (GFile *dir);
gboolean nautilus_is_favorite_directory (GFile *dir);
gboolean nautilus_is_starred_directory (GFile *dir);
gboolean nautilus_is_trash_directory (GFile *dir);
gboolean nautilus_is_other_locations_directory (GFile *dir);
GMount * nautilus_get_mounted_mount_for_root (GFile *location);
......
......@@ -159,7 +159,7 @@ static GQuark attribute_name_q,
attribute_link_target_q,
attribute_volume_q,
attribute_free_space_q,
attribute_favorite_q;
attribute_starred_q;
static void nautilus_file_info_iface_init (NautilusFileInfoInterface *iface);
static char *nautilus_file_get_owner_as_string (NautilusFile *file,
......@@ -3571,29 +3571,29 @@ compare_by_type (NautilusFile *file_1,
}
static int
compare_by_favorite (NautilusFile *file_1,
compare_by_starred (NautilusFile *file_1,
NautilusFile *file_2)
{
NautilusTagManager *tag_manager;
g_autofree gchar *uri_1 = NULL;
g_autofree gchar *uri_2 = NULL;
gboolean file_1_is_favorite;
gboolean file_2_is_favorite;
gboolean file_1_is_starred;
gboolean file_2_is_starred;
tag_manager = nautilus_tag_manager_get ();
uri_1 = nautilus_file_get_uri (file_1);
uri_2 = nautilus_file_get_uri (file_2);
file_1_is_favorite = nautilus_tag_manager_file_is_favorite (tag_manager,
file_1_is_starred = nautilus_tag_manager_file_is_starred (tag_manager,
uri_1);
file_2_is_favorite = nautilus_tag_manager_file_is_favorite (tag_manager,
file_2_is_starred = nautilus_tag_manager_file_is_starred (tag_manager,
uri_2);
if (!!file_1_is_favorite == !!file_2_is_favorite)
if (!!file_1_is_starred == !!file_2_is_starred)
{
return 0;
}
else if (file_1_is_favorite && !file_2_is_favorite)
else if (file_1_is_starred && !file_2_is_starred)
{
return -1;
}
......@@ -3806,9 +3806,9 @@ nautilus_file_compare_for_sort (NautilusFile *file_1,
}
break;
case NAUTILUS_FILE_SORT_BY_FAVORITE:
case NAUTILUS_FILE_SORT_BY_STARRED:
{
result = compare_by_favorite (file_1, file_2);
result = compare_by_starred (file_1, file_2);
if (result == 0)
{
result = compare_by_full_path (file_1, file_2);
......@@ -3920,10 +3920,10 @@ nautilus_file_compare_for_sort_by_attribute_q (NautilusFile *file_1,
directories_first,
reversed);
}
else if (attribute == attribute_favorite_q)
else if (attribute == attribute_starred_q)
{
return nautilus_file_compare_for_sort (file_1, file_2,
NAUTILUS_FILE_SORT_BY_FAVORITE,
NAUTILUS_FILE_SORT_BY_STARRED,
directories_first,
reversed);
}
......@@ -4530,7 +4530,7 @@ nautilus_file_get_display_name (NautilusFile *file)
{
if (nautilus_file_is_other_locations (file))
return g_strdup (_("Other Locations"));
if (nautilus_file_is_favorite_location (file))
if (nautilus_file_is_starred_location (file))
return g_strdup (_("Starred"));
return g_strdup (nautilus_file_peek_display_name (file));
......@@ -7552,7 +7552,7 @@ nautilus_file_get_string_attribute_with_default_q (NautilusFile *file,
/* If n/a */
return g_strdup ("");
}
if (attribute_q == attribute_favorite_q)
if (attribute_q == attribute_starred_q)
{
/* If n/a */
return g_strdup ("");
......@@ -8297,7 +8297,7 @@ nautilus_file_is_other_locations (NautilusFile *file)
}
/**
* nautilus_file_is_favorite_location
* nautilus_file_is_starred_location
*
* Check if this file is the Favorite location.
* @file: NautilusFile representing the file in question.
......@@ -8306,7 +8306,7 @@ nautilus_file_is_other_locations (NautilusFile *file)
*
**/
gboolean
nautilus_file_is_favorite_location (NautilusFile *file)
nautilus_file_is_starred_location (NautilusFile *file)
{
g_autofree gchar *uri = NULL;
......@@ -8314,7 +8314,7 @@ nautilus_file_is_favorite_location (NautilusFile *file)
uri = nautilus_file_get_uri (file);
return eel_uri_is_favorites (uri);
return eel_uri_is_starred (uri);
}
/**
......@@ -9403,7 +9403,7 @@ nautilus_file_class_init (NautilusFileClass *class)
attribute_link_target_q = g_quark_from_static_string ("link_target");
attribute_volume_q = g_quark_from_static_string ("volume");
attribute_free_space_q = g_quark_from_static_string ("free_space");
attribute_favorite_q = g_quark_from_static_string ("favorite");
attribute_starred_q = g_quark_from_static_string ("starred");
G_OBJECT_CLASS (class)->finalize = finalize;
G_OBJECT_CLASS (class)->constructor = nautilus_file_constructor;
......
......@@ -55,7 +55,7 @@ typedef enum {
NAUTILUS_FILE_SORT_BY_DISPLAY_NAME,
NAUTILUS_FILE_SORT_BY_SIZE,
NAUTILUS_FILE_SORT_BY_TYPE,
NAUTILUS_FILE_SORT_BY_FAVORITE,
NAUTILUS_FILE_SORT_BY_STARRED,
NAUTILUS_FILE_SORT_BY_MTIME,
NAUTILUS_FILE_SORT_BY_ATIME,
NAUTILUS_FILE_SORT_BY_TRASHED_TIME,
......@@ -216,7 +216,7 @@ gboolean nautilus_file_is_in_starred (Nautilu
gboolean nautilus_file_is_in_admin (NautilusFile *file);
gboolean nautilus_file_is_remote (NautilusFile *file);
gboolean nautilus_file_is_other_locations (NautilusFile *file);
gboolean nautilus_file_is_favorite_location (NautilusFile *file);
gboolean nautilus_file_is_starred_location (NautilusFile *file);
gboolean nautilus_file_is_home (NautilusFile *file);
gboolean nautilus_file_is_desktop_directory (NautilusFile *file);
GError * nautilus_file_get_file_info_error (NautilusFile *file);
......
......@@ -65,7 +65,7 @@
#include <nautilus-extension.h>
#include "nautilus-clipboard.h"
#include "nautilus-search-directory.h"
#include "nautilus-favorite-directory.h"
#include "nautilus-starred-directory.h"
#include "nautilus-directory.h"
#include "nautilus-dnd.h"
#include "nautilus-file-attributes.h"
......@@ -268,7 +268,7 @@ typedef struct
gulong stop_signal_handler;
gulong reload_signal_handler;
GCancellable *favorite_cancellable;
GCancellable *starred_cancellable;
NautilusTagManager *tag_manager;
} NautilusFilesViewPrivate;
......@@ -1564,7 +1564,7 @@ action_star (GSimpleAction *action,
G_OBJECT (view),
selection,
NULL,
priv->favorite_cancellable);
priv->starred_cancellable);
}
static void
......@@ -1584,7 +1584,7 @@ action_unstar (GSimpleAction *action,
G_OBJECT (view),
selection,
NULL,
priv->favorite_cancellable);
priv->starred_cancellable);
}
static void
......@@ -3183,8 +3183,8 @@ nautilus_files_view_finalize (GObject *object)
g_hash_table_destroy (priv->non_ready_files);
g_hash_table_destroy (priv->pending_reveal);
g_cancellable_cancel (priv->favorite_cancellable);
g_clear_object (&priv->favorite_cancellable);
g_cancellable_cancel (priv->starred_cancellable);
g_clear_object (&priv->starred_cancellable);
G_OBJECT_CLASS (nautilus_files_view_parent_class)->finalize (object);
}
......@@ -3434,7 +3434,7 @@ nautilus_files_view_set_location (NautilusView *view,
set_search_query_internal (files_view, previous_query, base_model);
g_object_unref (previous_query);
}
else if (NAUTILUS_IS_FAVORITE_DIRECTORY (directory))
else if (NAUTILUS_IS_STARRED_DIRECTORY (directory))
{
load_directory (NAUTILUS_FILES_VIEW (view), directory);
}
......@@ -3493,7 +3493,7 @@ real_check_empty_states (NautilusFilesView *view)
{
gtk_widget_show (priv->trash_is_empty_widget);
}
else if (eel_uri_is_favorites (uri))
else if (eel_uri_is_starred (uri))
{
gtk_widget_show (priv->starred_is_empty_widget);
}
......@@ -7652,7 +7652,7 @@ real_update_actions_state (NautilusFilesView *view)
break;
}
if (nautilus_tag_manager_file_is_favorite (priv->tag_manager, uri))
if (nautilus_tag_manager_file_is_starred (priv->tag_manager, uri))
{
show_star = FALSE;
}
......@@ -9703,7 +9703,7 @@ nautilus_files_view_init (NautilusFilesView *view)
* changed */
nautilus_application_set_accelerator (app, "view.show-move-to-trash-shortcut-changed-dialog", "<control>Delete");
priv->favorite_cancellable = g_cancellable_new ();
priv->starred_cancellable = g_cancellable_new ();
priv->tag_manager = nautilus_tag_manager_get ();
nautilus_profile_end (NULL);
......
......@@ -69,6 +69,6 @@ struct NautilusListViewDetails {
GRegex *regex;
NautilusTagManager *tag_manager;
GCancellable *favorite_cancellable;
GCancellable *starred_cancellable;
};
......@@ -442,7 +442,7 @@ check_starred_status (GtkTreeModel *model,
}
static void
on_favorites_files_changed (NautilusTagManager *tag_manager,
on_starred_files_changed (NautilusTagManager *tag_manager,
GList *changed_files,
gpointer user_data)
{
......@@ -477,13 +477,13 @@ on_star_cell_renderer_clicked (GtkTreePath *path,
uri = nautilus_file_get_uri (file);
selection = g_list_prepend (NULL, file);
if (nautilus_tag_manager_file_is_favorite (list_view->details->tag_manager, uri))
if (nautilus_tag_manager_file_is_starred (list_view->details->tag_manager, uri))
{
nautilus_tag_manager_unstar_files (list_view->details->tag_manager,
G_OBJECT (list_view),
selection,
NULL,
list_view->details->favorite_cancellable);
list_view->details->starred_cancellable);
}
else
{
......@@ -491,7 +491,7 @@ on_star_cell_renderer_clicked (GtkTreePath *path,
G_OBJECT (list_view),
selection,
NULL,
list_view->details->favorite_cancellable);
list_view->details->starred_cancellable);
}
nautilus_file_list_free (selection);
......@@ -1590,7 +1590,7 @@ apply_columns_settings (NautilusListView *list_view,
}
static void
favorite_cell_data_func (GtkTreeViewColumn *column,
starred_cell_data_func (GtkTreeViewColumn *column,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter,
......@@ -1621,7 +1621,7 @@ favorite_cell_data_func (GtkTreeViewColumn *column,
uri = nautilus_file_get_uri (file);
if (nautilus_tag_manager_file_is_favorite (view->details->tag_manager, uri))
if (nautilus_tag_manager_file_is_starred (view->details->tag_manager, uri))
{
g_object_set (renderer,
"icon-name", "starred-symbolic",
......@@ -2175,7 +2175,7 @@ create_and_set_up_tree_view (NautilusListView *view)
}
else
{
if (g_strcmp0 (name, "favorite") == 0)
if (g_strcmp0 (name, "starred") == 0)
{
cell = gtk_cell_renderer_pixbuf_new ();
g_object_set (cell,
......@@ -2242,10 +2242,10 @@ create_and_set_up_tree_view (NautilusListView *view)
(GtkTreeCellDataFunc) trash_orig_path_cell_data_func,
view, NULL);
}
else if (!strcmp (name, "favorite"))
else if (!strcmp (name, "starred"))
{
gtk_tree_view_column_set_cell_data_func (column, cell,
(GtkTreeCellDataFunc) favorite_cell_data_func,
(GtkTreeCellDataFunc) starred_cell_data_func,
view, NULL);
}
}
......@@ -2350,7 +2350,7 @@ get_visible_columns (NautilusListView *list_view)
GList *l;
g_autofree gchar* uri = NULL;
gboolean in_xdg_dirs;
gboolean is_favorite;
gboolean is_starred;
file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (list_view));
uri = nautilus_file_get_uri (file);
......@@ -2360,7 +2360,7 @@ get_visible_columns (NautilusListView *list_view)
* See https://gitlab.gnome.org/GNOME/nautilus/issues/243
*/
in_xdg_dirs = eel_uri_is_in_xdg_dirs (uri);
is_favorite = eel_uri_is_favorites (uri);
is_starred = eel_uri_is_starred (uri);
visible_columns = nautilus_file_get_metadata_list (file,
NAUTILUS_METADATA_KEY_LIST_VIEW_VISIBLE_COLUMNS);
......@@ -2372,8 +2372,8 @@ get_visible_columns (NautilusListView *list_view)
res = g_ptr_array_new ();
for (l = visible_columns; l != NULL; l = l->next)
{
if (g_strcmp0 (l->data, "favorite") != 0 ||
(g_strcmp0 (l->data, "favorite") == 0 && (in_xdg_dirs || is_favorite)))
if (g_strcmp0 (l->data, "starred") != 0 ||
(g_strcmp0 (l->data, "starred") == 0 && (in_xdg_dirs || is_starred)))
{
g_ptr_array_add (res, l->data);
}
......@@ -3554,11 +3554,11 @@ nautilus_list_view_finalize (GObject *object)
g_regex_unref (list_view->details->regex);
g_cancellable_cancel (list_view->details->favorite_cancellable);
g_clear_object (&list_view->details->favorite_cancellable);
g_cancellable_cancel (list_view->details->starred_cancellable);
g_clear_object (&list_view->details->starred_cancellable);
g_signal_handlers_disconnect_by_func (list_view->details->tag_manager,
on_favorites_files_changed,
on_starred_files_changed,
list_view);
g_free (list_view->details);
......@@ -3914,11 +3914,11 @@ nautilus_list_view_init (NautilusListView *list_view)
list_view->details->regex = g_regex_new ("\\R+", 0, G_REGEX_MATCH_NEWLINE_ANY, NULL);
list_view->details->tag_manager = nautilus_tag_manager_get ();
list_view->details->favorite_cancellable = g_cancellable_new ();
list_view->details->starred_cancellable = g_cancellable_new ();
g_signal_connect (list_view->details->tag_manager,
"favorites-changed",
(GCallback) on_favorites_files_changed,
"starred-changed",
(GCallback) on_starred_files_changed,
list_view);
}
......
......@@ -48,7 +48,7 @@ typedef enum
ROOT_BUTTON,
HOME_BUTTON,
MOUNT_BUTTON,