[gnome-panel] run-dialog: ignore GCompletion deprecation warnings
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] run-dialog: ignore GCompletion deprecation warnings
- Date: Sun, 8 Mar 2020 14:26:15 +0000 (UTC)
commit 178226668f4dfeb8d3c0c872cc24a78449986d78
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Mar 8 16:20:27 2020 +0200
run-dialog: ignore GCompletion deprecation warnings
gnome-panel/panel-run-dialog.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 8679fd43b..e2f11b385 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -203,10 +203,10 @@ panel_run_dialog_destroy (PanelRunDialog *dialog)
g_free (l->data);
g_list_free (dialog->completion_items);
dialog->completion_items = NULL;
-
- if (dialog->completion)
- g_completion_free (dialog->completion);
- dialog->completion = NULL;
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_clear_pointer (&dialog->completion, g_completion_free);
+ G_GNUC_END_IGNORE_DEPRECATIONS
if (dialog->run_settings)
g_object_unref (dialog->run_settings);
@@ -1469,7 +1469,10 @@ panel_run_dialog_update_completion (PanelRunDialog *dialog,
executables = NULL;
if (!dialog->completion) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog->completion = g_completion_new (NULL);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
dialog->possible_executables = fill_possible_executables ();
dialog->dir_hash = g_hash_table_new_full (g_str_hash,
g_str_equal,
@@ -1518,9 +1521,11 @@ panel_run_dialog_update_completion (PanelRunDialog *dialog,
if (list == NULL)
return;
-
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_completion_add_items (dialog->completion, list);
-
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
dialog->completion_items = g_list_concat (dialog->completion_items,
list);
}
@@ -1601,8 +1606,9 @@ entry_event (GtkEditable *entry,
pos = strlen (prefix);
nprefix = NULL;
- g_completion_complete_utf8 (dialog->completion, nospace_prefix,
- &nprefix);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_completion_complete_utf8 (dialog->completion, nospace_prefix, &nprefix);
+ G_GNUC_END_IGNORE_DEPRECATIONS
if (nprefix) {
int insertpos;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]