[gnumeric] Fixed various issues, including #662908
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed various issues, including #662908
- Date: Fri, 28 Oct 2011 08:02:55 +0000 (UTC)
commit 769c502a44f02cc1c73587d7adf04c566285b77c
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri Oct 28 10:00:27 2011 +0200
Fixed various issues, including #662908
ChangeLog | 18 ++++++++++++------
plugins/openoffice/ChangeLog | 4 ++++
plugins/openoffice/openoffice-read.c | 2 +-
src/dialogs/ChangeLog | 6 ++++++
src/dialogs/autofilter-top10.ui | 4 ++--
src/dialogs/doc-meta-data.ui | 4 ++--
src/dialogs/sheet-resize.ui | 4 ++--
src/sheet-object-image.c | 19 +++++++++++--------
8 files changed, 40 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8adec06..f9e9dc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-10-28 Jean Brefort <jean brefort normalesup org>
+
+ * src/sheet-object-image.c (sheet_object_image_set_image),
+ (gnm_soi_get_target_list), (content_end), (gnm_soi_draw_cairo): minor
+ GOImage related tweaks.
+
+2011-10-27 Jean Brefort <jean brefort normalesup org>
+
+ * src/libgnumeric.c (gnm_init): fixed SVG images size. [#628472]
+ * src/sheet-object-image.c (gnm_soi_get_target_list),
+ (gnm_soi_default_size): ditto.
+
2011-10-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/item-edit.c (item_edit_update_bounds): translate sub/superscript
@@ -12,12 +24,6 @@
2011-10-27 Jean Brefort <jean brefort normalesup org>
- * src/libgnumeric.c (gnm_init): fixed SVG images size. [#628472]
- * src/sheet-object-image.c (gnm_soi_get_target_list),
- (gnm_soi_default_size): ditto.
-
-2011-10-27 Jean Brefort <jean brefort normalesup org>
-
* src/sheet-object-image.c (sheet_object_image_set_image),
(gnm_soi_finalize), (gnm_soi_new_view), (content_end),
(gnm_soi_draw_cairo): add true support for SVG images.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 2770bb1..4a919e2 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-28 Jean Brefort <jean brefort normalesup org>
+
+ * openoffice-read.c (odf_apply_style_props): fixed compilation. [#662908]
+
2011-10-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_attrs_as_string): support sub-/superscript
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index babf24e..2fabaf4 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -894,7 +894,7 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
"pixbuf", pixbuf, NULL);
else
style->fill.image.image =
- go_image_new_from_pixbuf (pixbuf);
+ go_pixbuf_new_from_pixbuf (pixbuf);
go_image_set_name (style->fill.image.image,
fill_image_name);
g_object_unref (G_OBJECT (loader));
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index a326504..72f6729 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-28 Jean Brefort <jean brefort normalesup org>
+
+ * autofilter-top10.ui: fixed GtkGrid spacings.
+ * doc-meta-data.ui: ditto.
+ * sheet-resize.ui: ditto.
+
2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-preferences.c (pref_window_page_initializer): add cell marker
diff --git a/src/dialogs/autofilter-top10.ui b/src/dialogs/autofilter-top10.ui
index db3e966..e060d45 100644
--- a/src/dialogs/autofilter-top10.ui
+++ b/src/dialogs/autofilter-top10.ui
@@ -86,8 +86,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="cp-label">
<property name="visible">True</property>
diff --git a/src/dialogs/doc-meta-data.ui b/src/dialogs/doc-meta-data.ui
index b632a4b..eba0244 100644
--- a/src/dialogs/doc-meta-data.ui
+++ b/src/dialogs/doc-meta-data.ui
@@ -1158,8 +1158,8 @@
<object class="GtkGrid" id="properties-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
diff --git a/src/dialogs/sheet-resize.ui b/src/dialogs/sheet-resize.ui
index cdc1554..405d618 100644
--- a/src/dialogs/sheet-resize.ui
+++ b/src/dialogs/sheet-resize.ui
@@ -64,8 +64,8 @@
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="columns_label">
<property name="width_request">80</property>
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index db90248..5f56f8a 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -141,10 +141,11 @@ sheet_object_image_set_image (SheetObjectImage *soi,
g_return_if_fail (IS_SHEET_OBJECT_IMAGE (soi));
g_return_if_fail (soi->bytes.data == NULL && soi->bytes.len == 0);
- soi->type = g_strdup (type);
+ soi->type = (type && *type)? g_strdup (type): NULL;
soi->bytes.len = data_len;
soi->bytes.data = copy_data ? g_memdup (data, data_len) : data;
- soi->image = go_image_new_from_data (soi->type, soi->bytes.data, soi->bytes.len, NULL);
+ soi->image = go_image_new_from_data (soi->type, soi->bytes.data, soi->bytes.len,
+ ((soi->type == NULL)? &soi->type: NULL), NULL);
}
void
@@ -373,9 +374,10 @@ gnm_soi_get_target_list (SheetObject const *so)
GtkTargetList *tl = gtk_target_list_new (NULL, 0);
char *mime_str;
GSList *mimes, *ptr;
- GdkPixbuf *pixbuf = soi_get_pixbuf (soi, 1.0);
- /* FIXME: we should not need that if we have a GOImag,used to set the soi->type */
+ GdkPixbuf *pixbuf = NULL;
+ if (soi->type == NULL || soi->image == NULL)
+ pixbuf = soi_get_pixbuf (soi, 1.0);
mime_str = go_image_format_to_mime (soi->type);
mimes = go_strsplit_to_slist (mime_str, ',');
for (ptr = mimes; ptr != NULL; ptr = ptr->next) {
@@ -388,9 +390,10 @@ gnm_soi_get_target_list (SheetObject const *so)
g_free (mime_str);
go_slist_free_custom (mimes, g_free);
/* No need to eliminate duplicates. */
- if (pixbuf != NULL) {
+ if (soi->image != NULL || pixbuf != NULL) {
gtk_target_list_add_image_targets (tl, 0, TRUE);
- g_object_unref (pixbuf);
+ if (pixbuf != NULL)
+ g_object_unref (pixbuf);
}
return tl;
@@ -496,7 +499,7 @@ content_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *unknown)
soi->bytes.len = gsf_base64_decode_simple (
xin->content->str, xin->content->len);
soi->bytes.data = g_memdup (xin->content->str, soi->bytes.len);
- soi->image = go_image_new_from_data (soi->type, xin->content->str, soi->bytes.len, NULL);
+ soi->image = go_image_new_from_data (soi->type, xin->content->str, soi->bytes.len, NULL, NULL);
}
static void
@@ -586,7 +589,7 @@ gnm_soi_draw_cairo (SheetObject const *so, cairo_t *cr,
if (!pixbuf || width == 0. || height == 0.)
return;
cairo_save (cr);
- img = (GOImage *) go_pixbuf_new_from_pixbuf (pixbuf);
+ img = go_pixbuf_new_from_pixbuf (pixbuf);
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]