[gnumeric] Fixed format handling in go_data_get_markup.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed format handling in go_data_get_markup.
- Date: Sun, 7 Aug 2011 16:13:39 +0000 (UTC)
commit d32b31d341f3a5249270a08c06064cada5a03d66
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Aug 7 18:17:35 2011 +0200
Fixed format handling in go_data_get_markup.
ChangeLog | 5 +++++
src/graph.c | 3 ++-
src/widgets/ChangeLog | 5 +++++
src/widgets/widget-editable-label.c | 16 ++++++++--------
4 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a6623c3..172c87f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-07 Jean Brefort <jean brefort normalesup org>
+
+ * src/graph.c (gnm_go_data_scalar_get_markup): don't leak a format and
+ don't retrieve a markup from an non markup format.
+
2011-08-05 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/wbc-gtk.c (wbc_gtk_create_status_area): enable showing of
diff --git a/src/graph.c b/src/graph.c
index ebd0739..d89a02b 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -393,8 +393,9 @@ gnm_go_data_scalar_get_markup (GODataScalar *dat)
{
PangoAttrList const *res = NULL;
GOFormat const *fmt = gnm_go_data_preferred_fmt (GO_DATA (dat));
- if (fmt)
+ if (fmt && go_format_is_markup (fmt))
res = go_format_get_markup (fmt);
+ go_format_unref (fmt);
return res;
}
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index c022ca8..2bd127f 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-07 Jean Brefort <jean brefort normalesup org>
+
+ * widget-editable-label.c (el_set_style_entry),
+ (el_set_style_label): use GTK_STATE_FLAG_*.
+
2011-08-04 Andreas J. Guelzow <aguelzow pyrshep ca>
* widget-editable-label.c (el_button_press_event): enable acitivation
diff --git a/src/widgets/widget-editable-label.c b/src/widgets/widget-editable-label.c
index 5aff5fb..2729d94 100644
--- a/src/widgets/widget-editable-label.c
+++ b/src/widgets/widget-editable-label.c
@@ -67,10 +67,10 @@ static void
el_set_style_entry (EditableLabel *el)
{
GtkWidget *w = GTK_WIDGET (el);
- gtk_widget_override_background_color (w, GTK_STATE_NORMAL, NULL);
- gtk_widget_override_color (w, GTK_STATE_NORMAL, NULL);
- gtk_widget_override_background_color (w, GTK_STATE_ACTIVE, NULL);
- gtk_widget_override_color (w, GTK_STATE_ACTIVE, NULL);
+ gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, NULL);
+ gtk_widget_override_color (w, GTK_STATE_FLAG_NORMAL, NULL);
+ gtk_widget_override_background_color (w, GTK_STATE_FLAG_ACTIVE, NULL);
+ gtk_widget_override_color (w, GTK_STATE_FLAG_ACTIVE, NULL);
}
static void
@@ -78,14 +78,14 @@ el_set_style_label (EditableLabel *el)
{
GtkWidget *w = GTK_WIDGET (el);
- gtk_widget_override_background_color (w, GTK_STATE_NORMAL,
+ gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL,
el->base_set ? &el->base : NULL);
- gtk_widget_override_color (w, GTK_STATE_NORMAL,
+ gtk_widget_override_color (w, GTK_STATE_FLAG_NORMAL,
el->text_set ? &el->text : NULL);
- gtk_widget_override_background_color (w, GTK_STATE_ACTIVE,
+ gtk_widget_override_background_color (w, GTK_STATE_FLAG_ACTIVE,
el->base_set ? &el->base : NULL);
- gtk_widget_override_color (w, GTK_STATE_ACTIVE,
+ gtk_widget_override_color (w, GTK_STATE_FLAG_ACTIVE,
el->text_set ? &el->text : NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]