From: John Darrington Date: Mon, 1 Dec 2008 09:35:16 +0000 (+0900) Subject: Merge branch 'rewrite-sheet' of ssh://jmd@git.sv.gnu.org/srv/git/pspp into rewrite... X-Git-Tag: v0.7.1~91 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=912ff5beae407cded83c9e389a2fd3c9166fd2c0;hp=7705ee1088e83c4d3d1bbb05039f2abb9af803b6;p=pspp-builds.git Merge branch 'rewrite-sheet' of ssh://jmd@git.sv.gnu.org/srv/git/pspp into rewrite-sheet Conflicts: src/ui/gui/psppire-var-store.h --- diff --git a/lib/gtksheet/gsheetmodel.c b/lib/gtksheet/gsheetmodel.c index 88e4e603..23aca590 100644 --- a/lib/gtksheet/gsheetmodel.c +++ b/lib/gtksheet/gsheetmodel.c @@ -415,27 +415,6 @@ g_sheet_model_get_justification (const GSheetModel *model, row, column); } -/** - * g_sheet_model_get_font_desc: - * @sheet_model: A #GSheetModel - * @row: The row - * @column: The column - * - * Returns the font description of the cell at @row, @column - * Returns: the font description, or NULL on error. - **/ -const PangoFontDescription * -g_sheet_model_get_font_desc(const GSheetModel *model, - glong row, glong column) -{ - g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL); - if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_font_desc) - return NULL; - - return G_SHEET_MODEL_GET_IFACE (model)->get_font_desc (model, - row, column); -} - /** * g_sheet_model_get_cell_border: * @sheet_model: A #GSheetModel diff --git a/lib/gtksheet/gsheetmodel.h b/lib/gtksheet/gsheetmodel.h index 510c92e9..cd7f1d33 100644 --- a/lib/gtksheet/gsheetmodel.h +++ b/lib/gtksheet/gsheetmodel.h @@ -117,9 +117,6 @@ struct _GSheetModelIface const GtkJustification * (* get_justification) (const GSheetModel *sheet_model, glong row, glong column); - const PangoFontDescription * (* get_font_desc) (const GSheetModel *sheet_model, - glong row, glong column); - const GtkSheetCellBorder * (* get_cell_border) (const GSheetModel *sheet_model, glong row, glong column); @@ -189,14 +186,9 @@ GdkColor *g_sheet_model_get_foreground GdkColor *g_sheet_model_get_background (const GSheetModel *model, glong row, glong column); - const GtkJustification *g_sheet_model_get_justification (const GSheetModel *model, glong row, glong column); - -const PangoFontDescription *g_sheet_model_get_font_desc - (const GSheetModel *model, glong row, glong column); - const GtkSheetCellBorder * g_sheet_model_get_cell_border (const GSheetModel *model, glong row, glong column); diff --git a/lib/gtksheet/gtksheet.c b/lib/gtksheet/gtksheet.c index 010778c7..3c1f3225 100644 --- a/lib/gtksheet/gtksheet.c +++ b/lib/gtksheet/gtksheet.c @@ -86,6 +86,8 @@ enum #define DEFAULT_COLUMN_WIDTH 80 #define DEFAULT_ROW_HEIGHT 25 +static void set_entry_widget_font (GtkSheet *sheet); + static void gtk_sheet_update_primary_selection (GtkSheet *sheet); static void draw_column_title_buttons_range (GtkSheet *sheet, gint first, gint n); static void draw_row_title_buttons_range (GtkSheet *sheet, gint first, gint n); @@ -392,6 +394,7 @@ static void gtk_sheet_map (GtkWidget *widget); static void gtk_sheet_unmap (GtkWidget *widget); static gint gtk_sheet_expose (GtkWidget *widget, GdkEventExpose *event); + static void gtk_sheet_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, @@ -1707,6 +1710,7 @@ gtk_sheet_style_set (GtkWidget *widget, gtk_style_set_background (widget->style, widget->window, widget->state); } + set_entry_widget_font (sheet); } #define BORDER_WIDTH 2 @@ -2009,6 +2013,7 @@ gtk_sheet_cell_draw (GtkSheet *sheet, gint row, gint col) { PangoLayout *layout; PangoRectangle text; + PangoFontDescription *font_desc = GTK_WIDGET (sheet)->style->font_desc; gint font_height; gchar *label; @@ -2058,15 +2063,16 @@ gtk_sheet_cell_draw (GtkSheet *sheet, gint row, gint col) layout = gtk_widget_create_pango_layout (GTK_WIDGET (sheet), label); dispose_string (sheet, label); - pango_layout_set_font_description (layout, attributes.font_desc); + pango_layout_set_font_description (layout, font_desc); + pango_layout_get_pixel_extents (layout, NULL, &text); gdk_gc_set_clip_rectangle (sheet->fg_gc, &area); - font_height = pango_font_description_get_size (attributes.font_desc); - if ( !pango_font_description_get_size_is_absolute (attributes.font_desc)) + font_height = pango_font_description_get_size (font_desc); + if ( !pango_font_description_get_size_is_absolute (font_desc)) font_height /= PANGO_SCALE; /* Centre the text vertically */ @@ -4547,6 +4553,20 @@ gtk_sheet_size_allocate_entry (GtkSheet *sheet) } +/* Copy the sheet's font to the entry widget */ +static void +set_entry_widget_font (GtkSheet *sheet) +{ + GtkRcStyle *style = gtk_widget_get_modifier_style (sheet->entry_widget); + + pango_font_description_free (style->font_desc); + style->font_desc = pango_font_description_copy (GTK_WIDGET (sheet)->style->font_desc); + + gtk_widget_modify_style (sheet->entry_widget, style); +} + + + static void create_sheet_entry (GtkSheet *sheet) { @@ -4584,6 +4604,8 @@ create_sheet_entry (GtkSheet *sheet) G_CALLBACK (gtk_sheet_entry_changed), sheet); + set_entry_widget_font (sheet); + gtk_widget_show (sheet->entry_widget); } @@ -5193,7 +5215,6 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, { GdkColor *fg, *bg; const GtkJustification *j ; - const PangoFontDescription *font_desc ; const GtkSheetCellBorder *border ; GdkColormap *colormap; @@ -5211,7 +5232,6 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, attr->border.join_style = GDK_JOIN_MITER; attr->border.mask = 0; attr->border.color = GTK_WIDGET (sheet)->style->black; - attr->font_desc = GTK_WIDGET (sheet)->style->font_desc; attr->is_editable = g_sheet_model_is_editable (sheet->model, row, col); @@ -5237,9 +5257,6 @@ gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col, 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; - border = g_sheet_model_get_cell_border (sheet->model, row, col); if ( border ) attr->border = *border; diff --git a/lib/gtksheet/gtksheet.h b/lib/gtksheet/gtksheet.h index 75e21c98..92c4248e 100644 --- a/lib/gtksheet/gtksheet.h +++ b/lib/gtksheet/gtksheet.h @@ -62,7 +62,6 @@ typedef struct _GtkSheetHoverTitle GtkSheetHoverTitle; struct _GtkSheetCellAttr { GtkJustification justification; - const PangoFontDescription *font_desc; GdkColor foreground; GdkColor background; GtkSheetCellBorder border; diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index d4cbae1e..13cc29a9 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -74,6 +74,9 @@ static void on_edit_paste (GtkAction *a, gpointer data); static GtkWidget * create_data_sheet_variable_popup_menu (struct data_editor *); + +static GtkWidget * create_var_sheet_variable_popup_menu (struct data_editor *); + static GtkWidget * create_data_sheet_cases_popup_menu (struct data_editor *); static void register_data_editor_actions (struct data_editor *de); @@ -933,17 +936,20 @@ new_data_editor (void) de->data_sheet_variable_popup_menu = GTK_MENU (create_data_sheet_variable_popup_menu (de)); + de->var_sheet_variable_popup_menu = + GTK_MENU (create_var_sheet_variable_popup_menu (de)); + de->data_sheet_cases_popup_menu = GTK_MENU (create_data_sheet_cases_popup_menu (de)); g_object_set (de->data_editor, - "column-menu", de->data_sheet_variable_popup_menu, NULL); + "datasheet-column-menu", de->data_sheet_variable_popup_menu, + "datasheet-row-menu", de->data_sheet_cases_popup_menu, + "varsheet-row-menu", de->var_sheet_variable_popup_menu, + NULL); - g_object_set (de->data_editor, - "row-menu", de->data_sheet_cases_popup_menu, NULL); - return de; } @@ -1038,9 +1044,19 @@ static void fonts_activate (GtkMenuItem *menuitem, gpointer data) { struct data_editor *de = data; + PangoFontDescription *current_font; + gchar *font_name; GtkWidget *dialog = gtk_font_selection_dialog_new (_("Font Selection")); + + current_font = GTK_WIDGET(de->data_editor)->style->font_desc; + font_name = pango_font_description_to_string (current_font); + + gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG (dialog), font_name); + + g_free (font_name); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (get_widget_assert (de->xml, "data_editor"))); @@ -1617,6 +1633,43 @@ create_data_sheet_cases_popup_menu (struct data_editor *de) } +static GtkWidget * +create_var_sheet_variable_popup_menu (struct data_editor *de) +{ + GtkWidget *menu = gtk_menu_new (); + + GtkWidget *insert_variable = + gtk_menu_item_new_with_label (_("Insert Variable")); + + GtkWidget *delete_variable = + gtk_menu_item_new_with_label (_("Clear")); + + + gtk_action_connect_proxy (de->delete_variables, + delete_variable); + + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_variable); + + g_signal_connect_swapped (G_OBJECT (insert_variable), "activate", + G_CALLBACK (gtk_action_activate), + de->insert_variable); + + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), + gtk_separator_menu_item_new ()); + + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), delete_variable); + + + gtk_widget_show_all (menu); + + return menu; +} + + + static void diff --git a/src/ui/gui/data-editor.h b/src/ui/gui/data-editor.h index 237b6769..af282e26 100644 --- a/src/ui/gui/data-editor.h +++ b/src/ui/gui/data-editor.h @@ -77,6 +77,8 @@ struct data_editor GtkMenu *data_sheet_variable_popup_menu; GtkMenu *data_sheet_cases_popup_menu; + GtkMenu *var_sheet_variable_popup_menu; + PsppireDataEditor *data_editor; gboolean save_as_portable; diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 592e8aaa..ff96109d 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -109,8 +109,12 @@ psppire_data_editor_finalize (GObject *obj) -static void popup_variable_menu (GtkSheet *sheet, gint column, - GdkEventButton *event, gpointer data); +static void popup_variable_column_menu (GtkSheet *sheet, gint column, + GdkEventButton *event, gpointer data); + +static void popup_variable_row_menu (GtkSheet *sheet, gint row, + GdkEventButton *event, gpointer data); + static void popup_cases_menu (GtkSheet *sheet, gint row, GdkEventButton *event, gpointer data); @@ -118,6 +122,7 @@ static void popup_cases_menu (GtkSheet *sheet, gint row, + /* Callback which occurs when the data sheet's column title is double clicked */ static gboolean @@ -193,8 +198,9 @@ enum PROP_0, PROP_DATA_STORE, PROP_VAR_STORE, - PROP_COLUMN_MENU, - PROP_ROW_MENU, + PROP_VS_ROW_MENU, + PROP_DS_COLUMN_MENU, + PROP_DS_ROW_MENU, PROP_VALUE_LABELS, PROP_CURRENT_CASE, PROP_CURRENT_VAR, @@ -203,7 +209,6 @@ enum }; -#define WIDTH_OF_M 10 #define DEFAULT_ROW_HEIGHT 25 static void @@ -252,12 +257,31 @@ new_variables_callback (PsppireDict *dict, gpointer data) } } +/* Return the width (in pixels) of an upper case M when rendered in the + current font of W +*/ +static gint +width_of_m (GtkWidget *w) +{ + PangoRectangle rect; + PangoLayout *layout = gtk_widget_create_pango_layout (w, "M"); + + pango_layout_get_pixel_extents (layout, NULL, &rect); + + g_object_unref (layout); + + return rect.width; +} + static void insert_variable_callback (PsppireDict *dict, gint x, gpointer data) { gint i; + PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data); + gint m_width = width_of_m (GTK_WIDGET (de)); + PsppireAxisHetero *var_vaxis; g_object_get (de->var_sheet, "vertical-axis", &var_vaxis, NULL); @@ -269,7 +293,7 @@ insert_variable_callback (PsppireDict *dict, gint x, gpointer data) PsppireAxisHetero *haxis; g_object_get (de->data_sheet[i], "horizontal-axis", &haxis, NULL); - psppire_axis_hetero_insert (haxis, WIDTH_OF_M * var_get_display_width (var), x); + psppire_axis_hetero_insert (haxis, m_width * var_get_display_width (var), x); } } @@ -301,6 +325,7 @@ rewidth_variable_callback (PsppireDict *dict, gint posn, gpointer data) { gint i; PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data); + gint m_width = width_of_m (GTK_WIDGET (de)); for (i = 0 ; i < 4 ; ++i) { @@ -309,7 +334,7 @@ rewidth_variable_callback (PsppireDict *dict, gint posn, gpointer data) g_object_get (de->data_sheet[i], "horizontal-axis", &haxis, NULL); psppire_axis_hetero_resize_unit (haxis, - WIDTH_OF_M * + m_width * var_get_display_width (var), posn); } } @@ -355,15 +380,23 @@ psppire_data_editor_set_property (GObject *object, "model", de->var_store, NULL); break; - case PROP_COLUMN_MENU: + case PROP_VS_ROW_MENU: + { + GObject *menu = g_value_get_object (value); + + g_signal_connect (de->var_sheet, "button-event-row", + G_CALLBACK (popup_variable_row_menu), menu); + } + break; + case PROP_DS_COLUMN_MENU: { GObject *menu = g_value_get_object (value); g_signal_connect (de->data_sheet[0], "button-event-column", - G_CALLBACK (popup_variable_menu), menu); + G_CALLBACK (popup_variable_column_menu), menu); } break; - case PROP_ROW_MENU: + case PROP_DS_ROW_MENU: { GObject *menu = g_value_get_object (value); @@ -463,7 +496,8 @@ psppire_data_editor_class_init (PsppireDataEditorClass *klass) GParamSpec *data_store_spec ; GParamSpec *var_store_spec ; GParamSpec *column_menu_spec; - GParamSpec *row_menu_spec; + GParamSpec *ds_row_menu_spec; + GParamSpec *vs_row_menu_spec; GParamSpec *value_labels_spec; GParamSpec *current_case_spec; GParamSpec *current_var_spec; @@ -500,27 +534,40 @@ psppire_data_editor_class_init (PsppireDataEditorClass *klass) var_store_spec); column_menu_spec = - g_param_spec_object ("column-menu", - "Column Menu", - "A menu to be displayed when button 3 is pressed in the column title buttons", + g_param_spec_object ("datasheet-column-menu", + "Data Sheet Column Menu", + "A menu to be displayed when button 3 is pressed in thedata sheet's column title buttons", GTK_TYPE_MENU, G_PARAM_WRITABLE); g_object_class_install_property (object_class, - PROP_COLUMN_MENU, + PROP_DS_COLUMN_MENU, column_menu_spec); - row_menu_spec = - g_param_spec_object ("row-menu", - "Row Menu", - "A menu to be displayed when button 3 is pressed in the row title buttons", + ds_row_menu_spec = + g_param_spec_object ("datasheet-row-menu", + "Data Sheet Row Menu", + "A menu to be displayed when button 3 is pressed in the data sheet's row title buttons", GTK_TYPE_MENU, G_PARAM_WRITABLE); g_object_class_install_property (object_class, - PROP_ROW_MENU, - row_menu_spec); + PROP_DS_ROW_MENU, + ds_row_menu_spec); + + + vs_row_menu_spec = + g_param_spec_object ("varsheet-row-menu", + "Variable Sheet Row Menu", + "A menu to be displayed when button 3 is pressed in the variable sheet's row title buttons", + GTK_TYPE_MENU, + G_PARAM_WRITABLE); + + g_object_class_install_property (object_class, + PROP_VS_ROW_MENU, + vs_row_menu_spec); + value_labels_spec = g_param_spec_boolean ("value-labels", @@ -1077,7 +1124,7 @@ psppire_data_editor_clip_cut (PsppireDataEditor *de) /* Popup menu related stuff */ static void -popup_variable_menu (GtkSheet *sheet, gint column, +popup_variable_column_menu (GtkSheet *sheet, gint column, GdkEventButton *event, gpointer data) { GtkMenu *menu = GTK_MENU (data); @@ -1099,6 +1146,29 @@ popup_variable_menu (GtkSheet *sheet, gint column, } +static void +popup_variable_row_menu (GtkSheet *sheet, gint row, + GdkEventButton *event, gpointer data) +{ + GtkMenu *menu = GTK_MENU (data); + + PsppireVarStore *var_store = + PSPPIRE_VAR_STORE (gtk_sheet_get_model (sheet)); + + const struct variable *v = + psppire_dict_get_variable (var_store->dict, row); + + if ( v && event->button == 3) + { + gtk_sheet_select_row (sheet, row); + + gtk_menu_popup (menu, + NULL, NULL, NULL, NULL, + event->button, event->time); + } +} + + static void popup_cases_menu (GtkSheet *sheet, gint row, GdkEventButton *event, gpointer data) @@ -1263,11 +1333,27 @@ psppire_data_editor_show_grid (PsppireDataEditor *de, gboolean grid_visible) gtk_sheet_show_grid (GTK_SHEET (de->data_sheet[0]), grid_visible); } + +static void +set_font (GtkWidget *w, gpointer data) +{ + PangoFontDescription *font_desc = data; + GtkRcStyle *style = gtk_widget_get_modifier_style (w); + + pango_font_description_free (style->font_desc); + style->font_desc = pango_font_description_copy (font_desc); + + gtk_widget_modify_style (w, style); + + if ( GTK_IS_CONTAINER (w)) + gtk_container_foreach (GTK_CONTAINER (w), set_font, font_desc); +} + void psppire_data_editor_set_font (PsppireDataEditor *de, PangoFontDescription *font_desc) { - psppire_data_store_set_font (de->data_store, font_desc); - psppire_var_store_set_font (de->var_store, font_desc); + set_font (GTK_WIDGET (de), font_desc); + gtk_container_foreach (GTK_CONTAINER (de), set_font, font_desc); } diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 03e6e4c0..f21dfbd6 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -54,7 +54,7 @@ static gboolean psppire_data_store_clear_datum (GSheetModel *model, static GObjectClass *parent_class = NULL; -enum {FONT_CHANGED, +enum { BACKEND_CHANGED, n_SIGNALS}; @@ -113,17 +113,6 @@ psppire_data_store_class_init (PsppireDataStoreClass *class) object_class->finalize = psppire_data_store_finalize; object_class->dispose = psppire_data_store_dispose; - signals [FONT_CHANGED] = - g_signal_new ("font_changed", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_FIRST, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals [BACKEND_CHANGED] = g_signal_new ("backend-changed", G_TYPE_FROM_CLASS (class), @@ -169,19 +158,9 @@ psppire_data_store_init (PsppireDataStore *data_store) { data_store->dict = 0; data_store->case_file = NULL; - data_store->width_of_m = 10; data_store->dispose_has_run = FALSE; } -const PangoFontDescription * -psppire_data_store_get_font_desc (const GSheetModel *model, - glong row, glong column) -{ - PsppireDataStore *store = PSPPIRE_DATA_STORE (model); - - return store->font_desc; -} - static inline gchar * psppire_data_store_get_string_wrapper (const GSheetModel *model, glong row, glong column) @@ -220,7 +199,6 @@ psppire_data_store_sheet_model_init (GSheetModelIface *iface) iface->is_editable = NULL; iface->get_foreground = NULL; iface->get_background = NULL; - iface->get_font_desc = psppire_data_store_get_font_desc; iface->get_cell_border = NULL; iface->get_column_count = psppire_data_store_get_var_count; iface->get_row_count = psppire_data_store_get_case_count_wrapper; @@ -695,24 +673,6 @@ psppire_data_store_set_string (PsppireDataStore *store, } -void -psppire_data_store_set_font (PsppireDataStore *store, - const PangoFontDescription *fd) -{ - g_return_if_fail (store); - g_return_if_fail (PSPPIRE_IS_DATA_STORE (store)); - - store->font_desc = fd; -#if 0 - store->width_of_m = calc_m_width (fd); -#endif - g_signal_emit (store, signals [FONT_CHANGED], 0); - - - g_sheet_model_range_changed (G_SHEET_MODEL (store), - -1, -1, -1, -1); -} - void psppire_data_store_show_labels (PsppireDataStore *store, gboolean show_labels) diff --git a/src/ui/gui/psppire-data-store.h b/src/ui/gui/psppire-data-store.h index 8f30afa4..1693a9ad 100644 --- a/src/ui/gui/psppire-data-store.h +++ b/src/ui/gui/psppire-data-store.h @@ -83,10 +83,6 @@ struct _PsppireDataStore gboolean dispose_has_run ; PsppireDict *dict; PsppireCaseFile *case_file; - const PangoFontDescription *font_desc; - - /* The width of an upper case 'M' rendered in the current font */ - gint width_of_m ; gboolean show_labels; @@ -118,9 +114,6 @@ void psppire_data_store_set_case_file (PsppireDataStore *data_store, void psppire_data_store_set_dictionary (PsppireDataStore *data_store, PsppireDict *dict); -void psppire_data_store_set_font (PsppireDataStore *store, - const PangoFontDescription *fd); - void psppire_data_store_show_labels (PsppireDataStore *store, gboolean show_labels); diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 4465fa1d..083bffad 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -279,15 +279,6 @@ psppire_var_store_get_foreground (const GSheetModel *model, glong row, glong col } -const PangoFontDescription * -psppire_var_store_get_font_desc (const GSheetModel *model, - glong row, glong column) -{ - PsppireVarStore *store = PSPPIRE_VAR_STORE (model); - - return store->font_desc; -} - static gchar *get_column_title (const GSheetModel *model, gint col); static gchar *get_row_title (const GSheetModel *model, gint row); static gboolean get_row_sensitivity (const GSheetModel *model, gint row); @@ -304,7 +295,6 @@ psppire_var_store_sheet_model_init (GSheetModelIface *iface) iface->is_editable = psppire_var_store_is_editable; iface->get_foreground = psppire_var_store_get_foreground; iface->get_background = NULL; - iface->get_font_desc = psppire_var_store_get_font_desc; iface->get_cell_border = NULL; iface->get_justification = NULL; @@ -726,18 +716,6 @@ psppire_var_store_get_var_cnt (PsppireVarStore *store) } -void -psppire_var_store_set_font (PsppireVarStore *store, const PangoFontDescription *fd) -{ - g_return_if_fail (store); - g_return_if_fail (PSPPIRE_IS_VAR_STORE (store)); - - store->font_desc = fd; - - g_sheet_model_range_changed (G_SHEET_MODEL (store), -1, -1, -1, -1); -} - - static glong psppire_var_store_get_row_count (const GSheetModel * model) { diff --git a/src/ui/gui/psppire-var-store.h b/src/ui/gui/psppire-var-store.h index 7ef186a0..cf437589 100644 --- a/src/ui/gui/psppire-var-store.h +++ b/src/ui/gui/psppire-var-store.h @@ -65,7 +65,6 @@ struct _PsppireVarStore /*< private >*/ PsppireDict *dict; GdkColor disabled; - const PangoFontDescription *font_desc; PsppireVarStoreFormatType format_type; };