gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10560: Patch for hiding the menubar


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10560: Patch for hiding the menubar in standalone Gnash.
Date: Fri, 06 Feb 2009 16:45:52 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10560
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Fri 2009-02-06 16:45:52 +0100
message:
  Patch for hiding the menubar in standalone Gnash.
modified:
  gui/Player.cpp
  gui/Player.h
  gui/gnash.cpp
  gui/gtk.cpp
  gui/gtksup.h
  gui/gui.cpp
  gui/gui.h
    ------------------------------------------------------------
    revno: 10559.1.1
    author: Kristian Frank Erikson <address@hidden>
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Fri 2009-02-06 16:28:57 +0100
    message:
      Add no-menubar option
    modified:
      gui/Player.cpp
      gui/Player.h
      gui/gnash.cpp
      gui/gtk.cpp
      gui/gtksup.h
      gui/gui.cpp
      gui/gui.h
    ------------------------------------------------------------
    revno: 10559.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Fri 2009-02-06 16:30:47 +0100
    message:
      Rename no-menu to hide-menubar, as it doesn't hide the right-click menu.
      
      Drop mystery 'm' option.
    modified:
      gui/gnash.cpp
=== modified file 'gui/Player.cpp'
--- a/gui/Player.cpp    2008-12-04 10:21:27 +0000
+++ b/gui/Player.cpp    2009-02-06 15:28:57 +0000
@@ -97,7 +97,8 @@
     _fpsDebugTime(0.0),
 #endif
     _hostfd(-1),
-    _startFullscreen(false)
+    _startFullscreen(false),
+    _hideMenu(false)
 {
     init();
 }
@@ -460,6 +461,11 @@
     if (!_windowID && _startFullscreen) {
         _gui->setFullscreen();
     }
+
+    if (!_windowID && _hideMenu) {
+        _gui->hideMenu();
+    }
+    
     _gui->run();
 
     log_debug("Main loop ended, cleaning up");

=== modified file 'gui/Player.h'
--- a/gui/Player.h      2008-11-04 01:14:26 +0000
+++ b/gui/Player.h      2009-02-06 15:28:57 +0000
@@ -137,6 +137,10 @@
        void setStartFullscreen(bool x) {
            _startFullscreen = x;
        }
+       
+    void hideMenu(bool x) {
+           _hideMenu = x;
+       }
 
     void setAudioDumpfile(const std::string& filespec) {
         _audioDump = filespec;
@@ -287,6 +291,7 @@
        // Whether to start Gnash in fullscreen mode.
        // (Or what did you think it meant?)
        bool _startFullscreen;
+       bool _hideMenu;
 
     // The filename to use for dumping audio.
     std::string _audioDump;

=== modified file 'gui/gnash.cpp'
--- a/gui/gnash.cpp     2008-12-28 09:40:28 +0000
+++ b/gui/gnash.cpp     2009-02-06 15:30:47 +0000
@@ -124,6 +124,7 @@
     << endl
     << _("  --max-advances num       Exit after specified number of advances") 
<< endl
     << _("  --fullscreen             Start in fullscreen mode") << endl
+    << _("  --hide-menubar           Start without displaying the menu bar ") 
<< endl
     << endl
     << _("Keys:") << endl
     << endl
@@ -194,9 +195,9 @@
         { 'p', 0,               Arg_parser::no  },
         { 's', "scale",         Arg_parser::yes },
         { 256, "max-advances",  Arg_parser::yes },
-        { 257, "fullscreen",    Arg_parser::no  },        
+        { 257, "fullscreen",    Arg_parser::no  },
+        { 258, "hide-menubar",  Arg_parser::no  },                
         { 'c', 0,               Arg_parser::no  },
-        { 'm', 0,               Arg_parser::yes }, // What is this for?
         { 'd', "delay",         Arg_parser::yes },
         { 'x', "xid",           Arg_parser::yes },
         { 'r', "render-mode",   Arg_parser::yes },
@@ -273,7 +274,10 @@
                     break;
                 case 257:
                     player.setStartFullscreen(true);
-                    break;                    
+                    break;
+                case 258:
+                    player.hideMenu(true);
+                    break;
                 case 's':
                     player.setScale(gnash::utility::clamp<float>(
                                     parser.argument<float>(i),

=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp       2009-01-27 13:53:00 +0000
+++ b/gui/gtk.cpp       2009-02-06 15:28:57 +0000
@@ -351,6 +351,23 @@
     _fullscreen = false;
 }
 
+void
+GtkGui::hideMenu()
+{
+    if (_fullscreen) return;
+
+    // Plugin
+    if (_xid) {
+        return; // Not showing menu if it's a plugin anyway
+    }
+    
+    // Stand-alone
+    else {
+        showMenu(false);
+    }
+}
+
+
 void 
 GtkGui::setCursor(gnash_cursor_type newcursor)
 {

=== modified file 'gui/gtksup.h'
--- a/gui/gtksup.h      2009-01-22 20:10:39 +0000
+++ b/gui/gtksup.h      2009-02-06 15:28:57 +0000
@@ -71,6 +71,8 @@
     
     virtual void setFullscreen();
     virtual void unsetFullscreen();
+    
+    virtual void hideMenu();
 
     /// For System.capabilities information.
     virtual double getPixelAspectRatio();

=== modified file 'gui/gui.cpp'
--- a/gui/gui.cpp       2009-01-22 20:10:39 +0000
+++ b/gui/gui.cpp       2009-02-06 15:28:57 +0000
@@ -178,6 +178,12 @@
     log_unimpl(_("Fullscreen not yet supported in this GUI"));
 }
 
+void
+Gui::hideMenu()
+{
+    log_unimpl(_("Menu hiding not yet supported in this GUI"));
+}
+
 bool
 Gui::showMouse(bool /* show */)
 {

=== modified file 'gui/gui.h'
--- a/gui/gui.h 2009-01-22 20:10:39 +0000
+++ b/gui/gui.h 2009-02-06 15:28:57 +0000
@@ -253,6 +253,10 @@
     /// Return from fullscreen to normal mode.
     ///
     virtual void unsetFullscreen();
+
+    /// Hide the menu bar when using standalone player
+    ///
+    virtual void hideMenu();
     
     /// Sets whether the gui should show the system mouse pointer
     //


reply via email to

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