[cheese] Replace deprecated gtk_window_*_opacity()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Replace deprecated gtk_window_*_opacity()
- Date: Thu, 30 Jan 2014 14:01:35 +0000 (UTC)
commit e7e2184d7466168543385c3efc6f4b1dd0fff2aa
Author: David King <amigadave amigadave com>
Date: Thu Jan 30 13:44:24 2014 +0000
Replace deprecated gtk_window_*_opacity()
Use gtk_widget_*_opacity() instead.
libcheese/cheese-flash.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libcheese/cheese-flash.c b/libcheese/cheese-flash.c
index fc34311..a87602d 100644
--- a/libcheese/cheese-flash.c
+++ b/libcheese/cheese-flash.c
@@ -186,16 +186,16 @@ cheese_flash_class_init (CheeseFlashClass *klass)
static gboolean
cheese_flash_opacity_fade (gpointer data)
{
- GtkWindow *flash_window = GTK_WINDOW (data);
- gdouble opacity = gtk_window_get_opacity (flash_window);
+ GtkWidget *flash_window = GTK_WIDGET (data);
+ gdouble opacity = gtk_widget_get_opacity (flash_window);
/* exponentially decrease */
- gtk_window_set_opacity (flash_window, opacity * FLASH_FADE_FACTOR);
+ gtk_widget_set_opacity (flash_window, opacity * FLASH_FADE_FACTOR);
if (opacity <= FLASH_LOW_THRESHOLD)
{
/* the flasher has finished when we reach the quit value */
- gtk_widget_hide (GTK_WIDGET (flash_window));
+ gtk_widget_hide (flash_window);
return G_SOURCE_REMOVE;
}
@@ -270,7 +270,7 @@ cheese_flash_fire (CheeseFlash *flash)
gtk_window_resize (flash_window, rect.width, rect.height);
gtk_window_move (flash_window, rect.x, rect.y);
- gtk_window_set_opacity (flash_window, 1);
+ gtk_widget_set_opacity (GTK_WIDGET (flash_window), 1);
gtk_widget_show_all (GTK_WIDGET (flash_window));
flash_priv->flash_timeout_tag = g_timeout_add (FLASH_DURATION, cheese_flash_start_fade, (gpointer) flash);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]