Commit ce41dfb5 authored by Cyril Deguet's avatar Cyril Deguet

* parser/xmlparser.cpp: abort parsing when an error is detected

 (avoid segfaults in element handlers...)
* all: tried to have the popup window disappear with a click on
 a skin window (not working at least with wxgtk)
parent c1b4f483
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cmd_dialogs.hpp * cmd_dialogs.hpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: cmd_dialogs.hpp,v 1.1 2004/01/03 23:31:33 asmax Exp $ * $Id: cmd_dialogs.hpp,v 1.2 2004/02/01 14:44:11 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -41,8 +41,9 @@ typedef CmdDialogs<5> CmdDlgNet; ...@@ -41,8 +41,9 @@ typedef CmdDialogs<5> CmdDlgNet;
typedef CmdDialogs<6> CmdDlgMessages; typedef CmdDialogs<6> CmdDlgMessages;
typedef CmdDialogs<7> CmdDlgPrefs; typedef CmdDialogs<7> CmdDlgPrefs;
typedef CmdDialogs<8> CmdDlgFileInfo; typedef CmdDialogs<8> CmdDlgFileInfo;
typedef CmdDialogs<9> CmdDlgPopupMenu; typedef CmdDialogs<9> CmdDlgShowPopupMenu;
typedef CmdDialogs<10> CmdDlgAdd; typedef CmdDialogs<10> CmdDlgHidePopupMenu;
typedef CmdDialogs<11> CmdDlgAdd;
/// Generic "Open dialog" command /// Generic "Open dialog" command
...@@ -93,6 +94,9 @@ class CmdDialogs: public CmdGeneric ...@@ -93,6 +94,9 @@ class CmdDialogs: public CmdGeneric
pDialogs->showPopupMenu( true ); pDialogs->showPopupMenu( true );
break; break;
case 10: case 10:
pDialogs->showPopupMenu( false );
break;
case 11:
pDialogs->showFile( false ); pDialogs->showFile( false );
break; break;
default: default:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ctrl_image.cpp * ctrl_image.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ctrl_image.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $ * $Id: ctrl_image.cpp,v 1.2 2004/02/01 14:44:11 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -54,9 +54,15 @@ void CtrlImage::handleEvent( EvtGeneric &rEvent ) ...@@ -54,9 +54,15 @@ void CtrlImage::handleEvent( EvtGeneric &rEvent )
// No FSM for this simple transition // No FSM for this simple transition
if( rEvent.getAsString() == "mouse:right:down:none" ) if( rEvent.getAsString() == "mouse:right:down:none" )
{ {
CmdDlgPopupMenu cmd( getIntf() ); CmdDlgShowPopupMenu cmd( getIntf() );
cmd.execute(); cmd.execute();
} }
else if( rEvent.getAsString() == "mouse:left:up:none" )
{
CmdDlgHidePopupMenu cmd( getIntf() );
cmd.execute();
}
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interpreter.cpp * interpreter.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: interpreter.cpp,v 1.4 2004/01/18 19:54:46 asmax Exp $ * $Id: interpreter.cpp,v 1.5 2004/02/01 14:44:11 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -51,7 +51,7 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf ) ...@@ -51,7 +51,7 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
REGISTER_CMD( "dialogs.messages()", CmdDlgMessages ) REGISTER_CMD( "dialogs.messages()", CmdDlgMessages )
REGISTER_CMD( "dialogs.prefs()", CmdDlgPrefs ) REGISTER_CMD( "dialogs.prefs()", CmdDlgPrefs )
REGISTER_CMD( "dialogs.fileInfo()", CmdDlgFileInfo ) REGISTER_CMD( "dialogs.fileInfo()", CmdDlgFileInfo )
REGISTER_CMD( "dialogs.popup()", CmdDlgPopupMenu ) REGISTER_CMD( "dialogs.popup()", CmdDlgShowPopupMenu )
REGISTER_CMD( "playlist.add()", CmdDlgAdd ) REGISTER_CMD( "playlist.add()", CmdDlgAdd )
VarList &rVar = VlcProc::instance( getIntf() )->getPlaylistVar(); VarList &rVar = VlcProc::instance( getIntf() )->getPlaylistVar();
m_commandMap["playlist.del()"] = m_commandMap["playlist.del()"] =
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xmlparser.cpp * xmlparser.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: xmlparser.cpp,v 1.4 2004/01/25 23:04:01 asmax Exp $ * $Id: xmlparser.cpp,v 1.5 2004/02/01 14:44:11 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* *
...@@ -64,6 +64,10 @@ bool XMLParser::parse() ...@@ -64,6 +64,10 @@ bool XMLParser::parse()
int ret = xmlTextReaderRead( m_pReader ); int ret = xmlTextReaderRead( m_pReader );
while (ret == 1) while (ret == 1)
{ {
if( m_errors )
{
return false;
}
// Get the node type // Get the node type
int type = xmlTextReaderNodeType( m_pReader ); int type = xmlTextReaderNodeType( m_pReader );
switch (type ) switch (type )
......
...@@ -64,18 +64,6 @@ ...@@ -64,18 +64,6 @@
<Font id="default_font" font="FreeSansBold.ttf" size="15"/> <Font id="default_font" font="FreeSansBold.ttf" size="15"/>
<Font id="playlist_font" font="FreeSansBold.ttf" size="12"/> <Font id="playlist_font" font="FreeSansBold.ttf" size="12"/>
<!--
<Event id="mouseoverclose" event="CTRL_ID_VISIBLE(mouseimg,TRUE)"/>
<Event id="mouseoutclose" event="CTRL_ID_VISIBLE(mouseimg,FALSE)"/>
<Event id="move" event="WINDOW_MOVE(mainwindow)"/>
<Event id="move_playlist" event="WINDOW_MOVE(playlist_window)"/>
<Event id="hide_playlist" event="WINDOW_CLOSE(playlist_window)"/>
<Event id="show_playlist" event="WINDOW_OPEN(playlist_window)"/>
<Event id="item_add" event="VLC_PLAYLIST_ADD_FILE"/>
<Event id="item_del" event="PLAYLIST_ID_DEL(playlist)"/>
-->
<Window id="mainwindow" x="230" y="250" dragdrop="true"> <Window id="mainwindow" x="230" y="250" dragdrop="true">
<Layout id="testlayout" width="424" height="152"> <Layout id="testlayout" width="424" height="152">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment