[gnome-flashback/gnome-3-22] notifications: avoid a deprecation warnings
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/gnome-3-22] notifications: avoid a deprecation warnings
- Date: Mon, 24 Oct 2016 15:49:58 +0000 (UTC)
commit c132acfeb2a82b48d0f6cea7351d22faacac10b8
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Oct 24 18:37:32 2016 +0300
notifications: avoid a deprecation warnings
gnome-flashback/libnotifications/nd-queue.c | 12 ++++++++++++
gnome-flashback/libnotifications/nd-stack.c | 10 ++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libnotifications/nd-queue.c b/gnome-flashback/libnotifications/nd-queue.c
index e0a27c2..4bfb539 100644
--- a/gnome-flashback/libnotifications/nd-queue.c
+++ b/gnome-flashback/libnotifications/nd-queue.c
@@ -99,7 +99,9 @@ on_screen_monitors_changed (GdkScreen *screen,
nscreen = queue->priv->screen;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
n_monitors = gdk_screen_get_n_monitors (screen);
+ G_GNUC_END_IGNORE_DEPRECATIONS
if (n_monitors > nscreen->n_stacks) {
/* grow */
@@ -155,7 +157,9 @@ create_stacks_for_screen (NdQueue *queue,
nscreen = queue->priv->screen;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
nscreen->n_stacks = gdk_screen_get_n_monitors (screen);
+ G_GNUC_END_IGNORE_DEPRECATIONS
nscreen->stacks = g_renew (NdStack *,
nscreen->stacks,
@@ -556,7 +560,10 @@ get_stack_with_pointer (NdQueue *queue)
pointer = gdk_seat_get_pointer (seat);
gdk_device_get_position (pointer, &screen, &x, &y);
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
+ G_GNUC_END_IGNORE_DEPRECATIONS
if (monitor_num >= queue->priv->screen->n_stacks) {
/* screw it - dump it on the last one we'll get
@@ -706,8 +713,11 @@ update_dock (NdQueue *queue)
gtk_status_icon_get_geometry (status_icon, &screen, &area, NULL);
G_GNUC_END_IGNORE_DEPRECATIONS
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
monitor_num = gdk_screen_get_monitor_at_point (screen, area.x, area.y);
gdk_screen_get_monitor_geometry (screen, monitor_num, &area);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
height = MIN (height, (area.height / 2));
gtk_widget_set_size_request (queue->priv->dock_scrolled_window,
WIDTH,
@@ -753,8 +763,10 @@ popup_dock (NdQueue *queue,
/* position roughly */
gtk_window_set_screen (GTK_WINDOW (queue->priv->dock), screen);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
monitor_num = gdk_screen_get_monitor_at_point (screen, area.x, area.y);
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_foreach (GTK_CONTAINER (queue->priv->dock),
(GtkCallback) gtk_widget_show_all, NULL);
diff --git a/gnome-flashback/libnotifications/nd-stack.c b/gnome-flashback/libnotifications/nd-stack.c
index 4ebfbf2..9779203 100644
--- a/gnome-flashback/libnotifications/nd-stack.c
+++ b/gnome-flashback/libnotifications/nd-stack.c
@@ -111,8 +111,11 @@ get_work_area (NdStack *stack,
/* Defaults in case of error */
rect->x = 0;
rect->y = 0;
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
rect->width = gdk_screen_get_width (stack->priv->screen);
rect->height = gdk_screen_get_height (stack->priv->screen);
+ G_GNUC_END_IGNORE_DEPRECATIONS
if (workarea == None)
return FALSE;
@@ -284,7 +287,10 @@ nd_stack_new (GdkScreen *screen,
NdStack *stack;
g_assert (screen != NULL && GDK_IS_SCREEN (screen));
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_assert (monitor < (guint)gdk_screen_get_n_monitors (screen));
+ G_GNUC_END_IGNORE_DEPRECATIONS
stack = g_object_new (ND_TYPE_STACK, NULL);
stack->priv->screen = screen;
@@ -328,9 +334,13 @@ nd_stack_shift_notifications (NdStack *stack,
int n_wins;
get_work_area (stack, &workarea);
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_screen_get_monitor_geometry (stack->priv->screen,
stack->priv->monitor,
&monitor);
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
gdk_rectangle_intersect (&monitor, &workarea, &workarea);
add_padding_to_rect (&workarea);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]