mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-29 03:34:16 +00:00
general: Remove remaining desktop-file-related code
This commit is contained in:
parent
14b734b34a
commit
f183d59337
8 changed files with 2 additions and 73 deletions
|
@ -513,15 +513,6 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
|
|||
nautilus_file_unref (target_file);
|
||||
return;
|
||||
}
|
||||
else if (dropped_file != NULL && nautilus_file_is_launcher (dropped_file))
|
||||
{
|
||||
if (actions & GDK_ACTION_MOVE)
|
||||
{
|
||||
*action = GDK_ACTION_MOVE;
|
||||
}
|
||||
nautilus_file_unref (target_file);
|
||||
return;
|
||||
}
|
||||
else if (target_file != NULL && nautilus_file_is_archive (target_file))
|
||||
{
|
||||
*action = GDK_ACTION_COPY;
|
||||
|
|
|
@ -171,8 +171,6 @@ struct NautilusFileDetails
|
|||
|
||||
eel_boolean_bit is_thumbnailing : 1;
|
||||
|
||||
eel_boolean_bit is_launcher : 1;
|
||||
eel_boolean_bit is_trusted_link : 1;
|
||||
eel_boolean_bit is_symlink : 1;
|
||||
eel_boolean_bit is_mountpoint : 1;
|
||||
eel_boolean_bit is_hidden : 1;
|
||||
|
@ -286,4 +284,4 @@ void nautilus_file_operation_free (NautilusFileOperation
|
|||
void nautilus_file_operation_complete (NautilusFileOperation *op,
|
||||
GFile *result_location,
|
||||
GError *error);
|
||||
void nautilus_file_operation_cancel (NautilusFileOperation *op);
|
||||
void nautilus_file_operation_cancel (NautilusFileOperation *op);
|
||||
|
|
|
@ -702,40 +702,6 @@ nautilus_is_file_roller_installed (void)
|
|||
return installed > 0 ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/* Returns TRUE if the file is in XDG_DATA_DIRS. This is used for
|
||||
* deciding if a desktop file is "trusted" based on the path */
|
||||
gboolean
|
||||
nautilus_is_in_system_dir (GFile *file)
|
||||
{
|
||||
const char * const *data_dirs;
|
||||
char *path;
|
||||
int i;
|
||||
gboolean res;
|
||||
|
||||
if (!g_file_is_native (file))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
path = g_file_get_path (file);
|
||||
|
||||
res = FALSE;
|
||||
|
||||
data_dirs = g_get_system_data_dirs ();
|
||||
for (i = 0; path != NULL && data_dirs[i] != NULL; i++)
|
||||
{
|
||||
if (g_str_has_prefix (path, data_dirs[i]))
|
||||
{
|
||||
res = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (path);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
GHashTable *
|
||||
nautilus_trashed_files_get_original_directories (GList *files,
|
||||
GList **unhandled_files)
|
||||
|
|
|
@ -38,7 +38,6 @@ gboolean nautilus_is_root_directory (GFile *dir);
|
|||
gboolean nautilus_is_home_directory (GFile *dir);
|
||||
gboolean nautilus_is_home_directory_file (GFile *dir,
|
||||
const char *filename);
|
||||
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_starred_directory (GFile *dir);
|
||||
|
|
|
@ -503,8 +503,6 @@ nautilus_file_clear_info (NautilusFile *file)
|
|||
file->details->thumbnail_path = NULL;
|
||||
file->details->thumbnailing_failed = FALSE;
|
||||
|
||||
file->details->is_launcher = FALSE;
|
||||
file->details->is_trusted_link = FALSE;
|
||||
file->details->is_symlink = FALSE;
|
||||
file->details->is_hidden = FALSE;
|
||||
file->details->is_mountpoint = FALSE;
|
||||
|
@ -4468,18 +4466,6 @@ nautilus_file_monitor_remove (NautilusFile *file,
|
|||
NAUTILUS_FILE_CLASS (G_OBJECT_GET_CLASS (file))->monitor_remove (file, client);
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_file_is_launcher (NautilusFile *file)
|
||||
{
|
||||
return file->details->is_launcher;
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_file_is_trusted_link (NautilusFile *file)
|
||||
{
|
||||
return file->details->is_trusted_link;
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_file_has_activation_uri (NautilusFile *file)
|
||||
{
|
||||
|
@ -9327,12 +9313,6 @@ nautilus_drag_can_accept_files (NautilusFile *drop_target_item)
|
|||
return res;
|
||||
}
|
||||
|
||||
/* Launchers are an acceptable drop target */
|
||||
if (nautilus_file_is_launcher (drop_target_item))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (nautilus_is_file_roller_installed () &&
|
||||
nautilus_file_is_archive (drop_target_item))
|
||||
{
|
||||
|
|
|
@ -454,8 +454,6 @@ GList *nautilus_file_list_filter_hidden (GList
|
|||
/* Get the URI that's used when activating the file.
|
||||
* Getting this can require reading the contents of the file.
|
||||
*/
|
||||
gboolean nautilus_file_is_launcher (NautilusFile *file);
|
||||
gboolean nautilus_file_is_trusted_link (NautilusFile *file);
|
||||
gboolean nautilus_file_has_activation_uri (NautilusFile *file);
|
||||
char * nautilus_file_get_activation_uri (NautilusFile *file);
|
||||
GFile * nautilus_file_get_activation_location (NautilusFile *file);
|
||||
|
|
|
@ -31,7 +31,6 @@ static char *used_metadata_names[] =
|
|||
NAUTILUS_METADATA_KEY_CUSTOM_ICON,
|
||||
NAUTILUS_METADATA_KEY_CUSTOM_ICON_NAME,
|
||||
NAUTILUS_METADATA_KEY_EMBLEMS,
|
||||
NAUTILUS_METADATA_KEY_DESKTOP_FILE_TRUSTED,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -42,6 +42,4 @@
|
|||
#define NAUTILUS_METADATA_KEY_CUSTOM_ICON_NAME "custom-icon-name"
|
||||
#define NAUTILUS_METADATA_KEY_EMBLEMS "emblems"
|
||||
|
||||
#define NAUTILUS_METADATA_KEY_DESKTOP_FILE_TRUSTED "trusted"
|
||||
|
||||
guint nautilus_metadata_get_id (const char *metadata);
|
||||
guint nautilus_metadata_get_id (const char *metadata);
|
||||
|
|
Loading…
Reference in a new issue