From 97ebc94bf3ab0f91d69b1ae918ce101477f7f70f Mon Sep 17 00:00:00 2001 From: Markus Brueffer Date: Thu, 5 Apr 2007 00:37:08 +0000 Subject: - Add vendor patches for non-critical bugs - Bump PORTREVISION --- databases/kbibtex/Makefile | 1 + .../kbibtex/files/patch-src-documentlistview.cpp | 41 ++++++++++++++++ .../kbibtex/files/patch-src-documentwidget.cpp | 55 ++++++++++++++++++++++ databases/kbibtex/files/patch-src-documentwidget.h | 12 +++++ databases/kbibtex/files/patch-src-settings.cpp | 12 +++++ .../kbibtex/files/patch-src-webquerypubmed.cpp | 10 ++++ 6 files changed, 131 insertions(+) create mode 100644 databases/kbibtex/files/patch-src-documentlistview.cpp create mode 100644 databases/kbibtex/files/patch-src-documentwidget.cpp create mode 100644 databases/kbibtex/files/patch-src-documentwidget.h create mode 100644 databases/kbibtex/files/patch-src-settings.cpp create mode 100644 databases/kbibtex/files/patch-src-webquerypubmed.cpp (limited to 'databases/kbibtex') diff --git a/databases/kbibtex/Makefile b/databases/kbibtex/Makefile index 40f56ee08bc6..c071de9d95b2 100644 --- a/databases/kbibtex/Makefile +++ b/databases/kbibtex/Makefile @@ -6,6 +6,7 @@ PORTNAME= kbibtex PORTVERSION= 0.1.5 +PORTREVISION= 1 CATEGORIES= databases kde MASTER_SITES= http://www.unix-ag.uni-kl.de/~fischer/${PORTNAME}/download/ diff --git a/databases/kbibtex/files/patch-src-documentlistview.cpp b/databases/kbibtex/files/patch-src-documentlistview.cpp new file mode 100644 index 000000000000..b5012d453c37 --- /dev/null +++ b/databases/kbibtex/files/patch-src-documentlistview.cpp @@ -0,0 +1,41 @@ +Index: src/documentlistview.cpp +=================================================================== +--- src/documentlistview.cpp (Revision 301) ++++ src/documentlistview.cpp (Revision 302) +@@ -221,10 +221,13 @@ + while ( it.current() ) + { + DocumentListViewItem * kblvi = dynamic_cast( it.current() ); +- m_bibtexFile->deleteElement( kblvi->element() ); +- it++; +- takeItem( kblvi ); +- delete ( kblvi ); ++ if ( kblvi->isVisible() ) ++ { ++ m_bibtexFile->deleteElement( kblvi->element() ); ++ it++; ++ takeItem( kblvi ); ++ delete ( kblvi ); ++ } + } + + if ( above ) +@@ -246,7 +249,7 @@ + { + DocumentListViewItem * kblvi = dynamic_cast( it.current() ); + BibTeX::Entry *entry = dynamic_cast( kblvi->element() ); +- if ( entry != NULL ) ++ if ( entry != NULL && kblvi->isVisible() ) + { + if ( !refs.isEmpty() ) + refs.append( "," ); +@@ -621,7 +624,8 @@ + while ( it.current() ) + { + DocumentListViewItem * kblvi = dynamic_cast( it.current() ); +- exporter->save( &buffer, kblvi->element() ); ++ if ( kblvi->isVisible() ) ++ exporter->save( &buffer, kblvi->element() ); + it++; + } + delete exporter; diff --git a/databases/kbibtex/files/patch-src-documentwidget.cpp b/databases/kbibtex/files/patch-src-documentwidget.cpp new file mode 100644 index 000000000000..432ba33d16f8 --- /dev/null +++ b/databases/kbibtex/files/patch-src-documentwidget.cpp @@ -0,0 +1,55 @@ +--- src/documentwidget.cpp.orig Thu Apr 5 02:18:55 2007 ++++ src/documentwidget.cpp Thu Apr 5 02:18:11 2007 +@@ -255,7 +255,11 @@ + + updateFromGUI(); + +- BibTeX::XSLTransform * transform = NULL; ++ KStandardDirs * kstd = KGlobal::dirs(); ++ QString resPath = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" ); ++ BibTeX::XSLTransform *transform = NULL; ++ if ( resPath != NULL ) ++ transform = new BibTeX::XSLTransform( resPath ); + + BibTeX::FileExporter * exporter = NULL; + switch ( format ) +@@ -471,13 +475,13 @@ + m_listViewElements->setFactory( factory, client ); + m_sourceView->setFactory( factory, client ); + ++ m_viewDocumentActionMenu = dynamic_cast( 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( client->action( "view_document" ) ); + m_listViewElements->setViewShowColumnsMenu( dynamic_cast( client->action( "view_showcolumns" ) ) ); + m_searchWebsitesActionMenu = dynamic_cast( client->action( "search_document_online" ) ); + } +@@ -486,6 +490,7 @@ + { + KPopupMenu * popup = m_viewDocumentActionMenu->popupMenu(); + popup->clear(); ++ m_viewDocumentActionMenuURLs.clear(); + + BibTeX::Element * currentElement = NULL; + +@@ -517,6 +522,7 @@ + popup->insertItem( SmallIcon( "html" ), prettyURL ); + else + popup->insertItem( prettyURL ); ++ m_viewDocumentActionMenuURLs.append( prettyURL ); + } + m_viewDocumentActionMenu->setEnabled( TRUE ); + } +@@ -908,7 +914,7 @@ + + void DocumentWidget::slotViewDocument( int id ) + { +- kapp->invokeBrowser( m_viewDocumentActionMenu->popupMenu() ->text( id ) ); ++ kapp->invokeBrowser( m_viewDocumentActionMenuURLs[ m_viewDocumentActionMenu->popupMenu() ->indexOf( id ) ] ); + } + + } diff --git a/databases/kbibtex/files/patch-src-documentwidget.h b/databases/kbibtex/files/patch-src-documentwidget.h new file mode 100644 index 000000000000..0e2c863e85de --- /dev/null +++ b/databases/kbibtex/files/patch-src-documentwidget.h @@ -0,0 +1,12 @@ +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; diff --git a/databases/kbibtex/files/patch-src-settings.cpp b/databases/kbibtex/files/patch-src-settings.cpp new file mode 100644 index 000000000000..205878def1d8 --- /dev/null +++ b/databases/kbibtex/files/patch-src-settings.cpp @@ -0,0 +1,12 @@ +diff -Naur kbibtex-0.1.5_orig/src/settings.cpp kbibtex-0.1.5/src/settings.cpp +--- src/settings.cpp 2006-10-03 21:14:45.000000000 +0200 ++++ src/settings.cpp 2007-02-27 13:20:13.000000000 +0100 +@@ -170,7 +170,7 @@ + + config->setGroup( "SearchURLs" ); + int i = 1; +- for ( QValueList::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it ) ++ for ( QValueList::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it, ++i ) + { + config->writeEntry( QString( "SearchURLDescription%1" ).arg( i ), ( *it ) ->description ); + config->writeEntry( QString( "SearchURL%1" ).arg( i ), ( *it ) ->url ); diff --git a/databases/kbibtex/files/patch-src-webquerypubmed.cpp b/databases/kbibtex/files/patch-src-webquerypubmed.cpp new file mode 100644 index 000000000000..eed9013cdab7 --- /dev/null +++ b/databases/kbibtex/files/patch-src-webquerypubmed.cpp @@ -0,0 +1,10 @@ +--- src/webquerypubmed.cpp 2006-10-04 21:10:15.000000000 +0200 ++++ src/webquerypubmed.cpp 2007-02-27 13:44:16.000000000 +0100 +@@ -206,6 +206,7 @@ + doc.setContent( buffer ); + QDomElement docElem = doc.documentElement(); + ResultParser resultParser( m_listViewResults, doc.documentElement() ); ++ buffer->close(); + + setEnabled( TRUE ); + QApplication::restoreOverrideCursor(); -- cgit v1.2.3