]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/x11/x11_factory.cpp
Qt menus: remove useless FindActionWithText
[vlc] / modules / gui / skins2 / x11 / x11_factory.cpp
index 0e91b0707555ddf90d6641f17de96b9406c0decc..815a169a47e91e29543a4e38f89b3ef519e432ea 100644 (file)
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * x11_factory.cpp
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef X11_SKINS
@@ -33,6 +33,7 @@
 #include "x11_display.hpp"
 #include "x11_graphics.hpp"
 #include "x11_loop.hpp"
+#include "x11_popup.hpp"
 #include "x11_timer.hpp"
 #include "x11_window.hpp"
 #include "x11_tooltip.hpp"
@@ -70,10 +71,11 @@ bool X11Factory::init()
                                      ConnectionNumber( pDisplay ) );
 
     // Initialize the resource path
-    m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir +
-        m_dirSep + CONFIG_DIR + "/skins2" );
+    char *datadir = config_GetUserDataDir();
+    m_resourcePath.push_back( (string)datadir + "/skins2" );
+    free( datadir );
     m_resourcePath.push_back( (string)"share/skins2" );
-    m_resourcePath.push_back( (string)DATA_PATH + "/skins2" );
+    m_resourcePath.push_back( (string)config_GetDataDir () + "/skins2" );
 
     return true;
 }
@@ -102,9 +104,34 @@ void X11Factory::minimize()
                     DefaultScreen( m_pDisplay->getDisplay() ) );
 }
 
-OSTimer *X11Factory::createOSTimer( const Callback &rCallback )
+void X11Factory::restore()
 {
-    return new X11Timer( getIntf(), rCallback );
+    // TODO
+}
+
+void X11Factory::addInTray()
+{
+    // TODO
+}
+
+void X11Factory::removeFromTray()
+{
+    // TODO
+}
+
+void X11Factory::addInTaskBar()
+{
+    // TODO
+}
+
+void X11Factory::removeFromTaskBar()
+{
+    // TODO
+}
+
+OSTimer *X11Factory::createOSTimer( CmdGeneric &rCmd )
+{
+    return new X11Timer( getIntf(), rCmd );
 }
 
 
@@ -122,6 +149,12 @@ OSTooltip *X11Factory::createOSTooltip()
 }
 
 
+OSPopup *X11Factory::createOSPopup()
+{
+    return new X11Popup( getIntf(), *m_pDisplay );
+}
+
+
 int X11Factory::getScreenWidth() const
 {
     Display *pDisplay = m_pDisplay->getDisplay();
@@ -138,10 +171,10 @@ int X11Factory::getScreenHeight() const
 }
 
 
-Rect X11Factory::getWorkArea() const
+SkinsRect X11Factory::getWorkArea() const
 {
     // XXX
-    return Rect( 0, 0, getScreenWidth(), getScreenHeight() );
+    return SkinsRect( 0, 0, getScreenWidth(), getScreenHeight() );
 }