Hello community,
here is the log from the commit of package cantor for openSUSE:Factory checked in at 2013-12-11 14:33:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cantor (Old)
and /work/SRC/openSUSE:Factory/.cantor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cantor"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cantor/cantor.changes 2013-12-02 12:32:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cantor.new/cantor.changes 2013-12-11 14:33:46.000000000 +0100
@@ -1,0 +2,14 @@
+Fri Nov 29 07:06:44 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.11.97
+ * KDE 4.12 RC 1 release
+ * See http://www.kde.org/announcements/announce-4.12-rc.php
+
+-------------------------------------------------------------------
+Sat Nov 23 22:21:17 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.11.95
+ * KDE 4.12 Beta 3 release
+ * See http://www.kde.org/announcements/announce-4.12-beta3.php
+
+-------------------------------------------------------------------
Old:
----
cantor-4.11.90.tar.xz
New:
----
cantor-4.11.97.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cantor.spec ++++++
--- /var/tmp/diff_new_pack.yBfRml/_old 2013-12-11 14:33:47.000000000 +0100
+++ /var/tmp/diff_new_pack.yBfRml/_new 2013-12-11 14:33:47.000000000 +0100
@@ -19,7 +19,7 @@
%global libMAJOR 1
Name: cantor
-Version: 4.11.90
+Version: 4.11.97
Release: 0
Summary: Worksheet GUI for mathematical software
License: GPL-2.0+
++++++ cantor-4.11.90.tar.xz -> cantor-4.11.97.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/doc/index.docbook new/cantor-4.11.97/doc/index.docbook
--- old/cantor-4.11.90/doc/index.docbook 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/doc/index.docbook 2013-11-24 21:27:16.000000000 +0100
@@ -31,7 +31,7 @@
<legalnotice>&FDLNotice;</legalnotice>
<date>2013-10-27</date>
-<releaseinfo>0.4 (&kde; 4.12)</releaseinfo>
+<releaseinfo>0.5 (&kde; 4.12)</releaseinfo>
<abstract>
<para>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/assistants/importpackage/importpackageassistant.desktop new/cantor-4.11.97/src/assistants/importpackage/importpackageassistant.desktop
--- old/cantor-4.11.90/src/assistants/importpackage/importpackageassistant.desktop 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/assistants/importpackage/importpackageassistant.desktop 2013-11-24 21:27:16.000000000 +0100
@@ -2,13 +2,16 @@
Type=Service
Name=Import Package
Name[bs]=Uvezi paket
+Name[ca]=Importació de paquet
Name[cs]=Importovat balíček
Name[da]=Importér pakke
Name[de]=Paket importieren
Name[es]=Importar paquete
Name[fi]=Tuo paketti
+Name[fr]=Importer un paquet
Name[gl]=Importar un paquete
Name[hu]=Csomag importálása
+Name[it]=Importa package
Name[kk]=Дестені импорттау
Name[nl]=Pakket importeren
Name[pt]=Importar o Pacote
@@ -27,12 +30,15 @@
X-KDE-PluginInfo-License=GPL
Comment=An Assistant dialog to import a specific package (or library or module) to Cantor workspace
Comment[bs]=Pomoćni dijalog za uvoz određenog paketa (biblioteke ili modula) u Cantor-ov radni prostor.
+Comment[ca]=Un diàleg d'assistència per importar un paquet específic (o biblioteca o mòdul) a l'espai de treball del Cantor
Comment[da]=En hjælpedialog til at importere en specifik pakke (eller bibliotek eller modul) til Cantor-arbejdsområdet
Comment[de]=Ein Assistent, um ein angegebenes Paket, Bibliothek oder Modul in den Arbeitsbereich von Cantor zu importieren
Comment[es]=Un diálogo de asistente para importar un paquete (o biblioteca o módulo) determinado al espacio de trabajo de Cantor
Comment[fi]=Apuikkuna paketin (tai kirjaston tai mobuulin) tuomiseen Cantor-työtilaan
+Comment[fr]=Boîte de dialogue de l'assistant pour importer un paquet spécifique (ou une librairie ou un module) dans l'espace de travail Cantor
Comment[gl]=Un asistente para importar un paquete específico (ou unha biblioteca ou un módulo) no espazo de traballo de Cantor
Comment[hu]=Egy segéd párbeszédablak tudományos csomagok (vagy könyvtárak vagy modulok) importálásához a Cantor munkaterületre
+Comment[it]=Un assistente che importa un package specifico (oppure una libreria o un modulo) nell foglio di lavoro di Cantor
Comment[kk]=Cantor жұмыс орнынын өзінің дестесін (не жиын файлын не модулін) импорттаудың көмекші диалогы
Comment[nl]=Een assistentdialoog voor het importeren van een pakket (of bibliotheek (library) of module) in Cantor
Comment[pt]=Uma janela de assistente para importar um pacote específico (ou biblioteca ou módulo) para a área de trabalho do Cantor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/backends/python2/python2backend.desktop new/cantor-4.11.97/src/backends/python2/python2backend.desktop
--- old/cantor-4.11.90/src/backends/python2/python2backend.desktop 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/backends/python2/python2backend.desktop 2013-11-24 21:27:16.000000000 +0100
@@ -3,11 +3,13 @@
Icon=pythonbackend
Name=Python2
Name[bs]=Python2
+Name[ca]=Python2
Name[cs]=Python2
Name[da]=Python2
Name[de]=Python2
Name[es]=Python2
Name[fi]=Python2
+Name[fr]=Python2
Name[gl]=Python2
Name[hu]=Python2
Name[it]=Python2
@@ -30,11 +32,13 @@
X-KDE-PluginInfo-License=GPL
Comment=Backend for Python 2 Scientific Programming
Comment[bs]=Pozadina za Python 2 naučno programiranje
+Comment[ca]=Dorsal per a la programació científica Python2
Comment[cs]=Podpůrná vrstva pro vědecké programovací v Python 2
Comment[da]=Backend til videnskabelige programmering med Python 2
Comment[de]=Modul für die wissenschaftliche Programmierumgebung Python 2
Comment[es]=Motor para programación científica en Python 2
Comment[fi]=Python2-pohjaisen tieteellisen ohjelmointiympäristön taustajärjestelmä
+Comment[fr]=Moteur pour la programmation scientifique Python 2
Comment[gl]=Infraestrutura para o programación científica con Python 2
Comment[hu]=Háttérprogram a Python 2 tudományos programozáshoz
Comment[it]=Backend per l'ambiente scientifico di programmazione Python 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/backends/sage/sagecompletionobject.cpp new/cantor-4.11.97/src/backends/sage/sagecompletionobject.cpp
--- old/cantor-4.11.90/src/backends/sage/sagecompletionobject.cpp 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/backends/sage/sagecompletionobject.cpp 2013-11-24 21:27:16.000000000 +0100
@@ -53,7 +53,7 @@
//cache the value of the "_" variable into __hist_tmp__, so we can restore the previous result
//after complete() was evaluated
m_expression=session()->evaluateExpression("__hist_tmp__=_; __CANTOR_IPYTHON_SHELL__.complete(\""+command()+"\");_=__hist_tmp__");
- connect(m_expression, SIGNAL(gotResult()), this,
+ connect(m_expression, SIGNAL(gotResult()), this,
SLOT(extractCompletions()));
if(t)
@@ -63,7 +63,7 @@
void SageCompletionObject::extractCompletions()
{
SageSession* s=qobject_cast(session());
- if(s&&s->inLegacyMode())
+ if(s&&s->sageVersion()>SageSession::VersionInfo(5, 7))
extractCompletionsLegacy();
else
extractCompletionsNew();
@@ -80,7 +80,7 @@
kDebug()<<"something went wrong fetching tab completion";
return;
}
-
+
//the result looks like "['comp1', 'comp2']" parse it
//for sage version 5.7 this looks like
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/backends/sage/sagesession.cpp new/cantor-4.11.97/src/backends/sage/sagesession.cpp
--- old/cantor-4.11.90/src/backends/sage/sagesession.cpp 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/backends/sage/sagesession.cpp 2013-11-24 21:27:16.000000000 +0100
@@ -47,20 +47,62 @@
static QByteArray newInitCmd=
"__CANTOR_IPYTHON_SHELL__=get_ipython() \n "\
- "__CANTOR_IPYTHON_SHELL__.autoindent=False\n "\
- "print '____END_OF_INIT____' \n ";
+ "__CANTOR_IPYTHON_SHELL__.autoindent=False\n ";
static QByteArray legacyInitCmd=
"__CANTOR_IPYTHON_SHELL__=__IPYTHON__ \n " \
- "__CANTOR_IPYTHON_SHELL__.autoindent=False\n "\
- "print '____END_OF_INIT____' \n ";
+ "__CANTOR_IPYTHON_SHELL__.autoindent=False\n ";
+static QByteArray endOfInitMarker="print '____END_OF_INIT____'\n ";
+
+
+
+SageSession::VersionInfo::VersionInfo(int major, int minor)
+{
+ m_major=major;
+ m_minor=minor;
+}
+
+int SageSession::VersionInfo::major() const
+{
+ return m_major;
+}
+
+int SageSession::VersionInfo::minor() const
+{
+ return m_minor;
+}
+
+bool SageSession::VersionInfo::operator==(const SageSession::VersionInfo &other) const
+{
+ return m_major==other.m_major&&m_minor==other.m_minor;
+}
+
+bool SageSession::VersionInfo::operator<(const SageSession::VersionInfo &other) const
+{
+ return (m_major!= -1 && other.m_major==-1) ||
+ ( ((m_major!=-1 && other.m_major!=-1) || (m_major==other.m_major && m_major==-1) ) && ( m_major(const SageSession::VersionInfo& other) const
+{
+ return !( (*this <= other ));
+}
+
+bool SageSession::VersionInfo::operator>=(const SageSession::VersionInfo& other) const
+{
+ return !( *this < other);
+}
SageSession::SageSession( Cantor::Backend* backend) : Session(backend)
{
kDebug();
m_isInitialized=false;
- m_inLegacyMode=false;
m_haveSentInitCmd=false;
connect( &m_dirWatch, SIGNAL( created( const QString& ) ), this, SLOT( fileCreated( const QString& ) ) );
}
@@ -141,7 +183,7 @@
kDebug()<<"tmp path: "<pty()->write(legacyInitCmd);
+ defineCustomFunctions();
+ m_process->pty()->write(endOfInitMarker);
m_haveSentInitCmd=true;
}
}else
{
kDebug()<<"using the current set of commands";
+
if(!m_haveSentInitCmd)
{
m_process->pty()->write(newInitCmd);
+ defineCustomFunctions();
+ m_process->pty()->write(endOfInitMarker);
m_haveSentInitCmd=true;
}
}
+
}
}
}
-
+
int indexOfEOI=m_outputCache.indexOf("____END_OF_INIT____");
if(indexOfEOI!=-1&&m_outputCache.indexOf(SagePrompt, indexOfEOI)!=-1)
@@ -337,23 +387,10 @@
void SageSession::setTypesettingEnabled(bool enable)
{
Cantor::Session::setTypesettingEnabled(enable);
+
//tell the sage server to enable/disable pretty_print
- if(inLegacyMode())
- {
- //the _ and __IP.outputcache() are needed to keep the
- // _ operator working. in modern versions of sage the __IP variable
- //has been removed
- if (enable)
- evaluateExpression("sage.misc.latex.pretty_print_default(true);_;__IP.outputcache()", Cantor::Expression::DeleteOnFinish);
- else
- evaluateExpression("sage.misc.latex.pretty_print_default(false);_;__IP.outputcache()", Cantor::Expression::DeleteOnFinish);
- }else
- {
- if (enable)
- evaluateExpression("sage.misc.latex.pretty_print_default(true)", Cantor::Expression::DeleteOnFinish);
- else
- evaluateExpression("sage.misc.latex.pretty_print_default(false)", Cantor::Expression::DeleteOnFinish);
- }
+ const QString cmd="__cantor_enable_typesetting(%1)";
+ evaluateExpression(cmd.arg(enable ? "true":"false"), Cantor::Expression::DeleteOnFinish);
}
Cantor::CompletionObject* SageSession::completionFor(const QString& command, int index)
@@ -366,9 +403,33 @@
return new SageHighlighter(parent);
}
-bool SageSession::inLegacyMode()
+SageSession::VersionInfo SageSession::sageVersion()
+{
+ return m_sageVersion;
+}
+
+void SageSession::defineCustomFunctions()
{
- return m_inLegacyMode;
+ //typesetting
+ QString cmd="def __cantor_enable_typesetting(enable):\n";
+ if(m_sageVersion VersionInfo(5, 7) && m_sageVersion< VersionInfo(5, 12))
+ {
+ cmd+="\t sage.misc.latex.pretty_print_default(enable)\n\n";
+ }else
+ {
+ cmd+="\t if(enable==true):\n "\
+ "\t \t %display typeset \n"\
+ "\t else: \n" \
+ "\t \t %display simple \n\n";
+ }
+
+ sendInputToProcess(cmd);
}
#include "sagesession.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/backends/sage/sagesession.h new/cantor-4.11.97/src/backends/sage/sagesession.h
--- old/cantor-4.11.90/src/backends/sage/sagesession.h 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/backends/sage/sagesession.h 2013-11-24 21:27:16.000000000 +0100
@@ -38,6 +38,27 @@
static const QByteArray SagePrompt;
static const QByteArray SageAlternativePrompt;
+ //small helper class to deal with sage versions
+ //Note: major version -1 is treated as most current
+ class VersionInfo{
+ public:
+ VersionInfo(int major = -1, int minor = -1);
+
+ //bool operator <=(const VersionInfo& v2);
+ bool operator <(const VersionInfo& other) const;
+ bool operator <=(const VersionInfo& other) const;
+ bool operator >(const VersionInfo& other) const;
+ bool operator >=(const VersionInfo& other) const;
+ bool operator ==( const VersionInfo& other) const;
+
+ int major() const;
+ int minor() const;
+ private:
+ int m_major;
+ int m_minor;
+ };
+
+
SageSession( Cantor::Backend* backend);
~SageSession();
@@ -59,7 +80,7 @@
Cantor::CompletionObject* completionFor(const QString& command, int index=-1);
QSyntaxHighlighter* syntaxHighlighter(QObject* parent);
- bool inLegacyMode();
+ VersionInfo sageVersion();
public slots:
void readStdOut();
void readStdErr();
@@ -72,6 +93,7 @@
private:
void runFirstExpression();
+ void defineCustomFunctions();
private:
KPtyProcess* m_process;
QList m_expressionQueue;
@@ -80,7 +102,7 @@
KDirWatch m_dirWatch;
bool m_waitingForPrompt;
QString m_outputCache;
- bool m_inLegacyMode;
+ VersionInfo m_sageVersion;
bool m_haveSentInitCmd;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/cantor_part.cpp new/cantor-4.11.97/src/cantor_part.cpp
--- old/cantor-4.11.90/src/cantor_part.cpp 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/cantor_part.cpp 2013-11-24 21:27:16.000000000 +0100
@@ -338,7 +338,7 @@
// the non-i18n name here must be the same as the directory in
// which the part's rc file is installed ('partrcdir' in the
// Makefile)
- KAboutData *aboutData = new KAboutData("cantorpart", "cantor", ki18n("CantorPart"), "0.4");
+ KAboutData *aboutData = new KAboutData("cantorpart", "cantor", ki18n("CantorPart"), "0.5");
aboutData->addAuthor(ki18n("Alexander Rieder"), KLocalizedString(), "alexanderrieder@gmail.com");
return aboutData;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cantor-4.11.90/src/main.cpp new/cantor-4.11.97/src/main.cpp
--- old/cantor-4.11.90/src/main.cpp 2013-11-14 01:27:21.000000000 +0100
+++ new/cantor-4.11.97/src/main.cpp 2013-11-24 21:27:16.000000000 +0100
@@ -28,7 +28,7 @@
static const char description[] =
I18N_NOOP("KDE Frontend to mathematical applications");
-static const char version[] = "0.4";
+static const char version[] = "0.5";
int main(int argc, char **argv)
{
@@ -36,7 +36,7 @@
ki18n("Cantor"),
version, ki18n(description),
KAboutData::License_GPL,
- ki18n("(C) 2009-2012 Alexander Rieder"),
+ ki18n("(C) 2009-2013 Alexander Rieder"),
KLocalizedString(), 0
);
about.addAuthor( ki18n("Alexander Rieder"), KLocalizedString(), "alexanderrieder@gmail.com" );
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org