57 lines
2.4 KiB
Diff
57 lines
2.4 KiB
Diff
Index: src/documentwidget.h
|
|
===================================================================
|
|
--- src/documentwidget.h (Revision 308)
|
|
+++ src/documentwidget.h (Revision 310)
|
|
@@ -106,6 +106,7 @@
|
|
int m_newElementCounter;
|
|
EditMode m_editMode;
|
|
KActionMenu *m_viewDocumentActionMenu;
|
|
+ QStringList m_viewDocumentActionMenuURLs;
|
|
KActionMenu *m_searchWebsitesActionMenu;
|
|
KAction *m_find;
|
|
KAction *m_findNext;
|
|
Index: src/documentwidget.cpp
|
|
===================================================================
|
|
--- src/documentwidget.cpp (Revision 308)
|
|
+++ src/documentwidget.cpp (Revision 310)
|
|
@@ -471,13 +471,13 @@
|
|
m_listViewElements->setFactory( factory, client );
|
|
m_sourceView->setFactory( factory, client );
|
|
|
|
+ m_viewDocumentActionMenu = dynamic_cast<KActionMenu*>( client->action( "view_document" ) );
|
|
if ( m_viewDocumentActionMenu != NULL )
|
|
connect( m_viewDocumentActionMenu->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotViewDocument( int ) ) );
|
|
|
|
m_copyReference = client->action( "edit_copyref" );
|
|
m_find = client->action( "edit_find" );
|
|
m_findNext = client->action( "edit_find_next" );
|
|
- m_viewDocumentActionMenu = dynamic_cast<KActionMenu*>( client->action( "view_document" ) );
|
|
m_listViewElements->setViewShowColumnsMenu( dynamic_cast<KActionMenu*>( client->action( "view_showcolumns" ) ) );
|
|
m_searchWebsitesActionMenu = dynamic_cast<KActionMenu*>( client->action( "search_document_online" ) );
|
|
}
|
|
@@ -486,6 +486,7 @@
|
|
{
|
|
KPopupMenu * popup = m_viewDocumentActionMenu->popupMenu();
|
|
popup->clear();
|
|
+ m_viewDocumentActionMenuURLs.clear();
|
|
|
|
BibTeX::Element * currentElement = NULL;
|
|
|
|
@@ -517,6 +518,7 @@
|
|
popup->insertItem( SmallIcon( "html" ), prettyURL );
|
|
else
|
|
popup->insertItem( prettyURL );
|
|
+ m_viewDocumentActionMenuURLs.append( prettyURL );
|
|
}
|
|
m_viewDocumentActionMenu->setEnabled( TRUE );
|
|
}
|
|
@@ -908,7 +910,7 @@
|
|
|
|
void DocumentWidget::slotViewDocument( int id )
|
|
{
|
|
- kapp->invokeBrowser( m_viewDocumentActionMenu->popupMenu() ->text( id ) );
|
|
+ kapp->invokeBrowser( m_viewDocumentActionMenuURLs[ m_viewDocumentActionMenu->popupMenu() ->indexOf( id ) ] );
|
|
}
|
|
|
|
}
|