This commit is contained in:
parent
01017fb379
commit
2d2938d8f4
22
lib64.diff
Normal file
22
lib64.diff
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -79,9 +79,9 @@ SET(SCRIPTSDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/")
|
||||||
|
ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"")
|
||||||
|
SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
|
||||||
|
ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"")
|
||||||
|
-SET(LIBDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||||
|
+SET(LIBDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||||
|
ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")
|
||||||
|
-SET(PLUGINDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
|
||||||
|
+SET(PLUGINDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
|
||||||
|
ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"")
|
||||||
|
set(CMAKE_INSTALL_RPATH ${PLUGINDIR})
|
||||||
|
|
||||||
|
--- scribus/CMakeLists.txt
|
||||||
|
+++ scribus/CMakeLists.txt
|
||||||
|
@@ -438,4 +438,4 @@ ENDIF(RENDER_LIB STREQUAL "LIBART")
|
||||||
|
|
||||||
|
INSTALL(TARGETS ${EXE_NAME}
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
- LIBRARY DESTINATION lib)
|
||||||
|
+ LIBRARY DESTINATION lib${LIB_SUFFIX})
|
20
scribus-1.3.3.9-no-rpath.diff
Normal file
20
scribus-1.3.3.9-no-rpath.diff
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
SET(CMAKE_COLOR_MAKEFILE ON)
|
||||||
|
SET(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
|
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||||
|
-SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
|
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
#SET(CMAKE_SKIP_RPATH:BOOL NO)
|
||||||
|
SET(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
|
||||||
|
@@ -69,7 +69,7 @@
|
||||||
|
SET(DOCDIR "share/doc/${MAIN_DIR_NAME}-${VERSION}/")
|
||||||
|
ENDIF (TAG_VERSION)
|
||||||
|
ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
|
||||||
|
-SET(DOCDIR "share/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||||
|
+SET(DOCDIR "share/doc/packages/${MAIN_DIR_NAME}${TAG_VERSION}/")
|
||||||
|
ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"")
|
||||||
|
SET(ICONDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/icons/")
|
||||||
|
ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"")
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 27 19:25:56 CEST 2007 - dmueller@suse.de
|
||||||
|
|
||||||
|
- build against cmake to fix various issues
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 13 15:26:52 CEST 2007 - ltinkl@suse.cz
|
Wed Jun 13 15:26:52 CEST 2007 - ltinkl@suse.cz
|
||||||
|
|
||||||
|
106
scribus.spec
106
scribus.spec
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
Name: scribus
|
Name: scribus
|
||||||
BuildRequires: cairo-devel cups cups-devel kdelibs3-devel python-devel shared-mime-info
|
BuildRequires: cairo-devel cups cups-devel kdelibs3-devel python-devel shared-mime-info
|
||||||
|
BuildRequires: cmake
|
||||||
%if %suse_version < 1000
|
%if %suse_version < 1000
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
%endif
|
%endif
|
||||||
@ -28,9 +29,11 @@ Suggests: AdobeICCProfiles
|
|||||||
Provides: scribus-short-words
|
Provides: scribus-short-words
|
||||||
Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words
|
Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words
|
||||||
Version: 1.3.3.9
|
Version: 1.3.3.9
|
||||||
Release: 1
|
Release: 2
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Patch2: %{name}-%{version}_string-literal-comparsion-b.patch
|
Patch3: %{name}-1.3.3.9-no-rpath.diff
|
||||||
|
Patch4: string-compare.diff
|
||||||
|
Patch5: lib64.diff
|
||||||
URL: http://www.scribus.net/
|
URL: http://www.scribus.net/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Summary: Open Source Page Layout and Desktop Publishing (DTP)
|
Summary: Open Source Page Layout and Desktop Publishing (DTP)
|
||||||
@ -64,78 +67,31 @@ Authors:
|
|||||||
Thomas Zastrow <webmaster@thomas-zastrow.de>
|
Thomas Zastrow <webmaster@thomas-zastrow.de>
|
||||||
Steve Callcott
|
Steve Callcott
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Open Source Page Layout / Desktop Publishing (DTP)
|
|
||||||
Group: Productivity/Publishing/Other
|
|
||||||
Requires: %{name} = %{version} freetype2-devel zlib-devel libstdc++-devel glibc-devel
|
|
||||||
Autoreqprov: on
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
Scribus is an desktop open source page layout program with the aim of
|
|
||||||
producing commerical grade output in PDF and Postscript, primarily,
|
|
||||||
though not exclusively for Linux.
|
|
||||||
|
|
||||||
While the goals of the program are for ease of use and simple easy to
|
|
||||||
understand tools, Scribus offers support for professional publishing
|
|
||||||
features, such as CMYK colors, easy PDF creation, Encapsulated
|
|
||||||
Postscript import/export and creation of color separations.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
|
||||||
--------
|
|
||||||
Franz Schmid <Franz.Schmid@altmuehlnet.de>
|
|
||||||
Paul F. Johnson <paul@all-the-johnsons.co.uk>
|
|
||||||
Craig Bradney <cbradney@zip.com.au>
|
|
||||||
Peter Linnell <mrdocs@scribus.info>
|
|
||||||
Petr Vaněk <petr@yarpen.cz>
|
|
||||||
Riku Leino <tsoots@welho.com>
|
|
||||||
Craig Ringer <craig@postnewspapers.com.au>
|
|
||||||
Alessandro Rimoldi http://ideale.ch/contact
|
|
||||||
Jean-Jacques Sarton <jj.sarton@t-online.de>
|
|
||||||
Christian Töpp <mr-ct@gmx.de>
|
|
||||||
Alastair Robinson <blackfive@fakenhamweb.co.uk>
|
|
||||||
Thomas Zastrow <webmaster@thomas-zastrow.de>
|
|
||||||
Steve Callcott
|
|
||||||
|
|
||||||
%define prefix /usr
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch2
|
%patch3
|
||||||
|
%patch4
|
||||||
|
%patch5
|
||||||
|
|
||||||
%build
|
%build
|
||||||
. /etc/opt/kde3/common_options
|
mkdir build
|
||||||
update_admin --no-unsermake
|
cd build
|
||||||
#autoconf
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$CXXFLAGS"
|
||||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
|
||||||
./configure \
|
-DCMAKE_SKIP_RPATH=TRUE -DDOCDIR=%{_docdir} -DLIB_INSTALL_DIR=%{_libdir} \
|
||||||
--prefix=%{prefix} \
|
-DLIB_SUFFIX=$(echo %_lib | cut -b4-) ..
|
||||||
--libdir=%{_libdir} \
|
make
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--infodir=%{_infodir} \
|
|
||||||
--sysconfdir=%{_sysconfdir} \
|
|
||||||
--with-qt-libraries=/usr/%_lib/qt3/%_lib \
|
|
||||||
--with-docdir=%{_docdir}/%{name} \
|
|
||||||
%ifarch x86_64 ppc64 s390x
|
|
||||||
--enable-libsuffix=64 \
|
|
||||||
%endif
|
|
||||||
--with-pythondir=%{_libdir}/python \
|
|
||||||
--with-xinerama
|
|
||||||
make %{?jobs:-j %jobs}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
#. /etc/opt/kde3/common_options
|
cd build
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
%makeinstall
|
||||||
|
cd ..
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||||
cp AUTHORS COPYING ChangeLog NEWS README PACKAGING TODO $RPM_BUILD_ROOT%{_docdir}/%{name}
|
install -m 644 -D $RPM_BUILD_ROOT/usr/share/scribus/icons/scribusicon.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/scribusicon.png
|
||||||
#suse_update_desktop_file -i %name Office WordProcessor
|
%suse_update_desktop_file %name Office WordProcessor
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/scribus/plugins/*.*a $RPM_BUILD_ROOT%{_libdir}/scribus/plugins/*/*.*a
|
install -m 644 -D scribus.desktop $RPM_BUILD_ROOT%{_datadir}/applications/scribus.desktop
|
||||||
install -d $RPM_BUILD_ROOT%{_datadir}/applications
|
install -m 644 -D scribus.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/scribus.xml
|
||||||
install scribus.desktop $RPM_BUILD_ROOT%{_datadir}/applications/
|
|
||||||
install -d $RPM_BUILD_ROOT%{_datadir}/mime/packages
|
|
||||||
install scribus.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/scribus.xml
|
|
||||||
%suse_update_desktop_file scribus
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ -f /usr/bin/update-mime-database ]; then
|
if [ -f /usr/bin/update-mime-database ]; then
|
||||||
@ -152,25 +108,21 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc %{_docdir}/%{name}
|
%doc AUTHORS ChangeLog NEWS README TODO
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
/usr/share/applications/*.desktop
|
/usr/share/applications/*.desktop
|
||||||
/usr/share/man/man?/*.*
|
/usr/share/man/man?/*.*
|
||||||
/usr/share/man/*/man?/*.*
|
/usr/share/man/*/man?/*.*
|
||||||
/usr/share/pixmaps/*
|
|
||||||
%{_libdir}/scribus
|
%{_libdir}/scribus
|
||||||
%{_prefix}/share/mime/packages/*.xml
|
%{_prefix}/share/mime/packages/*.xml
|
||||||
%{_prefix}/share/scribus
|
%{_prefix}/share/scribus
|
||||||
%{_prefix}/share/doc/scribus-%{version}
|
/usr/share/icons/hicolor/48x48/apps/scribusicon.png
|
||||||
# This should be owned by filesystem or man, but there are only scribus files:
|
%dir /usr/share/man/pl
|
||||||
%lang(pl) %dir /usr/share/man/pl
|
%dir /usr/share/man/pl/man1
|
||||||
%lang(pl) %dir /usr/share/man/pl/man1
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%defattr(-, root, root)
|
|
||||||
%{_prefix}/include/scribus
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 27 2007 - dmueller@suse.de
|
||||||
|
- build against cmake to fix various issues
|
||||||
* Wed Jun 13 2007 - ltinkl@suse.cz
|
* Wed Jun 13 2007 - ltinkl@suse.cz
|
||||||
- update to 1.3.3.9 bugfix release
|
- update to 1.3.3.9 bugfix release
|
||||||
- many bugfixes
|
- many bugfixes
|
||||||
|
@ -1,157 +1,170 @@
|
|||||||
|
--- scribus/plugins/scriptplugin/cmdcolor.cpp
|
||||||
|
+++ scribus/plugins/scriptplugin/cmdcolor.cpp
|
||||||
|
@@ -147,7 +147,7 @@ PyObject *scribus_delcolor(PyObject* /* self */, PyObject* args)
|
||||||
|
char *Repl = const_cast<char*>(CommonStrings::None.latin1());
|
||||||
|
if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Name, "utf-8", &Repl))
|
||||||
|
return NULL;
|
||||||
|
- if (Name == "")
|
||||||
|
+ if (!*Name)
|
||||||
|
{
|
||||||
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot delete a color with an empty name.","python error"));
|
||||||
|
return NULL;
|
||||||
--- scribus/plugins/scriptplugin/cmdmisc.cpp
|
--- scribus/plugins/scriptplugin/cmdmisc.cpp
|
||||||
+++ scribus/plugins/scriptplugin/cmdmisc.cpp
|
+++ scribus/plugins/scriptplugin/cmdmisc.cpp
|
||||||
@@ -190,7 +190,7 @@
|
@@ -190,7 +190,7 @@ PyObject *scribus_senttolayer(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Layer == "")
|
- if (Layer == "")
|
||||||
+ if (Layer[0] == 0)
|
+ if (!*Layer)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -229,7 +229,7 @@
|
@@ -229,7 +229,7 @@ PyObject *scribus_layervisible(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QString("Cannot have an empty layer name"));
|
PyErr_SetString(PyExc_ValueError, QString("Cannot have an empty layer name"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -261,7 +261,7 @@
|
@@ -261,7 +261,7 @@ PyObject *scribus_layerprint(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -292,7 +292,7 @@
|
@@ -292,7 +292,7 @@ PyObject *scribus_glayervisib(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -323,7 +323,7 @@
|
@@ -323,7 +323,7 @@ PyObject *scribus_glayerprint(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -355,7 +355,7 @@
|
@@ -355,7 +355,7 @@ PyObject *scribus_removelayer(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -410,7 +410,7 @@
|
@@ -410,7 +410,7 @@ PyObject *scribus_createlayer(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(!checkHaveDocument())
|
if(!checkHaveDocument())
|
||||||
return NULL;
|
return NULL;
|
||||||
- if (Name == "")
|
- if (Name == "")
|
||||||
+ if (Name[0] == 0)
|
+ if (!*Name)
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create layer without a name.","python error"));
|
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create layer without a name.","python error"));
|
||||||
return NULL;
|
return NULL;
|
||||||
--- scribus/plugins/scriptplugin/cmdobj.cpp
|
--- scribus/plugins/scriptplugin/cmdobj.cpp
|
||||||
+++ scribus/plugins/scriptplugin/cmdobj.cpp
|
+++ scribus/plugins/scriptplugin/cmdobj.cpp
|
||||||
@@ -30,7 +30,7 @@
|
@@ -30,7 +30,7 @@ PyObject *scribus_newrect(PyObject* /* self */, PyObject* args)
|
||||||
ScMW->doc->toolSettings.dWidth,
|
ScMW->doc->toolSettings.dWidth,
|
||||||
ScMW->doc->toolSettings.dBrush, ScMW->doc->toolSettings.dPen, true);
|
ScMW->doc->toolSettings.dBrush, ScMW->doc->toolSettings.dPen, true);
|
||||||
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@
|
@@ -59,7 +59,7 @@ PyObject *scribus_newellipse(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@
|
@@ -86,7 +86,7 @@ PyObject *scribus_newimage(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@
|
@@ -113,7 +113,7 @@ PyObject *scribus_newtext(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@
|
@@ -151,7 +151,7 @@ PyObject *scribus_newline(PyObject* /* self */, PyObject* args)
|
||||||
it->updateClip();
|
it->updateClip();
|
||||||
ScMW->doc->setRedrawBounding(it);
|
ScMW->doc->setRedrawBounding(it);
|
||||||
it->OwnPage = ScMW->doc->OnPage(it);
|
it->OwnPage = ScMW->doc->OnPage(it);
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
it->setItemName(QString::fromUtf8(Name));
|
it->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(it->itemName().utf8());
|
return PyString_FromString(it->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@
|
@@ -224,7 +224,7 @@ PyObject *scribus_polyline(PyObject* /* self */, PyObject* args)
|
||||||
}
|
}
|
||||||
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
||||||
ScMW->view->AdjustItemSize(it);
|
ScMW->view->AdjustItemSize(it);
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
{
|
{
|
||||||
it->setItemName(QString::fromUtf8(Name));
|
it->setItemName(QString::fromUtf8(Name));
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@
|
@@ -304,7 +304,7 @@ PyObject *scribus_polygon(PyObject* /* self */, PyObject* args)
|
||||||
}
|
}
|
||||||
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
||||||
ScMW->view->AdjustItemSize(it);
|
ScMW->view->AdjustItemSize(it);
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
it->setItemName(QString::fromUtf8(Name));
|
it->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(it->itemName().utf8());
|
return PyString_FromString(it->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@
|
@@ -429,7 +429,7 @@ PyObject *scribus_pathtext(PyObject* /* self */, PyObject* args)
|
||||||
}
|
|
||||||
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
|
||||||
ScMW->view->AdjustItemSize(it);
|
|
||||||
- if (Name != "")
|
|
||||||
+ if (Name[0] != 0)
|
|
||||||
it->setItemName(QString::fromUtf8(Name));
|
|
||||||
return PyString_FromString(it->itemName().utf8());
|
|
||||||
}
|
|
||||||
@@ -429,7 +429,7 @@
|
|
||||||
PageItem *it = ScMW->doc->Items->at(i);
|
PageItem *it = ScMW->doc->Items->at(i);
|
||||||
ScMW->view->ToPathText();
|
ScMW->view->ToPathText();
|
||||||
ScMW->view->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it);
|
ScMW->view->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it);
|
||||||
- if (Name != "")
|
- if (Name != "")
|
||||||
+ if (Name[0] != 0)
|
+ if (*Name)
|
||||||
it->setItemName(QString::fromUtf8(Name));
|
it->setItemName(QString::fromUtf8(Name));
|
||||||
return PyString_FromString(it->itemName().utf8());
|
return PyString_FromString(it->itemName().utf8());
|
||||||
}
|
}
|
||||||
@@ -532,7 +532,7 @@
|
@@ -532,7 +532,7 @@ PyObject *scribus_setstyle(PyObject* /* self */, PyObject* args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
// for current item only
|
// for current item only
|
||||||
- if (ScMW->doc->m_Selection->count() == 0 || name != "")
|
- if (ScMW->doc->m_Selection->count() == 0 || name != "")
|
||||||
+ if (ScMW->doc->m_Selection->count() == 0 || name[0] != 0)
|
+ if (ScMW->doc->m_Selection->count() == 0 || *name)
|
||||||
{
|
{
|
||||||
// quick hack to always apply on the right frame - pv
|
// quick hack to always apply on the right frame - pv
|
||||||
ScMW->view->Deselect(true);
|
ScMW->view->Deselect(true);
|
||||||
|
--- scribus/plugins/scriptplugin/cmdobj.cpp
|
||||||
|
+++ scribus/plugins/scriptplugin/cmdobj.cpp
|
||||||
|
@@ -391,7 +391,7 @@ PyObject *scribus_bezierline(PyObject* /* self */, PyObject* args)
|
||||||
|
}
|
||||||
|
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
|
||||||
|
ScMW->view->AdjustItemSize(it);
|
||||||
|
- if (Name != "")
|
||||||
|
+ if (*Name)
|
||||||
|
it->setItemName(QString::fromUtf8(Name));
|
||||||
|
return PyString_FromString(it->itemName().utf8());
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user