summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestas.kulik@gmail.com>2016-04-04 11:04:37 +0300
committerCarlos Soriano <csoriano@gnome.org>2016-04-14 11:35:36 +0200
commit2ab8c235fbe47ab363335615f341d7b6a953517e (patch)
tree81d7326f94b0f5974995c2a3617c5598b4bfe020
parent0b61abdadbc1f6c55f97c7a00d315ea32f8e03b4 (diff)
downloadnautilus-2ab8c235fbe47ab363335615f341d7b6a953517e.tar.gz
mime-actions: don't use g_object_set to set dialog text
Currently, the text for unhandled type message dialogs is set by setting the associated GObject properties. That is unnecessary and results in hardcoded property names. The fix is to use GtkMessageDialog functions. https://bugzilla.gnome.org/show_bug.cgi?id=627259
-rw-r--r--src/nautilus-mime-actions.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 7a1a47097..a7fd4c9c7 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1120,11 +1120,9 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
0,
- NULL);
- g_object_set (dialog,
- "text", error_message,
- "secondary-text", _("The file is of an unknown type"),
- NULL);
+ "%s", error_message);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ _("The file is of an unknown type"));
} else {
char *text;
text = g_strdup_printf (_("There is no application installed for ā€œ%sā€ files"), g_content_type_get_description (mime_type));
@@ -1133,11 +1131,9 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
0,
- NULL);
- g_object_set (dialog,
- "text", error_message,
- "secondary-text", text,
- NULL);
+ "%s", error_message);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ text);
g_free (text);
}