[nautilus] mime: remove some useless code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] mime: remove some useless code
- Date: Mon, 20 Dec 2010 17:02:16 +0000 (UTC)
commit b31222dae4c63479e0fe226a761f9c78bf08b6df
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Dec 20 17:58:22 2010 +0100
mime: remove some useless code
As GtkAppChooserDialog already takes care of calling
g_app_info_set_as_last_used_for_content_type()
libnautilus-private/nautilus-mime-actions.c | 6 ------
src/file-manager/fm-directory-view.c | 6 ------
2 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index cf34b54..d6c0a6b 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -1128,7 +1128,6 @@ open_with_response_cb (GtkDialog *dialog,
NautilusFile *file;
GList files;
GAppInfo *info;
- gchar *content_type;
ActivateParametersInstall *parameters = user_data;
if (response_id != GTK_RESPONSE_OK) {
@@ -1140,10 +1139,6 @@ open_with_response_cb (GtkDialog *dialog,
file = g_object_get_data (G_OBJECT (dialog), "mime-action:file");
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
- /* add support for this content type */
- content_type = nautilus_file_get_mime_type (file);
- g_app_info_add_supports_type (info, content_type, NULL);
-
gtk_widget_destroy (GTK_WIDGET (dialog));
g_signal_emit_by_name (nautilus_signaller_get_current (), "mime_data_changed");
@@ -1153,7 +1148,6 @@ open_with_response_cb (GtkDialog *dialog,
files.data = file;
nautilus_launch_application (info, &files, parent_window);
- g_free (content_type);
g_object_unref (info);
}
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index dbda0ed..7918c0f 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -863,7 +863,6 @@ app_chooser_dialog_response_cb (GtkDialog *dialog,
GtkWindow *parent_window;
NautilusFile *file;
GAppInfo *info;
- gchar *content_type;
GList files;
parent_window = user_data;
@@ -876,10 +875,6 @@ app_chooser_dialog_response_cb (GtkDialog *dialog,
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
file = g_object_get_data (G_OBJECT (dialog), "directory-view:file");
- /* add support for this content type */
- content_type = nautilus_file_get_mime_type (file);
- g_app_info_add_supports_type (info, content_type, NULL);
-
g_signal_emit_by_name (nautilus_signaller_get_current (), "mime_data_changed");
files.next = NULL;
@@ -889,7 +884,6 @@ app_chooser_dialog_response_cb (GtkDialog *dialog,
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (info);
- g_free (content_type);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]