[totem] Remove use of sealed struct members for volume popup



commit 1c895947d4c69ec40e6a1e51ffccc4e2487edd13
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Sep 4 14:14:18 2009 +0100

    Remove use of sealed struct members for volume popup
    
    As we now have an accessor function for the popup itself.

 src/totem-fullscreen.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/totem-fullscreen.c b/src/totem-fullscreen.c
index 6d29322..564579b 100644
--- a/src/totem-fullscreen.c
+++ b/src/totem-fullscreen.c
@@ -206,20 +206,10 @@ totem_fullscreen_set_cursor (TotemFullscreen *fs, gboolean state)
 		bacon_video_widget_set_show_cursor (fs->priv->bvw, state);
 }
 
-static GtkWidget *
-totem_fullscreen_get_volume_popup (TotemFullscreen *fs)
-{
-	return gtk_widget_get_toplevel (GTK_SCALE_BUTTON (fs->volume)->plus_button);
-}
-
 static gboolean
 totem_fullscreen_is_volume_popup_visible (TotemFullscreen *fs)
 {
-	GtkWidget *toplevel;
-
-	/* FIXME we should use the popup-visible property instead */
-	toplevel = totem_fullscreen_get_volume_popup (fs);
-	return GTK_WIDGET_VISIBLE (toplevel);
+	return GTK_WIDGET_VISIBLE (gtk_scale_button_get_popup (GTK_SCALE_BUTTON (fs->volume)));
 }
 
 static void
@@ -331,7 +321,7 @@ totem_fullscreen_parent_window_notify (GtkWidget *parent_window,
 	if (totem_fullscreen_is_fullscreen (fs) == FALSE)
 		return;
 
-	popup = totem_fullscreen_get_volume_popup (fs);
+	popup = gtk_scale_button_get_popup (GTK_SCALE_BUTTON (fs->volume));
 	if (parent_window == fs->priv->parent_window &&
 	    gtk_window_is_active (GTK_WINDOW (parent_window)) == FALSE &&
 	    GTK_WIDGET_VISIBLE (popup) == FALSE) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]