[gnumeric] Fix calls to dialog_so_styled
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Fix calls to dialog_so_styled
- Date: Tue, 21 Apr 2009 11:15:17 -0400 (EDT)
commit 224446e39118b95d63025cbf80a46023ae4f25d9
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue Apr 21 09:13:23 2009 -0600
Fix calls to dialog_so_styled
2009-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/gnm-so-filled.c (gnm_so_filled_user_config): adjust for
changed arguments of dialog_so_styled
* src/gnm-so-line.c (gnm_so_line_user_config): ditto
* src/gnm-so-polygon.c (gnm_so_polygon_user_config): ditto
2009-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialogs.h (dialog_so_styled): pass both the title and information
on the extent of the properties dialog
* dialog-so-styled.c (dialog_so_styled): use the passsed title
---
ChangeLog | 7 +++++++
src/dialogs/ChangeLog | 6 ++++++
src/dialogs/dialog-so-styled.c | 7 ++-----
src/dialogs/dialogs.h | 8 +++++++-
src/gnm-so-filled.c | 5 ++++-
src/gnm-so-line.c | 4 ++--
src/gnm-so-polygon.c | 4 ++--
7 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9ec312f..46b9e22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/gnm-so-filled.c (gnm_so_filled_user_config): adjust for
+ changed arguments of dialog_so_styled
+ * src/gnm-so-line.c (gnm_so_line_user_config): ditto
+ * src/gnm-so-polygon.c (gnm_so_polygon_user_config): ditto
+
2009-04-21 Morten Welinder <terra gnome org>
* src/commands.c (cmd_print_setup_redo): Only reverse the list
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 00c350e..3a602c1 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialogs.h (dialog_so_styled): pass both the title and information
+ on the extent of the properties dialog
+ * dialog-so-styled.c (dialog_so_styled): use the passsed title
+
2009-04-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialogs.h (dialog_so_styled): change arguments
diff --git a/src/dialogs/dialog-so-styled.c b/src/dialogs/dialog-so-styled.c
index 7dd41c0..165990f 100644
--- a/src/dialogs/dialog-so-styled.c
+++ b/src/dialogs/dialog-so-styled.c
@@ -113,13 +113,10 @@ dialog_so_styled_text_widget (DialogSOStyled *state)
void
dialog_so_styled (WBCGtk *wbcg,
GObject *so, GOStyle *orig, GOStyle *default_style,
- gboolean showtext)
+ char const *title, so_styled_t extent)
{
DialogSOStyled *state;
GtkWidget *dialog, *help, *editor;
- char const *title = showtext ?
- _("Label Properties") :
- _("Filled Object Properties");
/* Only pop up one copy per workbook */
if (gnumeric_dialog_raise_if_exists (wbcg, GNM_SO_STYLED_KEY))
@@ -151,7 +148,7 @@ dialog_so_styled (WBCGtk *wbcg,
editor, TRUE, TRUE, TRUE);
g_object_unref (default_style);
- if (showtext) {
+ if (extent == SO_STYLED_TEXT) {
GtkWidget *text_w = dialog_so_styled_text_widget (state);
gtk_widget_show (text_w);
if (GTK_IS_NOTEBOOK (editor))
diff --git a/src/dialogs/dialogs.h b/src/dialogs/dialogs.h
index 0d88ada..99d9f60 100644
--- a/src/dialogs/dialogs.h
+++ b/src/dialogs/dialogs.h
@@ -106,9 +106,15 @@ void dialog_preferences (WBCGtk *wbcg, gint page);
void dialog_recent_used (WBCGtk *wbcg);
void dialog_new_view (WBCGtk *wbcg);
+
+typedef enum {
+ SO_STYLED_STYLE_ONLY = 0,
+ SO_STYLED_TEXT
+} so_styled_t;
+
void dialog_so_styled (WBCGtk *wbcg, GObject *so,
GOStyle *orig, GOStyle *default_style,
- gboolean showtext);
+ char const *title, so_styled_t extent);
void dialog_so_list (WBCGtk *wbcg, GObject *so);
void dialog_doc_metadata_new (WBCGtk *wbcg);
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 39b03c7..5d703d5 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -166,9 +166,12 @@ static void
gnm_so_filled_user_config (SheetObject *so, SheetControl *sc)
{
GnmSOFilled *sof = GNM_SO_FILLED (so);
+ gboolean text = (sof->text != NULL);
dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (so),
sof->style, sof_default_style (),
- (sof->text != NULL));
+ text ? _("Label Properties") :
+ _("Filled Object Properties"),
+ text ? SO_STYLED_TEXT : SO_STYLED_STYLE_ONLY);
}
static void
diff --git a/src/gnm-so-line.c b/src/gnm-so-line.c
index 1c8bdf1..3e7d53b 100644
--- a/src/gnm-so-line.c
+++ b/src/gnm-so-line.c
@@ -155,8 +155,8 @@ static void
gnm_so_line_user_config (SheetObject *so, SheetControl *sc)
{
dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (so),
- GNM_SO_LINE (so)->style, sol_default_style (),
- _("Line/Arrow Properties"));
+ GNM_SO_LINE (so)->style, sol_default_style (),
+ _("Line/Arrow Properties"), SO_STYLED_STYLE_ONLY);
}
static void
diff --git a/src/gnm-so-polygon.c b/src/gnm-so-polygon.c
index 1eecabc..98445e9 100644
--- a/src/gnm-so-polygon.c
+++ b/src/gnm-so-polygon.c
@@ -187,8 +187,8 @@ static void
gnm_so_polygon_user_config (SheetObject *so, SheetControl *sc)
{
dialog_so_styled (scg_wbcg (SHEET_CONTROL_GUI (sc)), G_OBJECT (so),
- GNM_SO_POLYGON (so)->style, sop_default_style (),
- _("Polygon Properties"));
+ GNM_SO_POLYGON (so)->style, sop_default_style (),
+ _("Polygon Properties"), SO_STYLED_STYLE_ONLY);
}
#endif /* GNM_WITH_GTK */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]