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-28 11:27:46 +0200
commit578bcb3ad6cd86cefc60fa18c21f48f5c1271d2d (patch)
tree037d9cb118f167e35cd04bab0baaba2341c11947
parentf796e6c9c3f89deb8b93984653cf95be223c2d13 (diff)
downloadnautilus-578bcb3ad6cd86cefc60fa18c21f48f5c1271d2d.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 fafed6c1d..c8e88bcd6 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1129,11 +1129,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));
@@ -1142,11 +1140,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);
}