[gnumeric] Minor improvement to condition copy in conditional format dialog
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Minor improvement to condition copy in conditional format dialog
- Date: Sun, 10 Jul 2011 18:28:55 +0000 (UTC)
commit fb66070f66e4e101b2b4875891555a1c28e6cc8f
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sun Jul 10 12:27:09 2011 -0600
Minor improvement to condition copy in conditional format dialog
2011-07-10 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-cell-format-cond.c (cb_c_fmt_dialog_copy_button): use the
current style to build a full style.
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-cell-format-cond.c | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index d9427ee..cdefb84 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,5 +1,10 @@
2011-07-10 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * dialog-cell-format-cond.c (cb_c_fmt_dialog_copy_button): use the
+ current style to build a full style.
+
+2011-07-10 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* cell-format-cond.ui: enable copy button
* dialog-cell-format-cond.c (c_fmt_dialog_set_sensitive): handle
copy button
diff --git a/src/dialogs/dialog-cell-format-cond.c b/src/dialogs/dialog-cell-format-cond.c
index beda98a..45b1d5f 100644
--- a/src/dialogs/dialog-cell-format-cond.c
+++ b/src/dialogs/dialog-cell-format-cond.c
@@ -45,6 +45,7 @@
#include <commands.h>
#include <mathfunc.h>
#include <style-conditions.h>
+#include <gnm-style-impl.h>
#include <gtk/gtk.h>
@@ -455,8 +456,14 @@ cb_c_fmt_dialog_copy_button (GtkWidget *btn, CFormatState *state)
gnm_expr_entry_load_from_text (GNM_EXPR_ENTRY (state->editor.expr_y),
"");
/* Set the style */
- style = gnm_style_new_default ();
- gnm_style_merge (style, gsc->overlay);
+ if (state->style && state->style->cond_styles)
+ style = gnm_style_dup
+ (g_ptr_array_index (state->style->cond_styles,
+ ind));
+ else {
+ style = gnm_style_new_default ();
+ gnm_style_merge (style, gsc->overlay);
+ }
dialog_cell_format_style_added (state, style);
/* Set the appl. style components */
c_fmt_dialog_set_component (state, gsc->overlay, "check-background",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]