diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2017-04-27 12:19:42 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2017-04-28 12:38:23 +0300 |
commit | 3cb7fc4b04024c076211776807f3200363e6bd9d (patch) | |
tree | 8d6d3167327b686013aaa8c4d7dfe841ec55680f | |
parent | 0e04428a2b57363039fefc1760ef8c24e6f75fb0 (diff) | |
download | libwnck-3cb7fc4b04024c076211776807f3200363e6bd9d.tar.gz |
wnck-urgency-monitor: avoid deprecation warnings
GtkStatusIcon is deprecated and removed in GTK+ 4. This tool will
be removed when libwnck switches to GTK+ or GtkStatusIcon might be
replaced with libnotify.
-rw-r--r-- | libwnck/wnck-urgency-monitor.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libwnck/wnck-urgency-monitor.c b/libwnck/wnck-urgency-monitor.c index 0bd3bab..f4eecd1 100644 --- a/libwnck/wnck-urgency-monitor.c +++ b/libwnck/wnck-urgency-monitor.c @@ -67,6 +67,7 @@ status_icon_update (WnckWindow *window) return; } + G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (wnck_window_get_icon_is_fallback (window)) { gtk_status_icon_set_from_icon_name (icon, "dialog-information"); @@ -77,7 +78,8 @@ status_icon_update (WnckWindow *window) wnck_window_get_mini_icon (window)); } - gtk_status_icon_set_tooltip_text (icon, wnck_window_get_name (window)); + gtk_status_icon_set_tooltip_text (icon, wnck_window_get_name (window)); + G_GNUC_END_IGNORE_DEPRECATIONS } static void @@ -85,7 +87,10 @@ status_icon_create (WnckWindow *window) { GtkStatusIcon *icon; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS icon = gtk_status_icon_new (); + G_GNUC_END_IGNORE_DEPRECATIONS + g_object_set_data (G_OBJECT (window), "wnck-urgency-icon", icon); g_signal_connect (icon, "activate", @@ -102,7 +107,10 @@ status_icon_remove (WnckWindow *window) icon = status_icon_get (window); if (icon != NULL) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_status_icon_set_visible (icon, FALSE); + G_GNUC_END_IGNORE_DEPRECATIONS + g_object_unref (icon); g_object_set_data (G_OBJECT (window), "wnck-urgency-icon", NULL); } |