From 6ed6c1ca12ec5ed89dc279dc286ebeeab98a8c45 Mon Sep 17 00:00:00 2001 From: Christian Nolte Date: Tue, 5 Dec 2006 22:37:21 +0000 Subject: [PATCH] - Synced with devel branch to fix BUG #216007 --- .cvsignore | 3 ++ kbibtex-0.1.5-filteredselection.patch | 41 ++++++++++++++++++++ kbibtex-0.1.5-gcc4.2.patch | 13 +++++++ kbibtex-0.1.5-viewdocument.patch | 56 +++++++++++++++++++++++++++ kbibtex.spec | 29 +++++++++----- sources | 3 ++ 6 files changed, 136 insertions(+), 9 deletions(-) create mode 100644 kbibtex-0.1.5-filteredselection.patch create mode 100644 kbibtex-0.1.5-gcc4.2.patch create mode 100644 kbibtex-0.1.5-viewdocument.patch diff --git a/.cvsignore b/.cvsignore index 08ff0e2..e4fb302 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,4 @@ kbibtex-0.1.5.tar.bz2 +kbibtex-0.1.5-filteredselection.patch +kbibtex-0.1.5-gcc4.2.patch +kbibtex-0.1.5-viewdocument.patch diff --git a/kbibtex-0.1.5-filteredselection.patch b/kbibtex-0.1.5-filteredselection.patch new file mode 100644 index 0000000..b5012d4 --- /dev/null +++ b/kbibtex-0.1.5-filteredselection.patch @@ -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/kbibtex-0.1.5-gcc4.2.patch b/kbibtex-0.1.5-gcc4.2.patch new file mode 100644 index 0000000..56f5e72 --- /dev/null +++ b/kbibtex-0.1.5-gcc4.2.patch @@ -0,0 +1,13 @@ +Index: src/fileimporter.h +=================================================================== +--- src/fileimporter.h (Revision 307) ++++ src/fileimporter.h (Arbeitskopie) +@@ -39,7 +39,7 @@ + ~FileImporter(); + + File* load ( const QString& text ); +- virtual File* load( QIODevice *iodevice ) = NULL; ++ virtual File* load( QIODevice *iodevice ) = 0; + + static bool guessCanDecode( const QString & ) { return FALSE; }; + diff --git a/kbibtex-0.1.5-viewdocument.patch b/kbibtex-0.1.5-viewdocument.patch new file mode 100644 index 0000000..f00aceb --- /dev/null +++ b/kbibtex-0.1.5-viewdocument.patch @@ -0,0 +1,56 @@ +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( 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 +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 ) ] ); + } + + } diff --git a/kbibtex.spec b/kbibtex.spec index fc25908..be02ad1 100644 --- a/kbibtex.spec +++ b/kbibtex.spec @@ -1,12 +1,15 @@ Name: kbibtex Version: 0.1.5 -Release: 1%{?dist} +Release: 4%{?dist} Summary: A BibTeX editor for KDE Group: Applications/Editors License: GPL URL: http://www.unix-ag.uni-kl.de/~fischer/kbibtex/ Source0: http://www.unix-ag.uni-kl.de/~fischer/kbibtex/download/kbibtex-%{version}.tar.bz2 +Patch0: kbibtex-0.1.5-filteredselection.patch +Patch1: kbibtex-0.1.5-gcc4.2.patch +Patch2: kbibtex-0.1.5-viewdocument.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: kdebase-devel >= 3.3 libxslt-devel desktop-file-utils @@ -19,7 +22,9 @@ KBibTeX is a BibTeX editor for KDE %prep %setup -q - +%patch0 -p0 -b .filteredselection +%patch1 -p0 -b .gcc4.2 +%patch2 -p0 -b .viewdocument %build unset QTDIR || : ; . /etc/profile.d/qt.sh @@ -36,15 +41,15 @@ make install DESTDIR=$RPM_BUILD_ROOT # # Replace original .desktop files with proper ones # -desktop-file-install --vendor fedora \ - --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ - --add-category X-Fedora \ - --delete-original \ +desktop-file-install --vendor fedora \ + --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ + --add-category X-Fedora \ + --delete-original \ ${RPM_BUILD_ROOT}%{_datadir}/services/kbibtex_part.desktop -desktop-file-install --vendor fedora \ - --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ - --add-category X-Fedora \ +desktop-file-install --vendor fedora \ + --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ + --add-category X-Fedora \ --delete-original \ ${RPM_BUILD_ROOT}%{_datadir}/applnk/Office/kbibtex.desktop @@ -114,6 +119,12 @@ fi %{_datadir}/applications/fedora-kbibtex_part.desktop %changelog +* Tue Dec 05 2006 Christian Nolte - 0.1.5-4 +- Bumped release ver. to solve the violated upgrade path (BUG #216007) + +* Sun Oct 29 2006 Christian Nolte - 0.1.5-2 +- latest released patches (filteredselection,gcc4.2,viewdocument) + * Wed Oct 18 2006 Christian Nolte - 0.1.5-1 - Update to 0.1.5 diff --git a/sources b/sources index 69aaaa2..d0720bb 100644 --- a/sources +++ b/sources @@ -1 +1,4 @@ 83a8c1cade06837431b6ebe79d13ef7b kbibtex-0.1.5.tar.bz2 +bb97a4924c4bea973ea02800e699d701 kbibtex-0.1.5-filteredselection.patch +2d94fa24173073a02948d66946df60c0 kbibtex-0.1.5-gcc4.2.patch +afe161f8783346b3606dfd5a337918ac kbibtex-0.1.5-viewdocument.patch