0.46pre2
This commit is contained in:
parent
08c5e92642
commit
cd25c54956
@ -1 +1 @@
|
||||
inkscape-0.45.1+0.46pre1.tar.bz2
|
||||
inkscape-0.45+0.46pre2.tar.bz2
|
||||
|
@ -1,6 +1,8 @@
|
||||
Make desktop-file-validate and rpmlint happy, handle compressed svgs (#245413)
|
||||
and let it conform enough not to break the build in Rawhide.
|
||||
|
||||
(Lubomir Kundrak <lkundrak@redhat.com>)
|
||||
https://bugs.launchpad.net/inkscape/+bug/190420
|
||||
|
||||
--- inkscape-0.45.1.orig/inkscape.desktop.in 2007-01-16 03:49:00.000000000 +0100
|
||||
+++ inkscape-0.45.1/inkscape.desktop.in 2007-12-02 03:17:08.000000000 +0100
|
||||
|
@ -1,170 +0,0 @@
|
||||
Fix the font selector #432892
|
||||
|
||||
Index: src/desktop-style.cpp
|
||||
===================================================================
|
||||
--- src/desktop-style.cpp (revision 17350)
|
||||
+++ src/desktop-style.cpp (revision 17352)
|
||||
@@ -1096,7 +1096,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (texts == 0 || !style_res->text->font_specification.set)
|
||||
+ if (texts == 0)
|
||||
return QUERY_STYLE_NOTHING;
|
||||
|
||||
if (texts > 1) {
|
||||
Index: src/widgets/toolbox.cpp
|
||||
===================================================================
|
||||
--- src/widgets/toolbox.cpp (revision 17350)
|
||||
+++ src/widgets/toolbox.cpp (revision 17352)
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "widgets/spw-utilities.h"
|
||||
#include "widgets/spinbutton-events.h"
|
||||
#include "dialogs/text-edit.h"
|
||||
+#include "dialogs/dialog-events.h"
|
||||
|
||||
#include "ui/widget/style-swatch.h"
|
||||
|
||||
@@ -3957,7 +3958,8 @@
|
||||
|
||||
namespace {
|
||||
|
||||
-bool visible = false;
|
||||
+bool popdown_visible = false;
|
||||
+bool popdown_hasfocus = false;
|
||||
|
||||
void
|
||||
sp_text_toolbox_selection_changed (Inkscape::Selection */*selection*/, GObject *tbl)
|
||||
@@ -4146,13 +4148,10 @@
|
||||
{
|
||||
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
|
||||
GtkTreeModel *model = 0;
|
||||
- GtkWidget *popdown = GTK_WIDGET (g_object_get_data (tbl, "family-popdown-window"));
|
||||
GtkWidget *entry = GTK_WIDGET (g_object_get_data (tbl, "family-entry"));
|
||||
GtkTreeIter iter;
|
||||
char *family = 0;
|
||||
|
||||
- (void)popdown;
|
||||
-
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
|
||||
|
||||
@@ -4175,7 +4174,7 @@
|
||||
|
||||
int result_fontspec =
|
||||
sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
|
||||
-
|
||||
+
|
||||
font_instance * fontFromStyle = font_factory::Default()->FaceFromStyle(query);
|
||||
|
||||
SPCSSAttr *css = sp_repr_css_attr_new ();
|
||||
@@ -4183,7 +4182,7 @@
|
||||
|
||||
// First try to get the font spec from the stored value
|
||||
Glib::ustring fontSpec = query->text->font_specification.set ? query->text->font_specification.value : "";
|
||||
-
|
||||
+
|
||||
if (fontSpec.empty()) {
|
||||
// Construct a new font specification if it does not yet exist
|
||||
font_instance * fontFromStyle = font_factory::Default()->FaceFromStyle(query);
|
||||
@@ -4223,7 +4222,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- // If querying returned nothing, read the style from the text tool prefs (default style for new texts)
|
||||
+ // If querying returned nothing, set the default style of the tool (for new texts)
|
||||
if (result_fontspec == QUERY_STYLE_NOTHING)
|
||||
{
|
||||
sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style");
|
||||
@@ -4485,10 +4484,19 @@
|
||||
case GDK_Return:
|
||||
case GDK_Escape: // defocus
|
||||
gtk_widget_hide (w);
|
||||
- visible = false;
|
||||
+ popdown_visible = false;
|
||||
gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
|
||||
return TRUE; // I consumed the event
|
||||
break;
|
||||
+ case GDK_w:
|
||||
+ case GDK_W:
|
||||
+ if (event->state & GDK_CONTROL_MASK) {
|
||||
+ gtk_widget_hide (w);
|
||||
+ popdown_visible = false;
|
||||
+ gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
|
||||
+ return TRUE; // I consumed the event
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4598,11 +4606,12 @@
|
||||
GtkWidget *widget = GTK_WIDGET (g_object_get_data (tbl, "family-entry"));
|
||||
int x, y;
|
||||
|
||||
- if (!visible)
|
||||
+ if (!popdown_visible)
|
||||
{
|
||||
gdk_window_get_origin (widget->window, &x, &y);
|
||||
gtk_window_move (GTK_WINDOW (popdown), x, y + widget->allocation.height + 2); //2px of grace space
|
||||
gtk_widget_show_all (popdown);
|
||||
+ //sp_transientize (popdown);
|
||||
|
||||
gdk_pointer_grab (widget->window, TRUE,
|
||||
GdkEventMask (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
@@ -4612,14 +4621,16 @@
|
||||
|
||||
gdk_keyboard_grab (widget->window, TRUE, GDK_CURRENT_TIME);
|
||||
|
||||
- visible = true;
|
||||
+ popdown_visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
|
||||
+ gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
|
||||
gtk_widget_hide (popdown);
|
||||
- visible = false;
|
||||
+ popdown_visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4639,12 +4650,26 @@
|
||||
{
|
||||
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
|
||||
|
||||
- gtk_widget_hide (popdown);
|
||||
- visible = false;
|
||||
- gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
|
||||
+ if (popdown_hasfocus) {
|
||||
+ gtk_widget_hide (popdown);
|
||||
+ popdown_hasfocus = false;
|
||||
+ popdown_visible = false;
|
||||
+ gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean
|
||||
+sp_text_toolbox_popdown_focus_in (GtkWidget *popdown,
|
||||
+ GdkEventFocus */*event*/,
|
||||
+ GObject */*tbl*/)
|
||||
+{
|
||||
+ popdown_hasfocus = true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+
|
||||
void
|
||||
cell_data_func (GtkTreeViewColumn */*column*/,
|
||||
GtkCellRenderer *cell,
|
||||
@@ -4745,6 +4770,7 @@
|
||||
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (sp_text_toolbox_text_popdown_clicked), tbl);
|
||||
|
||||
g_signal_connect (G_OBJECT (window), "focus-out-event", G_CALLBACK (sp_text_toolbox_popdown_focus_out), tbl);
|
||||
+ g_signal_connect (G_OBJECT (window), "focus-in-event", G_CALLBACK (sp_text_toolbox_popdown_focus_in), tbl);
|
||||
g_signal_connect (G_OBJECT (window), "key-press-event", G_CALLBACK(sp_text_toolbox_family_list_keypress), tbl);
|
||||
|
||||
GtkTreeSelection *tselection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
|
@ -1,65 +0,0 @@
|
||||
The STL headers in gcc-4.3 have been cleaned up, so that the headers don't drag in
|
||||
unnecessary dependencies which aren't requested by the standard.
|
||||
This fixes build for gcc-4.3
|
||||
|
||||
Lubomir Kundrak <lkundrak@redhat.com>
|
||||
https://bugs.launchpad.net/inkscape/+bug/190017
|
||||
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/display/nr-filter-slot.cpp inkscape-0.45.1+0.46pre1/src/display/nr-filter-slot.cpp
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/display/nr-filter-slot.cpp 2008-01-15 00:24:31.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/display/nr-filter-slot.cpp 2008-02-07 20:53:36.000000000 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
+#include <cstring>
|
||||
|
||||
#include "display/nr-arena-item.h"
|
||||
#include "display/nr-filter-types.h"
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/live_effects/lpeobject-reference.cpp inkscape-0.45.1+0.46pre1/src/live_effects/lpeobject-reference.cpp
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/live_effects/lpeobject-reference.cpp 2008-01-15 00:24:20.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/live_effects/lpeobject-reference.cpp 2008-02-07 20:53:36.000000000 +0100
|
||||
@@ -6,6 +6,8 @@
|
||||
* Released under GNU GPL, read the file 'COPYING' for more information.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "enums.h"
|
||||
#include "live_effects/lpeobject-reference.h"
|
||||
#include "live_effects/lpeobject.h"
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/syseq.h inkscape-0.45.1+0.46pre1/src/syseq.h
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/syseq.h 2008-01-15 00:24:28.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/syseq.h 2008-02-07 20:53:36.000000000 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
+#include <algorithm>
|
||||
#include "math.h"
|
||||
|
||||
namespace SysEq {
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/filter-effects-dialog.h inkscape-0.45.1+0.46pre1/src/ui/dialog/filter-effects-dialog.h
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/filter-effects-dialog.h 2008-02-01 05:37:40.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/ui/dialog/filter-effects-dialog.h 2008-02-07 20:53:36.000000000 +0100
|
||||
@@ -12,6 +12,8 @@
|
||||
#ifndef INKSCAPE_UI_DIALOG_FILTER_EFFECTS_H
|
||||
#define INKSCAPE_UI_DIALOG_FILTER_EFFECTS_H
|
||||
|
||||
+#include <memory>
|
||||
+
|
||||
#include <gtkmm/adjustment.h>
|
||||
#include <gtkmm/alignment.h>
|
||||
#include <gtkmm/box.h>
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/widgets/ruler.h inkscape-0.45.1+0.46pre1/src/widgets/ruler.h
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/widgets/ruler.h 2008-02-01 05:37:36.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/widgets/ruler.h 2008-02-07 20:53:36.000000000 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <gtk/gtkruler.h>
|
||||
#include "sp-metric.h"
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
#include <glib.h>
|
||||
|
||||
|
@ -1,139 +0,0 @@
|
||||
This solves the insecure temporary file usage for clip art thumbnails,
|
||||
however in a totally crappy way -- leaves stale files in /tmp.
|
||||
Not much worse than original though, as it was also leaving the files in place.
|
||||
|
||||
Lubomir Kundrak <lkundrak@redhat.com>
|
||||
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/ocaldialogs.cpp inkscape-0.45.1+0.46pre1/src/ui/dialog/ocaldialogs.cpp
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/ocaldialogs.cpp 2008-01-15 00:24:56.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/ui/dialog/ocaldialogs.cpp 2008-02-14 15:53:00.000000000 +0100
|
||||
@@ -14,6 +14,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
#include "ocaldialogs.h"
|
||||
#include "filedialogimpl-gtkmm.h"
|
||||
#include "interface.h"
|
||||
@@ -260,23 +262,35 @@ FileExportToOCALPasswordDialog::change_t
|
||||
void FileListViewText::on_cursor_changed()
|
||||
{
|
||||
// create file path
|
||||
- myFilename = Glib::get_tmp_dir();
|
||||
- myFilename.append(G_DIR_SEPARATOR_S);
|
||||
std::vector<Gtk::TreeModel::Path> pathlist;
|
||||
pathlist = this->get_selection()->get_selected_rows();
|
||||
std::vector<int> posArray(1);
|
||||
posArray = pathlist[0].get_indices();
|
||||
- myFilename.append(get_text(posArray[0], 2));
|
||||
|
||||
#ifdef WITH_GNOME_VFS
|
||||
gnome_vfs_init();
|
||||
GnomeVFSHandle *from_handle = NULL;
|
||||
- GnomeVFSHandle *to_handle = NULL;
|
||||
+ int to_fd = 0;
|
||||
GnomeVFSFileSize bytes_read;
|
||||
- GnomeVFSFileSize bytes_written;
|
||||
+ size_t bytes_written;
|
||||
GnomeVFSResult result;
|
||||
guint8 buffer[8192];
|
||||
|
||||
+ // create the temp file
|
||||
+ myFilename = Glib::get_tmp_dir();
|
||||
+ myFilename.append(G_DIR_SEPARATOR_S);
|
||||
+ myFilename.append("XXXXXX");
|
||||
+
|
||||
+ char tmpfn[strlen (myFilename.c_str ())+1];
|
||||
+ strcpy (tmpfn, myFilename.c_str ());
|
||||
+ to_fd = mkstemp (tmpfn);
|
||||
+ myFilename = tmpfn;
|
||||
+
|
||||
+ if (to_fd == -1) {
|
||||
+ sp_ui_error_dialog(_("Could not create temp file name with unique name."));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
//get file url
|
||||
Glib::ustring fileUrl = get_text(posArray[0], 1); //http url
|
||||
|
||||
@@ -290,51 +304,42 @@ void FileListViewText::on_cursor_changed
|
||||
if (!Glib::get_charset()) //If we are not utf8
|
||||
fileUrl = Glib::filename_to_utf8(fileUrl);
|
||||
|
||||
- // verifies if the file wasn't previously downloaded
|
||||
- if(gnome_vfs_open(&to_handle, myFilename.c_str(), GNOME_VFS_OPEN_READ) == GNOME_VFS_ERROR_NOT_FOUND)
|
||||
- {
|
||||
- // open the temp file to receive
|
||||
- result = gnome_vfs_open (&to_handle, myFilename.c_str(), GNOME_VFS_OPEN_WRITE);
|
||||
- if (result == GNOME_VFS_ERROR_NOT_FOUND){
|
||||
- result = gnome_vfs_create (&to_handle, myFilename.c_str(), GNOME_VFS_OPEN_WRITE, FALSE, GNOME_VFS_PERM_USER_ALL);
|
||||
+ result = gnome_vfs_open (&from_handle, fileUrl.c_str(), GNOME_VFS_OPEN_READ);
|
||||
+ if (result != GNOME_VFS_OK) {
|
||||
+ sp_ui_error_dialog(_("Could not find the file in Open Clip Art Library."));
|
||||
+ g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // copy the file
|
||||
+ while (1) {
|
||||
+
|
||||
+ result = gnome_vfs_read (from_handle, buffer, 8192, &bytes_read);
|
||||
+
|
||||
+ if ((result == GNOME_VFS_ERROR_EOF) &&(!bytes_read)){
|
||||
+ result = gnome_vfs_close (from_handle);
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
if (result != GNOME_VFS_OK) {
|
||||
- g_warning("Error creating temp file: %s", gnome_vfs_result_to_string(result));
|
||||
+ sp_ui_error_dialog(_("Error while downloading the file."));
|
||||
+ g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
return;
|
||||
}
|
||||
- result = gnome_vfs_open (&from_handle, fileUrl.c_str(), GNOME_VFS_OPEN_READ);
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("Could not find the file in Open Clip Art Library.");
|
||||
+
|
||||
+ bytes_written = write (to_fd, buffer, (size_t)bytes_read);
|
||||
+
|
||||
+ if ((size_t)bytes_read != bytes_written){
|
||||
+ sp_ui_error_dialog(_("Error while downloading the file."));
|
||||
+ g_warning("Bytes read not equal to bytes written");
|
||||
return;
|
||||
}
|
||||
- // copy the file
|
||||
- while (1) {
|
||||
- result = gnome_vfs_read (from_handle, buffer, 8192, &bytes_read);
|
||||
- if ((result == GNOME_VFS_ERROR_EOF) &&(!bytes_read)){
|
||||
- result = gnome_vfs_close (from_handle);
|
||||
- result = gnome_vfs_close (to_handle);
|
||||
- break;
|
||||
- }
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
- return;
|
||||
- }
|
||||
- result = gnome_vfs_write (to_handle, buffer, bytes_read, &bytes_written);
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
- return;
|
||||
- }
|
||||
- if (bytes_read != bytes_written){
|
||||
- g_warning("Bytes read not equal to bytes written");
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- gnome_vfs_close(to_handle);
|
||||
+
|
||||
}
|
||||
+
|
||||
+ close (to_fd);
|
||||
myPreview->showImage(myFilename);
|
||||
+ //unlink (myFilename.c_str ());
|
||||
myLabel->set_text(get_text(posArray[0], 4));
|
||||
#endif
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
Avoid use of temporary file for OCAL RSS feed as a fix for insecure temporary file usage.
|
||||
Add XML_PARSE_RECOVER, so that we don't fail in case of stupid errors in feed, such as
|
||||
undefined XML entities.
|
||||
|
||||
Lubomir Kundrak <lkundrak@redhat.com>
|
||||
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/ocaldialogs.cpp inkscape-0.45.1+0.46pre1/src/ui/dialog/ocaldialogs.cpp
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/ui/dialog/ocaldialogs.cpp 2008-01-15 00:24:56.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/ui/dialog/ocaldialogs.cpp 2008-02-14 15:54:22.000000000 +0100
|
||||
@@ -359,6 +359,27 @@ Glib::ustring FileListViewText::getFilen
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Read callback for xmlReadIO(), used below
|
||||
+ */
|
||||
+static int vfs_read_callback (GnomeVFSHandle *handle, char* buf, int nb)
|
||||
+{
|
||||
+ GnomeVFSFileSize ndone;
|
||||
+ GnomeVFSResult result;
|
||||
+
|
||||
+ result = gnome_vfs_read (handle, buf, nb, &ndone);
|
||||
+
|
||||
+ if (result == GNOME_VFS_OK) {
|
||||
+ return (int)ndone;
|
||||
+ } else {
|
||||
+ if (result != GNOME_VFS_ERROR_EOF) {
|
||||
+ sp_ui_error_dialog(_("Error while reading the Open Clip Art RSS feed"));
|
||||
+ g_warning("%s\n", gnome_vfs_result_to_string(result));
|
||||
+ }
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* Callback for user input into searchTagEntry
|
||||
*/
|
||||
void FileImportFromOCALDialog::searchTagEntryChangedCallback()
|
||||
@@ -380,74 +401,30 @@ void FileImportFromOCALDialog::searchTag
|
||||
|
||||
#ifdef WITH_GNOME_VFS
|
||||
|
||||
- // get the rss feed
|
||||
+ // open the rss feed
|
||||
gnome_vfs_init();
|
||||
GnomeVFSHandle *from_handle = NULL;
|
||||
- GnomeVFSHandle *to_handle = NULL;
|
||||
- GnomeVFSFileSize bytes_read;
|
||||
- GnomeVFSFileSize bytes_written;
|
||||
GnomeVFSResult result;
|
||||
- guint8 buffer[8192];
|
||||
-
|
||||
- // create the temp file name
|
||||
- Glib::ustring fileName = Glib::get_tmp_dir ();
|
||||
- fileName.append(G_DIR_SEPARATOR_S);
|
||||
- fileName.append("ocalfeed.xml");
|
||||
-
|
||||
- // open the temp file to receive
|
||||
- result = gnome_vfs_open (&to_handle, fileName.c_str(), GNOME_VFS_OPEN_WRITE);
|
||||
- if (result == GNOME_VFS_ERROR_NOT_FOUND){
|
||||
- result = gnome_vfs_create (&to_handle, fileName.c_str(), GNOME_VFS_OPEN_WRITE, FALSE, GNOME_VFS_PERM_USER_ALL);
|
||||
- }
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("Error creating temp file: %s", gnome_vfs_result_to_string(result));
|
||||
- return;
|
||||
- }
|
||||
|
||||
- // open the rss feed
|
||||
result = gnome_vfs_open (&from_handle, uri.c_str(), GNOME_VFS_OPEN_READ);
|
||||
if (result != GNOME_VFS_OK) {
|
||||
sp_ui_error_dialog(_("Failed to receive the Open Clip Art Library RSS feed. Verify if the server name is correct in Configuration->Misc (e.g.: openclipart.org)"));
|
||||
return;
|
||||
}
|
||||
|
||||
- // copy the file
|
||||
- while (1) {
|
||||
-
|
||||
- result = gnome_vfs_read (from_handle, buffer, 8192, &bytes_read);
|
||||
-
|
||||
- if ((result == GNOME_VFS_ERROR_EOF) &&(!bytes_read)){
|
||||
- result = gnome_vfs_close (from_handle);
|
||||
- result = gnome_vfs_close (to_handle);
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
- return;
|
||||
- }
|
||||
- result = gnome_vfs_write (to_handle, buffer, bytes_read, &bytes_written);
|
||||
- if (result != GNOME_VFS_OK) {
|
||||
- g_warning("%s", gnome_vfs_result_to_string(result));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (bytes_read != bytes_written){
|
||||
- g_warning("Bytes read not equal to bytes written");
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-
|
||||
// create the resulting xml document tree
|
||||
// this initialize the library and test mistakes between compiled and shared library used
|
||||
LIBXML_TEST_VERSION
|
||||
xmlDoc *doc = NULL;
|
||||
xmlNode *root_element = NULL;
|
||||
- doc = xmlReadFile(fileName.c_str(), NULL, 0);
|
||||
+
|
||||
+ doc = xmlReadIO ((xmlInputReadCallback) vfs_read_callback,
|
||||
+ (xmlInputCloseCallback) gnome_vfs_close, from_handle, uri.c_str(), NULL,
|
||||
+ XML_PARSE_RECOVER);
|
||||
if (doc == NULL) {
|
||||
- g_warning("Failed to parse %s\n", fileName.c_str());
|
||||
- return;
|
||||
+ sp_ui_error_dialog(_("Server supplied malformed Clip Art feed"));
|
||||
+ g_warning("Failed to parse %s\n", uri.c_str());
|
||||
+ return;
|
||||
}
|
||||
|
||||
// get the root element node
|
@ -1,21 +0,0 @@
|
||||
Avoid copying a vector when start offset is beyond the end.
|
||||
This fixes a segfault when compiled with gcc-4.3 (#432220)
|
||||
|
||||
Lubomir Kundrak <lkundrak@redhat.com>
|
||||
|
||||
diff -urp inkscape-0.45.1+0.46pre1.orig/src/sp-text.cpp inkscape-0.45.1+0.46pre1/src/sp-text.cpp
|
||||
--- inkscape-0.45.1+0.46pre1.orig/src/sp-text.cpp 2008-01-15 00:24:22.000000000 +0100
|
||||
+++ inkscape-0.45.1+0.46pre1/src/sp-text.cpp 2008-02-13 20:44:34.000000000 +0100
|
||||
@@ -749,8 +749,10 @@ void TextTagAttributes::mergeInto(Inksca
|
||||
void TextTagAttributes::mergeSingleAttribute(std::vector<SVGLength> *output_list, std::vector<SVGLength> const &parent_list, unsigned parent_offset, std::vector<SVGLength> const *overlay_list)
|
||||
{
|
||||
if (overlay_list == NULL) {
|
||||
- output_list->resize(std::max(0, (int)parent_list.size() - (int)parent_offset));
|
||||
- std::copy(parent_list.begin() + parent_offset, parent_list.end(), output_list->begin());
|
||||
+ if (parent_offset < parent_list.size()) {
|
||||
+ output_list->resize((int)parent_list.size() - (int)parent_offset);
|
||||
+ std::copy(parent_list.begin() + parent_offset, parent_list.end(), output_list->begin());
|
||||
+ }
|
||||
} else {
|
||||
output_list->clear();
|
||||
output_list->reserve(std::max((int)parent_list.size() - (int)parent_offset, (int)overlay_list->size()));
|
@ -1,19 +1,14 @@
|
||||
Name: inkscape
|
||||
Version: 0.45.1+0.46pre1
|
||||
Release: 5%{?dist}
|
||||
Version: 0.46
|
||||
Release: 0.1.pre2%{?dist}
|
||||
Summary: Vector-based drawing program using SVG
|
||||
|
||||
Group: Applications/Productivity
|
||||
License: GPLv2+
|
||||
URL: http://inkscape.sourceforge.net/
|
||||
Source0: http://download.sourceforge.net/inkscape/inkscape-%{version}.tar.bz2
|
||||
Source0: http://download.sourceforge.net/inkscape/inkscape-0.45+0.46pre2.tar.bz2
|
||||
Patch0: inkscape-16571-cxxinclude.patch
|
||||
Patch1: inkscape-0.45.1-desktop.patch
|
||||
Patch2: inkscape-0.46pre1-gcc43.patch
|
||||
Patch3: inkscape-0.46pre1-vectors.patch
|
||||
Patch4: inkscape-0.46pre1-ocal1.patch
|
||||
Patch5: inkscape-0.46pre1-ocal2.patch
|
||||
Patch6: inkscape-0.46pre1-fontsel.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -65,14 +60,9 @@ C and C++, using the Gtk+ toolkit and optionally some Gnome libraries.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n %{name}-0.45+0.46pre2
|
||||
%patch0 -p1 -b .cxxinclude
|
||||
%patch1 -p1 -b .desktop
|
||||
%patch2 -p1 -b .gcc43
|
||||
%patch3 -p1 -b .vectors
|
||||
%patch4 -p1 -b .ocal1
|
||||
%patch5 -p1 -b .ocal2
|
||||
%patch6 -p0 -b .fontsel
|
||||
find -type f -regex '.*\.\(cpp\|h\)' -perm +111 -exec chmod -x {} ';'
|
||||
find share/extensions/ -type f -regex '.*\.py' -perm +111 -exec chmod -x {} ';'
|
||||
dos2unix -k -q share/extensions/*.py
|
||||
@ -132,6 +122,10 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Feb 17 2008 Lubomir Kundrak <lkundrak@redhat.com> - 0.46-0.1.pre2
|
||||
- 0.46pre2
|
||||
- Dropping upstreamed patches
|
||||
|
||||
* Sat Feb 16 2008 Lubomir Kundrak <lkundrak@redhat.com> - 0.45.1+0.46pre1-5
|
||||
- Attempt to fix the font selector (#432892)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user