- Update to 0.3

- BR: cmake kdelibs-devel poppler-qt4-devel added, kdelibs3-devel removed
- Cmake-based build
- Scriptlets revised
- Specfile Untabified
- URL and Source0 updated
- kbibtex-0.2-desktop-file-type.patch removed
- Other cleanup
This commit is contained in:
Robin Lee 2011-06-25 03:41:45 +08:00
parent 5357b58a22
commit fd90319760
11 changed files with 55 additions and 243 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
kbibtex-0.2.2.tar.bz2
/kbibtex-0.3.tar.bz2

View File

@ -1,41 +0,0 @@
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;

View File

@ -1,13 +0,0 @@
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; };

View File

@ -1,12 +0,0 @@
diff -Naur kbibtex-0.1.5_orig/src/settings.cpp kbibtex-0.1.5/src/settings.cpp
--- kbibtex-0.1.5_orig/src/settings.cpp 2006-10-03 21:14:45.000000000 +0200
+++ kbibtex-0.1.5/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 );

View File

@ -1,56 +0,0 @@
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 ) ] );
}
}

View File

@ -1,10 +0,0 @@
--- kbibtex-0.1.5_orig/src/webquerypubmed.cpp 2006-10-04 21:10:15.000000000 +0200
+++ kbibtex-0.1.5/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();

View File

@ -1,15 +0,0 @@
--- kbibtex-0.1.5_orig/src/documentwidget.cpp 2006-10-05 21:48:04.000000000 +0200
+++ kbibtex-0.1.5/src/documentwidget.cpp 2007-03-16 18:59:39.000000000 +0100
@@ -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 )

View File

@ -1,9 +0,0 @@
diff -up kbibtex-0.2/src/kbibtex_part.desktop.type kbibtex-0.2/src/kbibtex_part.desktop
--- kbibtex-0.2/src/kbibtex_part.desktop.type 2008-01-01 16:14:47.000000000 +0100
+++ kbibtex-0.2/src/kbibtex_part.desktop 2008-01-01 16:15:09.000000000 +0100
@@ -12,4 +12,4 @@ Name[de]=Einbettungsfähige Komponente v
MimeType=text/x-bibtex;application/x-endnote-library;
ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart
X-KDE-Library=libkbibtexpart
-Type=Service
+Type=Application

View File

@ -1,11 +0,0 @@
--- kbibtex-0.1.3/src/kbibtexlistview.h 2005-11-29 13:43:15.000000000 +0100
+++ kbibtex-0.1.3/src/kbibtexlistview.h.qualifier 2005-12-23 11:39:35.000000000 +0100
@@ -62,7 +62,7 @@
// BibTeX::BibTeXFile *selectedElements();
void enabledActions();
- bool KBibTeXListView::acceptDrag( QDropEvent *event ) const;
+ bool acceptDrag( QDropEvent *event ) const;
public slots:
void filterText( const QString&text );

View File

@ -1,106 +1,84 @@
Name: kbibtex
Version: 0.2.2
Release: 20%{?dist}
Summary: A BibTeX editor for KDE
Name: kbibtex
Version: 0.3
Release: 1%{?dist}
Summary: A BibTeX editor for KDE
Group: Applications/Editors
License: GPLv2+
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
Patch1: kbibtex-0.2-desktop-file-type.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group: Applications/Editors
License: GPLv2+
URL: http://home.gna.org/kbibtex/index.html
Source0: http://download.gna.org/%{name}/%{version}/%{name}-%{version}.tar.bz2
BuildRequires: kdelibs3-devel >= 3.3 libxslt-devel desktop-file-utils gettext
#Requires:
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
BuildRequires: cmake kdelibs-devel libxslt-devel desktop-file-utils gettext
BuildRequires: poppler-qt4-devel
%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }
%description
KBibTeX is a BibTeX editor for KDE
%prep
%setup -q
%patch1 -p1 -b .type
%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
export QTLIB=${QTDIR}/lib QTINC=${QTDIR}/include
%configure --disable-rpath --disable-debug
make %{?_smp_mflags}
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
#
# Replace original .desktop files with proper ones
#
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 \
--delete-original \
${RPM_BUILD_ROOT}%{_datadir}/applications/kde/kbibtex.desktop
%find_lang %{name}
desktop-file-install \
--dir %{buildroot}%{_kde4_datadir}/applications/kde4 \
--add-category Education \
--delete-original \
%{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop
%post
/sbin/ldconfig
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%clean
rm -rf $RPM_BUILD_ROOT
%postun
/sbin/ldconfig
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README TODO
%posttrans
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%{_bindir}/kbibtex
%{_libdir}/kde3/libkbibtexpart.la
%{_libdir}/kde3/libkbibtexpart.so
%{_datadir}/apps/kbibtexpart/
%{_datadir}/apps/kbibtex/
%{_docdir}/HTML/en/kbibtex/
%{_datadir}/icons/hicolor/128x128/apps/kbibtex.png
%{_datadir}/icons/hicolor/16x16/apps/kbibtex.png
%{_datadir}/icons/hicolor/22x22/apps/kbibtex.png
%{_datadir}/icons/hicolor/32x32/apps/kbibtex.png
%{_datadir}/icons/hicolor/48x48/apps/kbibtex.png
%{_datadir}/icons/hicolor/64x64/apps/kbibtex.png
#%{_datadir}/locale/de/LC_MESSAGES/kbibtex.mo
#%{_datadir}/locale/fr/LC_MESSAGES/kbibtex.mo
#%{_datadir}/locale/it/LC_MESSAGES/kbibtex.mo
#%{_datadir}/locale/pl/LC_MESSAGES/kbibtex.mo
#%{_datadir}/locale/ru/LC_MESSAGES/kbibtex.mo
%{_mandir}/man1/kbibtex.1.gz
%{_datadir}/applications/fedora-kbibtex_part.desktop
%{_datadir}/applications/fedora-kbibtex.desktop
%files
%doc LICENSE README
%{_kde4_bindir}/%{name}
%{_kde4_libdir}/lib%{name}*.so
%{_kde4_libdir}/kde4/%{name}part.so
%{_kde4_datadir}/applications/kde4/%{name}.desktop
%{_kde4_appsdir}/%{name}/
%{_kde4_appsdir}/%{name}part/
%{_kde4_datadir}/kde4/services/%{name}part.desktop
%{_datadir}/mime/packages/bibliography.xml
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_mandir}/man1/%{name}.1.*
%changelog
* Sat Jun 25 2011 Robin Lee <cheeselee@fedoraproject.org> - 0.3-1
- Update to 0.3
- BR: cmake kdelibs-devel poppler-qt4-devel added, kdelibs3-devel removed
- Cmake-based build
- Scriptlets revised
- Specfile Untabified
- URL and Source0 updated
- kbibtex-0.2-desktop-file-type.patch removed
- Other cleanup
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1 +1 @@
b9681167ed7942c3cc502f116023927d kbibtex-0.2.2.tar.bz2
79fc7ea383014ea84ca5d9e71f24be5a kbibtex-0.3.tar.bz2