totem r5157 - in trunk: . src



Author: hadess
Date: Wed Feb 20 17:14:25 2008
New Revision: 5157
URL: http://svn.gnome.org/viewvc/totem?rev=5157&view=rev

Log:
2008-02-20  Bastien Nocera  <hadess hadess net>

	* src/totem-fullscreen.c: (totem_fullscreen_finalize):
	Avoid warning on exit when we're fullscreen and
	exiting
	* src/totem.c: (totem_action_exit), (main): Fix _set_fullscreen
	being called multiple times on startup, fixes not being able 
	to get out of fullscreen on startup, and the next normal run
	showing up as maximised (Closes: #376149)



Modified:
   trunk/ChangeLog
   trunk/src/totem-fullscreen.c
   trunk/src/totem.c

Modified: trunk/src/totem-fullscreen.c
==============================================================================
--- trunk/src/totem-fullscreen.c	(original)
+++ trunk/src/totem-fullscreen.c	Wed Feb 20 17:14:25 2008
@@ -446,7 +446,7 @@
 
 	totem_fullscreen_popup_timeout_remove (fs);
 	if (fs->priv->motion_handler_id != 0) {
-		g_signal_handler_disconnect (G_OBJECT (fs),
+		g_signal_handler_disconnect (G_OBJECT (fs->priv->bvw),
 					     fs->priv->motion_handler_id);
 		fs->priv->motion_handler_id = 0;
 	}

Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c	(original)
+++ trunk/src/totem.c	Wed Feb 20 17:14:25 2008
@@ -254,12 +254,12 @@
 	if (totem->gc)
 		g_object_unref (G_OBJECT (totem->gc));
 
-	if (totem->win)
-		gtk_widget_destroy (GTK_WIDGET (totem->win));
-
 	if (totem->fs)
 		g_object_unref (totem->fs);
 
+	if (totem->win)
+		gtk_widget_destroy (GTK_WIDGET (totem->win));
+
 	g_object_unref (totem);
 
 	gnome_vfs_shutdown ();
@@ -667,11 +667,14 @@
 		return FALSE;
 
 	if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) {
-		if (totem->controls_visibility != TOTEM_CONTROLS_UNDEFINED)
+		if (totem->controls_visibility != TOTEM_CONTROLS_UNDEFINED) {
+			g_message ("vis is %d", totem->controls_visibility);
 			totem_action_save_size (totem);
+		}
 		totem_fullscreen_set_fullscreen (totem->fs, TRUE);
 
 		totem->controls_visibility = TOTEM_CONTROLS_FULLSCREEN;
+		g_message ("setting to fullscreen now");
 		show_controls (totem, FALSE);
 		totem_action_set_sensitivity ("fullscreen", FALSE);
 	} else {
@@ -682,10 +685,13 @@
 		action = gtk_action_group_get_action (totem->main_action_group,
 				"show-controls");
 
-		if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
+		if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
 			totem->controls_visibility = TOTEM_CONTROLS_VISIBLE;
-		else
+			g_message ("vis is %d (is active)", totem->controls_visibility);
+		} else {
 			totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
+			g_message ("vis is %d (is not active)", totem->controls_visibility);
+		}
 
 		show_controls (totem, TRUE);
 		totem_action_set_sensitivity ("fullscreen", TRUE);
@@ -697,12 +703,6 @@
 }
 
 void
-fs_exit1_activate_cb (GtkButton *button, Totem *totem)
-{
-	totem_action_fullscreen_toggle (totem);
-}
-
-void
 totem_action_fullscreen_toggle (Totem *totem)
 {
 	if (totem_is_fullscreen (totem) != FALSE)
@@ -721,6 +721,12 @@
 }
 
 void
+fs_exit1_activate_cb (GtkButton *button, Totem *totem)
+{
+	totem_action_fullscreen (totem, FALSE);
+}
+
+void
 totem_action_open (Totem *totem)
 {
 	totem_action_open_dialog (totem, NULL, TRUE);
@@ -3208,12 +3214,10 @@
 	totem_fullscreen_set_video_widget (totem->fs, totem->bvw);
 
 	if (optionstate.fullscreen != FALSE) {
-		totem_action_fullscreen (totem, TRUE);
-		long_action ();
 		gtk_widget_show (totem->win);
 		gdk_flush ();
+		totem_action_fullscreen (totem, TRUE);
 	}
-	long_action ();
 
 	/* The prefs after the video widget is connected */
 	totem_setup_preferences (totem);



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