[nautilus/gnome-3-20] mime-actions: don't use g_object_set to set dialog text
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-20] mime-actions: don't use g_object_set to set dialog text
- Date: Thu, 28 Apr 2016 09:43:02 +0000 (UTC)
commit 578bcb3ad6cd86cefc60fa18c21f48f5c1271d2d
Author: Ernestas Kulik <ernestas kulik gmail com>
Date: Mon Apr 4 11:04:37 2016 +0300
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
src/nautilus-mime-actions.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index fafed6c..c8e88bc 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]