[gnome-photos] error-box: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] error-box: Use g_auto*
- Date: Tue, 24 Oct 2017 18:22:11 +0000 (UTC)
commit fd5f49096417586ac280e834a2d1568e512cb1c4
Author: Ekta Nandwani <mailnandwaniekta gmail com>
Date: Sun Oct 15 17:25:43 2017 +0530
error-box: Use g_auto*
https://bugzilla.gnome.org/show_bug.cgi?id=788174
src/photos-error-box.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-error-box.c b/src/photos-error-box.c
index d6727cb..037542e 100644
--- a/src/photos-error-box.c
+++ b/src/photos-error-box.c
@@ -104,19 +104,19 @@ photos_error_box_new (void)
void
photos_error_box_update (PhotosErrorBox *self, const gchar *primary, const gchar *secondary)
{
- gchar *markup;
-
if (primary != NULL)
{
+ g_autofree gchar *markup = NULL;
+
markup = g_markup_printf_escaped ("<big><b>%s</b></big>", primary);
gtk_label_set_markup (GTK_LABEL (self->primary_label), markup);
- g_free (markup);
}
if (secondary != NULL)
{
+ g_autofree gchar *markup = NULL;
+
markup = g_markup_escape_text (secondary, -1);
gtk_label_set_markup (GTK_LABEL (self->secondary_label), markup);
- g_free (markup);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]