Hello community,
here is the log from the commit of package kdebase3-SuSE
checked in at Thu Jun 28 19:23:50 CEST 2007.
--------
--- KDE/kdebase3-SuSE/kdebase3-SuSE.changes 2007-06-21 14:47:00.000000000 +0200
+++ /mounts/work_src_done/STABLE/kdebase3-SuSE/kdebase3-SuSE.changes 2007-06-27 18:23:52.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Jun 27 18:23:46 CEST 2007 - stbinner@suse.de
+
+- improve KRPMView
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdebase3-SuSE.spec ++++++
--- /var/tmp/diff_new_pack.av8898/_old 2007-06-28 19:21:54.000000000 +0200
+++ /var/tmp/diff_new_pack.av8898/_new 2007-06-28 19:21:54.000000000 +0200
@@ -35,7 +35,7 @@
PreReq: %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 10.3
-Release: 75
+Release: 77
Source0: kdebase-SuSE-%{version}.tar.bz2
Source2: kdebase3-SuSE-displaymanager.fillup
Source3: kdebase3-SuSE-windowmanager.fillup
@@ -179,6 +179,8 @@
/var/lib/kde-profiles
%changelog
+* Wed Jun 27 2007 - stbinner@suse.de
+- improve KRPMView
* Thu Jun 21 2007 - stbinner@suse.de
- fix invalid .desktop files
- suseplugger: call kbluetooth instead of kbluetoothd
++++++ kdebase-SuSE-10.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdebase-SuSE/krpmview/krpmview.cpp new/kdebase-SuSE/krpmview/krpmview.cpp
--- old/kdebase-SuSE/krpmview/krpmview.cpp 2006-11-16 16:49:04.000000000 +0100
+++ new/kdebase-SuSE/krpmview/krpmview.cpp 2007-06-27 18:14:48.000000000 +0200
@@ -20,9 +20,6 @@
#include
#include
#include
-#include
-#include
-#include
#include
#include "krpmview.h"
@@ -74,14 +71,20 @@
// create the tab box
tab = new QTabBar( box );
browserDescription = new KTextBrowser( box, "browser" );
+ browserTechnicalData = new KTextBrowser( box, "technicaldata" );
+ browserDependencies = new KTextBrowser( box, "dependencies" );
browserChangelog = new KTextBrowser( box, "changelog" );
browserFilelist = new KTextBrowser( box, "filelist" );
+ browserTechnicalData->hide();
+ browserDependencies->hide();
browserChangelog->hide();
browserFilelist->hide();
tab->addTab( new QTab(i18n("Description")) );
- tab->addTab( new QTab(i18n("Changelog")) );
- tab->addTab( new QTab(i18n("Files")) );
+ tab->addTab( new QTab(i18n("Technical Data")) );
+ tab->addTab( new QTab(i18n("Dependencies")) );
+ tab->addTab( new QTab(i18n("File List")) );
+ tab->addTab( new QTab(i18n("Change Log")) );
connect( tab, SIGNAL(selected(int)), this, SLOT(selectedTab(int)) );
setWidget( box );
@@ -97,6 +100,8 @@
void KRPMViewPart::selectedTab(int t)
{
browserDescription->hide();
+ browserDependencies->hide();
+ browserTechnicalData->hide();
browserChangelog->hide();
browserFilelist->hide();
switch( t ){
@@ -104,17 +109,62 @@
browserDescription->show();
break;
case 1:
- browserChangelog->show();
+ browserTechnicalData->show();
break;
case 2:
+ browserDependencies->show();
+ break;
+ case 3:
browserFilelist->show();
break;
+ case 4:
+ browserChangelog->show();
+ break;
}
}
+QString KRPMViewPart::createDependencyList(const Header &h, const QString &caption, int TAGNAME, int TAGVERSION, int TAGFLAGS, bool strongState)
+{
+ QString result, temp;
+ void *tmpVoid = 0;
+ int nEntries;
+ bool captionAdded = false;
+
+ if (headerGetEntry(h, TAGNAME, NULL, &tmpVoid, &nEntries)) {
+ const char **files = (const char **)tmpVoid;
+ headerGetEntry(h, TAGVERSION, NULL, &tmpVoid, NULL);
+ const char **version = (const char **)tmpVoid;
+ headerGetEntry(h, TAGFLAGS, NULL, &tmpVoid, NULL);
+ const uint *flags = (const uint *)tmpVoid;
+ for (int i = 0; i < nEntries; i++){
+ if (((flags[i] & RPMSENSE_STRONG) == RPMSENSE_STRONG) == strongState) {
+ if (!captionAdded) {
+ result += "<h3>"+caption+"</h3>";
+ captionAdded = true;
+ }
+ temp.sprintf("%s", files[i]);
+ result += temp;
+ temp.sprintf("%s", version[i]);
+ if (!temp.isEmpty()) {
+ result += " ";
+ if (flags[i] & RPMSENSE_LESS)
+ result += "<";
+ if (flags[i] & RPMSENSE_GREATER)
+ result += ">";
+ if (flags[i] & RPMSENSE_EQUAL)
+ result += "=";
+ result += " " + temp;
+ }
+ result += "<br>";
+ }
+ }
+ }
+ return result;
+}
+
bool KRPMViewPart::openFile()
{
- QString changelog, filelist, temp;
+ QString changelog, filelist, temp, technicaldata, dependencies;
int nfiles;
int numchangelog;
int i;
@@ -143,14 +193,21 @@
else
description=(const char*)tmpVoid;
- if (!headerGetEntry(h, RPMTAG_DESCRIPTION, NULL, &tmpVoid, NULL))
+ if (!headerGetEntry(h, RPMTAG_SUMMARY, NULL, &tmpVoid, NULL))
+ summary=0;
+ else
+ summary=(const char*)tmpVoid;
+
+ if (!headerGetEntry(h, RPMTAG_VENDOR, NULL, &tmpVoid, NULL))
vendor=0;
else
vendor=(const char*)tmpVoid;
+
if (!headerGetEntry(h, RPMTAG_URL, NULL, &tmpVoid, NULL))
url=0;
else
url=(const char*)tmpVoid;
+
if (headerGetEntry(h, RPMTAG_CHANGELOGTEXT, NULL, &tmpVoid, &numchangelog)) {
const char **changelogtext=(const char**)tmpVoid;
headerGetEntry(h, RPMTAG_CHANGELOGNAME, NULL, &tmpVoid, NULL);
@@ -174,10 +231,59 @@
}
}
+ if (headerGetEntry(h, RPMTAG_LICENSE, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("License: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_GROUP, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("RPM group: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_DISTRIBUTION, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("Distribution: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_PACKAGER, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("Packager: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_VENDOR, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("Vendor: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_BUILDTIME, NULL, &tmpVoid, NULL)) {
+ const uint_32 * buildtime=(const uint_32 *)tmpVoid;
+ time_t t=buildtime[0];
+ temp.sprintf("%.24s", ctime(&t));
+ technicaldata += i18n("Build time: %1\n").arg(temp);
+ }
+
+ if (headerGetEntry(h, RPMTAG_BUILDHOST, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("Build host: %1\n").arg((const char *)(tmpVoid));
+
+ if (headerGetEntry(h, RPMTAG_SIZE, NULL, &tmpVoid, NULL)) {
+ const uint *size = (const uint *)tmpVoid;
+ temp.sprintf("%d", *size);
+ technicaldata += i18n("Size: %1\n").arg(temp);
+ }
+ if (headerGetEntry(h, RPMTAG_SOURCERPM, NULL, &tmpVoid, NULL))
+ technicaldata += i18n("Source RPM: %1\n").arg((const char *)(tmpVoid));
+
+ dependencies += createDependencyList(h, i18n("Provides"), RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_PROVIDEFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Requires"), RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_REQUIREFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Conflicts"), RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_CONFLICTFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Obsoletes"), RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Recommends"), RPMTAG_SUGGESTSNAME, RPMTAG_SUGGESTSVERSION, RPMTAG_SUGGESTSFLAGS, true);
+
+ dependencies += createDependencyList(h, i18n("Suggests"), RPMTAG_SUGGESTSNAME, RPMTAG_SUGGESTSVERSION, RPMTAG_SUGGESTSFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Enhances"), RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, false);
+
+ dependencies += createDependencyList(h, i18n("Supplements"), RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS, true);
+
Fclose(fd);
QString text;
- text = "<h2>" + QStyleSheet::convertFromPlainText(QString(name)) + "</h2><h3>"
+ text = "<h2>" + QStyleSheet::convertFromPlainText(QString(name) + " - " + QString(summary)) + "</h2><h3>"
" Version: " + QString(version) + "-" + QString(release) + "</h3>";
text += "<p>" + i18n("Project Page: ") + "<a href=" + QString::fromLocal8Bit(url) + ">" + QString::fromLocal8Bit(url) + "</a>";
// text += "<p>" + i18n("Vendor: ") + QStyleSheet::convertFromPlainText(QString::fromLocal8Bit(vendor));
@@ -185,6 +291,8 @@
text += QStyleSheet::convertFromPlainText(QString::fromLocal8Bit(description));
browserDescription->setText( text );
browserDescription->setNotifyClick(true);
+ browserDependencies->setText( dependencies );
+ browserTechnicalData->setText( technicaldata );
browserChangelog->setText( changelog );
browserFilelist->setText( filelist );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdebase-SuSE/krpmview/krpmview.h new/kdebase-SuSE/krpmview/krpmview.h
--- old/kdebase-SuSE/krpmview/krpmview.h 2005-03-04 09:45:29.000000000 +0100
+++ new/kdebase-SuSE/krpmview/krpmview.h 2007-06-27 18:14:48.000000000 +0200
@@ -2,7 +2,7 @@
krpmview.h - description
-------------------
begin : Die Jul 9 13:09:32 CEST 2002
- copyright : (C) 2002 by Adrian Schr�ter
+ copyright : (C) 2002 by Adrian Schr�ter
email : adrian@suse.de
***************************************************************************/
@@ -23,6 +23,10 @@
#include
#include
+#include
+#include
+#include
+
// Forward declarations, saves time compared to including the full headers
class QListView;
class KAboutData;
@@ -46,6 +50,7 @@
const char *name;
const char *version;
const char *release;
+ const char *summary;
const char *description;
const char *url;
const char *vendor;
@@ -62,10 +67,15 @@
KTextBrowser *browserChangelog;
KTextBrowser *browserDescription;
KTextBrowser *browserFilelist;
+ KTextBrowser *browserTechnicalData;
+ KTextBrowser *browserDependencies;
QVBox *box;
QTabBar *tab;
QPushButton *PushButtonPackage;
QPushButton *PushButtonDir;
+
+ QString createDependencyList(const Header &, const QString &caption,
+ int TAGNAME, int TAGVERSION, int TAGFLAGS, bool strongState);
};
#endif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org