From: John Darrington Date: Wed, 19 Nov 2008 00:29:36 +0000 (+0900) Subject: Fixed problems with justification X-Git-Tag: v0.7.1~144^2 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6351e3631c90fe46d70a8801a7a32f289cbba08f;p=pspp-builds.git Fixed problems with justification --- diff --git a/lib/gtksheet/gsheet-hetero-column.c b/lib/gtksheet/gsheet-hetero-column.c index 04e1a4d5..42b1035f 100644 --- a/lib/gtksheet/gsheet-hetero-column.c +++ b/lib/gtksheet/gsheet-hetero-column.c @@ -133,7 +133,7 @@ g_sheet_hetero_column_get_button_label (const GSheetColumn *geom, glong u) static GtkJustification g_sheet_hetero_column_get_justification (const GSheetColumn *geom, glong u) { - return GTK_JUSTIFY_FILL; + return GTK_JUSTIFY_LEFT; } diff --git a/lib/gtksheet/gtksheet.c b/lib/gtksheet/gtksheet.c index 69b55174..8e5e49c9 100644 --- a/lib/gtksheet/gtksheet.c +++ b/lib/gtksheet/gtksheet.c @@ -5604,6 +5604,7 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, if (row < 0 || col < 0) return FALSE; + attr->foreground = GTK_WIDGET (sheet)->style->black; attr->background = sheet->color[BG_COLOR]; @@ -5618,6 +5619,7 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, attr->is_editable = g_sheet_model_is_editable (sheet->model, row, col); attr->is_visible = g_sheet_model_is_visible (sheet->model, row, col); + colormap = gtk_widget_get_colormap (GTK_WIDGET (sheet)); fg = g_sheet_model_get_foreground (sheet->model, row, col); if ( fg ) @@ -5633,8 +5635,12 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, attr->background = *bg; } + attr->justification = + g_sheet_column_get_justification (sheet->column_geometry, col); + j = g_sheet_model_get_justification (sheet->model, row, col); - attr->justification = j ? *j : GTK_JUSTIFY_LEFT; + if (j) + attr->justification = *j; font_desc = g_sheet_model_get_font_desc (sheet->model, row, col); if ( font_desc ) attr->font_desc = font_desc; diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index eb18f2c4..efe1ae0d 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -239,7 +239,8 @@ psppire_var_store_class_init (PsppireVarStoreClass *class) pspec); } -#define DISABLED_COLOR "pink" +#define DISABLED_COLOR "gray" + static void psppire_var_store_init (PsppireVarStore *var_store) { @@ -306,7 +307,7 @@ psppire_var_store_is_editable (const GSheetModel *model, glong row, glong column } -static const GdkColor * +static GdkColor * psppire_var_store_get_foreground (const GSheetModel *model, glong row, glong column) { PsppireVarStore *store = PSPPIRE_VAR_STORE (model); @@ -345,6 +346,7 @@ psppire_var_store_sheet_model_init (GSheetModelIface *iface) iface->get_background = NULL; iface->get_font_desc = psppire_var_store_get_font_desc; iface->get_cell_border = NULL; + iface->get_justification = NULL; } @@ -844,5 +846,3 @@ psppire_var_store_sheet_row_init (GSheetRowIface *iface) iface->get_button_label = geometry_get_button_label; } - -