[totem] Add support for VLC "toolbar" argument
- From: Bastien Nocera <hadess src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [totem] Add support for VLC "toolbar" argument
 
- Date: Tue, 18 May 2010 15:12:08 +0000 (UTC)
 
commit c5d86dfbc74024a25528b705efa65af8c78101be
Author: Ivaylo Valkov <ivaylo e-valkov org>
Date:   Tue May 18 17:28:03 2010 +0300
    Add support for VLC "toolbar" argument
    
    With different behaviour if a "vlc" mimetype was requested
    or not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=618929
 browser-plugin/totemPlugin.cpp |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 5382bb2..d7ec610 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -2101,11 +2101,21 @@ totemPlugin::Init (NPMIMEType mimetype,
 
 #endif /* TOTEM_NARROWSPACE_PLUGIN */
 
-/* VLC plugin defaults to have its controller hidden
- * But we don't want to hide it if VLC wasn't explicitely
- * requested */
 #ifdef TOTEM_CONE_PLUGIN
-	if (strstr ((const char *) mimetype, "vlc") != NULL)
+	/* VLC plugin defaults to have its controller hidden.
+	 * But we don't want to hide it if VLC wasn't explicitely requested.
+	 * VLC plugin checks for toolbar argument in vlcplugin.cpp: VlcPlugin::init()
+	 * If the argument is missing or not set to "true" the toolbar is hidden.
+	 * We use a different approach:
+	 * - If there is no toolbar argument or it is not set to "false"
+	 *   the  controller is visible (otherwise it is hidden)
+	 * - If VLC is requested explicitely (via mimetype) and
+	 *   the toolbar argument is not set to "true",
+	 *   the controller is hidden (otherwise it is visible)
+	 */
+	if (!GetBooleanValue (args, "toolbar", true) ||
+	    (!GetBooleanValue (args, "toolbar", false) &&
+	     strstr ((const char *) mimetype, "vlc") != NULL))
 		mControllerHidden = true;
 #endif
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]