aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorMarkus Brueffer <markus@FreeBSD.org>2007-04-05 00:37:08 +0000
committerMarkus Brueffer <markus@FreeBSD.org>2007-04-05 00:37:08 +0000
commit97ebc94bf3ab0f91d69b1ae918ce101477f7f70f (patch)
tree2757ca4f13d263c912687d62d67bc827dde6a11a /databases
parentfd92d17b1954d178a453a793413df0d0a24d7786 (diff)
downloadports-97ebc94bf3ab0f91d69b1ae918ce101477f7f70f.tar.gz
ports-97ebc94bf3ab0f91d69b1ae918ce101477f7f70f.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/kbibtex/Makefile1
-rw-r--r--databases/kbibtex/files/patch-src-documentlistview.cpp41
-rw-r--r--databases/kbibtex/files/patch-src-documentwidget.cpp55
-rw-r--r--databases/kbibtex/files/patch-src-documentwidget.h12
-rw-r--r--databases/kbibtex/files/patch-src-settings.cpp12
-rw-r--r--databases/kbibtex/files/patch-src-webquerypubmed.cpp10
6 files changed, 131 insertions, 0 deletions
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<DocumentListViewItem*>( 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<DocumentListViewItem*>( it.current() );
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( 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<DocumentListViewItem*>( 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<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 +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<SearchURL*>::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it )
++ for ( QValueList<SearchURL*>::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();