diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2021-01-17 21:28:21 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2021-01-17 21:28:21 +0100 |
commit | 727e625e29bd8391a164ce665f0c978554f38adf (patch) | |
tree | 5125d084dc5d9af0728fdb76538b5361a034343e /src | |
parent | e3a330f6ef7088fa6b0a4c01e866112891e467f9 (diff) | |
download | gnome-contacts-727e625e29bd8391a164ce665f0c978554f38adf.tar.gz |
cheese-flash: Fix compiler warnings
These should be the last compilers warnings when building.
Diffstat (limited to 'src')
-rw-r--r-- | src/cheese-flash.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/cheese-flash.c b/src/cheese-flash.c index ec89419..2eb4772 100644 --- a/src/cheese-flash.c +++ b/src/cheese-flash.c @@ -97,10 +97,6 @@ cheese_flash_init (CheeseFlash *self) gtk_window_set_accept_focus (window, FALSE); gtk_window_set_focus_on_map (window, FALSE); - /* Make it white */ - gtk_widget_override_background_color (GTK_WIDGET (window), GTK_STATE_NORMAL, - &white); - /* Don't consume input */ gtk_widget_realize (GTK_WIDGET (window)); input_region = cairo_region_create (); @@ -132,7 +128,7 @@ cheese_flash_set_property (GObject *object, GObject *parent; parent = g_value_get_object (value); if (object != NULL) - priv->parent = g_object_ref (parent); + priv->parent = GTK_WIDGET (g_object_ref (parent)); else priv->parent = NULL; } @@ -241,9 +237,9 @@ cheese_flash_fire (CheeseFlash *flash) { CheeseFlashPrivate *priv; GtkWidget *parent; - GdkScreen *screen; + GdkDisplay *display; + GdkMonitor *monitor; GdkRectangle rect, work_rect; - int monitor; GtkWindow *flash_window; g_return_if_fail (CHEESE_IS_FLASH (flash)); @@ -266,15 +262,15 @@ cheese_flash_fire (CheeseFlash *flash) priv->fade_timeout_tag = 0; } - priv->opacity = 1.0; + priv->opacity = 1.0; - parent = gtk_widget_get_toplevel (priv->parent); - screen = gtk_widget_get_screen (parent); - monitor = gdk_screen_get_monitor_at_window (screen, - gtk_widget_get_window (parent)); + parent = gtk_widget_get_toplevel (priv->parent); + display = gdk_display_get_default (); + monitor = gdk_display_get_monitor_at_window (display, + gtk_widget_get_window (parent)); - gdk_screen_get_monitor_geometry (screen, monitor, &rect); - gdk_screen_get_monitor_workarea (screen, monitor, &work_rect); + gdk_monitor_get_geometry (monitor, &rect); + gdk_monitor_get_workarea (monitor, &work_rect); gdk_rectangle_intersect (&work_rect, &rect, &rect); gtk_window_set_transient_for (GTK_WINDOW (flash_window), GTK_WINDOW (parent)); |