gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gui.cpp


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gui.cpp
Date: Sun, 27 Apr 2008 13:33:59 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/04/27 13:33:59

Modified files:
        .              : ChangeLog 
        gui            : gtk.cpp gui.cpp 

Log message:
                * gui/gui.cpp: leave fullscreen on stop, otherwise the stopped
                  widget will display in the plugin window while we're in 
fullscreen.
                  Seems like logical behaviour anyway.
                * gui/gtk.cpp: no need to call gtk_widget_show repeatedly. Move 
call
                  to stopHook to init() to keep it out of the run() call. Also 
seems
                  more appropriate there.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6415&r2=1.6416
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.176&r2=1.177
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.162&r2=1.163

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6415
retrieving revision 1.6416
diff -u -b -r1.6415 -r1.6416
--- ChangeLog   27 Apr 2008 13:02:15 -0000      1.6415
+++ ChangeLog   27 Apr 2008 13:33:58 -0000      1.6416
@@ -1,3 +1,12 @@
+2008-04-27 Benjamin Wolsey <address@hidden>
+
+       * gui/gui.cpp: leave fullscreen on stop, otherwise the stopped
+         widget will display in the plugin window while we're in fullscreen.
+         Seems like logical behaviour anyway.
+       * gui/gtk.cpp: no need to call gtk_widget_show repeatedly. Move call
+         to stopHook to init() to keep it out of the run() call. Also seems
+         more appropriate there.
+
 2008-04-27 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/check.as: Ming 0.4.0.beta6

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -b -r1.176 -r1.177
--- gui/gtk.cpp 27 Apr 2008 09:46:38 -0000      1.176
+++ gui/gtk.cpp 27 Apr 2008 13:33:59 -0000      1.177
@@ -144,10 +144,6 @@
         log_debug (_("Created top level window"));
     }
 
-    
-    // XXXbjacques: why do we need this?
-    //gtk_container_set_reallocate_redraws(GTK_CONTAINER (_window), TRUE);
-
     addGnashIcon(GTK_WINDOW(_window));
 
     _drawingArea = gtk_drawing_area_new();
@@ -158,6 +154,7 @@
 
     _resumeButton = gtk_button_new();
     gtk_container_add(GTK_CONTAINER(_resumeButton), gtk_label_new(_("Click to 
play")));
+    gtk_widget_show_all(_resumeButton);
 
     // Same here.
     g_object_ref(G_OBJECT(_resumeButton));
@@ -224,6 +221,10 @@
     if ( ! _renderer ) return false;
     set_render_handler(_renderer);
 
+    // The first time stop() was called, stopHook() might not have had a chance
+    // to do anything, because GTK+ wasn't garanteed to be initialised.
+    if (isStopped()) stopHook();
+
     return true;
 }
 
@@ -249,10 +250,6 @@
     g_timeout_add_full (G_PRIORITY_LOW, _interval, (GSourceFunc)advance_movie,
                         this, NULL);
 
-    // The first time stop() was called, stopHook() might not have had a chance
-    // to do anything, because GTK+ wasn't garanteed to be initialised.
-    if (isStopped()) stopHook();
-
     gtk_main();
     return true;
 }
@@ -2272,10 +2269,14 @@
     return true;
 }
 
-
+// This assumes that the parent of _drawingArea is _window, which
+// isn't the case in the plugin fullscreen (it's _overlay). Currently
+// we return from fullscreen when Gui::stop() is called, which
+// seems like a good idea, and also avoids this problem.
 void
 GtkGui::stopHook()
 {
+
     // FIXME: this can't work for the stand-alone player, because _drawingArea 
is
     // packed into a vbox.
     if (! _xid) return;
@@ -2291,7 +2292,6 @@
         gtk_container_add(GTK_CONTAINER(_window), _resumeButton);
     }
 
-    gtk_widget_show_all(_resumeButton);
 }
 
 void
@@ -2311,7 +2311,6 @@
         gtk_container_add(GTK_CONTAINER(_window), _drawingArea);
     }
 
-    gtk_widget_show(_drawingArea);
 }
 
 } // end of namespace gnash

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -b -r1.162 -r1.163
--- gui/gui.cpp 27 Apr 2008 09:46:39 -0000      1.162
+++ gui/gui.cpp 27 Apr 2008 13:33:59 -0000      1.163
@@ -850,10 +850,11 @@
 Gui::stop()
 {
     if ( _stopped ) return;
+    if ( isFullscreen() ) unsetFullscreen();
 
     _stopped = true;
 
-    stopHook ();
+    stopHook();
 }
 
 void




reply via email to

[Prev in Thread] Current Thread [Next in Thread]