* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "dialogs/bookmarks.hpp"
-#include "dialogs_provider.hpp"
#include "input_manager.hpp"
#include <QGridLayout>
layout->setColumnStretch( 1, 1 );
layout->addWidget( closeButton, 7, 2 );
+ CONNECT( THEMIM->getIM(), bookmarksChanged(),
+ this, update() );
+
CONNECT( bookmarksList, activated( QModelIndex ), this,
activateItem( QModelIndex ) );
CONNECT( bookmarksList, itemChanged( QTreeWidgetItem*, int ),
#endif
BUTTONACT( closeButton, close() );
- readSettings( "Bookmarks", QSize( 435, 206 ) );
+ readSettings( "Bookmarks", QSize( 435, 280 ) );
updateGeometry();
}
if( !input_Control( p_input, INPUT_GET_BOOKMARK, &bookmark ) )
{
- bookmark.psz_name = qtu( THEMIM->getIM()->getName() +
- QString("_%1" ).arg( bookmarksList->topLevelItemCount() ) );
+ bookmark.psz_name = const_cast<char *>qtu( THEMIM->getIM()->getName() +
+ QString("_%1" ).arg( bookmarksList->topLevelItemCount() ) );
input_Control( p_input, INPUT_ADD_BOOKMARK, &bookmark );
}
- update();
}
void BookmarksDialog::del()
{
input_Control( p_input, INPUT_DEL_BOOKMARK, i_focused );
}
-
- update();
}
void BookmarksDialog::clear()
if( !p_input ) return;
input_Control( p_input, INPUT_CLEAR_BOOKMARKS );
-
- update();
}
void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
// We get the bookmarks list
seekpoint_t** pp_bookmarks;
- seekpoint_t* p_seekpoint;
+ seekpoint_t* p_seekpoint = NULL;
int i_bookmarks;
if( input_Control( p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks,
VLC_SUCCESS )
goto clear;
- // Everything goes fine : update
- update();
-
// Clear the bookmark list
clear:
for( int i = 0; i < i_bookmarks; i++)