gnash-commit
[Top][All Lists]
Advanced

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

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


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gtk.cpp gui/...
Date: Tue, 11 Mar 2008 16:58:24 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/03/11 16:58:24

Modified files:
        .              : ChangeLog 
        gui            : Player.cpp gtk.cpp gtksup.h gui.cpp gui.h 

Log message:
                * gui/Player.cpp: add stubs for all fscommand methods, implement
                  showmenu.
                * gui/gui.{h,cpp}: add showMenu().
                * gui/gtk{.cpp,sup.h}: implement showMenu for gtk (mainly for 
                  fscommand "showmenu").

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5874&r2=1.5875
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.86&r2=1.87
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.154&r2=1.155
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.138&r2=1.139
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.79&r2=1.80

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5874
retrieving revision 1.5875
diff -u -b -r1.5874 -r1.5875
--- ChangeLog   11 Mar 2008 10:57:19 -0000      1.5874
+++ ChangeLog   11 Mar 2008 16:58:23 -0000      1.5875
@@ -1,5 +1,13 @@
 2008-03-11 Benjamin Wolsey <address@hidden>
 
+       * gui/Player.cpp: add stubs for all fscommand methods, implement
+         showmenu.
+       * gui/gui.{h,cpp}: add showMenu().
+       * gui/gtk{.cpp,sup.h}: implement showMenu for gtk (mainly for 
+         fscommand "showmenu").
+
+2008-03-11 Benjamin Wolsey <address@hidden>
+
        * testsuite/actionscript.all/Object.as: check that toLocaleString
          calls toString. Add some tests for when toLocaleString is implemented
          at all.

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- gui/Player.cpp      10 Mar 2008 20:07:05 -0000      1.86
+++ gui/Player.cpp      11 Mar 2008 16:58:23 -0000      1.87
@@ -366,7 +366,6 @@
     // Set host requests fd (if any)
     if ( _hostfd != -1 ) root.setHostFD(_hostfd);
 
-
     _gui->setStage(&root);
 
     // Start loader thread
@@ -393,7 +392,7 @@
     return EXIT_SUCCESS;
 }
 
-/*static private*/
+// static private
 // For handling notification callbacks from ActionScript.
 void
 Player::fs_callback(gnash::sprite_instance* movie, const std::string& command,
@@ -415,11 +414,13 @@
 
        StringNoCaseEqual noCaseCompare;
 
+    // FSCommand quit
        if (noCaseCompare(command, "quit"))
        {
                _gui->quit();
        }
 
+    // FSCommand fullscreen
        if (noCaseCompare(command, "fullscreen"))
        {
                if (noCaseCompare(args, "true")) _gui->setFullscreen();
@@ -427,6 +428,40 @@
                return;
        }
 
+       // FSCommand showmenu
+       if (noCaseCompare(command, "showmenu"))
+       {
+               if (noCaseCompare(args, "true")) _gui->showMenu(true);
+               else if (noCaseCompare(args, "false")) _gui->showMenu(false);
+               return;
+       }
+
+       // FSCommand exec
+       // Note: the pp insists that the file to execute should be in 
+       // a subdirectory 'fscommand' of the 'projector' executable's
+       // location.
+       // In SWF5 there were no restrictions.
+       if (noCaseCompare(command, "exec"))
+       {
+        log_unimpl(_("FScommand exec called with argument %s"), args);
+       }
+
+       // FSCommand allowscale
+       if (noCaseCompare(command, "allowscale"))
+       {
+        log_unimpl(_("FScommand allowscale called with argument %s"), args);
+               return;
+       }
+
+       // FSCommand trapallkeys
+       if (noCaseCompare(command, "trapallkeys"))
+       {
+        log_unimpl(_("FScommand trapallkeys called with argument %s"), args);
+               return;
+       }
+       
+       log_error(_("Unhandled FSCommand %s (%s)"), command, args);
+
 }
 
 std::string
@@ -448,7 +483,7 @@
        return "";
 }
 
-/* private */
+// private
 std::auto_ptr<Gui>
 Player::getGui()
 {

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- gui/gtk.cpp 10 Mar 2008 12:18:50 -0000      1.154
+++ gui/gtk.cpp 11 Mar 2008 16:58:23 -0000      1.155
@@ -279,9 +279,7 @@
         gtk_widget_set_size_request(_drawingArea, -1, -1);
        gtk_window_fullscreen(GTK_WINDOW(_window));
 
-       if (_menubar) {
-           gtk_widget_hide(_menubar);
-       }
+        showMenu(false);
     }
     
     _fullscreen = true;
@@ -379,6 +377,21 @@
 
 }
 
+void
+GtkGui::showMenu(bool show)
+{
+#ifdef USE_MENUS
+if (_menubar)
+{
+    if (show) {
+        gtk_widget_show(_menubar);
+           return;
+       }
+    gtk_widget_hide(_menubar);
+}
+#endif
+}
+
 // private
 void
 GtkGui::setupWindowEvents()

Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- gui/gtksup.h        10 Mar 2008 10:32:09 -0000      1.66
+++ gui/gtksup.h        11 Mar 2008 16:58:23 -0000      1.67
@@ -182,6 +182,8 @@
     
     virtual void showMouse(bool show);
 
+    virtual void showMenu(bool show);
+
  private:
 #ifdef GUI_HILDON
     HildonProgram *_hildon_program;
@@ -190,7 +192,10 @@
     
     // A window only for rendering the plugin as fullscreen.
     GtkWidget  *_overlay;
+    
+    // The area rendered into by Gnash
     GtkWidget   *_drawingArea;    
+
     GtkMenu     *_popup_menu;
     GtkWidget   *_menubar;
     GtkWidget   *_vbox;
@@ -209,8 +214,7 @@
     
     GdkPixbuf* createPixbuf(const gchar *filename);
     
-    // Create a tree model for displaying movie info (not yet properly
-    // implemented).
+    // Create a tree model for displaying movie info
     GtkTreeModel* makeTreeModel (std::auto_ptr<InfoTree> treepointer);
 
     std::auto_ptr<GtkGlue>     _glue;

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -b -r1.138 -r1.139
--- gui/gui.cpp 10 Mar 2008 20:07:06 -0000      1.138
+++ gui/gui.cpp 11 Mar 2008 16:58:23 -0000      1.139
@@ -187,6 +187,17 @@
 }
 
 void
+Gui::showMenu(bool /* show */)
+{
+       static bool warned = false;
+       if (!warned)
+       {
+       log_unimpl(_("menushow not yet supported in this GUI"));
+       warned = true;
+       }
+}
+
+void
 Gui::toggleFullscreen()
 {
        if (_fullscreen) {

Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- gui/gui.h   10 Mar 2008 20:07:06 -0000      1.79
+++ gui/gui.h   11 Mar 2008 16:58:24 -0000      1.80
@@ -234,6 +234,11 @@
     /// @param show true if the mouse should be shown.
     virtual void showMouse(bool show);
     
+    /// Sets whether the menus should be shown (for fscommand)
+    //
+    /// @param show true if the menu bar should be shown.
+    virtual void showMenu(bool show);
+    
     // Toggle between fullscreen and normal mode
     void toggleFullscreen();
 




reply via email to

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