[totem] screensaver: Rename variable to inhibit_cookie



commit 80f76fb3c44d3c2fc0e9b3c0c464ed0643234d89
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 10 16:12:45 2012 +0200

    screensaver: Rename variable to inhibit_cookie
    
    It's not a signal handler ID.

 src/plugins/screensaver/totem-screensaver.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/screensaver/totem-screensaver.c b/src/plugins/screensaver/totem-screensaver.c
index adb7b51..4b05867 100644
--- a/src/plugins/screensaver/totem-screensaver.c
+++ b/src/plugins/screensaver/totem-screensaver.c
@@ -53,7 +53,7 @@ typedef struct {
 
 	guint          handler_id_playing;
 	guint          handler_id_metadata;
-	guint          handler_id_inhibit;
+	guint          inhibit_cookie;
 } TotemScreensaverPluginPrivate;
 
 TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_SCREENSAVER_PLUGIN,
@@ -87,20 +87,22 @@ totem_screensaver_update_from_state (TotemObject *totem,
 
 	if ((totem_is_playing (totem) != FALSE && has_video_frames) ||
 	    (totem_is_playing (totem) != FALSE && !lock_screensaver_on_audio)) {
-		if (pi->priv->handler_id_inhibit == 0) {
+		if (pi->priv->inhibit_cookie == 0) {
 			GtkWindow *window;
 
 			window = totem_get_main_window (totem);
-			pi->priv->handler_id_inhibit = gtk_application_inhibit (GTK_APPLICATION (totem),
+			g_message ("doing it");
+			pi->priv->inhibit_cookie = gtk_application_inhibit (GTK_APPLICATION (totem),
 										window,
 										GTK_APPLICATION_INHIBIT_IDLE,
 										_("Playing a movie"));
 			g_object_unref (window);
 		}
 	} else {
-		if (pi->priv->handler_id_inhibit != 0) {
-			gtk_application_uninhibit (GTK_APPLICATION (pi->priv->totem), pi->priv->handler_id_inhibit);
-			pi->priv->handler_id_inhibit = 0;
+		if (pi->priv->inhibit_cookie != 0) {
+			g_message ("undoing it");
+			gtk_application_uninhibit (GTK_APPLICATION (pi->priv->totem), pi->priv->inhibit_cookie);
+			pi->priv->inhibit_cookie = 0;
 		}
 	}
 }
@@ -170,9 +172,9 @@ impl_deactivate	(PeasActivatable *plugin)
 		pi->priv->handler_id_metadata = 0;
 	}
 
-	if (pi->priv->handler_id_inhibit != 0) {
-		gtk_application_uninhibit (GTK_APPLICATION (pi->priv->totem), pi->priv->handler_id_inhibit);
-		pi->priv->handler_id_inhibit = 0;
+	if (pi->priv->inhibit_cookie != 0) {
+		gtk_application_uninhibit (GTK_APPLICATION (pi->priv->totem), pi->priv->inhibit_cookie);
+		pi->priv->inhibit_cookie = 0;
 	}
 
 	g_object_unref (pi->priv->totem);



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