CVSROOT: /sources/gnash Module name: gnash Changes by: Benjamin Wolsey <bwy> 08/01/03 15:46:58
Modified files: . : ChangeLog gui : gtk.cpp gui.cpp gui.h Log message: * gui/gui.{h,cpp}: ^F toggles fullscreen (not in the plugin - no shortcuts work here). Add toggleFullscreen() to avoid code duplication. * gui/gtk.cpp: hide menu bar for fullscreen in standalone player. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5291&r2=1.5292 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.125&r2=1.126 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.122&r2=1.123 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.71&r2=1.72 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5291 retrieving revision 1.5292 diff -u -b -r1.5291 -r1.5292 --- ChangeLog 3 Jan 2008 15:11:31 -0000 1.5291 +++ ChangeLog 3 Jan 2008 15:46:57 -0000 1.5292 @@ -1,5 +1,11 @@ 2008-01-03 Benjamin Wolsey <[EMAIL PROTECTED]> + * gui/gui.{h,cpp}: ^F toggles fullscreen (not in the plugin - no shortcuts work + here). Add toggleFullscreen() to avoid code duplication. + * gui/gtk.cpp: hide menu bar for fullscreen in standalone player. + +2008-01-03 Benjamin Wolsey <[EMAIL PROTECTED]> + * gui/gui.{cpp,h}: add setFullscreen(), unsetFullscreen() and _isFullscreen flag as virtual methods. At present only available as a menu toggle in the GTK GUI. Index: gui/gtk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gtk.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -u -b -r1.125 -r1.126 --- gui/gtk.cpp 3 Jan 2008 15:11:32 -0000 1.125 +++ gui/gtk.cpp 3 Jan 2008 15:46:58 -0000 1.126 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: gtk.cpp,v 1.125 2008/01/03 15:11:32 bwy Exp $ */ +/* $Id: gtk.cpp,v 1.126 2008/01/03 15:46:58 bwy Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -492,6 +492,7 @@ // Stand-alone else { gtk_window_fullscreen(GTK_WINDOW(_window)); + gtk_widget_hide(_menubar); } _fullscreen = true; @@ -512,6 +513,7 @@ // Stand-alone else { gtk_window_unfullscreen(GTK_WINDOW(_window)); + gtk_widget_show(_menubar); } _fullscreen = false; @@ -1301,13 +1303,7 @@ { // GNASH_REPORT_FUNCTION; Gui* gui = static_cast<Gui*>(data); - - if (!gui->isFullscreen()) { - gui->setFullscreen(); - } - else { - gui->unsetFullscreen(); - } + gui->toggleFullscreen(); } Index: gui/gui.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gui.cpp,v retrieving revision 1.122 retrieving revision 1.123 diff -u -b -r1.122 -r1.123 --- gui/gui.cpp 3 Jan 2008 15:11:32 -0000 1.122 +++ gui/gui.cpp 3 Jan 2008 15:46:58 -0000 1.123 @@ -169,6 +169,18 @@ } void +Gui::toggleFullscreen() +{ + if (_fullscreen) { + unsetFullscreen(); + } + else { + setFullscreen(); + } +} + + +void Gui::menu_restart() { // GNASH_REPORT_FUNCTION; @@ -433,6 +445,10 @@ case gnash::key::W: menu_quit(); break; + case gnash::key::f: + case gnash::key::F: + toggleFullscreen(); + break; case gnash::key::RIGHT_BRACKET: menu_step_forward(); break; Index: gui/gui.h =================================================================== RCS file: /sources/gnash/gnash/gui/gui.h,v retrieving revision 1.71 retrieving revision 1.72 diff -u -b -r1.71 -r1.72 --- gui/gui.h 3 Jan 2008 15:11:32 -0000 1.71 +++ gui/gui.h 3 Jan 2008 15:46:58 -0000 1.72 @@ -227,6 +227,9 @@ /// virtual void unsetFullscreen(); + // Toggle between fullscreen and normal mode + void toggleFullscreen(); + /// Put the application in "stop" mode // /// When in stop mode the application won't be advanced. _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit