Commit eb6a3050 authored by Dave Camp's avatar Dave Camp Committed by Dave Camp

Merged the nautilus-new-mime branch.

2004-07-21  Dave Camp  <dave@novell.com>

	* Merged the nautilus-new-mime branch.
parent d8062f4a
2004-07-21 Dave Camp <dave@novell.com>
* Merged the nautilus-new-mime branch.
2004-07-21 Dave Camp <dave@novell.com>
* src/file-manager/fm-properties-window.c: (should_show_open_with),
(create_open_with_page), (create_properties_window): Show
the Open With tab in the properties window.
2004-07-19 Dave Camp <dave@novell.com>
* libnautilus-private/nautilus-mime-actions.c:
(nautilus_mime_get_default_application_for_file_internal):
* src/file-manager/fm-directory-view.c: (application_selected_cb),
(choose_program), (file_is_launchable): Use the new eel
open with dialog.
Mon Jul 19 12:52:04 2004 Jonathan Blandford <jrb@gnome.org>
* src/file-manager/fm-directory-view.c
(get_default_executable_text_file_action): default to ASK
2004-07-12 Dave Camp <dave@novell.com>
* libnautilus-private/nautilus-mime-actions.c:
(nautilus_mime_actions_get_open_with_file_attributes),
(nautilus_mime_actions_check_if_open_with_attributes_ready),
(nautilus_mime_get_default_application_for_file_internal),
(get_open_with_mime_applications),
(nautilus_mime_get_open_with_applications_for_file):
* libnautilus-private/nautilus-program-choosing.c:
(nautilus_launch_show_file):
* src/file-manager/fm-directory-view.c:
(add_application_to_bonobo_menu),
(get_default_executable_text_file_action),
(get_executable_text_file_action), (can_use_component_for_file),
(get_activation_action), (reset_bonobo_open_with_menu),
(real_update_menus), (fm_directory_view_notify_selection_changed),
(activate_callback):
* src/file-manager/nautilus-directory-view-ui.xml:
MIME overhaul, part 2.
Show the application that will be executed in the Open menu
item. If there are < 4 applications, show them in the main
context menu, otherwise show them in the Open With menu.
2004-07-09 Dave Camp <dave@novell.com>
* test/Makefile.am (noinst_PROGRAMS):
* libnautilus-private/Makefile.am:
* libnautilus-private/nautilus-mime-actions.c:
(nautilus_mime_get_applications_for_file),
(application_supports_uri_scheme_strcmp_style),
(nautilus_mime_has_any_applications_for_file),
(nautilus_mime_set_default_application_for_file),
(gnome_vfs_mime_application_has_id),
(gnome_vfs_mime_id_matches_application),
(gnome_vfs_mime_application_has_id_not_in_list):
* libnautilus-private/nautilus-mime-actions.h:
* libnautilus-private/nautilus-program-choosing.c:
(application_cannot_open_location), (nautilus_launch_show_file),
(nautilus_launch_application):
* libnautilus-private/nautilus-program-choosing.h:
* libnautilus-private/nautilus-view-query.c: (is_known_mime_type),
(nautilus_view_query_check_if_minimum_attributes_ready),
(nautilus_view_query_check_if_full_attributes_ready),
(nautilus_view_query_get_popup_file_attributes),
(nautilus_view_query_check_if_popup_attributes_ready),
(nautilus_view_query_get_default_component_sort_conditions),
(nautilus_view_query_get_default_component_for_file_internal),
(nautilus_view_query_get_default_component_for_file),
(nautilus_view_query_get_fallback_component_for_file),
(nautilus_view_query_get_components_for_file_extended),
(nautilus_view_query_get_components_for_file),
(nautilus_view_query_has_any_components_for_file_extended),
(nautilus_view_query_has_any_components_for_file),
(mime_get_components_for_uri_scheme),
(nautilus_view_query_has_any_components_for_uri_scheme),
(nautilus_view_query_set_default_component_for_file),
(extract_prefix_add_suffix), (mime_type_get_supertype),
(get_explicit_content_view_iids_from_metafile),
(make_bonobo_activation_query_for_explicit_content_view_iids),
(make_bonobo_activation_query_with_known_mime_type),
(make_bonobo_activation_query_with_uri_scheme_only),
(mime_type_list_to_hash_table), (free_key),
(mime_type_hash_table_destroy), (server_has_content_requirements),
(server_matches_content_requirements),
(nautilus_do_component_query), (strv_length), (strv_concat),
(nautilus_view_query_get_popup_components_for_file),
(nautilus_view_query_get_property_components_for_file),
(has_server_info_in_list), (server_info_list_intersection),
(nautilus_view_query_get_property_components_for_files),
(nautilus_view_query_get_popup_components_for_files):
* libnautilus-private/nautilus-view-query.h:
* src/file-manager/fm-directory-view.c: (choose_program),
(open_with_other_program), (other_application_callback),
(can_use_component_for_file), (activate_callback):
* src/nautilus-applicable-views.c: (got_file_info_callback):
* src/nautilus-information-panel.c: (open_with_callback),
(nautilus_information_panel_update_buttons):
* src/nautilus-navigation-window.c: (load_view_as_menu):
* src/nautilus-shell-ui.xml:
* src/nautilus-window-manage-views.c:
(nautilus_window_set_content_view):
* src/nautilus-window-menus.c:
(nautilus_window_initialize_menus_part_1):
* src/nautilus-window.c: (refresh_stored_viewers),
(nautilus_window_set_viewed_file): MIME overhaul, part 1.
Separated gnome-vfs application mime mapping from view querying,
put them in different files.
Got rid of the short list/all application distinction.
Got rid of "View As...", all appropriate views are shown.
Only ever show folders in nautilus - everything else should be
opened in an app.
2004-07-16 Alexander Larsson <alexl@redhat.com>
* data/Makefile.am:
......
......@@ -153,8 +153,6 @@ libnautilus_private_la_SOURCES = \
nautilus-module.h \
nautilus-monitor.c \
nautilus-monitor.h \
nautilus-program-chooser.c \
nautilus-program-chooser.h \
nautilus-program-choosing.c \
nautilus-program-choosing.h \
nautilus-recent.h \
......@@ -189,6 +187,8 @@ libnautilus_private_la_SOURCES = \
nautilus-vfs-file.h \
nautilus-view-identifier.c \
nautilus-view-identifier.h \
nautilus-view-query.c \
nautilus-view-query.h \
$(NULL)
$(lib_LTLIBRARIES): $(dependency_static_libs)
......
This diff is collapsed.
......@@ -32,57 +32,15 @@
NautilusFileAttributes nautilus_mime_actions_get_minimum_file_attributes (void);
NautilusFileAttributes nautilus_mime_actions_get_full_file_attributes (void);
gboolean nautilus_mime_actions_file_needs_full_file_attributes (NautilusFile *file);
GnomeVFSMimeActionType nautilus_mime_get_default_action_type_for_file (NautilusFile *file);
GnomeVFSMimeAction * nautilus_mime_get_default_action_for_file (NautilusFile *file);
GnomeVFSMimeApplication *nautilus_mime_get_default_application_for_file (NautilusFile *file);
gboolean nautilus_mime_is_default_application_for_file_user_chosen (NautilusFile *file);
Bonobo_ServerInfo * nautilus_mime_get_default_component_for_file (NautilusFile *file);
Bonobo_ServerInfo * nautilus_mime_get_default_fallback_component_for_file (NautilusFile *file);
gboolean nautilus_mime_is_default_component_for_file_user_chosen (NautilusFile *file);
GList * nautilus_mime_get_short_list_applications_for_file (NautilusFile *file);
GList * nautilus_mime_get_open_with_applications_for_file (NautilusFile *file);
GList * nautilus_mime_get_short_list_components_for_file (NautilusFile *file);
GList * nautilus_mime_get_all_applications_for_file (NautilusFile *file);
GList * nautilus_mime_get_all_components_for_file (NautilusFile *file);
GList * nautilus_mime_get_all_components_for_file_extended (NautilusFile *file, char *extra_requirements);
GList * nautilus_mime_get_popup_components_for_file (NautilusFile *file);
GList * nautilus_mime_get_popup_components_for_files (GList *files);
GList * nautilus_mime_get_property_components_for_file (NautilusFile *file);
GList * nautilus_mime_get_property_components_for_files (GList *files);
gboolean nautilus_mime_has_any_components_for_file (NautilusFile *file);
gboolean nautilus_mime_has_any_components_for_file_extended (NautilusFile *file, char *extra_requirements);
GList * nautilus_mime_get_applications_for_file (NautilusFile *file);
gboolean nautilus_mime_has_any_applications_for_file (NautilusFile *file);
gboolean nautilus_mime_has_any_applications_for_file_type (NautilusFile *file);
GnomeVFSResult nautilus_mime_set_default_action_type_for_file (NautilusFile *file,
GnomeVFSMimeActionType action_type);
GnomeVFSResult nautilus_mime_set_default_application_for_file (NautilusFile *file,
const char *application_id);
GnomeVFSResult nautilus_mime_set_default_component_for_file (NautilusFile *file,
const char *component_iid);
/* Stored as delta to current user level */
GnomeVFSResult nautilus_mime_set_short_list_applications_for_file (NautilusFile *file,
GList *components);
GnomeVFSResult nautilus_mime_add_application_to_short_list_for_file (NautilusFile *file,
const char *application_id);
GnomeVFSResult nautilus_mime_remove_application_from_short_list_for_file (NautilusFile *file,
const char *application_id);
GnomeVFSResult nautilus_mime_set_short_list_components_for_file (NautilusFile *file,
GList *components);
GnomeVFSResult nautilus_mime_add_component_to_short_list_for_file (NautilusFile *file,
const char *iid);
GnomeVFSResult nautilus_mime_remove_component_from_short_list_for_file (NautilusFile *file,
const char *iid);
/* No way to override system list; can only add. */
GnomeVFSResult nautilus_mime_extend_all_applications_for_file (NautilusFile *file,
GList *applications);
/* Only "user" entries may be removed. */
GnomeVFSResult nautilus_mime_remove_from_all_applications_for_file (NautilusFile *file,
GList *applications);
gboolean nautilus_mime_has_any_components_for_uri_scheme (const char *uri_scheme);
/* No way to add to all components; oafinfo database assumed trusted in this regard. */
#endif /* NAUTILUS_MIME_ACTIONS_H */
......@@ -27,7 +27,6 @@
#include "nautilus-program-choosing.h"
#include "nautilus-mime-actions.h"
#include "nautilus-program-chooser.h"
#include "nautilus-global-preferences.h"
#include "nautilus-icon-factory.h"
#include <eel/eel-glib-extensions.h>
......@@ -63,22 +62,6 @@
#include <gdk/gdkx.h>
#endif
typedef struct {
NautilusFile *file;
GtkWindow *parent_window;
NautilusApplicationChoiceCallback callback;
gpointer callback_data;
} ChooseApplicationCallbackData;
typedef struct {
NautilusFile *file;
GtkWindow *parent_window;
NautilusComponentChoiceCallback callback;
gpointer callback_data;
} ChooseComponentCallbackData;
static GHashTable *choose_application_hash_table, *choose_component_hash_table;
extern char **environ;
/* Cut and paste from gdkspawn-x11.c */
......@@ -119,429 +102,6 @@ my_gdk_spawn_make_environment_for_screen (GdkScreen *screen,
}
static guint
choose_application_hash (gconstpointer p)
{
const ChooseApplicationCallbackData *data;
data = p;
return GPOINTER_TO_UINT (data->file)
^ GPOINTER_TO_UINT (data->callback)
^ GPOINTER_TO_UINT (data->callback_data);
}
static gboolean
choose_application_equal (gconstpointer a,
gconstpointer b)
{
const ChooseApplicationCallbackData *data_a, *data_b;
data_a = a;
data_b = a;
return data_a->file == data_b->file
&& data_a->callback == data_b->callback
&& data_a->callback_data == data_b->callback_data;
}
static void
choose_application_destroy (ChooseApplicationCallbackData *choose_data)
{
nautilus_file_unref (choose_data->file);
if (choose_data->parent_window != NULL) {
g_object_unref (choose_data->parent_window);
}
g_free (choose_data);
}
static guint
choose_component_hash (gconstpointer p)
{
const ChooseApplicationCallbackData *data;
data = p;
return GPOINTER_TO_UINT (data->file)
^ GPOINTER_TO_UINT (data->callback)
^ GPOINTER_TO_UINT (data->callback_data);
}
static gboolean
choose_component_equal (gconstpointer a,
gconstpointer b)
{
const ChooseApplicationCallbackData *data_a, *data_b;
data_a = a;
data_b = a;
return data_a->file == data_b->file
&& data_a->callback == data_b->callback
&& data_a->callback_data == data_b->callback_data;
}
static void
choose_component_destroy (ChooseComponentCallbackData *choose_data)
{
nautilus_file_unref (choose_data->file);
if (choose_data->parent_window != NULL) {
g_object_unref (choose_data->parent_window);
}
g_free (choose_data);
}
/**
* set_up_program_chooser:
*
* Create but don't yet run a program-choosing dialog.
* The caller should run the dialog and destroy it.
*
* @file: Which NautilusFile programs are being chosen for.
* @type: Which type of program is being chosen.
* @parent: Optional window to parent the dialog on.
*
* Return value: The program-choosing dialog, ready to be run.
*/
static GtkWidget *
set_up_program_chooser (NautilusFile *file,
GnomeVFSMimeActionType type,
GtkWindow *parent)
{
GtkWidget *dialog;
g_assert (NAUTILUS_IS_FILE (file));
dialog = nautilus_program_chooser_new (type, file);
if (parent != NULL) {
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
}
return dialog;
}
/**
* nautilus_choose_component_for_file:
*
* Lets user choose a component with which to view a given file.
*
* @file: The NautilusFile to be viewed.
* @parent_window: If supplied, the component-choosing dialog is parented
* on this window.
* @callback: Callback called when choice has been made.
* @callback_data: Parameter passed back when callback is called.
*/
static void
choose_component_callback (NautilusFile *file,
gpointer callback_data)
{
ChooseComponentCallbackData *choose_data;
NautilusViewIdentifier *identifier;
GtkWidget *dialog;
choose_data = callback_data;
/* Remove from the hash table. */
g_assert (g_hash_table_lookup (choose_component_hash_table,
choose_data) == choose_data);
g_hash_table_remove (choose_component_hash_table,
choose_data);
/* The API uses a callback so we can do this non-modally in the future,
* but for now we just use a modal dialog.
*/
identifier = NULL;
dialog = NULL;
if (nautilus_mime_has_any_components_for_file_extended (file,
"NOT nautilus:property_page_name.defined()")) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
choose_data->parent_window);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
identifier = nautilus_program_chooser_get_component (NAUTILUS_PROGRAM_CHOOSER (dialog));
}
} else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_COMPONENT,
file,
choose_data->parent_window);
}
/* Call callback even if identifier is NULL, so caller can
* free callback_data if necessary and present some cancel UI
* if desired.
*/
(* choose_data->callback) (identifier, choose_data->callback_data);
if (dialog != NULL) {
/* Destroy only after callback, since view identifier will
* be destroyed too.
*/
gtk_widget_destroy (GTK_WIDGET (dialog));
}
choose_component_destroy (choose_data);
}
void
nautilus_choose_component_for_file (NautilusFile *file,
GtkWindow *parent_window,
NautilusComponentChoiceCallback callback,
gpointer callback_data)
{
ChooseComponentCallbackData *choose_data;
NautilusFileAttributes attributes;
g_return_if_fail (NAUTILUS_IS_FILE (file));
g_return_if_fail (parent_window == NULL || GTK_IS_WINDOW (parent_window));
g_return_if_fail (callback != NULL);
/* Grab refs to the objects so they will still be around at
* callback time.
*/
nautilus_file_ref (file);
if (parent_window != NULL) {
g_object_ref (parent_window);
}
/* Create data to pass through. */
choose_data = g_new (ChooseComponentCallbackData, 1);
choose_data->file = file;
choose_data->parent_window = parent_window;
choose_data->callback = callback;
choose_data->callback_data = callback_data;
/* Put pending entry into choose hash table. */
if (choose_component_hash_table == NULL) {
choose_component_hash_table = eel_g_hash_table_new_free_at_exit
(choose_component_hash,
choose_component_equal,
"choose component");
}
g_hash_table_insert (choose_component_hash_table,
choose_data, choose_data);
/* Do the rest of the work when the attributes are ready. */
attributes = nautilus_mime_actions_get_full_file_attributes ();
nautilus_file_call_when_ready (file,
attributes,
choose_component_callback,
choose_data);
}
void
nautilus_cancel_choose_component_for_file (NautilusFile *file,
NautilusComponentChoiceCallback callback,
gpointer callback_data)
{
ChooseComponentCallbackData search_criteria;
ChooseComponentCallbackData *choose_data;
if (choose_component_hash_table == NULL) {
return;
}
/* Search for an existing choose in progress. */
search_criteria.file = file;
search_criteria.callback = callback;
search_criteria.callback_data = callback_data;
choose_data = g_hash_table_lookup (choose_component_hash_table,
&search_criteria);
if (choose_data == NULL) {
return;
}
/* Stop it. */
g_hash_table_remove (choose_component_hash_table,
choose_data);
nautilus_file_cancel_call_when_ready (file,
choose_component_callback,
choose_data);
choose_component_destroy (choose_data);
}
static void
dialog_response (GtkDialog *dialog,
int response_id,
ChooseApplicationCallbackData *choose_data)
{
GnomeVFSMimeApplication *application;
application = NULL;
switch (response_id) {
case GTK_RESPONSE_OK:
application = nautilus_program_chooser_get_application (NAUTILUS_PROGRAM_CHOOSER (dialog));
break;
default:
break;
}
(* choose_data->callback) (application, choose_data->callback_data);
if (dialog != NULL) {
/* Destroy only after callback, since view identifier
* will be destroyed too.
*/
gtk_widget_destroy (GTK_WIDGET (dialog));
}
choose_application_destroy (choose_data);
}
/**
* nautilus_choose_application_for_file:
*
* Lets user choose an application with which to open a given file.
*
* @file: The NautilusFile to be viewed.
* @parent_window: If supplied, the application-choosing dialog is parented
* on this window.
* @callback: Callback called when choice has been made.
* @callback_data: Parameter passed back when callback is called.
*/
static void
choose_application_callback (NautilusFile *file,
gpointer callback_data)
{
ChooseApplicationCallbackData *choose_data;
GtkWidget *dialog;
GnomeVFSMimeApplication *application;
choose_data = callback_data;
/* Remove from the hash table. */
g_assert (g_hash_table_lookup (choose_application_hash_table,
choose_data) == choose_data);
g_hash_table_remove (choose_application_hash_table,
choose_data);
/* The API uses a callback so we can do this non-modally in the future,
* but for now we just use a modal dialog.
*/
application = NULL;
dialog = NULL;
if (nautilus_mime_has_any_applications_for_file_type (file)) {
dialog = set_up_program_chooser (file, GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
choose_data->parent_window);
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (dialog_response), choose_data);
gtk_widget_show (dialog);
} else {
nautilus_program_chooser_show_no_choices_message (GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
file,
choose_data->parent_window);
/* Call callback even if identifier is NULL, so caller can
* free callback_data if necessary and present some cancel
* UI if desired.
*/
(* choose_data->callback) (application, choose_data->callback_data);
choose_application_destroy (choose_data);
}
}
void
nautilus_choose_application_for_file (NautilusFile *file,
GtkWindow *parent_window,
NautilusApplicationChoiceCallback callback,
gpointer callback_data)
{
ChooseApplicationCallbackData *choose_data;
NautilusFileAttributes attributes;
g_return_if_fail (NAUTILUS_IS_FILE (file));
g_return_if_fail (parent_window == NULL || GTK_IS_WINDOW (parent_window));
g_return_if_fail (callback != NULL);
/* Grab refs to the objects so they will still be around at
* callback time.
*/
nautilus_file_ref (file);
if (parent_window != NULL) {
g_object_ref (parent_window);
}
/* Create data to pass through. */
choose_data = g_new (ChooseApplicationCallbackData, 1);
choose_data->file = file;
choose_data->parent_window = parent_window;
choose_data->callback = callback;
choose_data->callback_data = callback_data;
/* Put pending entry into choose hash table. */
if (choose_application_hash_table == NULL) {
choose_application_hash_table = eel_g_hash_table_new_free_at_exit
(choose_application_hash,
choose_application_equal,
"choose application");
}
g_hash_table_insert (choose_application_hash_table,
choose_data, choose_data);
/* Do the rest of the work when the attributes are ready. */
attributes = nautilus_mime_actions_get_full_file_attributes ();
nautilus_file_call_when_ready (file,
attributes,
choose_application_callback,
choose_data);
}
typedef struct {
NautilusFile *file;
GtkWindow *parent_window;
} LaunchParameters;
static LaunchParameters *
launch_parameters_new (NautilusFile *file,
GtkWindow *parent_window)
{
LaunchParameters *launch_parameters;
launch_parameters = g_new0 (LaunchParameters, 1);
nautilus_file_ref (file);
launch_parameters->file = file;
g_object_ref (parent_window);
launch_parameters->parent_window = parent_window;
return launch_parameters;
}
static void
launch_parameters_free (LaunchParameters *launch_parameters)
{
g_assert (launch_parameters != NULL);
nautilus_file_unref (launch_parameters->file);
g_object_unref (launch_parameters->parent_window);
g_free (launch_parameters);
}
static void
launch_application_callback (GnomeVFSMimeApplication *application,
gpointer callback_data)
{
LaunchParameters *launch_parameters;
g_assert (callback_data != NULL);
launch_parameters = (LaunchParameters *) callback_data;
if (application != NULL) {
g_assert (NAUTILUS_IS_FILE (launch_parameters->file));
nautilus_launch_application (application,
launch_parameters->file,
launch_parameters->parent_window);
}
launch_parameters_free (launch_parameters);
}
/**
* application_cannot_open_location
*
......@@ -562,6 +122,7 @@ application_cannot_open_location (GnomeVFSMimeApplication *application,
const char *uri_scheme,
GtkWindow *parent_window)
{
#if NEW_MIME_COMPLETE
GtkDialog *message_dialog;
LaunchParameters *launch_parameters;
char *prompt;
......@@ -625,6 +186,7 @@ application_cannot_open_location (GnomeVFSMimeApplication *application,
}
g_free (file_name);
#endif
}
#ifdef HAVE_STARTUP_NOTIFICATION
......@@ -872,8 +434,7 @@ void nautilus_launch_show_file (NautilusFile *file,
GtkWindow *parent_window)
{
GnomeVFSResult result;
GnomeVFSMimeAction *action;
GnomeVFSMimeActionType action_type;
GnomeVFSMimeApplication *application;
GdkScreen *screen;
char **envp;
char *uri, *uri_scheme;
......@@ -889,6 +450,8 @@ void nautilus_launch_show_file (NautilusFile *file,
startup_notify = FALSE;
#endif
g_return_if_fail (!nautilus_file_needs_slow_mime_type (file));
uri = NULL;
if (nautilus_file_is_nautilus_link (file)) {
uri = nautilus_file_get_activation_uri (file);
......@@ -898,10 +461,7 @@ void nautilus_launch_show_file (NautilusFile *file,
uri = nautilus_file_get_uri (file);
}
action = nautilus_mime_get_default_action_for_file (file);
action_type = (action) ? action->action_type :
GNOME_VFS_MIME_ACTION_TYPE_NONE;
application = nautilus_mime_get_default_application_for_file (file);
screen = gtk_window_get_screen (parent_window);
envp = my_gdk_spawn_make_environment_for_screen (screen, NULL);
......@@ -912,10 +472,12 @@ void nautilus_launch_show_file (NautilusFile *file,
sn_error_trap_pop);
/* Only initiate notification if application supports it. */
if (action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION) {
startup_notify = gnome_vfs_application_registry_get_bool_value (action->action.application->id,
if (application) {
startup_notify = gnome_vfs_application_registry_get_bool_value (application->id,
GNOME_VFS_APPLICATION_REGISTRY_STARTUP_NOTIFY,
NULL);
} else {
startup_notify = FALSE;
}
if (startup_notify == TRUE) {
......@@ -954,7 +516,7 @@ void nautilus_launch_show_file (NautilusFile *file,
timestamp = slowly_and_stupidly_obtain_timestamp (sn_display);
binary_name = action->action.application->command