[gnumeric] Compilation: avoid deprecated pango_trim_string.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: avoid deprecated pango_trim_string.
- Date: Sat, 2 Dec 2017 21:07:41 +0000 (UTC)
commit bb916e89da31201d669f9078b8de9512ec74e56b
Author: Morten Welinder <terra gnome org>
Date: Sat Dec 2 16:07:13 2017 -0500
Compilation: avoid deprecated pango_trim_string.
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-doc-metadata.c | 8 +++++---
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index ad62d3a..6635ad3 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-02 Morten Welinder <terra gnome org>
+
+ * dialog-doc-metadata.c (trim_string): trivial replacement for
+ pango_trim_string.
+
2017-12-01 Morten Welinder <terra gnome org>
* Release 1.12.37
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index 48d963e..dea89e3 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -150,6 +150,8 @@ typedef struct {
} DialogDocMetaData;
+#define trim_string(s_) g_strstrip (g_strdup ((s_)))
+
static gchar *dialog_doc_metadata_get_prop_val (DialogDocMetaData *state, char const *prop_name,
GValue *prop_value);
@@ -1411,7 +1413,7 @@ cb_dialog_doc_metadata_add_clicked (G_GNUC_UNUSED GtkWidget *w,
{
const gchar *name = gtk_entry_get_text (state->ppt_name);
const gchar *value = gtk_entry_get_text (state->ppt_value);
- gchar *name_trimmed = pango_trim_string (name);
+ gchar *name_trimmed = trim_string (name);
GType t;
GtkTreeIter filter_iter;
@@ -1744,7 +1746,7 @@ cb_dialog_doc_metadata_ppt_changed (G_GNUC_UNUSED GtkEntry *entry,
name = gtk_entry_get_text (state->ppt_name);
value = gtk_entry_get_text (state->ppt_value);
- name_trimmed = pango_trim_string (name);
+ name_trimmed = trim_string (name);
enable = strlen (name_trimmed) > 0 && strlen (value) > 0;
@@ -1786,7 +1788,7 @@ cb_dialog_doc_metadata_ppt_name_changed (G_GNUC_UNUSED GtkEntry *entry,
gchar *str = NULL;
name = gtk_entry_get_text (state->ppt_name);
- name_trimmed = pango_trim_string (name);
+ name_trimmed = trim_string (name);
enable = strlen (name_trimmed) > 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]